Skip to content

XML serialization of components with authors results in invalid CycloneDX SBOM #638

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

Open
MarcelBochtler opened this issue May 6, 2025 · 0 comments

Comments

@MarcelBochtler
Copy link

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.

MarcelBochtler added a commit to boschglobal/oss-review-toolkit that referenced this issue May 6, 2025
This test is currently expected to fail due to a bug in the
cyclonedx-core-java [1].

[1]: CycloneDX/cyclonedx-core-java#638

Signed-off-by: Marcel Bochtler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant