fix(review): scope private review context by owner - #1582
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1582 +/- ##
=======================================
Coverage 95.46% 95.46%
=======================================
Files 202 202
Lines 21839 21839
Branches 7885 7885
=======================================
Hits 20849 20849
Misses 414 414
Partials 576 576
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary
Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. Removes the bare-repo-name fallback (`{repo}/review`) from `reviewContextFolders`, leaving only the owner-qualified `{owner}__{repo}/review` candidate. This correctly closes a cross-tenant review-prompt leakage path in multi-owner self-host deployments where two tenants share the same `GITTENSORY_REPO_CONFIG_DIR`: previously, `ownera/foo`'s guide in `foo/review/CLAUDE.md` would be served to `ownerb/foo`. The fix is at the right layer — review context is expressly distinct from manifest config — and the renamed test now asserts the bare-folder guide is NOT served (`{ guide: null, skills: [] }`), which is a real exercise of the changed branch, not a fabricated path. Nits (5)
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Closing — this isn't an attacker-reachable leak, and the fix reverses recently-shipped back-compat one-sidedly. The review-context folder names come from operator-set |
Motivation
{repo}/reviewfolders, allowing cross-owner collisions and leakage of private review prompt material to other repos.Description
reviewContextFoldersonly returns owner-qualified{owner}__{repo}/reviewcandidates, ensuring review prompts are owner-scoped.makeLocalReviewContextReaderdocumentation to state that review prompt material is owner-qualified only.test/unit/private-config.test.tsthat verifies bare repo-namereviewfolders are ignored for a different owner and that missing/invalid repos degrade to an empty review context.Testing
npm test -- --run test/unit/private-config.test.ts, which passed (20 tests).npm run typecheck, which passed.npm run test:coverage -- --run test/unit/private-config.test.ts, where tests passed but coverage generation failed withTypeError: jsTokens is not a functionfrom the local coverage provider.npm audit --audit-level=moderate, which was blocked by the registry audit endpoint returning403 Forbidden.Codex Task