Skip to content

Instantly share code, notes, and snippets.

@sparcflow
Created October 20, 2019 13:35
Show Gist options
  • Save sparcflow/ff2eabaa8e007850acc158ea3495e95f to your computer and use it in GitHub Desktop.
Save sparcflow/ff2eabaa8e007850acc158ea3495e95f to your computer and use it in GitHub Desktop.
secret_regex_patterns.txt
^.*_rsa$
^.*_dsa$
^.*_ed25519$
^.*_ecdsa$
\.?ssh/config$
^key(pair)?$
^\.?(bash_|zsh_|sh_|z)?history$
^\.?mysql_history$
^\.?psql_history$
^\.?pgpass$
^\.?irb_history$
\.?purple/accounts\.xml$
\.?xchat2?/servlist_?\.conf$
\.?irssi/config$
\.?recon-ng/keys\.db$
^\.?dbeaver-data-sources.xml$
^\.?muttrc$
^\.?s3cfg$
\.?aws/credentials$
^sftp-config(\.json)?$
^\.?trc$
^\.?(bash|zsh|csh)rc$
^\.?(bash_|zsh_)?profile$
^\.?(bash_|zsh_)?aliases$
config(\.inc)?\.php$
^key(store|ring)$
^kdbx?$
^sql(dump)?$
^\.?htpasswd$
^(\.|_)?netrc$
\.?gem/credentials$
^\.?tugboat$
doctl/config.yaml$
^\.?git-credentials$
config/hub$
^\.?gitconfig$
\.?chef/(.*)\.pem$
etc/shadow$
etc/passwd$
^\.?dockercfg$
^\.?npmrc$
^\.?env$
-----BEGIN [EC|RSA|DSA|OPENSSH] PRIVATE KEY----
(A3T[A-Z0-9]|AKIA|AGPA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}
(("|'|`)?((?i)aws)?_?((?i)access)_?((?i)key)?_?((?i)id)?("|'|`)?\\\\s{0,50}(:|=>|=)\\\\s{0,50}("|'|`)?(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}("|'|`)?)
(("|'|`)?((?i)aws)?_?((?i)account)_?((?i)id)?("|'|`)?\\\\s{0,50}(:|=>|=)\\\\s{0,50}("|'|`)?[0-9]{4}-?[0-9]{4}-?[0-9]{4}("|'|`)?)
(("|'|`)?((?i)aws)?_?((?i)secret)_?((?i)access)?_?((?i)key)?_?((?i)id)?("|'|`)?\\\\s{0,50}(:|=>|=)\\\\s{0,50}("|'|`)?[A-Za-z0-9/+=]{40}("|'|`)?)
(("|'|`)?((?i)aws)?_?((?i)session)?_?((?i)token)?("|'|`)?\\\\s{0,50}(:|=>|=)\\\\s{0,50}("|'|`)?[A-Za-z0-9/+=]{16,}("|'|`)?)
(?i)artifactory.{0,50}("|'|`)?[a-zA-Z0-9=]{112}("|'|`)?
(?i)codeclima.{0,50}("|'|`)?[0-9a-f]{64}("|'|`)?
EAACEdEose0cBA[0-9A-Za-z]+
(("|'|`)?type("|'|`)?\\\\s{0,50}(:|=>|=)\\\\s{0,50}("|'|`)?service_account("|'|`)?,?)
(?:r|s)k_[live|test]_[0-9a-zA-Z]{24}
[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com
AIza[0-9A-Za-z\\-_]{35}
ya29\\.[0-9A-Za-z\\-_]+
sk_[live|test]_[0-9a-z]{32}
sq0atp-[0-9A-Za-z\-_]{22}
sq0csp-[0-9A-Za-z\-_]{43}
access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}
amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
SK[0-9a-fA-F]{32}
key-[0-9a-zA-Z]{32}
[0-9a-f]{32}-us[0-9]{12}
sshpass -p.*['|"]
(https\\://outlook\\.office.com/webhook/[0-9a-f-]{36}\\@)
(?i)sauce.{0,50}("|'|`)?[0-9a-f-]{36}("|'|`)?
(xox[pboa]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})
https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}
(?i)sonar.{0,50}("|'|`)?[0-9a-f]{40}("|'|`)?
(?i)hockey.{0,50}("|'|`)?[0-9a-f]{32}("|'|`)?
([\w+]{1,24})(://)([^$<]{1})([^\s";]{1,}):([^$<]{1})([^\s";]{1,})@[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,24}([^\s]+)
oy2[a-z0-9]{43}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment