pentest-ai
AGENTS.md1.7k starsChanged 4 months agoMITView on GitHub
For AI coding agents (Claude Code, Cursor, Copilot, Codex CLI, Devin, Windsurf, Gemini CLI, Aider) and human contributors. Briefly: build, test, style, layout. Defer to README.md for product info. Optional surfaces (install only what you'll touch): Browser tests need: playwright install chromium. Stealth crawler needs: scrapling install --force. asyncio_mode = "auto" is set in pyproject.toml. Use pytest-asyncio patterns; do not call asyncio.run inside tests. Pre-commit hooks: pre-commit install once, then they run on every commit. This is offensive-security tooling. Never…
- Reads credentials
- Installs packages
Trending
Quiet since August.thin dataabout the whole repository
Who's talking about 0xSteph/pentest-ai
- S1norin/shlepa“Bundle zero-dep deterministic recon script in the agent”GitHub · Aug 29, 2026
- ologistio/freeboard“Automated pentests”GitHub · Jun 29, 2026
- JSONbored/awesome-claude“content(mcp): add Pentest AI MCP Server”GitHub · Jun 6, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
Add tests for new code; mirror module structure in tests/.
- Very specific: line 62
No secrets in code or tests.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent guide for pentest-ai
For AI coding agents (Claude Code, Cursor, Copilot, Codex CLI, Devin, Windsurf, Gemini CLI, Aider) and human contributors. Briefly: build, test, style, layout. Defer to README.md for product info.
Build
pip install -e .[dev]Optional surfaces (install only what you'll touch):
pip install -e .[litellm,api,menu,browser,tracing,stealth,cloud]Browser tests need: playwright install chromium.
Stealth crawler needs: scrapling install --force.
Test
pytest # full suite
pytest tests/test_cli.py # one file
pytest -k "name_substring" # by keywordasyncio_mode = "auto" is set in pyproject.toml. Use pytest-asyncio patterns; do not call asyncio.run inside tests.
Lint, types, format
ruff check . # lint
ruff format . # format
mypy . # types (non-strict; see [tool.mypy] in pyproject.toml)Pre-commit hooks: pre-commit install once, then they run on every commit.
Layout
| Path | Purpose |
cli/ | ptai CLI entrypoint, menu, install wizard, MCP setup |
mcp_server/ | FastMCP server, exposes tools to Claude Code, Cursor, etc. |
api/ | FastAPI HTTP surface (alternative to MCP for non-MCP clients) |
engine/ | Orchestrator, scope, auth, findings DB, telemetry, HITL, playbooks |
agents/ | BaseAgent orchestrator classes (18 dirs under agents/) |
tools/ | Wrappers — all of them in tools/registry.py |
playbooks/ | YAML multi-step engagement playbooks |
tests/ | pytest suite |
benchmarks/ | reproducible solve-rate measurements |
docs/ | user-facing documentation |
Conventions
- Python ≥ 3.10. Tested on 3.10 – 3.14 (
requires-python = ">=3.10,<3.15"). - Add tests for new code; mirror module structure in
tests/. - New tool wrappers register in
tools/registry.py(there are no per-category packages undertools/). - New agents subclass
agents/base.py:BaseAgent. - 160-char line length (
ruffconfig). - No secrets in code or tests.
.env*is gitignored.
Authorization & safety
This is offensive-security tooling. Never run it against systems you do not own or have written authorization to test. First run prompts for AUP acceptance and persists to ~/.pentest-ai/aup-consent.txt. Set PENTEST_AI_AUP_ACCEPTED=1 only in non-interactive CI you control.
Scope enforcement is non-negotiable: any change that allows scanning outside the declared target list is a security regression. See SECURITY.md.
Definition of done
- New tests for new code; existing tests pass:
pytest ruff check .cleanmypy .clean (or new ignores justified in PR description)- No new secrets committed (
.gitleaks.tomlis enforced) CHANGELOG.mdupdated for user-visible changes- If a new tool/agent: registered, documented, and integration-tested
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

