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