Skip to content

Commit

Permalink
Add secrets detection capability with pre-commit hook configuration"
Browse files Browse the repository at this point in the history
Signed-off-by: Tucker Troyer <[email protected]>
  • Loading branch information
DevTroyer committed Feb 23, 2021
1 parent 99c8952 commit 95e6356
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is an example configuration to enable whitewater-detect-secrets in the pre-commit hook.
# Add this file to the root folder of your repository.
#
# Read pre-commit hook framework https://pre-commit.com/ for more details about the structure of config yaml file and how git pre-commit would invoke each hook.
#
# This line indicates we will use the hook from Whitewater/whitewater-detect-secrets to run scan during commiting phase.
- repo: [email protected]:Whitewater/whitewater-detect-secrets
# If you desire to use a specific version of whitewater-detect-secrets, you can replace `master` with other git revisions such as branch, tag or commit sha.
rev: 0.13.1+ibm.29.dss
hooks:
- id: detect-secrets # pragma: whitelist secret
# Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options.
# You may also run `pre-commit run detect-secrets` to preview the scan result.
#
# The `--no-keyword-scan` field can be removed if you are using 0.10.3-ibm.1. It was added prior to 0.10.3-ibm.1 to reduce false positives generated from old keyword scanner.
# After 0.10.3-ibm.1, keyword scanner is disabled by default.
args: [--baseline, .secrets.baseline, --no-keyword-scan, --no-base64-string-scan ]
64 changes: 64 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"exclude": {
"files": null,
"lines": null
},
"generated_at": "2021-02-23T04:18:46Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
},
{
"name": "ArtifactoryDetector"
},
{
"name": "BasicAuthDetector"
},
{
"name": "BoxDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "GheDetector"
},
{
"hex_limit": 3,
"name": "HexHighEntropyString"
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "MailchimpDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"results": {},
"version": "0.13.1+ibm.29.dss",
"word_list": {
"file": null,
"hash": null
}
}

0 comments on commit 95e6356

Please sign in to comment.