Skip to content

fix(gateway): revoke attach grants on deletion - #105029

Closed
arcabotai wants to merge 1 commit into
openclaw:mainfrom
arcabotai:cad/attach-grant-session-revocation
Closed

arcabotai wants to merge 1 commit into
openclaw:mainfrom
arcabotai:cad/attach-grant-session-revocation

Conversation

@arcabotai

@arcabotai arcabotai commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • canonicalize MCP attach grants onto the resolved logical session key
  • revoke outstanding attach grants from the committed session-identity deletion event, regardless of deletion caller
  • revoke all grants owned by an agent after the agent-config deletion commit
  • cover RPC deletion, cron continuation cleanup, and plugin/harness initialization rollback
  • preserve unrelated agent/session grants and keep reset/archive semantics unchanged

What Problem This Solves

attach.grant previously stored the caller-provided session key verbatim. Session deletion resolves aliases to a canonical key, but no production deletion path revoked attach grants. As a result:

  • deleting a session could leave its bearer valid until TTL expiry
  • alias-bound grants could not be reliably revoked by canonical session deletion
  • deleting an agent could leave grants for its removed sessions valid

Codex treats the configured environment bearer as a persistent MCP credential, so lifecycle revocation belongs on the OpenClaw server boundary.

Ownership and ordering

  • Grant creation uses the existing session-access resolver instead of adding a second canonicalization policy.
  • The grant store subscribes once, on first mint, to the existing session-identity mutation boundary.
  • Only committed delete mutations revoke grants, synchronously after the session transaction commits. Every deleted canonical/alias key in the mutation is covered, so RPC deletion, cron cleanup, and plugin/harness rollback share one owner boundary.
  • Failed/no-op deletions emit no committed deletion event. Reset emits reset, which the listener deliberately ignores.
  • Agent grants are also revoked after the agent-config deletion commit. Subsequent session-store purge and file trash operations are best-effort and do not roll the agent back.
  • CLI --print-config behavior is unchanged; normal spawned attach clients still explicitly revoke on exit/error.

Evidence

Exact-head live gateway/MCP proof and CI

Reproducible portable harness and complete sanitized command transcript: public proof artifact

The live artifact runs the unmodified production source through the repository's pnpm openclaw launcher on the exact current head. Current-head CI independently passed the production build, type, lint, boundary, security, and relevant test shards; its sole remaining failure is an unrelated current-base dead-export allowlist mismatch in untouched Control UI files.

The artifact records distinct persisted session keys plus non-secret SHA-256 prefixes for the target and unrelated bearers. The same target fingerprint appears before and after sessions.delete, while the unrelated fingerprint remains authorized.

Environment: Daytona Linux x86_64, Node v22.22.1
Exact PR head: fb137a71e7288e7e166a717bfec8ae8f2fecf562

install_pass=1
runtime_mode=tsx-production-source
current_head_ci_build=passed
gateway_ready=1
sessions_created=2
grants_minted=2

invalid_control_status=401
bound_grant_before_delete_status=200
unrelated_grant_before_delete_status=200
session_delete_committed=1
bound_grant_after_delete_status=401
unrelated_grant_after_delete_status=200

invalid_control_body={"error":"unauthorized"}
revoked_grant_body={"error":"unauthorized"}
unrelated_grant_body={"ok":true}
response_bodies_verified=1
proof_result=pass

Production paths exercised:

  • started the real Gateway from the exact PR head through the repository's source launcher
  • created two persisted sessions through sessions.patch
  • minted two grants through the real attach --print-config → attach.grant path
  • exercised bearer authorization through MCP loopback DELETE /mcp
  • committed target deletion through sessions.delete
  • retried the same target bearer and observed 401 unauthorized
  • retried the unrelated bearer and observed continued 200 {"ok":true}

The proof used synthetic credentials only. Token values and temporary MCP config paths were deleted before sandbox teardown; the retained transcript contains outcomes only.

Focused regression suite

