Skip to content

chore(security): claim SLSA Build L2 and add OpenSSF Scorecard#61

Merged
peczenyj merged 6 commits into
develfrom
chore/supply-chain-l2-scorecard
May 27, 2026
Merged

chore(security): claim SLSA Build L2 and add OpenSSF Scorecard#61
peczenyj merged 6 commits into
develfrom
chore/supply-chain-l2-scorecard

Conversation

@peczenyj
Copy link
Copy Markdown
Owner

Supply-chain posture for the v0.6.1 release.

SLSA Build L2 (label only)

The release workflow already satisfies SLSA Build Level 2: actions/attest-build-provenance generates provenance on a GitHub-hosted runner and signs it via keyless Sigstore (id-token: write), stored in the attestations API. Hosted + signed is precisely the L1→L2 delta, so no pipeline change — only the README badge (SLSA-Build_L1L2) and the release.yml comment were stale. L3 (isolated, non-forgeable builder) is intentionally out of scope.

OpenSSF Scorecard

New .github/workflows/scorecard.yml:

  • Runs on the default branch (devel) + branch_protection_rule + a weekly cron (Sat 01:30 UTC). Scorecard only publishes from the default branch.
  • publish_results: true → score is public and powers the README badge (scorecard.dev viewer).
  • Uploads SARIF to the Security tab (code scanning), security-events: write.
  • Top-level permissions: read-all; the job elevates only security-events/id-token.
  • All actions pinned by commit SHA (checkout v6.0.2, scorecard-action v2.4.3, upload-artifact v7.0.1, codeql-action/upload-sarif v4.35.3), taken from the upstream ossf/scorecard workflow.

README gets the SLSA L2 badge bump plus an OpenSSF Scorecard badge. The badge will populate once this lands on devel and the workflow's first run publishes.

Test plan

  • YAML validated (yaml.safe_load).
  • task ci green (no Go changes).
  • Badge/score visible after the first default-branch run post-merge.

Closes #60

🤖 Generated with Claude Code

peczenyj and others added 6 commits May 27, 2026 17:00
The release already meets SLSA Build L2 — actions/attest-build-provenance
generates provenance on a GitHub-hosted runner and signs it via keyless
Sigstore, which is the hosted+signed delta over L1. Update the README badge
(L1 -> L2) and the release.yml comment to reflect what the pipeline does; no
pipeline change. (L3, the isolated non-forgeable builder, stays out of scope.)

Add a scorecard.yml workflow running OpenSSF Scorecard on the default branch
(devel) plus a weekly cron: it publishes results to the public OpenSSF API
(publish_results: true, powering the README badge / scorecard.dev viewer) and
uploads SARIF to the Security tab. All actions pinned by commit SHA.

Closes #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use ossf/scorecard-action@v2.4.3 verbatim per the marketplace example, rather
than the equivalent commit SHA. Same action and version (the v2.4.3 tag
dereferences to 4eaacf0); the other actions stay SHA-pinned.

Refs #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ce example)"

Keep ossf/scorecard-action pinned by commit SHA (4eaacf0 # v2.4.3), matching
the canonical scorecard.yml in peczenyj/lua-gdpr-iab-tcfv2 and Scorecard's own
Pinned-Dependencies check. All four actions are SHA-pinned again.

Refs #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add the marketplace-recommended job conditional so the analysis (and its
publish_results step) only runs from the default branch or on a pull_request:

  if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'

publish_results only works from the default branch; the guard makes that
explicit and is harmless given the push trigger already targets devel.

Refs #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace scorecard.yml with the official OSSF marketplace starter (its
third-party disclaimer, Branch-Protection / Maintained check links, repo_token
and publish_results notes, default-branch `if` guard) but with verified
current pinned SHAs instead of the template's stale ones:

  actions/checkout                 v4.2.2 -> v6.0.2  (de0fac2)
  ossf/scorecard-action            v2.4.1 -> v2.4.3  (4eaacf0)
  actions/upload-artifact          v4.6.1 -> v7.0.1  (043fb46)
  github/codeql-action/upload-sarif @V3   -> v4.36.0 (f52b05f, now pinned)

Also corrects a wrong codeql SHA from the prior commit (e46ed2c was not
v4.35.3). All SHAs resolved via the GitHub API against each action's latest
release.

Refs #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The README badge and release.yml comment already claim L2; SECURITY.md still
said L1, which would contradict them. Update the "Build provenance" section to
L2 and spell out why it qualifies: the attestation is generated on a
GitHub-hosted runner and keyless-signed via Sigstore (OIDC) — the hosted +
platform-signed properties that distinguish L2 from L1.

Refs #60

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@peczenyj peczenyj merged commit 687cb8f into devel May 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Supply chain: claim SLSA Build L2 and add OpenSSF Scorecard

1 participant