secrets-gitleaks

Detect hardcoded secrets in git repositories using Gitleaks rules and entropy analysis.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mirandagabrieldev/claude-build-template --skill secrets-gitleaks-mirandagabrieldev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-gitleaks
Source: https://github.com/mirandagabrieldev/claude-build-template/tree/main/skills/security/secrets-gitleaks
Command: npx skills add https://github.com/mirandagabrieldev/claude-build-template --skill secrets-gitleaks-mirandagabrieldev

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Detects hardcoded secrets in git repositories and codebases to prevent credential leakage before deployment and ensure secure software supply chain.

Core Features & Use Cases

  • Pre-commit hook protection to block secret commits
  • CI/CD integration with reports (SARIF/JSON) and remediation workflows
  • Baseline and incremental scanning for ongoing compliance
  • Configuration templates and bundled resources for rapid adoption
  • Guidance for remediation, audits, and compliance mapping

Quick Start

Run gitleaks detect in your repository to scan for secrets.

Frequently Asked Questions about secrets-gitleaks

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

FAQPage Schema
How do I detect hardcoded secrets and API keys in a git repository?

To detect hardcoded secrets in a git repository, you can run gitleaks detect to scan your codebase using detection rules and entropy analysis to identify API keys, passwords, tokens, and private keys. This prevents credential leakage before deployment.

Can I use gitleaks as a pre-commit hook to block secret commits?

Yes, gitleaks can be applied as a pre-commit hook protection to block secret commits before they enter your codebase. This ensures hardcoded credentials are identified and prevented from being pushed to the repository.

How does secret scanning integrate with CI/CD pipelines for compliance reporting?

Secret scanning integrates with CI/CD pipelines by generating SARIF and JSON reports for remediation workflows. Baseline and incremental scanning provide ongoing compliance mapping and ensure secure software supply chain practices.

What is the best way to remediate hardcoded credentials found during repository audits?

The best way to remediate hardcoded credentials found during repository audits is to use provided configuration templates and bundled references. These resources offer guidance for remediation, compliance mapping, and resolving identified API keys and tokens.

Does gitleaks work for both baseline and incremental scanning in corporate codebases?

Yes, gitleaks works for both baseline and incremental scanning across corporate codebases. This approach supports ongoing compliance by detecting new hardcoded secrets in code while maintaining a baseline of previously identified credentials.

Why use entropy analysis for detecting private keys and tokens in a codebase?

Entropy analysis is used for detecting private keys and tokens because it measures randomness in strings to identify potential hardcoded secrets that standard detection rules might miss. This provides comprehensive coverage for API keys and passwords.