ggshield-scanner

Scan repositories, files, and Docker images for hardcoded secrets.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

## What problem does it solve?

Detects hardcoded secrets in code by wrapping ggshield to scan repositories, files, and Docker images, helping teams prevent secret leakage before they reach version control.

## Core Features & Use Cases

  • Scans repositories, individual files, and Docker images for 500+ secret types.
  • Provides methods scan_repo, scan_file, scan_staged, install_hooks, and scan_docker to integrate with AI agents.
  • Use cases include pre-commit checks, secure development workflows, and docker image security scans.

### Quick Start

Install ggshield, set GITGUARDIAN_API_KEY, and instruct your agent to run scan_repo on your project.

Frequently Asked Questions about ggshield-scanner

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

FAQPage Schema
How do I scan code for hardcoded secrets before committing?

To scan code for hardcoded secrets before committing, you can use pre-commit checks and git hooks to inspect staged changes. This prevents sensitive data like API keys from leaking into version control by blocking insecure commits.

What types of secrets can be detected in a repository scan?

A repository scan can detect over 500 specific types of hardcoded secrets. It inspects whole projects, individual files, staged changes, and Docker images to identify sensitive data like API keys before they leak.

Do I need an API key to run secret scanning on my files?

Yes, you need to set the GITGUARDIAN_API_KEY environment variable to run secret scanning on your files. This API key enforcement ensures authenticated access when the scanner inspects repositories and Docker images.

Can I scan Docker images for hardcoded secrets during development?

Yes, you can scan Docker images for hardcoded secrets during development workflows. The scanning functionality includes a dedicated scan_docker method to inspect container images and prevent secret leakage before deployment.

How do I install git hooks for automated secret detection?

You can install git hooks for automated secret detection by instructing your AI agent to run the install_hooks method. This integrates secret scanning directly into your development workflow and pre-commit checks.