-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Feature: detect shipped vs non shipped dependency => generate version-less component when not shipped #589
Comments
I think that independently of the (heuristic) logic used to detect if a dependency is shipped or non-shipped, we need a configuration option to override the automatic choice. What about starting with that, a simple |
This is making me think that SBOM should be per artifact now and not a gav. Assuming there are shipped and not shipped dependencies only:
|
Yes, we should have the possibility to publish a different SBOM for each classifier at least. Some projects publish both normal and fat jars under different classifiers. jakartaee-migration seems like a nice example:
For this project, we would need 3 SBOMs. |
Yes, @ppkarwasz ! But simply based on classifier would be hard because plugins allow to strip this and publish the jar. For example https://repo1.maven.org/maven2/io/github/algomaster99/classfile-fingerprint/0.14.1/ has a Jar file with no classifiers but it is actually shaded. |
multiple SBOMs for 1 gav: I dislike complexity, particularly when I think at aggregate after it... IMO, we need to create a sample project with multiple scenarios of "shipped or not shipped", done by various plugins/build practice |
In the long term it would be nice if the CycloneDX Maven Plugin was able to infer if the dependencies are bundled or not. However, for now we probably need only two small changes:
Isn't this what Maven 4 does by adding classifiers to BOMs? E.g.
We could start a branch with some ITs and we merge it once the ITs pass. I can create some ITs, could you create the branch? |
branch created https://github.com/CycloneDX/cyclonedx-maven-plugin/tree/589-shipped-or-not-deps
no: build vs consumer POMs (and not BOMs) are more basic (= strictly 2) than varying number of compositions based on yet to be precisely defined conditions :) |
#576 was my initial try: need to reuse content... |
based on multiple issues reported by users with SBOMs generated at build time by cyclonedx-maven-plugin until now vs what is really used at runtime (#472 #588 #357 ),
opened a draft proposal CycloneDX/specification#578
that led to a 2-sided conclusion:
version-less CycloneDX components will let SBOM users know that they'll get an effective version decided by build tool when they consume the library, as Maven (or Gradle or SBT) will resolve all dependencies and when solving conflicts, will choose the effective consume-time version
version-less CycloneDX components will avoid reporting vulnerabilities from dependencies to library or plugins OSS projects that do not affect them per-se but only consumers if they did not get updated version at runtime
Now that this logic has been established, we need to implement: how to detect shipped vs non-shipped dependencies in a Maven build (eventually multi-modules)?
The text was updated successfully, but these errors were encountered: