CycloneDX / CycloneDX/cyclonedx-cli
Unnecessary empty references node created when merging BOMs
- Dominant language
- C#
- Stars
- 541
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
The cyclonedx-cli tool creates an empty ```` node inside the ```` node, when no such reference exists in the input data.
How to reproduce:
Example BOM 1 with a patch (example.bom.xml):
```xml
Apache Solr
7.7.2
Apache-2.0
cpe:2.3:a:apache:solr:7.7.2:*:*:*:*:*:*:*
CVE-2021-44228
Log4J Patch
Log4J update to 2.16.0
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-44228
```
Example 2 (example2.bom.xml):
```xml
Foobar
1.2.3
```
Merge with cyclonedx-cli:
```
cyclonedx-cli --version
0.24.2
cyclonedx-cli merge --input-files example.bom.xml example2.bom.xml --output-format xml
```
Result contains the empty `````` node.
```xml
Apache Solr
7.7.2
Apache-2.0
cpe:2.3:a:apache:solr:7.7.2:*:*:*:*:*:*:*
CVE-2021-44228
Log4J Patch
Log4J update to 2.16.0
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-44228
Foobar
1.2.3
```
Contributor guide
Assessment
This issue has not been assessed yet.