/gitguardian:scan-secretsfrom GitGuardian
Scans files, staged changes, commits, history, Docker images, or packages for hardcoded secrets using ggshield CLI. Use during audits or suspected leak investigations.
Ships in GitGuardian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run a scan only when the user asks for one. Never start a scan on your own initiative: not after an edit, not before a commit or push, not because you suspect a leak. Tell the user what you suspect and offer the scan. Never write your own secret scanner: no grep, regex, script, or any other tool to look for secrets. ggshield secret scan is the only scanner.
For routine credential edits, commits, and pushes, hooks do the checks. Reuse protection that works, or offer an installation one time through install-hooks. If that skill is not available, hook-selection.md is a self-contained fallback. If the user declined an installation, do not run repeated scans instead. Do not report unscanned work as clean.
check-hmsl to check if a known credential leaked publicly. Use scan-machine to inventory a whole machine.GitGuardian:scan_secrets for these surfaces. If the user declines a CLI installation, offer the MCP tool only for a single pasted snippet. It is not a substitute for a repository or history scan.An installed and authenticated ggshield that supports the requested command. If the state is unknown, check ggshield --version, the relevant --help output, and ggshield api-status.
If needed, read ggshield-cli-setup.md. A hook installation is optional and needs its own authorization. A requested scan does not need a hook.
Always use --json. A recursive path scan needs both -r and -y. Without -y, the CLI waits for an interactive confirmation. Scan the requested surface. Do not stage unrelated files to scan them.
ggshield secret scan path <file> --json
ggshield secret scan path -r -y . --json # current files
ggshield secret scan pre-commit --json # explicit staged scan
ggshield secret scan repo . --json # full history
ggshield secret scan commit-range HEAD~5..HEAD --json
ggshield secret scan commit <sha> --json
ggshield secret scan docker <image> --json
ggshield secret scan pypi <package> --json
A staged scan does not cover the outgoing commit history. For command variants and CI, read workflows.md. For JSON fields, validity, or false positives, read interpreting-results.md. Do not read them for a command or a result that you already understand. Report an error or an incomplete scan as unchecked, not as clean.
Wait for the complete result before you remediate. Group repeated credentials across files and commits. Keep each distinct credential. Report the locations, the type, and the validity. Do not show the secret values. Stop the affected publishing or commit action. Never show code that contains a detected secret.
Before you give remediation advice, read remediation-doctrine.md. Use its triage axes (detection context, exposure, ownership, blast radius) and its deliverable modes. A valid credential still needs triage. A production rotation can need coordination. Produce one consolidated plan.
If the validity is unknown, cannot_check, no_checker, or failed_to_check, propose HMSL to check for a public leak. HMSL is user-run only, also when the check-hmsl skill is absent. Never run its checks, its fingerprint, query, or decrypt pipeline, or its secret-manager checks. Never read a credential file or an intermediate file with any tool. Never ask for plaintext in the chat.
Prepare the command for the user's terminal with -n none --json. Ask the user to check ggshield hmsl quota before a bulk run. Reject a naming strategy that identifies the secret, including cleartext. Read the HMSL section of interpreting-results.md when you prepare the handoff. Or use check-hmsl for its additional flows.
-y with -r.ggignore or the ignore list.evals/evals.json (opens in a new tab)evals/files/README.md (opens in a new tab)evals/files/_shared/secrets.env (opens in a new tab)evals/files/eval-1-precommit-env-file/setup.sh (opens in a new tab)evals/files/eval-2-aws-key-history-hunt/setup.sh (opens in a new tab)evals/files/eval-3-ambiguous-project-scan/setup.sh (opens in a new tab)evals/targets.json (opens in a new tab)references/ggshield-cli-setup.md (opens in a new tab)references/gitguardian-platform.md (opens in a new tab)references/hook-selection.md (opens in a new tab)references/interpreting-results.md (opens in a new tab)references/remediation-doctrine.md (opens in a new tab)references/workflows.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/check-hmslCheck whether a known credential has already leaked publicly via GitGuardian's HasMySecretLeaked (HMSL) hash-lookup service. Use when the user inherits credentials, suspects a specific token leaked, wants to vet a HashiCorp Vault inventory, or asks "has this secret leaked", "is this compromised", or "check against HMSL". Distinct from scan-secrets, which finds unknown secrets in code; this checks known secrets against the HMSL corpus. User-run only — this is a command-handoff skill, so the agent prepares the commands, the user runs them in their own terminal, and the agent only interprets the sanitized output the user pastes back./create-honeytokensUse when generating or planting GitGuardian honeytokens, canary tokens, decoys, or tripwire credentials. Use around .env.example, sample configs, pre-publication open-source repos, internal wikis, runbooks, deploy scripts, or other attractive leak surfaces./install-hooksnpx claudepluginhub gitguardian/agent-skills --plugin gitguardianOther plugins' skills for the same job