-
-
Notifications
You must be signed in to change notification settings - Fork 53
feat: support complete model for bom.metadata
#162
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
Merged
madpah
merged 2 commits into
feat/add-bom-services
from
feat/complete-bom-metadata-model
Feb 8, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,9 +117,7 @@ def get_bom_with_component_setuptools_with_vulnerability() -> Bom: | |
organizations=[ | ||
get_org_entity_1() | ||
], | ||
individuals=[ | ||
OrganizationalContact(name='A N Other', email='[email protected]', phone='+44 (0)1234 567890'), | ||
] | ||
individuals=[get_org_contact_2()] | ||
), | ||
tools=[ | ||
Tool(vendor='CycloneDX', name='cyclonedx-python-lib') | ||
|
@@ -148,9 +146,14 @@ def get_bom_with_component_toml_1() -> Bom: | |
|
||
def get_bom_just_complete_metadata() -> Bom: | ||
bom = Bom() | ||
bom.metadata.authors = [get_org_contact_1(), get_org_contact_2()] | ||
bom.metadata.component = Component( | ||
name='cyclonedx-python-lib', version='1.0.0', component_type=ComponentType.LIBRARY | ||
) | ||
bom.metadata.manufacture = get_org_entity_1() | ||
bom.metadata.supplier = get_org_entity_2() | ||
bom.metadata.licenses = [LicenseChoice(license_expression='Commercial')] | ||
bom.metadata.properties = get_properties_1() | ||
return bom | ||
|
||
|
||
|
@@ -326,13 +329,23 @@ def get_issue_2() -> IssueType: | |
) | ||
|
||
|
||
def get_org_contact_1() -> OrganizationalContact: | ||
return OrganizationalContact(name='Paul Horton', email='[email protected]') | ||
|
||
|
||
def get_org_contact_2() -> OrganizationalContact: | ||
return OrganizationalContact(name='A N Other', email='[email protected]', phone='+44 (0)1234 567890') | ||
|
||
|
||
def get_org_entity_1() -> OrganizationalEntity: | ||
return OrganizationalEntity( | ||
name='CycloneDX', urls=[XsUri('https://cyclonedx.org')], contacts=[ | ||
OrganizationalContact(name='Paul Horton', email='[email protected]'), | ||
OrganizationalContact(name='A N Other', email='[email protected]', | ||
phone='+44 (0)1234 567890') | ||
] | ||
name='CycloneDX', urls=[XsUri('https://cyclonedx.org')], contacts=[get_org_contact_1(), get_org_contact_2()] | ||
) | ||
|
||
|
||
def get_org_entity_2() -> OrganizationalEntity: | ||
return OrganizationalEntity( | ||
name='Cyclone DX', urls=[XsUri('https://cyclonedx.org/')], contacts=[get_org_contact_2()] | ||
) | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,52 @@ | |
"version": "VERSION" | ||
} | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Paul Horton", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "A N Other", | ||
"email": "[email protected]", | ||
"phone": "+44 (0)1234 567890" | ||
} | ||
], | ||
"component": { | ||
"bom-ref": "0b049d09-64c0-4490-a0f5-c84d9aacf857", | ||
"type": "library", | ||
"name": "cyclonedx-python-lib", | ||
"version": "1.0.0" | ||
}, | ||
"manufacture": { | ||
"name": "CycloneDX", | ||
"url": [ | ||
"https://cyclonedx.org" | ||
], | ||
"contact": [ | ||
{ | ||
"name": "Paul Horton", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "A N Other", | ||
"email": "[email protected]", | ||
"phone": "+44 (0)1234 567890" | ||
} | ||
] | ||
}, | ||
"supplier": { | ||
"name": "Cyclone DX", | ||
"url": [ | ||
"https://cyclonedx.org/" | ||
], | ||
"contact": [ | ||
{ | ||
"name": "A N Other", | ||
"email": "[email protected]", | ||
"phone": "+44 (0)1234 567890" | ||
} | ||
] | ||
} | ||
}, | ||
"components": [] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.