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

[Gradle] Relationship between sub-projects missing. #249

Closed
ajmalab opened this issue Mar 1, 2023 · 13 comments
Closed

[Gradle] Relationship between sub-projects missing. #249

ajmalab opened this issue Mar 1, 2023 · 13 comments

Comments

@ajmalab
Copy link
Contributor

ajmalab commented Mar 1, 2023

Hi,
If a project has 3 child projects A, B and C, and if B and C depend on A, this relationship is never captured, since the entire project is treated as a single entity and the external dependencies are the only ones that are captured.

Would be ideal if there was sub-project level granularity in the sbom. Like:
subProjectA:
dependsOn: [...]
subProjectB:
dependsOn:[subProjectA,..]
subProjectC:
dependsOn:[subProjectA,..]

and so on

@prabhu
Copy link
Collaborator

prabhu commented Mar 2, 2023

@ajmalab, I will think about a better identification logic for dependencies.

@kito99
Copy link

kito99 commented Mar 31, 2023

I'm seeing this as well. The Maven plugin captures this, but cdxgen does not.

@prabhu
Copy link
Collaborator

prabhu commented Mar 31, 2023

@kito99, any sample projects you could share?

@kito99
Copy link

kito99 commented Mar 31, 2023

Hey @prabhu unfortunately no, but if it becomes an issue on the project I can create one. Right now I don't think it'll be much of a problem.

@prabhu
Copy link
Collaborator

prabhu commented Mar 31, 2023

@kito99, even a public open-source one will tremendously help to fix this.

@kito99
Copy link

kito99 commented Mar 31, 2023 via email

@ajmalab
Copy link
Contributor Author

ajmalab commented Apr 13, 2023

Not mine, but I think this project covers the case: https://github.com/t2y/gradle-multi-project-sample/

@kito99
Copy link

kito99 commented Apr 13, 2023

I just tried this out quickly and couldn't get to build.. I'm guessing my version of Gradle is too new. I can try again later, though.

@prabhu
Copy link
Collaborator

prabhu commented Apr 21, 2023

Thank you for sharing this project. I had to make few changes to make it build with latest java and gradle.

gmp.diff.txt

@prabhu
Copy link
Collaborator

prabhu commented Apr 22, 2023

@kito99 in your first comment did you mean "gradle" plugin or does the same issue exist in cdxgen with maven projects as well?

@kito99
Copy link

kito99 commented Apr 25, 2023

@prabhu I meant that the Maven plugin does not have this issue. The Maven plugin works extremely well (with and without cdxgen).

I stopped trying to use the Gradle plugin because it doesn't handle multi-module projects well at all, which is what led me to cdxgen.

@prabhu
Copy link
Collaborator

prabhu commented Apr 25, 2023

@kito99 I pushed some improvements for gradle recently. Will continue to iterate and let you know once this is done

prabhu added a commit that referenced this issue May 15, 2023
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu
Copy link
Collaborator

prabhu commented May 15, 2023

@kito99 Could you kindly test the PR branch #316 and let me know how it looks?

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

No branches or pull requests

3 participants