node scripts/run-vitest.mjs \
  src/gateway/mcp-grant-store.test.ts \
  src/gateway/server-methods/attach.test.ts \
  src/gateway/server-methods/agents-mutate.test.ts \
  src/gateway/server.sessions.delete-lifecycle.test.ts \
  src/tasks/cron-run-continuation-cleanup.integration.test.ts \
  src/plugins/runtime/runtime-agent.test.ts

3 focused Vitest shards passed on the exact current head

Post-format verification:

oxfmt --check: passed on all 10 changed files
oxlint: 0 warnings / 0 errors on all 10 changed files
check:test-types: passed
runtime import cycles: 0
full build: passed

Regression coverage exercises the real attach.grant alias flow, canonical response and storage, raw legacy alias-only rows, direct deletion-event filtering, RPC session deletion, real persisted cron continuation cleanup, ordinary and plugin-owned initialization rollback, unrelated-grant preservation, reset preservation, and agent-scoped revocation.

Codex contract checked

  • codex-rs/codex-mcp/src/connection_manager.rs: MCP client startup and environment bearer configuration
  • codex-rs/rmcp-client/src/auth_status.rs: bearer_token_env_var authentication and streamable HTTP bearer behavior

No config/default surface changes. No database migration.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Jul 12, 2026
@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from 3afd9f4 to c716984 Compare July 12, 2026 05:47
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 12, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 2, 2026, 5:06 AM ET / 09:06 UTC.

ClawSweeper review

What this changes

The PR binds MCP attach bearer grants to canonical session keys and revokes matching grants after committed session deletion or agent deletion.

Merge readiness

⚠️ Needs maintainer review before merge - 5 items remain

Keep this PR open for a current-main rebase and owner review. The session-side defect remains on the stated current main, and the PR has credible exact-head Gateway/MCP behavior proof, but its agent-deletion hook targets an older handler shape that current main has replaced; the revocation must be relocated into the current deletion lifecycle before this security-boundary change can merge.

Priority: P2
Reviewed head: fb137a71e7288e7e166a717bfec8ae8f2fecf562

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The live behavior evidence is strong, but the branch needs a focused current-main integration repair before it is merge-ready.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body supplies an exact-head, redacted real Gateway/MCP run that minted two grants, deleted one persisted session, observed its bearer change from 200 to 401, and preserved the unrelated bearer at 200; repeat this proof after rebasing and redact all private endpoint or credential data.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body supplies an exact-head, redacted real Gateway/MCP run that minted two grants, deleted one persisted session, observed its bearer change from 200 to 401, and preserved the unrelated bearer at 200; repeat this proof after rebasing and redact all private endpoint or credential data.
Evidence reviewed 6 items Current main still has the session-revocation gap: At the stated current-main commit, attach grants are stored only by the provided trimmed session key and can be revoked only through an explicit per-session helper; minting does not subscribe to session-identity deletion mutations.
Current main still emits the authoritative deletion event: The SQLite lifecycle owner emits a committed delete mutation after the write transaction, with the deleted row keys as the event payload. This is the correct session-side owner boundary for revocation.
The branch implements session deletion observation: The proposed grant store registers a deletion observer on first mint and revokes every grant whose canonical session key appears in the committed deletion mutation.
Findings 1 actionable finding [P1] Move agent-grant revocation into the current delete lifecycle
Security Needs attention Stale agent-deletion hook can omit bearer revocation: The PR adds agent-scoped revocation to an old deletion handler while current main has moved the authoritative delete sequence into a journaled lifecycle; rebasing without relocating this call can leave deleted-agent grants authorized until expiry.
Codex bearer contract was not directly inspectable: Repository policy requires direct inspection of sibling Codex source before a Codex-related security verdict. The required ../codex checkout is absent and cannot be cloned in this read-only, network-restricted review environment.

How this fits together

The Gateway issues short-lived attach bearer tokens that authorize MCP loopback requests for a session. Session and agent lifecycle code later deletes those scopes, so the grant store must invalidate the matching in-memory credential after the authoritative deletion commit.

flowchart LR
  A[Attach client] --> B[Gateway attach grant]
  B --> C[Canonical session lookup]
  C --> D[In-memory bearer grant]
  E[Session or agent deletion] --> F[Committed lifecycle mutation]
  F --> G[Grant revocation]
  D --> H[MCP authorization]
  G --> H
Loading

Before merge

  • Move agent-grant revocation into the current delete lifecycle (P1) - This placement is in the old agent-delete handler, but current main now deletes agents through a journaled recovery flow. Rebase and invoke the revoke immediately after that flow’s authoritative config deletion commit; otherwise the stated agent-grant guarantee is lost when the stale patch is reconciled. This was visible at the prior reviewed head, whose next-step note already called out the stale lifecycle layout.
  • Resolve security concern: Stale agent-deletion hook can omit bearer revocation - The PR adds agent-scoped revocation to an old deletion handler while current main has moved the authoritative delete sequence into a journaled lifecycle; rebasing without relocating this call can leave deleted-agent grants authorized until expiry.
  • Resolve security concern: Codex bearer contract was not directly inspectable - Repository policy requires direct inspection of sibling Codex source before a Codex-related security verdict. The required ../codex checkout is absent and cannot be cloned in this read-only, network-restricted review environment.
  • Resolve merge risk (P1) - The branch’s agent-deletion call is attached to an obsolete handler shape; a mechanical rebase could omit agent-scoped revocation unless it is moved into current main’s journaled deletion flow.
  • Resolve merge risk (P1) - This changes the authorization lifetime of MCP bearer credentials. The repository policy requires direct Codex source inspection for a Codex-related security verdict, but the required sibling ../codex checkout is absent and the read-only environment cannot create it.

Findings

  • [P1] Move agent-grant revocation into the current delete lifecycle — src/gateway/server-methods/agents.ts:738
  • [high] Stale agent-deletion hook can omit bearer revocation — src/gateway/server-methods/agents.ts:738
  • [low] Codex bearer contract was not directly inspectable
Agent review details

Security

Needs attention: The patch narrows an MCP bearer credential lifetime, but its stale agent-delete integration must be repaired and the required direct Codex-source contract check remains unavailable in this read-only checkout.

PR surface

Source +37, Tests +268. Total +305 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 4 42 5 +37
Tests 6 274 6 +268
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 316 11 +305

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: src/config/sessions/session-accessor.sqlite.ts, serialized state: src/tasks/cron-run-continuation-cleanup.integration.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Rebase onto the current deletion owner (recommended)
    Move the agent-grant revoke into current main’s journaled agent deletion flow and retain the existing committed session-identity event as the session-side revocation boundary.
  2. Pause for owner review
    Pause this PR if the Gateway and session-lifecycle owners prefer a different permanent bearer-revocation boundary after reviewing the current deletion transaction.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Rebase onto current main, relocate agent-grant revocation after the authoritative agent-config deletion commit, preserve committed session-identity deletion revocation, and rerun focused lifecycle tests plus exact-head Gateway/MCP proof.

Technical review

Best possible solution:

Rebase the session-event revocation onto current main, place agent-scoped revocation immediately after the current authoritative agent deletion commit, then repeat focused lifecycle coverage and exact-head Gateway/MCP authorization proof before owner approval.

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

Yes, source establishes the current-main path: attach grants remain in the in-memory store until TTL expiry or explicit revoke, while committed session deletion only emits an observer event that no current grant-store listener consumes. The PR body also records an exact-head live Gateway/MCP authorization run, although the linked artifact could not be fetched from this restricted environment.

Is this the best way to solve the issue?

No, not as the branch currently stands. Centralizing session revocation on the committed identity-deletion event is the right owner boundary, but the agent revocation must be relocated into current main’s journaled deletion lifecycle rather than the obsolete handler placement.

Full review comments:

  • [P1] Move agent-grant revocation into the current delete lifecycle — src/gateway/server-methods/agents.ts:738
    This placement is in the old agent-delete handler, but current main now deletes agents through a journaled recovery flow. Rebase and invoke the revoke immediately after that flow’s authoritative config deletion commit; otherwise the stated agent-grant guarantee is lost when the stale patch is reconciled. This was visible at the prior reviewed head, whose next-step note already called out the stale lifecycle layout.
    Confidence: 0.93
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): The PR body supplies an exact-head, redacted real Gateway/MCP run that minted two grants, deleted one persisted session, observed its bearer change from 200 to 401, and preserved the unrelated bearer at 200; repeat this proof after rebasing and redact all private endpoint or credential data.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded Gateway credential-lifecycle repair with a real security impact but no evidence of an active outage or broad exploitation.
  • merge-risk: 🚨 security-boundary: Merging changes when MCP bearer credentials remain authorized after session or agent lifecycle events.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): The PR body supplies an exact-head, redacted real Gateway/MCP run that minted two grants, deleted one persisted session, observed its bearer change from 200 to 401, and preserved the unrelated bearer at 200; repeat this proof after rebasing and redact all private endpoint or credential data.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies an exact-head, redacted real Gateway/MCP run that minted two grants, deleted one persisted session, observed its bearer change from 200 to 401, and preserved the unrelated bearer at 200; repeat this proof after rebasing and redact all private endpoint or credential data.

Evidence

Security concerns:

  • [high] Stale agent-deletion hook can omit bearer revocation — src/gateway/server-methods/agents.ts:738
    The PR adds agent-scoped revocation to an old deletion handler while current main has moved the authoritative delete sequence into a journaled lifecycle; rebasing without relocating this call can leave deleted-agent grants authorized until expiry.
    Confidence: 0.93
  • [low] Codex bearer contract was not directly inspectable
    Repository policy requires direct inspection of sibling Codex source before a Codex-related security verdict. The required ../codex checkout is absent and cannot be cloned in this read-only, network-restricted review environment.
    Confidence: 0.99

What I checked:

  • Current main still has the session-revocation gap: At the stated current-main commit, attach grants are stored only by the provided trimmed session key and can be revoked only through an explicit per-session helper; minting does not subscribe to session-identity deletion mutations. (src/gateway/mcp-grant-store.ts:99, a154b4faea41)
  • Current main still emits the authoritative deletion event: The SQLite lifecycle owner emits a committed delete mutation after the write transaction, with the deleted row keys as the event payload. This is the correct session-side owner boundary for revocation. (src/config/sessions/session-accessor.sqlite-lifecycle.ts:468, a154b4faea41)
  • The branch implements session deletion observation: The proposed grant store registers a deletion observer on first mint and revokes every grant whose canonical session key appears in the committed deletion mutation. (src/gateway/mcp-grant-store.ts:84, fb137a71e728)
  • Agent-deletion integration is stale against current main: The PR inserts agent-grant revocation immediately after the old simple agent-config commit. At the stated current main, agent deletion has moved into a journaled recovery flow that performs the session-store purge later, so the branch placement must be reconciled rather than merged as-is. (src/gateway/server-methods/agents.ts:738, a154b4faea41)
  • Recent ownership history: The current grant-store implementation was carried through the recent Gateway route-staging refactor, while the lifecycle file is currently owned by a newer split that this checkout cannot fully blame because its promisor object is unavailable locally. (src/gateway/mcp-grant-store.ts:89, d15d6c51e0bc)
  • Release and branch provenance: The PR head is an unmerged commit dated 2026-07-12T05:46:33Z; it is not a release-contained implementation. The linked attach-TTL PR is a separate merged CLI validation change, not a replacement for lifecycle revocation. (src/gateway/mcp-grant-store.ts:99, fb137a71e728)

Likely related people:

  • Peter Steinberger: Current grant-store lines blame to the recent Gateway route-staging refactor, and the available path history also shows later session-lifecycle work under the same author. (role: recent Gateway and lifecycle refactor contributor; confidence: medium; commits: d15d6c51e0bc, f5c985d92c35; files: src/gateway/mcp-grant-store.ts, src/config/sessions/session-accessor.sqlite-lifecycle.ts, src/gateway/server-methods/agents.ts)

Rank-up moves

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

  • Rebase the agent deletion hook into current main’s journaled lifecycle.
  • Rerun the focused deletion coverage and exact-head Gateway/MCP bearer proof after the rebase.
  • Have a reviewer with the required sibling Codex source checkout verify the bearer-token contract.

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 (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-12T20:13:50.643Z sha 235dc97fc368d24cfec3a095da4793e44eef4f42 :: needs real behavior proof before merge. :: [P2] Assert the optional handlers before invoking them | [P2] Assert the attach and delete handlers before calling them
  • reviewed 2026-07-12T20:31:03.040Z sha 64307952c5890217aa6a8459beb4e23af3d7590f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T20:45:31.386Z sha 64307952c5890217aa6a8459beb4e23af3d7590f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T21:21:38.437Z sha fb137a7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-12T21:28:53.228Z sha fb137a7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-12T21:59:44.865Z sha fb137a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-12T22:06:04.298Z sha fb137a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T16:27:06.689Z sha fb137a7 :: needs maintainer review before merge. :: none

@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from c716984 to cb0c282 Compare July 12, 2026 11:14
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 12, 2026
@arcabotai

Copy link
Copy Markdown
Contributor Author

Exact-head live MCP proof is now in the PR body for cb0c282c196e165bf930e163ccd77aa21f22cf70.

The production-path run built and started the real Gateway, created two persisted sessions, minted two real attach grants, and exercised MCP loopback bearer authorization:

invalid control                         401
bound grant before target deletion     200
unrelated grant before deletion        200
sessions.delete committed               yes
same bound grant after deletion         401 unauthorized
unrelated grant after deletion           200 {"ok":true}

The same exact head also passed the focused suite: 10 files / 216 tests, plus a full build on macOS arm64 with Node v22.22.0. Synthetic tokens and temporary MCP config paths were deleted; only redacted outcomes were retained.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 12, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 12, 2026
@arcabotai

Copy link
Copy Markdown
Contributor Author

Follow-up evidence hardening: I published the exact executable harness and its complete sanitized command transcript: https://gist.github.com/arcabotai/22ed734eea1bbce29f5977aff184e341

The transcript includes distinct persisted session keys, non-secret bearer fingerprint prefixes, exact RPC ordering, response bodies, and the same target fingerprint before/after deletion. This makes the live proof independently inspectable rather than relying only on the summarized outcomes in the PR body.

@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from cb0c282 to 235dc97 Compare July 12, 2026 20:04
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 12, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 12, 2026
@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from 6430795 to 1884daf Compare July 12, 2026 20:56
@arcabotai

Copy link
Copy Markdown
Contributor Author

Follow-up hardening on exact head 1884dafa52af3bbbbe08a50618d6c5fb0ebbbfb7: an independent security review found that a raw legacy alias-only SQLite row could emit only its physical key while the minted grant was stored under the canonical logical key. The committed delete event now includes both the normalized canonical target and every physically removed key. A regression directly seeds a raw alias-only row, grants through the alias, deletes through the production handler, and checks target revocation plus unrelated-grant survival. CI is running; exact-head live proof will be refreshed after it is green.

@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from 1884daf to 78667c1 Compare July 12, 2026 21:05
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 12, 2026
@arcabotai
arcabotai force-pushed the cad/attach-grant-session-revocation branch from 78667c1 to fb137a7 Compare July 12, 2026 21:13
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 12, 2026
@arcabotai

Copy link
Copy Markdown
Contributor Author

Exact-head live proof is now refreshed for fb137a71e7288e7e166a717bfec8ae8f2fecf562: portable harness + sanitized transcript at https://gist.github.com/arcabotai/22ed734eea1bbce29f5977aff184e341. It launched the real Gateway through the repository source runner, created two persisted sessions, minted two real attach grants, committed sessions.delete, observed target bearer 200 → 401, and preserved the unrelated bearer at 200. The harness also fixed its prior transcript-only redaction so the published script now sends the actual synthetic bearer while retaining only SHA-256 prefixes in evidence.

@arcabotai

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The requested exact-final-head proof now exists for fb137a71e7288e7e166a717bfec8ae8f2fecf562: https://gist.github.com/arcabotai/22ed734eea1bbce29f5977aff184e341. It launches the real Gateway through pnpm openclaw, mints two real attach bearers, commits deletion, verifies target 200 → 401, and verifies unrelated remains 200. The script is portable and the transcript is sanitized.

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 12, 2026
@steipete steipete self-assigned this Jul 21, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 1, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Aug 9, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M stale Marked as stale due to inactivity 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.

2 participants