fix(selfhost): protect private policy surfaces#1405
Merged
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 #1405 +/- ##
=======================================
Coverage 95.37% 95.38%
=======================================
Files 192 192
Lines 20866 20867 +1
Branches 7546 7545 -1
=======================================
+ Hits 19901 19904 +3
Misses 383 383
+ Partials 582 580 -2
🚀 New features to boost your workflow:
|
Revive #1405: rebased onto current main (resolved the predict_gate test against the changedPaths work in #1413 — both tests kept), fixed the #1413 test to store a PUBLIC repo_file manifest now that predict_gate reads public-only config, inlined publicSafeManifestPolicyFinding with a v8-ignore on the unreachable no-action arm, exported it, and added a focused unit test asserting the private blocked-path / test-expectation detail is redacted out of the public advisory.
138a784 to
c2ec70b
Compare
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.
Motivation
gittensory_predict_gate, local branch analysis, and public PR advisory/gate comments.Description
loadPublicRepoFocusManifest(...)so only the public repo-file manifest is used for those surfaces (keeps private mounted manifests out of public predictions).publicSafeManifestPolicyFinding(...)and an overrides table that removes exact blocked-path and test-expectation details while preserving enforcement and action text.setLocalManifestReader(...)and asserts thatgittensory_predict_gatestill predicts from the public repo-file snapshot and does not expose private blocked paths or test expectations.Testing
npx vitest run test/unit/mcp-predict-gate.test.ts test/unit/focus-manifest-loader.test.tsand the focused queue subset (-t "manifest|gittensory_predict_gate"), and those tests passed.npm run typecheck -- --pretty falseand local lint/checks (git diff --check) passed.npm run test:cibut it failed due to external/environmental issues (actionlint DNS retries and a Vitest coverage provider errorTypeError: jsTokens is not a function) so full CI was not completed here;npm audit --audit-level=moderatealso could not complete due to a registry 403.Codex Task