gitleaks

Detect hardcoded secrets in source code and Git history using Gitleaks.

8|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/igbuend/grimbard --skill gitleaks-igbuend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitleaks
Source: https://github.com/igbuend/grimbard/tree/main/skills/gitleaks
Command: npx skills add https://github.com/igbuend/grimbard --skill gitleaks-igbuend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps detect and prevent sensitive information like API keys, passwords, and tokens from being accidentally committed into code repositories or exposed in their history.

Core Features & Use Cases

  • Secret Detection: Scans source code and Git history for hardcoded secrets.
  • Prevention: Can be integrated into pre-commit hooks and CI/CD pipelines to block commits containing secrets.
  • Reporting: Generates reports in various formats (SARIF, JSON, CSV) for analysis.
  • Use Case: Before merging a pull request, run this Skill to ensure no accidental API keys were included in the changes, preventing potential security breaches.

Quick Start

Use the gitleaks skill to scan the current directory for secrets.

Frequently Asked Questions about gitleaks

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

FAQPage Schema
How do I scan for hardcoded secrets in Git history?

To scan for secrets in Git history, you can use a detection tool to analyze commit changes and identify exposed credentials, API keys, and tokens within your source code repositories.

What is the best way to prevent API keys from being committed to a codebase?

The best way to prevent API keys from being committed is to integrate secret detection into pre-commit hooks or CI/CD pipelines to automatically block commits containing exposed credentials.

Does Gitleaks support SARIF output for security analysis platforms?

Yes, Gitleaks supports generating reports in SARIF format, alongside JSON and CSV, allowing you to integrate secret detection results directly with security analysis platforms.

How do I check a pull request for exposed credentials before merging?

To check a pull request for exposed credentials, run a secret detection scan on the proposed changes to ensure no accidental passwords or tokens were included before merging the code.

Do I need to install dependencies to scan source code for passwords?

No, you do not need to install external dependencies to scan source code for passwords, as the detection mechanism operates independently to identify hardcoded secrets in your directories.