Skip to content

Commit

Permalink
Add gitleaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramblurr committed Feb 24, 2025
1 parent 11e417d commit adcc791
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/lint/gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
title = "gitleaks config"

[extend]
useDefault = true

[[ rules ]]
id = "generic-api-key"
[ rules.allowlist ]
paths = [ 'secrets/.*\.nix', 'secrets/.*\.secrets' ]
regexTarget = "line"
regexes= [
"signing.key =.*",
"signingKey =.*"
]

[allowlist]
description = "ignore sops encrypted secrets"
paths = [
'.*\.sops\.yaml',
]
regexTarget = "line"
regexes= [
'''ExAmPl3PA55W0rD''',
'''.*ENC\[AES256_GCM,data:.*''',
]
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ repos:
- id: remove-crlf
- id: remove-tabs
exclude: (Makefile)

- repo: https://github.com/zricethezav/gitleaks
rev: v8.23.3
hooks:
- id: gitleaks
args:
- --config
- .github/lint/gitleaks.toml

0 comments on commit adcc791

Please sign in to comment.