github-secret-hunting

Scan public GitHub repositories for leaked credentials and verify their validity.

1.1k|191|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/uphiago/recon-skills --skill github-secret-hunting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-secret-hunting
Source: https://github.com/uphiago/recon-skills/tree/main/recon/github-secret-hunting
Command: npx skills add https://github.com/uphiago/recon-skills --skill github-secret-hunting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers frequently accidentally push sensitive credentials such as API keys, access tokens, passwords, and internal infrastructure details to public GitHub repositories, creating a significant security risk if these secrets are discovered and exploited by malicious actors before they are revoked.

Core Features & Use Cases

  • Targeted GitHub Dorking: Use GitDorker with pre-built dork lists to search for sensitive files like .env, configuration files, and CI/CD workflow files across target organization repositories.
  • Deep Historical Secret Scanning: Leverage TruffleHog to scan entire GitHub organizations or individual repositories, including deleted commit history, to find verified active secrets.
  • Real-Time Leak Monitoring: Use shhgit to monitor for new secret leaks from target organizations as they are pushed to public repositories.
  • Credential Verification: Validate discovered secrets with minimal API calls to confirm they are still active and assess their access level. Use case: For example, during a penetration test of a target that hosts public code on GitHub, use this skill to identify valid AWS access keys or GitHub personal access tokens exposed in their repositories to evaluate credential exposure risk.

Quick Start

Use the github-secret-hunting skill to scan the public GitHub repositories of target.com for leaked API keys, tokens, and hardcoded credentials, then verify which of the found secrets are still active.

Frequently Asked Questions about github-secret-hunting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan GitHub repositories for leaked API keys and tokens?

To scan GitHub repositories for leaked API keys and tokens, you use tools like TruffleHog and GitDorker to search public code, configuration files, and deleted commit history for exposed credentials. This process requires a GitHub Personal Access Token with public_repo scope.

What is GitHub dorking for finding exposed credentials?

GitHub dorking for finding exposed credentials is the process of using specialized search queries to find sensitive files like .env or CI/CD configurations across target organization repositories. It applies to offensive security reconnaissance and OSINT workflows to evaluate credential exposure risk.

Can TruffleHog scan deleted commit history for secrets?

Yes, TruffleHog can scan deleted commit history for secrets. It performs deep historical secret scanning across entire GitHub organizations or individual repositories to find verified active secrets that were previously pushed and removed.

Do I need a GitHub Personal Access Token for secret hunting?

Yes, you need a GitHub Personal Access Token with public_repo scope for secret hunting. Scanning public GitHub repositories for leaked API keys, tokens, and internal infrastructure credentials requires this token to authenticate search requests and access target organization repositories.

How do I verify if discovered API keys and tokens are still active?

To verify if discovered API keys and tokens are still active, you perform credential verification with minimal API calls. This confirms whether the exposed secrets found in public GitHub repositories are valid and assesses their specific access level.

What is the best way to monitor for real-time secret leaks on GitHub?

The best way to monitor for real-time secret leaks on GitHub is by using shhgit to watch for new secret exposures as they are pushed to public repositories. This allows penetration testers to identify valid AWS access keys or internal infrastructure credentials immediately.