Open emilgenchev opened 4 years ago
The output of a Maven build can produce more than one artifact, so there will need to be a way to specify which one to hash. We also need to take into consideration use of the Maven Assembly plugin as builds can modify the artifact or create entirely new ones. I'm not sure how to handle those scenarios.
One way to solve the multiple artifact issue would be to:
I think that would solve the majority of use cases. However, how should use of the assembly plugin be handled?
would it make sense to introduce additional (optional) assembly section as part of the bom schema and describe the assembly related data?
I really like this idea.
But, I think this would be better handled as a separate step. It might not be the same in this ecosystem. But with .NET, for example, SBOM generation is basically a part of a standard build process. Distribution/release of the output can be quite different.
It could be a nuget package, a zip of the build artifact, executable installer, etc. That would be pretty tricky to handle outside of a separate invocation to "hash this package and add it to the top level of this SBOM".
Just thinking, what is the simplest way to introduce a hash for the top level component. Including hashes for all included files would be good too. But it would be simpler to just have a hash of the package. And easier to consume too.
Is it possible to include as well hashes for the top level component. for example if I execute: mvn org.cyclonedx:cyclonedx-maven-plugin:makeBom
against following pom.xml: https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-websocket/9.0.0.M13/tomcat-websocket-9.0.0.M13.pom
I get dependency hashes only into the bom and not the top level component which in this case is: