add_pre_commit_hook (#3)
Browse files- tjw2: add pre-commit hooks and baseline (7aabddbd5b149e225336408e3a361a596e9a310a)
- .pre-commit-config.yaml +24 -0
- .secrets.baseline +127 -0
.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
repos:
|
| 2 |
+
- repo: [email protected]:Yelp/detect-secrets
|
| 3 |
+
rev: v1.5.0
|
| 4 |
+
hooks:
|
| 5 |
+
- id: detect-secrets
|
| 6 |
+
args: ['--baseline', '.secrets.baseline']
|
| 7 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 8 |
+
rev: v5.0.0
|
| 9 |
+
hooks:
|
| 10 |
+
- id: no-commit-to-branch
|
| 11 |
+
args: [--branch, main, --branch, master]
|
| 12 |
+
- repo: https://github.com/psf/black
|
| 13 |
+
rev: 24.10.0
|
| 14 |
+
hooks:
|
| 15 |
+
- id: black
|
| 16 |
+
- repo: https://github.com/pycqa/isort
|
| 17 |
+
rev: 5.13.2
|
| 18 |
+
hooks:
|
| 19 |
+
- id: isort
|
| 20 |
+
args: ["--profile", "black"]
|
| 21 |
+
- repo: https://github.com/kynan/nbstripout
|
| 22 |
+
rev: 0.8.1
|
| 23 |
+
hooks:
|
| 24 |
+
- id: nbstripout
|
.secrets.baseline
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "1.5.0",
|
| 3 |
+
"plugins_used": [
|
| 4 |
+
{
|
| 5 |
+
"name": "ArtifactoryDetector"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"name": "AWSKeyDetector"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"name": "AzureStorageKeyDetector"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"name": "Base64HighEntropyString",
|
| 15 |
+
"limit": 4.5
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"name": "BasicAuthDetector"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"name": "CloudantDetector"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"name": "DiscordBotTokenDetector"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "GitHubTokenDetector"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"name": "GitLabTokenDetector"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"name": "HexHighEntropyString",
|
| 34 |
+
"limit": 3.0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"name": "IbmCloudIamDetector"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"name": "IbmCosHmacDetector"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "IPPublicDetector"
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"name": "JwtTokenDetector"
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"name": "KeywordDetector",
|
| 50 |
+
"keyword_exclude": ""
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"name": "MailchimpDetector"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "NpmDetector"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"name": "OpenAIDetector"
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"name": "PrivateKeyDetector"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"name": "PypiTokenDetector"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"name": "SendGridDetector"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "SlackDetector"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"name": "SoftlayerDetector"
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"name": "SquareOAuthDetector"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"name": "StripeDetector"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"name": "TelegramBotTokenDetector"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"name": "TwilioKeyDetector"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"filters_used": [
|
| 90 |
+
{
|
| 91 |
+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
|
| 95 |
+
"min_level": 2
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"path": "detect_secrets.filters.heuristic.is_lock_file"
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
|
| 123 |
+
}
|
| 124 |
+
],
|
| 125 |
+
"results": {},
|
| 126 |
+
"generated_at": "2025-08-04T13:33:05Z"
|
| 127 |
+
}
|