Skip to content

Attest PyPI release build provenance - #1063

Merged
dralley merged 1 commit into
pulp:mainfrom
dralley:provenance
Nov 20, 2026
Merged

dralley merged 1 commit into
pulp:mainfrom
dralley:provenance

Conversation

@dralley

@dralley dralley commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Add GitHub build provenance attestations for plugin and Python client distributions published to PyPI.

Assisted By: Codex

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@dralley

dralley commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

re: pulp/pulpcore#8299

@dralley

dralley commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

FYI @mdellweg

@dralley

dralley commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

This is SLSA build provenance as opposed to the kind provided by Trusted Publishing

https://docs.pypi.org/using-pypi/package-security/provenance/#attestation-types

Comment on lines +50 to +54
- name: "Attest package build provenance"
uses: "actions/attest-build-provenance@v3"
with:
subject-path: "dist/*"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this producing files in "dist/"? Can we maybe move this to the build workflow to not sign something that we uploaded as an artifact and downloaded on another worker already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had the same thought but I think it ultimately doesn't matter much as long as the artifacts are the same as what is uploaded.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, that is my worry in a nutshell. We don't know nothing can temper artifacts created by one workflow before they are downloaded again.
And adding it this way could be creating a false sense of security.

@dralley dralley Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I mean the same applies with having a publish job separate from the build job in the first place (it also uses the download artifacts action). I don't think singling out the attestation task makes sense.

Also, how far does that logic go, because can we trust GHA in the first place? If we can't trust the upload/download actions, can we trust what is built there at all? Can we trust the attestations they provide? Trusted Publishing? etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Basically what I'm getting at is that the attestation and publish tasks both operate on the same artifacts downloaded by line 45. I don't think it's a concern necessarily, but if it is it's a pre-existing one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's try that.

mdellweg
mdellweg previously approved these changes Nov 20, 2026
Add GitHub build provenance attestations for plugin and Python client
distributions published to PyPI.

Assisted By: Codex
@dralley
dralley merged commit 73a9f2e into pulp:main Nov 20, 2026
13 checks passed
@dralley
dralley deleted the provenance branch November 20, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants