简介
AgentShield 是一个面向 Claude Code 的安全审计器:扫描你的 agent 配置目录,识别密钥泄露、权限配置不当、hook 注入与高风险 MCP 模式。
最适合: 在团队共享 .claude/ 配置前做加固与审计
适配: macOS/Linux/Windows;可用 npx 或 npm 运行;针对 Claude Code 配置结构做审计(README)
配置时间: 5–15 分钟
关键事实(已验证)
- README 的 Quick Start 直接用
npx ecc-agentshield scan扫描。 - README 列出 Secrets/Hook/MCP 等规则分类,并标注了每类的规则数量。
- GitHub:626 stars · 134 forks;最近更新 2026-05-13(GitHub API 验证)。
正文
一个实用的团队落地方式:
- 对团队共享的
.claude/模板仓库跑 AgentShield,并提交一份 baseline 的 JSON 报告。 - CI 初期先只对 medium/high 失败;等你理解误报模式后再逐步收紧阈值。
- 把 MCP server 配置当生产依赖:固定版本、写清 env、review 每次 diff。
README 原文节选(verbatim)
AgentShield
Security auditor for AI agent configurations
Scans Claude Code setups for hardcoded secrets, permission misconfigs,
hook injection, MCP server risks, and agent prompt injection vectors.
Available as CLI, GitHub Action, and GitHub App integration.
Quick Start · What It Catches · API Reference · Opus Pipeline · GitHub Action · Distribution · MiniClaw · Changelog
Why
The AI agent ecosystem is growing faster than its security tooling. In January 2026 alone:
- 12% of a major agent skill marketplace was malicious (341 of 2,857 community skills)
- A CVSS 8.8 CVE exposed 17,500+ internet-facing instances to one-click RCE
- The Moltbook breach compromised 1.5M API tokens across 770,000 agents
Developers install community skills, connect MCP servers, and configure hooks without any automated way to audit the security of their setup. AgentShield scans your .claude/ directory and flags vulnerabilities before they become exploits.
Built at the Claude Code Hackathon (Cerebral Valley x Anthropic, Feb 2026). Part of the Everything Claude Code ecosystem (42K+ stars).