-
-
Notifications
You must be signed in to change notification settings - Fork 52
Support for CycloneDX schema version 1.4 #108
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
Merged
Changes from 11 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
aabb3a1
added draft 1.4 schema documents as of 10-Nov-2021
madpah a1c3401
skeleton updates to define Schema Version 1.4
madpah 27d1c4f
update to latest draft 1.4 XML XSD
madpah 6d28d98
Merge branch 'main' into feat/67-schema-version-1.4-xml
madpah c06b273
Merge branch 'main' into feat/67-schema-version-1.4-xml
madpah 2a94a1e
- Added XML Schema validation for XML tests
madpah 09a14a0
- Made Component `version` optional for schema version 1.4
madpah 7e6db9a
- New model objects for `ReleaseNotes` and associated sub-types
madpah 49a6738
added `lxml` as dev dependency
madpah f0403b7
- Added XML schema validation to all tests in `test_output_xml.py` wi…
madpah 4be4004
added jsonschema validation to unit tests
madpah 4a05fe0
fixed typos
madpah 05e0dde
tests and completing new models for IssueType and ReleaseNote
madpah 9f6ada8
support for `bom.metadata.tools.tool.externalReferences`
madpah 827b01e
altered model to allow `version==""` as the agreed fallback
madpah 5350272
added support for `bom.component.releaseNotes` in Schema Version >= 1…
madpah d7f3b19
feat: re-worked for vulnerabilities becoming part of core schema (#109)
madpah d11c687
test: confirmed `bom.metadata.tools[].externalReferences` is populate…
madpah 8862b51
test: added test to prove `Component.version` is now optional for 1.4…
madpah 8a35309
updated to ensure support for `bom.component.releaseNotes` in JSON 1.4
madpah 7281a91
fixed a bunch of typing / flake8 issues
madpah 505fa81
JSON now supporting `bom.vulnerabilities`
madpah 1ef36a9
feat: move documentation to readthedocs.org (#120)
madpah b7f7a2d
feat: added $schema to JSON BOMs (#121)
madpah 7e6771f
doc: updates
madpah 802a101
doc: updates
madpah 518eca4
chore: attempt to produce manual GitHub action to release a RC version
madpah b664b6e
chore: attempt to produce manual GitHub action to release a RC version
madpah 938f346
chore: attempt to produce manual GitHub action to release a RC version
madpah b703ce9
chore: attempt to produce manual GitHub action to release a RC version
madpah fe1470f
chore: attempt to produce manual GitHub action to release a RC version
madpah 0a18734
chore: attempt to produce manual GitHub action to release a RC version
madpah d1aa272
chore: add publish to PyPi for manual pre-release pacakge
madpah c1b0065
chore: add build prior to publish to PyPi for manual pre-release pacakge
madpah f8e02b8
Merge branch 'main' into feat/schema-version-1.4
madpah a182d7f
fix: using index when potentially not available
madpah e701478
chore: missing license header
madpah 1ff3ea9
Merge branch 'feat/schema-version-1.4' of github.com:CycloneDX/cyclon…
madpah eae6331
addressed some PR comments from @jkowalleck
madpah ec798d5
addressed PR comments from @sonatype-lift
madpah c7fb3cd
addressed PR comments from @sonatype-lift
madpah aef955b
addressed PR comments from @sonatype-lift
madpah 4f5ccaf
addressed PR comments from @sonatype-lift
madpah b8d7615
doc: cleaned up README in favour of RTD.
madpah e21a079
doc: tweaked link to RTD
madpah f3ad678
removed capturing groups from regex as not required
madpah 71c36d4
remove notion that purl will be used for Component bom-ref if bom-ref…
madpah 3cb7745
feat: Relocate Parsers to `cyclonedx-python` (#132)
madpah cd05f79
doc: added changelog
madpah 2ed766c
doc: moved Python-specific parser docs to `cyclonedx-python`
madpah 285c872
doc: removed python-specific parser docs
madpah 0dac5bf
chore: relocated issue-related models to separate file
madpah 1c04448
doc: removed parser reference
madpah f95fd3f
updated Component.__repr__
madpah d0bff8c
fix: addressed how we compare Component objects after feedback;
madpah 9be349c
chore: grabbed latest FINAL 1.4 schema changes
madpah 5990436
cleanup
madpah eca9cc9
addressed `Component.purl` / PackageURL feedback from @jkowalleck
madpah f01be8a
doc: describe anaconda release process (#111)
jkowalleck 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# encoding: utf-8 | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
""" | ||
Exceptions relating to specific conditions that occur when modelling CycloneDX BOM. | ||
""" | ||
|
||
from . import CycloneDxException | ||
|
||
|
||
class InvalidLocaleTypeException(CycloneDxException): | ||
""" | ||
Raised when the supplied locale does not conform to ISD-639 specification. | ||
|
||
Good examples: | ||
- en | ||
- en-US | ||
- en-GB | ||
- fr | ||
- fr-CA | ||
|
||
The language code MUST be lower case. If the country code is specified, the country code MUST be upper case. | ||
The language code and country code MUST be separated by a minus sign. | ||
""" | ||
pass | ||
|
||
|
||
class InvalidUriException(CycloneDxException): | ||
""" | ||
Raised when a `str` is provided that needs to be a valid URI, but isn't. | ||
""" | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# encoding: utf-8 | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
""" | ||
Exceptions that are for specific error scenarios during the output of a Model to a SBOM. | ||
""" | ||
|
||
from . import CycloneDxException | ||
|
||
|
||
class ComponentVersionRequiredException(CycloneDxException): | ||
""" | ||
Exception raised when attempting to output to an SBOM version that mandates a Component has a version, | ||
but one is not available/present. | ||
""" | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# encoding: utf-8 | ||
|
||
# This file is part of CycloneDX Python Lib | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) OWASP Foundation. All Rights Reserved. | ||
import datetime | ||
from typing import List, Optional | ||
|
||
from ..model import IssueType, Note, Properties, XsUri | ||
|
||
|
||
class ReleaseNotes: | ||
""" | ||
This is our internal representation of a `releaseNotesType` for a Component in a BOM. | ||
|
||
.. note:: | ||
See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.4/#type_releaseNotesType | ||
""" | ||
|
||
def __init__(self, type: str, title: Optional[str] = None, featured_image: Optional[XsUri] = None, | ||
social_image: Optional[XsUri] = None, description: Optional[str] = None, | ||
timestamp: Optional[datetime.datetime] = None, aliases: Optional[List[str]] = None, | ||
tags: Optional[List[str]] = None, resolves: Optional[List[IssueType]] = None, | ||
notes: Optional[List[Note]] = None, properties: Optional[Properties] = None) -> None: | ||
self._type: str = type | ||
self._title: Optional[str] = title | ||
self._featured_image: Optional[XsUri] = featured_image | ||
self._social_image: Optional[XsUri] = social_image | ||
self._description: Optional[str] = description | ||
self._timestamp: Optional[datetime.datetime] = timestamp | ||
self._aliases: Optional[List[str]] = aliases | ||
self._tags: Optional[List[str]] = tags | ||
self._resolves: Optional[List[IssueType]] = resolves | ||
self._notes: Optional[List[Note]] = notes | ||
self._properties: Optional[Properties] = properties |
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
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.