Skip to main content

Python wrapper for gitleaks — find secrets in git repos

Project description

nogoo9-gitleaks

PyPI version Python versions CI License: MIT

Python wrapper for gitleaks — find secrets in git repos.

Pre-built platform wheels ship the correct gitleaks binary for your OS — no internet access needed after install. For unsupported platforms, the binary is downloaded and cached on first use.

Installation

pip install nogoo9-gitleaks
# or
uv add nogoo9-gitleaks
# or
pipx install nogoo9-gitleaks

Usage

CLI

gitleaks git .
gitleaks dir .
gitleaks version

Python API

import nogoo9_gitleaks as gitleaks

# Get the path to the gitleaks binary
bin_path = gitleaks.get_binary_path()

# Scan a git repository
result = gitleaks.run(['git', '.', '--exit-code', '1'])
print(result.stdout)
print('exit code:', result.returncode)

Platform Support

Pre-built wheels are available for the most popular platforms:

Platform Architecture Wheel tag
Linux x86_64 manylinux_2_17_x86_64
Linux aarch64 manylinux_2_17_aarch64
macOS Apple Silicon (M1+) macosx_11_0_arm64
macOS Intel x86_64 macosx_10_9_x86_64
Windows x86_64 win_amd64

A fallback py3-none-any wheel is also published for other platforms — it downloads the correct binary from GitHub Releases on first use and caches it locally.

Environment Variables

Variable Description
NOGOO9_GITLEAKS_BIN Override the path to the gitleaks binary (skip bundled + download)
NOGOO9_GITLEAKS_CACHE Override the download cache directory (default: ~/.cache/nogoo9-gitleaks)

Binary Resolution Order

  1. NOGOO9_GITLEAKS_BIN — explicit override (e.g. system-installed gitleaks)
  2. Bundled binary — shipped inside the platform-specific wheel
  3. Download fallback — fetches from GitHub Releases on first use (SHA-256 verified)

Versioning

This package version tracks the upstream gitleaks release version exactly (e.g. nogoo9-gitleaks==8.30.1 wraps gitleaks v8.30.1).

License

MIT — see LICENSE.

The bundled/downloaded gitleaks binary is also MIT licensed — see LICENSES/gitleaks-MIT.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nogoo9_gitleaks-8.30.1.post3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nogoo9_gitleaks-8.30.1.post3-py3-none-win_amd64.whl (8.3 MB view details)

Uploaded Python 3Windows x86-64

nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_11_0_arm64.whl (7.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_10_9_x86_64.whl (8.2 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

nogoo9_gitleaks-8.30.1.post3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file nogoo9_gitleaks-8.30.1.post3.tar.gz.

File metadata

  • Download URL: nogoo9_gitleaks-8.30.1.post3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3.tar.gz
Algorithm Hash digest
SHA256 4623d2922ef4ed3f86e5b5a31274f37c9ef1695a9ea78ffac728fd40e77c9fe9
MD5 2635aba65cce66c0d2455651154b380e
BLAKE2b-256 da48c327d13349d6cf06f334e41c8ca23ecc9da9db7c2192c5facb8a08e710a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3.tar.gz:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 684f687f094edcb5d2da7057850c00cbc6ae3afc5d66a61d8f3b9c16b3ab49e2
MD5 6db9cadc40e228af2255c814b54c1e47
BLAKE2b-256 bac501534e2ffe5464a4d220d1a3b3d34868289ea4e3226816e74f4b37b57fb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-win_amd64.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cedf397a272e243a3607bfa31e35325431528575c53d55934ba422ec34a6b90a
MD5 5eb7ec2c53f039ec2d2984acaaa23fc9
BLAKE2b-256 ca9756611b6ae4b03c59f802eb1fb9c7273fc0d8fe5b633d102cc158316adc7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c167126e9e8f474c0ccb2d493695cf9b667a991e62261826012a5004a49883dc
MD5 9396209b212d73a7746c3e49195b0b81
BLAKE2b-256 1c0c651f9370072732fa22245e1bfce9eaf1dc50ce943c73a23a18855a574931

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99624ee3e8e1bd810d8815288df3a7b2072f11a8abc46f83556086cd69167f57
MD5 779aae45f061afaccfc993bd11d6f003
BLAKE2b-256 722aa3f08f58a69d9e4f13542356406683d912544d46a2f1507ffcb354e157ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd09e5b594a29961acf11c734b7c309d2b18dd029ab200bb3339e673cc424a5e
MD5 68835209374158d85c8575b4190c3d13
BLAKE2b-256 f524a67ae2db294a4defa427c2353c788586fca22270a414e18923cc2589c983

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-macosx_10_9_x86_64.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nogoo9_gitleaks-8.30.1.post3-py3-none-any.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa10108a0309e4dc652aa353fe65bdc499e5248ece0342f401d113a922b6c6c
MD5 29ee759a2be140bf8cc0fb86f62eaf48
BLAKE2b-256 bad8c2a949e31bf31c72f1a66f4b4806cfc6a38ad68bbee4a61174cb87b0774b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.post3-py3-none-any.whl:

Publisher: publish.yml on nogoo9/gitleaks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page