Skip to content

Fix diff scan timeout propagation + API failure handling#195

Open
lelia wants to merge 4 commits intomainfrom
lelia/fix-diff-scan-timeout
Open

Fix diff scan timeout propagation + API failure handling#195
lelia wants to merge 4 commits intomainfrom
lelia/fix-diff-scan-timeout

Conversation

@lelia
Copy link
Copy Markdown
Contributor

@lelia lelia commented May 4, 2026

Summary

Fixes two issues causing slow or failing full-scan diff comparisons:

  1. --timeout was only applied to the CLI-local CliClient, but the full-scan diff comparison uses the Socket SDK instance, and was constructed without the CLI timeout, so diff requests kept using the SDK default of 1200 seconds
  2. --exclude-license-details was applied to full scan params/report URLs, but not passed to the /full-scans/diff SDK request
  3. The diff comparison APIFailures exited directly from core diff logic with sys.exit(1), which bypassed top-level CLI handling for the --disable-blocking flag

Changes

  • Passes the effective CLI API timeout into the Socket SDK constructor
  • Passes include_license_details=false to fullscans.stream_diff when license details are excluded
  • Re-raises diff comparison APIFailures so the top-level CLI wrapper handles exit codes consistently, including the --disable-blocking flag
  • Added regression test coverage for timeout propagation, license-detail exclusion, and API failure exit behavior

lelia added 4 commits May 4, 2026 13:52
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
@lelia lelia requested a review from a team as a code owner May 4, 2026 21:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==2.2.87.dev1

Docker image: socketdev/cli:pr-195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant