mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
Ensure keywords are downcased (#1633)
* Ensure keywords are downcased * Update tests * Remove unnecessary code * Add msg to test expectation * Update the keywords as we iterate through them * Remove unnecessary to lower --------- Co-authored-by: Craig Smith <5344211-craigmsmith@users.noreply.gitlab.com>
This commit is contained in:
1 parent
f6966057f5
commit
2f73a3e3cf
5 files changed
+74
-5
No files matched your search
@@ -0,0 +1,8 @@
|
||||
title = "gitleaks extended 3"
|
||||
|
||||
[extend]
|
||||
path="../testdata/config/extend_rule_keywords_base.toml"
|
||||
|
||||
[[rules]]
|
||||
id = "aws-secret-key-again-again"
|
||||
description = "A new description"
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
title = "gitleaks extended 3"
|
||||
|
||||
## This should not be loaded since we can only extend configs to a depth of 3
|
||||
|
||||
[[rules]]
|
||||
id = "aws-secret-key-again-again"
|
||||
description = "AWS Secret Key"
|
||||
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
|
||||
tags = ["key", "AWS"]
|
||||
keywords = ["AWS"]
|
||||
[[rules.allowlists]]
|
||||
stopwords = ["fake"]
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
title = "gitleaks extended 3"
|
||||
|
||||
[extend]
|
||||
path="../testdata/config/extend_rule_keywords_base.toml"
|
||||
|
||||
[[rules]]
|
||||
id = "aws-rule-that-is-not-in-base"
|
||||
keywords = ["CMS"]
|
||||
Reference in new issue
Block a user