Skip to content

Commit f2bb66c

Browse files
committed
feat: add rule to hide secret
1 parent fdc94f9 commit f2bb66c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

common-lib/utils/secretScanner/rules.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,4 +667,12 @@ var BuiltinRules = []Rule{
667667
SecretGroupName: "secret",
668668
Keywords: []string{"dockerc"},
669669
},
670+
{
671+
ID: "generic-credential-assignment",
672+
Title: "Generic credential assignment",
673+
Severity: "HIGH",
674+
Regex: regexp.MustCompile(`(?i)(password|passwd|pwd|secret|credential|token|api[_-]?key)["']?\s*(:|=>|=)\s*["']?(?P<secret>[^"',}\s]{3,})`),
675+
SecretGroupName: "secret",
676+
Keywords: []string{"password", "passwd", "pwd", "secret", "credential", "token", "key"},
677+
},
670678
}

0 commit comments

Comments
 (0)