Uh oh!
There was an error while loading. Please reload this page.
Raise on SBOM fetch failure and require socketdev 3.4.2 - #288
Open
lelia wants to merge 1 commit into
Open
Conversation
❌ Version Check Failed Please increment... |
lelia
marked this pull request as ready for review
August 5, 2026 20:50
socketdev 3.4.2…ts (CE-362) get_sbom_data returned {} when the full-scan stream fetch failed, so report generation continued and produced empty GitLab dependency scanning, license, and SARIF output with exit code 0. Raise APIFailure instead so the failure goes through the CLI's existing API-error handling (exit code 3 by default, still exit 0 with --disable-blocking). Bump the socketdev floor to 3.4.2, the bundled release that adds the missing purl types (e.g. "generic") and per-artifact parse resilience that caused this failure mode. Merge after socketdev 3.4.2 is on PyPI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
leliaforce-pushed
the
lelia/generic-purl-type-parse-bug
branch
from
August 5, 2026 20:52
7ff5db0 to
77b18a7Comparelelia
commented
Aug 5, 2026
ContributorAuthor
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 77b18a7. Configure here.
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 freeto 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.
Summary
When the full-scan SBOM stream fetch failed,
Core.get_sbom_datalogged at debug level and returned{}, so report generation continued and produced empty GitLab dependency-scanning, license, and SARIF output with exit code 0. The most common trigger was SocketDev/socket-sdk-python#101: a single artifact with a purl type the SDK didn't recognize (e.g.generic) failed the whole stream parse.Changes
Core.get_sbom_datanow logs at error level and raisesAPIFailurewhen the stream fetch fails, so the run goes through the existing API-error handling (exit code 3 by default;--disable-blockingstill exits 0) instead of emitting empty reportssocketdevfloor to 3.4.2, the bundled release containing the missing purl types and per-artifact parse resilienceSDK rollout
Testing
test_get_sbom_data_failure_raisespytest tests/unit tests/coreagainst socketdev built from Add missing purl types and per-artifact parse resilience to full-scan stream socket-sdk-python#101: 421 passed, 2 skipped (pre-existing)Draft until socketdev 3.4.2 is published to PyPI (same gating as #284).
Remaining steps once 3.4.2 is on PyPI:
uv lock --upgrade-package socketdevand commit —uv.lockstill pins 3.3.0 and can't be regenerated until the release exists, and the dependency-review jobs runuv sync --lockedRef: CE-362
Note
Medium Risk
Changes error handling on a core SBOM fetch path used for reports and full-scan loading; behavior is intentional but affects all consumers of get_sbom_data on stream parse/API failures.
Overview
Fixes CE-362: when the full-scan SBOM stream fetch fails, CI no longer finishes with exit 0 and empty GitLab, license, and SARIF output.
Core.get_sbom_datanow logs at error and raisesAPIFailurewhenfullscans.streamreturnssuccess: false, so the run uses existing API-error handling (exit code 3 by default;--disable-blockingstill exits 0) instead of treating the failure as an empty SBOM.The
socketdevfloor moves from 3.4.2 (from 3.3.0) to pick up stream parsing fixes (e.g. unrecognized purl types likegenericand per-artifact resilience).A regression test
test_get_sbom_data_failure_raisesasserts the raise behavior.Reviewed by Cursor Bugbot for commit 77b18a7. Configure here.