mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Define multiple allowlists per rule (#1496)
* feat: multiple rule allowlists * feat(config): add allowlist 'condition'
This commit is contained in:
1 parent
8ea608595c
commit
aabe381539
26 files changed
+778
-247
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/report"
|
||||
)
|
||||
@@ -128,7 +129,8 @@ func TestIgnoreIssuesInBaseline(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
d, _ := NewDetectorDefaultConfig()
|
||||
d, err := NewDetectorDefaultConfig()
|
||||
require.NoError(t, err)
|
||||
d.baseline = test.baseline
|
||||
for _, finding := range test.findings {
|
||||
d.addFinding(finding)
|
||||
|
||||
Reference in new issue
Block a user