Skip to content

Comments

Add attestations for release artifacts and Docker images#23111

Merged
ntBre merged 3 commits intoastral-sh:mainfrom
shaanmajid:artifact-attestations
Feb 16, 2026
Merged

Add attestations for release artifacts and Docker images#23111
ntBre merged 3 commits intoastral-sh:mainfrom
shaanmajid:artifact-attestations

Conversation

@shaanmajid
Copy link
Contributor

@shaanmajid shaanmajid commented Feb 6, 2026

Summary

Adds GitHub artifact attestations (SLSA provenance) for release artifacts and Docker images.

Users will be able to verify artifacts with:

# Release artifacts
gh attestation verify ruff-x86_64-unknown-linux-gnu.tar.gz --repo astral-sh/ruff

# Docker images
gh attestation verify oci://ghcr.io/astral-sh/ruff:latest --repo astral-sh/ruff

Test Plan

Tested end-to-end releases and attestation verification on my fork. (Note, some finagling was necessary to successfully publish without a dedicated depot runner, see a5d9838)

Verify release artifacts:

gh release download 0.15.0 --repo shaanmajid/ruff --pattern "ruff-x86_64-unknown-linux-gnu.tar.gz" --dir /tmp
gh attestation verify /tmp/ruff-x86_64-unknown-linux-gnu.tar.gz --repo shaanmajid/ruff

Verify Docker images:

gh attestation verify oci://ghcr.io/shaanmajid/ruff:0.15.0 --repo shaanmajid/ruff
gh attestation verify oci://ghcr.io/shaanmajid/ruff:alpine --repo shaanmajid/ruff
gh attestation verify oci://ghcr.io/shaanmajid/ruff:debian --repo shaanmajid/ruff

Notes

  • actions/attest-build-provenance was preexisting in dist-workspace.toml but was unused, so the upgrade across major versions is safe

@shaanmajid
Copy link
Contributor Author

If this gets through, I'd be happy to make an analogous change to ty's release workflows, or create verification documentation similar to https://docs.astral.sh/uv/guides/integration/docker/#verifying-image-provenance

@ntBre ntBre requested a review from woodruffw February 6, 2026 13:18
@ntBre ntBre added the release Related to the release process label Feb 6, 2026
@woodruffw
Copy link
Member

Thanks @shaanmajid, I'll be able to give this a review in the coming days.

@shaanmajid
Copy link
Contributor Author

shaanmajid commented Feb 11, 2026

No rush! FWIW, I heavily referenced uv's existing attestation setup when making this change (although uv's Docker build workflow is necessarily considerably more complicated -- this change is quite simple in comparison :D ).

Also, quick heads up that I intentionally omitted the WASM build artifacts from the attestation filter in dist-workspace.toml. After investigating those a bit, I concluded they likely aren't intentionally included in the GitHub releases (see #23127) and I am spinning up a separate PR to remove them. I'll update this PR if anything changes.

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shaanmajid! This LGTM overall, I left a note about how we'll want to skip attestations on non-release runs of the Docker build workflow.

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, meant to mark as needing changes.

@amyreese amyreese changed the title [ruff] Add attestions for release artifacts and Docker images [ruff] Add attestations for release artifacts and Docker images Feb 13, 2026
@shaanmajid shaanmajid requested a review from woodruffw February 14, 2026 05:32
@ntBre ntBre changed the title [ruff] Add attestations for release artifacts and Docker images Add attestations for release artifacts and Docker images Feb 15, 2026
@ntBre
Copy link
Contributor

ntBre commented Feb 16, 2026

Thank you! And thanks William for the review!

@ntBre ntBre merged commit 7bb9f80 into astral-sh:main Feb 16, 2026
47 checks passed
@shaanmajid shaanmajid deleted the artifact-attestations branch February 16, 2026 16:02
@shaanmajid
Copy link
Contributor Author

Thanks to both of y'all for getting this through!

Now that this is merged, would a similar PR adding attestations to ty's release workflows be welcome? Happy to put that together if so :)

@woodruffw
Copy link
Member

Now that this is merged, would a similar PR adding attestations to ty's release workflows be welcome? Happy to put that together if so :)

Yes, thanks! Feel free to ping me on it and I'll own review.

@shaanmajid
Copy link
Contributor Author

Awesome, will do!

carljm added a commit that referenced this pull request Feb 16, 2026
* main: (43 commits)
  [`ruff`] Suppress diagnostic for strings with backslashes in interpolations before Python 3.12 (`RUF027`) (#21069)
  [flake8-bugbear] Fix B023 false positive for immediately-invoked lambdas (#23294)
  [ty] Add `Final` mdtests for loops and redeclaration (#23331)
  [`flake8-pyi`] Also check string annotations (`PYI041`) (#19023)
  Remove AlexWaygood as a flake8-pyi codeowner (#23347)
  [ty] Add comments to clarify the purpose of `NominalInstanceType::class_name` and `NominalInstanceType::class_module_name` (#23339)
  Add attestations for release artifacts and Docker images (#23111)
  [ty] Fix `assert_type` diagnostic messages (#23342)
  [ty] Force-update all insta snapshots (#23343)
  Add Q004 to the list of conflicting rules (#23340)
  [ty] Fix `invalid-match-pattern` false positives (#23338)
  [ty] new diagnostic called-match-pattern-must-be-a-type (#22939)
  [ty] Update flaky projects  (#23337)
  [ty] Increase timeout for ecosystem report to 40 min (#23336)
  Bump ecosystem-analyzer pin  (#23335)
  [ty] Replace `strsim` with CPython-based Levenshtein implementation (#23291)
  [ty] Add mdtest for staticmethod assigned in class body (#23330)
  [ty] fix inferring type variable from string literal argument (#23326)
  [ty] bytes literal is a sequence of integers (#23329)
  Update rand and getrandom (#23333)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Related to the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants