.aguaraignore file, the ignore field in .aguara.yml, and automatic exclusions for common directories.
.aguaraignore File
Create a.aguaraignore file in your scan root directory to specify patterns for files that should be skipped. The syntax follows gitignore conventions.
Example .aguaraignore
.aguaraignore
Pattern Syntax
.aguaraignore supports glob patterns:
Matches any characters except
/ (directory separator)Matches exactly one character
Matches any character in the brackets
Matches directories at any depth (recursive glob)
Comments
Lines starting with# are treated as comments and ignored:
Config File Ignore Patterns
You can also specify ignore patterns in.aguara.yml:
.aguara.yml
.aguaraignore and the config file are combined. This is useful when:
- Your team shares
.aguaraignorebut you want personal overrides in.aguara.yml - You’re scanning multiple projects with different ignore rules
Always quote patterns in YAML to prevent parsing issues, especially when using wildcards.
Automatic Exclusions
Aguara automatically skips these directories and file types without configuration:Always-Excluded Directories
.git/- Git repository metadatanode_modules/- Node.js dependencies.aguara/- Aguara state files
Always-Excluded File Extensions
Binary and media files are automatically skipped: Executables & Libraries:.exe,.dll,.so,.dylib,.o,.a
.png,.jpg,.jpeg,.gif,.ico,.svg
.woff,.woff2,.ttf,.eot
.zip,.tar,.gz,.bz2,.xz,.7z
.pdf,.mp3,.mp4,.avi,.mov,.bin
Pattern Matching Examples
Match Specific Directories
Match File Types
Match Test Files
Combined Patterns
File Size Limits
In addition to ignore patterns, Aguara skips files exceeding the maximum file size (default: 50 MB). Configure in.aguara.yml:
.aguara.yml
Precedence
When Aguara decides whether to scan a file, it checks in this order:- Automatic exclusions - Is it
.git/,node_modules/, or a binary extension? - File size - Does it exceed
max_file_size? - Ignore patterns - Does it match
.aguaraignoreor configignorepatterns?
Debugging Ignore Patterns
To verify which files are being scanned:-
Check the scan summary:
-
Use
--format jsonto see exact file list: -
Test pattern matching:
Creating .aguaraignore
Generate a default.aguaraignore file:
.aguaraignore with common patterns for dependencies, build artifacts, IDE files, and logs.
Related
- Configuration File - Learn about
.aguara.ymloptions - Inline Ignore - Suppress specific findings in code
- Rule Overrides - Customize rule behavior
