Skip to content

ci: check the attestation of FrankenPHP before the binary first runs - #5

Merged
sorge-it merged 1 commit into
mainfrom
ci/attest-on-host
Nov 21, 2026
Merged

sorge-it merged 1 commit into
mainfrom
ci/attest-on-host

Conversation

@sorge-it

Copy link
Copy Markdown
Owner

What

  • composer frankenphp:install checks the attestation of a downloaded binary before it runs the
    binary for its versions.
  • The Debian and Alpine jobs install FrankenPHP on the runner, which has gh, instead of in the
    container, which has none. The step fails unless .frankenphp/ATTESTED exists. The container
    finds VERSION and ATTESTED and runs no install of its own.

Why

The second neutral rating of 1.0.0 named it: in the Docker jobs the binary ran unchecked, and
linux-arm64, which runs only in Docker, never got a check. A first version of this PR checked the
binary on the runner after the install in the container; its review found that the install had
already run the binary once, for its versions.

Tests

Run locally, as the steps of the jobs run:

Where Result
macOS, with gh "gh verified the attestation of frankenphp-mac-arm64", then the versions
Alpine arm64, without gh "the attestation is not checked", then the versions
gh attestation verify of the linux-arm64 and linux-amd64 binaries passes; a changed byte fails it, exit 4

zizmor and actionlint: no findings. composer test in Docker on Debian (PHP 8.4) and Alpine (PHP
8.5, locked and newest), on arm64 and amd64: 6 of 6 green.

The CI run of this PR shows the first install on ubuntu-24.04-arm: its log must read "gh verified
the attestation of frankenphp-linux-aarch64".

The Docker images have no gh, so the binary of the Debian and Alpine
jobs ran unchecked, and linux-arm64 never got a check. These jobs now
install it on the runner. The installer checks the attestation before
it runs the binary for its versions.
@sorge-it
sorge-it marked this pull request as ready for review November 21, 2026 16:38
@sorge-it
sorge-it merged commit 5a07be9 into main Nov 21, 2026
12 of 13 checks passed
@sorge-it
sorge-it deleted the ci/attest-on-host branch November 21, 2026 16:38
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.

1 participant