Skip to main content

DepGate detects and prevents dependency confusion and supply-chain risks. (Hard fork of Apiiro's Dependency Combobulator)

Project description

DepGate — Dependency Supply‑Chain Risk & Confusion Checker

DepGate is a modular CLI that detects dependency confusion and related supply‑chain risks across npm, Maven, and PyPI projects. It analyzes dependencies from manifests, checks public registries, and flags potential risks with a simple, scriptable interface.

DepGate is a fork of Apiiro’s “Dependency Combobulator”, maintained going forward by cognitivegears. See Credits & Attribution below.

Features

  • Pluggable analysis: compare vs. heuristics levels (compare/comp, heuristics/heur).
  • Multiple ecosystems: npm (package.json), Maven (pom.xml), PyPI (requirements.txt).
  • Flexible inputs: single package, manifest scan, or list from file.
  • Structured outputs: human‑readable logs plus CSV/JSON exports for CI.
  • Designed for automation: predictable exit codes and quiet/log options.

Requirements

  • Python 3.8+
  • Network access for registry lookups when running analysis

Install

Using uv (development):

  • uv venv && source .venv/bin/activate
  • uv sync

From PyPI (after publishing):

  • pip: pip install depgate
  • pipx: pipx install depgate
  • uvx: uvx depgate --help

Quick Start

  • Single package (npm): depgate -t npm -p left-pad
  • Scan a repo (Maven): depgate -t maven -d ./tests
  • Heuristics + JSON: depgate -t pypi -a heur -j out.json

With uv during development:

  • uv run depgate -t npm -d ./tests
  • uv run depgate -t pypi -a heur -j out.json

Inputs and Scanning

  • -p, --package <name>: single package name
    • npm: package name (e.g., left-pad)
    • PyPI: project name (e.g., requests)
    • Maven: not used (see below)
  • -d, --directory <path>: scan local source
    • npm: finds package.json (and devDependencies)
    • Maven: finds pom.xml, emits groupId:artifactId
    • PyPI: finds requirements.txt
  • -l, --load_list <file>: newline‑delimited identifiers
    • npm/PyPI: package names per line
    • Maven: groupId:artifactId per line

Analysis Levels

  • compare or comp: presence/metadata checks against public registries
  • heuristics or heur: adds scoring, version count, age signals

Output

  • Default: logs to stdout (respecting --loglevel and --quiet)
  • CSV: -c, --csv <path>
    • Columns: Package Name, Package Type, Exists on External, Org/Group ID, Score, Version Count, Timestamp, Risk: Missing, Risk: Low Score, Risk: Min Versions, Risk: Too New, Risk: Any Risks
  • JSON: -j, --json <path)
    • Array of objects with keys: packageName, orgId, packageType, exists, score, versionCount, createdTimestamp, risk.{hasRisk,isMissing,hasLowScore,minVersions,isNew}

CLI Options (summary)

  • -t, --type {npm,pypi,maven}: package manager
  • -p/‑d/‑l: input source (mutually exclusive)
  • -a, --analysis {compare,comp,heuristics,heur}: analysis level
  • -c/‑j: CSV/JSON export paths
  • Logging: --loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --logfile <path>, -q, --quiet
  • Scanning: -r, --recursive (for --directory scans)
  • CI: --error-on-warnings (non‑zero exit if risks detected)

Exit Codes

  • 0: success (no risks or informational only)
  • 1: file/IO error
  • 2: connection error
  • 3: risks found and --error-on-warnings set

Contributing

  • See AGENTS.md for repo layout, dev commands, and linting.
  • Lint: uv run pylint src

Credits & Attribution

  • DepGate is a fork of “Dependency Combobulator” originally developed by Apiiro and its contributors: https://github.com/apiiro/combobulator - see CONTRIBUTORS.md.
  • Licensed under the Apache License 2.0. See LICENSE and NOTICE.

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

depgate-0.1.1.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

depgate-0.1.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file depgate-0.1.1.tar.gz.

File metadata

  • Download URL: depgate-0.1.1.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for depgate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e6cb63102f675cc0d5d8c6a5aa10d10f197cfc9559e733b01c903f9ea0e4681d
MD5 1a4508b503ce925eebed235cd78aee37
BLAKE2b-256 6e23a04baade9f2a45d2a642431a9acf43dbb7cae790bc171e107065097d5ab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for depgate-0.1.1.tar.gz:

Publisher: release.yml on cognitivegears/depgate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file depgate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: depgate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for depgate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7c9c0d3843ccf02278d515fed59c2387f09db68fc16be58692ed180a462d2db
MD5 7bc9108eed503edfd9a36a6481155592
BLAKE2b-256 05dca7424cfcc8d982e2cb75c7cdfa9c2d4ec10a91a15333461b5f547d60de89

See more details on using hashes here.

Provenance

The following attestation bundles were made for depgate-0.1.1-py3-none-any.whl:

Publisher: release.yml on cognitivegears/depgate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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