Skip to content

fix: keep updates working below recommended Node security patches - #186589

Merged
roboclaw-bot merged 5 commits into
mainfrom
openclaw/keen-prawn
Oct 28, 2026
Merged

roboclaw-bot merged 5 commits into
mainfrom
openclaw/keen-prawn

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: updates are refused, or an explicitly pinned Gateway runtime cannot restart after an update, when Node meets the previous compatibility requirements but lacks the latest security-only patches.

User Impact

Users can update on Node >=24.16.0 <25 || >=26.1.0 without first upgrading Node. Updates, Doctor, and openclaw security audit prominently warn below Node 24.22.1 / 26.12.1. Upgrade Node promptly: these patches reject keys compromised in the October 2026 eMudhra incident; continued compatibility does not remove that exposure. SQLite safety checks, excluded release lines, explicit target-package engines and patched provisioning defaults remain enforced.

Why This Change Was Made

Separate compatibility from security recommendations in the canonical version policy instead of stranding installations. Audit finding runtime.node_security_patch describes the audit process runtime, not an unprobed Gateway, and skips Bun. Audit collectors use a coherent sibling module.

Evidence

  • Original explicit-pin upgrade: real AWS Crabbox 2026.10.5 updater → private patched runtime snapshot, unchanged Node 24.21.0 native service pin, exit 0, visible warning and new healthy Gateway PID. This predates the audit extraction/main refresh and remains separate source-stamped evidence. Service and worker cleanup confirmed.
  • Exact-head fresh install: candidate 6d987863ea42cfd9ec70eec4c445725a4746e17d installed/set up on checksum-verified Node 24.21.0. Real Gateway readiness 200, successful read-only RPC serving the exact build, new PID after cold restart and preserved synthetic settings. Doctor lint visibly warned about security patches; exit 1 reflected the warning, not an error or clean lint. Cleanup verified.
  • Latest stable: genuinely installed 2026.10.8 (dc2523e) public updater activated that exact candidate on Node 24.22.1 in a supervised offline rootless namespace. Exit 0 / status: ok; real snapshot/install/Doctor/canary/activation/finalization, preserved chosen settings, and new foreground Gateway readiness 200 / RPC success with the exact build. This was a stopped baseline → --no-restart updater → owner-started new process, not automatic/native-service restart or old-Node pin proof. Latest stable itself refuses the old-Node baseline. Synthetic-profile warnings retained; process/container teardown and removal verified; no host supervisor guard changed.
  • Actual Node 24.16.0, 24.21.0 and 26.1.0 CLI audits warned with exit 0; patched 24.22.1 had no Node finding. Human audit and JSON update dry-run showed the advisory.
  • Red/green compatibility/audit regressions and focused runtime, updater, worker, Doctor, preinstall and Bash installer tests passed. All 12 CI-repair test files passed across the focused run and corrected audit-fixture follow-up. Core/scoped types, lint, format, Bash syntax, documentation links, export guard and test-line ratchet passed. Net test-line growth zero against c7db2804, ceiling unchanged. Explicit target-engine, runtime-recovery and unsafe-SQLite coverage retained.
  • Independent refreshed-candidate/final-delta local review, Codex GPT-6.1 Sol, P0–P2: scoped-clean. Hosted findings about remaining consumer expectations and duplicate audit export were repaired.
  • Final CI remains red: run 40647541620, attempt 2 completed all 185 jobs. Eight test jobs failed with nine independently baseline-reproduced groups: seven monotonic-deadline fixture failures, browser-like import without process.getBuiltinModule, and missing QA replyToId after actual hard-kill/restart. Final logs preserve those signatures and actual checkout 9267c251 / first parent 703618fa; blob equivalence binds the source-equivalent baseline, not execution of the entire first-parent commit. The aggregate classification report timed out and is not used as attribution. The single diagnosed Node-download infrastructure recovery succeeded: Node setup and extension lint now pass; independent security-fast passed. The authorized inherited-failure exception is selected, without waiving enforced review, security or live writer authority. Feishu is not failing this run and was not classified from passing replays.
  • Native macOS and Windows PowerShell execution remain unqualified; 46 PowerShell cases were skipped.

Worked on by

Work sessions

roboclaw-bot and others added 3 commits October 28, 2026 06:17
Restore the pre-security compatibility floors while preserving SQLite safety checks. Surface nonblocking Node security advisories in updates, Doctor, and security audit.

Co-authored-by: steipete <[email protected]>
Resolve the Bun history conflict without changing newer signed-fork policy. Preserve the reviewed Node compatibility and advisory behavior.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 9d2cfd56-3cfe-4d3e-8516-968cf5d46d9a
@clawsweeper

clawsweeper Bot commented Oct 28, 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 docs Improvements or additions to documentation app: macos App: macos gateway Gateway runtime cli CLI command changes security Security documentation scripts Repository scripts commands Command implementations size: L labels Oct 28, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 28, 2026 06:33
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 6d987863ea42cfd9ec70eec4c445725a4746e17d
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These dependency graph changes were made:

  • package.json

Carefully review these changes before merging.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 6d987863ea42cfd9ec70eec4c445725a4746e17d
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/security/audit-runtime.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.
  • src/security/audit.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR restores earlier Node compatibility floors and reports missing security patches as warnings during updates, Doctor, and security audits.

Example: A Gateway uses Node 24.21.0 with passing SQLite safety checks.

  • Before: The newer runtime policy rejects the executable because it lacks Node 24.22.1 security patches.
  • After: The executable remains compatible, and update and diagnostic commands recommend upgrading Node.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The policy change is coherent and has a reported real upgrade replay, but required upgrade coverage is incomplete and current-head CI exposes two concrete omissions.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An update or subsequent Gateway restart fails solely because the selected Node lacks newer security patches despite meeting the earlier compatibility requirements.
Reason: The maintainer-authored direction explicitly prioritizes continued updates, explains the security tradeoff, and retains actual SQLite safety checks and patched provisioning.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open: it implements an explicitly accepted runtime-policy change that main still lacks, but two patch-caused CI failures need repair.

Priority: P1
Reviewed head: 36524c3cc08a40dad0e79a454e237d851cb6f364

Before merge

  • Update the remaining consumers of the restored runtime floors (P2) - Changing the shared floors leaves consumer tests enforcing the superseded security requirement. Current-head CI already fails test/openclaw-launcher.e2e.test.ts:612 because Node 24.22.0 now correctly exits 0 instead of the expected 1. Additional deterministic stale expectations remain in update-command-runtime.test.ts, update-command-service-plan.test.ts, update-cli/status.test.ts, update-cli.node-runtime.test.ts, and daemon/program-args.test.ts. Update the compatibility and recovery expectations while retaining explicit target-package engine tests and unsafe-SQLite rejection.
  • Use a distinct export for the audit runtime collector (P2) - The new collectNodeRuntimeFindings export duplicates src/commands/node-runtime-diagnostics.ts's existing export. The repository collision guard scans both implementations and rejects duplicate definitions, matching the current-head check-source-contracts failure annotation. Rename the audit-specific collector and its audit.ts import/call without adding a guard exception.

Findings

  • [P2] Update the remaining consumers of the restored runtime floors — node-version.mjs:8-9
  • [P2] Use a distinct export for the audit runtime collector — src/security/audit-runtime.ts:6

Tests

  • Missing end-to-end proof: Supply fresh-install and latest-stable v2026.10.8-to-candidate upgrade evidence showing warnings, preserved service selection and settings, and a healthy restart; the supplied upgrade replay starts at 2026.10.5.
Agent review details

How this fits together

The shared runtime policy feeds package admission, CLI startup, installers, worker bootstrap, and native runtime selection; update and diagnostic callers turn its decisions into refusals or warnings.

flowchart TD
  A[Node executable] --> B[Shared version policy]
  A --> C[SQLite capability checks]
  B --> D[Runtime admission]
  C --> D
  D --> E[CLI and Gateway startup]
  B --> F[Update Doctor and audit warnings]
Loading

Technical review

Best possible solution:

Keep the shared compatibility/advisory split, repair the omitted consumer expectations, and give the audit collector a distinct export.

Do we have a high-confidence way to reproduce the issue?

Current-main admission rejects Node 24.21.0 even with healthy SQLite, and the earlier security change identifies the responsible floor; no target code was executed during this review.

Is this the best way to solve the issue?

The smallest complete implementation separates compatibility from security recommendations in the existing version owner, preserves capability and package-engine checks, and updates every affected consumer.

Full review comments:

  • [P2] Update the remaining consumers of the restored runtime floors — node-version.mjs:8-9
    Changing the shared floors leaves consumer tests enforcing the superseded security requirement. Current-head CI already fails test/openclaw-launcher.e2e.test.ts:612 because Node 24.22.0 now correctly exits 0 instead of the expected 1. Additional deterministic stale expectations remain in update-command-runtime.test.ts, update-command-service-plan.test.ts, update-cli/status.test.ts, update-cli.node-runtime.test.ts, and daemon/program-args.test.ts. Update the compatibility and recovery expectations while retaining explicit target-package engine tests and unsafe-SQLite rejection.
    Confidence: 1
  • [P2] Use a distinct export for the audit runtime collector — src/security/audit-runtime.ts:6
    The new collectNodeRuntimeFindings export duplicates src/commands/node-runtime-diagnostics.ts's existing export. The repository collision guard scans both implementations and rejects duplicate definitions, matching the current-head check-source-contracts failure annotation. Rename the audit-specific collector and its audit.ts import/call without adding a guard exception.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2e5c67e203e6.

