Gitleak Scan - Avoid previous Commits

1.5k Views Asked by At

My gitleaks scan reports are generating the History of the failure from previous Commits. I've got those failures fixed.But still the previous histories are appearing in the gitleak scan report in jenkins. Can anyone have any idea on how to avoid the History of gitleak scan Failures?

1

There are 1 best solutions below

0
On

there are several options:

  1. remove leaks from the git history, e.g. using https://rtyley.github.io/bfg-repo-cleaner/

  2. add .gitleaks.toml config, e.g.

add [rules.allowlist]
description = "ignore commits"
commits = [ "commit-A", "commit-B"]
  1. or if applicable - to use .gitleaksignore file https://github.com/zricethezav/gitleaks#gitleaksignore