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

Mark components from test scope #505

Open
skhokhlov opened this issue May 28, 2024 · 2 comments
Open

Mark components from test scope #505

skhokhlov opened this issue May 28, 2024 · 2 comments

Comments

@skhokhlov
Copy link
Member

skhokhlov commented May 28, 2024

CycloneDX npm plugin adds properties for components in SBOM which are dev dependencies of the project.

"properties": [
        {
          "name": "cdx:npm:package:development",
          "value": "true"
        }
]

https://github.com/CycloneDX/cyclonedx-node-npm/blob/main/demo/dev-dependencies/example-results/bare/bom.1.6.json#L187-L188

This data is crucial for risk analysis of vulnerabilities. It would be perfect to add similar property to be able to identify test dependencies in SBOMs collected with maven plugin.

@FloJit
Copy link

FloJit commented Jul 24, 2024

It could be interesting to add the maven scope (not only test) in each component object.
I'll try to check it how to do that.

@FloJit
Copy link

FloJit commented Jul 24, 2024

Well, one way could be to add maven scopes in the Component.Scope enum and store the Artifact#getScope instead of to check the Artifact#isOptional.
But that means to modify the core ...

Or maybe one day change the type of the scope as String to let the possibility to set any scope of any plugin (I don't know how Gradle scopes work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants