Lightweight open-source AI Agent security scanner — Static Analysis + Runtime Interception
Free, offline, zero-config AI Agent security scanner. Quickly check your skills, MCP servers, and plugins for security issues.
npx @elliotllliu/agent-shield scan ./my-skill/Monitor MCP tool calls in real-time — not just static code scanning.
agent-shield proxy node my-mcp-server.js
agent-shield proxy --enforce python mcp_server.pyDetects: tool description injection, result injection, credential leaks, sensitive path access, behavioral anomalies.
Tracks complete attack paths across multiple files.
No account · no code upload · no API key required · npx one-liner.
- SDK Awareness: Auto-detects 25+ SDKs — network calls via known SDKs get lower risk scores
- Auth Flow Recognition: Identifies OAuth2, JWT, session management — legitimate auth isn't flagged as exfiltration
- Data Flow Tracking: Traces variables from source to sink — only flags actual exfiltration paths
- Confidence Scoring:
high/medium/lowconfidence multipliers reduce false positive impact
npx @elliotllliu/agent-shield scan ./skill/ # Scan
npx @elliotllliu/agent-shield proxy node server.js # Runtime proxy
npx @elliotllliu/agent-shield install-check # Check installed agentsAgent Shield is a lightweight open-source tool for quick security self-checks during development. It is not a replacement for enterprise security platforms.
| Agent Shield | Snyk Agent Scan | Tencent AI-Infra-Guard | |
|---|---|---|---|
| Positioning | Lightweight OSS tool | Commercial service | Enterprise red team |
| Runtime interception | ✅ MCP Proxy | ❌ | ❌ |
| Cross-file attack chain | ✅ | ❌ | Partial |
| Static rules | 31 | 6 | Many (incl. infra) |
| Offline/free | ✅ | ❌ Account required | ✅ Open source |
| Zero config | ✅ npx one-liner |
❌ Python+uv needed | ❌ Docker needed |
| Security team | ❌ Individual project | ✅ Snyk security team | ✅ Tencent labs |
| Vulnerability DB | ❌ | ✅ | ✅ |
| Enterprise support | ❌ | ✅ | ✅ Pro version |
| Production validated | ❌ Early stage | ✅ | ✅ Black Hat |
| VS Code / Action | ✅ | ❌ | ❌ |
Good for: Dev-stage quick checks · CI/CD lightweight gate · Runtime MCP monitoring Not for: Enterprise compliance as sole tool
🔴 High: data-exfil · backdoor · reverse-shell · crypto-mining · credential-hardcode · obfuscation
🟡 Medium: prompt-injection (55+ patterns) · tool-shadowing · env-leak · network-ssrf · phone-home · toxic-flow · skill-risks · python-security (35 patterns) · go-rust-security (22 patterns)
🟢 Low: privilege · supply-chain · sensitive-read · excessive-perms · mcp-manifest · typosquatting · hidden-files
Advanced: cross-file · attack-chain · multilang-injection · python-ast · description-integrity · mcp-runtime
Benchmark: 120 self-built samples, 100% F1.
Dify Plugins: Scanned 493 plugins, found 6 true high-risk (eval()/exec()), 0 false positives at high severity.
agent-shield scan ./skill/ [--json|--sarif|--html] [--fail-under 70] [--ai]
agent-shield proxy [--enforce] [--rate-limit N] <command>
agent-shield mcp-audit <command>
agent-shield discoverGitHub Action · VS Code Extension
| Partner | Contribution |
|---|---|
| Agent Skills Hub | Real-world testing across skill registries, security insights, and feature feedback |
MIT