fix(config): extend allowlist & handle extend when validating (#1524)

This commit is contained in:
Richard Gomez authored and GitHub committed 2024-09-25 08:20:19 -05:00
1 parent 989ef19fb0
commit ed19c4e8b4
8 files changed
+119 -22

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ title = "gitleaks extended 3"
## This should not be loaded since we can only extend configs to a depth of 3
[[rules]]
description = "AWS Secret Key"
id = "aws-secret-key-again-again"
description = "AWS Secret Key"
regex = '''(?i)aws_(.{0,20})?=?.[\'\"0-9a-zA-Z\/+]{40}'''
tags = ["key", "AWS"]
+8
View File
@@ -0,0 +1,8 @@
[extend]
path="../testdata/config/extend_3.toml"
[[rules]]
id = "aws-secret-key-again-again"
[rules.allowlist]
description = "False positive. Keys used for colors match the rule, and should be excluded."
paths = ['''something.py''']
+12
View File
@@ -0,0 +1,12 @@
title = "gitleaks extended 3"
[extend]
path="../testdata/config/extend_3.toml"
[[rules]]
id = "aws-secret-key-again-again"
[rules.allowlist]
commits = ['''abcdefg1''']
regexes = ['''foo.+bar''']
paths = ['''ignore\.xaml''']
stopwords = ['''example''']