provctl
Pre-commit hook that blocks Python deps which don't exist on PyPI.
Coding assistants sometimes invent package names. If you add one to
requirements.txt and somebody already registered it, pip install runs
their code. provctl checks staged manifests against a local copy of the
PyPI name list and fails the commit if the name isn't there and isn't yours.
Lookups stay on disk. Package names are not sent to pypi.org during a check.
$ echo "fastapi-turbo-helper" >> requirements.txt && git add -A && provctl check
BLOCK fastapi-turbo-helper
no project by this name exists on PyPI
at requirements.txt:2
This commit is blocked. To proceed:
- 'fastapi-turbo-helper' does not exist on PyPI. If the name is a typo, fix it.
If it is an internal package, add it to .provenance/policy.toml
As a pre-commit hook the same output appears when git commit runs and the
commit is aborted.
| Measured | Result |
|---|---|
| Invented package names absent from PyPI, blocked | 310 / 310 |
| Invented names already registered on PyPI (not catchable by a name check) | 10 / 320 |
| Real popular packages wrongly blocked | 0 / 499 |
| Real OSS repos with a false block | 0 / 30 |
| Time added to a commit | ~90 ms median |
The invented-name set is small and I wrote it myself (a model, imitating slopsquat-style names), so read it as a sanity check, not a benchmark. Method and caveats: docs/measurements.md.
Install
pip install provctl
provctl index refresh # ~10 MB, once
Use
provctl init
provctl check
pre-commit:
repos:
- repo: https://github.com/chirataandrei/provctl
rev: v0.1.2
hooks:
- id: provctl
Use provctl-warn-only first if you don't want it to fail commits yet.
Other commands: explain, ack, enrich, doctor, hook install.
Rules
- Missing from PyPI, not first-party, not on a private index → block. Provenance cannot override this (it's self-reported).
- Package exists but is new and unused → warn. Provenance can only move things in this band.
- Imports never block.
import yamlvsPyYAMLis too easy to get wrong.
Without config it already treats as first-party: workspace packages, uv/poetry
git/path sources, private indexes (PIP_INDEX_URL etc.), local modules,
_private modules, stdlib from other Python versions.
[first_party]
prefixes = ["acme_*"]
allow = ["acme-billing"]
What it doesn't do
Transitive deps, typos of names that exist, and malicious packages that are
on PyPI. Use pip-audit / OSV for those.
Agent provenance (git-ai / hook) is for "who added this", not a security control. Details in docs/threat-model.md.
Exact name index is ~12 MB. A Bloom filter would be smaller but a false "exists" is a missed fake package, so we don't use one.
Runtime dep: packaging. git-ai is optional.
License
Metadata
Release files for provctl 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| provctl-0.1.2.tar.gz | 97.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| provctl-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 155.1 kB
Release files / provctl-0.1.2.tar.gz
| Download URL | provctl-0.1.2.tar.gz |
|---|---|
| Size | 97.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d7f665b7488b0dbd95f9703e2f9725f421e290510d188f208c90d322e83192e
|
|
BLAKE2b-256 checksum How to use checksums |
1cd6943354667bd421a8bc0b26b11acf5a7e7240e8a9533def3ec0efc014aaef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / provctl-0.1.2-py3-none-any.whl
| Download URL | provctl-0.1.2-py3-none-any.whl |
|---|---|
| Size | 57.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
126d2dd0266641cc4c3f59be74ddfaba25d2fc0faecd8e3ed787079fb705af00
|
|
BLAKE2b-256 checksum How to use checksums |
8af6e2aea4beefba4476926d492a90b1415e6c7a2c08f3c4b73bdbe66c9be326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logSecurity for provctl 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for provctl-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.