Correct way to specify custom licenses in SPDX license expressions? #713
-
|
Hi, I maintain a repository for generating CycloneDX SBOMs for Yocto/OpenEmbedded builds. For including license information for the individual components, I want to translate the OE-specific license expression to a SPDX license expression as defined in https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/. Some of the licenses mentioned in the license expression might not be valid SPDX license IDs. As per the SPDX license expressions spec, I would add a However, what is unclear to me is whether these custom licenses should be defined within the CycloneDX SBOM, e.g. at metadata.licenses? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
The licenses should be applied to the component that declared the license or for which the license has been concluded. Refer to https://cyclonedx.org/use-cases/open-source-licensing/ In the example, "library b" uses an SPDX expression. Using that property, you can safely use a custom license that starts with |
Beta Was this translation helpful? Give feedback.
re: #713 (reply in thread)
You are right, for some parts of SPDX expressions, the actual license texts are necessary.
This is especially true for licenses that are not recognized by SPDX - which leads to using
LicenseRefin the first place.Since CycloneDX 1.7, we provide the ability to specify the texts for each SPDX expression part.
see an example here: https://github.com/CycloneDX/specification/blob/master/tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.json