Skip to content

[BUG] XML Schema Violation: externalReferences.hashes included in XML BOM schema versions 1.1 and 1.2 #152

Closed

Description

@madpah

Example BOM generation:

bom = Bom(components=[
        Component(
            name='toml', version='0.10.2', bom_ref='pkg:pypi/[email protected]?extension=tar.gz',
            purl=PackageURL(
                type='pypi', name='toml', version='0.10.2', qualifiers='extension=tar.gz'
            ), hashes=[
                HashType.from_composite_str('sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b')
            ], external_references=[
                get_external_reference_1()
            ]
        )
    ])

Generates

...
<externalReferences>
                <reference type="distribution">
                    <url>https://cyclonedx.org</url>
                    <comment>No comment</comment>
                    <hashes>
                        <hash alg="SHA-256">806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b</hash>
                    </hashes>
                </reference>
            </externalReferences>
...

.externalReferences.hashes is not part of the schema prior to version 1.3.

Activity

  1. added
    bug
    and removed on Jan 27, 2022
  2. changed the title [-][BUG] XML Schema Violation: `externalReferences.hashes` included in XML BOM output prior to 1.3[/-] [+][BUG] XML Schema Violation: `externalReferences.hashes` included in XML BOM schema versions 1.1 and 1.2[/+] on Jan 27, 2022
  3. madpah commented on Jan 27, 2022

    @madpah
    CollaboratorAuthor

    Confirmed this doesn't affect 1.0 output as externalReferences is not supported full stop and is not included in 1.0.

  4. linked a pull request that will close this issueRELEASE 2.0.0 #148on Feb 2, 2022
  5. added this to the 1.4.0 milestone on Feb 2, 2022
  6. self-assigned this
    on Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugschema 1.1schema 1.2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions