Audit Dependencies
Overview
Audit of this project's direct dependencies, pinned in requirements.txt, against PyPI and known-vulnerability data. Produces docs/dependency-audit-YYYY-MM-DD.md, applies safe bumps directly to requirements.txt, and emits a ticket list for risky ones.
This project has a single ecosystem: Python via a flat requirements.txt (no .in/pip-tools compile step, no JS/npm). Skip any tooling not present — there is no lockfile-compile workflow here.
Step 0: Discover project structure
- Confirm the venv (
.venv) is active; if not, activate it per README.md.
- Install current pins:
pip install -r requirements.txt.
- Snapshot direct deps from
requirements.txt — this is both the direct-dep list and the pin file (no separate lockfile).
Steps
Check installed vs. latest: pip list --outdated for the installed venv, cross-referenced against the names in requirements.txt (ignore transitive-only packages that aren't direct deps).
Check for known vulnerabilities: run pip-audit with no arguments, against the active venv — do not use pip-audit -r requirements.txt; that flag makes it build an isolated resolver venv via ensurepip, which fails in environments without python3-venv installed. This is the sole vulnerability source — no separate PyPI/OSV/endoflife.date queries needed for a project this size. Flag any direct dep (one listed in requirements.txt) that appears in the results.
Classify each direct dep into one of two buckets (see Classification below):
- Bump now — patch/minor bump, or a major bump with no breaking API surface change for this project's usage (spot-check with
grep/notebook read).
- Needs a look — major version bump where the API surface likely changed, or a transitive conflict shows up (e.g. another installed package pins an incompatible range).
Report and tickets
Write report to docs/dependency-audit-<today>.md with:
- Process section: tools used (
pip list --outdated, pip-audit), source file audited (requirements.txt).
- Summary (dep counts per bucket)
- Per-package table: current version, latest version, bucket, CVE/advisory IDs if any, action
- "Bumps applied" list
- "Tickets to file" list (needs-a-look items)
Apply "bump now" changes directly to requirements.txt (edit the == pin), then pip install -r requirements.txt.
After applying, smoke-test by importing each bumped package in the venv (this project has no test suite — it's notebooks, not a package with pytest coverage). If an import fails or errors obviously, move that package to "needs a look" and revert its pin.
Emit ticket list for "needs a look" items to docs/dependency-audit-<today>-tickets.md using Jira-ready format (title, current→target, risk, references, and whether it's blocked by a transitive conflict). Skip creating this file entirely if the "needs a look" bucket is empty — don't emit an empty tickets file.
Commit the applied bumps in a single commit covering the requirements.txt change. Do not commit the audit report or ticket list — leave those for the operator. Do not push or open a PR.
Classification
- Bump now: patch/minor, or a major bump verified not to touch this project's usage.
- Needs a look: major bump with likely breaking changes, active CVE with no compatible fix short of a breaking upgrade, or a transitive dependency conflict (e.g.
pip install reports an incompatible range).
When to invoke
- On demand, or periodically as maintenance.
- After noticing a security advisory for one of the direct deps.
References
1---2name: audit-dependencies3description: Run a dependency audit for this project's plain requirements.txt (Python, no pip-tools, no JS). Produces report, applies safe bumps, emits Jira-ready ticket list for risky items. Use on demand or for periodic maintenance.4---56# Audit Dependencies78## Overview910Audit of this project's direct dependencies, pinned in `requirements.txt`, against PyPI and known-vulnerability data. Produces `docs/dependency-audit-YYYY-MM-DD.md`, applies safe bumps directly to `requirements.txt`, and emits a ticket list for risky ones.1112This project has a single ecosystem: Python via a flat `requirements.txt` (no `.in`/pip-tools compile step, no JS/npm). Skip any tooling not present — there is no lockfile-compile workflow here.1314## Step 0: Discover project structure15161. Confirm the venv (`.venv`) is active; if not, activate it per README.md.172. Install current pins: `pip install -r requirements.txt`.183. Snapshot direct deps from `requirements.txt` — this is both the direct-dep list and the pin file (no separate lockfile).1920## Steps21221. **Check installed vs. latest**: `pip list --outdated` for the installed venv, cross-referenced against the names in `requirements.txt` (ignore transitive-only packages that aren't direct deps).23242. **Check for known vulnerabilities**: run `pip-audit` with no arguments, against the active venv — do not use `pip-audit -r requirements.txt`; that flag makes it build an isolated resolver venv via `ensurepip`, which fails in environments without `python3-venv` installed. This is the sole vulnerability source — no separate PyPI/OSV/endoflife.date queries needed for a project this size. Flag any direct dep (one listed in `requirements.txt`) that appears in the results.25263. **Classify each direct dep** into one of two buckets (see Classification below):27 - **Bump now** — patch/minor bump, or a major bump with no breaking API surface change for this project's usage (spot-check with `grep`/notebook read).28 - **Needs a look** — major version bump where the API surface likely changed, or a transitive conflict shows up (e.g. another installed package pins an incompatible range).2930## Report and tickets31324. **Write report** to `docs/dependency-audit-<today>.md` with:33 - **Process section:** tools used (`pip list --outdated`, `pip-audit`), source file audited (`requirements.txt`).34 - Summary (dep counts per bucket)35 - Per-package table: current version, latest version, bucket, CVE/advisory IDs if any, action36 - "Bumps applied" list37 - "Tickets to file" list (needs-a-look items)38395. **Apply "bump now" changes** directly to `requirements.txt` (edit the `==` pin), then `pip install -r requirements.txt`.4041 After applying, smoke-test by importing each bumped package in the venv (this project has no test suite — it's notebooks, not a package with pytest coverage). If an import fails or errors obviously, move that package to "needs a look" and revert its pin.42436. **Emit ticket list** for "needs a look" items to `docs/dependency-audit-<today>-tickets.md` using Jira-ready format (title, current→target, risk, references, and whether it's blocked by a transitive conflict). Skip creating this file entirely if the "needs a look" bucket is empty — don't emit an empty tickets file.44457. **Commit the applied bumps** in a single commit covering the `requirements.txt` change. Do not commit the audit report or ticket list — leave those for the operator. Do not push or open a PR.4647### Classification4849- **Bump now:** patch/minor, or a major bump verified not to touch this project's usage.50- **Needs a look:** major bump with likely breaking changes, active CVE with no compatible fix short of a breaking upgrade, or a transitive dependency conflict (e.g. `pip install` reports an incompatible range).5152## When to invoke5354- On demand, or periodically as maintenance.55- After noticing a security advisory for one of the direct deps.5657## References5859- PyPI: https://pypi.org60- OSV vulnerability DB (used by `pip-audit`): https://osv.dev