Skip to content

[Repo Assist] fix(security): remove residual ex.Message leak in canvas jsonlPath error path - #328

Merged
shanselman merged 4 commits into
masterfrom
repo-assist/fix-canvas-jsonlpath-exmessage-leak-2026-05-13-78f4414fcfd54f2f
May 14, 2026
Merged

[Repo Assist] fix(security): remove residual ex.Message leak in canvas jsonlPath error path#328
shanselman merged 4 commits into
masterfrom
repo-assist/fix-canvas-jsonlpath-exmessage-leak-2026-05-13-78f4414fcfd54f2f

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Repo Assist — automated AI assistant.

PR #294 sanitized the main canvas command handlers (navigate, eval, snapshot, a2ui.dump, a2ui.caps) but one ex.Message leak was left in the jsonlPath read path in HandleA2UIAsync:

// Before (leaked to gateway)
return Error($"Failed to read jsonlPath: {ex.Message}");

// After (safe)
return Error("Failed to read jsonlPath");

The exception is already written to the local logger on the line immediately above:

Logger.Error($"{request.Command}: failed to read jsonlPath", ex);

So diagnostic fidelity is fully preserved — only the gateway-bound error string is sanitized.

Relation to existing security work

PR Status Scope
#291 ✅ merged NodeCapability errors
#294 ✅ merged CanvasCapability + BrowserProxyCapability (most handlers)
#306 🔄 open WindowsNodeClient, DeviceCapability, approval services
this PR ⬅ here Residual CanvasCapability jsonlPath handler

Test Status

  • dotnet test OpenClaw.Shared.Tests --no-restore — ✅ exit 0
  • dotnet test OpenClaw.Tray.Tests --no-restore — ✅ exit 0
  • build.ps1 — requires Windows; infrastructure limitation on Linux runner

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

PR #294 sanitised the main canvas command handlers (navigate, eval,
snapshot, a2ui) but left one ex.Message leak at the jsonlPath read
path: Error($"Failed to read jsonlPath: {ex.Message}").  The
exception detail was already written to the local logger on the line
above, so diagnostic fidelity is preserved; only the gateway-bound
error string is stripped.

Closes: the residual canvas capability gap identified post-#294.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shanselman and others added 2 commits May 13, 2026 18:50
Assert sanitized jsonlPath error responses now that internal exception details stay local to logs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman
shanselman marked this pull request as ready for review May 14, 2026 01:56
@shanselman
shanselman merged commit a03c454 into master May 14, 2026
13 checks passed
@shanselman
shanselman deleted the repo-assist/fix-canvas-jsonlpath-exmessage-leak-2026-05-13-78f4414fcfd54f2f branch May 14, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant