👷 ci(test): allow setup-go toolchain download endpoints in harden-runner#206
Conversation
The terratest job's harden-runner allowlist blocks setup-go's cold toolchain download (go.mod exact-pins go 1.26.0 via terratest 1.0.1; runner toolcache misses force a download). Add the four endpoints the download path needs, alphabetically: - api.github.com:443 - dl.google.com:443 - raw.githubusercontent.com:443 - release-assets.githubusercontent.com:443 Same fix as defaults#260, apigateway#92, template#109, jwt-authz#102. Unblocks dependabot #205 (terratest 1.0.0 -> 1.0.1), which trips the cold download and fails with ECONNREFUSED / domain-not-allowed.
WalkthroughThe test workflow’s runner hardening configuration now permits additional GitHub, AWS, HashiCorp, Discord, Google, npm, Terraform, and release asset endpoints. ChangesRunner hardening
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/test.yml:
- Around line 29-36: Restrict the setup-go egress allowlist in the workflow to
only the four hosts required by the stated setup-go dependency. Remove the
unrelated apigateway, budgets, checkpoint-api, cloudfront, and cognito-idp
entries from both referenced allowlist sections; retain any host only if a
specific job step demonstrably requires it and document that dependency.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9a5615ad-75a2-4289-8ab8-971604182f7d
📒 Files selected for processing (1)
.github/workflows/test.yml
yourcodekitten
left a comment
There was a problem hiding this comment.
fifth verse, same as the first four — and still correct, which is honestly the nicest thing i can say about a landmine ♡
verified, not vibes:
- all four adds are byte-identical to the donor set proven green under block in defaults#260, apigateway#92, template#109, jwt-authz#102
- alphabetical placement checked all four, including the
release-assets.<releases.hyphen-sort trap - folded
>scalar preserved (harden-runner splits on spaces — the one true footgun here) egress-policy: blockconfirmed at head; single terratest job, setup-go withgo-version-file+ cache- run 29576642644 log grepped live: cold
1.26.0download, exactly the three blocked domains quoted
Found in cache @ /opt/hostedtoolcache/go/1.26.5) because this branch's go.mod spec is loose, so the new endpoints were never exercised. the actual delivery receipt is #205's terratest clearing setup-go after your @dependabot rebase. don't pop the champagne until that run downloads 1.26.0 through the fence.
remaining checks were still in flight when i stamped this (CodeRabbit, DeepSource Go, a few lints) — house pattern: you merge on your own green, old man.
|
APPROVED ♡ fifth repo, same four endpoints, verified byte-identical to the donor set + hyphen-sort + folded scalar all intact — details in the review. two things worth your eyes, old man:
merge on your green, then go heal your dependabot ♡ |
Finding was a diff misread: the PR adds only the four setup-go download hosts; the flagged entries are pre-existing context lines. See thread reply with the diff receipt. Human reviewer (yourcodekitten) verified and approved.
What
Adds the four endpoints setup-go's cold toolchain download path needs to the terratest job's harden-runner allowlist (alphabetical, folded-scalar style preserved):
api.github.com:443dl.google.com:443raw.githubusercontent.com:443release-assets.githubusercontent.com:443Why
Dependabot #205 (terratest 1.0.0 → 1.0.1) exact-pins
go 1.26.0via go.mod; when the runner toolcache lacks that exact version, setup-go must download it and harden-runner blocks the path. Verified in run 29576642644:Same known-latent landmine fixed in defaults#260, apigateway#92, template#109, jwt-authz#102 — null-context's turn to trip it. Once merged, a plain
@dependabot rebaseheals #205 (pull_request runs read workflows from the merge ref).🤖 Generated with Claude Code
Summary by CodeRabbit