Repository navigation
fix(release): bind the Windows signing record to the published asset's digest - #8847
Conversation
…s digest The signing-outcome upload continues on error and overwrite was its only invalidation, so a re-run whose upload failed could leave an earlier attempt's signed: true in the run, and the release notes then claimed "signed" for an asset rebuilt unsigned. The record (schema ocx.windows-signing-outcome/2) now carries the packaged zip's or MSI's sha256 and GITHUB_RUN_ATTEMPT, written after packaging. The footer reports "signed" only when that digest equals the verified release receipt's digest for the version's Windows asset; otherwise "not recorded". Review thread: PRRT_kwDOS-0Gi863ysk- (#8780).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…d cover swapped records The Turkish code-signing reference still carried the #8780 wording; it now says a Windows file reads as signed only when the recorded SHA-256 matches the published file, and that a file without such a record is listed as not recorded. The signing-outcome tests used one digest for both kinds, so a reader that matched a record against any published digest, or the other kind's, still passed. A new case publishes distinct zip and MSI digests with the records swapped and requires both files to read as not recorded, with a paired control that reads as signed.
|
@codex review |
|
@coderabbitai review |
Action not completed
|
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes the stale signing claim CodeRabbit raised on the merged #8780 (review thread
PRRT_kwDOS-0Gi863ysk-).Problem. Each Windows release leg uploads a signing-outcome record with
continue-on-error: true, andoverwrite: truewas the only thing that retired an older record. The record held only{schema, kind, signed}, and the publish job trusted whatever it downloaded. So if attempt 1 signed and uploadedsigned: true, and a re-run rebuilt the files without signing but failed to upload its record, attempt 1's record survived. The release notes then said "signed" for an unsigned asset.Change.
scripts/ci/windows-signing-outcome.shtakes the packaged file as a third argument. It writes schemaocx.windows-signing-outcome/2withsha256(that file's digest) andattempt(GITHUB_RUN_ATTEMPT). With no hashable file, the record hassha256: nulland never records signed..github/workflows/release.yml: the record and upload steps now run after the file the leg publishes exists. That is afterArchive standalone releaseforocx-<version>-bun-windows-x64.zipand afterRename release assetsforOpenCodex-<version>-windows-x64.msi. Each step passes that path in aPACKAGED_FILEenv value. The publish job passes the verified release receipt it already downloads (verification/receipt.json, the per-asset digestsattach-releaseholds the release to) as--release-receipt.scripts/release-signing-footer.tsreports a file as signed or unsigned only when the record'ssha256equals the receipt's digest for that version's Windows asset. A mismatched, unbound, earlier-schema or other-version record reads as "signing outcome not recorded; treat it as not code-signed", and so does a missing receipt.Before: a stale
signed: truefrom attempt 1 plus a failed upload in attempt 2 gave "ocx.exeand the MSI installer … are Authenticode-signed". After: the digests differ, so the notes say "The Windows files in this release are not code-signed. The release run recorded no signing outcome for them." If only one file mismatches, the notes list that file as "signing outcome not recorded".Security review required. This changes release automation (
.github/workflows/release.yml, the release-notes signing statement). Under MAINTAINERS.md it needs an independent release-security review before merge.Docs:
structure/ops/windows-code-signing.md, and the English and Spanishreference/code-signing.mdpages now say that a record counts only when its digest matches the published file. The Turkish page has no paragraph on the release-body statement, so nothing there contradicts this.Verification
origin/dev(950b7d9): the extendedtests/ci-workflows/release-windows-signing-outcome.test.tsfails to load becausereadPublishedWindowsDigestsis missing. With only that export shimmed onto origin/dev's footer, script and workflow, it runs at 8 pass / 10 fail. The failures includea stale signed record from an earlier attempt never vouches for a re-run's assets(the old reader reportssignedfor the stale record) anda record whose digest differs from the published asset reads as not recorded for that file.bun test tests/ci-workflows/release-windows-signing-outcome.test.ts: 18 pass / 0 fail.release.yml(ci-scope-gaps,ci-workflows,install-scripts,keyring-smoke,release-desktop-scripts,release-helper,release-notes,release-outcome-report,release-pipeline-contract,release-preflight,release-resume-identity,release-version-sources,release-windows-signing-outcome,release-windows-signing): 486 pass / 0 fail.build-release-changelog,docs-link-targets,docs-spanish-localization,file-size-ratchet,repo-hygiene: 101 pass / 0 fail.bun run typecheck,bun run structure:check,bun run privacy:scan: pass.shellcheck scripts/ci/windows-signing-outcome.shandactionlint .github/workflows/release.yml: clean./usr/bin/lockf -k /tmp/ocx-test.lock. The full suite was not run locally; this lane is limited to focused files, so the rest is left toci:full.sha256sum -bon the runner, the artifact re-run path). That needs a release dispatch, which is out of scope here.Checklist
Summary by CodeRabbit