Shannon 的切入点很直接:它不是又一个静态分析器,而是一个具备自主验证能力的 AI 渗透测试员。它读你的源码,从中推断攻击面,然后真的去构造请求、发起攻击,用可复现的利用过程(exploit)来证明漏洞确实存在。这一点至关重要——在安全领域,“证据”远比“告警”更有说服力。它瞄准的正是“漏洞在进入生产环境之前”这个黄金窗口。
graph TD
A[源代码仓库] --> B[代码解析与攻击面建模]
B --> C[攻击向量生成]
C --> D[漏洞假设列表]
D --> E[Agent 编排器]
E -->|"生成利用载荷"| F[沙箱/测试环境执行]
F --> G[响应与行为分析]
G --> H{"漏洞是否复现?"}
H -->|"已验证"| I[生成 PoC 与报告]
H -->|"未复现"| J[回退迭代假设]
J --> C
Shannon is an AI pentester for web applications and APIs. It analyzes your source code, identifies attack vectors, and executes real exploits to prove vulnerabilities before they reach production.
Shannon is an autonomous, AI pentester for web applications and APIs.
It analyzes your source code, identifies attack paths, and executes real exploits to prove vulnerabilities before they reach production. No exploit, no report.
This repository is Shannon: the full open-source agent, run locally from your command line.
Launch Shannon
npx @keygraph/shannon@latest
The interactive launcher will guide you through setup and your first pentest.
Tip 提示
AI agents and LLMs: start with llms.txt for a concise map of this repository, or use llms-full.txt for the README and docs combined into one file.
Shannon is an autonomous AI pentester developed by Keygraph. It performs security testing of web applications and their underlying APIs by combining source-code analysis with live exploitation.
Shannon analyzes your web application’s source code to identify potential attack vectors, then uses browser automation and command-line tools to execute real exploits against the running application and its APIs. Only vulnerabilities with a working proof-of-concept are included in the final report.
Shannon is the agent. This repository is Shannon, the open-source pentester you run yourself. The same Shannon also powers Keygraph’s commercial editions, Pro and Enterprise. See Editions for how Shannon compares with Pro, Enterprise, and the Community Program.
Why Shannon Exists
Thanks to tools like Claude Code and Cursor, your team ships code non-stop. But your penetration test? That happens once a year. This creates a massive security gap. For the other 364 days, you could be unknowingly shipping vulnerabilities to production.
Shannon closes that gap by providing on-demand, automated penetration testing that can run against every build or release.
Why "Shannon"?
It’s named after Claude Shannon, the father of information theory. At its core, pentesting is an information problem: every probe reduces uncertainty about a system’s state. The best tools maximize the signal gained from every request, turning those bits of knowledge into an exploit path.
Also, we wanted you to be able to say, “Hey Claude, run Shannon” to find all the security flaws in your vibe-coded app.
Not a replacement for human pentesters
Shannon is built to work alongside expert pentesters and red teamers, not replace them. Great pentesters understand the business, chain attacks in ways nobody anticipated, and bring years of judgment that current models can’t match.
Shannon solves a different problem: there is far more software to test than security teams have time to cover. Critical systems get periodic expert assessments, while the long tail of internal apps, APIs, and fast-moving services rarely gets tested at all.
Shannon shifts pentesting left into the software development lifecycle (SDLC). Use it to run exploitation-backed tests against staging environments and releases at the cadence they actually ship, and save expert human time for the risks that need someone who knows the organization.
Shannon in Action
These reports are from Shannon OSS scans of Photoview 2.4.0, one of the applications in Doyensec’s comparison of Aikido and XBOW. We ran Shannon against the same application version and evaluated its results separately. Read the Doyensec study and our Shannon follow-up comparison for the methodology, limitations, costs, and results.
Node.js 22+: required for the recommended npx workflow.
AI provider credentials: Shannon runs on Anthropic, OpenAI, xAI, AWS Bedrock, and any other provider in the harness catalogue — each of which you can point at a proxy or LLM gateway through a custom base URL, and a model the catalogue does not carry can be described with a custom model configuration. You bring your own key, and Keygraph never proxies your model traffic. Shannon is provider-agnostic. See AI providers for suggested model IDs.
Cyber safeguards cleared with your provider: Anthropic and OpenAI apply real-time safeguards to cyber-security workloads, which can interrupt a scan mid-run. Complete their guidance for legitimate security testers before your first run - see AI providers and the cyber verification announcement.
Run Shannon
Warning 警告
Shannon actively executes exploits. Run it only against applications and environments you own or have explicit written authorization to test. Do not run Shannon against production systems.
# Configure credentials with the interactive wizard.
npx @keygraph/shannon@latest setup
# Run a pentest against a source-available target.
npx @keygraph/shannon@latest start \
-u https://your-app.com \
-r /path/to/your/repo
Shannon pulls the worker image from Docker Hub, starts the required local infrastructure, mounts the target repository read-only inside an ephemeral worker container, and writes results to a local workspace.
For source builds, authenticated scans, provider-specific setup, and platform notes, see Documentation.
Tip 提示
Prefer to use a subscription instead of API credits?
OpenAI Codex: The latest version of Shannon supports ChatGPT Plus and Pro subscriptions. Follow the OpenAI Codex subscription setup guide to get started.
xAI (Grok): The latest version of Shannon supports xAI subscriptions. Follow the xAI subscription setup guide to get started.
Claude Code: The latest version of Shannon does not support Claude Code subscriptions. Follow the Claude Code subscription setup guide to use version 1.9.0, which is the final release built on the Claude Agent SDK.
Key Capabilities
No exploit, no report: Reports only vulnerabilities confirmed with a reproducible proof of concept, reducing speculative scanner noise.
Advanced code analysis: Maps architecture, trust boundaries, interfaces, data flows, and critical assets before sending credible attack paths to live pentesting agents.
Autonomous execution: Runs reconnaissance, analysis, exploitation, and reporting from a single command.
Live terminal experience: Simplifies scan setup and shows agent progress and results without exposing orchestration logs.
Authenticated testing: Supports credentials, login flows, TOTP, email authentication, focus areas, and rules of engagement through configuration.
OWASP-focused coverage: Tests for exploitable injection, XSS, SSRF, broken authentication, and broken authorization.
Resumable workspaces: Resumes interrupted scans without repeating completed work.
Native CI/CD integrations: Runs through the official GitHub Action or GitLab CI/CD component, preserves artifacts, publishes findings, and gates releases on proven vulnerabilities.
Multi-format reports: Produces evidence-rich PDF and Markdown reports plus JSON and SARIF 2.1.0. SARIF is enabled by default for exploit-mode scans.
Provider agnostic and BYOK: Supports Anthropic, OpenAI, xAI, AWS Bedrock, compatible APIs and LLM gateways, and local models served through Ollama, vLLM, or LM Studio.
Private by design: Runs in your infrastructure, stores results locally, and sends model requests directly to your chosen endpoint. A local endpoint keeps data inside your environment.
CI/CD Integrations
Shannon can run continuously against deployed staging and development environments through official integrations for GitHub Actions and GitLab CI/CD.
Both integrations:
analyze the checked-out source repository while attacking a running target;
preserve PDF, Markdown, and SARIF reports as pipeline artifacts;
preserve scan and agent logs for debugging, including incomplete runs;
support pull-request, release, and scheduled pentests;
distinguish an incomplete assessment from a completed scan with no findings; and
optionally fail the pipeline when Shannon exploits a vulnerability at or above a configured severity threshold.
A code-analysis hypothesis does not fail the pipeline. Severity gates count only findings with status: exploited.
The Action defaults repo to the checked-out GitHub workspace. It uploads one artifact containing the security assessment reports and SARIF, plus a separate run artifact containing scan and agent logs. Enabling upload-sarif publishes supported findings to GitHub code scanning.
Requirements:
a private repository;
a runner with Docker and Docker Compose v2;
access to the running staging or development target; and
a model-provider credential stored as a GitHub Actions secret.
This repository. A complete autonomous pentester you run yourself, locally or in CI/CD, against an application whose source code you have. Well suited to individual developers and small teams.
Open source under AGPL-3.0. You pay only your own model costs.
Recon and vulnerability analysis explores the running application, ties runtime behavior back to the source, and runs specialized agents across Injection, XSS, SSRF, Authentication, and Authorization.
Agentic security code analysis maps the application’s architecture, trust boundaries, exposed interfaces, dependencies, data flows, and high-risk assets, then opens targeted investigations against them.
Finding reconciliation merges both streams of candidates, deduplicates the overlap, and groups what remains into an exploitation queue.
Exploitation agents attempt real proof-of-concept attacks against the running application.
Validation throws out every candidate Shannon can’t demonstrate.
Reporting produces PDF and Markdown reports with the evidence attached, plus structured JSON and SARIF for downstream systems.
Only live-validated vulnerabilities become Shannon pentest findings or count toward CI/CD severity gates.
Each scan runs in an ephemeral Docker container with an isolated workspace and per-invocation orchestration.
Shannon compared with Pro, Enterprise, and the Community Program: black-box pentesting, SCA and secrets, findings management, fix pull requests, retests, Jira, and deployment.
Safety, Scope, and Limitations
Shannon is not a passive scanner. Its exploitation agents can create users, submit forms, mutate application state, trigger outbound requests, and otherwise affect the target system. Use sandboxed, staging, or local development environments with disposable data.
You are responsible for using Shannon legally and ethically. Do not point Shannon at systems, repositories, or applications you do not own or do not have explicit authorization to test.
Important limitations:
Shannon is tuned for fast, code-informed pentesting in everyday development and CI/CD. Exhaustive agentic SAST, broader scanner coverage, centralized governance, and full-lifecycle vulnerability management are delivered through Pro, Enterprise, and the Community Program.
Findings still require human review. LLM-generated reports can contain weakly supported or incorrect details.
Anthropic, OpenAI, xAI, and AWS Bedrock are built-in providers, and any other provider in the harness catalogue works too — each reachable through a custom base URL that points it at a proxy or LLM gateway. Model capability varies, and a model that does not follow Shannon’s instructions or tool-use constraints reliably will produce weaker results.
A full run can take roughly 1 to 1.5 hours and may incur LLM API costs depending on model pricing and application complexity.
Do not scan untrusted or adversarial codebases. AI-powered tools that read source code can be exposed to prompt injection.
Commercial and enterprise licensing is available for organizations that need different license terms, commercial support, private redistribution, managed-service use, or broader deployment options, including Keygraph Pro and Enterprise.
Keygraph is the company behind Shannon. It also builds Keygraph Pro and Keygraph Enterprise, the commercial editions that close the full AppSec lifecycle and run an enhanced build of Shannon as their pentesting engine.
Community and Support
Community office hours are available for hands-on help with bugs, deployments, and configuration questions.
Yes. Shannon runs inside your infrastructure in an ephemeral worker container. It mounts the repository read-only and writes results to a local workspace.
Keygraph never receives your source code and never proxies your model traffic. Your model requests go straight to the provider or endpoint you configure, and they carry source and application context with them. Point Shannon at a locally hosted endpoint and that traffic stays inside your environment too.
Does Shannon support bring your own key (BYOK)?
Yes, always. You provide the LLM credentials Shannon uses to run a pentest, in every deployment, open source and commercial. Shannon sends model requests straight to the provider or endpoint you configure, and Keygraph never proxies them. In self-hosted Enterprise deployments, model requests never touch Keygraph’s infrastructure: they leave your environment only to reach the endpoint you configure. In Keygraph Pro, which Keygraph hosts, model requests are routed through Keygraph’s LLM gateway.
Does Shannon output SARIF?
Yes. Shannon emits SARIF 2.1.0, the OASIS standard format for static analysis results, alongside structured JSON. Any SARIF consumer reads it: code scanning services, vulnerability management platforms, security dashboards, and CI/CD pipelines. It is written by default on exploit-mode scans; set report.sarif to "false" in your configuration file to opt out.
Which AI providers does Shannon support?
Anthropic, OpenAI, xAI, and AWS Bedrock are built in and configured directly by provider ID. Beyond those, Shannon runs on any provider in the Pi harness catalogue, named the same <provider>:<model-id> way. Any provider can be pointed at a proxy or LLM gateway through a custom base URL, which overrides only the endpoint and keeps that provider’s API dialect. A model the catalogue does not carry, such as one a router or gateway serves under its own ID, or a self-hosted model, is described in a custom model configuration file and passed with --models-config. Shannon uses a single unified model setting throughout a pentest.
Can I run Shannon on a local or self-hosted model?
Shannon works with local models served through Ollama, vLLM, or LM Studio, which expose an OpenAI-compatible endpoint, as well as routers such as OpenRouter and LLM gateways such as LiteLLM. A model the harness catalogue does not carry, which most self-hosted models are, is described in a custom model configuration file passed with --models-config; routers and gateways can also be reached with a custom base URL. Capability varies, and a model that does not follow Shannon’s instructions or tool-use constraints reliably will produce weaker pentests than a frontier model, so take this path only if you know how your chosen model behaves. See Local and self-hosted models.
Does Shannon actually exploit vulnerabilities, or just scan?
Shannon executes real exploits. It reports a finding only when it has produced a working proof-of-concept, and discards hypotheses it cannot prove. It is a pentester, not a passive scanner.
评论