fix(code-simplifier): allow Go module proxy domains via go network preset#18214
fix(code-simplifier): allow Go module proxy domains via go network preset#18214
go network preset#18214Conversation
…preset Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
go network preset
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix network access issues in the code-simplifier workflow by adding Go module proxy domain support. The workflow was blocked from running Go builds, tests, and linting because proxy.golang.org wasn't in the network allowlist.
Changes:
- Added
network.allowed: [go]to.github/workflows/code-simplifier.mdto enable the Go ecosystem preset - Updated
.github/workflows/code-simplifier.lock.ymlwith new domain allowlist and updated frontmatter hash
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/code-simplifier.md |
Added network configuration using the go preset to allow Go module proxy access |
.github/workflows/code-simplifier.lock.yml |
Recompiled workflow with updated allowed domains list reflecting the Go preset |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| expires: 1d | ||
|
|
||
| network: | ||
| allowed: |
There was a problem hiding this comment.
The network configuration should include both "defaults" and "go" presets, not just "go" alone. Using only "go" removes access to critical system domains needed for package installation, certificate validation, and other essential operations.
The "defaults" preset includes important domains such as:
- Ubuntu package repositories (archive.ubuntu.com, security.ubuntu.com, api.snapcraft.io)
- Certificate authority domains (various CRL and OCSP endpoints)
- Package manager domains (packages.cloud.google.com, packages.microsoft.com)
- JSON schema validation domains (json-schema.org, json.schemastore.org)
Other workflows that need Go support use both presets together. For example, tidy.md (line 32) uses: allowed: ["defaults", "go"]
This should be changed to:
network:
allowed:
- defaults
- go| allowed: | |
| allowed: | |
| - defaults |
| event_name: context.eventName, | ||
| staged: false, | ||
| allowed_domains: ["defaults"], | ||
| allowed_domains: ["go"], |
There was a problem hiding this comment.
This change removes the "defaults" preset which eliminates access to essential system domains. The allowed_domains array should be ["defaults", "go"] to maintain access to necessary system domains while adding Go module proxy support.
The current configuration only includes Go-specific domains but is missing critical domains from the "defaults" preset such as:
- Ubuntu package repositories and security updates
- Certificate authority validation endpoints
- System package managers
- Schema validation services
Reference: tidy.lock.yml uses allowed_domains: ["defaults","go"] for a similar Go workflow.
| allowed_domains: ["go"], | |
| allowed_domains: ["defaults", "go"], |
code-simplifierwas blockinggo build,go test, andmake lintbecauseproxy.golang.orgwasn't in the network allowlist.Changes
code-simplifier.md: Addednetwork.allowed: [go]— uses the built-ingoecosystem preset instead of enumerating individual subdomainsThe
gopreset expands to:proxy.golang.org,sum.golang.org,storage.googleapis.com,golang.org,go.dev,pkg.go.dev,goproxy.io.code-simplifier.lock.yml: Recompiled to reflect the updated domain list.Original prompt
This section details on the original issue you should resolve
<issue_title>[q] fix(code-simplifier): allow Go module proxy domains in network config</issue_title>
<issue_description>## Problem
The
code-simplifierworkflow was blocked from runninggo build,go test, andmake lintbecauseproxy.golang.orgwas not in the network allowlist.Evidence from PR #18197 (run #22365564592):
Changes
Added a
network.allowedblock to.github/workflows/code-simplifier.md:Validation
code-simplifier.mdcompiled successfully with no errors or warningsReferences
/q update code simplifier with network go domainTo apply the patch locally:
Show patch preview (77 of 77 lines)
Comments on the Issue (you are @copilot in this section)
@pelikhan @copilot use "go" domain💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.