Repository navigation
Fix report links in Console and JSON - #396
Open
John-David Dalton (jdalton) wants to merge 1 commit into
Open
John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
John-David Dalton (jdalton)
force-pushed
the
codex/surf199-python-report-refs
branch
from
October 13, 2026 16:11
f57b781 to
6b7da03
Compare
John-David Dalton (jdalton)
deployed
to
socket-firewall
October 13, 2026 16:12 — with
GitHub Actions
Active
John-David Dalton (jdalton)
deployed
to
socket-firewall
October 13, 2026 16:12 — with
GitHub Actions
Active
Assisted-by: Codex:gpt-6-luna
John-David Dalton (jdalton)
force-pushed
the
codex/surf199-python-report-refs
branch
from
October 13, 2026 16:49
6b7da03 to
6b113c0
Compare
John-David Dalton (jdalton)
deployed
to
socket-firewall
October 13, 2026 16:49 — with
GitHub Actions
Active
John-David Dalton (jdalton)
added this pull request to stack #401
October 13, 2026 16:58
This was referenced Oct 13, 2026
This branch was successfully deployed
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.
LLM Description written by Codex:gpt-6-luna
Console comparison summaries could show a full-scan report URL as a diff link, while clean scan summaries omitted available report references.
Root Cause
Console output chose
report_urlbeforediff_urlfor comparisons and returned early for clean scans before rendering a link. JSON output already exposed these URLs separately, but the Console path did not preserve their distinction.Fix
Add a typed report-reference value and pure Console/JSON builders. Comparison Console output now prefers the supplied diff URL and uses the report URL as a correctly labeled fallback. Clean summaries retain
No issues foundas their first line and include an available link. The Socket JSON payload keeps its existing keys, values, metadata, and alert serialization.Public Changelog
N/A
Validation
Bump the package version to
2.10.12;2.10.11is already published on PyPI.python -m pytest tests/unit/test_report_output.py --no-cov— 11 passed.ruff check socketsecurity/core/report_output.py socketsecurity/output.py tests/unit/test_report_output.py— passed.ruff format --check socketsecurity/core/report_output.py tests/unit/test_report_output.py— passed. The existingoutput.pyhas formatting differences outside this change; it was left intact.Note
Medium Risk
Changes user-visible CLI summaries and JSON report fields; behavior is covered by new unit tests but affects every scan’s stdout/file output paths.
Overview
Fixes console report links for comparison and clean scans by moving summary/JSON construction into
socketsecurity/core/report_output.pywith aReportReferenceshelper that picks the right URL and label (diff vs full-scan report, with fallbacks).Comparison output now prefers
diff_urlunder a Diff Url label instead of surfacing a full-scanreport_urlas the diff link. Clean scans still lead withNo issues foundbut now append an available link when one exists. Full-scan behavior keeps report-first linking and the existing “findings not fetched” message.OutputHandlerdelegatesbuild_summary_textandbuild_json_reportto the new builders. Socket JSON gains explicitfull_scan_idanddiff_urlalongside unchanged alert/metadata fields. Unit tests intests/unit/test_report_output.pylock in link precedence, strict-blocking summaries, and JSON shape.Reviewed by Cursor Bugbot for commit f57b781. Configure here.