Skip to content

Commit fbcf5b0

Browse files
committed
test(pre-commit): add gitleaks for files.
1 parent 8fa11f2 commit fbcf5b0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.pre-commit-config.yaml

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
language: system
99
files: \.nix$
1010
- id: shfmt
11-
name: Sh (Shell formatter)
11+
name: Sh (shell formatter)
1212
description: This hook checks shell files with Stylua.
1313
entry: bash -c 'for arg in "$@"; do nix shell nixpkgs#shfmt --command shfmt -w $arg; done;' --
1414
language: system
@@ -19,9 +19,15 @@ repos:
1919
entry: bash -c 'for arg in "$@"; do nix shell nixpkgs#stylua --command stylua $arg; done;' --
2020
language: system
2121
files: \.lua$
22-
- id: gitleaks
23-
name: Gitleaks (Secret scanner)
24-
description: This hook checks the existence of secrets.
22+
- id: gitleaks-git
23+
name: Gitleaks Git (secret scanner)
24+
description: This hook checks the existence of secrets in Git.
2525
entry: bash -c 'nix shell nixpkgs#gitleaks --command gitleaks git --pre-commit --redact --staged --no-banner --verbose 2> /dev/null'
2626
language: system
2727
pass_filenames: false
28+
- id: gitleaks-dir
29+
name: Gitleaks Dir (secret scanner)
30+
description: This hook checks the existence of secrets in a directory.
31+
entry: bash -c 'nix shell nixpkgs#gitleaks --command gitleaks dir --redact --no-banner --verbose 2> /dev/null'
32+
language: system
33+
pass_filenames: false

0 commit comments

Comments
 (0)