Uh oh!
There was an error while loading. Please reload this page.
Add missing purl types and per-artifact parse resilience to full-scan stream - #101
Merged
Conversation
…facts (CE-362) The full-scan stream can include artifacts whose purl type is not in SocketPURL_Type (e.g. "generic"), and a single such artifact failed the entire FullScanStreamResponse parse, leaving consumers with zero packages and alerts for an otherwise-successful scan. - Add the standard purl types (generic, maven, gem, nuget, cargo, ...) to SocketPURL_Type - Fall back to UNKNOWN with a warning for unrecognized purl types, the same forward-compat approach SocketCategory uses (#78) - Skip individual artifacts that fail to parse in FullScanStreamResponse.from_dict instead of discarding the response - Bump version to 3.4.0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🚀 Preview package published! Install with: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.4.0.dev8 |
Eric Hibbs (flowstate)
approved these changes
Aug 5, 2026
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
SocketPURL_Typeonly definedunknown,npm,pypi, andgolang. When a full-scan stream includes an artifact with any other purl type (e.g.generic),FullScanStreamResponse.from_dictraised aValueErrorandFullScans.stream()returnedsuccess=Falsewith no artifacts, so consumers ended up with zero packages and alerts for a scan that succeeded server-side.Changes
generic,maven,gem,nuget,cargo, etc.) toSocketPURL_Type_missing_fallback that resolves unrecognized purl types toUNKNOWNwith a warning, following the same forward-compat approachSocketCategoryuses (#78)FullScanStreamResponse.from_dict, skipping (with a warning) any artifact that fails to parse rather than failing the whole responseTesting
tests/unit/test_socket_purl_type.pycovering enum resolution, theUNKNOWNfallback, and per-artifact skip behaviorpytest tests/unit: 130 passed, 1 skipped (pre-existing)Note: touches
version.py/pyproject.tomllike #99, so whichever merges second will need a trivial rebase.Linear: CE-362
🤖 Generated with Claude Code