Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Secrets

on:
pull_request:

permissions:
contents: read

jobs:
trufflehog:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Trufflehog exclusions
run: |
if [ ! -f .trufflehog-exclude.txt ]; then
echo "# Paths to exclude from TruffleHog scanning" > .trufflehog-exclude.txt
echo "node_modules/" >> .trufflehog-exclude.txt
echo "vendor/" >> .trufflehog-exclude.txt
echo "dist/" >> .trufflehog-exclude.txt
echo "build/" >> .trufflehog-exclude.txt
fi

- name: Run Trufflehog on latest commits
id: trufflehog
uses: trufflesecurity/trufflehog@main
continue-on-error: true
with:
path: ./
extra_args: --results=verified,unknown --exclude-paths .trufflehog-exclude.txt

- name: Trufflehog Scan Failure
if: steps.trufflehog.outcome == 'failure'
run: exit 1