github-git-recon
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub & Git Recon
GitHub与Git侦察
Code hosts leak identities (commit emails), infrastructure (configs), and
secrets (keys). All public and passive.
代码托管平台会泄露身份信息(提交邮箱)、基础设施配置(配置文件)以及密钥(凭证)。所有操作均基于公开信息且为被动式侦察。
People from commits
从提交记录获取人员信息
Every commit carries an author name + email. Pull them:
bash
git clone <repo> && git log --all --format='%an <%ae>' | sort -uGitHub API exposes a user's repos, orgs, gists, followers, and starred repos:
shows recent activity and
timezone (from commit timestamps). Reused commit email → ; handle →
.
https://api.github.com/users/<user>/events/publicemail-osintusername-osint每一条提交记录都包含作者姓名和邮箱。可通过以下命令提取:
bash
git clone <repo> && git log --all --format='%an <%ae>' | sort -uGitHub API会公开用户的仓库、组织、Gist、关注者及标星仓库: 可查看用户近期活动及时区信息(来自提交时间戳)。复用的提交邮箱可用于(邮箱开源情报);用户名可用于(用户名开源情报)。
https://api.github.com/users/<user>/events/publicemail-osintusername-osintSecret hunting
密钥泄露排查
Scan repos, history, and gists for leaked credentials:
bash
trufflehog github --org=<org> # verified secrets across an org
gitleaks detect --source=. -v # local clone incl. full historyDeleted secrets often survive in git history and forks — always scan
history, not just HEAD. GitHub code search () finds keys
across all public repos: search the org domain, internal hostnames, or key
prefixes ( for AWS, for GitHub tokens).
--all/search?type=codeAKIAghp_扫描仓库、历史记录及Gist以查找泄露的凭证:
bash
trufflehog github --org=<org> # verified secrets across an org
gitleaks detect --source=. -v # local clone incl. full history已删除的密钥通常仍会保留在Git历史记录及分支中——务必扫描全部历史记录,而非仅HEAD最新版本。GitHub代码搜索()可在所有公开仓库中查找密钥:可搜索组织域名、内部主机名或密钥前缀(如AWS的、GitHub令牌的)。
--all/search?type=codeAKIAghp_Org & infra mapping
组织与基础设施映射
- Org members, repos, and dependencies reveal the tech stack and team.
- Config files (, CI YAML, Terraform) leak hostnames, buckets, and service names →
.env.example/domain-osint.shodan-censys-recon - Issues, PRs, and wikis contain internal discussion and real names.
- 组织成员、仓库及依赖项可揭示技术栈与团队构成。
- 配置文件(, CI YAML, Terraform)会泄露主机名、存储桶及服务名称 →
.env.example/domain-osint。shodan-censys-recon - 问题、PR及Wiki中包含内部讨论内容与真实姓名。
Ethics
伦理规范
Finding a leaked key does not authorize using it. Report exposures responsibly;
never access systems with found credentials — see ../../ETHICS.md.
发现泄露的密钥并不代表拥有使用权限。请负责任地报告泄露情况;切勿使用获取到的凭证访问系统——详情请参阅../../ETHICS.md。