⚙️ Options
Scanner-specific configuration options
See Configuration for the complete configuration system (hierarchy, file discovery, merging).
Performance Options
Max Threads
Maximum number of threads to use for parallel scanning. Set to 0 to auto-detect based on CPU cores.
Default: 0 (auto-detect)
scanner:
max_threads: 8export GUARDY_SCAN_MAX_THREADS=8Thread Percentage
Percentage of available CPU cores to use for scanning. Helps prevent resource exhaustion on busy systems.
Default: 70
scanner:
thread_percentage: 70export GUARDY_SCAN_THREAD_PCT=70Max File Size
Maximum file size to scan in megabytes. Files larger than this will be skipped.
Default: 10 MB
scanner:
max_file_size_mb: 5export GUARDY_SCAN_MAX_SIZE=5guardy scan --max-file-size 5Minimum Files for Parallel
Minimum number of files required to trigger parallel processing. Below this threshold, scanning runs sequentially.
Default: 100
export GUARDY_SCAN_MIN_FILES_PARALLEL=100scanner:
min_files_for_parallel: 100Stack Size
Stack size per thread in megabytes. Increase if scanning very large files causes stack overflow.
Default: 32 MB
export GUARDY_SCAN_STACK_SIZE_MB=32scanner:
stack_size_mb: 32File Processing Options
Include Binary Files
Scan binary files in addition to text files. Binary scanning may produce false positives.
Default: false
guardy scan --include-binaryexport GUARDY_SCAN_INCLUDE_BINARY=truescanner:
include_binary: trueFollow Symlinks
Follow symbolic links during directory traversal. Be cautious as this can lead to infinite loops with circular symlinks.
Default: false
guardy scan --follow-symlinksexport GUARDY_SCAN_FOLLOW_SYMLINKS=truescanner:
follow_symlinks: trueIgnore Test Code
Skip files and directories commonly used for tests (e.g., test/, tests/, __tests__/, *.test.js).
Default: true
export GUARDY_SCAN_IGNORE_TEST_CODE=truescanner:
ignore_test_code: trueEntropy Analysis
Enable Entropy Analysis
Use entropy-based detection to identify high-randomness strings that may be secrets. Disabling improves performance but reduces detection accuracy.
Default: true
# Disable entropy analysis
guardy scan --no-entropyexport GUARDY_SCAN_ENTROPY_ENABLED=truescanner:
enable_entropy_analysis: trueEntropy Threshold
Sensitivity threshold for entropy analysis. Lower values = more sensitive (more findings, more false positives).
Default: 0.00001
guardy scan --entropy-threshold 0.0001export GUARDY_SCAN_ENTROPY_THRESHOLD=0.0001scanner:
entropy_threshold: 0.0001File Filtering
Include Patterns
Glob patterns for files to include in scanning. Only files matching these patterns will be scanned.
scanner:
include:
- "src/**/*.{js,ts,py,go}"
- "config/*.{json,yaml}"Exclude Patterns
Glob patterns for files and directories to exclude from scanning.
guardy scan --ignore-paths node_modules,target,distscanner:
exclude:
- "node_modules/**"
- "target/**"
- "dist/**"
- "*.min.js"Allowlisting
Allowlist Strings
Specific strings to ignore during scanning. Use for known safe values that trigger false positives.
scanner:
allowlist:
strings:
- "example_api_key_for_testing"
- "AKIA_EXAMPLE_KEY"Allowlist Files
Files to completely exclude from scanning, even if they match include patterns.
scanner:
allowlist:
files:
- "test/fixtures/secrets.txt"
- "docs/api-examples.md"Allowlist Patterns
Regex patterns to ignore with optional reason for documentation.
scanner:
allowlist:
patterns:
- regex: 'FAKE_[A-Z_]+'
reason: "Test constants"
- regex: 'EXAMPLE_.*_KEY'
reason: "Documentation examples"Display Options
Show Findings
Show detailed finding information including file path, line number, and match details.
Default: false
guardy scan --showexport GUARDY_SCAN_SHOW=truescanner:
show: trueShow Sensitive Data
Display actual secret values in output. Use with extreme caution - only enable in secure environments.
Default: false
guardy scan --sensitiveexport GUARDY_SCAN_SENSITIVE=truescanner:
sensitive: trueTTY Progress
Enable terminal progress bars and live updates. Disable when running in CI/CD or non-interactive environments.
Default: true
guardy scan --tty=falseexport GUARDY_SCAN_TTY=falsescanner:
tty: falseOutput Formats
Report Generation
Generate scan reports in specified formats. Supports JSON, SARIF, and other formats.
# Single report
guardy scan --report results.json
# Multiple reports
guardy scan --report results.json,report.sarifscanner:
report: "results.json"Output Format
Set output format for terminal display. Available formats: text, json, sarif.
Default: text
guardy scan --format jsonScan Mode
Processing mode that determines how files are scanned.
Options:
auto- Automatically choose based on file count (default)parallel- Force parallel processingsequential- Force sequential processing
Default: auto
guardy scan --mode parallelscanner:
mode: auto # auto, parallel, sequentialComplete Example
scanner:
# Performance
max_threads: 0 # auto-detect
thread_percentage: 70
max_file_size_mb: 10
min_files_for_parallel: 100
stack_size_mb: 32
# File processing
include_binary: false
follow_symlinks: false
ignore_test_code: true
# Entropy analysis
enable_entropy_analysis: true
entropy_threshold: 0.00001
# File filtering
include:
- "src/**/*.{js,ts,py,go}"
- "config/*.{json,yaml}"
exclude:
- "node_modules/**"
- "target/**"
- "dist/**"
- "*.min.js"
# Allowlisting
allowlist:
strings:
- "example_api_key_for_testing"
files:
- "test/fixtures/secrets.txt"
patterns:
- regex: 'FAKE_[A-Z_]+'
reason: "Test constants"
# Display
show: false
sensitive: false
tty: true