mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Update Azure secretPatFmt
We had a secret leak through and looks like the existing detector doesn't match Azure docs: https://learn.microsoft.com/en-us/purview/sit-defn-client-secret-api-key This changed regex should match what is found in the above docs: A combination of 24 characters consisting of letters, digits, and special characters. or A combination of 32 characters consisting of letters and digits. or A combination of 40 characters consisting of letters and digits. or A combination of 44 characters consisting of letters, digits, and special characters. or A combination of 56 characters consisting of letters, digits, and special characters or A combination of 88 characters consisting of letters, digits, and special characters.
This commit is contained in:
parent
b883645856
commit
88c24b25c5
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ var (
|
|||
tenantIDPat = mustFmtPat("tenant_id", idPatFmt)
|
||||
|
||||
// TODO: support old patterns
|
||||
secretPatFmt = `(?i)(%s).{0,20}([a-z0-9_\.\-~]{34})`
|
||||
secretPatFmt = `(?i)(%s)[:=]?\s*([\w\-~]{24}|[\w]{32}|[\w]{40}|[\w\-~]{44}|[\w\-~]{56}|[\w\-~]{88})`
|
||||
clientSecretPat = mustFmtPat("client_secret", secretPatFmt)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue