Skip to content

Insecure Source Code Management · passage 19 of 24

Git: Gitleaks

Text · Insecure Source Code Management/Git.md

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

> Gitleaks provides a way for you to find unencrypted secrets and other unwanted data types in git source code repositories. * Run gitleaks against a public repository ```powershell docker run --rm --name=gitleaks zricethezav/gitleaks -v -r https://github.com/zricethezav/gitleaks.git ``` * Run gitleaks against a local repository already cloned into /tmp/ ```powershell docker run --rm --name=gitleaks -v /tmp/:/code/ zricethezav/gitleaks -v --repo-path=/code/gitleaks ``` * Run gitleaks against a specific Github Pull request ```powershell docker run --rm --name=gitleaks -e GITHUB_TOKEN={your token} zricethezav/gitleaks --github-pr=https://github.com/owner/repo/pull/9000 ```

Source: Insecure Source Code Management/Git.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Data as of 2026-11-15. CVE List through 2026-11-15 · EPSS of 2026-11-14 · CISA KEV checked 2026-11-15. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.