Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmarshal Syft JSON with missing metadata #1338

Merged

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Nov 14, 2022

This PR corrects an issue where a Syft JSON with a known metadataType but missing metadata would fail.

Fixes: #1334

@kzantow kzantow requested a review from a team November 14, 2022 16:03
Copy link
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm alright with the current behavior or if we switch to removing the metadata type hint as well.

@kzantow kzantow force-pushed the fix/unmarshal-handle-nil-metadata branch from b03ad66 to 1ec58ee Compare November 15, 2022 17:35
@kzantow kzantow merged commit f8be64d into anchore:main Nov 15, 2022
@kzantow kzantow deleted the fix/unmarshal-handle-nil-metadata branch November 15, 2022 18:00
@ghost
Copy link

ghost commented Nov 16, 2022

Thanks @kzantow!

GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
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.

Missing metadata in syft-json artifacts crashes grype
2 participants