You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i am using a sbom and when i scan it says that CPE is invalid but i believ cpe is not invlaid, can anyone confirm why i am getting this message:
asad@asad-Lenovo-V330-15IKB:~/Downloads/wwe$ grype sbom:u8h8dnoj.cdx.json
✔ Vulnerability DB [updated]
✔ Scanned for vulnerabilities [0 vulnerability matches]
├── by severity: 0 critical, 0 high, 0 medium, 0 low, 0 negligible
└── by status: 0 fixed, 0 not-fixed, 0 ignored
*_*[0000] WARN invalid CPE: cpe:2.3:a:dicer_project:dicer::*:*:*:*:node.js:*:***_
[0234] WARN attempted CPE search on OWASP Juice Shop, which has no CPEs. Consider re-running with --add-cpes-if-none
[0234] WARN attempted CPE search on dicer, which has no CPEs. Consider re-running with --add-cpes-if-none
[0234] WARN attempted CPE search on multer, which has no CPEs. Consider re-running with --add-cpes-if-none
No vulnerabilities found
It looks like the version field is empty which is what is triggering the failure. We use a rather long regex to validate the CPE, since the upstream lib has a few known bugs around parsing, however, this lib has since been archived.
So, I think the next plan is to find a lib that we can use in place of the existing one we're using, test out the string parsing function to ensure it's well behaved relative to the spec, then remove the existing regex validation approach from our codebase.
wagoodman
changed the title
CPE invalid error
Replace nvdtools CPE library
Feb 20, 2025
Hey, thank you for your explanation! It’s really helpful to understand why the validation failed and the background on the CPE parsing issues. Good to know there’s already a plan in place to address this by looking into alternative libraries and making sure everything aligns better with the spec.
Just to confirm, is this inconsistency something that only occurs in edge cases (like the empty version field) and not something that would typically happen in production, especially with a decent SBOM generator? It seems like more of a niche issue, but it’s great to see steps being taken to improve the validation process going forward.
Hello, i am using a sbom and when i scan it says that CPE is invalid but i believ cpe is not invlaid, can anyone confirm why i am getting this message:
the sbom i used was this:
The text was updated successfully, but these errors were encountered: