Skip to main content

@codelaw/rules-deps

codelaw's dependency rules — one of the first-party rule packs (SR-RULE-PACKS decision 15), on npm and PyPI (codelaw-rules-deps). It tells you, and your coding agent, which npm and Python dependencies are vulnerable and the exact version to move to, and which are behind their latest release.

codelaw init adds it when the repo has a package.json or pyproject.toml.

# codelaw.toml
extends = ["codelaw:deps/recommended"]
preview = true   # every rule is `preview` until a corpus run promotes it
npm i -D @codelaw/rules-deps      # or
pip install codelaw-rules-deps
codelaw deps refresh              # the one command that reads the network

Presets

preset rules what it holds
deps/recommended 4 Vulnerable and outdated dependencies of package.json and pyproject.toml, from the committed snapshot codelaw deps refresh writes

Rules

rule fix what it reports
deps/vulnerable suggest (manual with no clean version) a version in use, direct or transitive, that an advisory affects, with the lowest known-clean version to move to
deps/incomplete-scan manual an enabled advisory source the last refresh could not read
deps/outdated suggest a dependency behind its latest version, or a deprecated or yanked one (was data/outdated-dependency)
deps/stale-snapshot manual a snapshot older than [deps] max_snapshot_age, or one that cannot be read (was data/stale-deps-snapshot)

How it works

The rules read .codelaw/deps-snapshot.json, which codelaw deps refresh writes and the project commits, and the lockfiles — never the network, so codelaw check gives the same answer offline and in CI.

  • Advisory sources are [deps] advisory_sources, each on or off: registry (the npm registry and Python index you already install from) first, then osv (https://api.osv.dev), or a mirror of either. Every enabled source is read and merged — the safer answer wins. A source that cannot be read is recorded, and deps/incomplete-scan says so.
  • The version to move to is the lowest version every advisory leaves clean and some source actually covered, inside the major in use first.
  • Agents ask check_dependency (MCP) or codelaw deps check before adding a package; [deps] agent sets, per severity, whether the hooks only inform or also block.

The pack holds no advisory data: the snapshot keeps ids, ranges, versions, a severity, a URL and the sources' names — never an advisory's text.

Metadata

Release files for codelaw-rules-deps 0.4.3

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

Built distribution (wheel)

Table of built distributions (wheels) for codelaw-rules-deps 0.4.3
File Interpreter ABI Platform Actions
codelaw_rules_deps-0.4.3-py3-none-any.whl Python 3 none any Details for codelaw_rules_deps-0.4.3-py3-none-any.whl

Release files / codelaw_rules_deps-0.4.3-py3-none-any.whl

Download URL codelaw_rules_deps-0.4.3-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad7ea3061e1d36cb99d50d2c57d87898ae723894529fbd71da0752bb4380431b
BLAKE2b-256 checksum
How to use checksums
c110c7f960b95bc566d98423e70c1f5fa5e6eeac3aa74bf836b27c9d3c138bf1
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 30, 2026.

Transparency log

Security for codelaw-rules-deps 0.4.3

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

1 file in this release has been uploaded with provenance metadata.

Attestation for codelaw_rules_deps-0.4.3-py3-none-any.whl

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 30, 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.4.3 This release

1 release file 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