Skip to main content

osv-dedupe

Given a security finding for a PyPI package, decide whether it's already a published vulnerability before you spend time (or LLM tokens) triaging it. osv-dedupe queries OSV (and optionally NVD), then scores each candidate advisory against your finding using source reliability, package-name presence, CWE overlap, and file/function hints.

Install

pip install osv-dedupe

Library usage

from osv_dedupe import find_known_advisory_matches

finding = {"cwe": "CWE-22", "path": "demo/tarfile_utils.py"}
matches = find_known_advisory_matches("demo", "1.0.0", finding)

for m in matches:
    print(m["confidence"], m["source"], m["id"], m["url"])
    print(m["reason"])

Each match is a dict with source, id, url, confidence (0.0–1.0), reason, aliases, cwes, and summary. A confidence >= 0.70 is generally strong enough to treat the finding as already reported.

Options:

  • min_confidence (default 0.70) — threshold for returned matches.
  • include_nvd (default False) — also keyword-search NVD (slower, noisier).
  • limit (default 3) — max matches returned.

CLI

osv-dedupe requests 2.0.0 --cwe CWE-22
osv-dedupe django 3.2 --include-nvd --json

Scoring

Signal Weight
OSV returned the advisory +0.45
NVD keyword hit +0.30
Package name in advisory text +0.15
CWE matches finding +0.25
CWE differs −0.10
File/function hint appears +0.10

Confidence is clamped to [0.0, 1.0]. All network calls are best-effort: if OSV or NVD are unreachable, you get an empty list, never an exception. Results are cached in-process; call clear_cache() to reset.

License

MIT

Metadata

Release files for osv-dedupe 0.1.0

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 osv-dedupe 0.1.0
File Interpreter ABI Platform Actions
osv_dedupe-0.1.0-py3-none-any.whl Python 3 none any Details for osv_dedupe-0.1.0-py3-none-any.whl

Release files / osv_dedupe-0.1.0-py3-none-any.whl

Download URL osv_dedupe-0.1.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f131d48cbc809a98f4b6a45ff7dc0926163bda4c6dfce0014d7d7587bde41a6
BLAKE2b-256 checksum
How to use checksums
771912695708f92332f22be93fd1a4b40361c1c3a3244cff876875de6ee7313d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for osv-dedupe 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0 This release

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