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 detect --source .
gitleaks protect --staged
gitleaks version

Python API

import nogoo9_gitleaks as gitleaks

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

# Run gitleaks programmatically
result = gitleaks.run(['detect', '--source', '.', '--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.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-py3-none-win_amd64.whl (8.3 MB view details)

Uploaded Python 3Windows x86-64

nogoo9_gitleaks-8.30.1-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-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-py3-none-macosx_11_0_arm64.whl (7.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

nogoo9_gitleaks-8.30.1-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-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nogoo9_gitleaks-8.30.1.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.tar.gz
Algorithm Hash digest
SHA256 c1a2f6a70650cb7ebdc99bd868a0b90b04e78cce211c532d4b3ee90f16886822
MD5 8c33cdeed53420de2765374cb8b7ff03
BLAKE2b-256 1998d541c49f61c2fe9243a302f35f1c891a8a2cac13cee0bd26d79be5ef419b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1.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-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5ed0aea748e6fee155698caf7ec91ee23f30c1c091b68f81990f2d1ab90ac5ae
MD5 9ac537220561eae5e38de8faeeee31e6
BLAKE2b-256 a2c0fe9338410312f8655ca5eabaf2b612e6bfdefe1b24a97f563076df3e7fda

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31d4fa41e0c93358b2682c9d159c55da86368050c831459b669f2dfec5f2fa41
MD5 4fa07cb8e7f5c0994cfd48f03822bd11
BLAKE2b-256 6eeb64670166eba9edc7654376b52e91f0792f8742706b438eaf7ccbb665e0be

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e24727bae38bbeffef36e530cf9e9777531c6bfb3f7d6bbd3a8c5c832d907609
MD5 838f89d9938f3b7921837d549f638f4f
BLAKE2b-256 74ec438e47369cb3a41e0194b63eac186ba1a88c39b31dad4b9c803fb391a177

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c20dcdd0b7d7b9da8ac7944d317d6edaedd350446121df38679f266a87d2cfb
MD5 c1ec104171b185b647725fd08f0f4edf
BLAKE2b-256 ab5541a754865568847c7819102cf950293201a4d6432466d7fcd9835998925a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c7aab36bbd020e8c3e55d3c36dac02381f0e0a57e5cf407e5c9ca50dffcb3439
MD5 fa50a825ea75cb3e3e3a0e74deb37a69
BLAKE2b-256 3da0f538888f108542481573fc4641bc85fb0ff203f94aa31a2f60737987fd05

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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-py3-none-any.whl.

File metadata

File hashes

Hashes for nogoo9_gitleaks-8.30.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbc1a16565ee138f538c04528e55eae9ac0ee6f1039db9aa8fea403635f80354
MD5 88792b0dc56e6e1eabfefaf485e03132
BLAKE2b-256 efc831c11a2db0c8f6397cb5d2279a895c72e7697e5ffd93f01ba9c92bea5469

See more details on using hashes here.

Provenance

The following attestation bundles were made for nogoo9_gitleaks-8.30.1-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