使用AgentShield 审计 Claude Code 配置的安全漏洞、错误配置和注入风险。扫描设置、MCP 服务器、钩子等。
Audit Claude Code configuration for security issues using AgentShield.
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 specsbash
# Install globally (recommended)
npm install -g ecc-agentshield
# Or run via npx (no install needed)
npx ecc-agentshield scan
bash
# 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
GradeScoreMeaningA90-100SecureB75-89Minor issuesC60-74Needs attentionD40-59Significant risksF0-39Critical
Bash(*) unrestricted shell access${file} interpolation