Repository navigation
fix(cli): port Bazel socket.json trust gate to v1.x - #1683
Open
John-David Dalton (jdalton) wants to merge 1 commit into
Open
John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
John-David Dalton (jdalton)
requested a review
from Josh Horecny (hank-sc0rpio)
October 31, 2026 23:49
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.
Ports the Bazel socket.json trust boundary from PR #1632 to the v1.x command layout. Adds --trust-socket-json; rejects repository-controlled Bazel executables and options, and output paths outside the project, unless trusted. Command-line flags continue to override socket.json. Adds resolver and command tests.
Note
Medium Risk
Changes default behavior for scans of untrusted repos and gates which Bazel binary and flags run, but the change is intentional hardening with an explicit escape hatch.
Overview
socket manifest bazelno longer honors repository-controlled Bazel execution settings fromsocket.jsonunless the user opts in. By default it now rejectsbazel/bin,bazelFlags,bazelRc, andbazelOutputBasefrom the scanned repo’s config, and blocks anoutpath that resolves outside the project (including symlink escapes). Command-line flags still override without trusting the file.The inline defaulting logic in
cmd-manifest-bazelis replaced byresolveBazelManifestSettingsin a newbazel-socket-json-trustmodule, wired through a--trust-socket-jsonflag (default off) with structured failure output for JSON and human modes. Resolver and command tests cover refusal, override, trust, and path containment.Reviewed by Cursor Bugbot for commit 4a14490. Configure here.