Skip to content

Add Go network access to hourly CI cleaner workflow#7355

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-ci-cleaner-network-access
Dec 23, 2025
Merged

Add Go network access to hourly CI cleaner workflow#7355
pelikhan merged 2 commits into
mainfrom
copilot/fix-ci-cleaner-network-access

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 23, 2025

The hourly CI cleaner workflow was failing because the network firewall blocked proxy.golang.org, preventing Go module downloads needed for builds, linting, and testing.

Changes

  • Added network.allowed configuration with go preset to .github/workflows/hourly-ci-cleaner.md
  • Recompiled lock file to include Go infrastructure domains in firewall allowlist

Configuration

network:
  allowed:
    - defaults
    - go

This enables access to:

  • proxy.golang.org (Go module proxy)
  • sum.golang.org (Go checksum database)
  • pkg.go.dev, go.dev, golang.org (Go documentation/packages)
  • goproxy.io (alternative proxy)

The go network preset is a standard configuration used by other workflows that build Go code (e.g., smoke-srt-custom-config.md).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login 01/create_pull_request.js log /usr/bin/git l --format=format:rev-parse adc2158520ecb056--show-toplevel git rev-�� ithub/workflows git 0/x64/bin/node ithub/workflows (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login tags/93cb6efe182--detach -test.v=true /usr/bin/git -test.run=^Test user.email g_.a git rev-�� k/gh-aw/gh-aw/.github/workflows jaY6xuizzFG3 e/git l (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows origin e/git-remote-https ithub/workflows main e/git-remote-httxterm-color e/git-remote-https om/a�� om/actions/upload-artifact.git e/git-remote-htt-buildtags ache/node/24.12.0/x64/bin/node om/githubnext/gh/usr/bin/gh pkg/mod/github.capi /opt/hostedtoolcgraphql git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[ca] Fix CI cleaner network access for Go module downloads</issue_title>
<issue_description>## Problem

The hourly CI cleaner workflow (#273) is failing because the network firewall blocks access to proxy.golang.org, preventing Go module downloads.

Root Cause

The workflow uses the agentic workflow firewall (awf) with a restricted list of allowed domains:

  • api.github.com
  • github.com
  • raw.githubusercontent.com
  • registry.npmjs.org
  • Various GitHub Copilot API domains

However, proxy.golang.org was missing from this list, causing all Go operations to fail with:

Get "(redacted) Forbidden

Impact

This blocks the CI cleaner from:

  1. ✗ Downloading Go modules
  2. ✗ Building the gh-aw binary
  3. ✗ Running linters (golangci-lint)
  4. ✗ Running tests
  5. ✗ Recompiling workflows

Solution

Added proxy.golang.org to the network.allowed list in .github/workflows/hourly-ci-cleaner.md:

network:
  allowed:
    - "proxy.golang.org"

Testing

After this change:

  • ✓ Go modules can be downloaded
  • ✓ Build will succeed
  • ✓ Linters can run
  • ✓ Tests can execute
  • ✓ Workflows can be recompiled

Additional Notes

This is a configuration issue, not a code quality issue. The CI cleaner workflow itself is correctly designed, but the network restrictions prevented it from accessing necessary build dependencies.

Once this PR is merged and the workflow is recompiled, the hourly CI cleaner should function properly.

Related

  • Failed Run: githubnext/gh-aw#273
  • Workflow: .github/workflows/hourly-ci-cleaner.md

AI generated by Hourly CI Cleaner


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:

# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/20427226287
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 20427226287 -n aw.patch
# Apply the patch
git am aw.patch
Show patch (40 lines)
From 71d9be3ff03d545aa7a7116af1bc28548af7342a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Mon, 22 Dec 2025 09:16:12 +0000
Subject: [PATCH] fix: Add proxy.golang.org to network allowed list for CI
 cleaner

The hourly CI cleaner workflow was failing because the network firewall
blocked access to proxy.golang.org, preventing Go module downloads.

This change adds proxy.golang.org to the network.allowed list to fix:
- Go module download failures
- Build errors due to missing dependencies
- Linter failures due to undefined types

Root cause: Network firewall configuration was too restrictive
Solution: Allow access to Go module proxy

Fixes githubnext/gh-aw#273
---
 .github/workflows/hourly-ci-cleaner.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/hourly-ci-cleaner.md b/.github/workflows/hourly-ci-cleaner.md
index 4745365..4040bd5 100644
--- a/.github/workflows/hourly-ci-cleaner.md
+++ b/.github/workflows/hourly-ci-cleaner.md
@@ -11,6 +11,9 @@ permissions:
   pull-requests: read
 tracker-id: hourly-ci-cleaner
 engine: copilot
+network:
+  allowed:
+    - "proxy.golang.org"
 tools:
   bash: ["*"]
   edit:
-- 
2.34.1

Comments on the Issue (you are @copilot in this section)


💡 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.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI cleaner network access for Go module downloads Add Go network access to hourly CI cleaner workflow Dec 23, 2025
Copilot AI requested a review from mnkiefer December 23, 2025 07:16
@pelikhan pelikhan marked this pull request as ready for review December 23, 2025 11:08
@pelikhan pelikhan merged commit a21fc8c into main Dec 23, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-ci-cleaner-network-access branch December 23, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ca] Fix CI cleaner network access for Go module downloads

3 participants