Basic Syntax
Place an inline comment containingaguara-ignore followed by one or more rule IDs:
CRED_004 (credential leak) on the same line is suppressed.
Comment Styles
Aguara recognizes multiple comment formats:#, //, --, <!--
Directive Types
Same-Line Ignore
Suppress a rule on the same line as the directive:Next-Line Ignore
Suppress a rule on the next line using-next-line:
Multiple Rules
Suppress multiple rules by separating IDs with commas:Ignore All Rules
Suppress all rules on a line by omitting the rule ID:Complete Examples
Test Fixtures
SKILL.md
Configuration Files
.aguara.yml
Documentation Examples
Intentional Downloads
How It Works
When Aguara scans a file:- Parse directives - Extract all
aguara-ignorecomments and build an index of which lines suppress which rules - Run analyzers - Pattern matching, NLP, taint tracking, and rug-pull detection run normally
- Filter findings - Before returning results, findings matching suppressed (line, rule ID) pairs are removed
- Scan output (terminal, JSON, SARIF, Markdown)
- Exit code calculation (for
--fail-on) - Finding counts
Inline ignores only affect findings on the exact line number specified. If a finding spans multiple lines, place the directive on the line where the match occurs (usually the first line).
Regex Pattern
Aguara uses this regex to detect inline ignores:- Optional comment prefix:
#,//,--,<!-- - Literal
aguara-ignore - Optional
-next-linesuffix - One or more uppercase rule IDs separated by commas
- Optional HTML closing
-->
- Lowercase rule IDs:
aguara-ignore cred_004❌ - No whitespace:
#aguara-ignoreCRED_004❌ - Inline with code:
api_key = 'foo' # aguara-ignore CRED_004❌ (must be on its own line or before code)
Limitations
Cannot Ignore by Category
You cannot suppress all rules in a category:aguara-ignore (all rules).
Cannot Ignore Ranges
There is no “start ignore / end ignore” block syntax. Each line must be suppressed individually:Does Not Affect Rug-Pull Detection
Inline ignores suppress findings from pattern matching, NLP, and taint tracking, but not rug-pull detection (RUGPULL_001). Rug-pull findings are based on file hash changes, not line-level patterns.
Best Practices
Always Include Rule IDs
Prefer specific rule IDs over blanket ignores:Add Context Comments
Explain why the pattern is safe:Use in Test Files
Test fixtures often contain intentional attack patterns:tests/fixtures/prompt-injection.md
Prefer Configuration Over Inline Ignores
If you need to suppress a rule across many files, use.aguara.yml:
.aguara.yml
Alternatives
Before using inline ignores, consider:- Rule overrides - Lower severity or disable rules project-wide in
.aguara.yml - Ignore patterns - Skip entire files or directories via
.aguaraignore - Code refactoring - Change the pattern to avoid triggering the rule
Verification
To verify an inline ignore worked:-
Before adding the directive, run the scan and note the finding:
-
Add the directive on or before the line:
-
Re-run the scan and confirm the finding is gone:
-
Check JSON output to confirm the finding was suppressed (not just hidden):
Related
- Configuration File - Project-wide settings
- Rule Overrides - Disable or change severity globally
- Ignore Patterns - Skip files and directories
