ci(release): sign Android helpers in a job that runs only workflow-commit code
Merged
TH
4h ago+553+553+012345678901234567890123456789-136-136-012345678901234567890123456789
Summary
Stacked on #5409. Planned-source code no longer runs in a job that holds the Android helper keystore.
- compile (planned source, no secret): builds unsigned helpers.
- sign (
releaseenvironment; disposable key in dry runs): a sparse checkout ofworkflow_shawith no install and no cache. It fetches the compiler artifact packed, through the REST API by ID, and checks that it comes from this run.actions/download-artifactextracts without a containment check, so it is not used here.scripts/sign-android-helpers.shunpacks only the exact expected APK names, as regular files, into a fresh directory. It checks ZIP structure and identity, signs, verifies v1+v2 and a single signer, and pins the release cert734335…39e1. - build/package (planned source, no secret): packages the signed APKs after checking the cert and identity. This consumer is identical on
mainand0.22.
release-android-snapshot-helper.yml and the rehearsal use the same signer. Helper artifacts are kept for 30 days to cover approvals and reruns.
Validation
- Local signer runs: the disposable key, a keystore, and matching and wrong pins. Archives with an extra entry,
../paths and a symlink entry are all rejected. The packaged bytes match the signed bytes. - The release workflow and release asset tests pass (68).
- CI runs a dry run of the split.
- Production proof: the first nightly has no approval prompt and helper cert
734335…39e1.