From bbe09968eb8f717427a678e3e97cbb5624c6e568 Mon Sep 17 00:00:00 2001 From: Pascal Parois <5671193+pascal22p@users.noreply.github.com> Date: Fri, 7 Aug 2026 15:32:04 +0100 Subject: [PATCH] Create trufflehog.yml --- .github/workflows/trufflehog.yml | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/trufflehog.yml diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml new file mode 100644 index 0000000..5caef14 --- /dev/null +++ b/.github/workflows/trufflehog.yml @@ -0,0 +1,57 @@ +name: TruffleHog Secret Scan + +on: + pull_request: + branches: + - main + + push: + branches: + - main + + schedule: + # Every Sunday at 02:00 UTC + - cron: "0 2 * * 0" + +permissions: + contents: read + +jobs: + trufflehog: + name: Scan for Secrets + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + # Required so TruffleHog can inspect git history + fetch-depth: 0 + + # + # Pull Request + # + - name: Scan Pull Request changes + if: github.event_name == 'pull_request' + uses: trufflesecurity/trufflehog@main + with: + base: ${{ github.event.pull_request.base.sha }} + head: ${{ github.event.pull_request.head.sha }} + + # + # Push to main + # + - name: Scan new commits on main + if: github.event_name == 'push' + uses: trufflesecurity/trufflehog@main + with: + base: ${{ github.event.before }} + head: ${{ github.sha }} + + # + # Scheduled full repository scan + # + - name: Full repository scan + if: github.event_name == 'schedule' + uses: trufflesecurity/trufflehog@main +