Git Credentials in URL

Detects embedded credentials (username:password) in Git repository URLs. Mirrors Snaffler rule KeepGitCredsByName.

Type
regex
Engine
boost_regex
Confidence
high
Confidence justification
High confidence: the user:password@ URL structure is highly specific. The constraint on allowed characters in username and password fields (no whitespace, colon, slash, or @) tightly bounds the match. Corroborative evidence further reduces false positives.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF
Data categories
credentials
Scope
specific
Platform compatibility
Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible

Pattern

https?://[^\s:/@]{1,64}:[^\s:/@]{1,128}@[A-Za-z0-9.-]{1,255}

Corroborative evidence keywords

github.com, gitlab, dev.azure.com, bitbucket, git-credentials

Proximity: 300 characters

Should match

Should not match

Known false positives

Collections