Skip to content

feat: sign GitHub Release files with Sigstore - #478

Merged
gtauzin merged 1 commit into
mainfrom
feat/sign-release-artifacts
Oct 19, 2026
Merged

gtauzin merged 1 commit into
mainfrom
feat/sign-release-artifacts

Conversation

@gtauzin

@gtauzin gtauzin commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Description

create-release in the generated publish-release.yml now signs each distribution and the SBOM with Sigstore (keyless, uvx sigstore==4.5.0 sign) and uploads the <file>.sigstore.json bundles to the GitHub Release next to the files they sign.

  • id-token: write is granted to create-release only, not to build, which runs the project's own build hooks.
  • Both upload paths (fresh release and dispatch retry) take dist/* sbom/*, so the bundles go up with the files.
  • The sigstore pin carries a # renovate: annotation, so Renovate keeps it current.
  • The generated security page explains how to verify a downloaded file.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Motivation and Context

PyPI attestations cover the PyPI copy only. Files downloaded from a GitHub Release had nothing to verify against, so Scorecard's Signed-Releases check scores 0 on every generated repo and shows up as a code-scanning alert. Scorecard v5.6.0 counts .sigstore.json assets as signatures. The score rises as new releases are published, because Scorecard looks at the last five.

How Has This Been Tested?

  • Tested locally with uv run pytest
  • Tested template generation with copier copy . /tmp/test-project
  • Verified generated project works as expected
  • Added/updated tests
  • All tests pass

The new test test_release_files_are_signed_with_sigstore checks the job permissions, the sign step and both upload paths. 482 fast tests pass. I checked the sigstore sign / verify github CLI flags against 4.5.0. The real signing can only run in Actions, so the next release of any generated repo is the end-to-end check.

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • My changes generate no new warnings
  • I have checked that my changes don't break the template generation

Additional Notes

The seven generated repos get the same change through their own PRs, applied as the rendered diff so that the next copier update has nothing left to change.

PyPI attestations cover the PyPI copy only, so files downloaded from a
GitHub Release had nothing to verify against and Scorecard's
Signed-Releases check scored 0 on every generated repo. create-release
now signs each distribution and the SBOM keylessly and uploads the
.sigstore.json bundles next to them.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gtauzin
gtauzin merged commit ac33afc into main Oct 19, 2026
22 checks passed
@gtauzin
gtauzin deleted the feat/sign-release-artifacts branch October 19, 2026 17:08
gtauzin added a commit to stateful-y/kedro-azureml-pipeline that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/yohou that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/yohou-nixtla that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/yohou-mlflow that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/sklearn-optuna that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/yohou-optuna that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/sklearn-wrap that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
gtauzin added a commit to stateful-y/kedro-dagster that referenced this pull request Oct 19, 2026
Signs GitHub Release files with Sigstore (stateful-y/python-package-copier#478).
Action pins stay at the digests Renovate maintains here; the template's
tag seeds are not taken.
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.

2 participants