Skip to content
Back to skills

Secrets Leak Detector

ASecurity

Scan codebases to detect leaked API keys, tokens, or credentials.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 27, 2026
developmentpythonbashgitapi

Works with

  • terminal
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 27, 2026

npx -y skills add RMAzrim/opencode-artes --skill secrets-leak-detector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Secrets Leak Detector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Secrets Leak Detector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rmazrim-secrets-leak-detector/badge)](https://www.skillsdirectory.com/skills/rmazrim-secrets-leak-detector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Secrets Leak Detector
description: Scan codebases to detect leaked API keys, tokens, or credentials.
metadata:
  source: skills/secrets-leak-detector/secrets-leak-detector.md
---

# Secrets Leak Detector

## Prerequisites & Dependencies
- `gitleaks` 8.x and/or `trufflehog` 3.x on `PATH`; Git access to the full repository history
- Optional: `pre-commit` (Python) for local hook-based scanning
- Incident response access: authority to revoke/rotate credentials for any confirmed finding

## Execution Steps
1. Run a no-git scan on the working tree to catch unstaged leaks: `gitleaks detect --no-git -v`.
2. Scan the entire Git history, including deleted branches: `gitleaks detect --log-opts="--all"` (optionally `--redact` on shared terminals).
3. Cross-check with Trufflehog verification to reduce false positives: `trufflehog git file://. --only-verified`.
4. Triage findings: classify valid vs revoked, record commit hash, author, and file path; never paste secret values into tickets or reports.
5. Rotate every exposed credential immediately — treat all detected secrets as compromised regardless of age.
6. Purge secrets from history with `git filter-repo` (force-push with team coordination), then add a pre-commit scan and a `.gitleaks.toml` allowlist for sanctioned test fixtures.

```bash
gitleaks detect --no-git --verbose --report-format json --report-path leaks.json
gitleaks detect --log-opts="--all" --verbose --redact
trufflehog git file://. --only-verified --json > truffle.json

pip install git-filter-repo
git filter-repo --replace-text secrets-to-redact.txt --force
```

```toml
# .gitleaks.toml
[allowlist]
paths = ['''(^|/)test/fixtures/.*''']
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.