Python wrapper for gitleaks — find secrets in git repos
Project description
nogoo9-gitleaks
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
NOGOO9_GITLEAKS_BIN— explicit override (e.g. system-installed gitleaks)- Bundled binary — shipped inside the platform-specific wheel
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a2f6a70650cb7ebdc99bd868a0b90b04e78cce211c532d4b3ee90f16886822
|
|
| MD5 |
8c33cdeed53420de2765374cb8b7ff03
|
|
| BLAKE2b-256 |
1998d541c49f61c2fe9243a302f35f1c891a8a2cac13cee0bd26d79be5ef419b
|
Provenance
The following attestation bundles were made for nogoo9_gitleaks-8.30.1.tar.gz:
Publisher:
publish.yml on nogoo9/gitleaks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1.tar.gz -
Subject digest:
c1a2f6a70650cb7ebdc99bd868a0b90b04e78cce211c532d4b3ee90f16886822 - Sigstore transparency entry: 1463336032
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-win_amd64.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-win_amd64.whl
- Upload date:
- Size: 8.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed0aea748e6fee155698caf7ec91ee23f30c1c091b68f81990f2d1ab90ac5ae
|
|
| MD5 |
9ac537220561eae5e38de8faeeee31e6
|
|
| BLAKE2b-256 |
a2c0fe9338410312f8655ca5eabaf2b612e6bfdefe1b24a97f563076df3e7fda
|
Provenance
The following attestation bundles were made for nogoo9_gitleaks-8.30.1-py3-none-win_amd64.whl:
Publisher:
publish.yml on nogoo9/gitleaks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-win_amd64.whl -
Subject digest:
5ed0aea748e6fee155698caf7ec91ee23f30c1c091b68f81990f2d1ab90ac5ae - Sigstore transparency entry: 1463336636
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31d4fa41e0c93358b2682c9d159c55da86368050c831459b669f2dfec5f2fa41
|
|
| MD5 |
4fa07cb8e7f5c0994cfd48f03822bd11
|
|
| BLAKE2b-256 |
6eeb64670166eba9edc7654376b52e91f0792f8742706b438eaf7ccbb665e0be
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
31d4fa41e0c93358b2682c9d159c55da86368050c831459b669f2dfec5f2fa41 - Sigstore transparency entry: 1463336403
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e24727bae38bbeffef36e530cf9e9777531c6bfb3f7d6bbd3a8c5c832d907609
|
|
| MD5 |
838f89d9938f3b7921837d549f638f4f
|
|
| BLAKE2b-256 |
74ec438e47369cb3a41e0194b63eac186ba1a88c39b31dad4b9c803fb391a177
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
e24727bae38bbeffef36e530cf9e9777531c6bfb3f7d6bbd3a8c5c832d907609 - Sigstore transparency entry: 1463336776
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 7.7 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c20dcdd0b7d7b9da8ac7944d317d6edaedd350446121df38679f266a87d2cfb
|
|
| MD5 |
c1ec104171b185b647725fd08f0f4edf
|
|
| BLAKE2b-256 |
ab5541a754865568847c7819102cf950293201a4d6432466d7fcd9835998925a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
7c20dcdd0b7d7b9da8ac7944d317d6edaedd350446121df38679f266a87d2cfb - Sigstore transparency entry: 1463336298
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 8.2 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7aab36bbd020e8c3e55d3c36dac02381f0e0a57e5cf407e5c9ca50dffcb3439
|
|
| MD5 |
fa50a825ea75cb3e3e3a0e74deb37a69
|
|
| BLAKE2b-256 |
3da0f538888f108542481573fc4641bc85fb0ff203f94aa31a2f60737987fd05
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
c7aab36bbd020e8c3e55d3c36dac02381f0e0a57e5cf407e5c9ca50dffcb3439 - Sigstore transparency entry: 1463336208
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nogoo9_gitleaks-8.30.1-py3-none-any.whl.
File metadata
- Download URL: nogoo9_gitleaks-8.30.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbc1a16565ee138f538c04528e55eae9ac0ee6f1039db9aa8fea403635f80354
|
|
| MD5 |
88792b0dc56e6e1eabfefaf485e03132
|
|
| BLAKE2b-256 |
efc831c11a2db0c8f6397cb5d2279a895c72e7697e5ffd93f01ba9c92bea5469
|
Provenance
The following attestation bundles were made for nogoo9_gitleaks-8.30.1-py3-none-any.whl:
Publisher:
publish.yml on nogoo9/gitleaks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nogoo9_gitleaks-8.30.1-py3-none-any.whl -
Subject digest:
dbc1a16565ee138f538c04528e55eae9ac0ee6f1039db9aa8fea403635f80354 - Sigstore transparency entry: 1463336689
- Sigstore integration time:
-
Permalink:
nogoo9/gitleaks@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Branch / Tag:
refs/tags/v8.30.1 - Owner: https://github.com/nogoo9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@528c51d48c29cadf61472074b59edc3b18e57dc9 -
Trigger Event:
push
-
Statement type: