Refactor duplicated host-service port allowance loops in setup-iptables#3443
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot implement this refactoring |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results✅ GitHub API: 2 PR entries verified in recent-prs.json PASS — All smoke tests completed successfully
|
🔬 Smoke Test Results
Overall: PARTIAL — MCP confirmed working; pre-step outputs were not injected into the workflow template. PR author:
|
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR author: Overall: PASS
|
|
Smoke test: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test: Gemini Engine Validation
Overall Status: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
Chroot Smoke Test Results
Overall: ❌ FAILED — Python and Node.js versions differ between host and chroot.
|
setup-iptables.shhad two near-identicalAWF_HOST_SERVICE_PORTSloops for host and network gateway destinations, duplicating security-sensitive port validation logic. This change consolidates that logic into a single helper to keep validation behavior consistent across both gateway paths.What changed
containers/agent/setup-iptables.shto:1..65535)iptablesOUTPUTallow rule for a supplied destination IPis_valid_ipv4, host/network gateway inequality) and existing warning behavior for invalid ports.Why this refactor matters
Example (new shared flow)