fix(security): action-item containment (review findings) + ops-hygiene sweep#162
Merged
Conversation
…project-bound task queries, injection framing + ops-hygiene sweep Independent security review (2026-07-10) findings: - Critical: /api/knowledge/[id]/promote had no action_item guard and the Oracle task block queried org-wide accessibleProjectIds — a promoted meeting item would leak into every project's Oracle. Fixed threefold: promote + fork 422 on action_item; accessibleProjectIds removed from the entire task-query path; regression test pins the non-leak. - Important: cross-user prompt-injection surface — task text authored by one member lands in another's agent context. Injection block now frames items as user-authored data, not instructions. Also in this sweep: restore-drill procedure in DEPLOY_CHECKLIST (first drill passed 2026-07-10), KNOWN_ISSUES §0m (drill, KEA meta-noise prune, self-referential gate window), GUIDELINES §11 + KNOWLEDGE containment invariant extended with the visibility-travel exclusion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KfujUMcYWzRkwHmG8RYTDM
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAction items are now project-bound across query, Oracle, promotion, and fork flows. Their injected text receives untrusted-content framing. Tests and documentation cover containment, while deployment documentation adds a PostgreSQL restore drill. ChangesAction-item containment
Backup restore operations
Estimated code review effort: 3 (Moderate) | ~25 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two workstreams, one honest PR:
Security fixes (independent adversarial review, 2026-07-10):
action_itemrows could be promoted to org visibility (no type guard) and the Oracle task block queried with org-wideaccessibleProjectIds→ any project member could broadcast meeting content (assignee email, task text) into every other project's Oracle. Fixed with defense in depth: promote and fork now 422 onaction_item;accessibleProjectIdsremoved from the entire task-query path (baseWherehard-bounds to the active project); regression test pins that an org-visible foreign action item never appears in listings nor can be resolved cross-project.buildKnowledgeWhereV2, parameterized tag queries (no SQLi), resolve containment,RULE_TYPES_PREDICATEcoverage.Ops hygiene:
No Prisma migrations.
Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01KfujUMcYWzRkwHmG8RYTDM
Summary by CodeRabbit
Bug Fixes
Documentation