Add go mod download step to CI jobs to fix proxy.golang.org 403 errors#12976
Add go mod download step to CI jobs to fix proxy.golang.org 403 errors#12976
Conversation
…rrors Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🛡️ Security Posture AnalysisThis PR contains changes that may affect the security posture. Please review the following concerns: 🟠 High: Network allowlist expandedLocation: Change Detected: ```diff
- GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sum.golang.org,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com"
+ GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkg.go.dev,playwright.download.prss.microsoft.com,ppa.launchpad.net,proxy.golang.org,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,sum.golang.org,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com"
```Security Impact: The workflow now allows outbound network access to a much broader set of domains (Anthropic APIs, Node/Python package registries, Playwright/CDN hosts, etc.) rather than the previous Copilot- and GitHub-specific endpoints. This enlarges the external attack surface and increases the risk of data exfiltration or compromise via additional third-party endpoints. Recommendation: Restrict the allowlist to only the domains strictly required for the new Claude pipeline, possibly by staging these changes under a separate workflow with tighter network controls and reviewing each added host for necessity. Summary
Note: This is an automated analysis. Please verify these findings and determine if the changes are intentional and justified.
|
CI test and integration jobs were failing because
go testattempted to download modules during execution, hitting 403 Forbidden from proxy.golang.org. The Go module proxy requires dependencies to be explicitly downloaded first when cache is cold.Changes
Added
go mod downloadstep beforego mod verifyin all 10 Go-based CI jobs:This ensures the module cache is populated upfront before any Go commands execute, preventing download attempts during test/build phases. Pattern already exists in
format-and-commit.yml.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.