Skip to content

spike: mockup of uv-audit-based detection backend#14

Draft
albertotb wants to merge 2 commits into
mainfrom
claude/uv-audit-mockup-spike
Draft

spike: mockup of uv-audit-based detection backend#14
albertotb wants to merge 2 commits into
mainfrom
claude/uv-audit-mockup-spike

Conversation

@albertotb

Copy link
Copy Markdown
Member

What

A non-wired exploration (not referenced by action.yml) of replacing the security-updates detection layer with uv audit (OSV-backed) instead of GitHub Dependabot alerts.

Adds a single file, security-updates/update_uv_audit_mockup.py. It imports the data model and all downstream logic from update.py unchanged — the remediation loop, the #12 no-op/phantom gating, and the PR builder — and only swaps fetch_alerts(repo) for fetch_alerts_uv_audit().

Why / findings

Spun out of the discussion on #12. The question was whether uv audit could simplify remediation + PR creation.

Concern With uv audit today Notes
Detection ✅ Simpler & better One local command, no gh api/token, works pre-merge & on forks. OSV range-checking means already-patched packages aren't flagged → addresses the #12 root cause.
Remediation ❌ No change yet uv audit --fix is roadmap-only (unshipped), so we still drive uv lock --upgrade-package per package.
PR creation ❌ No change Same commit/PR machinery regardless of source.

remediate_with_uv_fix() sketches the future --fix path that would collapse most of upgrade_packages().

Caveats

  • ⚠️ uv audit's JSON output is newly stabilized and undocumented; the parser models pip-audit's --format json schema as a placeholder. It must be validated against a real uv audit --format json run before any real use.
  • Trades Dependabot's severity/CVSS richness for OSV's data.

Status

Draft / discussion only — do not merge as-is. Opened to capture the spike for review.

References: uv audit blog · Roadmap #18506 · --fix #19428

https://claude.ai/code/session_01VkxUytGDvgGUTaHXtFuc9o


Generated by Claude Code

claude added 2 commits June 8, 2026 21:07
Non-wired exploration (not referenced by action.yml) of replacing the
Dependabot detection layer with `uv audit` (OSV-backed). Reuses the
remediation + PR logic and #12 gating from update.py unchanged; only the
detection call is swapped. Includes a sketch of the future `uv audit --fix`
remediation path. JSON parser models pip-audit's schema as a placeholder
pending uv audit's stabilized output format.
Verified against a real `uv audit --output-format json` run (uv 0.11.19):
- flag is --output-format json (not --format json)
- output is a flat vulnerabilities[] list with nested dependency{name,version},
  id (GHSA-*/PYSEC-*), aliases (CVE), summary (nullable), fix_versions[], link
- no severity field -> rendered as (unknown); documented as the gap vs Dependabot
- --fix confirmed absent in 0.11.19 (roadmap only)
Parser rewritten to group the flat list by package; validated end-to-end
through the unchanged update.build_pr_body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants