Repository navigation
Harden catalog, plugin, sync, config and review paths (SR-4a) - #327
Open
jothimani-rajendran wants to merge 15 commits into
Open
jothimani-rajendran wants to merge 15 commits into
jothimani-rajendran wants to merge 15 commits into
Conversation
Build checks every generated path under the target and stops on a symlink before writing anything. Covers the in-place default. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…he disk A catalog source spelled as a URL or scp-style address is always remote. fetch_catalog, require_on_branch and is_local_source no longer test the filesystem for it, so the published-commit check cannot be switched off by a lookalike directory. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The area/<id> fallback now requires the resolved pack to stay inside the catalog, a linked pack directory is refused, and copytree no longer follows links. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
… source record_provenance, the success line and pin errors use the source without credentials. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…rsion 2 Names and contents are framed by length under a domain tag. A version 1 hash still matches a pack with no NUL byte (where it was unambiguous); chock sync rewrites chock.lock as version 2. Marketplace locks keep the old hash for now. The platform-parity golden is recomputed independently. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
install_merged checks the config path for links and writes it with the fd-pinned writer used for MCP config; a link anywhere on the path refuses the sync. Generic and owned-file installers are not changed here. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…idance policies.disabled keeps only string ids; the guidance depth guard counts nesting from parser events instead of characters. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The id is used as a file name under --out; one that is not a policy id is an error. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
check_registry takes built-ins and the base's declared checks; the head's checks section is ignored when a base ref is given. Existing tests that defined a check in the head now define it on the base; the one that asserted a head-added check runs now asserts it does not. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…f it from the merge on required_checks drops names the base does not define; require says which are deferred. A check the base defines and the head requires still applies at once. docs/reviewer-evidence.md states the new contract. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Import order only. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…kfile_version 2" This reverts commit 951d2e2. The pack hash also feeds values published outside chock.lock; changing it needs a cross-repo plan and becomes its own item. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…er requires nor defines A check the base requires stays required even when undefined, so a base misconfiguration still fails instead of passing with a notice. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
tests/test_review_require.py passed the 300-line review budget; the checks-from-base tests now live in tests/test_review_checks_from_base.py. No test changed. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
jothimani-rajendran
marked this pull request as ready for review
October 25, 2026 14:14
This branch has not been deployed
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.
What
Hardening of paths outside the gate runtime, from the internal security review (plan item SR-4a). One commit per finding (or tightly related pair); each has a test that fails before the change and passes after.
chock plugin buildrefuses a symlink at, or above, any path it generates, and writes nothing.user@host:pathis always remote; local vs remote is decided from the text, not from what exists in the working directory. The published-commit checks no longer depend on the filesystem.<area>/<id>lookup gets the same containment check as a registry entry; a linked pack directory is refused; the copy does not follow links.user:token@is dropped from a--fromURL before it is recorded inchock.lock, printed, or put in an error.policies.disabledkeeps only string ids; the guidance nesting limit is measured on parser events.checkssection defines nothing and never runs. A check a PR both adds and requires is not required of that PR;requiresays it is required from the merge on.docs/reviewer-evidence.mdstates the contract.The pack-hash framing change was committed and then reverted in this PR (separate item: the hash is also published outside
chock.lock).Notes for review
src/chock/gate/,gateway/,guardrails/,cli.pyorlaunch.shis touched, and the rendered runtime is unchanged. No.chock/file is written andchock syncwas not run.Definition of done
ruff check .andruff format --check .cleanchangelog.d/fragment per change; fragment check passespytest -qand CI: see the checks on this PR