This repo demonstrates AgentGuard catching vulnerabilities in AI agent code.
safe_agent.py- Clean code, no findingsvulnerable_agent.py- Contains 5+ vulnerabilities
- ASI01 Prompt Injection - User input in f-string prompt
- ASI02 Tool Abuse - os.system + subprocess shell=True
- ASI03 Data Exfiltration - POST to external URL
- ASI07 Credential Leak - Hardcoded API key
- ASI06 Unsafe Eval - os.system eval
Every PR is automatically scanned by AgentGuard. The vulnerable file will cause the CI to fail.
pip install dfx-agentguard agentguard vulnerable_agent.py
AgentGuard is the core security scanner. Companion tools:
| Tool | Purpose | Install |
|---|---|---|
| agentguard | AI agent code security scanner | pip install dfx-agentguard |
| mcp-scanner | MCP server security audit | pip install dfx-mcp-scanner |
| agentguard-app | GitHub App for PR reviews | Install from Marketplace |
| agentguard-vscode | VS Code inline diagnostics | Install from VS Code |
| agentguard-benchmark | Detection benchmark suite | git clone |
| agentguard-demo | Live demo with Code Scanning | git clone |
19 detection rules | 102 tests | 50 benchmark samples | OWASP ASI Top 10 GitHub Action: dockfixlabs/agentguard@v1