gitleaks

Scan git repositories for exposed credentials using gitleaks.

7|Updated May 28, 2026
One-click install
npx skills add https://github.com/zcaceres/skills --skill gitleaks-zcaceres
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitleaks
Source: https://github.com/zcaceres/skills/tree/main/plugins/security/skills/gitleaks
Command: npx skills add https://github.com/zcaceres/skills --skill gitleaks-zcaceres

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This skill prevents accidental exposure of sensitive credentials by scanning git history and the working tree for secrets, ensuring your repository remains clean and secure.

Core Features & Use Cases

  • Baseline Scanning: Performs comprehensive scans of both git history and the current working tree to identify pre-existing leaks.
  • Proactive Protection: Scaffolds a local pre-commit hook and a CI workflow to catch new secrets before they are pushed to remote repositories.
  • Use Case: Use this skill when initializing a new project or auditing an existing repository to ensure no API keys, tokens, or passwords have been accidentally committed to version control.

Quick Start

Activate the security gitleaks skill to scan the current repository and set up automated secret protection.

Frequently Asked Questions about gitleaks

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

FAQPage Schema
How do I scan git history for accidentally committed secrets?

Scanning git history for secrets requires analyzing commit history and working directories to detect exposed credentials. This skill performs comprehensive baseline scans to identify pre-existing API keys, tokens, and passwords in your repository.

How do I prevent API keys and passwords from being pushed to git?

Preventing secrets from being pushed to git involves setting up automated security gates in development workflows. This skill scaffolds local pre-commit hooks and CI pipelines to catch new sensitive credentials before they reach remote repositories.

Do I need to install gitleaks to scan my repository for sensitive credentials?

Yes, you need the gitleaks binary installed on your host system to scan repositories for sensitive credentials. The skill operates by leveraging this binary to perform pattern-based secret detection and validation.

Can I integrate secret scanning into my CI/CD pipeline?

Integrating secret scanning into CI/CD pipelines is supported by scaffolding automated workflows. This skill enforces secret-scanning policies within your CI pipelines to ensure continuous compliance and prevent exposure during development.

What is the best way to audit an existing repository for exposed tokens?

Auditing an existing repository for exposed tokens requires a comprehensive scan of both git history and the current working tree. This skill identifies pre-existing leaks to ensure your repository remains clean and secure.