mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
chore: Enhance curl-auth-user to detect empty usernames or passwords (#1726)
This commit is contained in:
1 parent
1f323d8b69
commit
36c52c6b73
2 files changed
+5
-2
No files matched your search
@@ -293,7 +293,7 @@ keywords = ["curl"]
|
||||
[[rules]]
|
||||
id = "curl-auth-user"
|
||||
description = "Discovered a potential basic authorization token provided in a curl command, which could compromise the curl accessed resource."
|
||||
regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)(?:=|[ \t]{0,5})(?:"([^:"]{3,}:[^"]{3,})"|'([^:']{3,}:[^']{3,})'|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w${}@.-]+)))(?:\s|\z)'''
|
||||
regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)(?:=|[ \t]{0,5})("(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'([^:']{3,}:[^']{3,})'|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w${}@.-]+)))(?:\s|\z)'''
|
||||
entropy = 2
|
||||
keywords = ["curl"]
|
||||
[[rules.allowlists]]
|
||||
|
||||
Reference in new issue
Block a user