Commit cd6be7d
committed
d790707 docs: [#147] create copilot agent firewall documentation (copilot-swe-agent[bot])
5e1e8f8 Initial plan (copilot-swe-agent[bot])
Pull request description:
Phase 1 (repository settings) was completed by admin: `opentofu.org` added to custom allowlist to unblock OpenTofu installer. This PR completes Phase 2 (documentation) and Phase 3 (verification).
## Changes
### Created `docs/contributing/copilot-agent-firewall.md`
Comprehensive reference for firewall configuration:
- Current configuration: custom domain (`opentofu.org`) and recommended allowlist status
- Admin instructions: step-by-step configuration walkthrough
- Domain vs URL rules: when to use each allowlist type
- Security: best practices, limitations, minimal whitelist approach
- Maintenance: adding domains, troubleshooting DNS/connection errors
- History: configuration change tracking table
### Updated cross-references
- `docs/contributing/README.md`: Added firewall doc to quick reference table
- `packages/dependency-installer/README.md`: Added "GitHub Copilot Agent Requirements" section linking to firewall configuration
## Context
Without `opentofu.org` in allowlist:
```bash
$ cargo run --bin dependency-installer install --dependency opentofu
ERROR: curl: (6) Could not resolve host: get.opentofu.org
```
With configuration complete, OpenTofu installer can download from `get.opentofu.org` and install successfully. Other dependencies (Ansible, cargo-machete, LXD) covered by recommended allowlist.
Closes #147
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Configure Copilot Agent Firewall for Dependency Installer</issue_title>
> <issue_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:
>
> ```bash
> $ 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.org
> ```
>
> This prevents the agent from installing OpenTofu and running pre-commit checks.
>
> ## Required Configuration
>
> **Domain to Whitelist**: `opentofu.org`
>
> - Allows traffic to `opentofu.org` and 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
>
> 1. Navigate to: `Settings` → `Copilot` → `coding agent`
> 2. Verify **Enable firewall** is ON
> 3. Verify **Recommended allowlist** is ON
> 4. Click **Custom allowlist**
> 5. Add domain: `opentofu.org`
> 6. 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.org` added 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
>
> - [GitHub Docs: Customizing the agent firewall](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-firewall)
> - [Dependency Installer Package](https://github.com/torrust/torrust-tracker-deployer/blob/main/packages/dependency-installer/README.md)
>
> ## Notes
>
> ⚠️ **Requires Manual Implementation**: This issue cannot be implemented by Copilot agent because it requires repository admin access to modify settings. Must be done manually by a repository administrator.
>
> **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](https://github.com/torrust/torrust-tracker-deployer/blob/main/docs/issues/configure-copilot-agent-firewall-for-dependency-installer.md)</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> <comment_new><author>@josecelano</author><body>
> ## ✅ Phase 1 Complete: Repository Settings Configured
>
> The Copilot agent firewall has been configured with the required domain:
>
> **Custom Allowlist Configuration**:
> - ✅ Added domain: `opentofu.org`
> - This allows traffic to `opentofu.org` and all subdomains (e.g., `get.opentofu.org`)
> - ✅ Firewall remains enabled
> - ✅ Recommended allowlist remains enabled
>
> **Next Steps**:
> - [ ] Phase 2: Create documentation (`docs/contributing/copilot-agent-firewall.md`)
> - [ ] Phase 3: Verify OpenTofu installation works in Copilot agent environment
>
> **Configuration completed by**: Repository administrator
> **Date**: November 5, 2025</body></comment_new>
> </comments>
>
</details>
- Fixes #147
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.
ACKs for top commit:
josecelano:
ACK d790707
Tree-SHA512: cba583af5b206e147c6245474dadb084214444731b58ad9c615cc06e10fe1cb7443118fa5713cfecce5718584bed4172cb57d378ac961c0466981f55cb4fbcf4
File tree
3 files changed
+212
-0
lines changed- docs/contributing
- packages/dependency-installer
3 files changed
+212
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
0 commit comments