When using cyclonedx-core-java to write a CycloneDX SBOM as an XML, the resulting SBOM is invalid.
Expected:
<components>
<component type="library" bom-ref="Maven:me.xdrop:fuzzywuzzy:1.4.0">
<authors>
<author>
<name>Panayiotis P</name>
</author>
</authors>
</component>
</components>
Actual:
<components>
<component type="library" bom-ref="Maven:me.xdrop:fuzzywuzzy:1.4.0">
<authors>
<authors>
<name>Panayiotis P</name>
</authors>
</authors>
</component>
</components>
Note the plural of authors in the nested tag.
The spec, and also the cyclonedx-cli show that the nested block should be author instead of authors.
We discovered this when generating CycloneDX reports using ORT, which uses cyclonedx-core-java.
In ORT I wrote a test to reproduce this issue: oss-review-toolkit/ort#10271.
When using
cyclonedx-core-javato write a CycloneDX SBOM as an XML, the resulting SBOM is invalid.Expected:
Actual:
Note the plural of
authorsin the nested tag.The spec, and also the cyclonedx-cli show that the nested block should be
authorinstead ofauthors.We discovered this when generating CycloneDX reports using ORT, which uses
cyclonedx-core-java.In ORT I wrote a test to reproduce this issue: oss-review-toolkit/ort#10271.