Repository navigation
Fix package links in PR and MR security comments - #465
Conversation
Each security comment row linked "This package" to the bare package coordinate (alert.purl, e.g. handlebars@4.0.11), so GitHub and GitLab resolved it as a relative link to a page that does not exist. The alert rows have done this since the HTML comment template was introduced, and license rows since they were added; the --strict-blocking existing-alerts table reuses both templates. Both rows now use alert.url, the package overview URL that Package.socket_url builds with the namespace (npm scope, Maven groupId, Go module path). The Markdown, Slack and Jira outputs already link the package with that URL.
…inks # Conflicts: # CHANGELOG.md
…inks # Conflicts: # CHANGELOG.md # socketsecurity/core/messages.py
2.13.2 was released from main, so this change needs the next patch version.
|
bugbot run |
PR SummaryMedium Risk Overview This package now links to the affected version on socket.dev ( Comment assembly reserves headers, footers, and omission notices up front, then fills new and existing alert tables from a shared UTF-8 byte budget (~60k). Omitted new and existing counts are reported separately, blocking existing alerts stay first when truncated, and policy/exit codes still consider all findings even when rows are dropped from the comment. Reviewed by Cursor Bugbot for commit 5086da4. Configure here. |
Include the package namespace in comment rows and generated ignore commands. Match qualified commands in both scan results and comment updates, while continuing to honor existing bare-name commands.
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5086da4. Configure here.
# Conflicts: # CHANGELOG.md
Summary
“This package” opens the affected package version on socket.dev in GitHub and GitLab security comments. Security rows show one package link, and license findings for packages in different scopes or namespaces appear in separate rows.
Under
--strict-blocking --disable-blocking, the existing-alerts header and the console summary now say those alerts don't fail the run. Both used to claim they did, although the exit code stays0.Verification
--strict-blocking.--strict-blocking.Release
Ships in 2.14.0. Merge order: #461 → #462 → #460 → #464 → #465 → #463. Merged together in that order on
mainat #459, the six pass the full test suite andruff check.mainrequires branches to be up to date, so update each PR frommainafter the previous merge.CHANGELOG.mdwill conflict each time: combine the bullets under the existing## 2.14.0subsections (Upgrade notes, Changed, Fixed, Documentation) by hand rather than taking either side.This is 5 of 6, after #464; both touch
scm_comments.pyand merge cleanly. This PR does not change the alert-type links ("What is known malware?" on every row, and the 404 at/alerts/license). That is CE-519, fixed by #406, which will need rebasing onto this PR'smessages.pychanges.Review focus
messages.py.@SocketSecurity ignorecommands include the package scope or namespace when present, for examplenpm/@team/widget@1.0.0. Existing bare-name commands still work.Public changelog
“This package” links open the affected package version in GitHub and GitLab security comments. Scoped ignore commands target the package shown in the row. Large comments link to the full report and show how many findings were omitted. With
--disable-blocking, existing alerts are no longer described as failing the run.Fixes: CE-518
Refs: CE-519