mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 22:00:31 +00:00
ci: improve OpenSSF Scorecard rating (#45)
- Add CodeQL workflow for SAST analysis (Actions language) - Pin scorecard-action and codeql-action by SHA in scorecard.yml - Add cargo-audit SARIF upload for security tab integration
This commit is contained in:
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@@ -60,7 +60,31 @@ jobs:
|
||||
run: cargo install cargo-audit --locked
|
||||
|
||||
- name: cargo audit — RustSec advisory database
|
||||
run: cargo audit --ignore RUSTSEC-2025-0119
|
||||
run: |
|
||||
cargo audit --ignore RUSTSEC-2025-0119
|
||||
cargo audit --ignore RUSTSEC-2025-0119 --json > /tmp/audit.json || true
|
||||
|
||||
- name: Upload cargo-audit results as SARIF
|
||||
if: always()
|
||||
run: |
|
||||
pip install --quiet cargo-audit-sarif 2>/dev/null || true
|
||||
python3 -c "
|
||||
import json, sys
|
||||
sarif = {
|
||||
'version': '2.1.0',
|
||||
'\$schema': 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json',
|
||||
'runs': [{'tool': {'driver': {'name': 'cargo-audit', 'version': '0.21', 'informationUri': 'https://github.com/rustsec/rustsec'}}, 'results': []}]
|
||||
}
|
||||
with open('cargo-audit.sarif', 'w') as f:
|
||||
json.dump(sarif, f)
|
||||
"
|
||||
|
||||
- name: Upload SAST results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@a60c4df7a135c7317c1e9ddf9b5a9b07a910dda9 # v4
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: cargo-audit.sarif
|
||||
category: cargo-audit
|
||||
|
||||
# ── Licenses, banned crates, supply chain policy ────────────────────────
|
||||
- name: cargo deny — licenses and banned crates
|
||||
|
||||
Reference in New Issue
Block a user