chore(vendor): pin and verify pre-built gvproxy switch binary - #503
Conversation
Add vendor/gvproxy/ as a pinned build module for the gvproxy (gvisor-tap-vsock) userspace switch minimald spawns per host, plus a CI job that builds it from source and publishes the binary SHA-256. The dependency graph is pinned and cryptographically verified via the checked-in go.sum (architecture assumption gvproxy-source-build) — the binary is built from pinned source, never a pre-built download. Unblocks the human-only half of #495: editing .github/workflows/ is a protected path and Go module-proxy egress is outside the SDD execute agent's sandbox allow-list. After merge, clearing needs-human on #495 lets the agent implement the Rust NetworkMode refactor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss8WXtUUr9PBHuJcJMseBj
📝 WalkthroughWalkthroughAdds Changesgvproxy pre-built binary fetch
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci-gvproxy.yml (1)
34-41: ⚡ Quick winStrengthen dependency-lock enforcement in the verify/build sequence.
At Line 36,
go mod verifyruns before any explicit module fetch/build in this job. On a fresh runner, this can reduce the practical value of that verification step. Consider downloading first, then verifying, and building with-mod=readonlyso the pinned graph cannot drift during build.Suggested fix
- - name: Verify pinned dependency graph (go.sum) + - name: Download pinned module graph working-directory: vendor/gvproxy - run: go mod verify + run: go mod download + - name: Verify pinned dependency graph (go.sum) + working-directory: vendor/gvproxy + run: go mod verify - name: Build gvproxy from pinned source working-directory: vendor/gvproxy run: | - go build -trimpath -o "${RUNNER_TEMP}/gvproxy" \ + go build -mod=readonly -trimpath -o "${RUNNER_TEMP}/gvproxy" \ github.com/containers/gvisor-tap-vsock/cmd/gvproxy🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci-gvproxy.yml around lines 34 - 41, The go mod verify step in the workflow currently runs before modules are explicitly downloaded, which reduces its effectiveness on a fresh runner. Add a new step before the "Verify pinned dependency graph (go.sum)" step to run go mod download in the vendor/gvproxy working directory. Additionally, modify the build command in the "Build gvproxy from pinned source" step by adding the -mod=readonly flag to the go build command so the module graph cannot drift during the build process, ensuring strict adherence to the pinned dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-gvproxy.yml:
- Around line 37-41: The go build command for gvproxy does not explicitly set
GOOS and GOARCH environment variables, but the artifact name referenced later in
the workflow explicitly includes "linux-amd64" in its naming convention. Add
GOOS=linux and GOARCH=amd64 environment variables to the go build command at the
"Build gvproxy from pinned source" step to make the build contract explicit and
maintainable, ensuring the build target platform aligns with the artifact naming
convention.
---
Nitpick comments:
In @.github/workflows/ci-gvproxy.yml:
- Around line 34-41: The go mod verify step in the workflow currently runs
before modules are explicitly downloaded, which reduces its effectiveness on a
fresh runner. Add a new step before the "Verify pinned dependency graph
(go.sum)" step to run go mod download in the vendor/gvproxy working directory.
Additionally, modify the build command in the "Build gvproxy from pinned source"
step by adding the -mod=readonly flag to the go build command so the module
graph cannot drift during the build process, ensuring strict adherence to the
pinned dependencies.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 55aa82ec-2222-4820-b360-006f6b1167e2
⛔ Files ignored due to path filters (1)
vendor/gvproxy/go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
.github/workflows/ci-gvproxy.ymlvendor/gvproxy/go.modvendor/gvproxy/tools.go
Replace the build-from-source module with a pinned pre-built gvproxy (gvisor-tap-vsock v0.8.9) release binary, fetched and verified against checked-in SHA-256 digests. Removes the Go toolchain / module-proxy dependency from CI. - vendor/gvproxy/gvproxy.lock: pinned version + upstream sha256 digests (linux-amd64, linux-arm64, darwin) - scripts/fetch-gvproxy.sh: download the host-platform asset, verify its SHA-256, fail closed on mismatch - ci-gvproxy.yml: fetch + verify + publish (no Go build) - architecture.md: amend the gvproxy-source-build assumption to the pinned pre-built decision (supply-chain risk mitigated by pinned digests) Unblocks the human-only half of #495. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss8WXtUUr9PBHuJcJMseBj
Unblocks #495. Does not close it — the SDD execute agent resumes the Rust
NetworkModerefactor once this merges andneeds-humanis cleared.Root cause
#495 bundled agent-doable Rust work with two human-only prerequisites the SDD execute sandbox cannot perform: editing
.github/workflows/(protected path), and obtaining gvproxy (Go module-proxy egress / external download is outside the sandbox allow-list).Approach: pinned pre-built binary (maintainer decision)
Switched from build-from-source to a pinned pre-built gvproxy release, fetched and SHA-256-verified. Avoids a Go toolchain + module-proxy egress in CI. Supersedes the spec's source-build preference; the spec lists a SHA-256-verified pre-built binary as the accepted alternative.
Change (net −109 lines)
vendor/gvproxy/gvproxy.lock— pinnedv0.8.9+ upstream-published SHA-256 digests (linux-amd64, linux-arm64, darwin)scripts/fetch-gvproxy.sh— download the host-platform asset, verify SHA-256, fail closed on mismatch.github/workflows/ci-gvproxy.yml— fetch + verify + publish artifact (no build); scoped tovendor/gvproxy/**+ the scriptdocs/specs/03-spec-networking/architecture.md— amend thegvproxy-source-buildassumption to the pinned pre-built decisionVerified locally
gvproxy-darwinv0.8.9, digest matches upstreamsha256sumsAcceptance
verify-gvproxyjob greenneeds-humanon #495. Note: feat(sandbox2,minimald-rpc,sessions): introduce trimodal NetworkMode enum and vendor gvproxy source #495's proof artifact Cycle detection #2 (vendor/gvproxy/go.sum) shifts tovendor/gvproxy/gvproxy.lockunder this approach — task body updated accordingly.🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation