Repository navigation
fix(validate): do not read a mount's own path in the ownership table as a project-code leak - #118
Merged
Merged
Conversation
pasrom
force-pushed
the
fix/ownership-gate-leak
branch
from
November 27, 2026 21:11
4feb43d to
156e559
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.
In a brain with
project_prefix, a mount inside a project folder (for exampleprojects/acme01/manual) puts its path into the generated table of## Ownershipin CONVENTIONS.md. The code-leak scan then reportedgate-leak:codeon CONVENTIONS.md, so upgrading such a brain to 1.27.0 fails validate.The code scan of CONVENTIONS.md now blanks one cell per mount: the Mount cell km writes inside the generated block, for a path under
project_prefixthat is a gitlink in the index (so it names its own project folder, as .gitmodules does). Everything else is scanned as before: the other cells of the generated table (url, branch, km-owns), a row for a path that is no mount, a code hand-written into the block, the hand-written topics table and all text outside the markers. The secret and term scans are unchanged.An automated security review flagged the first version, which skipped the whole generated block (a hand edit between the markers would have bypassed the scan); this version blanks only the exact cells.
Tests
gate_smoke, with a real submodule at projects/acme01/manual:
Mutation: without the blanking the first case fails. gate 397/0, ownership 44/0, index 82/0, team 285/0 locally.