mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 05:24:22 +01:00
Whitelist repo (#378)
* fixing commit latest bug * bumping go-git and adding repo whitelist * adding tests
This commit is contained in:
1 parent
8bd4649b01
commit
473d0d55a7
12 files changed
+282
-65
No files matched your search
@@ -33,6 +33,15 @@ func Run(m *manager.Manager) error {
|
||||
}
|
||||
|
||||
func runHelper(r *Repo) error {
|
||||
// Ignore whitelisted repos
|
||||
for _, wlRepo := range r.Manager.Config.Whitelist.Repos {
|
||||
if RegexMatched(r.Manager.Opts.RepoPath, wlRepo) {
|
||||
return nil
|
||||
}
|
||||
if RegexMatched(r.Manager.Opts.Repo, wlRepo) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if r.Manager.Opts.OpenLocal() {
|
||||
r.Name = path.Base(r.Manager.Opts.RepoPath)
|
||||
if err := r.Open(); err != nil {
|
||||
|
||||
Reference in new issue
Block a user