Skip to content

GerhardBotha97/pentexa

Repository files navigation

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 at bin/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 workflow
  • validate — validate config (optionally --db-check)
  • migrate — DB migrations (up, status)
  • verify — sanity checks for repo access and environment

Configuration

  • Main file: scoper.yaml (see scoper.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 entrypoint
  • internal/cli — Cobra root and subcommands (run, validate, migrate, verify)
  • internal/config — typed config loader, env/file expansion, validation
  • internal/connectors — GitHub/GitLab/Jira clients and normalization
  • internal/db — migrations and helpers
  • internal/runner — orchestration pipeline
  • prompts/ — template files for LLM output

Docker & Compose

  • Build image: make docker-build
  • Start stack: make compose-up (see docker-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 (requires sqlc).

Troubleshooting

  • Use pentexa validate -c ./scoper.yaml to verify configuration and file paths.
  • For full configuration keys, flags, and examples, see docs.md.

About

Scope security tests or have technical release notes without breaking a sweat!

Resources

Stars

Watchers

Forks