diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 52b7b35..c58911a 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -58,12 +58,29 @@ jobs: with: fetch-depth: 0 - - name: 🔍 TruffleHog Secret Scan + - name: 🔍 TruffleHog Secret Scan (PR) + if: github.event_name == 'pull_request' + uses: trufflesecurity/trufflehog@main + with: + path: ./ + base: ${{ github.event.pull_request.base.sha }} + head: ${{ github.event.pull_request.head.sha }} + extra_args: --debug --only-verified + + - name: 🔍 TruffleHog Secret Scan (Push) + if: github.event_name == 'push' + uses: trufflesecurity/trufflehog@main + with: + path: ./ + base: ${{ github.event.before }} + head: ${{ github.sha }} + extra_args: --debug --only-verified + + - name: 🔍 TruffleHog Secret Scan (Scheduled/Full Scan) + if: github.event_name == 'schedule' uses: trufflesecurity/trufflehog@main with: path: ./ - base: ${{ github.event.repository.default_branch }} - head: HEAD extra_args: --debug --only-verified file-check: