Documentation Index
Fetch the complete documentation index at: https://mintlify.com/garagon/aguara/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Theaguara scan command analyzes files and directories for security issues including prompt injections, credential leaks, exfiltration attempts, and more. It runs 177 built-in detection rules across 13 security categories.
Usage
Basic Examples
Flags
Directory or file to scan. Required unless using
--auto flag.Auto-discover and scan all MCP client configurations. When enabled, no path argument should be provided.
Exit with code 1 if findings at or above this severity are found.Valid values:
critical, high, medium, lowCI mode: equivalent to
--fail-on high --format terminal --no-colorShow rule descriptions for critical and high severity findings in terminal output.
Only scan git-changed files (staged, unstaged, untracked). Useful for faster pre-commit scans.
Enable rug-pull detection: tracks file hashes across runs to detect malicious changes in previously scanned files.
Path to state file for
--monitor mode. Only used when --monitor is enabled.Maximum file size to scan. Accepts human-readable sizes (e.g.,
50MB, 100MB).Range: 1MB–500MBGlobal Flags (inherited)
These flags are available from the root command:Minimum severity to report.Valid values:
critical, high, medium, low, infoOutput format.Valid values:
terminal, json, sarif, markdownOutput file path. If not specified, writes to stdout.
Path to custom rules directory. Rules are loaded in addition to built-in rules.
Rule IDs to disable (can be specified multiple times).
Disable ANSI color output. Also enabled by
NO_COLOR environment variable.Number of concurrent worker threads for scanning.
Output Formats
Terminal (default)
Human-readable output with ANSI colors and severity histogram:JSON
Machine-parseable structured output:SARIF
GitHub Code Scanning compatible output (SARIF 2.1.0):Markdown
Ideal for GitHub Actions job summaries and PR comments:Exit Codes
| Code | Meaning |
|---|---|
| 0 | No findings above --fail-on threshold (or no --fail-on set) |
| 1 | Findings at or above --fail-on severity, or any error |
Auto Mode
The--auto flag enables automatic discovery and scanning of MCP client configurations:
- Discover all MCP client configs on your machine (17 supported clients)
- Scan each configuration file
- Aggregate findings across all discovered configs
--auto, do not provide a path argument.
Incremental Scanning
Git-changed files
Scan only modified files in your git repository:- Staged files
- Unstaged modifications
- Untracked files
Rug-pull detection
Track file hashes across scans to detect malicious modifications:RUGPULL_001 finding with CRITICAL severity.
State is stored in ~/.aguara/state.json by default (customize with --state-path).
Configuration File
Aguara loads.aguara.yml from the scan target directory (or parent):
Detection Capabilities
Aguara runs four analysis engines:- Pattern Matcher: 148+ regex/contains rules across 14 categories
- NLP Injection: Markdown AST analysis for hidden instructions
- Toxic Flow: Taint tracking (user input → dangerous sinks)
- Rug-Pull: Hash-based change detection (requires
--monitor)
Rule Categories
prompt-injection(22 rules)credential-leak(19 rules)exfiltration(17 rules)external-download(17 rules)supply-chain(15 rules)command-execution(16 rules)mcp-attack(12 rules)ssrf-cloud(10 rules)mcp-config(8 rules)unicode-attack(7 rules)indirect-injection(6 rules)third-party-content(5 rules)toxic-flow(3 rules)rug-pull(1 rule)
Performance Tips
-
Use
.aguaraignoreto skip large directories: -
Scan only changed files during development:
-
Adjust worker threads for large codebases:
-
Increase max file size if needed:
CI/CD Integration
GitHub Actions
GitLab CI
Pre-commit Hook
aguara init --hook to generate automatically.