Skip to content

Instantly share code, notes, and snippets.

View alefebvre-ls's full-sized avatar

Alain Lefebvre alefebvre-ls

View GitHub Profile
@alefebvre-ls
alefebvre-ls / .git-verification-patterns.hjson
Last active October 31, 2016 13:32
Python-based Git pre-commit hook to verify for secrets
patterns:
[
{
name: AWS Secret Key, Github Personal Access Token
pattern: (\"|')?(AWS|aws|Aws)?_?(SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)(\"|')?\s*(:|=>|=)\s*(\"|')?[A-Za-z0-9/\+=]{40}([^a-zA-Z0-9]+|$)
min_occurences: 1
white_listed_pattern: "[^a-z0-9]+(0{40})[^a-z0-9]*"
},
{
name: AWS Access Key ID