Shannon: the open-source AI pentester for web apps and APIs
Shannon is a free open-source AI pentester for web applications and APIs. It reads your source code, maps attack paths against the running application, and only reports a vulnerability when it has executed a working exploit to prove it. The project’s rule is simple: no exploit, no report.
That matters this month. Google’s threat group has warned that fully automated, agentic AI-driven attacks are moving from experiment to real intrusions, and the FBI has flagged autonomous pentest frameworks abused by criminals. Defenders need the same class of tool, pointed at their own code, before an attacker does. The open-source AI security engineer behind Spotlight has built a similar sweep framework, and before you point any agent at your own code, read about the wider shadow-AI risk inside enterprises.
What the AI pentester does
Shannon runs as an autonomous agent on your machine. It combines source-code analysis with live exploitation in six stages:
- Recon and vulnerability analysis explores the running application and ties runtime behaviour back to the source.
- Agentic security code analysis maps architecture, trust boundaries, data flows and high-risk assets.
- Finding reconciliation merges both streams, deduplicates and queues what is left.
- Exploitation agents attempt real proof-of-concept attacks against the running application.
- Validation discards every candidate it cannot demonstrate.
- Reporting produces PDF and Markdown reports plus JSON and SARIF 2.1.0 output.
Coverage is OWASP-focussed: injection, XSS, SSRF, broken authentication and broken authorisation. It supports authenticated testing with credentials, login flows, TOTP and rules of engagement, and it can resume interrupted scans.
The same engine powers Keygraph’s commercial Pro and Enterprise editions. The repository you run yourself is the open-source one.
The licence
Shannon is released under the GNU Affero General Public License v3.0. That copyleft licence lets you run, study, modify and share the tool, including commercially, provided you make the corresponding source available for network use and keep licence notices intact. It comes with no warranty. Commercial licensing is available from Keygraph for organisations that need different terms.
Installing it on Linux
Shannon needs Docker for its worker container and Node.js 22 or later for the recommended workflow. You bring your own model key; the project says it never proxies your model traffic.
# Interactive setup: provider, key, and your first target.
npx @keygraph/shannon@latest setup
# Run a pentest against a staging target whose repo you own.
npx @keygraph/shannon@latest start \
-u <target-url> \
-r /path/to/your/repo
You can name the model with SHANNON_AI_MODEL=<provider>:<model-id> and the key with SHANNON_AI_API_KEY. Anthropic, OpenAI, xAI and AWS Bedrock are built in, and any OpenAI-compatible endpoint works, including local models served through Ollama, vLLM or LM Studio. Point it at a local endpoint and model traffic stays inside your environment.
For CI, the official GitHub Action or GitLab CI/CD component gates releases on exploited findings and uploads SARIF to code scanning. A full run takes roughly one to one and a half hours, so treat it as a release gate, not a dev-loop linter.
A concrete lab use case
Run this only against a target you own or have written permission to test. A sensible first target is a deliberately vulnerable lab app such as DVWA or OWASP Juice Shop running on localhost, with its source in a local repo.
Start Shannon against the lab URL with the repo mounted read-only. It maps the app, queues injection, XSS, SSRF and auth findings, then attempts real exploits in an ephemeral container. You get a report in which every finding carries evidence, and a SARIF file you can pipe into your existing pipeline. Compare a patched twin of the app and watch the same findings disappear. That is the useful discipline: a finding without a working exploit does not make the report.
Use the results to train your own defences: fix the demonstrated class of bug, add the missing control, and write the detection for the exploit you just watched run.
Risks and limits
- Data leakage. Source code and app context go to whichever model endpoint you configure. Use a local or self-hosted endpoint for sensitive code, and never point it at production.
- Prompt injection. The project warns against scanning untrusted or adversarial codebases; malicious repository content can influence the agent.
- Hallucinated findings. LLM-written reports can contain weakly supported or incorrect detail. Human review is essential, even with the exploit gate.
- Mutative testing. Exploitation agents can create users, change data and trigger outbound traffic. Run in a disposable VM or sandbox with throwaway data.
- Licence limits. AGPL-3.0 is copyleft; if you modify and offer it as a network service, you must release the modified source.
- What not to send it. No live credentials, customer data, production secrets, or code you are not authorised to test.
Shannon actively executes exploits. Use against systems you do not own or lack written authorisation to test is unlawful.







