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.5.tar.gz (669.0 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.5-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for depreach-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c99d8b9adaacc4e5a67e111e29aca7b5e8fec6be7552f72f4fb2d1c66a68b502
MD5 a9df0715230f699c665752eb2079dec7
BLAKE2b-256 13d1cf652654f846a6001c6652d7406ea437c8ae82d75c533683859422f7c5b0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for depreach-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d60bd9ad77b2de639a0b0b5340f323b3d4bd8f22e19ac047086645c040fcdee2
MD5 ff2a2029a3ba0dae95d6ea0b78de7e0f
BLAKE2b-256 2a74a2f8dfef2a3b1d7a58db058afb052b78cd672c5384130d3d6f570bceaa0a

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