AgentShield
Static analysis security scanner for Claude Code configurations. Scans CLAUDE.md, hooks, MCP configs, agent definitions, skills, and settings.json for vulnerabilities, misconfigurations, and injection risks. Built at Cerebral Valley x Anthropic Hackathon (Feb 2026) as part of Everything Claude Code (ECC).- GitHub:
affaan-m/agentshield - npm:
ecc-agentshield - 1282 tests, 102 rules, 98% coverage (all claimed from README, unverified independently)
What It Scans
Five scan categories:- Secrets detection — 14 patterns (API keys, tokens, credentials embedded in config files)
- Permission auditing — overly broad tool permissions, missing deny rules
- Hook injection analysis — user-controlled data flowing into hook commands without sanitization
- MCP server risk profiling — untrusted MCP servers, overprivileged tool access
- Agent config review — agent definitions that lack isolation or have overly broad tool access
CLAUDE.md, settings.json, .claude/, MCP configs, hook definitions, agents/*.md, skills/.
The 3-Agent Opus Pipeline (--opus flag)
Deep analysis mode runs three Claude Opus 4.6 agents in a red-team pipeline:
Usage
affaan-m/agentshield.
Scope vs. Existing Security Concepts
AgentShield is config-layer security, not code-layer security. The distinction matters:
These are complementary, not overlapping. A codebase can pass code review and still have hooks that pass user-controlled strings to shell commands without sanitization.
Related Wiki Pages
- Everything Claude Code (ECC) — parent project
- OWASP Security Checklist — code-layer security (complementary)
- Agentic Sandbox Controls — OS-level isolation (complementary)
- Indirect Prompt Injection — prompt-layer attack vectors (complementary)
- Multi-Vendor Adversarial Review — pattern AgentShield’s
--opusflag instantiates