Overview
Theaguara list-rules command displays all available detection rules, including built-in rules and custom rules (if specified). Rules can be filtered by category and output in various formats.
Usage
Examples
Flags
Filter rules by category.Valid categories:
prompt-injectioncredential-leakexfiltrationexternal-downloadsupply-chaincommand-executionmcp-attackssrf-cloudmcp-configunicode-attackindirect-injectionthird-party-contenttoxic-flowrug-pull
Global Flags (inherited)
Output format.Valid values:
terminal, jsonPath to custom rules directory. Custom rules are loaded in addition to built-in rules.
Exclude specific rule IDs from the list (can be specified multiple times).
Output Formats
Terminal (default)
Tabular view with rule ID, name, severity, and category:JSON
Structured output for parsing and automation:Rule Categories
Aguara includes 148+ built-in detection rules across 14 categories:prompt-injection (22 rules)
Detects attempts to override, ignore, or manipulate AI instructions:- Instruction override patterns
- Role switching and authority claims
- Delimiter injection
- Jailbreak attempts
- Developer mode requests
credential-leak (19 rules)
Detects exposed credentials and API keys:- OpenAI, Anthropic, Google, AWS keys
- GitHub tokens, Stripe keys
- Database connection strings
- Private SSH/RSA keys
- Bearer tokens
exfiltration (17 rules)
Detects data exfiltration attempts:- Webhook exfiltration
- DNS tunneling
- Base64-encoded data transmission
- Reading sensitive files (.env, credentials)
- Environment variable leaks
external-download (17 rules)
Detects risky download patterns:- Binary downloads from untrusted sources
- curl | bash patterns
- wget | sh patterns
- Auto-install scripts
supply-chain (15 rules)
Detects supply chain attacks:- Download-and-execute patterns
- Reverse shells
- Obfuscated commands
- Suspicious package installations
command-execution (16 rules)
Detects arbitrary command execution:subprocesswithshell=Trueeval()andexec()- Node.js
child_process - PowerShell execution
- os.system() calls
mcp-attack (12 rules)
Detects MCP-specific attacks:- Tool injection
- Name shadowing
- Manifest tampering
- Capability escalation
- Resource URI manipulation
ssrf-cloud (10 rules)
Detects SSRF and cloud metadata access:- AWS IMDS (169.254.169.254)
- GCP metadata server
- Azure metadata API
- Docker socket access
- Kubernetes API access
mcp-config (8 rules)
Detects insecure MCP configurations:- Unpinned npx commands
- Hardcoded secrets in config
- Shell metacharacters in args
- World-writable paths
unicode-attack (7 rules)
Detects Unicode-based obfuscation:- Right-to-left override (RTLO)
- Bidirectional text manipulation
- Homoglyph characters
- Unicode tag characters
indirect-injection (6 rules)
Detects indirect prompt injection:- Fetch-and-follow patterns
- Remote config loading
- Email/document-as-instructions
third-party-content (5 rules)
Detects risks from third-party content:- Mutable raw GitHub content
- Unvalidated API responses
- Dynamic code from untrusted sources
toxic-flow (3 rules)
Taint tracking from sources to sinks:- User input → shell execution
- Environment variables → command injection
- API data → eval/exec
rug-pull (1 rule)
Detects malicious changes in previously scanned files:- Requires
--monitorflag during scanning - Triggers when file hash changes and new content is dangerous
Severity Levels
Rules are classified by severity:| Severity | Description | Example |
|---|---|---|
| CRITICAL | Direct security compromise | Exposed API keys, reverse shells |
| HIGH | High-risk vulnerabilities | Prompt injection, SSRF, data exfil |
| MEDIUM | Moderate security concerns | Unicode obfuscation, unpinned deps |
| LOW | Minor issues or warnings | Suspicious patterns |
| INFO | Informational findings | Code style, documentation |
Filtering Rules
By category
Exclude specific rules
Count rules per category
Filter by severity
Custom Rules
Load additional rules from a custom directory:Rule Details
For detailed information about a specific rule, use aguara explain:Exit Codes
| Code | Meaning |
|---|---|
| 0 | Rules listed successfully |
| 1 | Error loading or compiling rules |
Related Commands
- aguara explain - Show detailed information about a rule
- aguara scan - Run detection rules against files
