offensive-tools/cloud/gitleaks/SKILL.md
Detect hardcoded secrets (API keys, tokens, credentials) in git repos and files. Use when auditing source code, CI pipelines, or commit history for leaked secrets in red-team or pre-engagement recon.
npx skillsauth add aeondave/malskill gitleaksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect hardcoded secrets in git repos, files, and CI pipelines.
# Scan current git repo
gitleaks detect --source . -v
# Scan a remote repo
gitleaks detect --source https://github.com/org/repo
# Scan specific path (non-git)
gitleaks detect --source /path/to/dir --no-git
# Generate report
gitleaks detect --source . -r report.json -f json
| Flag | Purpose |
|------|---------|
| detect | Scan for secrets |
| protect | Pre-commit hook mode |
| --source PATH | Target path or URL |
| --no-git | Scan filesystem (not git history) |
| -r FILE | Report output file |
| -f FORMAT | Output format (json/csv/sarif) |
| -v | Verbose |
| --config FILE | Custom rules config |
| --branch NAME | Scan specific branch |
| --log-opts | Git log options (e.g. --all) |
Full history scan:
gitleaks detect --source . --log-opts="--all" -r leaks.json -f json
CI pipeline integration (fail on leak):
gitleaks detect --source . --exit-code 1
Custom rule for internal tokens:
# .gitleaks.toml
[[rules]]
id = "internal-api-key"
regex = '''MYAPP_[A-Z0-9]{32}'''
| File | When to load |
|------|--------------|
| references/ | Custom rule examples and CI config |
development
White-box auditing methodology for AI-generated ('vibe-coded') applications. Focuses on modern stack misconfigurations (Supabase, Next.js, Vercel).
development
Hybrid AI/Deterministic SAST methodology for discovering zero-day vulnerabilities in source code. Orchestrates structural search with AI-driven data flow and sink validation.
development
Auth assessment: hardware/embedded methodology; UART/JTAG/SWD/SPI/I2C, firmware extraction, boot/debug paths, embedded OS evidence.
devops
Container methodology: Identifying containerization limits, Docker/K8s misconfigurations, and executing escapes to the host node.