English Help Legal Sign Up Log In

Finding Public Business Emails in GitHub History

Scraping emails from GitHub commit histories and repositories can reveal contact information hidden in plain sight. Commit objects often retain author and committer metadata, while older patches may contain details accidentally left in configuration files. User profiles, contributor guides, security policies, and support pages may also publish a business contact.

For Australian teams, that distinction is practical. Agencies and software companies across Sydney, Melbourne, Brisbane, Perth, and Adelaide commonly use .com.au domains and generic mailboxes such as hello@, support@, or compliance@. These role addresses are more appropriate for research than an engineer’s private Gmail account, even when the latter appears in a commit header.

A reliable workflow combines GitHub’s REST API, local git history, and verification against official pages. The goal is not to compile every address visible online. It is to establish provenance for a small set of relevant business contacts, remove GitHub noreply placeholders and personal accounts, and retain only records with a defensible purpose.

Public availability does not remove privacy obligations. Australia’s Privacy Act 1988 and Australian Privacy Principles may apply to personal information, while the Spam Act 2003 and ACMA guidance govern commercial email. Treat collection as governed research, document each source, and avoid bulk outreach to personal addresses.

Set a narrow collection scope

Begin with an allowlist of organisations whose products, services or communities are relevant to your research. Search public repositories owned by those organisations rather than using broad GitHub queries. Restrict the exercise to business contacts and role addresses connected with the organisation’s work.

Before querying GitHub, review its API terms and acceptable-use policies. Use public repositories only, and do not attempt to bypass private-repository controls, account privacy settings, rate limits or commit-email redaction. GitHub documents primary and secondary API limits; authenticated requests should still use backoff and honour Retry-After headers.

Define the fields you need in advance: name, business email, organisation, contact type, source URL and collection date. Avoid collecting unrelated profile details, commit messages containing sensitive information or identities that have no commercial relevance.

Extract commit identity metadata

Every git commit can include an author name, author email, committer name and committer email. GitHub commonly stores these values in the commit object, even when the displayed profile picture or account differs. The address may be a company domain, a personal provider or one of GitHub’s noreply variants.

The GitHub CLI can retrieve commit metadata from the REST API without manually handling each page:

gh api --paginate "repos/OWNER/REPO/commits?per_page=100" \
  --jq '.[] | [.commit.author.name, .commit.author.email, .commit.committer.email, .html_url] | @tsv' \
  | sort -u

This command lists both identity fields alongside the commit URL, giving you a traceable source. It covers the repository’s default branch, so inspect named branches separately when their history materially differs. Save the raw output temporarily rather than copying addresses directly into a marketing system.

Do not treat noreply@github.com and users.noreply.github.com as contact addresses. Do not attempt to deanonymise these addresses or reconstruct a private identity. The purpose is to identify a clearly published organisational contact, not to connect pseudonymous contributors to people.

Search files and historical diffs

Commit metadata is only one source. A local clone makes it straightforward to examine author identities across branches and tags that you are authorised to access:

git clone https://github.com/OWNER/REPO.git
cd REPO
git log --all --format='%aN <%aE>' | sort -u

Historical patches may reveal addresses that once appeared in configuration files, deployment scripts, documentation or test fixtures. Use git log --all -p with narrow pathspecs to inspect relevant revisions. A commit URL or blob SHA should accompany every retained record so another reviewer can reproduce the finding.

Current working-tree files can also contain role addresses in README files, .env examples or maintainer documentation:

rg -n --hidden -g '!.git/**' -g '!node_modules/**' \
  '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}'

Search results are leads rather than approved contacts. An address embedded in an old patch may be obsolete, personal or included without any intention to receive sales communication.

Validate business addresses carefully

Normalise each candidate by trimming whitespace and checking its syntax, then compare it with the organisation’s official website, domain records and public documentation. Generic addresses on an Australian business domain are generally stronger candidates than names at consumer email providers. Domain ownership alone does not prove that a particular individual currently works there.

DNS checks can confirm that a domain accepts mail, but they do not verify the role or its owner:

dig MX example.com.au

Avoid sending automated verification probes to harvested personal addresses. Check the official contact page, repository documentation, company registry or a trusted public source instead. Record whether the address is generic, published as a maintainer contact, or merely an accidental disclosure.

Keep a confidence field alongside the address. High confidence means an official page or current repository document explicitly lists it for contact. Medium confidence means it appears in a relevant business-domain commit. Anything ambiguous or connected to a personal provider should be excluded from outreach datasets.

Follow Australian privacy and spam rules

The Spam Act 2003 applies to commercial electronic messages and does not provide a blanket business-to-business exemption. A message generally requires consent, clear sender identification and a functional unsubscribe mechanism. An address harvested from the internet cannot, by itself, be used to infer consent. A conspicuously published role address may support a relevant one-off enquiry in some circumstances, but it is not permission for an unrelated bulk campaign.

Where the Privacy Act applies, assess the Australian Privacy Principles, including collection and consent, notice, purpose limitation, security, access and correction. Publicly available personal information is not automatically exempt from every obligation. Document the purpose, restrict use to that purpose and avoid collecting sensitive details that are unnecessary for business-contact research.

Operational controls should include a do-not-contact register, prompt suppression of opt-outs and secure deletion procedures. Account for Australian Eastern Standard Time, Australian Eastern Daylight Time and Western Standard Time when scheduling system tasks or follow-up in Sydney, Melbourne and Perth. If personal information is compromised, follow the Privacy Act’s breach-assessment and Office of the Australian Information Commissioner notification process.

Maintain a defensible contact record

Store only the information required for the intended activity. A useful record contains the email address, organisation, contact type, role, source URL, commit or document reference, discovery date, verification method and current status. This creates an audit trail and makes corrections or deletion requests manageable.

Apply role-based access, encryption in transit and at rest, and a defined retention period. If an Australian agency or software vendor handles the records on your behalf, document its security controls, access arrangements, breach responsibilities and deletion process. Avoid uploading a complete extraction to unapproved enrichment platforms.

Review records periodically because maintainers change, repositories move and contact pages are updated. Remove stale personal data and keep suppression decisions separate from the research dataset. A disciplined GitHub email-discovery process should produce a small, traceable set of relevant business contacts rather than an indiscriminate archive of personal information.