GeezerVison is showing github.com — Add missing purl types and per-artifact parse resilience to full-scan stream by lelia · Pull Request #101 · SocketDev/socket-sdk-python
Conversation
lelia
commented
Aug 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
SocketPURL_Type only defined unknown, npm, pypi, and golang. When a full-scan stream includes an artifact with any other purl type (e.g. generic), FullScanStreamResponse.from_dict raised a ValueError and FullScans.stream() returned success=False with no artifacts, so consumers ended up with zero packages and alerts for a scan that succeeded server-side.
Changes
- Add the standard purl types (
generic, maven, gem, nuget, cargo, etc.) to SocketPURL_Type
- Add a
_missing_ fallback that resolves unrecognized purl types to UNKNOWN with a warning, following the same forward-compat approach SocketCategory uses (#78)
- Parse artifacts individually in
FullScanStreamResponse.from_dict, skipping (with a warning) any artifact that fails to parse rather than failing the whole response
- Bump version to 3.4.2 for the bundled 3.4.x release
Testing
- New unit tests in
tests/unit/test_socket_purl_type.py covering enum resolution, the UNKNOWN fallback, and per-artifact skip behavior
pytest tests/unit: 130 passed, 1 skipped (pre-existing)
Note: touches version.py/pyproject.toml like #99, so whichever merges second will need a trivial rebase.
Linear: CE-362
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…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 <[email protected]>
|
🚀 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
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
lelia
changed the title
Add missing purl types and per-artifact parse resilience to full-scan stream (CE-362)
Add missing purl types and per-artifact parse resilience to full-scan stream
Aug 5, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 5, 2026
This branch was previously deployed
1 inactive
deployment
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|