Skip to content

Commit 40b141e

Browse files
committed
docs(diff): record verified cached diff-scan param behaviour
Probed the live API against an existing diff scan to confirm what the polling path can and cannot ask for: - omit_license_details is ignored when cached=true, as the existing comment said. License fields remain in the response. - omit_unchanged IS honored and removes unchanged artifacts entirely, measured at ~1.1 KB per artifact (225,542 B -> 78,003 B when dropping 135 of 192 artifacts). Record why the CLI still does not send omit_unchanged: unchanged artifacts feed diff.unchanged_alerts, which create_security_comment_gitlab and the FOSSA compat issue list read unconditionally, not only under --strict-blocking. Omitting them would silently shrink those outputs, so this needs proper gating in its own change rather than a param tweak here. Ref: CE-379
1 parent 74a549b commit 40b141e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

socketsecurity/core/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,6 +1605,16 @@ def get_diff_scan_artifacts(
16051605
# payload ever gets a response truncated on a huge dependency tree,
16061606
# response.json() fails and the caller falls back to the legacy
16071607
# streaming comparison, which still requests the lean payload.
1608+
#
1609+
# Verified against the live API: passing omit_license_details alongside
1610+
# cached=true leaves the license fields in the response, but omit_unchanged
1611+
# IS honored and drops the unchanged artifacts entirely (~1.1 KB each). Not
1612+
# sent here because unchanged artifacts are not only used by
1613+
# --strict-blocking: create_security_comment_gitlab and the FOSSA compat
1614+
# issue list both read diff.unchanged_alerts unconditionally, so omitting
1615+
# them would silently shrink those outputs. Gating it correctly across all
1616+
# three consumers is worth doing - on a tree with ~10k unchanged artifacts
1617+
# it is over 10 MB of response - but it needs its own change.
16081618
poll_params = {"cached": "true"}
16091619
poll_start = time.monotonic()
16101620
deadline = poll_start + DIFF_SCAN_POLL_TIMEOUT_SECONDS

0 commit comments

Comments
 (0)