# Git Secret Scanner with Gitleaks

> Scans Git repositories for leaked secrets using Gitleaks, TruffleHog, and custom regex patterns. Detects API keys, AWS credentials, private keys, and database connection strings across commit history.

- Skill: `agentskillexchange/git-secret-scanner-with-gitleaks` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/git-secret-scanner-with-gitleaks`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/git-secret-scanner-with-gitleaks/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/git-secret-scanner-with-gitleaks

---


# Git Secret Scanner with Gitleaks

Scans Git repositories for leaked secrets using Gitleaks, TruffleHog, and custom regex patterns. Detects API keys, AWS credentials, private keys, and database connection strings across commit history.

## Prerequisites

Git

## Installation

Use the upstream install or setup path that matches your environment:
- brew install gitleaks
- docker pull zricethezav/gitleaks:latest
- docker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] [OPTIONS] [SOURCE_PATH]
- docker pull ghcr.io/gitleaks/gitleaks:latest

Requirements and caveats from upstream:
- [dockerhub]: https://hub.docker.com/r/zricethezav/gitleaks
- [dockerhub-badge]: https://img.shields.io/docker/pulls/zricethezav/gitleaks.svg
- [![Docker Hub][dockerhub-badge]][dockerhub]

Basic usage or getting-started notes:
- ### Installing
- bash
- # MacOS

- Source: https://github.com/gitleaks/gitleaks
- Extracted from upstream docs: https://raw.githubusercontent.com/gitleaks/gitleaks/HEAD/README.md

## Documentation

- https://github.com/gitleaks/gitleaks#readme

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/git-secret-scanner-gitleaks/)

