Skip to content

fix(mac): package portable elevation installer - #123675

Merged
steipete merged 2 commits into
mainfrom
codex/elevation-host-portable-installer
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/elevation-host-portable-installer

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • include a source-addressed portable elevation-host installer in every immutable artifact set
  • emit independent archive and installer checksum files and bind their names and hashes in the receipt
  • reject packaging if the copied installer differs from the selected Git commit
  • document checksum verification and installation on a Mac without a source checkout

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

Release 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.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 14, 2026, 10:04 AM ET / 14:04 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: d86e712eeba3e64ef9b03e34abdbcb11758e1a39
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The portable artifact idea is well-scoped, but the missing target-side authenticity boundary is a merge-blocking security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-labelled PR, so the external-contributor proof gate does not apply; its stated Testbox validation remains supplemental to the security repair.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-labelled PR, so the external-contributor proof gate does not apply; its stated Testbox validation remains supplemental to the security repair.
Evidence reviewed 8 items Unauthenticated installer checksum: The new installer checksum file is generated beside the executable and the installer is then published; a receiver has no independent signer or immutable manifest to distinguish a substituted installer-plus-checksum pair.
Receiver executes the checked sidecar: The public instructions verify the sidecar checksum and immediately execute the standalone script, so the packaging-time Git blob comparison is not re-established at the target boundary.
Existing signed-app boundary: The installer validates the archive only after it starts; the app’s notarization and code-signature checks do not authenticate the standalone script that launched the workflow.
Findings 1 actionable finding [P1] Authenticate the portable installer before executing it
Security Needs attention Co-shipped checksum does not authenticate installer: An attacker able to alter the transferred artifact set can alter both the script and its checksum, passing verification before the script performs lifecycle operations.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Which independently verifiable authenticity boundary should authorize the portable installer before a target Mac executes it? Authenticate the installer at the target: Add a Foundation-verifiable detached manifest/signature or an equivalent sealed-artifact flow and prove that a substituted installer-plus-checksum pair is rejected before execution.

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

  • Authenticate the portable installer before executing it (P1) - The new checksum is delivered beside the installer, so replacing both files still passes the documented shasum -c command before the shell script runs. The Git blob comparison only protects the packaging host; use an independently verifiable release signature or a sealed authenticated artifact before target-side execution.
  • Resolve security concern: Co-shipped checksum does not authenticate installer - An attacker able to alter the transferred artifact set can alter both the script and its checksum, passing verification before the script performs lifecycle operations.
  • Resolve merge risk (P1) - A release-operator or transfer-path attacker can replace both the portable installer and its adjacent checksum file; the documented check still succeeds before the replacement script can alter launchd and application state.
  • Resolve merge risk (P1) - The bug-fix diff has production growth of 32 lines; 19 script lines are necessary to create and bind the two new artifact members, while the remaining growth documents the changed operator contract.
  • Complete next step (P2) - A concrete security flaw exists, but choosing the durable target-side artifact-authentication boundary requires release-owner judgment before automated repair.
  • Improve patch quality - Choose and implement a receiver-verifiable installer-authentication mechanism.
  • Improve patch quality - Add a tamper regression proving modified installer and checksum sidecars are rejected before script execution.
  • Improve patch quality - Provide exact-head macOS packaging evidence with private details redacted.

Findings

  • [P1] Authenticate the portable installer before executing it — scripts/mac-elevation-host.sh:412-414
  • [high] Co-shipped checksum does not authenticate installer — scripts/mac-elevation-host.sh:412
Agent review details

Security

Needs attention: The PR introduces a standalone executable artifact without a receiver-verifiable authenticity binding.

PR surface

Tests +10, Docs +13, Other +19. Total +42 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 13 3 +10
Docs 2 23 10 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 1 24 5 +19
Total 4 60 18 +42

Review metrics

Metric Value Why it matters
Production versus test LOC production +32, tests +10 The necessary artifact-contract growth is bounded, but the security repair should avoid adding another parallel installation path.
Artifact contract 2 files added, 4 receipt fields added The executable installer and its checksum become release artifacts and need a target-verifiable trust binding.

Merge-risk options

Maintainer options:

  1. Bind the installer to an authenticated release identity (recommended)
    Require a receiver-verifiable Foundation signature or verified sealed artifact before any portable shell code executes, then add tamper proof for the installer and checksum sidecar.
  2. Pause the portable distribution path
    Keep the existing source-checkout lifecycle flow until the release owner selects an artifact-authentication design.

Technical review

