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