You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Protocol prefixes (`http://`, `https://`) are **not** stripped — they enable [protocol-specific filtering](#protocol-specific-filtering). A bare domain (no prefix) allows both HTTP and HTTPS.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/cli-reference.md
+142-4Lines changed: 142 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ awf [options] -- <command>
69
69
70
70
### `--allow-domains <domains>`
71
71
72
-
Comma-separated list of allowed domains. Domains automatically match all subdomains. Supports wildcard patterns and protocol-specific filtering.
72
+
Comma-separated list of allowed domains. Domains automatically match all subdomains. Supports wildcard patterns, protocol-specific filtering, and special keywords.
73
73
74
74
**If no domains are specified, all network access is blocked.** This is useful for running commands that should have no network access.
75
75
@@ -82,7 +82,7 @@ Comma-separated list of allowed domains. Domains automatically match all subdoma
82
82
awf -- echo"offline command"
83
83
```
84
84
85
-
#### Protocol-Specific Filtering
85
+
#### Protocol-specific filtering
86
86
87
87
Restrict domains to HTTP-only or HTTPS-only traffic by prefixing with the protocol:
88
88
@@ -93,7 +93,7 @@ Restrict domains to HTTP-only or HTTPS-only traffic by prefixing with the protoc
93
93
# HTTP only - blocks HTTPS traffic to this domain
94
94
--allow-domains 'http://legacy-api.example.com'
95
95
96
-
# Both protocols (default behavior, backward compatible)
96
+
# Both protocols (default behavior)
97
97
--allow-domains 'example.com'
98
98
99
99
# Mixed configuration
@@ -103,6 +103,78 @@ Restrict domains to HTTP-only or HTTPS-only traffic by prefixing with the protoc
**Security restrictions:** Overly broad patterns like `*`, `*.*`, or `*.*.*` are rejected.
142
+
143
+
:::note
144
+
Wildcard patterns and protocol prefixes can be combined: `https://*.secure.example.com` matches only HTTPS traffic to any subdomain of `secure.example.com`.
145
+
:::
146
+
147
+
#### `localhost` keyword
148
+
149
+
Using `localhost` in `--allow-domains` triggers special behavior for local development:
150
+
151
+
```bash
152
+
# Automatically configures everything for local testing
153
+
sudo awf --allow-domains localhost -- npx playwright test
154
+
```
155
+
156
+
When `localhost` is detected, awf automatically:
157
+
158
+
1.**Replaces `localhost` with `host.docker.internal`** — Maps to Docker's host gateway so containers can reach host services
When using a custom `--openai-api-target` or `--anthropic-api-target`, you must add the target domain to `--allow-domains` so the firewall permits outbound traffic. AWF emits a warning if a custom target is set but not in the allowlist.
753
825
:::
754
826
827
+
## Implicit Behaviors
828
+
829
+
### Enterprise domain auto-detection
830
+
831
+
AWF automatically detects GitHub Enterprise environments and adds required domains to the allowlist. No manual configuration is needed — the domains are auto-added when the relevant environment variables are present.
832
+
833
+
#### GitHub Enterprise Cloud (GHEC)
834
+
835
+
When `GITHUB_SERVER_URL` points to a `*.ghe.com` tenant (set automatically by GitHub Agentic Workflows), AWF auto-adds:
Domains from `GITHUB_API_URL` are also detected — if `GITHUB_API_URL` points to a `*.ghe.com` hostname (e.g., `https://api.myorg.ghe.com`), that hostname is added to the allowlist as well. This ensures API access works even if only `GITHUB_API_URL` is set.
845
+
846
+
```bash
847
+
# These environment variables are set automatically by GitHub Agentic Workflows
Use `--log-level debug` to see which enterprise domains were auto-detected. Look for "Auto-added GHEC domains" or "Auto-added GHES domains" in the output.
890
+
:::
891
+
755
892
## Exit Codes
756
893
757
894
| Code | Description |
@@ -1064,7 +1201,8 @@ Denied Requests (3):
1064
1201
## See Also
1065
1202
1066
1203
-[API Proxy Sidecar](/gh-aw-firewall/reference/api-proxy-sidecar) - Secure credential injection architecture and configuration
1067
-
-[Domain Filtering Guide](/gh-aw-firewall/guides/domain-filtering) - Allowlists, blocklists, and wildcards
1204
+
-[Domain Filtering Guide](/gh-aw-firewall/guides/domain-filtering) - Allowlists, blocklists, wildcards, and protocol-specific filtering
1205
+
-[Playwright Testing](/gh-aw-firewall/guides/playwright-testing) - Using the `localhost` keyword for local development
1068
1206
-[SSL Bump Reference](/gh-aw-firewall/reference/ssl-bump/) - HTTPS content inspection and URL filtering
1069
1207
-[Quick Start Guide](/gh-aw-firewall/quickstart) - Getting started with examples
1070
1208
-[Usage Guide](/gh-aw-firewall/usage) - Detailed usage patterns and examples
0 commit comments