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

fix: default image source name to user input #1979

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Jul 31, 2023

This change ensures that there is always a source name based on user input. This causes fun conflict with the SPDX tag-value decoder when you've encoded a package with no name (error: unable to decode spdx-tag-value: received unknown tag SPDXID in CreationInfo section).

Found this in anchore/grype#1410 for all spdx-tag-value tests:

=== RUN   TestCompareSBOMInputToLibResults/npm-spdx-tag-value
    compare_sbom_input_vs_lib_test.go:244: 
        	Error Trace:	/home/runner/work/grype/grype/test/integration/compare_sbom_input_vs_lib_test.go:244
        	Error:      	Received unexpected error:
        	            	unable to decode sbom: unable to identify format
        	Test:       	TestCompareSBOMInputToLibResults/npm-spdx-tag-value

Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
@wagoodman wagoodman enabled auto-merge (squash) July 31, 2023 17:22
@wagoodman wagoodman merged commit e2f7bef into anchore:main Jul 31, 2023
9 checks passed
@wagoodman wagoodman added the bug Something isn't working label Jul 31, 2023
@kzantow kzantow deleted the fix/image-name-if-unset branch August 1, 2023 14:08
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* fix: default image source name to user input

Signed-off-by: Keith Zantow <kzantow@gmail.com>

* chore: add test

Signed-off-by: Keith Zantow <kzantow@gmail.com>

---------

Signed-off-by: Keith Zantow <kzantow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants