Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-License-Identifier: PMPL-1.0
name: CodeQL Security Analysis

on:
Expand All @@ -9,6 +9,14 @@ on:
schedule:
- cron: '0 6 * * 1'

# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
# updates do not pile up queued runs against the shared account-wide
# Actions concurrency pool. Applied only to read-only check workflows
# (no publish/mutation), so cancelling a superseded run is always safe.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -30,17 +38,12 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Initialize CodeQL
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.28.1
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.28.1
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
with:
category: "/language:${{ matrix.language }}"

- name: K9-SVC Validation
run: |
echo "K9-SVC validation"
[ -d .machine_readable/contractiles ] && echo "Contractiles present" || echo "No contractiles"
2 changes: 1 addition & 1 deletion .github/workflows/scorecard-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
publish_results: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4
with:
sarif_file: results.sarif

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-License-Identifier: PMPL-1.0
name: OSSF Scorecard
on:
push:
Expand Down Expand Up @@ -36,6 +36,6 @@ jobs:
results_format: sarif

- name: Upload results
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.31.8
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3.31.8
with:
sarif_file: results.sarif
13 changes: 9 additions & 4 deletions .github/workflows/secret-scanner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-License-Identifier: PMPL-1.0
# Prevention workflow - scans for hardcoded secrets before they reach main
name: Secret Scanner

Expand Down Expand Up @@ -27,9 +27,11 @@ jobs:
fetch-depth: 0 # Full history for scanning

- name: TruffleHog Secret Scan
uses: trufflesecurity/trufflehog@6c64db94d5b2e09d7e0948fb6bd3166cc6fffbc7 # v3
uses: trufflesecurity/trufflehog@6c05c4a00b91aa542267d8e32a8254774799d68d # v3
with:
extra_args: --only-verified --fail
# The v3 action injects --fail automatically on pull_request events.
# Passing --fail here triggers "flag 'fail' cannot be repeated".
extra_args: --only-verified

gitleaks:
runs-on: ubuntu-latest
Expand All @@ -46,12 +48,15 @@ jobs:
# Rust-specific: Check for hardcoded crypto values
rust-secrets:
runs-on: ubuntu-latest
if: hashFiles('**/Cargo.toml') != ''
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4

- name: Check for hardcoded secrets in Rust
run: |
if ! find . -name Cargo.toml -not -path './target/*' -print -quit | grep -q .; then
echo 'No Cargo.toml found — skipping Rust secrets check'
exit 0
fi
# Patterns that suggest hardcoded secrets
PATTERNS=(
'const.*SECRET.*=.*"'
Expand Down
Loading