Skip to main content

depdrift

Review what actually changed between two lockfiles, and what is risky about it. One markdown report: typosquats, install scripts, git dependencies, mirror registries, version jumps. Local, offline, no API key.

ci license: MIT python stars

depdrift demo

The demo above is a fixture lockfile. The pattern it catches is the real thing: expresss instead of express, carrying an install script, plus a package resolved from a mirror that is not npm.

Install

pipx install git+https://github.com/mgkvibez/depdrift.git

Three ways to use it

# 1. What changed in this PR's lockfile?
git show origin/main:package-lock.json > /tmp/before.json
depdrift review /tmp/before.json package-lock.json

# 2. Gate a CI job on high severity and above
depdrift review /tmp/before.json package-lock.json --fail-on high

# 3. Machine-readable, for a bot or an agent skill
depdrift review /tmp/before.json package-lock.json --json

Why it exists

A lockfile diff is thousands of lines and nobody reads it. That is exactly the surface a supply-chain attack wants: a package that looks like one you trust, a postinstall script, a tarball from somewhere else. Reviewers approve it because "it's just a lockfile bump".

depdrift answers the only two questions that matter after a dependency change: what arrived, and what about it deserves a human's eyes.

How it works

Parses npm package-lock.json (lockfileVersion 1, 2 and 3) into a package map and diffs the two.

Rule Severity Fires when
typosquat critical new name is within edit distance 2 of a popular package and is not it
install-script high new package declares an install/postinstall script
git-dependency high resolved from a git ref instead of a published tarball
non-default-registry medium resolved from a host that is not registry.npmjs.org
major-version-jump medium an existing package crosses a major version
diff-size low more than 50 packages changed at once

The popular-name list ships in depdrift/popular.py, so nothing leaves the machine. No registry calls, no token, no telemetry. Read the report and decide.

Contributing

Read CONTRIBUTING.md. Tests:

python -m pytest -q

License

MIT. See LICENSE.

Metadata

Release files for depdrift 0.1.2

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

Source distribution (sdist)

Source distribution for depdrift 0.1.2
File Size Uploaded Provenance Actions
depdrift-0.1.2.tar.gz 9.4 kB With provenance Details for depdrift-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 18.9 kB

Release files / depdrift-0.1.2.tar.gz

Download URL depdrift-0.1.2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5c60e4f33b0765c34d4a42be8f4b967fa32f85a43f9fc662d38611e6a81fec65
BLAKE2b-256 checksum
How to use checksums
7d97fa9e95a95d74a51cc8c9fde4f8ea7611a3c3aedf7a6663f0fe0e298c39dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 29, 2026.

Transparency log

Release files / depdrift-0.1.2-py3-none-any.whl

Download URL depdrift-0.1.2-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f396b72902bc3d3fd6847a1db16346f750ab304ec62c9b0cc052c723dafa7d3b
BLAKE2b-256 checksum
How to use checksums
413a23753957bd3daee1ad7084e980e5e2ec37d8af48ca30f9d8d54d04668b32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 29, 2026.

Transparency log

Security for depdrift 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.

Select from 2 files

Attestation for depdrift-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 29, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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