Skip to content

About

The Patch-Gap Auditor is a specialized cybersecurity tool designed to identify vulnerabilities in a project's dependency tree.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

🛡️ Patch Gap Auditor

Last Commit Repo Size License Security

Python

The Patch-Gap Auditor is a Software Composition Analysis (SCA) tool. It performs a "Digital Roll Call" of every library in your Python environment and cross-references them against Google's Open Source Vulnerabilities (OSV) database.


📑 Table of Contents


🎯 Why This Project Exists

Modern applications often depend on dozens or even hundreds of third-party packages.

Whilst these dependencies accelerate development, they can also introduce known vulnerabilities into a system without developers being aware.

Patch Gap Auditor was created to provide a lightweight Software Composition Analysis (SCA) solution capable of auditing a live Python environment against Google's Open Source Vulnerabilities (OSV) database and producing actionable security reports.


✨ Key Features

  • Automatic package inventory discovery
  • Runtime environment inspection
  • Google OSV integration
  • Batch vulnerability lookups
  • JSON audit report generation
  • Security compliance support
  • Software supply chain analysis
  • Dependency vulnerability detection

🛠️ Installation & Setup

Create Virtual Environment

python -m venv venv

Activate Environment

Windows

venv\Scripts\activate

Linux / macOS

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

🚀 Usage

Run the auditor:

  • Execution
python patch_gap_auditor.py

The tool will:

  • Discover installed packages.
  • Collect package version metadata.
  • Query the OSV database.
  • Match vulnerabilities against installed components.
  • Generate a structured audit report.
  • Export findings to security_audit.json.

📁 Project Structure

patch_gap_auditor/
├── venv/ 
├── patch_gap_auditor.py   # Main logic (Harvester, Negotiator, Reporter)
├── security_audit.json    # Generated audit artefact (Snapshot)
└── README.md              # Project documentation

👨🏽‍💻 Tech Stack

Python

  • Core application and security tooling.

Requests

  • Handles communication with Google's OSV API.

Loguru

  • Structured logging and diagnostic output.

OSV API

  • Provides vulnerability intelligence for open-source packages.

JSON

  • Used for report generation and audit artefacts.

👨🏽‍💻 Challenges & Solutions

API Performance:

  • Individual package queries were slow.
  • Solution: Implemented the querybatch endpoint to audit all packages in a single network round-trip.

Environment Awareness:

  • Scanning static files (requirements.txt) often misses sub-dependencies.
  • Solution: Used importlib.metadata to query the live runtime environment.

Data Integrity:

  • Matching API responses to local packages.
  • Solution: Leveraged the zip() function to ensure 1-to-1 mapping between queries and results.
  • Compliance: Generates a security_audit.json artifact for security logs.

🛣️ Roadmap Features

  • Historical analysis and snapshot comparison
  • HTML dashboard visualisations
  • Slack and Discord notifications
  • CVSS severity filtering
  • CSV export support
  • GitHub Actions integration
  • pyproject.toml auditing

  • Built by Roy Peters😁

Contact details LinkedIn

About

The Patch-Gap Auditor is a specialized cybersecurity tool designed to identify vulnerabilities in a project's dependency tree.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages