security-scan
Skill2k starsChanged 9 months agoMITView on GitHub
使用 AgentShield 扫描您的 Claude Code 配置(.claude/ 目录)是否存在安全漏洞、配置错误和注入风险。检查项包括 CLAUDE.md、settings.json、MCP 服务器、钩子(Hooks)以及智能体(Agent)定义。
- Reads credentials
- Installs packages
49 other projects use a version of this, 12 of them edited.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- morodomi/dev-crewtheir own version, first seen Oct 5, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- openai/codex-securitytheir own version, first seen Oct 2, 2026
- 5throck/ai-workspace-standardstheir own version, first seen Sep 26, 2026
- elfrost/ai-patchlabtheir own version, first seen Sep 22, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
Who's talking about xu-xiang/everything-claude-code-zh
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Used with
Projects with it also use security-bounty-hunter and continuous-agent-loop.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JamkrisSkillsecurity-bounty-hunter
Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.
Also in 3 projects that use this
InfopibeSkillcontinuous-agent-loop
Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.
Also in 3 projects that use this
Other versions49 projects use a version of this.
Word for word · 0
None found.
Edited · 12
- loulanyue/awesome-claude-notes★ 27211% same
- tpavanipradeep/everything-claude-code★ 13411% same
- templetongroup/radiant★ 11311% same
- Jamkris/everything-gemini-code★ 8711% same
- woxiangyangzhimao/skills★ 1411% same
- Infopibe/everything-claude-code★ 811% same
- jdanigo/hydraia★ 811% same
- ashutoshrathi0909-oss/everything-claude-code★ 111% same
- romaintoso78/claude-skills★ 111% same
- royaluniondesign-sys/claude-os★ 111% same
2 more not listed
Wrote their own version · 37
- openai/codex-security★ 11ksame name
- openai/plugins★ 7.3ksame name
- codewithmukesh/dotnet-claude-kit★ 750same name
- aws-samples/sample-agent-skills-for-builders★ 51same name
- drvoss/everything-copilot-cli★ 47same name
- simoncorry/foundry★ 39same name
- jiten-singh-shahi/salesforce-claude-code★ 17same name
- ProxiBlue/claude-skills★ 17same name
- 5throck/ai-workspace-standards★ 16same name
- Ray0907/security-scan★ 16same name
27 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository114 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- .cursor/rules/common-agents.mdCursor rule
- .cursor/rules/common-coding-style.mdCursor rule
- .cursor/rules/common-development-workflow.mdCursor rule
- .cursor/rules/common-git-workflow.mdCursor rule
- .cursor/rules/common-hooks.mdCursor rule
- .cursor/rules/common-patterns.mdCursor rule
- .cursor/rules/common-performance.mdCursor rule
- .cursor/rules/common-security.mdCursor rule
- .cursor/rules/common-testing.mdCursor rule
- .cursor/rules/golang-coding-style.mdCursor rule
- .cursor/rules/golang-hooks.mdCursor rule
- .cursor/rules/golang-patterns.mdCursor rule
- .cursor/rules/golang-security.mdCursor rule
- .cursor/rules/golang-testing.mdCursor rule
- .cursor/rules/python-coding-style.mdCursor rule
- .cursor/rules/python-hooks.mdCursor rule
- .cursor/rules/python-patterns.mdCursor rule
- .cursor/rules/python-security.mdCursor rule
- .cursor/rules/python-testing.mdCursor rule
- .cursor/rules/swift-coding-style.mdCursor rule
- .cursor/rules/swift-hooks.mdCursor rule
- .cursor/rules/swift-patterns.mdCursor rule
- .cursor/rules/swift-security.mdCursor rule
- .cursor/rules/swift-testing.mdCursor rule
- .cursor/rules/typescript-coding-style.mdCursor rule
- .cursor/rules/typescript-hooks.mdCursor rule
- .cursor/rules/typescript-patterns.mdCursor rule
- .cursor/rules/typescript-security.mdCursor rule
- .cursor/rules/typescript-testing.mdCursor rule
- api-designSkill
- article-writingSkill
- backend-patternsSkill
- coding-standardsSkill
- content-engineSkill
- e2e-testingSkill
- eval-harnessSkill
- frontend-patternsSkill
- frontend-slidesSkill
- investor-materialsSkill
- investor-outreachSkill
- market-researchSkill
- security-reviewSkill
- strategic-compactSkill
- tdd-workflowSkill
- verification-loopSkill
- oneskillSkill
- article-writingSkill
- content-engineSkill
- frontend-slidesSkill
- investor-materialsSkill
- investor-outreachSkill
- market-researchSkill
- api-designSkill
- article-writingSkill
- autonomous-loopsSkill
- The first 60 shown.
The file
Files
安全扫描技能 (Security Scan Skill)
使用 AgentShield 审计您的 Claude Code 配置安全问题。
何时激活
- 设置新的 Claude Code 项目时
- 修改
.claude/settings.json、CLAUDE.md或 MCP 配置后 - 提交配置更改前
- 加入具有现有 Claude Code 配置的新仓库时
- 定期的安全卫生检查
扫描对象
| 文件 | 检查项 |
CLAUDE.md | 硬编码密钥(Hardcoded secrets)、自动运行指令、提示词注入(Prompt injection)模式 |
settings.json | 过度宽松的允许列表(Allow lists)、缺失的拒绝列表(Deny lists)、危险的绕过标志 |
mcp.json | 风险 MCP 服务器、硬编码环境变量密钥、npx 供应链风险 |
hooks/ | 通过插值进行的命令注入、数据外泄、静默错误抑制 |
agents/*.md | 未受限的工具访问、提示词注入攻击面、缺失模型规范 |
前置条件
必须安装 AgentShield。如果需要,请检查并安装:
# 检查是否已安装
npx ecc-agentshield --version
# 全局安装(推荐)
npm install -g ecc-agentshield
# 或通过 npx 直接运行(无需安装)
npx ecc-agentshield scan .使用方法
基础扫描 (Basic Scan)
针对当前项目的 .claude/ 目录运行:
# 扫描当前项目
npx ecc-agentshield scan
# 扫描特定路径
npx ecc-agentshield scan --path /path/to/.claude
# 使用最低严重程度过滤进行扫描
npx ecc-agentshield scan --min-severity medium输出格式 (Output Formats)
# 终端输出(默认) — 带有评分的彩色报告
npx ecc-agentshield scan
# JSON — 用于 CI/CD 集成
npx ecc-agentshield scan --format json
# Markdown — 用于文档记录
npx ecc-agentshield scan --format markdown
# HTML — 独立包含的深色主题报告
npx ecc-agentshield scan --format html > security-report.html自动修复 (Auto-Fix)
自动应用安全修复(仅针对标记为可自动修复的项):
npx ecc-agentshield scan --fix此操作将:
- 将硬编码密钥替换为环境变量引用
- 将通配符权限收紧为具体范围的替代方案
- 绝不修改仅限手动建议的项
Opus 4.6 深度分析 (Opus 4.6 Deep Analysis)
运行对抗性三智能体(Three-agent)管道进行更深层次的分析:
# 需要 ANTHROPIC_API_KEY
export ANTHROPIC_API_KEY=your-key
npx ecc-agentshield scan --opus --stream此操作会运行:
- 攻击者(红队/Red Team) — 寻找攻击向量
- 防御者(蓝队/Blue Team) — 建议加固措施
- 审计员(最终裁决) — 综合两方观点
初始化安全配置 (Initialize Secure Config)
从头开始搭建一个新的安全 .claude/ 配置:
npx ecc-agentshield init创建内容:
- 带有具体权限范围和拒绝列表(Deny list)的
settings.json - 符合安全最佳实践的
CLAUDE.md mcp.json占位符
GitHub Action
添加到您的 CI 流水线:
- uses: affaan-m/agentshield@v1
with:
path: '.'
min-severity: 'medium'
fail-on-findings: true严重程度等级 (Severity Levels)
| 等级 | 评分 | 含义 |
| A | 90-100 | 安全配置 |
| B | 75-89 | 存在次要问题 |
| C | 60-74 | 需要注意 |
| D | 40-59 | 存在重大风险 |
| F | 0-39 | 存在关键漏洞 |
结果解读
关键发现(立即修复)
- 配置文件中存在硬编码的 API 密钥或令牌(Tokens)
- 允许列表(Allow list)中包含
Bash(*)(不受限的 Shell 访问) - 钩子(Hooks)中通过
${file}插值存在的命令注入 - 运行 Shell 的 MCP 服务器
高风险发现(生产环境部署前修复)
- CLAUDE.md 中的自动运行指令(提示词注入向量)
- 权限设置中缺失拒绝列表(Deny lists)
- 智能体(Agents)拥有不必要的 Bash 访问权限
中风险发现(建议修复)
- 钩子(Hooks)中的静默错误抑制(
2>/dev/null,|| true) - 缺失 PreToolUse 安全钩子(Hooks)
- MCP 服务器配置中的
npx -y自动安装
信息类发现(仅供参考)
- MCP 服务器缺失描述信息
- 预防性指令被正确标记为良好实践
相关链接
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.

