Skip to content

Commit a032ad6

Browse files
fix(secret): ignore .dist-info directories during secret scanning (#8646)
Co-authored-by: DmitriyLewen <[email protected]>
1 parent 36f8d0f commit a032ad6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/fanal/secret/builtin-allow-rules.go

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
package secret
22

33
var builtinAllowRules = []AllowRule{
4+
{
5+
// `.dist-info` dir contains only metadata files such as version, license, and entry points.
6+
// cf. https://github.com/aquasecurity/trivy/issues/8212
7+
ID: "dist-info",
8+
Description: "Ignore Python .dist-info metadata directories",
9+
Path: MustCompile(`\.dist-info\/`),
10+
},
411
{
512
ID: "tests",
613
Description: "Avoid test files and paths",

0 commit comments

Comments
 (0)