-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (34 loc) · 1.02 KB
/
secret-scanning.yml
File metadata and controls
38 lines (34 loc) · 1.02 KB
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
name: Secret Scanning
on:
push:
branches: [ main ]
paths-ignore:
- 'screenshots/**'
- '**.md'
pull_request:
branches: [ main ]
jobs:
trufflehog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set base and head
id: set_vars
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "base=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
echo "head=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
else
echo "base=${{ github.event.before }}" >> $GITHUB_OUTPUT
echo "head=${{ github.event.after }}" >> $GITHUB_OUTPUT
fi
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ steps.set_vars.outputs.base }}
head: ${{ steps.set_vars.outputs.head }}
extra_args: --debug --only-verified