Best 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 .sha256 sidecar makes shasum -c succeed, after which the documented command executes the substituted script. A live macOS packaging run was not performed in this read-only review.

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:

  • [P1] Authenticate the portable installer before executing it — scripts/mac-elevation-host.sh:412-414
    The new checksum is delivered beside the installer, so replacing both files still passes the documented shasum -c command before the shell script runs. The Git blob comparison only protects the packaging host; use an independently verifiable release signature or a sealed authenticated artifact before target-side execution.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 97a53a9b35a8.

Labels

Label changes:

  • add P1: The patch would make a target Mac execute a transferable installer whose integrity is not independently authenticated.
  • add merge-risk: 🚨 security-boundary: The new standalone installer is verified only by a checksum file delivered in the same mutable artifact set.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • remove P2: Current review triage priority is P1, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove merge-risk: 🚨 other: Current PR review merge-risk labels are merge-risk: 🚨 security-boundary.

Label justifications:

  • P1: The patch would make a target Mac execute a transferable installer whose integrity is not independently authenticated.
  • merge-risk: 🚨 security-boundary: The new standalone installer is verified only by a checksum file delivered in the same mutable artifact set.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This is a maintainer-labelled PR, so the external-contributor proof gate does not apply; its stated Testbox validation remains supplemental to the security repair.

Evidence

Security concerns:

  • [high] Co-shipped checksum does not authenticate installer — scripts/mac-elevation-host.sh:412
    An attacker able to alter the transferred artifact set can alter both the script and its checksum, passing verification before the script performs lifecycle operations.
    Confidence: 0.96

What I checked:

  • Unauthenticated installer checksum: The new installer checksum file is generated beside the executable and the installer is then published; a receiver has no independent signer or immutable manifest to distinguish a substituted installer-plus-checksum pair. (scripts/mac-elevation-host.sh:412, d86e712eeba3)
  • Receiver executes the checked sidecar: The public instructions verify the sidecar checksum and immediately execute the standalone script, so the packaging-time Git blob comparison is not re-established at the target boundary. Public docs: docs/platforms/mac/peekaboo.md. (docs/platforms/mac/peekaboo.md:43, d86e712eeba3)
  • Existing signed-app boundary: The installer validates the archive only after it starts; the app’s notarization and code-signature checks do not authenticate the standalone script that launched the workflow. (scripts/mac-elevation-host.sh:419, d86e712eeba3)
  • Current-main gap: Current main emits only the archive, receipt, and archive checksum, while its public instructions require a source-checkout script; it does not already provide the proposed portable installer behavior. (scripts/mac-elevation-host.sh:328, 97a53a9b35a8)
  • Feature provenance: The elevation-host workflow was introduced by the same recent feature history, and blame attributes the newly added artifact lines to the proposed packaging commit. (scripts/mac-elevation-host.sh:372, 054433418c84)
  • Prior finding addressed: The current head updates the public Mac guide to list the full artifact set and its two checksum commands, addressing the prior documentation mismatch; the remaining concern is artifact authenticity. Public docs: docs/platforms/mac/peekaboo.md. (docs/platforms/mac/peekaboo.md:51, d86e712eeba3)

Likely related people:

  • steipete: The elevation-host workflow and the proposed artifact changes both trace to Peter Steinberger’s recent commits. (role: feature owner and recent area contributor; confidence: high; commits: 44dd983c0c37, 054433418c84, d86e712eeba3; files: scripts/mac-elevation-host.sh, docs/platforms/mac/peekaboo.md, apps/macos/README.md)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-14T13:55:24.006Z sha 62784440a26046183168e3a510d47c0ee5e74391 :: found issues before merge. :: [P2] Document the portable install path in the public Mac guide

@steipete
steipete force-pushed the codex/elevation-host-portable-installer branch from 6278444 to d86e712 Compare August 14, 2026 13:58
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the public-guide finding in d86e712eeba.

docs/platforms/mac/peekaboo.md now tells operators to transfer the full artifact set, verify both checksum files, and run the shipped source-addressed installer without a source checkout. pnpm docs:list, the focused elevation-host suite, and the post-fix autoreview are clean.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 14, 2026
@steipete
steipete merged commit 493a3e4 into main Aug 14, 2026
281 of 283 checks passed
@steipete
steipete deleted the codex/elevation-host-portable-installer branch August 14, 2026 14:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 14, 2026
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.
steipete added a commit that referenced this pull request Aug 14, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
* fix(mac): package portable elevation installer

* docs(mac): explain portable elevation install
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant