Skip to content

fix(cli): port Bazel socket.json trust gate to v1.x - #1683

Open
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
fix/manifest-bazel-socket-json-trust-v1x
Open

John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
fix/manifest-bazel-socket-json-trust-v1x

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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 bazel no longer honors repository-controlled Bazel execution settings from socket.json unless the user opts in. By default it now rejects bazel/bin, bazelFlags, bazelRc, and bazelOutputBase from the scanned repo’s config, and blocks an out path that resolves outside the project (including symlink escapes). Command-line flags still override without trusting the file.

The inline defaulting logic in cmd-manifest-bazel is replaced by resolveBazelManifestSettings in a new bazel-socket-json-trust module, wired through a --trust-socket-json flag (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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants