Zurück zum Ranking

GitGuardian/ggshield

Pythongitguardian.com

Detect and validate 500+ types of hardcoded secrets with advanced checks. Use it as a pre-commit hook, GitHub Action, or CLI for proactive secret detection and security.

devsecopssecuritycredentialsapikeykeycodeleakscanningprecommitsecrets-detectionsecrets-management
Sterne-Wachstum
Sterne
2k
Forks
212
Wochenwachstum
Issues
43
5001k1.5k
Juni 2020Juni 2022Juli 2024Juli 2026
ArtefaktePyPIpip install ggshield
README


ggshield: protect your code with GitGuardian

PyPI Docker Image Version (latest semver) License GitHub stars GitHub Workflow Status Codecov

ggshield is a CLI application that runs in your local environment or in a CI environment to help you detect more than 500+ types of secrets.

ggshield uses our public API through py-gitguardian to scan and detect potential vulnerabilities in files and other text content.

Only metadata such as call time, request size and scan mode is stored from scans using ggshield, therefore secrets will not be displayed on your dashboard and your files and secrets won't be stored.

Table of Contents

Installation

The quickest way to install ggshield.

Linux / macOS:

curl -sSfL \
  https://raw.githubusercontent.com/GitGuardian/ggshield/main/scripts/install/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/GitGuardian/ggshield/main/scripts/install/install.ps1 | iex

Or, if you prefer curl (bundled with Windows 10+):

curl.exe -sSL https://raw.githubusercontent.com/GitGuardian/ggshield/main/scripts/install/install.ps1 | powershell -NoProfile -ExecutionPolicy Bypass -Command -

The script accepts options such as --instance and --plugin (install a plugin). For the EU workspace or a self-hosted instance, set the GITGUARDIAN_INSTANCE environment variable (or pass --instance <URL>) before running.

See scripts/install/README.md for the full list of options, the other install methods, and how to uninstall.

The methods below install the CLI manually instead.

macOS

Homebrew

You can install ggshield using Homebrew:

brew install ggshield

Upgrading is handled by Homebrew.

Standalone .pkg package

Alternatively, you can download and install a standalone .pkg package from ggshield release page.

This package does not require installing Python, but you have to manually download new versions.

Linux

Deb and RPM packages

Deb and RPM packages are available on Cloudsmith.

Setup instructions:

Upgrading is handled by the package manager.

Windows

Chocolatey

ggshield is available via the Chocolatey package manager:

choco install ggshield

MSI installer

Download the MSI installer from the ggshield release page and install it:

msiexec /i ggshield-VERSION-x86_64-pc-windows-msvc.msi

Standalone .zip archive

We provide a standalone .zip archive on ggshield release page.

Unpack the archive on your disk, then add the directory containing the ggshield.exe file to %PATH%.

This archive does not require installing Python, but you have to manually download new versions.

All operating systems

ggshield can be installed on all supported operating systems via its PyPI package.

It requires a supported version of Python (not EOL) (except for standalone packages) and git.

If you don't use our packaged versions of ggshield, please be aware that we follow the Python release cycle and do not support versions that have reached EOL.

Using pipx

The recommended way to install ggshield from PyPI is to use pipx, which will install it in an isolated environment:

pipx install ggshield

To upgrade your installation, run:

pipx upgrade ggshield

Using pip

You can also install ggshield from PyPI using pip, but this is not recommended because the installation is not isolated, so other applications or packages installed this way may affect your ggshield installation. This method will also not work if your Python installation is declared as externally managed (for example when using the system Python on operating systems like Debian 12):

pip install --user ggshield

To upgrade your installation, run:

pip install --user --upgrade ggshield

Initial setup

Using ggshield auth login

To use ggshield you need to authenticate against GitGuardian servers. To do so, use the ggshield auth login command. This command automates the provisioning of a personal access token and its configuration on the local workstation.

You can learn more about it from ggshield auth login documentation.

Manual setup

You can also create your personal access token manually and store it in the GITGUARDIAN_API_KEY environment variable to complete the setup.

Getting started

Secrets

