Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.7 KB

scan-diff.md

File metadata and controls

37 lines (30 loc) · 1.7 KB

socket scan diff

Compare two full scans:

socket scan diff <BASE_SCAN_ID> <HEAD_SCAN_ID> --json

Use --json-format python-v1 to emit a versioned payload with Python CLI field names. This selector implies JSON output and cannot be combined with --markdown:

socket scan diff <BASE_SCAN_ID> <HEAD_SCAN_ID> --json-format python-v1

The JSON object includes schema_version, comparison_status, decision, scan_failed, scan and diff identifiers and URLs, alert lists, and direct package changes under new_packages, updated_packages, removed_packages, and replaced_packages. Package and alert identifiers retain the Socket IDs and alert keys. Findings include the Python-compatible names such as pkg_type, pkg_name, pkg_version, pkg_id, key, type, and severity.

new_alerts contains error and warning findings for changed packages. With --strict-blocking, unchanged blocking findings are included there as well as in unchanged_alerts; duplicate findings are collapsed by package, alert type, and advisory ID. removed_alerts lists alerts from removed packages.

Completed comparisons use empty arrays when a category has no entries. Skipped comparisons also use empty arrays, with comparison_status: "skipped" and decision: "not-evaluated" to distinguish them from a clean comparison. Missing required diff fields produce comparison_status: "incomplete", decision: "unknown", and incomplete_fields; API errors use the same status with an error object. Unknown scalar package metadata and unavailable IDs or URLs are null. A blocking result has decision: "fail"; otherwise the comparison passes. Native JSON output remains unchanged when the selector is not used.