Rank Socket remediation candidates by simplicity#7
Conversation
Prefer direct fixed-version Socket plans over transitive-only plans so the workflow starts with reviewable dependency bumps that are more likely to confirm cleanly. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Created a monitoring plan for this PR. What this PR does: Changes the automated security bot's vulnerability selection logic to prefer simpler, more-reviewable fixes (direct dependency version bumps) over complex transitive-only plans, increasing the chance a remediation PR is created and merged cleanly. Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
|
Inconclusive after 72h monitoring window — no executor telemetry received. Per-environment outcomes:
Evidence:
The monitoring window has closed. The sorting change to |
Summary
Test plan
python3 -m unittest scripts.test_vuln_remediationgit diff --checkMade with Cursor
Note
Low Risk
Heuristic ordering in remediation helper scripts only; no auth, data, or production runtime paths.
Overview
Socket remediation build_context now orders plan-only vulnerabilities by a simplicity score instead of arbitrary dict order, so capped batches (
max_fixes) favor fixes that are easier to apply and confirm.plan_complexity_scoreranks each plan entry by: directfixedVersionbumps first, then fewer responsible packages, fewer transitive fixes, more direct updates, withvuln_idas a stable tie-break.sorted_plan_entrieswraps that sort for the second pass over the fix plan.A regression test asserts that with
max_fixes=1, a direct-dependency advisory wins over a transitive-only plan even when the transitive id would sort first alphabetically.Reviewed by Cursor Bugbot for commit a50ec90. Bugbot is set up for automated code reviews on this repo. Configure here.