Skip to content

fix(browser): protect private observation media and Canvas trust boundaries - #118775

Merged
steipete merged 3 commits into
mainfrom
codex/qa0803-browser-labeled-snapshot-outbound
Aug 3, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa0803-browser-labeled-snapshot-outbound

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep Browser labeled-page screenshots and Canvas observational screenshots available to the model while preventing private images from being silently attached to outbound user messages
  • wrap remote Canvas evaluation output and untrusted Browser screenshot/snapshot failure reasons in the existing sanitized external-content boundary, removing forged closing markers, model control tokens and unintended MEDIA directives
  • propagate network provenance through both Canvas's inner tool and the actual lazy registered outer tool so the real agent loop marks subsequent model context as tainted

Real production-path verification

  • actual browser tool via isolated local HTTP and image pipeline reproduced raw forged-marker/control-token provider errors; canonical wrappers now sanitize only untrusted reason text while preserving screenshots, share hints, raw details, trusted static fallbacks and cancellation
  • real Canvas image helper plus outbound extraction proved private screenshots were attached before repair and remain model-visible but outbound-disabled afterward
  • actual public runAgentLoop with the real registered lazy Canvas tool now emits network provenance on tool results and turnTainted on the subsequent assistant message
  • 280 focused Browser, Canvas, registration, agent-loop, outbound-extractor and delivery sibling tests pass; all original security regressions were reproduced red first
  • one independent formal structured security review clean, confidence 0.91; production delta +17 lines across four concrete privacy/trust invariants

Actual production Browser/Canvas privacy + taint proof

Real browser/canvas owner results and registered tool metadata were executed in-process; no simulated JSON substitution:

{"browserScreenshot":{"modelVisible":true,"outbound":false,"automaticallyDelivered":false},"canvasScreenshot":{"modelVisible":true,"outbound":false,"automaticallyDelivered":false},"registeredCanvas":{"resultContentSource":"network","toolResultContentSource":"network","assistantTurnTainted":true}}

Browser/canvas screenshots remain visible to the model but cannot silently enter outbound delivery, and network-backed canvas results taint the actual assistant turn.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:13 PM ET / 18:13 UTC.

ClawSweeper review

What this changes

The PR keeps Browser and Canvas observation images available to the model while preventing automatic outbound delivery, sanitizes remote-controlled Browser and Canvas text, and records Canvas results as network-derived.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This is a sound, well-proven repair for an existing privacy and trust-boundary defect. The branch is rebased on current main and addresses the artifact producer, external-content boundary, and lazy-tool provenance path; it should remain open for the protected maintainer/security decision and completion of the exact-head build artifact check.

Priority: P1
Reviewed head: 1b59eb8995423faa83a96f692047a358222a6503
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong real-path proof and focused owner-boundary coverage support a high-confidence patch, subject to the maintainer's intentional delivery-policy decision.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body includes red-first and after-fix production-path output from real Browser, Canvas, outbound extraction, and registered agent-loop execution; the resulting JSON directly demonstrates model-visible but outbound-disabled images and turn taint propagation.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body includes red-first and after-fix production-path output from real Browser, Canvas, outbound extraction, and registered agent-loop execution; the resulting JSON directly demonstrates model-visible but outbound-disabled images and turn taint propagation.
Evidence reviewed 6 items Observation-media policy is set at the producing tools: The branch marks labeled Browser snapshots and Canvas snapshots as media.outbound: false at their respective image-result calls, preserving model visibility while preventing the outbound extractor from treating them as automatic channel attachments.
Remote-controlled failure and evaluation text stays inside the shared trust boundary: Browser failure text and Canvas evaluation output are passed through the existing external-content wrapper after neutralizing line-start media directives, rather than allowing page-controlled text to appear as trusted tool guidance.
The outer lazy Canvas registration carries provenance: The registered Canvas tool, not only the resolved inner tool, declares resultContentSource: "network"; this is the metadata the real agent loop sees before lazy resolution.
Findings None None.
Security None None.

