-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (32 loc) · 978 Bytes
/
trufflehog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Trufflehog secrets scan
on:
push:
branches-ignore:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
trufflehog-vulnerability-detection:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Display File Structure
run: |
echo "Displaying file structure..."
find . -type f
- name: Secret Scanning
id: trufflehog_scan
uses: trufflesecurity/[email protected]
with:
path: ./
base: "${{ github.event.repository.default_branch }}"
head: HEAD
extra_args: --debug
- name: Check Trufflehog Result and Fail if Secrets Found
run: |
if [ "${{ steps.trufflehog_scan.outcome }}" == "failure" ]; then
echo "Secrets were found by Trufflehog!"
exit 1 # This will fail the workflow
fi