Skip to content

Attest build provenance of the PHAR and the turbo extension binaries - #6893

Open
ondrejmirtes wants to merge 1 commit into
2.3.xfrom
attest-build-provenance
Open

ondrejmirtes wants to merge 1 commit into
2.3.xfrom
attest-build-provenance

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Adds Sigstore-signed SLSA build provenance attestations (actions/attest v4.2.2, pinned) for everything this workflow publishes:

  • commit job: the binaries the commit to phpstan/phpstan adds or changes — phpstan.phar, the shared cores and the thin extensions. Unchanged binaries already in the dist are left out, since this run did not produce them; reused cores are covered because the attestation is made over the exact staged bytes.
  • turbo-pie-release job (tags only): the PIE release zips for phpstan/turbo-ext, plus the self-contained .so/.dll inside each, so an extension PIE already installed can be verified too.

Both steps run before the commit or the release publish, so nothing unattested ships. Both jobs get id-token: write and attestations: write.

Verification for users:

gh attestation verify phpstan.phar --repo phpstan/phpstan-src

The GPG .asc signature is unchanged.

Not exercised end to end: attestations are only issued on push and tag runs. actionlint (with shellcheck) is clean, and I tested the subject selection against a mock dist checkout (new phar, changed and new binaries included; unchanged core, deleted binary, .version, .asc, .phar-checksum excluded; empty selection skips the step).

Sigstore-signed SLSA build provenance, verifiable with
gh attestation verify <file> --repo phpstan/phpstan-src, for the binaries
the commit job stages into phpstan/phpstan (phpstan.phar, the shared cores
and the thin extensions) and for the PIE release assets of
phpstan/turbo-ext together with the self-contained binaries inside them.

Amp-Thread-ID: https://ampcode.com/threads/T-01a19179-978b-758a-8f1a-7603ee1121c2
echo "paths<<SUBJECTS"
printf '%s\n' "$SUBJECTS"
echo "SUBJECTS"
} >> "$GITHUB_OUTPUT"
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