Skip to content

Commit

Permalink
Replace detect-secrets with gitleaks
Browse files Browse the repository at this point in the history
In a future commit, I’m going to add something to
.pre-commit-config.yaml that looks like this:

    repo: https://github.com/Jayman2000/yamllint-pr
    rev: 8cedbee40606fcf9f9bd202206692e26dff854b7

detect-secrets was incorrectly detecting that hash as a secret, so I
tried allowlisting it [1]:

    repo: https://github.com/Jayman2000/yamllint-pr
    # pragma: allowlist nextline secret
    rev: 8cedbee40606fcf9f9bd202206692e26dff854b7

That should have worked, but it didn’t. At the moment, there are two
open issue about this problem [2][3].

I don’t have any particular preference for detect-secrets over any other
secret-detecting tool. I only chose it because it was the first
general-purpose secret-detecting tool on pre-commit’s list of supported
hooks [4]. I chose it as an experiment to see if I would like using it,
and it turns out that like I don’t like using it.

[1]: <https://github.com/Yelp/detect-secrets#inline-allowlisting>
[2]: <Yelp/detect-secrets#435>
[3]: <Yelp/detect-secrets#708>
[4]: <https://pre-commit.com/hooks.html>
  • Loading branch information
Jayman2000 committed Jan 6, 2024
1 parent 32710b0 commit dd11648
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ repos:
id: text-unicode-replacement-char
exclude: *default_excludes
-
repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
repo: https://github.com/zricethezav/gitleaks
rev: v8.18.1
hooks:
-
id: detect-secrets
id: gitleaks
exclude: *default_excludes
-
# editorconfig-checker-disable
Expand Down

0 comments on commit dd11648

Please sign in to comment.