Pentexa — AI Pentest Scoper
Overview
- Single-binary CLI that ingests GitHub/GitLab/Jira activity and produces a concise pentest scope in Markdown using an LLM.
- Config-driven, Docker-friendly, and designed for reproducible runs. For deep dive details, see
docs.md.
Features
- Ingests commits/PRs (GitHub/GitLab) and Jira issues for a time window
- Programmatic summaries + template-driven prompts (LLM doesn’t touch the DB)
- Deterministic, redacted inputs and consistent Markdown output
- Runs locally or via Docker/cron; optional Postgres persistence and migrations
Requirements
- Go 1.21+
- Make, Git, Docker (optional)
- API tokens as needed (GitHub/GitLab/Jira)
- LLM provider + API key (OpenRouter/OpenAI/Anthropic/Google)
Quick Start
- Build:
make build(binary atbin/pentexa) - Help:
go run ./cmd/pentexa --help - Copy examples:
cp .env.example .env && cp scoper.yaml.example scoper.yaml - Validate config:
./bin/pentexa validate -c ./scoper.yaml - Run (end-to-end):
./bin/pentexa run -c ./scoper.yaml
CLI
run— end-to-end workflowvalidate— validate config (optionally--db-check)migrate— DB migrations (up,status)verify— sanity checks for repo access and environment
Configuration
- Main file:
scoper.yaml(seescoper.yaml.example). - Set provider credentials via env or
${file:/path}expansion. - Prompt templates live in
prompts/(override via--prompt-file). - Advanced options (diff inclusion, Jira selection mode, etc.) are documented in
docs.md.
Project Layout
cmd/pentexa— main entrypointinternal/cli— Cobra root and subcommands (run,validate,migrate,verify)internal/config— typed config loader, env/file expansion, validationinternal/connectors— GitHub/GitLab/Jira clients and normalizationinternal/db— migrations and helpersinternal/runner— orchestration pipelineprompts/— template files for LLM output
Docker & Compose
- Build image:
make docker-build - Start stack:
make compose-up(seedocker-compose.yml) - Migrate + run inside container:
make scope CONFIG=./scoper.yaml
SQL Workflow
- Place migrations in
internal/db/migrations/. - Author queries under
internal/db/queries/. - Generate code with
make sqlc-generate(requiressqlc).
Troubleshooting
- Use
pentexa validate -c ./scoper.yamlto verify configuration and file paths. - For full configuration keys, flags, and examples, see
docs.md.