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

Make sure composer.lock dependency package version is a string #1325

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

marob
Copy link
Contributor

@marob marob commented Aug 22, 2024

composer.lock files may have a dependency package version as a number instead of a string (see: google/osv-scanner#1138).
In that case new PackageURL(...) throws the following error: Error: Invalid purl: "versions" argument must be a string.

By forcing the number to be interpreted as a string (with .toString()), the error disappears. The same string conversion is done for the version generated in the SBOM as it should also be a string.

composer.lock files may have a dependency package version as a number instead of a string (see: google/osv-scanner#1138). In that case `new PackageURL(...)` throws the following error: Error: Invalid purl: "versions" argument must be a string.

Signed-off-by: Maxime Robert <[email protected]>
@marob marob requested a review from prabhu as a code owner August 22, 2024 16:24
@prabhu prabhu merged commit 82a55b5 into CycloneDX:master Aug 26, 2024
21 checks passed
@marob marob deleted the fix-composer-version-number-type branch September 2, 2024 09:36
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.

2 participants