feat: add curl basic auth rule (#1575)

This commit is contained in:
Richard Gomez authored and GitHub committed 2024-10-17 19:15:30 -05:00
1 parent d07b394b08
commit cf5334fd61
3 files changed
+92

No files matched your search

+14
View File
@@ -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."