Configuration file
In your configuration file, you can add allowlists that skip secrets by file path, commit, regular expression, or word. You can also turn off built-in rules that report values you don’t consider secrets.Configuration
Add allowlists and turn off built-in rules in
.infisical-scan.toml.Ignore one line
To ignore a secret on one line of code, add abetterleaks:allow comment at the end of the line:
example.js
gitleaks:allow, so existing gitleaks:allow comments keep working.
Ignore specific findings
Each finding has a fingerprint, which is in theFingerprint field of a JSON report. To ignore findings, list their fingerprints in a .infisicalignore file, one per line. Put the file in the directory you scan, which is the --source directory or, by default, the current directory:
.infisicalignore
<commit>:<file>:<rule>:<line>: Ignores the finding in that commit only (what a scan of Git history reports)<file>:<rule>:<line>: Ignores the finding in every commit (what a scan with--no-gitreports)
Ignore existing findings
If you start scanning a repository that already has a long history, you can record every current finding in a baseline and have later scans report only new ones. First, write a JSON report of the current findings:--baseline-path:
findings.json then contains only the findings that aren’t in baseline.json. If you scan uncommitted changes with infisical scan git-changes, the scan doesn’t use a baseline.