Skip to main content

provctl

PyPI CI

Pre-commit hook that blocks Python deps which don't exist on PyPI.

Coding assistants sometimes invent package names. If an attacker later registers one of them, pip install runs their code. provctl checks staged manifests against a local copy of the PyPI name list and fails the commit while the name is still unclaimed (and isn't yours). A name someone has already registered is not caught by this check.

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 blocked (100 repos) 1 / 100 (a genuinely invalid requirement, codecs)
Time added to a commit ~90 ms median

The invented names were generated by a language model asked to imitate slopsquat-style names, and the set is small, so read it as a sanity check, not a benchmark. Method and caveats: docs/measurements.md.

Install

pip install provctl
provctl index refresh    # ~12 MB, once (also done automatically on first check)

Use

provctl init
provctl check

pre-commit:

repos:
  - repo: https://github.com/chirataandrei/provctl
    rev: v0.1.4
    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 yaml vs PyYAML is 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

Apache-2.0. https://github.com/chirataandrei/provctl

Metadata

Release files for provctl 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for provctl 0.1.4
File Size Uploaded Provenance
provctl-0.1.4.tar.gz 134.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for provctl 0.1.4
File Interpreter ABI Platform
provctl-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 192.5 kB

Release files / provctl-0.1.4.tar.gz

Download URL provctl-0.1.4.tar.gz
Size 134.3 kB
Tags Source
SHA-256 checksum
How to use checksums
50ea979c59c0e7abea40bf74f145142f8e75739e8a927c3b0f846f68b1bd1817
BLAKE2b-256 checksum
How to use checksums
972e8ae6d122cb1ad9733489037ab851d92afb7c234077667f3a0817fa430f7d
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 log

Release files / provctl-0.1.4-py3-none-any.whl

Download URL provctl-0.1.4-py3-none-any.whl
Size 58.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
092bf056cb0c4e2c430e437fdba46216d3f23a47a4f0ce8b9a83364b21cf70cc
BLAKE2b-256 checksum
How to use checksums
7d6b6b3e916996033e4ea850a4ba9349a8cdf3a7b281c00ed03848a5511bf269
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 log

Security for provctl 0.1.4

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.

Select from 2 files

Attestation for provctl-0.1.4.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page