Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

ggshield

$ ggshield Official Med Risk
GitGuardian · Security & Secrets · MIT · macos / linux / windows

ggshield (ggshield) detects hardcoded API keys, tokens, credentials, and IaC misconfigurations across directories, git commits, and pre-commit hooks using GitGuardian's detection engine. Provides --json, --exit-zero, and GITGUARDIAN_API_KEY support for automated CI and agent workflows.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install ggshield
CLI vs MCP Decision CLI Preferred vs MCP

ggshield walks local git history and staged diffs directly in the workspace and returns compact --json findings.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Consistent --json output, --exit-zero, --yes, and headless GITGUARDIAN_API_KEY execution across secret and IaC scans.

  • Native --json output on secret scan and iac scan
  • Non-interactive via GITGUARDIAN_API_KEY
Trust & Safety 21 / 25

Read-only locally and masks secrets by default unless --show-secrets is passed, though scanned file chunks are sent to GitGuardian's API.

  • Default secret redaction in output (--show-secrets is opt-in)
  • Transmits scanned snippets to GitGuardian cloud/self-hosted API
Setup & Portability 13 / 15

Available via brew, pip, uvx, Docker, and standalone binaries across macOS, Linux, and Windows.

  • Broad package availability across platforms
Utility & Efficiency 13 / 15

High-precision secret detection (500+ detectors) plus IaC and honeytoken checks in one CLI.

  • Low false-positive rate with GitGuardian detectors
Maintenance & Lineage 9 / 10

First-party GitGuardian CLI (GitGuardian/ggshield) under MIT license.

  • Official GitGuardian/ggshield repository
Docs & Verifiability 9 / 10

Extensive official docs at docs.gitguardian.com and crisp Click --help output.

  • Well-structured docs and CI examples

Security, Auth & Guardrails

Auth Modes
Env API Key OAuth Browser Config File
Credential Storage

Reads GITGUARDIAN_API_KEY from environment or saved auth config (~/.config/ggshield/auth_config.yaml).

Side Effects
Read-Only
Cost & Quotas

MIT open-source CLI; requires a GitGuardian API key (free tier available for individuals and small teams).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# ggshield Agent Rules
- Export `GITGUARDIAN_API_KEY` in CI/agent environments so `ggshield` does not attempt `auth login` browser OAuth.
- Always pass `--json` (and avoid `--show-secrets` so raw credentials do not enter agent logs).

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan a repository directory for secrets in JSON
ggshield secret scan path -r --json .

Recursively scans . (-r) for hardcoded credentials and outputs structured --json findings.

Scan staged git changes before commit
ggshield secret scan pre-commit --json

Audits staged diffs in git with --json output and exits non-zero when secrets are detected.

Strengths for Agents

  • + Masks leaked secrets by default unless --show-secrets is explicitly enabled.
  • + Structured --json across path, repo, pre-commit, and iac scans.

Caveats & Pitfalls

  • ! Requires GITGUARDIAN_API_KEY and outbound HTTPS access to GitGuardian's API (cannot run fully air-gapped without self-hosted GitGuardian).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI