File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # SPDX-License-Identifier: PMPL-1.0-or-later
1+ # SPDX-License-Identifier: PMPL-1.0
22name : CodeQL Security Analysis
33
44on :
@@ -38,12 +38,12 @@ jobs:
3838 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939
4040 - name : Initialize CodeQL
41- uses : github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
41+ uses : github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4242 with :
4343 languages : ${{ matrix.language }}
4444 build-mode : ${{ matrix.build-mode }}
4545
4646 - name : Perform CodeQL Analysis
47- uses : github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
47+ uses : github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4848 with :
4949 category : " /language:${{ matrix.language }}"
Original file line number Diff line number Diff line change 2727 security-events : write
2828 id-token : write # For OIDC
2929 steps :
30- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
30+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131 with :
3232 persist-credentials : false
3333
3939 publish_results : true
4040
4141 - name : Upload SARIF
42- uses : github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3
42+ uses : github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4
4343 with :
4444 sarif_file : results.sarif
4545
6262 check-critical :
6363 runs-on : ubuntu-latest
6464 steps :
65- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
65+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6666
6767 - name : Check SECURITY.md exists
6868 run : |
Original file line number Diff line number Diff line change 1- # SPDX-License-Identifier: PMPL-1.0-or-later
1+ # SPDX-License-Identifier: PMPL-1.0
22name : OSSF Scorecard
33on :
44 push :
3636 results_format : sarif
3737
3838 - name : Upload results
39- uses : github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.31.8
39+ uses : github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3.31.8
4040 with :
4141 sarif_file : results.sarif
Original file line number Diff line number Diff line change 1- # SPDX-License-Identifier: PMPL-1.0-or-later
1+ # SPDX-License-Identifier: PMPL-1.0
22# Prevention workflow - scans for hardcoded secrets before they reach main
33name : Secret Scanner
44
2929 - name : TruffleHog Secret Scan
3030 uses : trufflesecurity/trufflehog@6c05c4a00b91aa542267d8e32a8254774799d68d # v3
3131 with :
32- extra_args : --only-verified --fail
32+ # The v3 action injects --fail automatically on pull_request events.
33+ # Passing --fail here triggers "flag 'fail' cannot be repeated".
34+ extra_args : --only-verified
3335
3436 gitleaks :
3537 runs-on : ubuntu-latest
@@ -46,12 +48,15 @@ jobs:
4648 # Rust-specific: Check for hardcoded crypto values
4749 rust-secrets :
4850 runs-on : ubuntu-latest
49- if : hashFiles('**/Cargo.toml') != ''
5051 steps :
5152 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
5253
5354 - name : Check for hardcoded secrets in Rust
5455 run : |
56+ if ! find . -name Cargo.toml -not -path './target/*' -print -quit | grep -q .; then
57+ echo 'No Cargo.toml found — skipping Rust secrets check'
58+ exit 0
59+ fi
5560 # Patterns that suggest hardcoded secrets
5661 PATTERNS=(
5762 'const.*SECRET.*=.*"'
You can’t perform that action at this time.
0 commit comments