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

cdxgen can't parse name, version correctly #1089

Open
pig837 opened this issue May 17, 2024 · 2 comments
Open

cdxgen can't parse name, version correctly #1089

pig837 opened this issue May 17, 2024 · 2 comments
Labels
enhancement New feature or request needs contributor

Comments

@pig837
Copy link

pig837 commented May 17, 2024

Hi, I generated SBOM using cdxgen 10.5.1, but it can't be parsed jquery-Migrate correctly. (Because of based filename)

Download link(gnuboard 5.5.16)

{ "group": "", "name": "jquery", "version": "Migrate", "scope": "required", "purl": "pkg:npm/jquery@Migrate", "type": "library", "bom-ref": "pkg:npm/jquery@Migrate", "evidence": { "identity": { "field": "purl", "confidence": 0.25, "methods": [ { "technique": "filename", "confidence": 0.25, "value": "C:\\temp\\gnuboard5.5.16\\js\\jquery-migrate-1.4.1.min.js" } ] }, "occurrences": [ { "location": "js\\remodal\\remodal.js#7" }, { "location": "js\\tooltipster\\tooltipster.bundle.js#17" }, { "location": "js\\tooltipster\\tooltipster.bundle.min.js#1" } ] }, "properties": [ { "name": "SrcFile", "value": "C:\\temp\\gnuboard5.5.16\\js\\jquery-migrate-1.4.1.min.js" }, { "name": "ImportedModules", "value": "jquery" } ] }

image

@prabhu
Copy link
Contributor

prabhu commented May 17, 2024

@pig837 Thank you. The code is assuming the second word to be the version here.

Could you think of a better way to parse this and share a PR? But please note that it is a non-trivial effort, since we might cause regression for other project, unless we can collect sufficient number of tests.

/*! jQuery Migrate v1.4.1 | (c) jQuery Foundation

https://github.com/gnuboard/gnuboard5/blob/92c1052cf5c3d6a7f1b0603048483fb8108c2da5/js/jquery-migrate-1.4.1.min.js#L1

@prabhu
Copy link
Contributor

prabhu commented May 17, 2024

Related: #1027

@prabhu prabhu added enhancement New feature or request needs contributor labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs contributor
Projects
None yet
Development

No branches or pull requests

2 participants