Skip to content
secret-scan
Menu

Published module

filter-gitleaks-output.mjs

Reads a gitleaks JSON report, applies the reviewed exceptions and prints a counts-only summary.

Pass the report path as the only argument; with no argument it prints usage and exits 1.

Run it with the cwd at the scanned repository root and git on PATH. For a finding in a line-bound exception path it re-reads the source line, from git objects inside a repository or from disk for a --no-git scan, and suppresses the finding only when the line fingerprint matches.

It fails toward reporting: a blank commit, a commit that is not a full SHA, an unreadable line or a git failure reports the finding.

stdout is JSON with summary, private and triage. Each listed finding carries a fingerprint, path, line and rule id, never the value.