Skip to content

fix: enforce delegated LCM retrieval scopes#768

Merged
100yenadmin merged 1 commit into
mainfrom
fix/p0-conversation-scope-auth
May 30, 2026
Merged

fix: enforce delegated LCM retrieval scopes#768
100yenadmin merged 1 commit into
mainfrom
fix/p0-conversation-scope-auth

Conversation

@100yenadmin

Copy link
Copy Markdown
Collaborator

Summary

  • Enforce delegated expansion grants before LCM retrieval tools can read conversation state.
  • Reject sub-agent retrieval without a propagated grant, reject explicit foreign conversation IDs, and downgrade delegated allConversations to the grant's allowed conversation IDs.
  • Fail closed for delegated lcm_expand when the grant spans multiple conversations, since expansion requires a single concrete conversation.

Fixes #70.

Validation

  • git diff --check
  • npm exec vitest run test/lcm-tools.test.ts test/lcm-expand-tool.test.ts test/lcm-expand-query-tool.test.ts -- --pool=threads --maxWorkers=1 --minWorkers=1
  • npm run build

Review Notes

  • Two adversarial rereviews cleared the original cross-session leak and the follow-up sessionId-as-subagent-key bypass.
  • The review also cleared delegated allConversations scoping and multi-conversation delegated expansion fail-closed coverage.

@100yenadmin 100yenadmin added bug Something isn't working priority:P0 Immediate security, data loss, production outage, or repo-wide blocker linked-pr Has an identified PR or merge candidate labels May 30, 2026
@100yenadmin 100yenadmin merged commit 535f4e2 into main May 30, 2026
4 checks passed
@100yenadmin 100yenadmin deleted the fix/p0-conversation-scope-auth branch May 30, 2026 14:54
@github-actions github-actions Bot mentioned this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working linked-pr Has an identified PR or merge candidate priority:P0 Immediate security, data loss, production outage, or repo-wide blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: Cross-session data leakage via lcm_grep and lcm_describe (auth bypass)

1 participant