Repository navigation
fix(reads): enforce workspace scope in session fallback and relationship census - #705
Conversation
Co-authored-by: tteon <52625664+tteon@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c6a179abd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Modified Files: src/seocho/session.py, src/seocho/local_engine.py, src/seocho/index/pipeline.py, tests/seocho/test_chunk_fallback.py, tests/seocho/test_ontology_context.py
Severity: High
Vulnerability: Several read queries in
session.py,local_engine.py, andpipeline.pyexecuting dynamic Cypher viagraph_store.query()were missing explicitenforce_workspace_filter=Truechecks, and in one case missed theworkspace_idCypher parameter entirely. This allowed theoretical tenant-isolation bypasses where cross-tenant nodes could be queried.Impact: An attacker interacting with a pipeline or session could potentially extract or count node statistics belonging to other tenants by forging or passing cross-tenant IDs.
Fix: Updated the
graph_store.query()invocations to passworkspace_id=self.workspace_idandenforce_workspace_filter=Trueas kwargs, explicitly modifying the Cypher query insession.pyto enforcen._workspace_id = $workspace_id. Also updated mock test stores intest_chunk_fallback.pyandtest_ontology_context.pyto gracefully accept**kwargsso tests pass correctly.Validation: Verified locally via pytest unit tests (
tests/seocho/test_chunk_fallback.pyandtests/seocho/test_ontology_context.py) and ran the full CI scriptbash scripts/ci/run_basic_ci.sh.Risks: Minor risk of regressions if any backend implementations of
GraphStoredo not adhere to the baseGraphStorecontract (which does accept these kwargs). Test mocks have been updated to mitigate this.PR created automatically by Jules for task 2632270074069326120 started by @tteon
Maintainer integration review (2026-10-13)
The domain relationship census scopes a, b and r to the workspace. Added session fallback and census regressions; chunk fallback tests assert the enforcement arguments. Targeted tests: 27 passed.
Validation of the exact combined changes on current main:
bash scripts/ci/run_basic_ci.sh— 1,252 passed, 3 skipped; all remaining lint/type/import/root/env/identity gates passed.bash scripts/ci/check-doc-contracts.shpassed. Local tracking: seocho-xlo1. Source changes remain in their owning SDK modules; local agent state stays untracked.