Reddie โ€“ Autonomous AI Red-Teaming and GitHub PR Patching DevTool Reddie, an autonomous DevSecOps tool from reddie-ai, automatically discovers LLM application vulnerabilities, converts them into isolated pytest reproduction test suites, synthesizes hardened prompt/guardrail patches, verifies them in a sandbox, and opens a GitHub Pull Request with the fix in a single command. The tool supports three modes: offline deterministic heuristics, AI-powered red-teaming via Groq, and a full pipeline that creates live GitHub PRs, with auto-remediation for OWASP LLM01, LLM02, LLM06, and LLM07 categories. Reddie is an autonomous DevSecOps tool that automatically discovers LLM application vulnerabilities, converts them into isolated pytest reproduction test suites, synthesizes hardened prompt/guardrail patches, verifies them in a test sandbox, and opens a GitHub Pull Request with the fix โ€” all in a single command. ๐Ÿ“– Not in Computer Science?Read our Plain-English Non-Technical Explainer for a simple, analogy-based breakdown. Install local pip install -e . Mode 1: Offline โ€” Fast deterministic heuristics, zero API cost reddie --repo-path ./path/to/repo --export-html report.html --dry-run Mode 2: AI-Powered โ€” Real LLM red-teaming via Groq export GROQ API KEY="gsk ..." reddie --repo-path ./path/to/repo --export-html report.html --dry-run Mode 3: Full pipeline โ€” AI audit + live GitHub Pull Request export GROQ API KEY="gsk ..." export GITHUB TOKEN="ghp ..." reddie --repo-path ./path/to/repo --github-repo owner/repo --export-html report.html Add to .github/workflows/reddie-security.yml : name: ๐Ÿ›ก๏ธ Reddie Security Audit on: pull request: branches: main schedule: - cron: '0 2 ' Daily 2:00 AM UTC jobs: security-audit: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@v4 - name: Run Reddie uses: reddie-ai/reddie@v1 with: repo-path: '.' github-token: ${{ secrets.GITHUB TOKEN }} groq-key: ${{ secrets.GROQ API KEY }} export-html: 'report.html' php RECON --- REDTEAM --- REPRODUCE --- PATCH --- VERIFY --- PR | Stage | What it does | |---|---| Recon | Static AST + regex analysis. Extracts system prompts and tool definitions from Python, JS, TS files. | Red Team | Generates and executes adversarial attacks using real LLM simulation Groq or deterministic heuristics. | Reproduce | Auto-generates an isolated pytest suite that proves the vulnerability is real and repeatable. | Patch | LLM-synthesized fix: injects confidentiality boundaries, input guardrails, and privilege checks into the source. | Verify | Runs both reproduction tests and full regression suite in a sandboxed subprocess. Retries up to 3 times. | PR | Pushes a security/fix- branch and opens a GitHub Pull Request with the full audit report in the description. | | OWASP ID | Category | Auto-Remediation | |---|---|---| LLM01 | Prompt Injection | Instruction locks & input guardrails | LLM02 | Sensitive Information Disclosure | Confidentiality directives & token redaction | LLM06 | Excessive Agency | Privilege boundary enforcement | LLM07 | System Prompt Leakage | System instruction confidentiality boundaries | reddie OPTIONS --repo-path PATH Target repository to scan default: . --endpoint-url URL Live LLM API endpoint to fuzz default: mock://local --github-repo REPO GitHub repo for PR creation e.g. owner/repo --github-token TOKEN GitHub PAT or GITHUB TOKEN env var --groq-key KEY Groq API key or GROQ API KEY env var --provider PROVIDER LLM provider: groq | openrouter | openai default: groq --export-html PATH Save executive HTML audit report --export-json PATH Save structured JSON audit report --max-retries N Max auto-patch retry attempts default: 3 --dry-run Audit locally, skip GitHub PR creation -v, --verbose Enable debug logging pytest -v 13 passed in 3.5s reddie/ โ”œโ”€โ”€ main.py CLI entry point โ”œโ”€โ”€ workflow.py LangGraph StateGraph orchestration โ”œโ”€โ”€ state.py AgentSecurityState TypedDict โ”œโ”€โ”€ agents/ โ”‚ โ”œโ”€โ”€ recon.py Static analysis node โ”‚ โ”œโ”€โ”€ red team.py Adversarial fuzzing node โ”‚ โ”œโ”€โ”€ reproduce.py PyTest generator node โ”‚ โ”œโ”€โ”€ patcher.py LLM patch synthesis node โ”‚ โ”œโ”€โ”€ verifier.py Sandbox test runner node โ”‚ โ””โ”€โ”€ github pr.py Git branch + PR creator node โ”œโ”€โ”€ tools/ โ”‚ โ”œโ”€โ”€ static analyzer.py AST + regex prompt/tool extractor โ”‚ โ”œโ”€โ”€ fuzzer client.py HTTP fuzzer + heuristic evaluator โ”‚ โ”œโ”€โ”€ llm client.py Groq client: simulate, judge, patch โ”‚ โ”œโ”€โ”€ reporter.py HTML + JSON OWASP report generator โ”‚ โ”œโ”€โ”€ git tools.py Git branch/commit/push + PyGithub PR โ”‚ โ””โ”€โ”€ test runner.py Subprocess pytest harness โ”œโ”€โ”€ tests/ Full test suite 13 tests โ”œโ”€โ”€ assets/ โ”‚ โ””โ”€โ”€ banner.jpg โ”œโ”€โ”€ Dockerfile โ”œโ”€โ”€ docker-compose.yml โ”œโ”€โ”€ action.yml GitHub Action definition โ””โ”€โ”€ NON CS EXPLAINER.md Plain-English guide Built with LangGraph https://github.com/langchain-ai/langgraph ยท Powered by Groq https://groq.com ยท Mapped to OWASP LLM Top 10 2025 https://owasp.org/www-project-top-10-for-large-language-model-applications/