mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
feat: add curl basic auth rule (#1575)
This commit is contained in:
1 parent
d07b394b08
commit
cf5334fd61
3 files changed
+92
No files matched your search
@@ -251,6 +251,20 @@ description = "Discovered a Contentful delivery API token, posing a risk to cont
|
||||
regex = '''(?i)(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
|
||||
keywords = ["contentful"]
|
||||
|
||||
[[rules]]
|
||||
id = "curl-auth-user"
|
||||
description = ""
|
||||
regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)[ =](?:("[^:"]{3,}:[^"]{3,}")|('[^:']{3,}:[^']{3,}')|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+))|)(?:\s|\z)'''
|
||||
keywords = ["curl"]
|
||||
# NOTE: Gitleaks >= v8.21.0 should use [[rules.allowlists] instead.
|
||||
[rules.allowlist]
|
||||
regexes = [
|
||||
'''[^:]+:(changeme|pass(word)?|pwd|\*+|x+)''',
|
||||
'''<[^>]+>:<[^>]+>|<[^:]+:[^>]+>''',
|
||||
'''[^:]+:\[[^]]+]''',
|
||||
'''(?i)[^:]+:\$(\d|[a-z]\w+|(\{\d|[a-z]\w+}))''',
|
||||
]
|
||||
|
||||
[[rules]]
|
||||
id = "databricks-api-token"
|
||||
description = "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing."
|
||||
|
||||
Reference in new issue
Block a user