forked from aquasecurity/trivy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(secret): convert severity for custom rules (aquasecurity#6500)
- Loading branch information
1 parent
34ab09d
commit 46d5aba
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
pkg/fanal/secret/testdata/config-with-incorrect-severity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
rules: | ||
- id: rule1 | ||
category: general | ||
title: Generic Rule | ||
severity: bad | ||
regex: (?i)(?P<key>(secret))(=|:).{0,5}['"](?P<secret>somevalue)['"] | ||
secret-group-name: secret | ||
disable-allow-rules: | ||
- tests |
9 changes: 9 additions & 0 deletions
9
pkg/fanal/secret/testdata/config-with-non-uppercase-severity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
rules: | ||
- id: rule1 | ||
category: general | ||
title: Generic Rule | ||
severity: uNknown | ||
regex: (?i)(?P<key>(secret))(=|:).{0,5}['"](?P<secret>somevalue)['"] | ||
secret-group-name: secret | ||
disable-allow-rules: | ||
- tests |