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

Support parsing license information in Maven projects via parent poms #2103

Closed
coheigea opened this issue Sep 7, 2023 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@coheigea
Copy link
Contributor

coheigea commented Sep 7, 2023

I noticed that Syft does not report a license for a Maven project if the license is contained in the parent pom instead. This is a pretty common thing in a lot of open-source projects, to have a single parent pom.xml which defines commons things (including license information), and then each module in the project inherits this pom.

For example, here are two examples of projects Syft does not detect the license, even though it's defined in both cases in the parent pom:

Please consider this feature request, because as it stands Syft does not report any license for quite a few Maven projects due to this issue. Maybe it could be configurable via a feature flag (detect transitive licenses). To prevent infinite loops or denial of service type of attacks, it should only walk up to 2/3 parent poms.

Note that using mvn help:effective-pom -f httpclient-4.5.13.pom does show the correct license

@coheigea
Copy link
Contributor Author

coheigea commented Nov 8, 2023

Closing this as both PRs applied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

1 participant