Skip to main content

SCA with reachability — find out if vulnerable code is actually reachable

Project description

DepReach

DepReach is a Software Composition Analysis (SCA) tool that goes beyond listing CVEs: it tells you whether vulnerable code is reachable from your project. It builds call graphs, maps fixes from GitHub diffs to affected functions, and marks issues as reachable or not — so you can prioritize what actually matters.

License: MIT Python 3.10+

Features

  • SBOM — CycloneDX via cyclonedx-py (Python) or cdxgen (Docker)
  • Vulnerability lookup — Local VDB (e.g. appthreat-vulnerability-db)
  • Reachability — Call graph + AST + GitHub diff → which vuln code is reachable
  • Caching — SQLite cache for reachability results
  • HTML report — Interactive dependency graph, filter by package, zoom, “hide clean”
  • SARIF — Output for ASPM / Code Scanning with reachability in result.properties

Installation

DepReach is available on PyPI. Requires Python 3.10+:

pip install depreach

Or install from source:

git clone https://github.com/akiracrying/DepReach.git && cd DepReach
pip install .

Quick start

depreach -i /path/to/your/project -o report.json

Reports are written to reports/<project_name>/ (JSON, SBOM, HTML). Use --sarif <file> to also emit SARIF 2.1.

Usage

depreach -i <input_dir> -o report.json [options]
Option Description
-i, --input Source code directory (required)
-o, --output Report filename; output dir is reports/<project_name>/
--skip-update Skip updating the vulnerability database
--cache Cache reachability results in SQLite
-j, --jobs Parallel jobs for reachability (default: 6)
--ignore Comma-separated package names to ignore (e.g. flask,requests)
--sarif Write SARIF 2.1 file for ASPM/Code Scanning

Exit codes: 0 = no vulns, 1 = vulns but none reachable, 2 = at least one reachable.

Example

depreach -i ./my-app -o report.json --cache --ignore "flask" --sarif report.sarif

Output

Artifact Path Description
JSON report reports/<name>/report.json Vulns with CVE, severity, description, references, reachability
SBOM reports/<name>/<name>_sbom.json CycloneDX SBOM
HTML report reports/<name>/report.html Interactive graph, filter by package, zoom
SARIF path from --sarif SARIF 2.1 with isReachable in result properties (for ASPM)

Use as a library

from depreach import run

vulns, exit_code = run(
    input_dir="./my-app",
    output_file="report.json",
    skip_update=False,
    cache=True,
    jobs=6,
    ignore="flask,requests",
    sarif_path="report.sarif",
)
# exit_code: 0 = ok, 1 = vulns, 2 = reachable vulns

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

depreach-0.1.7.tar.gz (669.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

depreach-0.1.7-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file depreach-0.1.7.tar.gz.

File metadata

  • Download URL: depreach-0.1.7.tar.gz
  • Upload date:
  • Size: 669.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for depreach-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4cf2505d60a82610a2fd0707cef194bb163ea8f5faf2894163fa08431058345f
MD5 90b43e9ae0bf9299426f424ff23b5648
BLAKE2b-256 9a87aae12d62885e679b2e330b123dbeb2401600787ac2158f1c4c7026c7403b

See more details on using hashes here.

File details

Details for the file depreach-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: depreach-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for depreach-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6f3db1383fca88b4d796244b9ebbbd9f73050be74c3601b01aa0fa9f5139d2
MD5 22231bb8290061aa65f106f5e514f340
BLAKE2b-256 6db74624146ead2d9ac47222000bd0a12616e97ca4e3b90982a88595f192203a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page