Sign release assets with SLSA provenance before the first release

Open
#399 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
57/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python
Domain
devops, security

Research direction

Start with .github/workflows/release.yml and config/tests/test_supply_chain.py; compare the two provenance approaches and keep the existing OpenAPI check ahead of signing. Grant signing permissions only to the job that needs them, then document how partners verify the release asset in CONTRIBUTING.md or docs/. Run uv run pytest --no-cov config/tests/test_supply_chain.py; done when a test release includes verifiable provenance or a signature and the documented check rejects a modified asset.

Written by the indexing model from the issue text.

Description

area:infra area:security priority:p2 size:S type:chore

Epic: #397

Problem: Scorecard's Signed-Releases check is -1 today only because there are no releases. .github/workflows/release.yml attaches openapi/openapi.json to each published release with no signature or provenance. The first release cut as things stand drops the check to 0. Partners will build against the released OpenAPI document (#184), so they should be able to verify it came from this repository's workflow and the tagged commit.

Scorecard looks at the last releases' assets for a signature file (*.sig, *.asc, *.minisig, *.sigstore, *.sigstore.json) for 8/10, or a SLSA provenance file (*.intoto.jsonl) on every release for 10/10. It does not verify them.

Approach (pick one, recommendation first):

  1. SLSA provenance with slsa-framework/slsa-github-generator's generic generator (generator_generic_slsa3.yml), fed the SHA-256 of each asset, uploading openapi.intoto.jsonl to the release. Scores 10. The generator must be called by its version tag, not a commit SHA (its verifier checks the tag), so config/tests/test_actions_are_pinned_to_commit_shas needs a narrow, commented exception for that one reusable workflow. Scorecard's Pinned-Dependencies check already exempts it.
  2. actions/attest-build-provenance, then attach the Sigstore bundle as openapi.json.sigstore.json. Scores 8, keeps every action pinned to a SHA, and adds a GitHub attestation that gh attestation verify can check.

Scope:

  • Add the provenance step to release.yml (a separate job is fine). Grant id-token: write (and attestations: write for option 2) only to the job that needs it; keep top-level permissions: read-only
  • Keep the existing export_openapi_schema --check gate before anything is signed
  • Update the supply chain test only as far as the chosen option needs, with a reason in the code
  • Document how a partner verifies the asset (slsa-verifier verify-artifact or gh attestation verify) in CONTRIBUTING.md or docs/, and mention it to partner-docs (#184)
  • Cut the first release only after this lands

Acceptance criteria:

  • A test release (on a fork or a pre-release tag) has the OpenAPI document and its provenance or signature as assets
  • The documented verification command succeeds against that asset and fails on a modified copy
  • uv run pytest --no-cov config/tests/test_supply_chain.py passes
  • After a real release, Scorecard shows Signed-Releases 8 or 10

Out of scope:

  • Publishing or signing the container image (App Platform builds from the repository)
  • SBOM release assets

Related: #184 (partner-docs publishes the OpenAPI document), #104

Size: S

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.