Skip to content
GitHub Agentic Workflows

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).

# Default: basic infrastructure only
engine:
id: copilot
network: defaults
# Ecosystems + custom domains
network:
allowed:
- defaults # Basic infrastructure
- python # Python/PyPI ecosystem
- node # Node.js/NPM ecosystem
- "api.example.com" # Custom domain
# Custom domains with wildcard patterns
network:
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 access
network: {}
# Block specific domains
network:
allowed:
- defaults # Basic infrastructure
- python # Python/PyPI ecosystem
blocked:
- "tracker.example.com" # Block specific tracking domain
- "analytics.example.com" # Block analytics
# Block entire ecosystems
network:
allowed:
- defaults
- github
- node
blocked:
- python # Block Python/PyPI even if in defaults

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 domains
network:
allowed:
- defaults
- github
blocked:
- "tracker.example.com"
- "analytics.example.com"
# Block entire ecosystem within broader allowed set
network:
allowed:
- defaults # Includes many ecosystems
blocked:
- python # Block Python/PyPI specifically
# Combine domain and ecosystem blocking
network:
allowed:
- defaults
- github
- node
blocked:
- python # Block Python ecosystem
- "cdn.example.com" # Block specific CDN

Key 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

Network permissions follow the principle of least privilege with four access levels:

  1. Default Allow List (network: defaults): Basic infrastructure only
  2. Selective Access (network: { allowed: [...] }): Only listed domains/ecosystems are accessible
  3. No Access (network: {}): All network access denied
  4. Automatic Subdomain Matching: Listed domains automatically match all subdomains (e.g., github.com allows api.github.com, raw.githubusercontent.com, etc.)
  5. Wildcard Patterns: Use *.example.com to explicitly match any subdomain of example.com

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
engine: copilot
network:
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 wildcard

Compiled to AWF:

Terminal window
--allow-domains ...,example.org,http://legacy.example.com,https://secure.api.example.com,...
  • https:// - HTTPS-only access
  • http:// - HTTP-only access
  • No prefix - Both HTTP and HTTPS (backward compatible)
  • 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

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.

Mix ecosystem identifiers with specific domains for fine-grained control:

IdentifierIncludes
defaultsBasic infrastructure (certificates, JSON schema, Ubuntu, package mirrors)
githubGitHub domains
containersDocker Hub, GitHub Container Registry, Quay
linux-distrosDebian, Alpine, and other Linux package repositories
dotnet, dart, go, haskell, java, node, perl, php, python, ruby, rust, swiftLanguage-specific package managers and registries
terraformHashiCorp and Terraform domains
playwrightPlaywright testing framework domains

Network permissions are enforced differently depending on the AI 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 domain

When enabled, AWF:

  • Wraps the Copilot CLI execution command
  • Enforces domain allowlisting using the --allow-domains flag
  • Automatically includes all subdomains (e.g., github.com allows api.github.com)
  • Supports wildcard patterns (e.g., *.cdn.example.com matches img.cdn.example.com)
  • Logs all network activity for audit purposes
  • Blocks access to domains not explicitly allowed

Control the verbosity of AWF firewall logs using the log-level field:

network:
firewall:
log-level: info # Options: debug, info, warn, error
allowed:
- defaults
- python

Available log levels:

  • debug: Detailed diagnostic information for troubleshooting
  • info: General informational messages (default)
  • warn: Warning messages for potential issues
  • error: 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.

The firewall is always enabled via the default sandbox.agent: awf configuration:

engine: copilot
network:
allowed:
- defaults
- python
- "api.example.com"
# sandbox.agent defaults to 'awf' if not specified

Legacy approach (deprecated):

strict: false
network:
allowed:
- defaults
- python
- "api.example.com"
firewall: false

When 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.

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.com

Wildcard matching behavior:

  • *.example.com matches subdomain.example.com and deep.nested.example.com
  • *.example.com also matches the base domain example.com
  • Only a single wildcard at the start is allowed (e.g., *.*.example.com is invalid)
  • The wildcard must be followed by a dot and domain (e.g., * alone is not allowed in strict mode)

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.

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.