Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

After authenticating, run ggshield machine setup to configure AI and git hooks, plant honeytokens, and register the machine on the Endpoints page before its first scan. Registration includes the current user, or all honeytoken target users when running as root. It is best effort, takes at most five seconds, and does not affect the command's exit code.

The scans of ggshield secret scan pre-commit, pre-push and ai-hook also send the machine hostname, from which GitGuardian registers the users of these hooks. Other scan commands do not send it, nor does the native AI hook that standalone and platform-specific pip installs run.

On CI, ggshield neither registers the machine nor sends the hostname. To turn both off elsewhere, set endpoint_registration: false in .gitguardian.yaml, or set GGSHIELD_NO_ENDPOINT_REGISTRATION to a non-empty value.

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, Codex, and Mistral Vibe 2.21+.

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.

Metadata

Release files for ggshield 1.57.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ggshield 1.57.0rc1
File Size Uploaded Provenance Actions
ggshield-1.57.0rc1.tar.gz 1.1 MB With provenance Details for ggshield-1.57.0rc1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ggshield 1.57.0rc1
File Actions
ggshield-1.57.0rc1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for ggshield-1.57.0rc1-py3-none-win_amd64.whl
ggshield-1.57.0rc1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for ggshield-1.57.0rc1-py3-none-musllinux_1_2_x86_64.whl
ggshield-1.57.0rc1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for ggshield-1.57.0rc1-py3-none-musllinux_1_2_aarch64.whl
ggshield-1.57.0rc1-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for ggshield-1.57.0rc1-py3-none-manylinux2014_x86_64.whl
ggshield-1.57.0rc1-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for ggshield-1.57.0rc1-py3-none-manylinux2014_aarch64.whl
ggshield-1.57.0rc1-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details for ggshield-1.57.0rc1-py3-none-macosx_11_0_universal2.whl
ggshield-1.57.0rc1-py3-none-any.whl Python 3 none any Details for ggshield-1.57.0rc1-py3-none-any.whl

Total release size: 21.8 MB

Release files / ggshield-1.57.0rc1.tar.gz

Download URL ggshield-1.57.0rc1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
6e67e54dcc6b78e5b46de9506f85e72c6a337fc2ebbfd76caaf0f65f67f906a5
BLAKE2b-256 checksum
How to use checksums
144afa3e6324a14bce51c6db130f88093cf5ab1cd78215c5612a94a81d869cb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-win_amd64.whl

Download URL ggshield-1.57.0rc1-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d583e373a5b8b00443722e8b46b4e46cc7bf0ce671dcea42a4d03e53c7654315
BLAKE2b-256 checksum
How to use checksums
1e83da97b98fe59318b280d2a8c00e819e8669216f73dcd21d89971c19b6f194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-musllinux_1_2_x86_64.whl

Download URL ggshield-1.57.0rc1-py3-none-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
db593781e32d7399839dbe390bdba22002310c1f1e19d485980fc2b7800cd946
BLAKE2b-256 checksum
How to use checksums
cead8591cdff5f3929ebfd9daeeeaffa18563ed2edc0213429c06e1fb2615af3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-musllinux_1_2_aarch64.whl

Download URL ggshield-1.57.0rc1-py3-none-musllinux_1_2_aarch64.whl
Size 3.2 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
9c3d7ff2e81af5493ce1ba20ebc83392ce46807bf4e59cf96381d8e97b8555f5
BLAKE2b-256 checksum
How to use checksums
0a2ff481a7b7012bc3a07d2faad6539c3782e2d3c20725b52a741434d5ed8465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-manylinux2014_x86_64.whl

Download URL ggshield-1.57.0rc1-py3-none-manylinux2014_x86_64.whl
Size 3.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5f8c934446fd3a5592c67f0e58363b3c472b7e4f101556f54bc99c63fe8a3c1f
BLAKE2b-256 checksum
How to use checksums
9c44065359f5eec418b97acae34f5c9914162168a2a32c5ef176ba6e2b898f28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-manylinux2014_aarch64.whl

Download URL ggshield-1.57.0rc1-py3-none-manylinux2014_aarch64.whl
Size 3.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0c6a959e27e082894aa5414b7342be6e7be68e3724a5d5c6a112540239284024
BLAKE2b-256 checksum
How to use checksums
370d8e7dcfbe10e04041c2dc3cb61cbc33b4e0c6227049d549434813a32ec647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-macosx_11_0_universal2.whl

Download URL ggshield-1.57.0rc1-py3-none-macosx_11_0_universal2.whl
Size 4.5 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2f7eecef1a6a833c4d1f609f0a8d3a85aa21798da5e2f99497c8d7b6442c83a8
BLAKE2b-256 checksum
How to use checksums
a1b2319d07002dbaf9577f8449433d0f24878ad87df0a1a4964d4426e1b2bf1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / ggshield-1.57.0rc1-py3-none-any.whl

Download URL ggshield-1.57.0rc1-py3-none-any.whl
Size 409.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
555884bf5ef81f4c801b4b6bfe19a9a36ef04ca1a1b21f667d54301c50c17c78
BLAKE2b-256 checksum
How to use checksums
b0a377063c827fdbd19b747fd89658769332573bb86bbddf9e674831f2e7503c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for ggshield 1.57.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for ggshield-1.57.0rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page