-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
Configure GitHub Copilot agent's firewall to allow network access to domains required by the dependency installer binaries. The Copilot agent environment has a restricted firewall that blocks access to external domains by default.
Problem Statement
When GitHub Copilot agent attempts to install dependencies using the dependency-installer binary, network requests are blocked by the agent's firewall:
$ cargo run -p torrust-dependency-installer --bin dependency-installer -- install --dependency opentofu
2025-11-05T19:46:23.668278Z ERROR torrust_dependency_installer::app: Command failed error=Install command failed: Failed to install specific dependency: Installation failed: Failed to install dependency 'opentofu': Failed to download installer: curl: (6) Could not resolve host: get.opentofu.orgThis prevents the agent from installing OpenTofu and running pre-commit checks.
Required Configuration
Domain to Whitelist: opentofu.org
- Allows traffic to
opentofu.organd all subdomains (e.g.,get.opentofu.org) - Required for OpenTofu installer script and package downloads
Already Covered by Recommended Allowlist:
- Ubuntu/Debian package repositories (for Ansible)
- Rust package registry/crates.io (for cargo-machete)
- Snap store (for LXD)
Implementation Steps
Phase 1: Repository Settings Configuration (15-30 min)
Prerequisites: Repository admin access required
- Navigate to:
Settings→Copilot→coding agent - Verify Enable firewall is ON
- Verify Recommended allowlist is ON
- Click Custom allowlist
- Add domain:
opentofu.org - Click Add Rule → Save changes
Phase 2: Documentation (15-30 min)
- Create
docs/contributing/copilot-agent-firewall.md - Document configured domains and rationale
- Document configuration steps
- Update related documentation
Phase 3: Verification (15-30 min)
- Test OpenTofu installation in Copilot agent
- Verify no firewall warnings appear
- Update documentation if needed
Total Estimate: 45 minutes - 1.5 hours
Acceptance Criteria
Configuration:
-
opentofu.orgadded to custom allowlist - Recommended allowlist remains enabled
- Firewall remains enabled
Documentation:
- New doc:
docs/contributing/copilot-agent-firewall.md - Includes all configured domains with rationale
- Includes step-by-step instructions
- Links to GitHub documentation
Verification:
- Copilot agent can install OpenTofu successfully
- No firewall warnings for configured domains
- Pre-commit checks pass
Related Documentation
Notes
Security: Keep firewall and recommended allowlist enabled. Only add specific required domains (minimal whitelist approach).
Specification
Full specification: docs/issues/configure-copilot-agent-firewall-for-dependency-installer.md