secrets-detection

Detect leaked API keys and credentials in code repositories.

5|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/latestaiagents/agent-skills --skill secrets-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-detection
Source: https://github.com/latestaiagents/agent-skills/tree/main/plugins/security-guardian/skills/common/secrets-detection
Command: npx skills add https://github.com/latestaiagents/agent-skills --skill secrets-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify and prevent the accidental exposure of sensitive information like API keys, passwords, and credentials within your codebase, safeguarding against security breaches.

Core Features & Use Cases

  • Secret Scanning: Detects common secret patterns in code and git history.
  • Pre-Commit Hooks: Integrates with tools like Husky and Pre-commit to block secrets before they are committed.
  • CI/CD Integration: Enables automated secret scanning in your continuous integration pipelines.
  • Incident Response: Provides steps to revoke and clean up leaked secrets.

Quick Start

Use the secrets-detection skill to scan the current directory for any exposed API keys or credentials.

Frequently Asked Questions about secrets-detection

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

FAQPage Schema
How do I scan my code repository for leaked API keys and credentials?

To scan for leaked API keys and credentials, you can utilize secret detection tools like Gitleaks, git-secrets, or TruffleHog to comprehensively scan your code and git history for exposed sensitive information.

Can I integrate secret scanning into pre-commit hooks and CI/CD pipelines?

Yes, you can integrate secret scanning into pre-commit hooks and CI/CD pipelines using tools like Husky and Pre-commit to automatically block secrets before they are committed to the repository.

What is the best way to prevent accidental exposure of sensitive information in a codebase?

The best way to prevent accidental exposure of sensitive information is to implement automated secret scanning during code reviews and enforce pre-commit hooks to block credentials from entering your git history.

How should I respond if I find exposed passwords or API keys in my git history?

If you find exposed passwords or API keys in your git history, follow incident response steps to immediately revoke the leaked secrets and clean up the repository history to remove the sensitive data.

Does Gitleaks work for scanning credentials in existing git commit history?

Yes, Gitleaks works for scanning credentials by checking both your current source code and your existing git commit history to detect common secret patterns and prevent leakage of sensitive information.