Repository navigation
fix(agent): install gh from its pinned release so deploys need no Go proxy - #1078
Merged
Merged
Conversation
5 tasks done
…proxy (#1077) Since #1052 the agent image builds gh from source through proxy.golang.org: a direct fetch fails because github.com/microsoft/dev-tunnels v0.2.0 has no Go tags left. A deploy machine that cannot reach proxy.golang.org, as on many corporate networks, then cannot build the image. Install gh from its official GitHub release instead, checked against a SHA-256 pinned per architecture in agent/Dockerfile. The image build already depends on github.com, so this needs no proxy and no setting. The release binary of 2.103.3 is built with Go 1.27.3, one patch behind the previous builder; trivy reports no new fixable HIGH or CRITICAL finding. A test holds the pinned checksum check in place.
isadeks
force-pushed
the
fix/1077-agent-image-go-proxy
branch
from
November 23, 2026 22:44
cf2b7b0 to
c017304
Compare
krokoko
approved these changes
Nov 24, 2026
krokoko
pushed a commit
that referenced
this pull request
Nov 24, 2026
…weep main gained #1078 after the first merge: the agent image installs gh from its pinned release, so a deploy needs no Go proxy. A reviewer of this pull request could not build the image without it. No conflict. The merge changes agent/Dockerfile and cdk/test/constructs/agent-image-pins.test.ts. This branch does not touch either file, so both are as on main. Refs #1074
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.
Closes #1077
Problem
Since #1052 (
fe2d61cb),agent/Dockerfilebuildsghfrom source through the Go module proxy,proxy.golang.org. That was needed:github.com/microsoft/dev-tunnelsv0.2.0 has no Go tags left, so a direct fetch fails everywhere.A deploy machine that cannot reach
proxy.golang.orgcannot build the agent image. Corporate networks often block or redirect that host.mise //cdk:deploythen stops at thego installstep, before CloudFormation changes anything.Change
ghis installed from its official GitHub release, checked against a SHA-256 pinned per architecture inagent/Dockerfile. The Go builder stage is gone.gh_2.103.3_checksums.txt. They are not fetched at build time, so a changed release asset fails the build. Bump them withGH_VERSION.ghentry thatagent/.trivyignorealready holds (CVE-2026-78661, which expires 2026-12-16). No ignore entry is added.agent-image-pins.test.tsdrops thegolangimage from its expected pins. A new test requires both pinned checksums, thesha256sum -ccheck, and nogo install.An earlier version of this PR made
GOPROXYandGOSUMDBconfigurable. That only helped where an organization runs its own Go proxy, so this version needs none.Verification
On a network that resolves
proxy.golang.orgto a DNS sinkhole,mise //agent:security:imagebuilds the image and passes the trivy scan:gh_2.103.3_linux_amd64.tar.gz: OKgh version 2.103.3 (2026-10-26)The same scan fails on main.
arm64: the same release archive passed the same SHA-256 check during a live deploy of an AgentCore runtime image, using a local equivalent of this change. The pinned arm64 checksum matches the release's checksum file.
mise run buildpasses: cdk 8,885, cli 1,504, agent 3,139, web 30 files.