ggshield  by GitGuardian

Proactive hardcoded secret detection for code security

Created 6 years ago
1,953 stars

Top 21.9% on SourcePulse

GitHubView on GitHub
Project Summary

Summary GitGuardian's ggshield is a powerful CLI tool designed to detect and validate over 500 types of hardcoded secrets within codebases. It serves as a crucial security layer, deployable as a pre-commit hook, GitHub Action, or standalone CLI, enabling developers and security teams to proactively identify and remediate sensitive information before it's committed or exposed. The primary benefit is preventing accidental leaks of credentials, API keys, and other sensitive data.

How It Works

ggshield operates as a command-line interface, utilizing GitGuardian's public API through the py-gitguardian library. It scans files, repositories, Docker images, and PyPI packages for known secret patterns. The tool is designed with privacy in mind; it only transmits metadata such as scan time and request size to GitGuardian's servers, ensuring that actual secrets and file contents remain private and are not stored.

Quick Start & Requirements

  • Installation: Multiple methods are supported:
    • macOS: brew install ggshield
    • Linux: Deb/RPM packages available via Cloudsmith.
    • Windows: choco install ggshield
    • Standalone: .pkg (macOS) and .zip (Windows) archives available on the ggshield release page. These do not require Python but need manual updates.
    • Python Package: Recommended via pipx install ggshield (isolated environment) or pip install --user ggshield. Requires a supported Python version (not EOL) and git.
  • Initial Setup: Authentication is required using ggshield auth login or by setting the GITGUARDIAN_API_KEY environment variable.
  • Documentation: Links to specific documentation for ggshield auth login are mentioned but not directly provided in the README.

Highlighted Details

  • Detects 500+ types of secrets using advanced checks.
  • Integrates seamlessly into Git workflows (pre-commit, pre-push, pre-receive hooks) and CI/CD pipelines (GitHub Actions).
  • Offers real-time scanning for interactions with AI coding assistants like Cursor, Claude Code, and Copilot Chat.
  • Supports scanning diverse targets: local files, Git repositories, Docker images, and PyPI packages.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or project roadmap were found in the provided README text.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license permits broad usage, including commercial applications and linking with closed-source projects.

Limitations & Caveats

Standalone package installations require manual updates. The pip install --user method is discouraged due to potential conflicts and may not function with system-managed Python installations.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
36
Issues (30d)
0
Star History
8 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems").

codegate by stacklok

0.2%
789
AI agent security and management tool
Created 1 year ago
Updated 11 months ago
Feedback? Help us improve.