Skip to main content

GitHub

The cipr github command retrieves IP ranges for GitHub services (Actions, web, API, git, hooks, Pages, packages, importer, and more).

Usage

CLI command
cipr github [flags]

Data Format

See the GitHub command data format for output fields and filter-value guidance.

Flags

FlagDescriptionDefaultRequiredMultiple values
--ipv4Get only IPv4 ranges.
--ipv6Get only IPv6 ranges.
--filter-serviceFilter results by GitHub service (e.g. actions, web, api, git, hooks, pages, packages, importer, github_enterprise_importer).
--listList unique values for a dimension instead of IP ranges. Valid: services.

--filter-service accepts comma-separated values and matches any listed service. When neither --ipv4 nor --ipv6 is set, both are fetched. --list composes with --filter-service but ignores --ipv4/--ipv6. The set of available services is derived live from the GitHub meta endpoint, so any service added by GitHub appears automatically without a cipr update.

Source and caching

The configured source key is github, with these default settings:

github_endpoint = "https://api.github.com/meta"
github_local_file = ""
github_cache_ttl = "24h"

Use cipr configure github to inspect the effective values. Custom URLs and local files supplied through --source must use the same JSON schema as the GitHub Meta API response.

GitHub recommends polling the Meta API for current ranges. Use --no-cache when a run must fetch the current response instead of a valid cached response.

Examples

tip

IP ranges in the output examples are snapshots and might not be current.

Get all GitHub IPv4 ranges

CLI command
cipr github --ipv4
Output
...
140.82.112.0/20
185.199.108.0/22
192.30.252.0/22
...

Get GitHub Actions IPv4 ranges

CLI command
cipr github --filter-service actions --ipv4
Output
...
4.148.0.0/16
4.149.0.0/18
13.105.49.0/24
...

Get GitHub Actions, web, and API ranges

CLI command
cipr github --filter-service actions,web,api

Get GitHub git IPv6 ranges with mini verbosity

CLI command
cipr github --filter-service git --ipv6 --verbose-mode mini
Output
...
2a0a:a440::/29,git
2606:50c0::/32,git
...

Get all GitHub web ranges with full verbosity

CLI command
cipr github --filter-service web --verbose
Output
...
IP Prefix: 140.82.112.0/20, Service: web
IP Prefix: 185.199.108.0/22, Service: web
IP Prefix: 2a0a:a440::/29, Service: web
...

List all GitHub services

CLI command
cipr github --list services
Output
...
actions
api
copilot
git
hooks
importer
packages
pages
web
...