You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will there be an option to force a specific license model? e.g. Dependency Track does not support expressions yet so even if the string is actually an expression, forcing it to a named license would at least make it visible in Dependency Track (knowing that the matching will not work).
i am providing a best-effort-implementation - as a ground for improvements.
after i am done with this, you are free to make the SPDX expression detection better.
Activity
jkowalleck commentedon Sep 12, 2022
will prepare a POC for discussion
this would lead to a v2 implementation in module(file)
cyclonedx/factory/license.pyand a forward-port to v3
Jonas-vdb commentedon Sep 12, 2022
Will there be an option to force a specific license model? e.g. Dependency Track does not support expressions yet so even if the string is actually an expression, forcing it to a named license would at least make it visible in Dependency Track (knowing that the matching will not work).
jkowalleck commentedon Sep 12, 2022
good point. the factory should be supporting both
the later one is the thing that is required, so that an implementation in the https://github.com/CycloneDX/cyclonedx-python/ should be a one-liner, then.
Jonas-vdb commentedon Sep 12, 2022
I'm curious to see how it will determine what the return type should be.
Examples of licenses which are currently present in the BOM we use:
jkowalleck commentedon Sep 12, 2022
re: #304 (comment)
the source of SPDX is different, but the rest is basically correc.
just see the JS and PHP implementations linked above as a reference point.
a best-effort detection:
(and ends with)=> probably an expression -> return license expressionimplementation will be good-enough for now and can be seen as a ground for improvements later.
see #305
Jonas-vdb commentedon Sep 13, 2022
Note: identifying an expression with brackets will not always work.
Example of license expression without brackets:
('License', 'BSD-2-Clause or Apache-2.0')
jkowalleck commentedon Sep 13, 2022
i am providing a best-effort-implementation - as a ground for improvements.
after i am done with this, you are free to make the SPDX expression detection better.
[-]license factory[/-][+][FEATURE] SPDX License factory[/+]Merge pull request #305 from CycloneDX/license-factories