Skip to content

Commit c2e4200

Browse files
authored
Merge pull request #798 from OpenSPP/ken/improve_code-analysis
[chore] Improve code-analysis execution
2 parents b6f0d9d + 992f2b2 commit c2e4200

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/code-analysis.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,17 @@ jobs:
6969
uses: github/codeql-action/analyze@v3
7070

7171
- name: TruffleHog OSS
72-
if: env.BRANCH_NAME != github.event.repository.default_branch
72+
if: github.event_name == 'pull_request'
7373
uses: trufflesecurity/trufflehog@main
7474
with:
7575
path: ./
76-
base: ${{ github.event.repository.default_branch }}
77-
head: HEAD
76+
base: ${{ github.event.pull_request.base.sha }}
77+
head: ${{ github.event.pull_request.head.sha }}
7878
extra_args: --debug --only-verified
79+
80+
- name: TruffleHog OSS (on push to 17.0)
81+
if: github.event_name == 'push' && github.ref == 'refs/heads/17.0'
82+
uses: trufflesecurity/trufflehog@main
83+
with:
84+
path: ./
85+
extra_args: --debug --only-verified # Scanning the entire repo

0 commit comments

Comments
 (0)