security-scan by affaan-m/everything-claude-code
npx skills add https://github.com/affaan-m/everything-claude-code --skill security-scan使用 AgentShield 审计您的 Claude Code 配置以发现安全问题。
.claude/settings.json、CLAUDE.md 或 MCP 配置后| 文件 | 检查项 |
|---|---|
CLAUDE.md | 硬编码的密钥、自动运行指令、提示词注入模式 |
settings.json | 过于宽松的允许列表、缺失的拒绝列表、危险的绕过标志 |
mcp.json |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 有风险的 MCP 服务器、硬编码的环境变量密钥、npx 供应链风险 |
hooks/ | 通过插值导致的命令注入、数据泄露、静默错误抑制 |
agents/*.md | 不受限制的工具访问、提示词注入攻击面、缺失的模型规格 |
必须安装 AgentShield。检查并安装(如果需要):
# 检查是否已安装
npx ecc-agentshield --version
# 全局安装(推荐)
npm install -g ecc-agentshield
# 或通过 npx 直接运行(无需安装)
npx ecc-agentshield scan .
针对当前项目的 .claude/ 目录运行:
# 扫描当前项目
npx ecc-agentshield scan
# 扫描特定路径
npx ecc-agentshield scan --path /path/to/.claude
# 使用最低严重性过滤器扫描
npx ecc-agentshield scan --min-severity medium
# 终端输出(默认)- 带评级的彩色报告
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
自动应用安全修复(仅修复标记为可自动修复的问题):
npx ecc-agentshield scan --fix
这将:
运行对抗性三智能体流程进行更深入的分析:
# 需要 ANTHROPIC_API_KEY
export ANTHROPIC_API_KEY=your-key
npx ecc-agentshield scan --opus --stream
这将运行:
从头开始搭建一个新的安全 .claude/ 配置:
npx ecc-agentshield init
创建:
settings.jsonCLAUDE.mdmcp.json 占位符添加到您的 CI 流水线中:
- uses: affaan-m/agentshield@v1
with:
path: '.'
min-severity: 'medium'
fail-on-findings: true
| 等级 | 分数 | 含义 |
|---|---|---|
| A | 90-100 | 安全配置 |
| B | 75-89 | 轻微问题 |
| C | 60-74 | 需要注意 |
| D | 40-59 | 显著风险 |
| F | 0-39 | 严重漏洞 |
Bash(*)(无限制的 shell 访问)${file} 插值导致的命令注入2>/dev/null、|| true)npx -y 自动安装每周安装量
741
代码库
GitHub 星标
72.1K
首次出现
2026年2月11日
安全审计
安装于
codex657
opencode646
gemini-cli634
github-copilot619
kimi-cli595
amp592
Audit your Claude Code configuration for security issues using AgentShield.
.claude/settings.json, CLAUDE.md, or MCP configs| File | Checks |
|---|---|
CLAUDE.md | Hardcoded secrets, auto-run instructions, prompt injection patterns |
settings.json | Overly permissive allow lists, missing deny lists, dangerous bypass flags |
mcp.json | Risky MCP servers, hardcoded env secrets, npx supply chain risks |
hooks/ | Command injection via interpolation, data exfiltration, silent error suppression |
agents/*.md | Unrestricted tool access, prompt injection surface, missing model specs |
AgentShield must be installed. Check and install if needed:
# Check if installed
npx ecc-agentshield --version
# Install globally (recommended)
npm install -g ecc-agentshield
# Or run directly via npx (no install needed)
npx ecc-agentshield scan .
Run against the current project's .claude/ directory:
# Scan current project
npx ecc-agentshield scan
# Scan a specific path
npx ecc-agentshield scan --path /path/to/.claude
# Scan with minimum severity filter
npx ecc-agentshield scan --min-severity medium
# Terminal output (default) — colored report with grade
npx ecc-agentshield scan
# JSON — for CI/CD integration
npx ecc-agentshield scan --format json
# Markdown — for documentation
npx ecc-agentshield scan --format markdown
# HTML — self-contained dark-theme report
npx ecc-agentshield scan --format html > security-report.html
Apply safe fixes automatically (only fixes marked as auto-fixable):
npx ecc-agentshield scan --fix
This will:
Run the adversarial three-agent pipeline for deeper analysis:
# Requires ANTHROPIC_API_KEY
export ANTHROPIC_API_KEY=your-key
npx ecc-agentshield scan --opus --stream
This runs:
Scaffold a new secure .claude/ configuration from scratch:
npx ecc-agentshield init
Creates:
settings.json with scoped permissions and deny listCLAUDE.md with security best practicesmcp.json placeholderAdd to your CI pipeline:
- uses: affaan-m/agentshield@v1
with:
path: '.'
min-severity: 'medium'
fail-on-findings: true
| Grade | Score | Meaning |
|---|---|---|
| A | 90-100 | Secure configuration |
| B | 75-89 | Minor issues |
| C | 60-74 | Needs attention |
| D | 40-59 | Significant risks |
| F | 0-39 | Critical vulnerabilities |
Bash(*) in the allow list (unrestricted shell access)${file} interpolation2>/dev/null, || true)npx -y auto-install in MCP server configsWeekly Installs
741
Repository
GitHub Stars
72.1K
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
codex657
opencode646
gemini-cli634
github-copilot619
kimi-cli595
amp592
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装