You can now use ggshield to search for secrets:

  • in files: ggshield secret scan path -r .
  • in repositories: ggshield secret scan repo .
  • in Docker images (docker command must be available): ggshield secret scan docker ubuntu:22.04
  • in Pypi packages (pip command must be available): ggshield secret scan pypi flask
  • and more, have a look at ggshield secret scan --help output for details.

Migrating a legacy configuration file

If ggshield reports that your .gitguardian.yaml (or .gitguardian.yml) config file uses a deprecated format, migrate it to the latest version with:

ggshield config migrate

By default, this looks for the configuration file in the current directory, so run it from the directory containing the file. To run it from anywhere, point ggshield to the file explicitly:

ggshield --config-path path/to/.gitguardian.yaml config migrate

The previous version of the file is kept as a .old backup next to it.

Integrations

You can integrate ggshield in your CI/CD workflow.

To catch errors earlier, use ggshield as a pre-commit, pre-push or pre-receive Git hook.

AI coding assistants

ggshield can scan interactions between you and your AI coding assistant in real time, blocking actions that contain secrets before they are executed.

You can install the hooks with the ggshield install command.

Supported tools: Cursor, Claude Code, Copilot Chat, and Codex.

Learn more

For more information, have a look at the documentation

Output

If no secrets have been found, the exit code will be 0:

ggshield secret scan pre-commit

If a secret is found in your staged code or in your CI, you will have an alert giving you the filename where the secret has been found and a patch giving you the position of the secret in the file:

ggshield secret scan pre-commit
2 incidents have been found in file production.rb

11 | config.paperclip_defaults = {
12 |     :s3_credentials => {
13 |     :bucket => "XXX",
14 |     :access_key_id => "XXXXXXXXXXXXXXXXXXXX",
                            |_____AWS Keys_____|

15 |     :secret_access_key => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                                |_______________AWS Keys_______________|

16 |     }
17 | }

Lines that are too long are truncated to match the size of the terminal, unless the verbose mode is used (-v or --verbose).

Related open source projects

License

ggshield is MIT licensed.

Ähnliche Repositories
aquasecurity/trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more

GoGo ModulesApache License 2.0securitysecurity-tools
trivy.dev
37k550
gitleaks/gitleaks

Find secrets with Gitleaks 🔑

GoGo ModulesMIT Licensesecuritysecurity-tools
gitleaks.io
28.2k2.2k
trufflesecurity/trufflehog

Find, verify, and analyze leaked credentials

GoGo ModulesGNU Affero General Public License v3.0secrettrufflehog
trufflesecurity.com
27.2k2.5k
mukul975/Anthropic-Cybersecurity-Skills

817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0

PythonPyPIApache License 2.0ai-agentsclaude-code
mahipal.engineer/Anthropic-Cybersecurity-Skills/
26.4k3.2k
MobSF/Mobile-Security-Framework-MobSF

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.

JavaScriptnpmGNU General Public License v3.0static-analysisdynamic-analysis
opensecurity.in
21.5k3.7k
prowler-cloud/prowler

Prowler is the world’s most widely used open-source cloud security platform that automates security and compliance across any cloud environment.

PythonPyPIApache License 2.0securitysecurity-tools
prowler.com
14.4k2.3k
bytebase/bytebase

World's most advanced database DevSecOps solution for Developer, Security, DBA and Platform Engineering teams. The GitHub/GitLab for database DevSecOps.

GoGo ModulesOthermysqltidb
bytebase.com
14.3k964
gravitl/netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.

GoGo ModulesOtherwireguardvpn
netmaker.io
11.7k648
bunkerity/bunkerweb

🛡️ Open-source and cloud-native Web Application Firewall (WAF)

PythonPyPIGNU Affero General Public License v3.0nginxmodsecurity
bunkerweb.io
10.7k637
xonsh/xonsh

🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly.

PythonPyPIOtherxonshdevops
xon.sh
9.6k730
We5ter/Scanners-Box

A powerful and open-source toolkit for hackers and security automation - 安全行业从业者自研开源扫描器合辑

pentesting-toolshacker-tools
9k2.4k
firezone/firezone

Enterprise-ready zero-trust access platform built on WireGuard®.

ElixirApache License 2.0cloudvpn
firezone.dev
8.7k426