Provenance checked

  • Node admission floors and installer/native mirrors changes intended behavior with a stated reason (6c00e67: Require Node releases that reject compromised CA keys even when SQLite capability checks pass.)
  • Earlier compatibility floor keeps the original intent (ce0e84d: Require Node builds with lossless SQLite reads and exclude incompatible release lines.)
  • Target-aware update runtime admission keeps the original intent (3755040: Reject incompatible pinned Gateway runtimes before staging or executing candidate install scripts.)
  • Elevated audit collector extraction keeps the original intent (c2a4f25: Security auditing detects wildcard and large elevated allowlists; the extraction preserves the existing collector body.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a917c99 adds node-version.mjs:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a917c99e92c8; files: node-version.mjs)
  • Josh Avant: Raw commit 6c00e67 adds node-version.mjs:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6c00e67f5703; files: node-version.mjs)

PR surface

Source +99, Tests +184, Docs +6, Config 0, Other +27. Total +316 across 46 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 11 151 52 +99
Tests 11 215 31 +184
Docs 16 27 21 +6
Config 1 1 1 0
Generated 0 0 0 0
Other 7 44 17 +27
Total 46 438 122 +316

Labels

Label changes:

  • add P1: The central problem blocks updates or Gateway restart for existing installations using previously compatible Node executables.
  • add merge-risk: 🚨 security-boundary: Admitting older Node restores their compromised-key TLS exposure; the maintainer-authored PR explicitly accepts this tradeoff and retains patched provisioning defaults.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P1: The central problem blocks updates or Gateway restart for existing installations using previously compatible Node executables.
  • merge-risk: 🚨 security-boundary: Admitting older Node restores their compromised-key TLS exposure; the maintainer-authored PR explicitly accepts this tradeoff and retains patched provisioning defaults.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 28, 2026, 2:39 AM ET / 06:39 UTC.

roboclaw-bot and others added 2 commits October 28, 2026 07:00
Rename the audit collector, restore consumer expectations and recovered-runtime metadata, and consolidate equivalent tests without increasing the test-line ceiling.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c9fc6607-e7f5-47d5-811c-14a954645c1a
RomneyDa added a commit that referenced this pull request Oct 29, 2026
…mmended Node security patches (#186589) (#187626)

* fix: keep updates working below recommended Node security patches (#186589)

* fix: keep updates working below recommended Node security patches

Restore the pre-security compatibility floors while preserving SQLite safety checks. Surface nonblocking Node security advisories in updates, Doctor, and security audit.

Co-authored-by: steipete <[email protected]>

* fix: keep updates working below recommended Node security patches

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 9d2cfd56-3cfe-4d3e-8516-968cf5d46d9a

* fix: align Node compatibility consumers and CI coverage

Rename the audit collector, restore consumer expectations and recovered-runtime metadata, and consolidate equivalent tests without increasing the test-line ceiling.

Co-authored-by: steipete <[email protected]>

* Publish openclaw/keen-prawn

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c9fc6607-e7f5-47d5-811c-14a954645c1a

---------

Co-authored-by: steipete <[email protected]>
(cherry picked from commit 4a5ec82)

* docs: state the restored Node compatibility range

#186589 restored compatibility to >=24.16.0 <25 || >=26.1.0 and made 24.22.1/26.12.1 security recommendations. The mac signing and CI pipeline pages still described the old engines range.

(cherry picked from commit 5eeafd8)

* ci: pin installer smoke Node to 24.22.1 as on main

The installer now accepts Node below the security recommendation, so the
published package (still requiring 24.22.1) must be smoke-tested on the
pinned runtime main already uses.

---------

Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
sectrgt pushed a commit to sectrgt/openclaw that referenced this pull request Nov 2, 2026
Adapted from main c6a19e5, the fixture follow-up to openclaw#186589. Release keeps
its own test layouts; only the candidate-admission recovery minimum and the
Parallels bootstrap table move to the restored floor (>=24.16.0 / >=26.1.0),
with genuinely incompatible fixtures (24.15.0, 26.0.0, 24.14.1) still
requiring bootstrap.

(cherry picked from commit c6a19e5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos cli CLI command changes commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts security Security documentation security-sensitive-changed size: L 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