source-code-hunting

Hunt source code leaks, hardcoded secrets, and supply-chain risks using grep, semgrep, and trufflehog.

6.2k|1.0k|Updated Nov 8, 2025
One-click install
npx skills add https://github.com/Ed1s0nZ/CyberStrikeAI --skill source-code-hunting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: source-code-hunting
Source: https://github.com/Ed1s0nZ/CyberStrikeAI/tree/main/skills/source-code-hunting
Command: npx skills add https://github.com/Ed1s0nZ/CyberStrikeAI --skill source-code-hunting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Security testers often struggle to systematically uncover leaked source code, hardcoded credentials, obfuscated JavaScript logic, and supply-chain weaknesses during authorized penetration tests. This Skill consolidates proven hunting techniques into one operational checklist.

Core Features & Use Cases

  • Source Leak Recovery: Extract exposed repositories via .git leakage with git-dumper, then mine deleted sensitive files through git history, plus .svn, .DS_Store, and composer.lock artifacts.
  • Secrets & Dangerous Function Discovery: Grep for dangerous functions (exec, eval, unserialize, pickle.loads) and hardcoded keys (sk-, ghp_, RSA keys), then run trufflehog/gitleaks across git history, Docker layers, npm/PyPI tarballs, and frontend bundles.
  • JS Deobfuscation & Static Analysis: Rebuild RC4+base64 string-array decoders in Node.js to deobfuscate packed JavaScript (including UniApp app-service.js), and run semgrep or CodeQL for taint-based variant analysis.
  • Use Case: During an authorized web app assessment, dump an exposed .git directory, recover a deleted config file containing database credentials, then deobfuscate the frontend bundle to map hidden API endpoints.

Quick Start

Use the source-code-hunting skill to analyze this target for .git leaks, hardcoded secrets, and obfuscated JavaScript.

Frequently Asked Questions about source-code-hunting

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

FAQPage Schema
How do I recover source code from an exposed .git directory?

Use git-dumper to download the exposed .git directory, then run git log -p --all to inspect full history including deleted sensitive files. Also check related artifacts like .svn, .DS_Store, and composer.lock for additional leakage.

How to find hardcoded secrets in git history and frontend bundles?

Run trufflehog or gitleaks across the full git history, Docker image layers, npm/PyPI tarballs, and frontend bundles. Use the --only-verified flag to distinguish live credentials from dead ones, and grep for patterns like sk-, ghp_, and BEGIN RSA.

How do I deobfuscate JavaScript using RC4 string arrays?

Extract the string array (e.g., var a0G=[...]), locate the decoder function that applies RC4 plus base64, and find the rotation IIFE to determine the offset. Then rebuild the decoder in Node.js to batch-decode all strings into plaintext variable names and API paths.

Semgrep vs CodeQL for source code security scanning?

Semgrep with --config=auto provides fast pattern-based scanning with minimal setup. CodeQL requires building a database and writing queries but supports deeper taint tracking and variant analysis for vulnerability research.

What supply-chain attacks should I check in CI/CD pipelines?

Check for dependency confusion where internal package names are claimed on public registries, GitHub Actions command injection via ${{github.event.issue.title}}, self-hosted runner takeover, and leaked credentials in .npmrc or .pypirc files.