-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ignore files that not scanned usually (#225)
Copied from _gitleaks_ the "Allowlist" paths: paths that we didn't expect to find a secret there. ``` gitleaks.toml (.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe)$ (go.mod|go.sum)$ gradle.lockfile node_modules package-lock.json yarn.lock pnpm-lock.yaml Database.refactorlog vendor ```
- Loading branch information
Baruch Odem (Rothkoff)
authored
Mar 12, 2024
1 parent
d3eb9a1
commit 757c4af
Showing
6 changed files
with
90 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package engine | ||
|
||
import ( | ||
"regexp" | ||
|
||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
// Taken from gitleaks config https:/gitleaks/gitleaks/blob/6c52f878cc48a513849900a9aa6f9d68e1c2dbdd/config/gitleaks.toml#L15-L26 | ||
var cfg = config.Config{ | ||
Allowlist: config.Allowlist{ | ||
Paths: []*regexp.Regexp{ | ||
regexp.MustCompile(`gitleaks.toml`), | ||
regexp.MustCompile(`(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe)$`), | ||
regexp.MustCompile(`(go.mod|go.sum)$`), | ||
regexp.MustCompile(`gradle.lockfile`), | ||
regexp.MustCompile(`node_modules`), | ||
regexp.MustCompile(`package-lock.json`), | ||
regexp.MustCompile(`yarn.lock`), | ||
regexp.MustCompile(`pnpm-lock.yaml`), | ||
regexp.MustCompile(`Database.refactorlog`), | ||
regexp.MustCompile(`vendor`), | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters