|
24 | 24 | from packageurl import PackageURL |
25 | 25 |
|
26 | 26 | from cyclonedx.model import AttachedText, DataClassification, DataFlow, Encoding, ExternalReference, \ |
27 | | - ExternalReferenceType, HashType, LicenseChoice, Note, NoteText, OrganizationalContact, OrganizationalEntity, \ |
28 | | - Property, Tool, XsUri |
| 27 | + ExternalReferenceType, HashType, LicenseChoice, License, Note, NoteText, OrganizationalContact, \ |
| 28 | + OrganizationalEntity, Property, Tool, XsUri |
29 | 29 | from cyclonedx.model.bom import Bom |
30 | 30 | from cyclonedx.model.component import Commit, Component, ComponentEvidence, ComponentType, Copyright, Patch, \ |
31 | 31 | PatchClassification, Pedigree, Swid, ComponentScope |
@@ -166,7 +166,11 @@ def get_bom_just_complete_metadata() -> Bom: |
166 | 166 | ) |
167 | 167 | bom.metadata.manufacture = get_org_entity_1() |
168 | 168 | bom.metadata.supplier = get_org_entity_2() |
169 | | - bom.metadata.licenses = [LicenseChoice(license_expression='Commercial')] |
| 169 | + bom.metadata.licenses = [LicenseChoice(license_=License( |
| 170 | + spdx_license_id='Apache-2.0', license_text=AttachedText( |
| 171 | + content='VGVzdCBjb250ZW50IC0gdGhpcyBpcyBub3QgdGhlIEFwYWNoZSAyLjAgbGljZW5zZSE=', encoding=Encoding.BASE_64 |
| 172 | + ), license_url=XsUri('https://www.apache.org/licenses/LICENSE-2.0.txt') |
| 173 | + ))] |
170 | 174 | bom.metadata.properties = get_properties_1() |
171 | 175 | return bom |
172 | 176 |
|
|
0 commit comments