Overview
Theaguara explain command displays comprehensive information about a specific detection rule, including its description, patterns, severity, examples of true positives, and false positives.
Usage
Examples
Arguments
The ID of the rule to explain (case-insensitive).Use aguara list-rules to see all available rule IDs.
Flags
Global Flags (inherited)
Output format.Valid values:
terminal, jsonPath to custom rules directory to include in search.
Disable ANSI color output in terminal format.
Output Formats
Terminal (default)
Human-readable output with color-coded severity:- CRITICAL: Red + bold
- HIGH: Red
- MEDIUM: Yellow
- LOW: Cyan
- INFO: Dim
JSON
Structured output for parsing and automation:Pattern Types
Rules use two pattern matching types:Regex patterns
- Uses Go’s RE2 regex engine
- No lookaheads or lookbehinds
(?i)= case-insensitive\s+= whitespace?= optional
Contains patterns
- Simple substring matching
- Faster than regex
- Case-sensitive (unless wrapped in case-insensitive regex)
Understanding Examples
True Positives (✗)
Examples that should trigger the rule:False Positives (✓)
Examples that should not trigger the rule:- More specific regex patterns
- Exclude patterns in the rule definition
- Context-aware analysis
Use Cases
Understanding a finding
When a scan reports a rule violation, explain it to understand why:Rule development
When writing custom rules, examine similar built-in rules:Security research
Explore detection patterns for specific attack vectors:Documentation
Export rule details for team documentation:Finding Rule IDs
If you don’t know the exact rule ID:Common Rules to Explain
Prompt Injection
Credential Leaks
Data Exfiltration
Command Execution
MCP Attacks
Cloud SSRF
Rule Not Found
If the rule ID doesn’t exist:- Check the rule ID spelling (case-insensitive)
- Run
aguara list-rulesto see all available rules - If it’s a custom rule, use
--rulesflag:
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Rule explained successfully |
| 1 | Rule not found or error |
Related Commands
- aguara list-rules - List all available rules
- aguara scan - Run detection rules against files
