CycloneDX / CycloneDX/cyclonedx-core-java

Vulnerability 1.0 Extension parsing bug

Open
#308 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
120
Forks
90
Avg merge
12h 43m
Merged PRs (30d)
18

Description

Version: 7.3.2
OS: Win 11 Pro Build 22621

I've encountered a problem parsing an SBOM with a Vulnerability 1.0 Extension.

The problem is that if component node has multiple ratings nodes ExtensionDeserializer cannot properly parse it and is just filling it with nulls.

```


Low



6.1
4
1.6

CVSSv3
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N


```

com.astoc.scanner.logs.hub.scanners.service.parsers.cyclonedx.patch.CycloneDxPatchedExtensionDeserializer#processRating
Method should take additional cases into account, like when "ratings/rating" node also contains multiple nodes inside.
I'll try to fix an issue and make a pull request in the near future.

Test payload attached.
[cyclonedx-webgoat_test.txt](https://github.com/CycloneDX/cyclonedx-core-java/files/11885202/cyclonedx-webgoat_test.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.