-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
2.7.5 release does not obey includeProvidedScope option #284
Comments
I would guess this was broken by 55b4bac. |
|
To better illustrate the behavior change we're seeing with 2.7.5, consider the following: In our project we have the following declared dependencies:
The
In reality, the With 2.7.4, we were able to prevent the SBOM from including this But starting with 2.7.5, we're finding that this setting doesn't have any effect now for our project. I'm not sure if the changes brought in by 55b4bac are intended to cause the |
Btw, you can see this behavior in mwiede/jsch#279, where I am attempting to add SBOM generation. |
@knrc WDYT? |
@hboutemy I can address this. This worked previously because of the way the components were chosen, however this caused the problem with multiple roots in the dependency section when the maven resolution took place. The current code now relies only on the maven filtering mechanism and Fixing this would give me the opportunity to simplify the process, and even move over to using the underlying I'm on holiday this week, however I can likely get to this over the weekend or Monday. |
@norrisjeremy I'll get this addressed as soon as possible |
Hi @knrc, Great, thanks! Something else that I noticed is that dependencies that marked as I don't think this is related to the the changes in 2.7.5 (as it happens with prior versions as well), but that seems to me as being incorrect. Wouldn't it be more correct to mark them with a optional scope (as well the transitive dependencies they pull in)? Thanks, |
That's definitely not related to my change, however I can look into that at the same time and see if I can discover what is happening. Kev |
CycloneDX#284 Signed-off-by: Kevin Conner <[email protected]>
…ndividual scopes Signed-off-by: Kevin Conner <[email protected]>
…ndividual scopes Signed-off-by: Kevin Conner <[email protected]>
…ndividual scopes Signed-off-by: Kevin Conner <[email protected]>
@norrisjeremy I've submitted a PR to handle your original issue, but not the optional one. I'll take a look at that separately |
With regards to the scope of the components this appears to be derived from the bytecode dependency analysis. If the artifact is used then it is marked as required, whereas if it is unused it is marked as optional. This is certainly different from defining it as optional in the pom, which appears to be ignored. |
Hi @knrc, Regardless of the bytecode analysis, we would very much appreciate a way to flag In our case with JSch, we have several non-mandatory dependencies that are not required for the overwhelming majority of consumers of our library. These dependencies are only needed by downstream consumers if they want to utilize these optional features. It seems to me that that added an option similar to the Thanks, |
@norrisjeremy agreed, I'm not sure why it is done this way but I'll give it some thought and propose something |
Fixes #284, Switch to aether and filter artifacts based on individual…
With the 2.7.5. release, dependencies with
<scope>provided</scope>
are incorrectly include in the generated SBOM even though<includeProvidedScope>false</includeProvidedScope>
is set.The text was updated successfully, but these errors were encountered: