Skip to content
36 changes: 36 additions & 0 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ossf-scorecard

on:
schedule:
- cron: '30 1 * * 1'
push:
branches:
- develop
- main
Comment thread
coderabbitai[bot] marked this conversation as resolved.

permissions: read-all

jobs:
analysis:
name: ossf-scorecard
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ossf-scorecard-results
path: results.sarif
retention-days: 5
- uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
with:
sarif_file: results.sarif
10 changes: 10 additions & 0 deletions scripts/checks/verify_supply_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Path(".github/workflows/release.yml"),
Path(".github/workflows/secret-scan-gate.yml"),
Path(".github/workflows/build-baseline.yml"),
Path(".github/workflows/ossf-scorecard.yml"),
Path("docs/security/dependency-policy.md"),
Path("docs/security/sbom-policy.md"),
Path("docs/security/code-security.md"),
Expand Down Expand Up @@ -156,6 +157,15 @@ def verify_workflow_coverage() -> list[str]:
missing.append(
"build workflow should not rely on macos-latest for architecture coverage"
)
scorecard = read_workflow(
Path(".github/workflows/ossf-scorecard.yml"), "ossf scorecard", missing
)
if scorecard:
missing.extend(
f"ossf scorecard workflow missing token: {token}"
for token in ["develop", "main", "push", "schedule", "ossf-scorecard"]
if token not in scorecard
)
return missing


Expand Down
Loading