shannon by unicodeveloper/shannon
npx skills add https://github.com/unicodeveloper/shannon --skill shannon权限概述: 此技能用于协调 Shannon,一个基于 Docker 的渗透测试工具,可对目标应用程序主动执行攻击。它会在本地克隆/更新 Shannon 代码库,运行 Docker 容器,并读取渗透测试报告。Shannon 会执行真实的漏洞利用——请仅针对您拥有或已获得明确书面授权进行测试的应用程序运行。 切勿针对生产系统运行。
Shannon 会分析您的源代码,识别攻击向量,并在漏洞进入生产环境之前执行真实的漏洞利用来证明其存在。在 XBOW 安全基准测试中达到 96.15% 的漏洞利用成功率。覆盖 OWASP Top 10:注入、XSS、SSRF、身份验证失效、授权失效等。
在执行任何操作之前,您必须确认:
⚠️ Shannon 会执行具有变更效果的真实攻击。
├─ 仅对您拥有或已获得书面授权进行测试的系统运行
├─ 切勿针对生产环境
├─ 结果需要人工审核——LLM 输出可能包含幻觉
└─ 您有责任遵守所有适用的法律
在每次渗透测试运行前显示此警告。如果用户已在此会话中确认授权,则简要提醒即可。
从用户输入中提取:
http://localhost:3000,)广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
http://staging.example.com./repos/ 目录中)常见调用模式:
/shannon http://localhost:3000 myapp → 对本地应用进行完整渗透测试/shannon --workspace=audit1 http://staging.example.com backend-api → 用于恢复的命名工作空间/shannon --scope=xss,injection http://localhost:8080 frontend → 针对特定类别/shannon status → 检查正在运行的渗透测试/shannon results → 显示最新报告/shannon stop → 停止正在运行的渗透测试显示解析后的意图:
🔐 Shannon 渗透测试
├─ 目标:{TARGET_URL}
├─ 源代码:repos/{REPO_NAME}
├─ 范围:{SCOPE 或 "完整(所有 5 个 OWASP 类别)"}
├─ 工作空间:{WORKSPACE 或 "自动生成"}
└─ 配置:{CONFIG 或 "默认"}
预计运行时间:1–1.5 小时 │ 预计成本:约 $50 (Claude Sonnet)
检查 Shannon 是否已在本地克隆:
SHANNON_HOME="${SHANNON_HOME:-$HOME/shannon}"
if [ -d "$SHANNON_HOME" ] && [ -f "$SHANNON_HOME/shannon" ]; then
echo "Shannon 位于 $SHANNON_HOME"
cd "$SHANNON_HOME" && git pull --ff-only 2>/dev/null || true
else
echo "未找到 Shannon。正在克隆..."
git clone https://github.com/KeygraphHQ/shannon.git "$SHANNON_HOME"
fi
# 验证 Docker 是否可用
if command -v docker &>/dev/null; then
echo "Docker: $(docker --version)"
else
echo "错误:需要 Docker。请安装 Docker Desktop:https://docker.com/products/docker-desktop"
exit 1
fi
如果 Shannon 未安装,则克隆它并通知用户。如果缺少 Docker,则停止并告知他们安装。
SHANNON_HOME 默认为 ~/shannon。用户可以通过 SHANNON_HOME 环境变量覆盖。
Shannon 需要将目标的源代码放在 $SHANNON_HOME/repos/{REPO_NAME}/ 中。
询问用户其源代码的位置:
# 如果用户提供本地路径
REPO_PATH="/path/to/their/source"
REPO_NAME="myapp"
# 创建符号链接或复制到 Shannon 的 repos 目录
mkdir -p "$SHANNON_HOME/repos"
if [ ! -d "$SHANNON_HOME/repos/$REPO_NAME" ]; then
ln -s "$(realpath "$REPO_PATH")" "$SHANNON_HOME/repos/$REPO_NAME"
echo "已链接 $REPO_PATH → repos/$REPO_NAME"
fi
如果用户提供的是 GitHub URL:
cd "$SHANNON_HOME/repos"
git clone "$GITHUB_URL" "$REPO_NAME"
如果目标需要登录,帮助用户创建 YAML 配置文件:
# $SHANNON_HOME/configs/target-config.yaml
authentication:
type: form # "form" 或 "sso"
login_url: "http://localhost:3000/login"
credentials:
username: "admin"
password: "password123"
flow: "Navigate to login page, enter username and password, click Sign In"
success_condition:
url_contains: "/dashboard"
rules:
avoid:
- "/logout"
- "/admin/delete"
focus:
- "/api/"
- "/auth/"
pipeline:
max_concurrent_pipelines: 5 # 1-5,默认 5
仅当目标需要身份验证或有特定范围规则时才创建配置文件。 对于开放/无需身份验证的目标,则不需要配置。
检查 AI 提供商凭据是否可用:
cd "$SHANNON_HOME"
# 检查 Anthropic API 密钥(主要)
if [ -n "${ANTHROPIC_API_KEY:-}" ]; then
echo "✅ ANTHROPIC_API_KEY 已设置"
elif [ -n "${CLAUDE_CODE_OAUTH_TOKEN:-}" ]; then
echo "✅ CLAUDE_CODE_OAUTH_TOKEN 已设置"
elif [ "${CLAUDE_CODE_USE_BEDROCK:-}" = "1" ]; then
echo "✅ AWS Bedrock 模式已启用"
elif [ "${CLAUDE_CODE_USE_VERTEX:-}" = "1" ]; then
echo "✅ Google Vertex AI 模式已启用"
else
echo "❌ 未找到 AI 凭据。"
echo "请设置以下之一:ANTHROPIC_API_KEY、CLAUDE_CODE_OAUTH_TOKEN,或启用 Bedrock/Vertex"
exit 1
fi
如果未找到凭据,请解释选项:
export ANTHROPIC_API_KEY=sk-ant-...export CLAUDE_CODE_OAUTH_TOKEN=...export CLAUDE_CODE_USE_BEDROCK=1 + AWS 凭据export CLAUDE_CODE_USE_VERTEX=1 + ./credentials/ 中的服务账户同时建议:export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
关键:在启动前与用户确认。 显示完整命令并等待批准。
cd "$SHANNON_HOME"
# 构建命令
CMD="./shannon start URL={TARGET_URL} REPO={REPO_NAME}"
# 添加可选标志
# CONFIG=configs/target-config.yaml (如果存在身份验证配置)
# WORKSPACE={WORKSPACE} (如果用户指定)
# OUTPUT=./audit-logs/ (默认)
echo "准备启动:"
echo " $CMD"
echo ""
echo "这将启动 Docker 容器并开始渗透测试。"
echo "运行时间:约 1-1.5 小时 │ 成本:约 \$50 (Claude Sonnet)"
用户确认后,在后台运行:
cd "$SHANNON_HOME" && ./shannon start URL={TARGET_URL} REPO={REPO_NAME} {EXTRA_FLAGS}
使用 run_in_background: true 并设置 600000 毫秒的超时(初始设置 10 分钟)。渗透测试本身在 Docker 中运行,并将独立继续。
在渗透测试运行时,用户可以检查状态:
cd "$SHANNON_HOME"
# 列出活动的工作空间
./shannon workspaces
# 查看特定工作流的日志
./shannon logs ID={workflow-id}
解释 5 阶段流水线:
Shannon 流水线(5 个阶段,尽可能并行):
├─ 阶段 1:预侦察 — 源代码分析 + 外部扫描(Nmap, Subfinder, WhatWeb)
├─ 阶段 2:侦察 — 通过浏览器自动化进行实时攻击面映射
├─ 阶段 3:漏洞分析 — 5 个并行代理(注入、XSS、SSRF、身份验证、授权)
├─ 阶段 4:漏洞利用 — 专用代理执行真实攻击以验证发现
└─ 阶段 5:报告 — 包含可复现 PoC 的执行摘要
报告保存在 $SHANNON_HOME/audit-logs/{hostname}_{sessionId}/。
cd "$SHANNON_HOME"
# 查找最新报告
LATEST=$(ls -td audit-logs/*/ 2>/dev/null | head -1)
if [ -n "$LATEST" ]; then
echo "最新报告:$LATEST"
# 查找主报告文件
find "$LATEST" -name "*.md" -type f | head -5
fi
读取报告并呈现摘要:
🔐 Shannon 渗透测试报告:{TARGET}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 严重:{N} 个漏洞
🟠 高危:{N} 个漏洞
🟡 中危:{N} 个漏洞
🔵 低危:{N} 个漏洞
主要发现:
1. [严重] {漏洞类型} — {位置} — PoC:{简要描述}
2. [高危] {漏洞类型} — {位置} — PoC:{简要描述}
3. ...
每个发现都包含一个可复现的概念验证漏洞利用。
重要:Shannon 的“无漏洞利用,无报告”策略意味着每个发现都有一个可工作的 PoC。 但提醒用户,LLM 生成的内容需要人工审核。
cd "$SHANNON_HOME" && ./shannon workspaces
cd "$SHANNON_HOME" && ./shannon logs ID={workflow-id}
cd "$SHANNON_HOME" && ./shannon stop
# 破坏性操作 — 请先与用户确认
cd "$SHANNON_HOME" && ./shannon stop CLEAN=true
cd "$SHANNON_HOME" && ./shannon start URL={URL} REPO={REPO} WORKSPACE={name}
如果用户的应用运行在 localhost 上,请解释:
Shannon 在 Docker 内部运行。要访问您的本地应用:
├─ 使用 http://host.docker.internal:{PORT} 代替 http://localhost:{PORT}
├─ macOS/Windows:使用 Docker Desktop 可自动工作
└─ Linux:在 docker run 命令中添加 --add-host=host.docker.internal:host-gateway
在命令中自动将 localhost URL 转换为 host.docker.internal。
| 变量 | 是否必需 | 描述 |
|---|---|---|
ANTHROPIC_API_KEY | 其中之一 | 直接的 Anthropic API 密钥 |
CLAUDE_CODE_OAUTH_TOKEN | 必需 | Anthropic OAuth 令牌 |
CLAUDE_CODE_USE_BEDROCK | 设置为 1 以使用 AWS Bedrock | |
CLAUDE_CODE_USE_VERTEX | 设置为 1 以使用 Google Vertex AI | |
CLAUDE_CODE_MAX_OUTPUT_TOKENS | 推荐 | 设置为 64000 |
SHANNON_HOME | 可选 | Shannon 安装目录(默认:~/shannon) |
| 部分 | 字段 | 描述 |
|---|---|---|
authentication.type | form / sso | 登录方法 |
authentication.login_url | URL | 登录页面 |
authentication.credentials | object | username, password, totp_secret |
authentication.flow | string | 自然语言登录说明 |
authentication.success_condition | object | url_contains 或 element_present |
rules.avoid | list | 要跳过的路径/子域名 |
rules.focus | list | 要优先处理的路径/子域名 |
pipeline.retry_preset | subscription | 针对受速率限制计划的扩展退避 |
pipeline.max_concurrent_pipelines | 1-5 | 并行代理数量(默认:5) |
Shannon 测试 5 个 OWASP 类别下的 50 多个特定案例:
| 类别 | 示例 |
|---|---|
| 注入 | SQL 注入、命令注入、SSTI、NoSQL 注入 |
| XSS | 反射型、存储型、DOM 型、通过文件上传 |
| SSRF | 内部服务访问、云元数据、协议走私 |
| 身份验证失效 | 默认凭据、JWT 缺陷、会话固定、MFA 绕过、CSRF |
| 授权失效 | IDOR、权限提升、路径遍历、强制浏览 |
在本次对话的其余部分,请记住:
当用户提出后续问题时:
此技能的功能:
~/shannon(或 $SHANNON_HOME)~/shannon/repos/./shannon CLI 启动 Docker 容器(Temporal 服务器、工作器、可选路由器)~/shannon/audit-logs/ 读取渗透测试报告~/shannon/configs/ 中创建 YAML 配置文件Shannon 的功能(在 Docker 内部):
audit-logs/ 目录此技能不执行的操作:
首次使用前请查看 Shannon 源代码: https://github.com/KeygraphHQ/shannon
每周安装次数
511
代码库
GitHub 星标数
8
首次出现
2026年3月9日
安全审计
安装于
codex492
cursor492
opencode491
github-copilot490
gemini-cli490
kimi-cli490
Permissions overview: This skill orchestrates Shannon, a Docker-based pentesting tool that actively executes attacks against a target application. It clones/updates the Shannon repo locally, runs Docker containers, and reads pentest reports. Shannon performs real exploits — only run against apps you own or have explicit written authorization to test. Never run against production systems.
Shannon analyzes your source code, identifies attack vectors, and executes real exploits to prove vulnerabilities before they reach production. 96.15% exploit success rate on the XBOW security benchmark. Covers OWASP Top 10: Injection, XSS, SSRF, Broken Auth, Broken AuthZ, and more.
Before doing ANYTHING, you MUST confirm:
⚠️ Shannon executes REAL ATTACKS with mutative effects.
├─ Only run on systems you OWN or have WRITTEN AUTHORIZATION to test
├─ Never target production environments
├─ Results require human review — LLM output may contain hallucinations
└─ You are responsible for complying with all applicable laws
Display this warning BEFORE every pentest run. If the user has already confirmed authorization in this session, a brief reminder suffices.
Extract from the user's input:
http://localhost:3000, http://staging.example.com)./repos/ inside Shannon)Common invocation patterns:
/shannon http://localhost:3000 myapp → Full pentest of local app/shannon --workspace=audit1 http://staging.example.com backend-api → Named workspace for resuming/shannon --scope=xss,injection http://localhost:8080 frontend → Targeted categories/shannon status → Check running pentests/shannon results → Show latest report/shannon stop → Stop running pentestDisplay parsed intent:
🔐 Shannon Pentest
├─ Target: {TARGET_URL}
├─ Source: repos/{REPO_NAME}
├─ Scope: {SCOPE or "Full (all 5 OWASP categories)"}
├─ Workspace: {WORKSPACE or "auto-generated"}
└─ Config: {CONFIG or "default"}
Estimated runtime: 1–1.5 hours │ Estimated cost: ~$50 (Claude Sonnet)
Check if Shannon is cloned locally:
SHANNON_HOME="${SHANNON_HOME:-$HOME/shannon}"
if [ -d "$SHANNON_HOME" ] && [ -f "$SHANNON_HOME/shannon" ]; then
echo "Shannon found at $SHANNON_HOME"
cd "$SHANNON_HOME" && git pull --ff-only 2>/dev/null || true
else
echo "Shannon not found. Cloning..."
git clone https://github.com/KeygraphHQ/shannon.git "$SHANNON_HOME"
fi
# Verify Docker is available
if command -v docker &>/dev/null; then
echo "Docker: $(docker --version)"
else
echo "ERROR: Docker is required. Install Docker Desktop: https://docker.com/products/docker-desktop"
exit 1
fi
If Shannon is not installed, clone it and inform the user. If Docker is missing, stop and tell them to install it.
SHANNON_HOME defaults to ~/shannon. Users can override with SHANNON_HOME env var.
Shannon needs the target's source code in $SHANNON_HOME/repos/{REPO_NAME}/.
Ask the user where their source code is:
# If user provides a local path
REPO_PATH="/path/to/their/source"
REPO_NAME="myapp"
# Create symlink or copy into Shannon's repos directory
mkdir -p "$SHANNON_HOME/repos"
if [ ! -d "$SHANNON_HOME/repos/$REPO_NAME" ]; then
ln -s "$(realpath "$REPO_PATH")" "$SHANNON_HOME/repos/$REPO_NAME"
echo "Linked $REPO_PATH → repos/$REPO_NAME"
fi
If the user provides a GitHub URL instead:
cd "$SHANNON_HOME/repos"
git clone "$GITHUB_URL" "$REPO_NAME"
If the target requires login, help the user create a YAML config:
# $SHANNON_HOME/configs/target-config.yaml
authentication:
type: form # "form" or "sso"
login_url: "http://localhost:3000/login"
credentials:
username: "admin"
password: "password123"
flow: "Navigate to login page, enter username and password, click Sign In"
success_condition:
url_contains: "/dashboard"
rules:
avoid:
- "/logout"
- "/admin/delete"
focus:
- "/api/"
- "/auth/"
pipeline:
max_concurrent_pipelines: 5 # 1-5, default 5
Only create a config if the target requires authentication or has specific scope rules. For open/unauthenticated targets, no config is needed.
Check that AI provider credentials are available:
cd "$SHANNON_HOME"
# Check for Anthropic API key (primary)
if [ -n "${ANTHROPIC_API_KEY:-}" ]; then
echo "✅ ANTHROPIC_API_KEY is set"
elif [ -n "${CLAUDE_CODE_OAUTH_TOKEN:-}" ]; then
echo "✅ CLAUDE_CODE_OAUTH_TOKEN is set"
elif [ "${CLAUDE_CODE_USE_BEDROCK:-}" = "1" ]; then
echo "✅ AWS Bedrock mode enabled"
elif [ "${CLAUDE_CODE_USE_VERTEX:-}" = "1" ]; then
echo "✅ Google Vertex AI mode enabled"
else
echo "❌ No AI credentials found."
echo "Set one of: ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, or enable Bedrock/Vertex"
exit 1
fi
If no credentials are found, explain the options:
export ANTHROPIC_API_KEY=sk-ant-...export CLAUDE_CODE_OAUTH_TOKEN=...export CLAUDE_CODE_USE_BEDROCK=1 + AWS credentialsexport CLAUDE_CODE_USE_VERTEX=1 + service account in ./credentials/Also recommend: export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
CRITICAL: Confirm with the user before launching. Display the full command and wait for approval.
cd "$SHANNON_HOME"
# Build the command
CMD="./shannon start URL={TARGET_URL} REPO={REPO_NAME}"
# Add optional flags
# CONFIG=configs/target-config.yaml (if auth config exists)
# WORKSPACE={WORKSPACE} (if user specified)
# OUTPUT=./audit-logs/ (default)
echo "Ready to launch:"
echo " $CMD"
echo ""
echo "This will start Docker containers and begin the pentest."
echo "Runtime: ~1-1.5 hours │ Cost: ~\$50 (Claude Sonnet)"
After user confirms, run in background:
cd "$SHANNON_HOME" && ./shannon start URL={TARGET_URL} REPO={REPO_NAME} {EXTRA_FLAGS}
Use run_in_background: true with a timeout of 600000ms (10 minutes for initial setup). The pentest itself runs in Docker and will continue independently.
While the pentest runs, the user can check status:
cd "$SHANNON_HOME"
# List active workspaces
./shannon workspaces
# View logs for a specific workflow
./shannon logs ID={workflow-id}
Explain the 5-phase pipeline:
Shannon Pipeline (5 phases, parallel where possible):
├─ Phase 1: Pre-Recon — Source code analysis + external scans (Nmap, Subfinder, WhatWeb)
├─ Phase 2: Recon — Live attack surface mapping via browser automation
├─ Phase 3: Vulnerability Analysis — 5 parallel agents (Injection, XSS, SSRF, Auth, AuthZ)
├─ Phase 4: Exploitation — Dedicated agents execute real attacks to validate findings
└─ Phase 5: Reporting — Executive summary with reproducible PoCs
Reports are saved to $SHANNON_HOME/audit-logs/{hostname}_{sessionId}/.
cd "$SHANNON_HOME"
# Find the latest report
LATEST=$(ls -td audit-logs/*/ 2>/dev/null | head -1)
if [ -n "$LATEST" ]; then
echo "Latest report: $LATEST"
# Find the main report file
find "$LATEST" -name "*.md" -type f | head -5
fi
Read the report and present a summary:
🔐 Shannon Pentest Report: {TARGET}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 Critical: {N} vulnerabilities
🟠 High: {N} vulnerabilities
🟡 Medium: {N} vulnerabilities
🔵 Low: {N} vulnerabilities
Top Findings:
1. [CRITICAL] {Vuln type} — {location} — PoC: {brief description}
2. [HIGH] {Vuln type} — {location} — PoC: {brief description}
3. ...
Each finding includes a reproducible proof-of-concept exploit.
IMPORTANT: Shannon's "no exploit, no report" policy means every finding has a working PoC. But remind the user that LLM-generated content requires human review.
cd "$SHANNON_HOME" && ./shannon workspaces
cd "$SHANNON_HOME" && ./shannon logs ID={workflow-id}
cd "$SHANNON_HOME" && ./shannon stop
# DESTRUCTIVE — confirm with user first
cd "$SHANNON_HOME" && ./shannon stop CLEAN=true
cd "$SHANNON_HOME" && ./shannon start URL={URL} REPO={REPO} WORKSPACE={name}
If the user's app runs on localhost, explain:
Shannon runs inside Docker. To reach your local app:
├─ Use http://host.docker.internal:{PORT} instead of http://localhost:{PORT}
├─ macOS/Windows: works automatically with Docker Desktop
└─ Linux: add --add-host=host.docker.internal:host-gateway to docker run
Automatically translate localhost URLs to host.docker.internal in the command.
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | One of these | Direct Anthropic API key |
CLAUDE_CODE_OAUTH_TOKEN | required | Anthropic OAuth token |
CLAUDE_CODE_USE_BEDROCK | Set to 1 for AWS Bedrock | |
CLAUDE_CODE_USE_VERTEX | Set to 1 for Google Vertex AI |
| Section | Field | Description |
|---|---|---|
authentication.type | form / sso | Login method |
authentication.login_url | URL | Login page |
authentication.credentials | object | username, password, totp_secret |
authentication.flow | string |
Shannon tests 50+ specific cases across 5 OWASP categories:
| Category | Examples |
|---|---|
| Injection | SQL injection, command injection, SSTI, NoSQL injection |
| XSS | Reflected, stored, DOM-based, via file upload |
| SSRF | Internal service access, cloud metadata, protocol smuggling |
| Broken Auth | Default creds, JWT flaws, session fixation, MFA bypass, CSRF |
| Broken AuthZ | IDOR, privilege escalation, path traversal, forced browsing |
For the rest of this conversation, remember:
When the user asks follow-up questions:
What this skill does:
~/shannon (or $SHANNON_HOME)~/shannon/repos/./shannon CLI~/shannon/audit-logs/~/shannon/configs/What Shannon does (inside Docker):
audit-logs/ directoryWhat this skill does NOT do:
Review the Shannon source code before first use: https://github.com/KeygraphHQ/shannon
Weekly Installs
511
Repository
GitHub Stars
8
First Seen
Mar 9, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
codex492
cursor492
opencode491
github-copilot490
gemini-cli490
kimi-cli490
Better Auth 身份验证技能指南:为 TypeScript/JavaScript 应用添加认证
11,500 周安装
Neon Serverless Postgres 无服务器数据库 | 自动扩缩容、分支、即时恢复
14,800 周安装
GitHub CLI (gh) 完整使用指南 - 命令行操作GitHub的权威教程
14,600 周安装
Dogfood - Vercel Labs 自动化 Web 应用探索与问题报告工具
15,100 周安装
Pexo AI 视频创作智能体:自动生成短视频脚本、镜头、音乐全流程
15,500 周安装
baoyu-post-to-wechat:一键发布Markdown到微信公众号,支持API和浏览器自动化
15,600 周安装
B2B销售赋能指南:创建高效销售资料、演示文稿与异议处理文档
15,800 周安装
CLAUDE_CODE_MAX_OUTPUT_TOKENS | Recommended | Set to 64000 |
SHANNON_HOME | Optional | Shannon install dir (default: ~/shannon) |
| Natural language login instructions |
authentication.success_condition | object | url_contains or element_present |
rules.avoid | list | Paths/subdomains to skip |
rules.focus | list | Paths/subdomains to prioritize |
pipeline.retry_preset | subscription | Extended backoff for rate-limited plans |
pipeline.max_concurrent_pipelines | 1-5 | Parallel agent count (default: 5) |