Skip to content

Add build provenance attestation to the release workflow - #128

Merged
asgrim merged 1 commit into
php:mainfrom
TimWolla:release-action-build-provenance
Nov 25, 2024
Merged

Add build provenance attestation to the release workflow#128
asgrim merged 1 commit into
php:mainfrom
TimWolla:release-action-build-provenance

Conversation

@TimWolla

Copy link
Copy Markdown
Member

This PR builds upon #127 and includes that one as a subset. I will rebase it after #127 is merged.


This attestation proves that a given pie.phar was created by the release.yml workflow running for a specific commit.

Verification is possible using the gh CLI as follows:

gh attestation verify --owner php pie.phar

For the test in my fork, the output looked like this:

$ gh attestation verify --owner TimWolla pie.phar
Loaded digest sha256:0dc7f9c88341fc1beac5746658e4a859a1abe8b3f6a62aa9f10c9ec39ff42b53 for file://pie.phar
Loaded 2 attestations from GitHub API
✓ Verification succeeded!
sha256:0dc7f9c88341fc1beac5746658e4a859a1abe8b3f6a62aa9f10c9ec39ff42b53 was attested by:
REPO PREDICATE_TYPE WORKFLOW
TimWolla/php-pie https://slsa.dev/provenance/v1 .github/workflows/release.yml@refs/tags/release-action-build-provenance-1
TimWolla/php-pie https://slsa.dev/provenance/v1 .github/workflows/release.yml@refs/heads/release-action-build-provenance

@asgrimasgrim self-assigned this Nov 25, 2024
@asgrimasgrim added the enhancement New feature or request label Nov 25, 2024
Comment thread.github/workflows/release.yml
This attestation proves that a given pie.phar was created by the release.yml
workflow running for a specific commit.
Verification is possible using the `gh` CLI as follows:
gh attestation verify --owner php pie.phar
For the test in my fork, the output looked like this:
$ gh attestation verify --owner TimWolla pie.phar
Loaded digest sha256:0dc7f9c88341fc1beac5746658e4a859a1abe8b3f6a62aa9f10c9ec39ff42b53 for file://pie.phar
Loaded 2 attestations from GitHub API
✓ Verification succeeded!
sha256:0dc7f9c88341fc1beac5746658e4a859a1abe8b3f6a62aa9f10c9ec39ff42b53 was attested by:
REPO PREDICATE_TYPE WORKFLOW
TimWolla/php-pie https://slsa.dev/provenance/v1 .github/workflows/release.yml@refs/tags/release-action-build-provenance-1
TimWolla/php-pie https://slsa.dev/provenance/v1 .github/workflows/release.yml@refs/heads/release-action-build-provenance
@TimWolla
TimWollaforce-pushed the release-action-build-provenance branch from abac1b8 to ec456ffCompareNovember 25, 2024 09:16
@TimWolla

Copy link
Copy Markdown
MemberAuthor

Rebased now.

@TimWolla

Copy link
Copy Markdown
MemberAuthor

Test failure is unrelated. Might be necessary to implicitly pass $GITHUB_TOKEN to PIE for API authentication?

@TimWolla
TimWolla marked this pull request as ready for review November 25, 2024 09:31
@asgrimasgrim mentioned this pull request Nov 25, 2024

@asgrimasgrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @TimWolla !

@asgrimasgrim added this to the 0.3.0 milestone Nov 25, 2024
@asgrim
asgrim merged commit 33f911a into php:mainNov 25, 2024
@TimWolla
TimWolla deleted the release-action-build-provenance branch November 25, 2024 10:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TimWolla@asgrim