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

ProjectDependency are missing from the components section of the BOM #432

Closed
loicrouchon opened this issue Apr 30, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@loicrouchon
Copy link
Contributor

Hello,

In #368, I proposed a fix for #321 which was merged and released.

The fix was a generalization of the sub-projects handling to all projects part of the same Gradle build (i.e. dependencies of type ProjectDependency).

This is done by adding such coordinates for those ProjectDependency to the builtDependencies local variable in org.cyclonedx.gradle.CycloneDxTask#createBom. This avoids trying to fetch the BOM for those dependencies remotely as they are local ones.

However, I realized a side effect of doing this was resulting in local project dependencies not being part of the "components" section of the BOM and I don't think this is the intended behavior as it means those would still be expressed in the "dependencies" section, but without a way to check the licenses nor the hashes of such dependencies in the "components" section.

Could you confirm if this is intended behavior? If not I can try to contribute a fix.

@ericparton
Copy link

I've noticed this behavior and as a user, I feel that it's a bug. The fact that these dependencies don't appear in the components section causes odd behavior in third party tools that consume the boms

@HoustonPutman
Copy link

Yes, I've seen this too and also think it's a bug.

@skhokhlov skhokhlov added the bug Something isn't working label Jul 25, 2024
@loicrouchon
Copy link
Contributor Author

Just a heads-up that I finally have some time to invest into fixing this issue. I made good progress today and I now need to write extensive tests for the prototype. I'll open a PR (hopefully next week) when done with the tests.

loicrouchon added a commit to loicrouchon/cyclonedx-gradle-plugin that referenced this issue Jul 29, 2024
loicrouchon added a commit to loicrouchon/cyclonedx-gradle-plugin that referenced this issue Jul 29, 2024
loicrouchon added a commit to loicrouchon/cyclonedx-gradle-plugin that referenced this issue Jul 29, 2024
… of the build (fix CycloneDX#432)

Signed-off-by: Loic Rouchon <loic@loicrouchon.com>
loicrouchon added a commit to loicrouchon/cyclonedx-gradle-plugin that referenced this issue Jul 29, 2024
Signed-off-by: Loic Rouchon <loic@loicrouchon.com>
loicrouchon added a commit to loicrouchon/cyclonedx-gradle-plugin that referenced this issue Jul 29, 2024
Signed-off-by: Loic Rouchon <loic@loicrouchon.com>
skhokhlov added a commit that referenced this issue Jul 31, 2024
…encies-as-components-432

Include local project dependencies as components #432
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants