secrets-scan

Scan staged Git changes for API keys and secret patterns.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimmymalhan/codereview-pilot --skill secrets-scan-jimmymalhan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-scan
Source: https://github.com/jimmymalhan/codereview-pilot/tree/main/.claude/skills/secrets-scan
Command: npx skills add https://github.com/jimmymalhan/codereview-pilot --skill secrets-scan-jimmymalhan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents sensitive information like API keys and tokens from being accidentally committed into your codebase, safeguarding against security breaches.

Core Features & Use Cases

  • Pre-commit Scanning: Automatically scans staged changes before a commit is finalized.
  • Pattern Matching: Detects common secret patterns including API keys, tokens, and .env file content.
  • Commit Blocking: Halts the commit process if secrets are detected, providing a clear error message.
  • Allowlisting: Supports specific comments to bypass scanning for legitimate test fixtures.
  • Use Case: Ensure that no developer accidentally commits a database password or a cloud provider API key to your version control system.

Quick Start

Run the secrets-scan skill to check staged files for any secrets before committing.

Frequently Asked Questions about secrets-scan

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

FAQPage Schema
How do I prevent API keys and tokens from being committed to Git?

To prevent API keys and tokens from being committed, use a pre-commit hook to scan staged code changes for sensitive information. This process blocks the commit if secrets are detected and provides specific file and line number feedback.

How does pre-commit secret scanning work for staged changes?

Pre-commit secret scanning works by automatically analyzing your staged Git changes against common secret patterns. If an API key or token is detected, the commit is halted immediately with a clear error message detailing the specific file and line number.

Can I allowlist test fixtures that contain fake API keys during secret scanning?

Yes, you can allowlist test fixtures containing fake API keys during secret scanning. The process supports specific comments to bypass scanning for legitimate test files, allowing the commit to proceed without false positives.

What is the best way to block commits containing .env file content?

The best way to block commits containing .env file content is to run an automated secret scan on staged files. This detects common secret patterns and halts the Git commit process, safeguarding against accidental configuration exposure.

Do I need to install dependencies to scan staged code for secrets?

No, you do not need to install dependencies to scan staged code for secrets. This capability operates with no external dependencies, directly checking your staged changes for sensitive information before allowing a final commit.