Skip to content

Align remote node exec event system messages with untrusted handling#62659

Merged
drobison00 merged 2 commits into
openclaw:mainfrom
eleqtrizit:363
Apr 8, 2026
Merged

Align remote node exec event system messages with untrusted handling#62659
drobison00 merged 2 commits into
openclaw:mainfrom
eleqtrizit:363

Conversation

@eleqtrizit

Copy link
Copy Markdown
Contributor

Summary

  • aligns remote node exec event system messages with the existing untrusted external-event handling
  • keeps external node-provided command output from rendering as trusted system instructions

Changes

  • marks exec.started, exec.finished, and exec.denied node events as trusted: false
  • sanitizes node-provided command, output, and reason text before enqueueing system events
  • adds regression coverage for the untrusted flag and sanitization path in src/gateway/server-node-events.test.ts

Validation

  • ran pnpm test src/gateway/server-node-events.test.ts
  • ran pnpm tsgo --pretty false
  • ran pnpm check via the commit hook

Notes

  • change is intentionally narrow and follows the same handling already used for notification events and local exec summaries
  • local claude -p "/review" could not complete in this environment because it requested an approval step for gh pr list

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Apr 7, 2026
@greptile-apps

greptile-apps Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR hardens the remote node exec event pipeline by marking exec.started, exec.finished, and exec.denied system events as trusted: false and passing node-supplied command, output, and reason fields through sanitizeInboundSystemTags before they reach the event queue. The change is intentionally narrow, following the same pattern already applied to notifications.changed and local exec summaries. Test coverage is solid, with explicit assertions on trusted: false, the sanitization call arguments, and the resulting sanitized event text.

Confidence Score: 5/5

Safe to merge — narrow security hardening with no regressions and full test coverage of the new behavior.

All remaining concerns are P2 or lower. The trusted: false flag and sanitization of node-supplied fields close the injection risk, and the test suite explicitly asserts both the flag and the sanitized output. The previously flagged runId issue is tracked in a prior thread and is mitigated by trusted: false.

No files require special attention.

Vulnerabilities

No security concerns identified. The PR actively closes a gap: node-provided text was previously forwarded unsanitized into the system event queue. Adding trusted: false and routing command/output/reason through sanitizeInboundSystemTags brings exec events in line with the existing untrusted-input handling already applied to notification events. The previously noted runId embedding is mitigated by trusted: false; that thread is tracked separately.

Reviews (2): Last reviewed commit: "fix(nodes): downgrade remote exec system..." | Re-trigger Greptile

Comment thread src/gateway/server-node-events.ts Outdated
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@codex review

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@greptile review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@drobison00
drobison00 merged commit 4a60087 into openclaw:main Apr 8, 2026
26 of 33 checks passed
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Apr 8, 2026
* main: (522 commits)
  fix(browser): re-check interaction-driven navigations (openclaw#63226)
  test: reuse verbose directive reply imports
  test: reuse exec directive reply imports
  fix(browser): harden browser control override loading (openclaw#62663)
  Matrix: report startup failures as errors
  auth: persist explicit profile upserts directly
  test(doctor): mock memory-core runtime seam
  auth: avoid external cli sync on profile upsert
  feat: parallelize character eval runs
  fix: load QA live provider overrides
  build: stage nostr runtime dependencies
  fix(dotenv): block workspace runtime env vars (openclaw#62660)
  build: narrow plugin SDK declaration build
  test: harden Parallels macOS smoke fallback
  fix(memory): accept embedded dreaming heartbeat tokens
  test: harden provider mock isolation
  docs(config): tighten wording in reference
  test: reuse followup runner imports
  test: reuse image generate tool imports
  Align remote node exec event system messages with untrusted handling (openclaw#62659)
  ...
eleqtrizit added a commit that referenced this pull request Apr 8, 2026
…62659)

* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <[email protected]>
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…penclaw#62659)

* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…penclaw#62659)

* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…penclaw#62659)

* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…penclaw#62659)

* fix(nodes): downgrade remote exec system events

* docs(changelog): add remote node exec event entry

---------

Co-authored-by: Devin Robison <[email protected]>
@eleqtrizit
eleqtrizit deleted the 363 branch June 30, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants