Repository navigation
fix(mac): package portable elevation installer - #123675
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 14, 2026, 10:04 AM ET / 14:04 UTC. ClawSweeper reviewWhat this changesThe PR adds a portable elevation-host installer and checksum sidecar to the macOS artifact set, records them in the receipt, and documents installation without a source checkout. Merge readiness⛔ Blocked by patch quality or review findings - 9 items remain Keep open: the portable installer is executed after only a co-shipped checksum check, so a substituted installer and checksum can pass verification. The prior public-guide finding is addressed, but this new security-boundary blocker must be resolved before merge. Priority: P1 Review scores
Verification
How this fits togetherThe elevation-host packager produces a Foundation-signed, notarized OpenClaw archive for a dedicated macOS launchd job. This change adds a separately executed shell installer to the transferred artifact set that operators use before the signed app is installed. flowchart LR
A[Foundation release checkout] --> B[Elevation-host packager]
B --> C[Notarized app archive]
B --> D[Portable shell installer]
C --> E[Transferred artifact set]
D --> E
E --> F[Checksum commands]
F --> G[Installer execution]
G --> H[launchd elevation host]
Decision needed
Why: The PR changes a Foundation-only signed-app workflow into one that executes a standalone transferred script; source-side blob comparison and co-shipped hashes do not select the target-side trust root. Before merge
Findings
Agent review detailsSecurityNeeds attention: The PR introduces a standalone executable artifact without a receiver-verifiable authenticity binding. PR surfaceTests +10, Docs +13, Other +19. Total +42 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Before shipping a no-checkout installer, authenticate it at the target with a Foundation-verifiable signature or seal it in an already authenticated artifact and require verification before dispatch; there is no net-neutral refactor because the artifact names, hashes, receipt fields, and sidecars are the required new contract. Do we have a high-confidence way to reproduce the issue? Yes, from source: replacing both the installer and its Is this the best way to solve the issue? No. The packager correctly detects a local script that differs from its selected Git commit, but that fact is not independently verifiable on the target Mac after transfer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 97a53a9b35a8. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
6278444 to
d86e712
Compare
|
Addressed the public-guide finding in
|
|
Merged via squash.
|
scripts/mac-elevation-host.sh ships as the portable installer added in #123675, so it is deliberately self-contained and cannot source shared constants. That forces it to duplicate ELEVATION_TEAM_ID and ELEVATION_IDENTITY from scripts/codesign-mac-app.sh, with nothing keeping the two copies in sync. Add a test asserting they agree, so rotation drift fails at build time instead of on a target Mac. Also document why the sign-time and install-time elevation verification functions both exist: verify_elevation_app requires a notarized and stapled bundle, so it cannot replace the sign-time check, and deleting that check would defer every identity failure until after a notarization submission is already spent. No behavior change: no artifact bytes, filenames, modes, receipt fields, signing, notarization, or install paths are touched.
scripts/mac-elevation-host.sh ships as the portable installer added in #123675, so it is deliberately self-contained and cannot source shared constants. That forces it to duplicate ELEVATION_TEAM_ID and ELEVATION_IDENTITY from scripts/codesign-mac-app.sh, with nothing keeping the two copies in sync. Add a test asserting they agree, so rotation drift fails at build time instead of on a target Mac. Also document why the sign-time and install-time elevation verification functions both exist: verify_elevation_app requires a notarized and stapled bundle, so it cannot replace the sign-time check, and deleting that check would defer every identity failure until after a notarization submission is already spent. No behavior change: no artifact bytes, filenames, modes, receipt fields, signing, notarization, or install paths are touched.
* fix(mac): package portable elevation installer * docs(mac): explain portable elevation install
…w#123764) scripts/mac-elevation-host.sh ships as the portable installer added in openclaw#123675, so it is deliberately self-contained and cannot source shared constants. That forces it to duplicate ELEVATION_TEAM_ID and ELEVATION_IDENTITY from scripts/codesign-mac-app.sh, with nothing keeping the two copies in sync. Add a test asserting they agree, so rotation drift fails at build time instead of on a target Mac. Also document why the sign-time and install-time elevation verification functions both exist: verify_elevation_app requires a notarized and stapled bundle, so it cannot replace the sign-time check, and deleting that check would defer every identity failure until after a notarization submission is already spent. No behavior change: no artifact bytes, filenames, modes, receipt fields, signing, notarization, or install paths are touched.
Summary
Root cause
The canonical package contained the notarized app archive, receipt, and archive checksum, but the lifecycle installer remained only in the source checkout. A target Mac without that checkout could receive valid app bytes yet could not perform the documented transactional install, status, recovery, or uninstall workflow.
The packaging command now copies its self-contained lifecycle script from the exact selected commit, makes it executable, verifies its content against the committed Git blob, and publishes it beside the app archive. Signing, notarization, app contents, launchd ownership, TCC behavior, and the ZIP's single-app root contract are unchanged.
Proof
uninstallfrom an isolated directory with no source checkoutRelease note
Elevation-host packages now carry a checksum-pinned portable installer, so a target Mac can verify and install the immutable artifact set without cloning OpenClaw.