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: MPL-2.0
22# Prevention workflow - scans for hardcoded secrets before they reach main
33name : Secret Scanner
44
@@ -14,22 +14,36 @@ jobs:
1414 trufflehog :
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
17+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818 with :
19- fetch-depth : 0
19+ fetch-depth : 0 # Full history for scanning
2020
2121 - name : TruffleHog Secret Scan
22- uses : trufflesecurity/trufflehog@7ee2e0fdffec27d19ccbb8fb3dcf8a83b9d7f9e8 # main
22+ uses : trufflesecurity/trufflehog@6961f2bace57ab32b23b3ba40f8f420f6bc7e004 # v3
2323 with :
2424 extra_args : --only-verified --fail
2525
26+ gitleaks :
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+ with :
31+ fetch-depth : 0
32+
33+ - name : Gitleaks Secret Scan
34+ uses : gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+
38+ # Rust-specific: Check for hardcoded crypto values
2639 rust-secrets :
2740 runs-on : ubuntu-latest
2841 steps :
29- - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
42+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3043
3144 - name : Check for hardcoded secrets in Rust
3245 run : |
46+ # Patterns that suggest hardcoded secrets
3347 PATTERNS=(
3448 'const.*SECRET.*=.*"'
3549 'const.*KEY.*=.*"[a-zA-Z0-9]{16,}"'
You can’t perform that action at this time.
0 commit comments