From 2af86f5cbfd872c074a58c1e50f7c52c43a944bc Mon Sep 17 00:00:00 2001 From: Matteo Piano Date: Tue, 11 Dec 2018 12:22:06 -0800 Subject: [PATCH] Add detect-secrets hook & baseline --- .pre-commit-config.yaml | 7 +++++++ .secrets.baseline | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .secrets.baseline diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de33db0..f56eb17 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,3 +33,10 @@ args: - --add-import - from __future__ import absolute_import +- repo: https://github.com/Yelp/detect-secrets + sha: 0.9.1 + hooks: + - id: detect-secrets + args: ['--baseline', '.secrets.baseline'] + exclude: .*tests/.*|\.pre-commit-config\.yaml + language_version: python2.7 diff --git a/.secrets.baseline b/.secrets.baseline new file mode 100644 index 0000000..e74fc99 --- /dev/null +++ b/.secrets.baseline @@ -0,0 +1,27 @@ +{ + "exclude_regex": ".*tests/.*|\\.pre-commit-config\\.yaml", + "generated_at": "2018-12-11T20:18:23Z", + "plugins_used": [ + { + "base64_limit": 4.5, + "name": "Base64HighEntropyString" + }, + { + "hex_limit": 3, + "name": "HexHighEntropyString" + }, + { + "name": "PrivateKeyDetector" + } + ], + "results": { + ".travis.yml": [ + { + "hashed_secret": "20bccf6b10adb3faf8ef4552f5ec21b2767501ac", + "line_number": 18, + "type": "Base64 High Entropy String" + } + ] + }, + "version": "0.9.1" +}