← Back to all products

Dependency Auditor

$29

Offline dependency audit engine for Python requirements: version checks, risk policies, severity ranking. Ships sample CVE data; plug in an OSV/NVD feed for live scanning.

15 files
PythonMarkdownJSONDjangoFlaskCI/CD

Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

Interactive Reader (Free Preview) ⚙ Try Demo Tools Download Free Sample

File Structure 15 files

dependency-auditor/ ├── LICENSE ├── README.md ├── examples/ │ └── sample_requirements.txt ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_quick-start.md │ ├── 03_sample-input.md │ └── 04_faq.md ├── index.html ├── interactive.html ├── src/ │ ├── __pycache__/ │ │ └── dependency_auditor.cpython-312.pyc │ └── dependency_auditor.py └── tests/ ├── __pycache__/ │ └── test_dependency_auditor.cpython-312-pytest-9.0.2.pyc └── test_dependency_auditor.py

Documentation Preview README excerpt

Dependency Auditor

Audit Python requirements files for outdated versions, risky packages and policy violations — offline, stdlib-only, CI-friendly.

Read this first — the bundled CVE data is a SAMPLE, not a live feed.
The included CVE_DATABASE uses deliberately non-real placeholder CVE ids
(CVE-2024-XXXXX) so the auditor runs out of the box with zero setup and zero
network. **It will not tell you whether your dependencies are actually
vulnerable.* What you get here is the auditing engine* — parser, version
matching, severity ranking, policy gating, reporting — into which you plug a
real feed with --cve-db (export from [OSV](https://osv.dev),
[NVD](https://nvd.nist.gov/developers) or
[pip-audit](https://pypi.org/project/pip-audit)).

Features

  • Pluggable CVE source — ships with an offline sample dataset; point --cve-db at an OSV/NVD export for real scanning
  • Requirements parsing — reads requirements.txt, Pipfile, and pinned version formats
  • Version comparison — semantic version matching with range-aware CVE lookups
  • Severity ratings — findings ranked critical / high / medium / low
  • Upgrade recommendations — suggests safe target versions for vulnerable packages
  • Strict mode — exit code 1 on any vulnerability found (CI/CD friendly)
  • JSON and console output — structured data or human-readable reports
  • Offline operation — works entirely without internet access

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)

Quick Start


# Audit your requirements file
python src/dependency_auditor.py --file requirements.txt

# Strict mode — fail on any vulnerability
python src/dependency_auditor.py --file requirements.txt --strict

# Audit a Pipfile with JSON output
python src/dependency_auditor.py --file Pipfile --output report.json

Output

Console output shows a package-by-package breakdown with CVE IDs, severity, and recommended actions. JSON output provides structured findings for integration with dashboards or CI systems.

Sample Input

See examples/sample_requirements.txt — includes intentionally vulnerable versions for testing:


django==4.2.5
flask==2.3.2
requests==2.28.0
pyyaml==5.4

Configuration Reference

... continues with setup instructions, usage examples, and more.

Code Sample .py preview

src/dependency_auditor.py #!/usr/bin/env python3 """ Dependency Auditor — Security Kit (DataNest) Scans Python requirements files and package manifests for outdated versions, risky dependencies and policy violations, and reports them with severity ranking and upgrade recommendations. IMPORTANT — the bundled CVE_DATABASE is SAMPLE DATA, not a live vulnerability feed: its CVE identifiers are deliberately non-real placeholders. This tool is the auditing ENGINE; point it at a real feed (OSV, NVD, pip-audit) before using it to make security decisions. See the note above CVE_DATABASE for how. Usage: python dependency_auditor.py --file requirements.txt python dependency_auditor.py --file requirements.txt --strict python dependency_auditor.py --file Pipfile --output report.json python dependency_auditor.py --file requirements.txt --cve-db osv_export.json Dependencies: Python 3.10+ stdlib only (no pip packages) License: MIT """ from __future__ import annotations import argparse import json import logging import re import sys from dataclasses import dataclass, field, asdict from datetime import datetime, timezone from pathlib import Path from typing import Any # --------------------------------------------------------------------------- # Constants # --------------------------------------------------------------------------- logger = logging.getLogger("dependency_auditor") # --------------------------------------------------------------------------- # SAMPLE DATA — NOT A LIVE VULNERABILITY FEED # # The CVE identifiers below are deliberately non-real placeholders # (CVE-YYYY-XXXXX / -YYYYY). They exist so the scanner has a realistic, # offline, zero-dependency fixture to run against out of the box. # # THIS IS NOT A VULNERABILITY DATABASE. Do not rely on it to decide whether a # dependency is safe. What you are buying is the auditing ENGINE — the # ... 503 more lines ...