Skip to main content

PyDeepMesh

Deterministic, extensible dependency-graph, vulnerability, and attack-surface intelligence for Python, Rust, Node.js, and container projects.

PyDeepMesh statically parses the dependency metadata already in your repository (manifests, lockfiles, Dockerfiles, Compose files), normalizes it into a single canonical dependency graph, matches it against advisory data, and emits explainable security and dependency intelligence in machine- and human-readable formats — all without executing any of your code.

PyDeepMesh is a standalone product. It has no dependency on, and shares no code with, any other repository. See REPOSITORY_BOUNDARIES.md.

Scope: what PyDeepMesh is, and is not

PyDeepMesh is scoped to repository-wide dependency-graph and vulnerability intelligence: it discovers manifests and lockfiles, builds a canonical dependency graph, and matches packages against advisory data across Python, Rust, Node.js, and containers.

It deliberately does not do dependency provenance/usage attribution, dbt or Airflow project linting, pipeline cost analysis, runtime data-quality checks, network discovery, or API/agent-failure diagnosis. Those are separate concerns with their own tooling; PyDeepMesh neither depends on nor bundles them.

The problem

Dependency risk is spread across ecosystems and file formats. A single service may have a pyproject.toml, a Cargo.lock, a package-lock.json, and three Dockerfiles — each with its own versioning rules, scopes, and lockfile semantics. Answering "which of my projects are exposed, through what path, and what should I upgrade?" requires a normalized graph plus evidence-based advisory matching. PyDeepMesh builds that graph and answers those questions, locally and deterministically.

What PyDeepMesh does

  • Discovers manifests and lockfiles across four ecosystems.
  • Parses them defensively, preserving provenance and resolution confidence, and reporting diagnostics instead of inventing data.
  • Builds a canonical directed dependency graph with scopes, resolution status, transitive edges, and multiple project roots.
  • Matches packages against advisory data with ecosystem-aware version semantics (PEP 440 for PyPI, SemVer for npm/crates.io).
  • Analyzes exposure: direct vs. transitive, reachable paths, dependency concentration, and fix candidates.
  • Reports a terminal summary, a versioned JSON document, SARIF 2.1.0, a CycloneDX 1.5 SBOM, and a self-contained local HTML graph view (static HTML + inline SVG; no JavaScript, no CDN, no telemetry).

PyDeepMesh distinguishes confirmed, potential, unmatched, unavailable, and error outcomes. A package is never reported as "safe" merely because no advisory was found.

Installation

Requires Python 3.10+.

Install the published package from PyPI:

pip install pydeepmesh

# or, as an isolated CLI tool
uv tool install pydeepmesh

Or install from source:

git clone https://github.com/Mullassery/PyDeepMesh
cd PyDeepMesh
python -m venv .venv && . .venv/bin/activate
pip install .

CLI usage

pydeepmesh scan   <path>     # discover + parse + build graph; summary or --format json
pydeepmesh graph  <path>     # graph queries: paths, reverse-deps; --format html export
pydeepmesh audit  <path>     # vulnerability + exposure findings (offline by default)
pydeepmesh sbom   <path>     # emit a CycloneDX 1.5 SBOM
pydeepmesh report <path>     # combined report: --format json|sarif|terminal
pydeepmesh advisories update # refresh the local advisory cache (explicit, online)

Common options: --output PATH, --offline/--online, --fail-on {critical,high,medium,low,never}, --config PATH, --verbose, --quiet. --format depends on the command: terminal/json everywhere, sarif for audit/report, and html for graph.

Examples

# Structure only, deterministic JSON to stdout
pydeepmesh scan . --format json

# Audit using a local OSV snapshot (fully offline)
pydeepmesh audit . --offline --advisory-dir ./osv-snapshot --format sarif --output findings.sarif

# Audit against live OSV, failing CI on high severity
pydeepmesh audit . --online --fail-on high

# SBOM
pydeepmesh sbom . --output sbom.cdx.json

# Self-contained HTML graph view (no JavaScript, no network)
pydeepmesh graph . --format html --output graph.html

Exit codes

Code Meaning
0 Success; no finding met the --fail-on threshold
1 A finding met the --fail-on threshold
2 Usage / configuration error
3 An input error prevented analysis (e.g. a fatal read/parse failure)
4 Advisory data unavailable when results were required

Offline vs. online

PyDeepMesh is offline by default. No network request is made unless you pass --online. Offline analysis uses --advisory-dir snapshots or the local cache at .pydeepmesh-cache/. pydeepmesh advisories update is the only command that refreshes the cache, and it is explicit.

Advisory sources

  • OSV (https://api.osv.dev) — provider-neutral, aggregates GHSA and ecosystem advisories. Used for online queries with timeout, bounded retries, and a response size cap.
  • Offline snapshots — a directory of OSV-format JSON records.

Integrations with other vendors are documented as future interoperability opportunities, not dependencies.

Supported formats

See SUPPORT_MATRIX.md for the authoritative list of implemented, partial, planned, and unsupported formats and capabilities.

Architecture

See ARCHITECTURE.md. Core logic (models, parsers, graph, advisories, risk) is independent of the CLI, network, and presentation layers.

Security model

PyDeepMesh treats every scanned file and advisory response as untrusted: it never executes scanned code, never runs package managers or builds, bounds input sizes, confines output writes to a configured directory, and never logs or reports secrets. See SECURITY.md.

Development

uv pip install -e ".[dev]"
ruff format --check . && ruff check .
mypy
python scripts/check_boundaries.py
pytest --cov=pydeepmesh --cov-report=term-missing

See CONTRIBUTING.md.

Limitations

  • PyDeepMesh reports graph reachability, not proven runtime exploitability.
  • Advisory coverage depends on the providers and snapshots available; absence of a match is reported as unmatched/unavailable, never as "safe".
  • yarn.lock and Cargo.toml workspaces are partially supported (see the support matrix).
  • SPDX export is planned; CycloneDX is implemented.

License

Licensed under the Apache License, Version 2.0.

Metadata

Release files for pydeepmesh 0.1.0

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

Source distribution (sdist)

Source distribution for pydeepmesh 0.1.0
File Size Uploaded Provenance
pydeepmesh-0.1.0.tar.gz 124.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 212.1 kB

Release files / pydeepmesh-0.1.0.tar.gz

Download URL pydeepmesh-0.1.0.tar.gz
Size 124.2 kB
Tags Source
SHA-256 checksum
How to use checksums
655cf05f1e7aa685f24aac858433ea97ce02314f16b311758835c78763c0a864
BLAKE2b-256 checksum
How to use checksums
256d51cd86bc3ce9abb364d01dbf5e230512321752d5f8d58dc9b7f438d90032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

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

Download URL pydeepmesh-0.1.0-py3-none-any.whl
Size 87.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb9f3cc38638e5d8a882dfe1b360023248925c41cb7e580531bd6261100032e1
BLAKE2b-256 checksum
How to use checksums
5169c8d8b5b99067b312cd1eb36625ce75d361e1a488a7695e524138e6789b1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for pydeepmesh 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

2 release files 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