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

No enrichment for nested components in CycloneDX #59

Closed
StefanFl opened this issue Feb 16, 2024 · 3 comments · Fixed by #60
Closed

No enrichment for nested components in CycloneDX #59

StefanFl opened this issue Feb 16, 2024 · 3 comments · Fixed by #60
Labels
bug Something isn't working

Comments

@StefanFl
Copy link

CycloneDX SBOMs can have components embedded in a component, see https://cyclonedx.org/docs/1.5/json/#components_items_components. I have generated a SBOM with cyclonedx-npm and got this:

        {
            "type": "library",
            "bom-ref": "[email protected]",
            "supplier": {
                "name": "Kent C. Dodds",
                "url": [
                    "https://kentcdodds.com"
                ]
            },
            "author": "Kent C. Dodds",
            "name": "match-sorter",
            "version": "6.3.4",
            "description": "Simple, expected, and deterministic best-match sorting of an array in JavaScript",
            "licenses": [
                {
                    "expression": "MIT"
                }
            ],
            "purl": "pkg:npm/[email protected]",
            "components": [
                {
                    "type": "library",
                    "bom-ref": "[email protected]|[email protected]",
                    "name": "remove-accents",
                    "version": "0.5.0",
                    "purl": "pkg:npm/[email protected]"
                }
            ]
        },

This example contains information gathered by Parlay for the match-sorter, but nothing was found for the included remove-accents.

Would it possible for Parlay to traverse through the components?

@mcombuechen
Copy link
Collaborator

Hey @StefanFl
thanks for bringing this up, it is definitely something we'd like parlay to be able to support. I'll keep this issue open to track progress on this.

@mcombuechen mcombuechen changed the title No enrichment for components in a component No enrichment for nested components in CycloneDX Feb 19, 2024
@mcombuechen mcombuechen added the bug Something isn't working label Feb 19, 2024
@mcombuechen
Copy link
Collaborator

This likely also applies to the Snyk enricher. In addition, the root component (.metadata.component) is not being taken into account. Technically that's yet another issue but we could solve this here as well.

@StefanFl just letting you know that a fix is on the way.

@mcombuechen mcombuechen linked a pull request Feb 29, 2024 that will close this issue
mcombuechen pushed a commit that referenced this issue Mar 1, 2024
@StefanFl
Copy link
Author

StefanFl commented Mar 2, 2024

Thank you very much for fixing it so quickly, works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants