Skip to content
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

Add support for services #418

Open
stevespringett opened this issue Jan 18, 2023 · 1 comment
Open

Add support for services #418

stevespringett opened this issue Jan 18, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed schema 1.2 related to CycloneDX spec v1.2

Comments

@stevespringett
Copy link
Member

stevespringett commented Jan 18, 2023

see the docs: https://cyclonedx.org/use-cases/#service-definition

@jkowalleck jkowalleck added enhancement New feature or request help wanted Extra attention is needed labels Jan 19, 2023
@jkowalleck
Copy link
Member

implementation detail:

  • services have support for bom-ref and bom. Therefore the bom properties need to be discriminated. see
    #getAllBomRefs (bom: Bom): Iterable<BomRef> {
    const bomRefs = new Set<BomRef>()
    function iterComponents (cs: Iterable<Component>): void {
    for (const { bomRef, components } of cs) {
    bomRefs.add(bomRef)
    iterComponents(components)
    }
    }
    if (bom.metadata.component !== undefined) {
    bomRefs.add(bom.metadata.component.bomRef)
    iterComponents(bom.metadata.component.components)
    }
    iterComponents(bom.components)
    return bomRefs.values()
    }

@jkowalleck jkowalleck added the schema 1.2 related to CycloneDX spec v1.2 label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed schema 1.2 related to CycloneDX spec v1.2
Projects
None yet
Development

No branches or pull requests

2 participants