Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: return empty string if dereferncing pom var fails #2797

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

willmurphyscode
Copy link
Contributor

Previously, Syft would attempt to dereference pom variables, but if it detected a cycle or failed to get back to a non-variable value, it would return the last variable. Instead, return an empty string. Otherwise, certain jars will have versions like "${project.version}" in the SBOM, which is not helpful.

This is a follow up to #2783 and improves the behavior around #2776.

Previously, Syft would attempt to dereference pom variables, but if it
detected a cycle or failed to get back to a non-variable value, it would
return the last variable. Instead, return an empty string. Otherwise,
certain jars will have versions like "${project.version}" in the SBOM,
which is not helpful.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
@willmurphyscode willmurphyscode enabled auto-merge (squash) April 19, 2024 19:30
@willmurphyscode willmurphyscode merged commit 6440f26 into main Apr 19, 2024
11 checks passed
@willmurphyscode willmurphyscode deleted the fix-empty-string-on-pom-var-deref-fail branch April 19, 2024 19:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants