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.
- Why This Project Exists
- Key Features
- Installation & Setup
- Usage
- Project Structure
- Tech Stack
- Challenges & Solutions
- Roadmap Features
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.
- 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
python -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtRun the auditor:
- Execution
python patch_gap_auditor.pyThe 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.
patch_gap_auditor/
├── venv/
├── patch_gap_auditor.py # Main logic (Harvester, Negotiator, Reporter)
├── security_audit.json # Generated audit artefact (Snapshot)
└── README.md # Project documentation
- Core application and security tooling.
- Handles communication with Google's OSV API.
- Structured logging and diagnostic output.
- Provides vulnerability intelligence for open-source packages.
- Used for report generation and audit artefacts.
- Individual package queries were slow.
- Solution: Implemented the querybatch endpoint to audit all packages in a single network round-trip.
- Scanning static files (requirements.txt) often misses sub-dependencies.
- Solution: Used importlib.metadata to query the live runtime environment.
- 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.
- 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😁