secrets-scan

Detect hardcoded secrets in source code and configuration files.

Updated Mar 24, 2023
One-click install
npx skills add https://github.com/j4hr3n/dotfiles --skill secrets-scan-j4hr3n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-scan
Source: https://github.com/j4hr3n/dotfiles/tree/main/configs/claude-code/skills/secrets-scan
Command: npx skills add https://github.com/j4hr3n/dotfiles --skill secrets-scan-j4hr3n

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect hardcoded credentials, API keys, tokens, and secrets across source code and configuration files to prevent credential exposure.

Core Features & Use Cases

  • Automated secret discovery using scanners (TruffleHog, gitleaks) and manual pattern checks.
  • Contextual risk evaluation and remediation guidance for detected secrets.
  • Use cases include pre-commit checks, repository audits, and security reviews of pull requests.

Quick Start

Run the scanner against a repository to detect and remediate leaked credentials.

Frequently Asked Questions about secrets-scan

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

FAQPage Schema
How do I detect hardcoded secrets and API keys in my source code?

Detect hardcoded secrets in source code by running automated scanners like TruffleHog and gitleaks alongside manual pattern checks. This process identifies exposed credentials and provides remediation guidance to secure your repository.

Can I use secret detection tools in pre-commit hooks and CI pipelines?

Yes, you can integrate secret detection into pre-commit hooks and CI pipelines. The scanner orchestrates checks across any language to prevent leaked credentials from entering source control during code reviews or automated repository audits.

What is the best way to audit a git repository for exposed credentials?

The best way to audit a repository for exposed credentials is orchestrating automated tools like TruffleHog and gitleaks combined with manual pattern checks. This approach evaluates contextual risk and generates redaction policies for remediation.

How do I remediate and redact leaked secrets found during a repository audit?

Remediate leaked secrets found during a repository audit by following the contextual remediation guidance and applying redaction policies provided after detection. This ensures exposed API keys and tokens are securely removed from source code and configuration files.

Does static analysis for secret detection work across any programming language?

Yes, static analysis for secret detection works across any programming language where secrets may be present. It identifies hardcoded credentials in source code and configuration files without requiring language-specific dependencies or components.

Why should I use multiple secret scanners like TruffleHog and gitleaks together?

Using multiple secret scanners like TruffleHog and gitleaks together increases detection coverage for hardcoded credentials. Orchestrating both tools alongside manual pattern checks reduces false negatives and improves contextual risk evaluation during code reviews.