Conversation
There was a problem hiding this comment.
Pull request overview
Updates the AWF documentation to explicitly describe previously implicit CLI behaviors around domain allowlisting and filtering, helping users predict how awf expands and interprets domain inputs.
Changes:
- Expanded
--allow-domainsdocumentation with protocol-specific filtering, wildcard matching rules, and thelocalhostkeyword behavior. - Added an “Implicit Behaviors” section describing enterprise (GHEC/GHES) domain auto-detection and auto-allowlisting.
- Corrected domain normalization docs to reflect that protocol prefixes are meaningful (not stripped).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs-site/src/content/docs/reference/cli-reference.md | Documents --allow-domains keywords/patterns and adds enterprise auto-detection (“Implicit Behaviors”). |
| docs-site/src/content/docs/guides/domain-filtering.md | Adds protocol-specific filtering guidance and fixes normalization docs regarding protocol prefixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Comma-separated list of allowed domains. Domains automatically match all subdomains. Supports wildcard patterns, protocol-specific filtering, and special keywords. | ||
|
|
||
| **If no domains are specified, all network access is blocked.** This is useful for running commands that should have no network access. | ||
|
|
There was a problem hiding this comment.
The statement that “If no domains are specified, all network access is blocked” is not always true once implicit allowlist expansion runs. In enterprise environments, domains may be auto-added from GITHUB_SERVER_URL/GITHUB_API_URL (GHEC) or ENGINE_API_TARGET (GHES) even when the user doesn’t pass --allow-domains. Consider clarifying this sentence (or adding a note) to describe that implicit behaviors can add domains to an otherwise empty allowlist.
See below for a potential fix:
**If no domains are specified, network access is blocked by default.** This is useful for running commands that should have no network access.
**Note:** In some enterprise environments, domains may still be added implicitly to the allowlist from configuration such as `GITHUB_SERVER_URL`, `GITHUB_API_URL`, or `ENGINE_API_TARGET`, even when `--allow-domains` is not provided.
```bash
# Allow specific domains
--allow-domains github.com,npmjs.org
--allow-domains '*.github.com,api-*.example.com'
# No network access by default when omitted
| When `localhost` is detected, awf automatically: | ||
|
|
||
| 1. **Replaces `localhost` with `host.docker.internal`** — Maps to Docker's host gateway so containers can reach host services | ||
| 2. **Enables `--enable-host-access`** — Activates host network access (equivalent to passing `--enable-host-access`) | ||
| 3. **Allows common development ports** — Opens ports 3000, 3001, 4000, 4200, 5000, 5173, 8000, 8080, 8081, 8888, 9000, 9090 |
There was a problem hiding this comment.
The CLI only replaces the first occurrence of localhost/http://localhost/https://localhost in the allowlist (additional occurrences are left unchanged). Consider documenting this so users don’t expect multiple localhost entries (e.g., mixed protocol) to all be rewritten automatically.
…l, wildcards) Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/c2c587a8-e323-46c8-86c5-aad911eb8a46 Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/c2c587a8-e323-46c8-86c5-aad911eb8a46 Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
cd666e7 to
594647b
Compare
The CLI reference didn't document several implicit behaviors: the
localhostkeyword shortcut, enterprise domain auto-detection (GHEC/GHES), and had minimal coverage of protocol-specific filtering and wildcard patterns.CLI reference (
reference/cli-reference.md)localhostkeyword: Documents that--allow-domains localhostreplaces withhost.docker.internal, auto-enables--enable-host-access, and opens common dev ports (3000, 3001, 4000, 4200, 5000, 5173, 8000, 8080, 8081, 8888, 9000, 9090)GITHUB_SERVER_URLwith*.ghe.comauto-adds tenant,api.*,copilot-api.*,copilot-telemetry-service.*ENGINE_API_TARGETauto-adds base domain, API subdomain, and Copilot cloud domainsdomain.com(both),https://domain.com(HTTPS only),http://domain.com(HTTP only)Domain filtering guide (
guides/domain-filtering.md)https://github.com=github.com" which is wrong; protocol prefixes are meaningful for protocol-specific filteringWarning
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:
telemetry.astro.build/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/gh-aw-firewall/gh-aw-firewall/docs-site/node_modules/.bin/astro build(dns block)If you need me to access, download, or install something from one of these locations, you can either: