autopentest-ai: Instructions file for Claude Code

CLAUDE.md

autopentest-ai CLAUDE.md is an instructions file for Claude Code from bhavsec/autopentest-ai. It costs 29,523 tokens per session, scanned B, original, Apache-2.0.

Repository instructions for AutoPentest, a tool for automated web-application security testing based on the OWASP Web Security Testing Guide, a catalog of recommended penetration tests.

In plain words
What is it for?
Use them to register domains, find test procedures and payloads, run tests, record vulnerabilities, and track whether each test was completed or skipped.
Why use it?
They organize testing scope, available test instructions, evidence, and progress so security assessments are repeatable and tracked.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions subagents; names the TodoWrite tool; mentions Claude Code.

This is bhavsec/autopentest-ai's own configuration. It tells Claude Code how to work on autopentest-ai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything autopentest-ai configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bhavsec/autopentest-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bhavsec/autopentest-ai/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/bhavsec/autopentest-ai

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autopentest-ai CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/bhavsec/autopentest-ai/claude-md/github.svg)](https://agentmods.dev/instructions/bhavsec/autopentest-ai/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/bhavsec/autopentest-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/bhavsec/autopentest-ai/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for autopentest-ai CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/bhavsec/autopentest-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/bhavsec/autopentest-ai/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29,523 This file is loaded in full into every session.
When invoked 29,523 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.29523 $0.29523
Opus 5 $0.14761 $0.14761
Sonnet 5 $0.05905 $0.05905
Haiku 4.5 $0.02952 $0.02952

Measured 9d ago against content hash 82d020792b80, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

autopentest-ai CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- SSRF + cloud metadata (169.254.169.254) → credential theft (upgrade to Critical)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**All HTTP requests are made via `docker exec autopentest-tools curl`** — the Docker container has full root shell access with all security tools pre-installed. Traffic is routed through Burp proxy (via `HTTP_PROXY`/`HTT
CLAUDE.md · 2,005 lines

How it starts

The opening of the file, as written. The whole thing — 2,005 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AutoPentest: Automated Web Application Penetration Testing

You are an expert penetration tester performing automated web application security assessments using the OWASP Web Security Testing Guide (WSTG) methodology.

Available MCP Servers

WSTG Pentest MCP Server (wstg-pentest)

OWASP WSTG knowledge base, engagement management, and test coverage tracking. Tools:

  • list_wstg_categories: List all 12 WSTG test categories with available test counts
  • list_tests_in_category: List tests within a specific category (e.g., INPV, ATHN)
  • get_wstg_test: Get full test instructions with CLI-specific guidance, payloads, and detection criteria
  • get_test_payloads: Get just the payloads for a specific test
  • search_wstg: Search across all WSTG content by keyword
  • log_finding: Record a discovered vulnerability with evidence (optional domain param for cross-domain engagements)
  • register_scope: Register a domain in the engagement scope with type (app, auth_provider, api, cdn, third_party)
  • get_scope: Get all registered domains for an engagement, grouped by type
  • track_test: Track execution status of a WSTG test (completed/skipped/not_applicable/in_progress) — MUST be called for every test (optional domain param)
  • track_tool: Track execution status of a CLI security tool (run/skipped/not_applicable) — MUST be called for every tool
  • get_coverage: Get test coverage summary with per-category percentages — MUST be called before generate_report
  • get_tool_coverage: Get CLI tool coverage summary by phase — MUST be called before generate_report
  • get_findings: Review all findings for an engagement, sorted by severity
  • phase_gate_check: Validate phase completion — returns PASS/FAIL with blockers, warnings, and brainstorming suggestions — MUST call after every phase
  • generate_report: Generate a full markdown pentest report (validates all phase gates before generating; use force=True to override)
  • start_code_analysis: Begin source code analysis for an engagement (call before Phase 0 if source code is available)
  • save_code_analysis: Save completed source code analysis markdown
  • get_code_analysis: Retrieve source code analysis for an engagement
  • save_checkpoint: Save a checkpoint of current engagement state (auto-called on phase gate PASS, auto-updates resume-prompt.md)
  • resume_engagement: Resume an interrupted engagement from latest checkpoint (includes mid-phase remaining tests)
  • generate_resume_prompt: Generate a complete, self-contained resume prompt with target, auth, phase state, remaining tests, and rules — also writes to engagements/<eid>/resume-prompt.md
  • list_checkpoints: List all saved checkpoints for an engagement
  • create_exploitation_queue: Create a structured exploitation queue for a vulnerability class (vuln→exploit handoff)
  • get_exploitation_queue: Retrieve exploitation queue for a vulnerability class
  • mark_exploited: Mark a vulnerability as exploited/potential/failed/false_positive/deferred after exploitation attempt
  • get_browser_profile: Get an isolated browser profile path for a subagent (parallel session isolation)
  • git_checkpoint: Create a git checkpoint of the engagement workspace (rollback on failure)
  • git_rollback: Roll back engagement workspace to last git checkpoint
  • update_finding: Update an existing finding's severity, description, or remediation (used during Final Judge remediation)
  • get_judge_data: Compile all engagement data for Final Judge zero-context review (coverage, findings, scope, gates, anomaly flags)
  • track_judge_review: Record the Final Judge review verdict and remediation actions
  • track_qa_review: Record a Quality Reviewer's review for a phase — MUST be called after each Quality Reviewer subagent completes. Phase gates verify QA review was done for the previous phase.
  • get_audit_log: Retrieve the append-only event log for debugging and forensics
  • get_engagement_status: Get comprehensive dashboard-style status summary
  • load_engagement_config: Parse a YAML config file, validate, auto-register scope domains — use for config-driven pentests
  • get_engagement_config: Retrieve stored engagement config with masked passwords
  • get_engagement_rules: Get formatted avoid/focus rules for subagent prompts — MUST pass to every subagent
  • validate_exploitation_queue: Validate an exploitation queue before Wave 2 — checks required fields, evidence, duplicates
  • save_deliverable: Save a typed inter-agent deliverable (analysis report) for consumption by exploitation agents
  • get_deliverable: Retrieve a deliverable by type — used by Wave 2 exploitation agents for context
  • list_deliverables: List all saved deliverables for an engagement with metadata
  • get_witness_payloads: Get context-aware witness payloads for a sink context (html_body, sql_string, command_shell, etc.) — use before exploitation to confirm input reaches sink
  • get_evidence_checklist: Get mandatory evidence checklist and proof levels for a vuln class — call before log_finding() to verify sufficient proof
  • get_slot_types: Get slot-type classification for sink analysis — identifies correct vs wrong defense per sink position
  • list_portswigger_categories: List all 31 PortSwigger technique guide categories with lab counts and WSTG cross-references
  • get_technique_guide: Get the full attack technique reference guide for a vulnerability category — returns detection methods, exploitation techniques, payloads, cheat sheets, and WAF bypass patterns (e.g., SQLI, XSS, SSRF, SSTI, JWT)
  • search_techniques: Search across all technique guides for relevant content — find specific attack techniques, payloads, or bypass methods (e.g., WAF bypass, blind time-based, UNION Oracle, SSTI Jinja2)
  • create_task_tree: Create a hierarchical task tree for strategic planning — phases are branches, tests are leaves. Prevents depth-first bias and context loss.
  • add_task_node: Add a task node under a parent (e.g., add test tasks under a phase node)
  • update_task_node: Update a node's status/notes/findings. Auto-propagates completion up the tree.
  • get_task_tree: Get the full task tree as formatted markdown with completion percentages per phase
  • get_subtree: Get a specific subtree for subagent context injection (e.g., give a subagent only the Phase 4 subtree)
  • get_task_summary: One-line-per-phase summary table for main agent strategic decisions
  • parse_tool_output: Parse and condense CLI tool output (nmap, nuclei, sqlmap, ffuf, httpx, etc.) into structured summaries. Reduces token usage 3-5x.
  • ingest_tool_file: Read a tool output file from disk, parse it, and return the structured summary
  • prioritize_endpoints: Score and sort endpoints by risk (param count, tech risk, taint chains, auth requirements) for prioritized testing
  • get_priority_queue: Retrieve the saved endpoint priority queue sorted by risk score
  • identify_waf: Identify WAF vendor from response headers/body/status code — matches against 12 WAF signature databases (Cloudflare, AWS WAF, Akamai, Imperva, ModSecurity, F5, etc.)
  • get_waf_bypass: Get WAF bypass payloads tailored to a specific vendor and vulnerability class — returns payloads by complexity level with encoding strategies
  • list_waf_vendors: List all supported WAF vendors with signature counts and bypass coverage
  • add_graph_node: Add a node to the knowledge graph (endpoint, parameter, technology, finding, user_role, cookie, domain, header, file, secret)
  • add_graph_edge: Add a directed edge between nodes (authenticates_to, has_parameter, reflects_in, redirects_to, trusts_origin, chains_to, etc.)
  • query_graph: Query the knowledge graph — filter by node type, edge type, node ID, or properties
  • find_chains: Find vulnerability chains and attack paths using BFS + predefined chain patterns (XSS+no CSP, SSRF+cloud metadata, IDOR+admin, etc.) with severity upgrade suggestions
  • get_graph_summary: Get knowledge graph statistics — node/edge counts, type distribution, isolated nodes
  • verify_tool_result: Verify CLI tool output quality — returns status (valid/suspicious/empty), issues, and corrected command suggestions. Call when tool output is empty or suspicious.
  • compress_phase_context: Generate a compressed summary of all engagement activity for a phase — auto-triggered on phase gate PASS. Saves as phase_N_summary deliverable.
  • get_engagement_summary: Get a compressed summary of all phases completed so far — combines phase summaries for subagent context injection

Read the full file on GitHub · 2,005 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 2,005 lines · 29,523 tokens per session scan B 82d020792b80

Subscribe to this mod's changes

autopentest-ai CLAUDE.md is an instructions file published in the GitHub repository bhavsec/autopentest-ai (227 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 29,523 tokens to every session, about $0.1476 per session on Opus 5. A static security scan graded it B with 2 findings (cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens