Skip to content

Chip resolution: bot-to-bot sends / own-chat followups not author-checked or stripped (remainder of #106) #106

Closed

Description

@hsliuustc0106

Non-blocking finding from the independent review of #101.

The #53 chip gate (a dsh-session: reference must resolve through sessionOwnedBy for the author) covers channel send and room-post. The reviewer verified the DSH chip parser accepts both @[label](dsh-session:id) and bare dsh-session:id (so the gate's regex is a superset on those two endpoints) but left two paths open:

  1. answer-question / schedule-create: actor-authored text injected via agent.followup / delivered later. A chip naming a foreign session would, if DSH resolves it there, pull that snapshot into the target session (for a shared room, riding to members via attachReference). Note schedule-create authz reads body.sessionId while the endpoint reads body.target — worth a look on its own.
  2. Bot-authored text (group relays, bot→bot sends): if DSH resolves chips in bot messages, a member Bot could tunnel its own private chat into a shared room, bypassing the [Team] Isolate private context from shared room context #53 brief share. Pre-existing behavior, not a [Team] Isolate private context from shared room context #53 regression.

Acceptance: determine DSH's actual resolution surface (probe on a bench, or ask upstream), then either extend the author check to every path where actor- or bot-authored text becomes a session user message, or document why resolution cannot occur there.

Related: #53, #101, #90.

Activity

  1. Birfy commented on Oct 16, 2026

    @Birfy
    Collaborator

    Mostly fixed on main (566f1e6) by #135. One path remains; I changed the title to match.

    Done:

    1. answer-question / schedule-create: both run the author check (unshareableReference) now. It also decodes the base64url menu chips, so a foreign session can't hide in an encoded chip. schedule-create authz now keys off body.target (owner of the Bot or room), so a foreign target can't ride on an owned sessionId. Tests: context-sharing.test.js (foreign and own chips, encoded chips) and authz.test.js (schedule-create cannot hide a foreign target behind an owned sessionId).
    2. Bot-authored group posts: postToRoom strips dsh-session: chips (looped, so nested fragments can't rebuild one). A member Bot can no longer tunnel its own chat into a shared room. Test: a Bot post into a group drops chat-reference chips…. team.md records DSH's resolution surface (session-reference / attachReference on user-shaped followups).

    Remaining:

    • Bot-to-Bot sends and own-chat followups are not stripped or author-checked. fix(security): approval binding, chip authorship and task lifecycle follow-ups (#97 #106 #111) #135 deferred this and documents it as staying in that Bot's own chat. That reasoning doesn't cover a cross-owner Bot-to-Bot send (a granted Bot of another owner), where the snapshot would land in the other owner's Bot chat. Either strip or author-check chips on deliver for bot-authored text, or document why resolution can't happen there.

    Keeping this open for that.

  2. changed the title [-]Chip resolution beyond send/room-post: answer-question, schedule-create, bot-authored text (#53 follow-up)[/-] [+]Chip resolution: bot-to-bot sends / own-chat followups not author-checked or stripped (remainder of #106)[/+] on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions