Skip to content

fix(talk): keep voice-only agent consults read-only - #125392

Merged
joshavant merged 1 commit into
mainfrom
security/limit-talk-consults
Aug 17, 2026
Merged

joshavant merged 1 commit into
mainfrom
security/limit-talk-consults

Conversation

@joshavant

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where a voice-only Talk session could start embedded agent work with broader tool access than the session credential permitted. Browser, relay, and legacy tool-call entry points did not consistently preserve the caller's effective authority.

Why This Change Was Made

Agent consult authority is now derived once from authenticated Gateway scopes. Talk-only callers receive the canonical safe read-only tool set, write-scoped callers retain general non-owner tools, and admin callers retain owner authority. The legacy tool-call route now carries the same runtime tool cap through chat dispatch. This does not change protocol, configuration, storage, or public API contracts.

User Impact

Voice-only integrations can continue using read-only agent consults while state-changing tools stay unavailable. Existing write- and admin-scoped workflows retain their prior capabilities.

Evidence

  • Pre-fix focused regression failed because restricted Talk calls reached agent dispatch without senderIsOwner or toolsAllow constraints.
  • Focused and sibling coverage: 6 files, 349 tests passed.
  • Changed-file gate passed formatting, core and test type checks, lint, import-cycle, database, security, and dead-export checks.
  • Local autoreview reported no accepted or actionable findings.
  • Production LOC: +58/-4 (net +54); tests: +80/-6.
  • Remote environment proof was not needed because this is deterministic Gateway authorization propagation with no provider, package, Docker, or cross-platform dependency.

@clawsweeper

clawsweeper Bot commented Aug 17, 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 gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Aug 17, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. 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. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 5:31 PM ET / 21:31 UTC.

ClawSweeper review

What this changes

This PR derives Talk agent-consult authority from Gateway scopes and propagates a read-only tool allowlist for operator.talk callers across browser, relay, and legacy tool-call paths.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open for maintainer approval of the intended least-privilege boundary. No blocking patch defect was found: the branch consistently carries Talk scope-derived authority through browser, relay, and legacy tool-call consults, but intentionally removes accidental mutation capability from Talk-only clients.

Priority: P1
Reviewed head: 4424b9bf5d939a7f965bd639eeaacc888000cbc4
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation is focused and source-backed, with maintainer acceptance of the intentional scope boundary still required.
Proof confidence 🌊 off-meta tidepool Not applicable: This is maintainer-authored work; the external-contributor proof gate does not apply, though exact-head validation should still include the focused Gateway boundary tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is maintainer-authored work; the external-contributor proof gate does not apply, though exact-head validation should still include the focused Gateway boundary tests.
Evidence reviewed 8 items Documented scope contract: Voice-node setup grants only operator.read and operator.talk and explicitly says it cannot send messages or mutate configuration; the requested boundary aligns the implementation with that contract.
Canonical authority calculation: The new resolver gives admin callers owner authority, write callers unrestricted non-owner authority, and all narrower callers the existing safe read-only allowlist.
All Talk consult entry points: Browser session creation, relay session creation, and legacy Talk tool calls each pass the scope-derived authority into their respective consult path.
Findings None None.
Security None None.

How this fits together

Gateway Talk sessions can delegate voice requests to embedded agents. This change maps the authenticated caller scope to a tool boundary, then passes that boundary into the delegated agent run or chat dispatch.

flowchart LR
  A[Authenticated Talk scopes] --> B[Talk session or tool-call handler]
  B --> C[Consult authority decision]
  C --> D[Embedded agent or chat dispatch]
  D --> E[Runtime tool allowlist]
  E --> F[Voice consult response]
Loading

Decision needed

Question Recommendation
Should Talk-only credentials be enforced as read-only for embedded agent consults, with mutable consult behavior requiring operator.write? Enforce the documented Talk-only boundary: Merge the scope-derived read-only allowlist and require operator.write for integrations that need mutable agent tools.

Why: This is an intentional compatibility change at an authenticated delegation boundary; source and docs support least privilege, but accepting removal of previously reachable accidental capability is a maintainer security-policy choice.

Before merge

  • Resolve merge risk (P1) - Talk-only clients that accidentally relied on state-changing consult tools will lose that unintended capability after upgrade; documented voice-node tokens already promise no mutation access.
  • Resolve merge risk (P1) - This security repair adds net +54 production lines to synchronize three entry points; its extra surface is justified only if maintainers accept one explicit scope-to-authority boundary.
  • Resolve merge risk (P1) - The local checkout could not hydrate the exact current-main source blobs offline, so a full-checkout current-main comparison remains required before landing.
  • Complete next step (P2) - Human approval is required because the patch deliberately removes unintended mutable capability from Talk-only credentials.
Agent review details

Security

None.

PR surface

Source +54, Tests +74. Total +128 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 8 58 4 +54
Tests 3 80 6 +74
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 138 10 +128

Review metrics

Metric Value Why it matters
Production versus test delta production +58/-4 (net +54); tests +80/-6 The production growth propagates one security boundary across three existing Talk consult routes and should remain limited to that canonical path.

Merge-risk options

Maintainer options:

  1. Accept the least-privilege upgrade boundary (recommended)
    Confirm that Talk-only integrations must remain read-only and merge after full-checkout current-main and exact-head validation.
  2. Pause for a different capability policy
    Keep the PR open if maintainers want Talk-only callers to retain any mutable tools, then define that contract explicitly.

Technical review

Best possible solution:

Retain the single scope-to-authority resolver: Talk-only credentials stay on the documented read-only set, while integrations that need state changes use operator.write and admin-only behavior remains owner-scoped.

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

No runtime reproduction was run in this read-only review, but the pre-fix tool-call path directly dispatched an unbounded chat turn and the focused boundary tests identify the constrained replacement path.

Is this the best way to solve the issue?

Yes. Resolving authority once from authenticated scopes and carrying the existing safe allowlist to each consumer is cleaner than adding tool-specific denials at downstream call sites.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: A Talk-only caller can otherwise delegate agent work with tools beyond its authenticated capability.
  • merge-risk: 🚨 compatibility: Existing Talk-only clients that relied on unintended mutable consult tools will change behavior after upgrade.
  • merge-risk: 🚨 security-boundary: The PR changes how authenticated Gateway scopes constrain delegated agent-tool authority.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is maintainer-authored work; the external-contributor proof gate does not apply, though exact-head validation should still include the focused Gateway boundary tests.

Evidence

What I checked:

Likely related people:

  • steipete: Recent mainline history for the Talk consult path points to the Gateway authoritative-facts refactor. (role: recent Gateway refactor author; confidence: high; commits: 4eb6aa375f51, 57e862980be1; files: src/gateway/talk-agent-consult.ts, src/gateway/server-methods/talk-client.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Verify the exact current-main comparison in a complete checkout and record maintainer acceptance of the Talk-only upgrade boundary.

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-17T20:32:45.913Z sha 4424b9b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T21:10:46.383Z sha 4424b9b :: needs maintainer review before merge. :: none

@joshavant joshavant closed this Aug 17, 2026
@joshavant joshavant reopened this Aug 17, 2026
@joshavant joshavant closed this Aug 17, 2026
@joshavant joshavant reopened this Aug 17, 2026
@joshavant
joshavant merged commit 0b75ea3 into main Aug 17, 2026
967 of 1200 checks passed
@joshavant
joshavant deleted the security/limit-talk-consults branch August 17, 2026 21:50
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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