File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Secrets scanning
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ pull_request :
7
+ workflow_dispatch :
8
+ merge_group :
9
+ types : [checks_requested]
10
+
11
+ jobs :
12
+ test :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - shell : bash
16
+ run : |
17
+ if [ "${{ github.event_name }}" == "push" ]; then
18
+ echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
19
+ echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
20
+ fi
21
+ if [ "${{ github.event_name }}" == "pull_request" ]; then
22
+ echo "depth=$((${{ github.event.pull_request.commits }}+2))" >> $GITHUB_ENV
23
+ echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
24
+ fi
25
+ - uses : actions/checkout@v4
26
+ with :
27
+ ref : ${{env.branch}}
28
+ fetch-depth : ${{env.depth}}
29
+ - name : Secret Scanning
30
+ uses : trufflesecurity/trufflehog@main
31
+ with :
32
+ extra_args : --results=verified,unknown
You can’t perform that action at this time.
0 commit comments