Network Permissions
Control network access for AI engines using the top-level network field to specify which domains and services your agentic workflows can access during execution.
Note: Network permissions are currently supported by the Claude engine and the Copilot engine (when using the firewall feature).
If no network: permission is specified, it defaults to network: defaults which allows access to basic infrastructure domains (certificates, JSON schema, Ubuntu, common package mirrors, Microsoft sources).
Configuration
Section titled “Configuration”# Default: basic infrastructure onlyengine: id: copilotnetwork: defaults
# Ecosystems + custom domainsnetwork: allowed: - defaults # Basic infrastructure - python # Python/PyPI ecosystem - node # Node.js/NPM ecosystem - "api.example.com" # Custom domain
# Custom domains with wildcard patternsnetwork: allowed: - "api.example.com" # Exact domain (also matches subdomains) - "*.cdn.example.com" # Wildcard: matches any subdomain of cdn.example.com
# Protocol-specific domain filtering (Copilot engine only)network: allowed: - "https://secure.api.example.com" # HTTPS-only access - "http://legacy.example.com" # HTTP-only access - "example.org" # Both HTTP and HTTPS (default)
# Protocol-specific domain filtering (Copilot engine only)network: allowed: - "https://secure.api.example.com" # HTTPS-only access - "http://legacy.example.com" # HTTP-only access - "example.org" # Both HTTP and HTTPS (default)
# No network accessnetwork: {}
# Block specific domainsnetwork: allowed: - defaults # Basic infrastructure - python # Python/PyPI ecosystem blocked: - "tracker.example.com" # Block specific tracking domain - "analytics.example.com" # Block analytics
# Block entire ecosystemsnetwork: allowed: - defaults - github - node blocked: - python # Block Python/PyPI even if in defaultsBlocking Domains
Section titled “Blocking Domains”Use the blocked field to block specific domains or ecosystems while allowing others. Blocked domains take precedence over allowed domains, enabling fine-grained control:
# Block specific tracking/analytics domainsnetwork: allowed: - defaults - github blocked: - "tracker.example.com" - "analytics.example.com"
# Block entire ecosystem within broader allowed setnetwork: allowed: - defaults # Includes many ecosystems blocked: - python # Block Python/PyPI specifically
# Combine domain and ecosystem blockingnetwork: allowed: - defaults - github - node blocked: - python # Block Python ecosystem - "cdn.example.com" # Block specific CDNKey behaviors:
- Blocked domains are subtracted from the allowed list
- Supports both individual domains and ecosystem identifiers
- Blocked domains include all subdomains (like allowed domains)
- Useful for blocking specific domains within broader ecosystem allowlists
Configuration
Section titled “Configuration”Network permissions follow the principle of least privilege with four access levels:
- Default Allow List (
network: defaults): Basic infrastructure only - Selective Access (
network: { allowed: [...] }): Only listed domains/ecosystems are accessible - No Access (
network: {}): All network access denied - Automatic Subdomain Matching: Listed domains automatically match all subdomains (e.g.,
github.comallowsapi.github.com,raw.githubusercontent.com, etc.) - Wildcard Patterns: Use
*.example.comto explicitly match any subdomain ofexample.com
Protocol-Specific Domain Filtering
Section titled “Protocol-Specific Domain Filtering”For fine-grained security control, you can restrict domains to specific protocols (HTTP or HTTPS only). This is particularly useful when:
- Working with legacy systems that only support HTTP
- Ensuring secure connections by restricting to HTTPS-only
- Migrating from HTTP to HTTPS gradually
Usage Examples
Section titled “Usage Examples”engine: copilotnetwork: allowed: - "https://secure.api.example.com" # HTTPS-only access - "http://legacy.example.com" # HTTP-only access - "example.org" # Both protocols (default) - "https://*.api.example.com" # HTTPS wildcardCompiled to AWF:
--allow-domains ...,example.org,http://legacy.example.com,https://secure.api.example.com,...Supported Protocols
Section titled “Supported Protocols”https://- HTTPS-only accesshttp://- HTTP-only access- No prefix - Both HTTP and HTTPS (backward compatible)
Best Practices
Section titled “Best Practices”- Prefer HTTPS: Use
https://prefix for all external APIs and services - Legacy Systems: Only use
http://for internal or legacy systems that don’t support HTTPS - Default Behavior: Omit the protocol prefix for domains that should accept both protocols
- Gradual Migration: Use protocol-specific filtering to migrate from HTTP to HTTPS incrementally
Content Sanitization
Section titled “Content Sanitization”The network: configuration also controls which domains are allowed in sanitized content. URLs from domains not in the allowed list are replaced with (redacted) to prevent potential data exfiltration through untrusted links.
GitHub domains (github.com, githubusercontent.com, etc.) are always allowed by default.
Ecosystem Identifiers
Section titled “Ecosystem Identifiers”Mix ecosystem identifiers with specific domains for fine-grained control:
| Identifier | Includes |
|---|---|
defaults | Basic infrastructure (certificates, JSON schema, Ubuntu, package mirrors) |
github | GitHub domains |
containers | Docker Hub, GitHub Container Registry, Quay |
linux-distros | Debian, Alpine, and other Linux package repositories |
dotnet, dart, go, haskell, java, node, perl, php, python, ruby, rust, swift | Language-specific package managers and registries |
terraform | HashiCorp and Terraform domains |
playwright | Playwright testing framework domains |
Implementation
Section titled “Implementation”Network permissions are enforced differently depending on the AI engine:
Copilot Engine
Section titled “Copilot Engine”The Copilot engine supports network permissions through AWF (Agent Workflow Firewall). AWF is a network firewall wrapper sourced from github.com/github/gh-aw-firewall that wraps Copilot CLI execution and enforces domain-based access controls.
Enable network permissions in your workflow:
engine: copilot
network: firewall: true # Enable AWF enforcement allowed: - defaults # Basic infrastructure - python # Python ecosystem - "api.example.com" # Custom domainWhen enabled, AWF:
- Wraps the Copilot CLI execution command
- Enforces domain allowlisting using the
--allow-domainsflag - Automatically includes all subdomains (e.g.,
github.comallowsapi.github.com) - Supports wildcard patterns (e.g.,
*.cdn.example.commatchesimg.cdn.example.com) - Logs all network activity for audit purposes
- Blocks access to domains not explicitly allowed
Firewall Log Level
Section titled “Firewall Log Level”Control the verbosity of AWF firewall logs using the log-level field:
network: firewall: log-level: info # Options: debug, info, warn, error allowed: - defaults - pythonAvailable log levels:
debug: Detailed diagnostic information for troubleshootinginfo: General informational messages (default)warn: Warning messages for potential issueserror: Error messages only
The default log level is info, which provides a balance between visibility and log volume. Use debug for troubleshooting network access issues or error to minimize log output.
See the Sandbox Configuration documentation for detailed AWF configuration options.
Disabling the Firewall
Section titled “Disabling the Firewall”The firewall is always enabled via the default sandbox.agent: awf configuration:
engine: copilotnetwork: allowed: - defaults - python - "api.example.com"# sandbox.agent defaults to 'awf' if not specifiedLegacy approach (deprecated):
strict: falsenetwork: allowed: - defaults - python - "api.example.com" firewall: falseWhen the firewall is disabled:
- Network permissions are still applied for content sanitization
- The agent can make network requests without firewall enforcement
- This is useful during development or when the firewall is incompatible with your workflow
For production workflows, enabling the firewall is recommended for better network security.
Wildcard Domain Patterns
Section titled “Wildcard Domain Patterns”Use wildcard patterns (*.example.com) to match any subdomain of a domain. Wildcards provide explicit control when you need to allow a family of subdomains.
network: allowed: - defaults - "*.cdn.example.com" # Matches img.cdn.example.com, static.cdn.example.com - "*.storage.example.com" # Matches files.storage.example.comWildcard matching behavior:
*.example.commatchessubdomain.example.comanddeep.nested.example.com*.example.comalso matches the base domainexample.com- Only a single wildcard at the start is allowed (e.g.,
*.*.example.comis invalid) - The wildcard must be followed by a dot and domain (e.g.,
*alone is not allowed in strict mode)
Best Practices
Section titled “Best Practices”Follow the principle of least privilege by only allowing access to domains and ecosystems actually needed. Prefer ecosystem identifiers over listing individual domains. For custom domains, both base domains (e.g., trusted.com) and wildcard patterns (e.g., *.trusted.com) work for subdomain matching.
Troubleshooting
Section titled “Troubleshooting”If you encounter network access blocked errors, verify that required domains or ecosystems are included in the allowed list. Start with network: defaults and add specific requirements incrementally. Network access violations are logged in workflow execution logs.
Use gh aw logs --run-id <run-id> to view firewall activity and identify blocked domains. See the Network Configuration Guide for detailed troubleshooting steps and common solutions.
Related Documentation
Section titled “Related Documentation”- Network Configuration Guide - Practical examples and common patterns
- Frontmatter - Complete frontmatter configuration guide
- Tools - Tool-specific network access configuration
- Security Notes - Comprehensive security guidance