mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix(secret): remove space from asymmetric private key (#2434)
This commit is contained in:
@@ -149,7 +149,7 @@ var builtinRules = []Rule{
|
||||
Category: CategoryAsymmetricPrivateKey,
|
||||
Title: "Asymmetric Private Key",
|
||||
Severity: "HIGH",
|
||||
Regex: MustCompile(`(?i)-----\s*?BEGIN[ A-Z0-9_-]*?PRIVATE KEY( BLOCK)?\s*?-----(?P<secret>[A-Za-z0-9=+/\s]*?)-----\s*?END[ A-Z0-9_-]*? PRIVATE KEY( BLOCK)?\s*?-----`),
|
||||
Regex: MustCompile(`(?i)-----\s*?BEGIN[ A-Z0-9_-]*?PRIVATE KEY( BLOCK)?\s*?-----[\s]*?(?P<secret>[A-Za-z0-9=+/\r\n]+)[\s]*?-----\s*?END[ A-Z0-9_-]*? PRIVATE KEY( BLOCK)?\s*?-----`),
|
||||
SecretGroupName: "secret",
|
||||
Keywords: []string{"-----"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user