spike: mockup of uv-audit-based detection backend#14
Draft
albertotb wants to merge 2 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A non-wired exploration (not referenced by
action.yml) of replacing the security-updates detection layer withuv 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 fromupdate.pyunchanged — the remediation loop, the #12 no-op/phantom gating, and the PR builder — and only swapsfetch_alerts(repo)forfetch_alerts_uv_audit().Why / findings
Spun out of the discussion on #12. The question was whether
uv auditcould simplify remediation + PR creation.uv audittodaygh api/token, works pre-merge & on forks. OSV range-checking means already-patched packages aren't flagged → addresses the #12 root cause.uv audit --fixis roadmap-only (unshipped), so we still driveuv lock --upgrade-packageper package.remediate_with_uv_fix()sketches the future--fixpath that would collapse most ofupgrade_packages().Caveats
uv audit's JSON output is newly stabilized and undocumented; the parser models pip-audit's--format jsonschema as a placeholder. It must be validated against a realuv audit --format jsonrun before any real use.Status
Draft / discussion only — do not merge as-is. Opened to capture the spike for review.
References: uv audit blog · Roadmap #18506 ·
--fix#19428https://claude.ai/code/session_01VkxUytGDvgGUTaHXtFuc9o
Generated by Claude Code