✨
Claude Code Security Scan
Claude Code Security Scan · v1.0.0
671 下载
0 安装
2.7k 收藏
4 浏览
简介
Claude Code Security Scan
原始描述
Audit Claude Code configuration for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Scans settings, MCP servers, hooks, a...
通过你的 Agent 添加
安装目录:claude-code-security-scan/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
Claude Code~/.claude/skills/claude-code-security-scan/
Codex CLI~/.codex/skills/claude-code-security-scan/
DeepSeek Harness~/.agents/skills/claude-code-security-scan/
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: claude-code-security-scan
description: "Audit Claude Code configuration for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Scans settings, MCP servers, hooks, agents, and hardcoded secrets. Trigger phrases: security audit, scan config, find vulnerabilities, check MCP, security check, hardcoded secrets. Adapted from everything-claude-code by @affaan-m (MIT)"
metadata: {"clawdbot":{"emoji":"🔒","requires":{"bins":["npm","node"],"env":[],"optional_env":["ANTHROPIC_API_KEY"]},"os":["linux","darwin","win32"]}}
Security Scan
Audit Claude Code configuration for security issues using AgentShield.
When to Activate
- Setting up a new Claude Code project
- After modifying settings.json, CLAUDE.md, or MCP configs
- Before committing configuration changes
- Onboarding to repo with existing configs
- Periodic security hygiene checks
What It Scans
CLAUDE.md — Hardcoded secrets, auto-run instructions, injection patterns
settings.json — Overly permissive allow lists, missing deny lists
mcp.json — Risky MCP servers, hardcoded env secrets
hooks/ — Command injection via interpolation, data exfiltration
agents/ — Unrestricted tool access, missing model specs
Setup & Usage
# Install globally (recommended)
npm install -g ecc-agentshield
# Or run via npx (no install needed)
npx ecc-agentshield scan
Commands
# Basic scan
npx ecc-agentshield scan
# Scan specific path
npx ecc-agentshield scan --path /path/to/.claude
# Filter by severity
npx ecc-agentshield scan --min-severity medium
# Output formats
npx ecc-agentshield scan --format json
npx ecc-agentshield scan --format markdown
npx ecc-agentshield scan --format html > report.html
# Auto-fix safe issues
npx ecc-agentshield scan --fix
# Deep analysis (requires ANTHROPIC_API_KEY)
npx ecc-agentshield scan --opus --stream
# Initialize secure config
npx ecc-agentshield init
Severity Grades
Grade
Score
Meaning
A
90-100
Secure
B
75-89
Minor issues
C
60-74
Needs attention
D
40-59
Significant risks
F
0-39
Critical
Critical Findings (Fix Immediately)
- Hardcoded API keys in config
Bash(*) unrestricted shell access
- Command injection via
${file} interpolation
- Shell-running MCP servers
High Findings (Fix Before Production)
- Auto-run instructions in CLAUDE.md
- Missing deny lists
- Unnecessary Bash access in agents
CLAUDE.md— Hardcoded secrets, auto-run instructions, injection patternssettings.json— Overly permissive allow lists, missing deny listsmcp.json— Risky MCP servers, hardcoded env secretshooks/— Command injection via interpolation, data exfiltrationagents/— Unrestricted tool access, missing model specs
Setup & Usage
# Install globally (recommended)
npm install -g ecc-agentshield
# Or run via npx (no install needed)
npx ecc-agentshield scan
Commands
# Install globally (recommended)
npm install -g ecc-agentshield
# Or run via npx (no install needed)
npx ecc-agentshield scan
# Basic scan
npx ecc-agentshield scan
# Scan specific path
npx ecc-agentshield scan --path /path/to/.claude
# Filter by severity
npx ecc-agentshield scan --min-severity medium
# Output formats
npx ecc-agentshield scan --format json
npx ecc-agentshield scan --format markdown
npx ecc-agentshield scan --format html > report.html
# Auto-fix safe issues
npx ecc-agentshield scan --fix
# Deep analysis (requires ANTHROPIC_API_KEY)
npx ecc-agentshield scan --opus --stream
# Initialize secure config
npx ecc-agentshield init
Severity Grades
Grade
Score
Meaning
A
90-100
Secure
B
75-89
Minor issues
C
60-74
Needs attention
D
40-59
Significant risks
F
0-39
Critical
Critical Findings (Fix Immediately)
- Hardcoded API keys in config
Bash(*) unrestricted shell access
- Command injection via
${file} interpolation
- Shell-running MCP servers
High Findings (Fix Before Production)
- Auto-run instructions in CLAUDE.md
- Missing deny lists
- Unnecessary Bash access in agents
| Grade | Score | Meaning |
|---|---|---|
| A | 90-100 | Secure |
| B | 75-89 | Minor issues |
| C | 60-74 | Needs attention |
| D | 40-59 | Significant risks |
| F | 0-39 | Critical |
- Hardcoded API keys in config
Bash(*)unrestricted shell access- Command injection via
${file}interpolation - Shell-running MCP servers
High Findings (Fix Before Production)
- Auto-run instructions in CLAUDE.md
- Missing deny lists
- Unnecessary Bash access in agents
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。