Repository navigation
Expose scan references in JSON reports - #402
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
Include comparison and full-scan identities and canonical report links for JSON consumers. Preserve existing fields and null values. Assisted-by: Codex:GPT-6
This branch has not been 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
JSON consumers can identify a comparison and open its original full-scan reports without parsing URLs or display text.
diff_scan_id,old_scan_id,new_scan_id,old_scan_url, andnew_scan_url.Why?
Automation needs stable scan references even when comparison output falls back to a full scan. Missing references remain null.
Builds on #399 in the #396 → #398 → #399 stack.
Validation
32 focused tests and scoped Ruff passed, including real Core/SDK requests against the approved local Socket API fixture. Source review found no blockers. No package published.
Public Changelog
Add comparison and full-scan references to standard Socket JSON reports.
Note
Low Risk
Additive JSON fields and documentation only; existing consumers keep prior keys and semantics, with nulls when references are unavailable.
Overview
Standard Socket JSON (
--enable-json) now exposes comparison and full-scan identity so automation can link results without parsing URLs.build_socket_json_reportadds five nullable top-level fields copied from theDiff/ReportReferenceslayer:diff_scan_id,old_scan_id,new_scan_id,old_scan_url, andnew_scan_url. Existing keys (full_scan_id,diff_url,report_url, alerts, metadata) are unchanged;full_scan_idstill means the new full-scan ID (not the comparison ID). Missing references serialize as JSONnull(fallback comparisons, full-only scans, no-run sentinels).new_scan_urlis documented as the canonical scan URL, distinct fromreport_url(display link, e.g. license-detail query params). CLI reference documents this; FOSSA compatibility output is explicitly out of scope.Tests cover unit serialization (null vs populated, no URL inference) and Core/integration paths for diff, full scan, and no-change runs.
Reviewed by Cursor Bugbot for commit 8193af4. Configure here.