Most security scanners just find problems. Shield Agents finds AND fixes them using a team of specialized AI agents that work together like a real security team:
VulnAgent — Finds SQL injection, XSS, command injection, and more
ThreatAgent — Maps attack vectors to MITRE ATT&CK techniques
ReconAgent — Detects information disclosure and exposed secrets
ComplianceAgent — Checks against OWASP Top 10 2021
ResponseAgent — Provides risk assessment and incident response plans
Works out of the box with the smart mock provider — no API key needed to start scanning.
Getting Started
Installation
bash
1# Install from source (mock provider included - no API key needed)2pip install -e .34# With OpenAI support5pip install -e ".[openai]"67# With all LLM providers (OpenAI + Anthropic + Ollama)8pip install -e ".[all]"910# With development tools11pip install -e ".[dev]"
Your First Scan
bash
1# Scan a project (uses smart mock provider by default)2shield-agents scan ./my-project
34# Scan with auto-fix suggestions5shield-agents scan ./my-project --fix
67# Full scan (ignore cache, scan everything)8shield-agents scan ./my-project --full
910# Initialize configuration files11shield-agents init
Docker
bash
1# Build and scan2docker-compose up shield-agents
34# With Ollama for local LLM5docker-compose up ollama shield-agents
Like .gitignore for false positives — 9 rule types (file, category, severity, rule, path, line, title, cwe, id)
Caching / Incremental Scans
Cache previous results, only re-scan changed files — production-ready performance
LLM Fallback Parser
5-strategy parser for when LLMs return invalid JSON (~30% failure rate) — never crash on bad responses
VS Code Extension
On-save scanning with inline diagnostics — security issues appear directly in your editor
Benchmark Suite
13 OWASP WebGoat-style test cases — proves the scanner actually finds real bugs
CI/CD Mode
--ci flag for pipelines — JSON to stdout, SARIF output, exit code based on risk threshold
Format Options
Pipe results to other tools — structured JSON output for integration
Auto-Exclude
Tests, benchmarks, and examples automatically excluded from scan — eliminates ~70% false positives
Agent-Differentiated Mock
Each AI agent returns specialized findings in mock mode — VulnAgent finds vulns, ThreatAgent finds threats
CLI Reference
bash
1shield-agents scan <target>[options]23Options:
4 --config, -c Path to config YAML file5 --full Full scan (ignore cache)6 --fix Generate auto-fix suggestions
7 --no-report Skip report generation
8 --sarif-only Output only SARIF format9 --output, -o Output directory for reports
10 --provider LLM provider: mock, openai, anthropic, ollama
11 --format, -f Output format: rich, json, sarif, plain (default: rich)12 --ci CI/CD mode: silent except JSON on stdout
13 --fail-threshold Risk score threshold for CI failure (default: 75)14 --no-cache Disable caching
15 --no-dedup Disable deduplication
16 --no-ignore Ignore .shieldignore rules
17 --verbose, -v Verbose output
18 --debug Debug output
1920Commands:
21 scan <target> Run security scan
22 init Create .shieldignore and config templates
23 cache --stats Show cache statistics
24 cache --clear Clear scan cache
25 version Show version info
Configuration
Environment Variables
Variable
Description
Default
SHIELD_LLM_PROVIDER
LLM provider (mock, openai, anthropic, ollama)
mock
SHIELD_LLM_API_KEY
API key for the LLM provider
None
SHIELD_LLM_MODEL
Model name
gpt-4
SHIELD_LLM_BASE_URL
Custom API base URL (for Ollama)
None
SHIELD_VERBOSE
Enable verbose output
false
SHIELD_DEBUG
Enable debug output
false
Config File (config.yaml)
yaml
1llm:2provider: mock # mock, openai, anthropic, ollama3model: gpt-44temperature:0.15fallback_enabled:true# Robust JSON fallback parser67scanner:8sast_enabled:true9secrets_enabled:true1011cache:12enabled:true13incremental:true# Only re-scan changed files1415deduplication:16enabled:true17merge_sources:true# Merge duplicate findings from different sources1819report:20output_dir: ./shield-reports
21formats:22- html
23- sarif
24- json
.shieldignore File
Suppress false positives with 9 rule types:
gitignore
1# Shield Agents Ignore File2category:information-disclosure # Ignore all info-disclosure findings3severity:LOW # Ignore LOW and INFO findings4rule:SAST-001 # Ignore a specific rule5file:test_app.py # Ignore all findings in a file6path:*test* # Ignore findings in test files7line:42:app.py # Ignore finding at specific line8title:Assertion* # Ignore findings with matching title (glob)9cwe:CWE-617 # Ignore findings with matching CWE10id:VulnAgent-3 # Ignore a specific finding by ID
Quick Fix Suggestions — Remediation advice for each finding
Workspace Scan — Scan your entire project with one command
Install the extension from the vscode-extension/ directory and configure via VS Code settings.
AI Assistant Compatibility
Shield Agents works seamlessly with AI coding assistants:
Tool
How to Use
Cursor
Add shield-agents scan to .cursorrules for auto-scanning on changes
Claude Code
Run shield-agents scan in terminal, integrate findings into workflow
GitHub Copilot
VS Code extension provides inline security diagnostics alongside Copilot
Aider
Use --fix mode and pipe auto-fix suggestions for code modifications
Windsurf
CLI-based integration via terminal
Benchmark Suite
Verify detection accuracy with 13 OWASP WebGoat-style test cases:
python -m benchmarks.benchmark --verbose
Category
Test Cases
SQL Injection
String concat, format strings
XSS
DOM-based, template injection
Command Injection
os.system, subprocess
Path Traversal
User-controlled file paths
Insecure Deserialization
pickle, yaml, marshal
Weak Cryptography
MD5, SHA-1, random module
Hardcoded Secrets
Passwords, API keys, AWS credentials
SSL/TLS Issues
verify=False, unverified context
SSRF
User-controlled URLs
Auth Bypass
Assertion-based, session manipulation
Clean Code
Negative test (minimal findings)
Running Tests
bash
1# Run all 52 unit tests2pytest tests/ -v
34# Run specific test module5pytest tests/test_sast.py -v
6pytest tests/test_secrets.py -v
7pytest tests/test_llm.py -v
89# Run benchmarks10python -m benchmarks.benchmark --verbose
1112# Lint13ruff check shield_agents/
Contributing
We love contributions! See CONTRIBUTING.md for detailed guidelines.
Shield Agents — Escáner de Ciberseguridad Multi-Agente con IA
Shield Agents es una plataforma de análisis de seguridad de grado producción que utiliza agentes de IA coordinados para detectar vulnerabilidades, amenazas, secretos y problemas de cumplimiento.
Características principales:
Característica
Descripción
Escáner SAST
10 reglas de detección: Inyección SQL, XSS, Inyección de Comandos, Path Traversal, Deserialización Insegura, Criptografía Débil, Problemas de Autenticación, Credenciales hardcodeadas, Problemas SSL/TLS, SSRF
Escáner de Secretos
24 tipos de patrones: AWS, GitHub, Google, Slack, Stripe, conexiones DB, JWTs, Claves Privadas, con filtrado de entropía Shannon
6 Agentes de IA
VulnAgent (vulnerabilidades), ThreatAgent (modelado de amenazas), ReconAgent (reconocimiento), ComplianceAgent (cumplimiento OWASP), ResponseAgent (respuesta a incidentes), AutoFixAgent (correcciones automáticas)
Como .gitignore pero para falsos positivos — 9 tipos de reglas
Escaneo Incremental
Caché de resultados anteriores, solo re-escanea archivos modificados
Auto-Fix
Correcciones instantáneas basadas en patrones + correcciones profundas con LLM
Extensión VS Code
Escaneo al guardar con diagnósticos inline
Modo CI/CD
--ci para pipelines — JSON a stdout, SARIF, código de salida basado en riesgo
Inicio rápido:
bash
1# Instalar (proveedor mock incluido — sin API key necesario)2pip install -e .34# Escanear un proyecto5shield-agents scan ./mi-proyecto
67# Escanear con sugerencias de corrección automática8shield-agents scan ./mi-proyecto --fix
910# Modo CI/CD11shield-agents scan ./src --ci --fail-threshold 751213# Inicializar configuración14shield-agents init
Compatibilidad con asistentes de IA:
Shield Agents es compatible con Cursor, Claude Code, GitHub Copilot, Aider y Windsurf. Funciona como una herramienta CLI estándar que se integra en cualquier flujo de trabajo de desarrollo.
Contribuir:
Las contribuciones son bienvenidas. Lee CONTRIBUTING.md para las guías detalladas. Los reportes de bugs, solicitudes de funcionalidades y pull requests son apreciados.
Licencia: MIT
If you find Shield Agents useful, please star the repo — it helps others discover the project!