From 9b551ef0ba8c9d49205d2d3db1624f672e1e9de9 Mon Sep 17 00:00:00 2001 From: Nacho Rivera Date: Thu, 4 May 2023 15:33:11 +0200 Subject: [PATCH] feat(pre-commit): added trufflehog to pre-commit (#2311) --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ae06a3a..347481a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -75,6 +75,15 @@ repos: entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn prowler/' language: system + - id: trufflehog + name: TruffleHog + description: Detect secrets in your data. + # entry: bash -c 'trufflehog git file://. --only-verified --fail' + # For running trufflehog in docker, use the following entry instead: + entry: bash -c 'docker run -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --only-verified --fail' + language: system + stages: ["commit", "push"] + - id: pytest-check name: pytest-check entry: bash -c 'pytest tests -n auto'