Package trust and provenance verification for PyPI consumers.
Project description
trustcheck 
trustcheck is a Python package and CLI for evaluating the trust posture of PyPI releases before they are installed, promoted, or approved.
It combines PyPI metadata, vulnerability records, provenance availability, cryptographic attestation verification, Trusted Publisher identity hints, and repository matching into a single operator-friendly report.
Packages that publish no provenance are treated as needing review rather than as automatic high-risk findings, while invalid provenance, partial coverage, repository mismatches, and known vulnerabilities remain stronger negative signals.
What it checks
For a selected package version, trustcheck can:
- fetch project and release metadata from PyPI
- verify published provenance against artifact digests
- surface Trusted Publisher repository and workflow identity hints
- compare expected repository input against declared and attested signals
- flag publisher drift, missing verification, and known vulnerabilities
- scan requirements files, project TOML, and
uv.lock,poetry.lock, orpdm.lock - optionally inspect wheel and sdist contents without importing or executing package code
- emit concise text output or structured JSON for automation
Every push also builds standalone Windows and Linux executables. The Windows
artifact is scanned with Microsoft Defender's MpCmdRun.exe; the Linux
artifact is scanned with ClamAV. Clean binaries, checksums, and scanner reports
are retained as workflow artifacts by
Binary Security.
Installation
Install from PyPI:
pip install trustcheck
Or install the Snap Store package:
sudo snap install trustcheck
The Snap command is trustcheck. If the shell reports command not found
immediately after installation, start a new login session or add Snap's
command directory to the current shell:
export PATH="/snap/bin:$PATH"
trustcheck --version
You can always bypass shell PATH lookup with:
snap run trustcheck inspect requests
PyPI installation requirements:
- Python
>=3.10 - Network access to PyPI
Machine-readable reports currently use JSON schema 1.5.0. Package and report
schema versions are independent so documentation-only package releases do not
force contract churn.
TrustCheck Package Scanner
Use the TrustCheck Package Scanner action to scan a checked-in dependency file before merge:
steps:
- uses: actions/checkout@v6
- uses: Halfblood-Prince/trustcheck@v1
with:
target: requirements.txt
policy: strict
The action installs and runs trustcheck, uploads trustcheck-report.json as
a workflow artifact, and fails the job with the CLI's exit code when policy
evaluation fails. target also accepts a PyPI package name, pyproject.toml,
uv.lock, poetry.lock, or pdm.lock.
Each stable release publishes an immutable full version tag and updates the
compatible major action tag used above.
See the CI integration guide for custom policies, OSV, dependency traversal, outputs, and report naming.
Quick start
Inspect the latest release:
trustcheck inspect requests
Inspect a specific version:
trustcheck inspect sampleproject --version 4.0.0
Show only known vulnerabilities for a release:
trustcheck inspect sampleproject --version 4.0.0 --cve
Enrich vulnerability intelligence with OSV and GitHub Advisory Database data:
trustcheck inspect jinja2 --version 2.10.0 --with-osv --cve
Inspect a package and its direct dependencies:
trustcheck inspect sampleproject --version 4.0.0 --with-deps
Inspect the full transitive dependency tree:
trustcheck inspect sampleproject --version 4.0.0 --with-transitive-deps
Inspect every package listed in a requirements-style file:
trustcheck scan requirements.txt
Inspect dependencies declared in a TOML project file:
trustcheck scan pyproject.toml
Inspect exact direct and transitive versions from a supported lockfile:
trustcheck scan uv.lock --with-transitive-deps
Statically inspect wheel and sdist contents:
trustcheck inspect sampleproject --version 4.0.0 --inspect-artifacts --verbose
Artifact inspection validates wheel RECORD hashes, lists console scripts,
detects native extensions and unusual files, and compares wheel and sdist
metadata. It reads archive bytes only and never imports the inspected package.
Require a release to match an expected repository:
trustcheck inspect sampleproject \
--version 4.0.0 \
--expected-repo https://github.com/pypa/sampleproject
Emit JSON for another tool:
trustcheck inspect sampleproject --version 4.0.0 --format json
Emit combined JSON for a requirements-style, TOML, or lockfile scan:
trustcheck scan requirements.txt --format json
Emit only vulnerability records as JSON:
trustcheck inspect sampleproject --version 4.0.0 --cve --format json
Fail CI when full verification is missing:
trustcheck inspect sampleproject --version 4.0.0 --strict
Use it from Python:
from trustcheck import inspect_package
report = inspect_package("sampleproject", version="4.0.0", include_dependencies=True)
print(report.recommendation)
Documentation
Full documentation: https://halfblood-prince.github.io/trustcheck/
- Getting started: Installation and Quickstart
- CLI usage: CLI overview, Policies, and Config and offline mode
- Integrations: JSON contract, Python API, and Compatibility
- Trust model: Verification model and repository matching
- Automation: CI integration
- Project details: Development and release process, release publishing, and Changelog
Project support:
- Bugs and feature requests: GitHub Issues
- Sensitive security reports: GitHub private vulnerability reporting
- Security policy: SECURITY.md
License
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 Distribution
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 trustcheck-2.0.3.tar.gz.
File metadata
- Download URL: trustcheck-2.0.3.tar.gz
- Upload date:
- Size: 796.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b024594a2c46b34eb01731d3ad07012a8f3b7c62ce96838ed86320e14cb98f0
|
|
| MD5 |
d48f3e9de6502938fa4d1b4f46fd2536
|
|
| BLAKE2b-256 |
faac50e0caed279b4b79ddf86adbf7f8859a5c1591c0c6c9a27418eec532e992
|
Provenance
The following attestation bundles were made for trustcheck-2.0.3.tar.gz:
Publisher:
publish.yml on Halfblood-Prince/trustcheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustcheck-2.0.3.tar.gz -
Subject digest:
9b024594a2c46b34eb01731d3ad07012a8f3b7c62ce96838ed86320e14cb98f0 - Sigstore transparency entry: 1781845212
- Sigstore integration time:
-
Permalink:
Halfblood-Prince/trustcheck@8dc614f204b018958909a1eca6cae7a0e421f72b -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Halfblood-Prince
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8dc614f204b018958909a1eca6cae7a0e421f72b -
Trigger Event:
push
-
Statement type:
File details
Details for the file trustcheck-2.0.3-py3-none-any.whl.
File metadata
- Download URL: trustcheck-2.0.3-py3-none-any.whl
- Upload date:
- Size: 56.1 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 |
f2336ecbaa74261986d61ce6009521ec578a515d8bd2ded0fe75e1b892089eea
|
|
| MD5 |
291dae695839ceada771f3bd1abafd2e
|
|
| BLAKE2b-256 |
b6453372746c40d19ede6be3d0e987c3032d1c699b568a137613caa056361da1
|
Provenance
The following attestation bundles were made for trustcheck-2.0.3-py3-none-any.whl:
Publisher:
publish.yml on Halfblood-Prince/trustcheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustcheck-2.0.3-py3-none-any.whl -
Subject digest:
f2336ecbaa74261986d61ce6009521ec578a515d8bd2ded0fe75e1b892089eea - Sigstore transparency entry: 1781846155
- Sigstore integration time:
-
Permalink:
Halfblood-Prince/trustcheck@8dc614f204b018958909a1eca6cae7a0e421f72b -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Halfblood-Prince
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8dc614f204b018958909a1eca6cae7a0e421f72b -
Trigger Event:
push
-
Statement type: