-
-
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
Plugin does not gracefully handle present, but empty license data #382
Comments
detecting such empty data to better represent it at CycloneDX level looks reasonable target would probably be https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/master/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java#L212 anyone to try to help and code this, please? |
License information with empty name and url (in pom.xml) are ignored. Signed-off-by: fupgang <75629871+fupgang@users.noreply.github.com>
License information with empty name and url (in pom.xml) are ignored. Signed-off-by: fupgang <75629871+fupgang@users.noreply.github.com>
License information with empty name and url (in pom.xml) are ignored. Signed-off-by: fupgang <75629871+fupgang@users.noreply.github.com>
Just provided PR #573 to fix this. This issue bothered us using the openapi-generator. |
So I know this is a bit of an edge case. We generate BOMs with this plugin (version 2.7.9), merge them with cyclonedx-cli, and a third-party service validates them. For some dependencies, we're using an older version that does not specify the license correctly. Validation fails. Here is one of the offending dependencies, at the offending version: https://github.com/aliyun/aliyun-openapi-java-sdk/blob/5f06fdae064c6f87fc9494894a8ef849557f99c8/aliyun-java-sdk-ram/pom.xml#L41
Their pom.xml looks like this:
Which this plugin generates to:
Which, while technically valid per the spec, is not what I would expect, and causes problems with other tools.
A low-impact fix could be something like "if no fields on the license are specified, or all specified fields are empty, then treat the license as if it does not exist." Then this plugin would output this for the dependency:
"licenses" : []
and everything would work out.The text was updated successfully, but these errors were encountered: