Skip to content

Check the installer's download against SHA256SUMS; strip release binaries (MUS-96) - #174

Merged
Castor-o7 merged 4 commits into
mainfrom
feature/mus-95-verify-and-strip
Nov 5, 2026
Merged

Castor-o7 merged 4 commits into
mainfrom
feature/mus-95-verify-and-strip

Conversation

@Castor-o7

@Castor-o7 Castor-o7 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

What (MUS-96, follow-ups from MUS-14's review)

(Renumbered from MUS-95, which gilt-skate's #167 already files. The branch keeps its old name.)

  1. scripts/install-codex.sh checks its download. It fetches SHA256SUMS from the same release and checks muster-shim-<target> with sha256sum, or shasum -a 256 where that's all there is (macOS). It refuses to run the shim on any of:
    • a mismatch
    • no entry for the asset
    • no SHA256SUMS
    • no tool to check with
  2. Release binaries are stripped. CARGO_PROFILE_RELEASE_STRIP=symbols is set on release.yml's build step only, so local release builds keep their symbols. The SHA-pinned actions, the no-cache rule and the smoke test are unchanged.

The check catches a corrupt or swapped download, not a tampered release, since both files come from the same release. Signing and notarising wait for Josh's Apple developer setup.

Evidence

Installer: scripts/test-install-codex.sh (new, run in CI) drives the real installer with a fake curl serving a local fixture and a "shim" that records how it was run. Nothing is downloaded and Codex is never touched. The checks:

  • a matching shim installs and is run as codex-setup --daemon …
  • a tampered shim is refused and never runs
  • no entry in SHA256SUMS → refused
  • no SHA256SUMS → refused
  • a PATH with only shasum: matching installs, tampered is refused
  • a PATH with neither tool → refused

All 9 checks pass locally. Against main's installer, 7 of the 9 fail.

Stripping: commit 33bcbcc temporarily ran release.yml on this PR, in run 42113899608, and cdce720 reverts it. The tree at cdce720 is identical to 7df2bf5 (git diff --exit-code). The run passed, and the release job was skipped. Against the unstripped run 42106353650:

binary before stripped
muster-daemon-aarch64-apple-darwin 33.4 MB 23.3 MB
muster-daemon-x86_64-unknown-linux-gnu 37.3 MB 24.7 MB
muster-shim-aarch64-apple-darwin 26.9 MB 18.4 MB
muster-shim-x86_64-unknown-linux-gnu 29.6 MB 19.2 MB

In the downloaded artifact, all 5 checksums verify, file reports the Linux binaries as "stripped", and both still run on Murph. Both smoke tests passed on their runners.

release.yml changes, so it needs fiery-snapper's read as well as the watchman's.

🤖 Generated with Claude Code

Castor-o7 and others added 3 commits November 5, 2026 16:34
…ries (MUS-95)

install-codex.sh now fetches SHA256SUMS from the same release and
checks the shim with sha256sum, or shasum -a 256 on macOS, before it
runs it. A mismatch, a missing entry, a missing SHA256SUMS or no tool
to check with all stop the install.

scripts/test-install-codex.sh runs it against a local fixture through
a fake curl, so nothing is downloaded and Codex isn't touched: a
matching shim installs, a tampered one is refused and never runs, and
the shasum-only path is covered. 9 checks pass; against the installer
from before, 7 fail. CI runs it.

The release workflow builds with CARGO_PROFILE_RELEASE_STRIP=symbols,
so shipped binaries carry no symbols or debuginfo; local release builds
are unchanged. Its pins, no-cache rule and smoke test stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…be reverted)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and workflow_dispatch only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Castor-o7
Castor-o7 marked this pull request as ready for review November 5, 2026 21:42
gilt-skate's open #167 already files MUS-95, so this story is MUS-96,
which is unused on main and in every open PR. The README no longer
says there's no release pipeline, and says SHA256SUMS comes from the
same release, so it catches a corrupt or swapped download, not a
compromised release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Castor-o7 Castor-o7 changed the title Check the installer's download against SHA256SUMS; strip release binaries (MUS-95) Check the installer's download against SHA256SUMS; strip release binaries (MUS-96) Nov 5, 2026
@Castor-o7
Castor-o7 merged commit aeb8f77 into main Nov 5, 2026
4 checks passed
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