mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
1 parent
991a940412
commit
c08cb1dc9a
5 files changed
+99
-2
No files matched your search
@@ -47,6 +47,9 @@ c21hbGwtc2VjcmV0
|
||||
secret=ZGVjb2RlZC1zZWNyZXQtdmFsdWU=
|
||||
# The above encoded again
|
||||
c2VjcmV0PVpHVmpiMlJsWkMxelpXTnlaWFF0ZG1Gc2RXVT0=
|
||||
|
||||
# Confirm you can ignore on the decoded value
|
||||
password="bFJxQkstejVrZjQtcGxlYXNlLWlnbm9yZS1tZS1YLVhJSk0yUGRkdw=="
|
||||
`
|
||||
|
||||
func TestDetect(t *testing.T) {
|
||||
@@ -469,6 +472,20 @@ func TestDetect(t *testing.T) {
|
||||
EndColumn: 49,
|
||||
Entropy: 3.3037016,
|
||||
},
|
||||
{ // This just confirms that with no allowlist the pattern is detected (i.e. the regex is good)
|
||||
Description: "Make sure this would be detected with no allowlist",
|
||||
Secret: "lRqBK-z5kf4-please-ignore-me-X-XIJM2Pddw",
|
||||
Match: "password=\"lRqBK-z5kf4-please-ignore-me-X-XIJM2Pddw\"",
|
||||
File: "tmp.go",
|
||||
Line: "\npassword=\"bFJxQkstejVrZjQtcGxlYXNlLWlnbm9yZS1tZS1YLVhJSk0yUGRkdw==\"",
|
||||
RuleID: "decoded-password-dont-ignore",
|
||||
Tags: []string{"decode-ignore", "decoded:base64", "decode-depth:1"},
|
||||
StartLine: 23,
|
||||
EndLine: 23,
|
||||
StartColumn: 2,
|
||||
EndColumn: 68,
|
||||
Entropy: 4.5841837,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user