-
Notifications
You must be signed in to change notification settings - Fork 311
Add network.allowed reference docs and link from agentic-workflows agent #22102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,176 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| description: Network access configuration reference for gh-aw workflows — valid ecosystem identifiers, domain patterns, and common mistakes to avoid. | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Network Access Configuration | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Use the `network` frontmatter field to control which domains an AI engine can reach during a workflow run. All traffic is enforced by the Agent Workflow Firewall (AWF). | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Quick Reference | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```yaml | ||||||||||||||||||||||
| # Shorthand — use default infrastructure domains only | ||||||||||||||||||||||
| network: defaults | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Custom — allow defaults plus package registries for a Node.js project | ||||||||||||||||||||||
| network: | ||||||||||||||||||||||
| allowed: | ||||||||||||||||||||||
| - defaults | ||||||||||||||||||||||
| - node | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Custom — allow specific external APIs | ||||||||||||||||||||||
| network: | ||||||||||||||||||||||
| allowed: | ||||||||||||||||||||||
| - defaults | ||||||||||||||||||||||
| - api.example.com | ||||||||||||||||||||||
| - "*.trusted-partner.com" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # No network access | ||||||||||||||||||||||
| network: | ||||||||||||||||||||||
| allowed: [] | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Valid Values for `network.allowed` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Each entry in `network.allowed` must be one of: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Type | Examples | Notes | | ||||||||||||||||||||||
| |---|---|---| | ||||||||||||||||||||||
| | **Ecosystem identifier** | `defaults`, `node`, `python` | Expands to a curated list of domains for that runtime/tool | | ||||||||||||||||||||||
| | **Exact domain** | `api.example.com`, `registry.npmjs.org` | Must be a fully-qualified domain name (FQDN) | | ||||||||||||||||||||||
| | **Wildcard subdomain** | `*.example.com` | Matches `sub.example.com`, `deep.nested.example.com`, and `example.com` itself | | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| > ⚠️ **Bare shorthands like `npm`, `pypi`, or `localhost` are NOT valid** unless they are listed in the ecosystem identifiers table below. Use ecosystem identifiers (`node`, `python`) or explicit FQDNs (`registry.npmjs.org`, `pypi.org`) instead. | ||||||||||||||||||||||
|
Comment on lines
+40
to
+43
|
||||||||||||||||||||||
| | **Exact domain** | `api.example.com`, `registry.npmjs.org` | Must be a fully-qualified domain name (FQDN) | | |
| | **Wildcard subdomain** | `*.example.com` | Matches `sub.example.com`, `deep.nested.example.com`, and `example.com` itself | | |
| > ⚠️ **Bare shorthands like `npm`, `pypi`, or `localhost` are NOT valid** unless they are listed in the ecosystem identifiers table below. Use ecosystem identifiers (`node`, `python`) or explicit FQDNs (`registry.npmjs.org`, `pypi.org`) instead. | |
| | **Hostname / domain** | `api.example.com`, `registry.npmjs.org`, `localhost`, `127.0.0.1` | Hostname or domain (no scheme); may be single-label (like `localhost`) or an IP literal | | |
| | **Wildcard subdomain** | `*.example.com` | Matches `sub.example.com`, `deep.nested.example.com`, and `example.com` itself | | |
| > ⚠️ **Bare ecosystem-like shorthands such as `npm` or `pypi` are NOT valid** unless they are listed in the ecosystem identifiers table below. Use ecosystem identifiers (`node`, `python`) or explicit hostnames/domains (`registry.npmjs.org`, `pypi.org`, `localhost`) instead. |
Copilot
AI
Mar 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning groups localhost with invalid shorthands. However localhost is a valid explicit allowed entry today (it will match requests to the localhost hostname); what’s not supported is using it as an ecosystem identifier, and it won’t cover 127.0.0.1/::1. Suggest reframing to “localhost is not an ecosystem identifier; prefer local if you want to allow all loopback forms.”
| > ⚠️ **Bare shorthands like `npm`, `pypi`, or `localhost` are NOT valid** unless they are listed in the ecosystem identifiers table below. Use ecosystem identifiers (`node`, `python`) or explicit FQDNs (`registry.npmjs.org`, `pypi.org`) instead. | |
| > ⚠️ **Bare shorthands like `npm` or `pypi` are NOT valid ecosystem identifiers unless they are listed in the ecosystem identifiers table below. `localhost` is not an ecosystem identifier; prefer `local` if you want to allow all loopback forms.** Use ecosystem identifiers (`node`, `python`) or explicit FQDNs (`registry.npmjs.org`, `pypi.org`) instead. |
Copilot
AI
Mar 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table claims to list all supported ecosystem identifiers, but it’s missing the supported compound identifier default-safe-outputs (see pkg/workflow/domains.go compoundEcosystems) which also expands via the same mechanism as network.allowed. Either include it (with a note it’s primarily intended for safe-outputs.allowed-domains) or adjust the “complete list” wording/count.
Copilot
AI
Mar 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bullet implies bare * is blocked, but * is treated as an allow-all sentinel outside strict mode (validation explicitly skips it), and strict mode only rejects standalone * entries. Consider updating this guidance to distinguish: * (allow all; discouraged; rejected in strict mode) vs *.example.com (scoped wildcard).
| - **Wildcard `*` requires a dot prefix**: `*.example.com` is valid; bare `*` is blocked (and rejected outright in strict mode). | |
| - **Wildcard usage**: `*.example.com` is a valid scoped wildcard. A bare `*` acts as an allow-all sentinel outside strict mode (discouraged) and is rejected outright in strict mode. |
Copilot
AI
Mar 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bullet says protocol prefixes aren’t supported, but network.allowed currently allows http:// and https:// prefixes for protocol-specific filtering (see pkg/workflow/safe_outputs_validation.go:121-141 and the existing reference docs at docs/src/content/docs/reference/network.md#protocol-specific-domain-filtering). Please update this rule to reflect current supported syntax.
| - **Protocol prefix is not supported**: `https://api.example.com` is not a valid entry — omit the scheme and write `api.example.com`. | |
| - **Optional `http://` or `https://` prefix only**: `api.example.com`, `https://api.example.com`, and `http://api.example.com` are all valid entries; other schemes (for example, `ws://`, `wss://`, `ftp://`) are not supported. |
Copilot
AI
Mar 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule says github.com does not cover api.github.com, but gh-aw treats an allowed base domain as allowing all its subdomains (and the official docs state the same). Please correct this to avoid readers over-permitting with unnecessary wildcards or duplicating entries.
| - **Subdomains must be explicit**: `github.com` does not cover `api.github.com`; use `*.github.com` or add both entries. | |
| - **Base domains also cover subdomains**: allowing `github.com` also allows `api.github.com`; you do not need `*.github.com` or duplicate entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc says all traffic is enforced by the Agent Workflow Firewall (AWF), but gh-aw can run with the firewall/sandbox disabled (e.g.,
sandbox.agent: false/ deprecatednetwork.firewall: false). In those casesnetwork.allowedstill affects URL sanitization but not egress enforcement—please soften/clarify this sentence so readers don’t assume enforcement is guaranteed.