|
78 | 78 | RelatedCryptoMaterialState,
|
79 | 79 | RelatedCryptoMaterialType,
|
80 | 80 | )
|
| 81 | +from cyclonedx.model.definition import Definitions, Standard |
81 | 82 | from cyclonedx.model.dependency import Dependency
|
82 | 83 | from cyclonedx.model.impact_analysis import (
|
83 | 84 | ImpactAnalysisAffectedStatus,
|
@@ -1285,7 +1286,20 @@ def get_bom_with_lifecycles() -> Bom:
|
1285 | 1286 | description='Integration testing specific to the runtime platform'),
|
1286 | 1287 | ],
|
1287 | 1288 | component=Component(name='app', type=ComponentType.APPLICATION, bom_ref='my-app'),
|
1288 |
| - ), |
| 1289 | + ) |
| 1290 | + ) |
| 1291 | + |
| 1292 | + |
| 1293 | +def get_bom_with_definitions_standards() -> Bom: |
| 1294 | + """ |
| 1295 | + Returns a BOM with definitions and standards only. |
| 1296 | + """ |
| 1297 | + return _make_bom( |
| 1298 | + definitions=Definitions(standards=[ |
| 1299 | + Standard(name='Some Standard', version='1.2.3', description='Some description', bom_ref='some-standard', |
| 1300 | + owner='Some Owner', external_references=[get_external_reference_2()] |
| 1301 | + ) |
| 1302 | + ]) |
1289 | 1303 | )
|
1290 | 1304 |
|
1291 | 1305 |
|
@@ -1335,4 +1349,5 @@ def get_bom_with_lifecycles() -> Bom:
|
1335 | 1349 | get_bom_with_component_setuptools_with_v16_fields,
|
1336 | 1350 | get_bom_for_issue_630_empty_property,
|
1337 | 1351 | get_bom_with_lifecycles,
|
| 1352 | + get_bom_with_definitions_standards, |
1338 | 1353 | }
|
0 commit comments