Skip to content

Correct package and alert information links - #406

Open
John-David Dalton (jdalton) wants to merge 1 commit into
fix/python-ancestor-namespacefrom
fix/python-alert-reference-links
Open

John-David Dalton (jdalton) wants to merge 1 commit into
fix/python-ancestor-namespacefrom
fix/python-alert-reference-links

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

LLM Description written by Codex:GPT-6

Link security findings to the affected package and the matching alert documentation.

Root Cause

Security comments used package identifiers as links and sent every non-license finding to malware documentation. JSON did not distinguish package links from alert-type documentation.

Fix

  • Add nullable package_url and info_url fields to standard JSON alerts.
  • Use those destinations in security comments, with accurate labels.
  • Preserve existing fields and omit unavailable links.

Builds on #405. Links to individual alerts and triage pages still require an authoritative API value.

Validation

41 focused tests pass, including actual Core/SDK requests against the approved localhost fixture. Scoped Ruff, formatting for touched sections, and diff checks pass. Independent source review found no blockers.

Public Changelog

Correct package and alert documentation links in security reports.


Note

Low Risk
Additive JSON fields and PR comment link fixes; no auth or scan logic changes, though strict JSON schema consumers may need to allow new keys.

Overview
Fixes incorrect “Read more” links in PR security comments (they previously used purl for “This package”, mislabeled url, and sent many findings to generic malware/license pages). Comments now use a shared build_alert_links helper: This package → existing alert url, About this alert type → https://socket.dev/alerts/{type} (URL-encoded), omitting either link when missing.

Standard --enable-json alerts gain additive nullable fields package_url (same as url) and info_url (type docs); url, purl, and in-memory models are unchanged. docs/cli-reference.md documents the new JSON fields.

Reviewed by Cursor Bugbot for commit 9b1a282. Configure here.

Use package destinations and alert-specific documentation in JSON
and security comments. Preserve existing alert fields and omit
links when their source value is missing.

Assisted-by: Codex:GPT-6
@jdalton
John-David Dalton (jdalton) requested a review from a team as a code owner October 13, 2026 18:05
@jdalton
John-David Dalton (jdalton) added this pull request to stack #401 October 13, 2026 18:05

This branch has not been deployed

No deployments
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.

1 participant