How this fits together

Browser and Canvas tools turn remotely rendered pages into model observations and, in some cases, media artifacts that can be sent through a channel. The agent runtime uses each tool's provenance metadata to treat network-derived content as tainted on the following assistant turn, while channel delivery must honor artifact-level outbound policy.

flowchart LR
  A[Remote browser or Canvas page] --> B[Browser or Canvas tool]
  B --> C[Sanitized model observation]
  B --> D[Image artifact policy]
  D --> E[Model-visible image]
  D --> F[Automatic channel delivery blocked]
  B --> G[Network provenance]
  G --> H[Agent turn marked tainted]
Loading

Decision needed

Question Recommendation
Should OpenClaw adopt the PR's privacy-first rule that Browser and Canvas observation screenshots never auto-attach to outbound channel messages, requiring an explicit sharing/message flow instead? Confirm privacy-first delivery: Accept model-only observation media as the default and merge after the exact-head build artifact check completes successfully.

Why: The code is narrowly consistent with existing sanitization and delivery contracts, but this is an intentional behavior change at a sensitive channel-delivery boundary and the PR carries the repository's protected maintainer label.

Before merge

  • Resolve merge risk (P1) - Merging intentionally changes affected Browser and Canvas observations from implicitly deliverable media to model-only media; operators that relied on automatic screenshot attachment must use the explicit sharing/message path instead.
  • Resolve merge risk (P1) - The protected maintainer label and the active exact-head build-artifacts check mean a human owner should confirm the privacy-first delivery policy and wait for final build evidence before merge.
Agent review details

Security

None.

PR surface

Source +17, Tests +288. Total +305 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 4 25 8 +17
Tests 3 299 11 +288
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 324 19 +305

Review metrics

Metric Value Why it matters
Production versus regression coverage production +17, tests +288 The modest production increase implements four related privacy/trust invariants and is backed by focused Browser, Canvas, delivery, registration, and agent-loop coverage.

Merge-risk options

Maintainer options:

  1. Confirm the privacy-first delivery change (recommended)
    Accept the intentional upgrade behavior that observation screenshots remain available to the model but are no longer automatically attached to outbound channel replies.

Technical review

Best possible solution:

Keep observation screenshots model-visible but require an explicit, user-directed sharing or message action for outbound delivery, with Canvas network provenance retained through its lazy registration path.

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

Yes. The PR supplies a concrete real production-path reproduction showing that Browser and Canvas screenshots were eligible for automatic outbound extraction before the repair, and current source confirms the missing artifact-level outbound policy on the base path.

Is this the best way to solve the issue?

Yes. The patch fixes the producer-owned artifact policy, reuses the canonical external-content wrapper, and marks the real lazy registration boundary as network-derived rather than relying on downstream channel guards or inner-tool-only metadata.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The repair prevents private observation media and untrusted remote content from crossing active agent and channel-delivery trust boundaries.
  • merge-risk: 🚨 message-delivery: The branch intentionally suppresses automatic outbound attachment for Browser and Canvas screenshot artifacts.
  • merge-risk: 🚨 security-boundary: The branch changes handling of private media, remote page text, and network-derived agent context.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes red-first and after-fix production-path output from real Browser, Canvas, outbound extraction, and registered agent-loop execution; the resulting JSON directly demonstrates model-visible but outbound-disabled images and turn taint propagation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes red-first and after-fix production-path output from real Browser, Canvas, outbound extraction, and registered agent-loop execution; the resulting JSON directly demonstrates model-visible but outbound-disabled images and turn taint propagation.

Evidence

What I checked:

  • Observation-media policy is set at the producing tools: The branch marks labeled Browser snapshots and Canvas snapshots as media.outbound: false at their respective image-result calls, preserving model visibility while preventing the outbound extractor from treating them as automatic channel attachments. (extensions/browser/src/browser-tool.snapshot.ts:245, 1b59eb899542)
  • Remote-controlled failure and evaluation text stays inside the shared trust boundary: Browser failure text and Canvas evaluation output are passed through the existing external-content wrapper after neutralizing line-start media directives, rather than allowing page-controlled text to appear as trusted tool guidance. (extensions/canvas/src/tool.ts:189, 1b59eb899542)
  • The outer lazy Canvas registration carries provenance: The registered Canvas tool, not only the resolved inner tool, declares resultContentSource: "network"; this is the metadata the real agent loop sees before lazy resolution. (extensions/canvas/index.ts:44, 1b59eb899542)
  • Focused regression coverage exercises delivery and real loop registration: The added tests assert that Canvas snapshot output remains model-visible but is filtered from channel delivery, and that a registered lazy Canvas tool taints the subsequent assistant turn in the real agent loop. (extensions/canvas/src/tool.test.ts:199, 1b59eb899542)
  • Current-main ownership history: The adjacent Browser external-content behavior on current main was introduced by Peter Steinberger in the same trust-boundary area, and the pre-PR Canvas tool lines also trace to his recent work. (extensions/browser/src/browser-tool.ts:824, c70863a5e548)
  • Exact-head real behavior proof is present: The PR body records a production-path Browser/Canvas run showing both image classes model-visible and outbound-disabled, plus a real registered Canvas tool result marked as network content with a tainted following assistant turn. The GitHub Real behavior proof check is successful. (1b59eb899542)

Likely related people:

  • steipete: Peter Steinberger authored the current-main Browser external-content repair and the recent Canvas code that this PR corrects, as well as the proposed branch. (role: recent trust-boundary contributor; confidence: high; commits: c70863a5e548, 8d1fe4f09106, 4d7a587e7cb5; files: extensions/browser/src/browser-tool.ts, extensions/browser/src/browser-tool.snapshot.ts, extensions/canvas/src/tool.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-03T17:03:08.317Z sha 4d7a587 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-03T17:30:56.004Z sha 68df31f :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 3, 2026
@steipete
steipete merged commit 2b3351a into main Aug 3, 2026
90 of 92 checks passed
@steipete
steipete deleted the codex/qa0803-browser-labeled-snapshot-outbound branch August 3, 2026 18:33
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  fix(browser): protect private observation media and Canvas trust boundaries (#118775)
  fix(build): restore SDK packages and signed macOS app builds (#118833)
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…-state-mutation

* origin/main: (22 commits)
  fix(delivery): renew stable producer leases (#118663)
  test(mcp): isolate catalog size checks from wall-clock load (#118871)
  test(ui): add credentials primary QA proof (#118790)
  fix(slack): prevent stalled presence polling from hanging shutdown (#117478)
  test(security): cover gateway shared auth modes (#118834)
  fix(macos): show gateway auth failures in app status (#118841)
  test(tui): route PTY gateway scenarios through explicit models (#118802)
  test(qa): add session transcript primary coverage (#118820)
  fix(browser): protect private observation media and Canvas trust boundaries (#118775)
  fix(build): restore SDK packages and signed macOS app builds (#118833)
  test(qa): cover plugin authoring contracts (#118821)
  fix(parallels): keep provider keys out of POSIX job logs (#118840)
  improve: reduce redundant Code Mode test work (#118815)
  fix(models): report primary OpenRouter limits in scans (#110855)
  test: speed up setup inference fixtures (#118811)
  fix(auto-reply): enforce canonical reset authorization (#118580)
  docs(gateway): fix invalid heartbeat visibility examples (#118827)
  fix(plugins): unify HTTP route conflict handling (#118203)
  test(agents): use prepared auth fixtures (#118816)
  fix(lmstudio): resolve JIT embedding variants
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
…daries (openclaw#118775)

* fix(browser): protect observation screenshots and Canvas trust boundaries

* test(canvas): preserve actual image helper result types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant