Repository navigation
fix(cli): gate socket.json bazel settings behind --trust-socket-json - #1632
Open
Josh Horecny (hank-sc0rpio) wants to merge 1 commit into
Open
Josh Horecny (hank-sc0rpio) wants to merge 1 commit into
Josh Horecny (hank-sc0rpio) wants to merge 1 commit into
Conversation
socket manifest bazel now treats the scanned repository's socket.json like the other manifest commands and the auto-manifest bazel path: bazel/bin, bazelFlags, bazelRc, and bazelOutputBase from socket.json are refused unless --trust-socket-json is passed, and an out path that resolves outside the project is refused the same way. Command-line flags still override socket.json without the trust flag.
Jonathon Klobucar (rocket-socket)
requested a review
from John-David Dalton (jdalton)
October 19, 2026 18:56
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.
Summary
socket manifest bazelnow handlessocket.jsonthe same way the other manifest commands and themanifest autoBazel path do.--trust-socket-json, the command refusesbazel/bin,bazelFlags,bazelRc, andbazelOutputBasefromsocket.json.outfromsocket.jsonthat points outside the project is refused the same way. A path inside the project still works without the flag.--bazel,--bazel-flags,--bazel-rc,--bazel-output-base,--out) still overridesocket.jsonwithout the trust flag.Behavior change: if your
socket.jsonsets a Bazel binary or Bazel options, pass--trust-socket-jsonor pass the matching flags directly.Tests
outinside vs. outside the project.socket.jsonbinnever reaches the extractor; with the flag, it is used.Note
Medium Risk
Changes execution and output-path trust boundaries when scanning untrusted repos; incorrect gating could break legitimate CI configs or weaken protection against malicious socket.json.
Overview
socket manifest bazelnow gates repositorysocket.jsondefaults behind--trust-socket-json, matching the trust model used elsewhere in manifest generation.Without the flag, the command refuses
defaults.manifest.bazelvalues that pick what runs (bazel/bin,bazelFlags,bazelRc,bazelOutputBase) and refuses anoutpath that resolves outside the project cwd. CLI flags still win without trusting the file; in-projectoutfromsocket.jsonremains allowed. Resolution lives in newbazel-socket-json-trust.mts; failures surface viaoutputManifestinstead of silently applying repo-controlled settings.Behavior change: workflows that relied on
socket.jsonfor the Bazel binary or options must pass--trust-socket-jsonor set the equivalent CLI flags explicitly.Reviewed by Cursor Bugbot for commit 9ae1d87. Configure here.