Updated Jul 14, 2026

Recon

Recover subdomains named in public GitHub code

Find subdomains for a domain in public GitHub code.

Agent

overview

What github-subdomains does

github-subdomains searches public GitHub for hostnames that reference your target domains. Config, CI, Terraform, and scripts often name staging hosts, internal APIs, and retired services missing from DNS feeds and certificate logs.

Every search hits the GitHub code-search API, so pass tokens with -t. -q skips extra per-language and noise queries. -e also searches dummy-prefixed domain variants. -k exits once every token is rate-limited. Domains input is a file, one domain per line.

Trickest runs it as a managed Recon node beside other passive sources. Merge names with subfinder or amass, then resolve and probe with httpx before scanning.

source github.com/gwen001/github-subdomains

use cases

Where github-subdomains fits

Surface subdomains that only live in code

Search public GitHub for a target domain and recover staging hosts, internal APIs, and forgotten services that passive DNS sources and certificate logs never list.

Add a source-code source to passive recon

Run github-subdomains beside subfinder and amass, then merge the results so the workflow resolves and probes every name from all three sources, not one.

Rotate tokens through a large search

Feed a comma-separated token list or a token file so the tool spreads requests across keys, keeps searching past a single token's rate limit, and exits cleanly with -k once they are all spent.

Feed discovered hosts into a probing pipeline

Pass the file of found subdomains to a resolver and httpx so only live hosts continue to your scanners downstream.

reference

github-subdomains inputs and flags

7 inputs
NameTypeFlagDescription
domainsFILE·Domains you are looking for, one per line (required).
tokensSTRING-tGitHub API tokens separated by commas.
tokens-fileFILE-tA file containing one GitHub token per line.
quickBOOLEAN-qQuick mode; skip the extra per-language and noise searches.
extended-modeBOOLEAN-eExtended mode; also search for dummy-prefixed variants of the domain.
exit-when-tokens-get-limitedBOOLEAN-kExit the program once all tokens have been disabled.
rawBOOLEAN-rawRaw output.

Showing key inputs. github-subdomains exposes 7 inputs in total.

example

Run github-subdomains

github-subdomains · command
# mine public GitHub for a domain's subdomains, two tokens, extended modegithub-subdomains -d example.com -t ghp_TOKEN1,ghp_TOKEN2 -e -o subdomains.txt
sample output
api.example.comdev.example.comstaging.example.cominternal-api.example.comjenkins.example.comgrafana.staging.example.comvpn.example.comgitlab-runner.dev.example.coms3-assets.example.com

guidance

Choosing github-subdomains

Use github-subdomains to add a source-code source to subdomain discovery. It needs GitHub API tokens via -t. Run it alongside subfinder and amass for passive coverage, then hand the merged names to a resolver and httpx. Prefer github-endpoints when you want paths, not hosts.

subfinder

Passive discovery from certificate logs and DNS aggregators. Different source for the same subdomain goal.

github-endpoints

Same author and token model. Harvests endpoints instead of subdomains from public GitHub.

amass

Broad multi-source enumeration. Heavier to run; wider coverage than a single GitHub source.

faq

github-subdomains questions

It queries the GitHub code-search API for files that mention your domains, then extracts and dedupes hostnames. Staging hosts and internal APIs hard-coded in config or CI often never appear in DNS aggregators or certificate logs.

Run github-subdomains yourself

A domain list feeds github-subdomains, which mines public GitHub for hostnames and passes them to httpx so only live subdomains land as output.

Facts on this page come from the live Trickest tool library.