Skip to main content


The GitGuardian CLI, ggshield, provides security guardrails at every stage of your Software Development Lifecycle (SDLC).
Find and fix more than 350+ types of hardcoded secrets and 70+ Infrastructure-as-Code security misconfigurations.


Core commands

Additional commands


  • -h, --help: Show this message and exit.
  • --allow-self-signed: Ignore SSL verification.
  • -c, --config-path <FILE>: set a custom config file. Ignores local and global config files.
  • -v, --verbose: Verbose display mode.
  • --version: Show the version.
  • --check-for-updates / --no-check-for-updates: After executing commands, check or not if a new version of ggshield is available.
  • --log-file <FILE>: Send log output to FILE. Use - to redirect to stderr instead.
  • --debug: Show debug information.

JSON outputs

Many ggshield commands come with a --json option to output a JSON document. The format of these JSON outputs are documented as JSON schemas in the doc/schemas folder of ggshield repository.

Exit codes

Depending on the outcome of the command, ggshield exit code will be one of these:

0No problem found. If the command was a scan, it ran successfully and did not find any issue to report.
1The command ran successfully, but it found issues to report. For example, a secret scan command found leaked secrets.
2Usage error: the command did not receive the parameters it expected.
3Authentication error: the command tried to log on a server, but the server rejected it.
128Unexpected error.

How can I help you ?