Skip to content

Commit f622ea8

Browse files
Fix false positive: Export pattern now requires cipher suite context
The weak cipher pattern was matching the word 'Export' in general text. Updated to require specific cipher suite prefixes like EXP-, EXPORT_, TLS_*EXPORT, SSL_*EXPORT, etc.
1 parent 6030cd8 commit f622ea8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/patterns/matcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func (m *Matcher) loadPatterns() {
344344
ID: "CIPHER-001",
345345
Name: "Weak Cipher Suite",
346346
Category: "Weak Cipher",
347-
Regex: regexp.MustCompile(`(?i)(NULL|EXPORT|DES[-_]CBC|RC4|MD5)[-_]?(SHA|MD5)?|CIPHER.*NULL|anon[-_]?DH`),
347+
Regex: regexp.MustCompile(`(?i)\b(EXP[-_]|EXPORT[-_]|TLS_.*EXPORT|SSL_.*EXPORT|NULL[-_]?(SHA|MD5)|DES[-_]CBC[-_]?(SHA|MD5)?|anon[-_]?DH|ADH[-_]|AECDH[-_])\b|CIPHER.*NULL`),
348348
Severity: types.SeverityCritical,
349349
Quantum: types.QuantumVulnerable,
350350
Description: "Weak or export-grade cipher suite detected. These provide inadequate security.",

0 commit comments

Comments
 (0)