updates
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
# This file is part of CycloneDX Python Library
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
from enum import Enum, auto, unique
|
||||
from typing import Any, Type, TypeVar
|
||||
|
||||
|
||||
@unique
|
||||
class OutputFormat(Enum):
|
||||
"""Output formats.
|
||||
|
||||
Cases are hashable.
|
||||
|
||||
Do not rely on the actual/literal values, just use enum cases, like so:
|
||||
my_of = OutputFormat.XML
|
||||
"""
|
||||
|
||||
JSON = auto()
|
||||
XML = auto()
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.name)
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
return self is other
|
||||
|
||||
|
||||
_SV = TypeVar('_SV', bound='SchemaVersion')
|
||||
|
||||
|
||||
@unique
|
||||
class SchemaVersion(Enum):
|
||||
"""
|
||||
Schema version.
|
||||
|
||||
Cases are hashable.
|
||||
Cases are comparable(!=,>=,>,==,<,<=)
|
||||
|
||||
Do not rely on the actual/literal values, just use enum cases, like so:
|
||||
my_sv = SchemaVersion.V1_3
|
||||
"""
|
||||
|
||||
V1_6 = (1, 6)
|
||||
V1_5 = (1, 5)
|
||||
V1_4 = (1, 4)
|
||||
V1_3 = (1, 3)
|
||||
V1_2 = (1, 2)
|
||||
V1_1 = (1, 1)
|
||||
V1_0 = (1, 0)
|
||||
|
||||
@classmethod
|
||||
def from_version(cls: Type[_SV], version: str) -> _SV:
|
||||
"""Return instance based of a version string - e.g. `1.4`"""
|
||||
return cls(tuple(map(int, version.split('.')))[:2])
|
||||
|
||||
def to_version(self) -> str:
|
||||
"""Return as a version string - e.g. `1.4`"""
|
||||
return '.'.join(map(str, self.value))
|
||||
|
||||
def __ne__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value != other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __lt__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value < other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __le__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value <= other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value == other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __ge__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value >= other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __gt__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return self.value > other.value
|
||||
return NotImplemented # pragma: no cover
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.name)
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
# Resources: Schema files
|
||||
|
||||
some schema for offline use as download via [script](../../../tools/schema-downloader.py).
|
||||
original sources: <https://github.com/CycloneDX/specification/tree/master/schema>
|
||||
|
||||
Currently using version
|
||||
[8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7](https://github.com/CycloneDX/specification/commit/8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7)
|
||||
|
||||
| file | note |
|
||||
|------|------|
|
||||
| [`bom-1.0.SNAPSHOT.xsd`](bom-1.0.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.1.SNAPSHOT.xsd`](bom-1.1.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.2.SNAPSHOT.xsd`](bom-1.2.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.3.SNAPSHOT.xsd`](bom-1.3.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.4.SNAPSHOT.xsd`](bom-1.4.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.5.SNAPSHOT.xsd`](bom-1.5.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.6.SNAPSHOT.xsd`](bom-1.6.SNAPSHOT.xsd) | applied changes: 1 |
|
||||
| [`bom-1.2.SNAPSHOT.schema.json`](bom-1.2.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.3.SNAPSHOT.schema.json`](bom-1.3.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.4.SNAPSHOT.schema.json`](bom-1.4.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.5.SNAPSHOT.schema.json`](bom-1.5.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.6.SNAPSHOT.schema.json`](bom-1.6.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.2-strict.SNAPSHOT.schema.json`](bom-1.2-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`bom-1.3-strict.SNAPSHOT.schema.json`](bom-1.3-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
|
||||
| [`spdx.SNAPSHOT.xsd`](spdx.SNAPSHOT.xsd) | |
|
||||
| [`spdx.SNAPSHOT.schema.json`](spdx.SNAPSHOT.schema.json) | |
|
||||
| [`jsf-0.82.SNAPSHOT.schema.json`](jsf-0.82.SNAPSHOT.schema.json) | |
|
||||
|
||||
changes:
|
||||
1. `https?://cyclonedx.org/schema/spdx` was replaced with `spdx.SNAPSHOT.xsd`
|
||||
2. `spdx.schema.json` was replaced with `spdx.SNAPSHOT.schema.json`
|
||||
3. `jsf-0.82.schema.json` was replaced with `jsf-0.82.SNAPSHOT.schema.json`
|
||||
4. `properties.$schema.enum` was removed
|
||||
5. `required.version` removed, as it is actually optional with default value
|
||||
@@ -0,0 +1,68 @@
|
||||
# This file is part of CycloneDX Python Library
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
"""
|
||||
Content in here is internal, not for public use.
|
||||
Breaking changes without notice may happen.
|
||||
"""
|
||||
|
||||
|
||||
from os.path import dirname, join
|
||||
from typing import Dict, Optional
|
||||
|
||||
from .. import SchemaVersion
|
||||
|
||||
__DIR = dirname(__file__)
|
||||
|
||||
BOM_XML: Dict[SchemaVersion, Optional[str]] = {
|
||||
SchemaVersion.V1_6: join(__DIR, 'bom-1.6.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_5: join(__DIR, 'bom-1.5.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_4: join(__DIR, 'bom-1.4.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_3: join(__DIR, 'bom-1.3.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_2: join(__DIR, 'bom-1.2.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_1: join(__DIR, 'bom-1.1.SNAPSHOT.xsd'),
|
||||
SchemaVersion.V1_0: join(__DIR, 'bom-1.0.SNAPSHOT.xsd'),
|
||||
}
|
||||
|
||||
BOM_JSON: Dict[SchemaVersion, Optional[str]] = {
|
||||
SchemaVersion.V1_6: join(__DIR, 'bom-1.6.SNAPSHOT.schema.json'),
|
||||
SchemaVersion.V1_5: join(__DIR, 'bom-1.5.SNAPSHOT.schema.json'),
|
||||
SchemaVersion.V1_4: join(__DIR, 'bom-1.4.SNAPSHOT.schema.json'),
|
||||
SchemaVersion.V1_3: join(__DIR, 'bom-1.3.SNAPSHOT.schema.json'),
|
||||
SchemaVersion.V1_2: join(__DIR, 'bom-1.2.SNAPSHOT.schema.json'),
|
||||
# <= v1.1 is not defined in JSON
|
||||
SchemaVersion.V1_1: None,
|
||||
SchemaVersion.V1_0: None,
|
||||
}
|
||||
|
||||
BOM_JSON_STRICT: Dict[SchemaVersion, Optional[str]] = {
|
||||
SchemaVersion.V1_6: BOM_JSON[SchemaVersion.V1_6],
|
||||
SchemaVersion.V1_5: BOM_JSON[SchemaVersion.V1_5],
|
||||
SchemaVersion.V1_4: BOM_JSON[SchemaVersion.V1_4],
|
||||
# <= 1.3 need special files
|
||||
SchemaVersion.V1_3: join(__DIR, 'bom-1.3-strict.SNAPSHOT.schema.json'),
|
||||
SchemaVersion.V1_2: join(__DIR, 'bom-1.2-strict.SNAPSHOT.schema.json'),
|
||||
# <= v1.1 is not defined in JSON
|
||||
SchemaVersion.V1_1: None,
|
||||
SchemaVersion.V1_0: None,
|
||||
}
|
||||
|
||||
SPDX_JSON = join(__DIR, 'spdx.SNAPSHOT.schema.json')
|
||||
SPDX_XML = join(__DIR, 'spdx.SNAPSHOT.xsd')
|
||||
|
||||
JSF = join(__DIR, 'jsf-0.82.SNAPSHOT.schema.json')
|
||||
Binary file not shown.
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
|
||||
xmlns:bom="http://cyclonedx.org/schema/bom/1.0"
|
||||
xmlns:spdx="http://cyclonedx.org/schema/spdx"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://cyclonedx.org/schema/bom/1.0"
|
||||
vc:minVersion="1.0"
|
||||
vc:maxVersion="1.1"
|
||||
version="1.0.1">
|
||||
|
||||
<xs:import namespace="http://cyclonedx.org/schema/spdx" schemaLocation="spdx.SNAPSHOT.xsd"/>
|
||||
|
||||
<xs:complexType name="component">
|
||||
<xs:sequence>
|
||||
<xs:element name="publisher" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The person(s) or organization(s) that published the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="group" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The grouping name or identifier. This will often be a shortened, single
|
||||
name of the company or project that produced the component, or the source package or
|
||||
domain name. Whitespace and special characters should be avoided. Examples include:
|
||||
apache, org.apache.commons, and apache.org.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="name" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The name of the component. This will often be a shortened, single name
|
||||
of the component. Examples: commons-lang3 and jquery</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="version" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component version. The version should ideally comply with semantic versioning
|
||||
but is not enforced.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="description" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies a description for the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="scope" type="bom:scope" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the scope of the component. If scope is not specified, 'runtime'
|
||||
scope will be assumed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="hashes" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="hash" type="bom:hashType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="licenses" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="license">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:choice>
|
||||
<xs:element name="id" type="spdx:licenseId" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A valid SPDX license ID</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If SPDX does not define the license used, this field may be used to provide the license name</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="copyright" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An optional copyright notice informing users of the underlying claims to copyright ownership in a published work.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="cpe" type="bom:cpe" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies a well-formed CPE name. See https://nvd.nist.gov/products/cpe</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="purl" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the package-url (PURL). The purl, if specified, must be valid and conform
|
||||
to the specification defined at: https://github.com/package-url/purl-spec
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="modified" type="xs:boolean" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
A boolean value indicating is the component has been modified from the original.
|
||||
A value of true indicates the component is a derivative of the original.
|
||||
A value of false indicates the component has not been modified from the original.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="components" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies optional sub-components. This is not a dependency tree. It simply provides
|
||||
an optional way to group large sets of components together.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="component" type="bom:component"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" type="bom:classification" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the type of component. Software applications, libraries, frameworks, and
|
||||
other dependencies should be classified as 'application'.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="hashType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the file hash of the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="bom:hashValue">
|
||||
<xs:attribute name="alg" type="bom:hashAlg" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the algorithm used to create hash</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="scope">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component is required for runtime</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="optional">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component is optional at runtime. Optional components are components that
|
||||
are not capable of being called due to them not be installed or otherwise accessible by any means.
|
||||
Components that are installed but due to configuration or other restrictions are prohibited from
|
||||
being called must be scoped as 'required'.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="classification">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="application"/>
|
||||
<xs:enumeration value="framework"/>
|
||||
<xs:enumeration value="library"/>
|
||||
<xs:enumeration value="operating-system"/>
|
||||
<xs:enumeration value="device"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="hashAlg">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="MD5"/>
|
||||
<xs:enumeration value="SHA-1"/>
|
||||
<xs:enumeration value="SHA-256"/>
|
||||
<xs:enumeration value="SHA-384"/>
|
||||
<xs:enumeration value="SHA-512"/>
|
||||
<xs:enumeration value="SHA3-256"/>
|
||||
<xs:enumeration value="SHA3-512"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="hashValue">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:pattern value="([a-fA-F0-9]{32})|([a-fA-F0-9]{40})|([a-fA-F0-9]{64})|([a-fA-F0-9]{96})|([a-fA-F0-9]{128})"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="cpe">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
Define the format for acceptable CPE URIs. Supports CPE 2.2 and CPE 2.3 formats. Refer to https://nvd.nist.gov/products/cpe for official specification.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6})|(cpe:2\.3:[aho\*\-](:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\*\-]))(:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){4})"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:element name="bom">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="components">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="component" type="bom:component"/>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:integer" default="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The version allows component publishers/authors to make changes to existing
|
||||
BOMs to update various aspects of the document such as description or licenses. When a system
|
||||
is presented with multiiple BOMs for the same component, the system should use the most recent
|
||||
version of the BOM. The default version is '1' and should be incremented for each version of the
|
||||
BOM that is published. Each version of a component should have a unique BOM and if no changes are
|
||||
made to the BOMs, then each BOM will have a version of '1'.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,738 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
CycloneDX Software Bill-of-Material (SBoM) Specification
|
||||
|
||||
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.
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
|
||||
xmlns:bom="http://cyclonedx.org/schema/bom/1.1"
|
||||
xmlns:spdx="http://cyclonedx.org/schema/spdx"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://cyclonedx.org/schema/bom/1.1"
|
||||
vc:minVersion="1.0"
|
||||
vc:maxVersion="1.1"
|
||||
version="1.1">
|
||||
|
||||
<xs:import namespace="http://cyclonedx.org/schema/spdx" schemaLocation="spdx.SNAPSHOT.xsd"/>
|
||||
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<name>CycloneDX Software Bill-of-Material Specification</name>
|
||||
<url>https://cyclonedx.org/</url>
|
||||
<license uri="http://www.apache.org/licenses/LICENSE-2.0"
|
||||
version="2.0">Apache License, Version 2.0</license>
|
||||
<authors>
|
||||
<author>Steve Springett</author>
|
||||
</authors>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
|
||||
<xs:simpleType name="refType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Identifier-DataType for interlinked elements.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string" />
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="componentsType">
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="component" type="bom:component"/>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
<xs:anyAttribute namespace="##any" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="component">
|
||||
<xs:sequence>
|
||||
<xs:element name="publisher" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The person(s) or organization(s) that published the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="group" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The grouping name or identifier. This will often be a shortened, single
|
||||
name of the company or project that produced the component, or the source package or
|
||||
domain name. Whitespace and special characters should be avoided. Examples include:
|
||||
apache, org.apache.commons, and apache.org.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="name" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The name of the component. This will often be a shortened, single name
|
||||
of the component. Examples: commons-lang3 and jquery</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="version" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component version. The version should ideally comply with semantic versioning
|
||||
but is not enforced.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="description" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies a description for the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="scope" type="bom:scope" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the scope of the component. If scope is not specified, 'runtime'
|
||||
scope should be assumed by the consumer of the BOM</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="hashes" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="hash" type="bom:hashType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="licenses" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:choice>
|
||||
<xs:element name="license" type="bom:licenseType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="expression" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A valid SPDX license expression.
|
||||
Refer to https://spdx.org/specifications for syntax requirements</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="copyright" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An optional copyright notice informing users of the underlying claims to
|
||||
copyright ownership in a published work.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="cpe" type="bom:cpe" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
DEPRECATED - DO NOT USE. This will be removed in a future version.
|
||||
Specifies a well-formed CPE name. See https://nvd.nist.gov/products/cpe
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="purl" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the package-url (PURL). The purl, if specified, must be valid and conform
|
||||
to the specification defined at: https://github.com/package-url/purl-spec
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="modified" type="xs:boolean" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
DEPRECATED - DO NOT USE. This will be removed in a future version. Use the pedigree
|
||||
element instead to supply information on exactly how the component was modified.
|
||||
A boolean value indicating is the component has been modified from the original.
|
||||
A value of true indicates the component is a derivative of the original.
|
||||
A value of false indicates the component has not been modified from the original.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="pedigree" type="bom:pedigreeType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Component pedigree is a way to document complex supply chain scenarios where components are
|
||||
created, distributed, modified, redistributed, combined with other components, etc.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="externalReferences" type="bom:externalReferences" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Provides the ability to document external references related to the
|
||||
component or to the project the component describes.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="components" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies optional sub-components. This is not a dependency tree. It provides a way
|
||||
to specify a hierarchical representation of component assemblies, similar to
|
||||
system -> subsystem -> parts assembly in physical supply chains.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="component" type="bom:component"/>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" type="bom:classification" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the type of component. For software components, classify as application if no more
|
||||
specific appropriate classification is available or cannot be determined for the component.
|
||||
Valid choices are: application, framework, library, operating-system, device, or file
|
||||
Refer to the bom:classification documentation for information describing each one
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="bom-ref" type="bom:refType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
An optional identifier which can be used to reference the component elsewhere in the BOM.
|
||||
Uniqueness is enforced within all elements and children of the root-level bom element.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute namespace="##any" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="licenseType">
|
||||
<xs:sequence>
|
||||
<xs:choice>
|
||||
<xs:element name="id" type="spdx:licenseId" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A valid SPDX license ID</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If SPDX does not define the license used, this field may be used to provide the license name</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
<xs:element name="text" type="bom:licenseTextType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the optional full text of the license</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The URL to the license file. If specified, a 'license'
|
||||
externalReference should also be specified for completeness.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="licenseTextType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies attributes of the license text</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="content-type" type="xs:normalizedString" default="text/plain">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the content type of the license text. Defaults to text/plain
|
||||
if not specified.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encoding" type="bom:encoding">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Specifies the optional encoding the license text is represented in
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="hashType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the file hash of the component</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="bom:hashValue">
|
||||
<xs:attribute name="alg" type="bom:hashAlg" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the algorithm used to create the hash</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="scope">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component is required for runtime</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="optional">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The component is optional at runtime. Optional components are components that
|
||||
are not capable of being called due to them not be installed or otherwise accessible by any means.
|
||||
Components that are installed but due to configuration or other restrictions are prohibited from
|
||||
being called must be scoped as 'required'.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="excluded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Components that are excluded provide the ability to document component usage
|
||||
for test and other non-runtime purposes. Excluded components are not reachable within a call
|
||||
graph at runtime.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="classification">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="application">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A software application. Refer to https://en.wikipedia.org/wiki/Application_software
|
||||
for information about applications.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="framework">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A software framework. Refer to https://en.wikipedia.org/wiki/Software_framework
|
||||
for information on how frameworks vary slightly from libraries.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="library">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A software library. Refer to https://en.wikipedia.org/wiki/Library_(computing)
|
||||
for information about libraries. All third-party and open source reusable components will likely
|
||||
be a library. If the library also has key features of a framework, then it should be classified
|
||||
as a framework. If not, or is unknown, then specifying library is recommended.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="operating-system">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A software operating system without regard to deployment model
|
||||
(i.e. installed on physical hardware, virtual machine, container image, etc) Refer to
|
||||
https://en.wikipedia.org/wiki/Operating_system</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="device">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A hardware device such as a processor, or chip-set. A hardware device
|
||||
containing firmware should include a component for the physical hardware itself, and another
|
||||
component of type 'application' or 'operating-system' (whichever is relevant), describing
|
||||
information about the firmware.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="file">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A computer file. Refer to https://en.wikipedia.org/wiki/Computer_file
|
||||
for information about files.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="hashAlg">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="MD5"/>
|
||||
<xs:enumeration value="SHA-1"/>
|
||||
<xs:enumeration value="SHA-256"/>
|
||||
<xs:enumeration value="SHA-384"/>
|
||||
<xs:enumeration value="SHA-512"/>
|
||||
<xs:enumeration value="SHA3-256"/>
|
||||
<xs:enumeration value="SHA3-512"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="hashValue">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:pattern value="([a-fA-F0-9]{32})|([a-fA-F0-9]{40})|([a-fA-F0-9]{64})|([a-fA-F0-9]{96})|([a-fA-F0-9]{128})"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="encoding">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="base64"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="cpe">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
Define the format for acceptable CPE URIs. Supports CPE 2.2 and CPE 2.3 formats.
|
||||
Refer to https://nvd.nist.gov/products/cpe for official specification.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6})|(cpe:2\.3:[aho\*\-](:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\*\-]))(:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){4})"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="urnUuid">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
Defines a string representation of a UUID conforming to RFC 4122.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="urn:uuid:([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="externalReferenceType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="vcs">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Version Control System</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="issue-tracker">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Issue or defect tracking system, or an Application Lifecycle Management (ALM) system</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="website">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Website</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="advisories">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Security advisories</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="bom">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Bill-of-material document (CycloneDX, SPDX, SWID, etc)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="mailing-list">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Mailing list or discussion group</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="social">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Social media account</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="chat">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Real-time chat platform</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="documentation">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Documentation, guides, or how-to instructions</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="support">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Community or commercial support</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="distribution">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Direct or repository download location</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="license">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The URL to the license file. If a license URL has been defined in the license
|
||||
node, it should also be defined as an external reference for completeness</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="build-meta">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Build-system specific meta file (i.e. pom.xml, package.json, .nuspec, etc)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="build-system">
|
||||
<xs:annotation>
|
||||
<xs:documentation>URL to an automated build system</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="other">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Use this if no other types accurately describe the purpose of the external reference</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="externalReferences">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
External references provide a way to document systems, sites, and information that may be relevant
|
||||
but which are not included with the BOM.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="reference" type="bom:externalReference">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Zero or more external references can be defined</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="externalReference">
|
||||
<xs:sequence>
|
||||
<xs:element name="url" type="xs:anyURI" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The URL to the external reference</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="comment" type="xs:string" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">An optional comment describing the external reference</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" type="bom:externalReferenceType" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Specifies the type of external reference. There are built-in types to describe common
|
||||
references. If a type does not exist for the reference being referred to, use the "other" type.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute namespace="##any" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="commitsType">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Zero or more commits can be specified.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="commit" type="bom:commitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Specifies an individual commit.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="commitType">
|
||||
<xs:sequence>
|
||||
<xs:element name="uid" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">A unique identifier of the commit. This may be version control
|
||||
specific. For example, Subversion uses revision numbers whereas git uses commit hashes.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The URL to the commit. This URL will typically point to a commit
|
||||
in a version control system.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="author" type="bom:identifiableActionType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The author who created the changes in the commit</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="committer" type="bom:identifiableActionType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The person who committed or pushed the commit</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="message" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The text description of the contents of the commit</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="identifiableActionType">
|
||||
<xs:sequence>
|
||||
<xs:element name="timestamp" type="xs:dateTime" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The timestamp in which the action occurred</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The name of the individual who performed the action</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="email" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">The email address of the individual who performed the action</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="pedigreeType">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
Component pedigree is a way to document complex supply chain scenarios where components are created,
|
||||
distributed, modified, redistributed, combined with other components, etc. Pedigree supports viewing
|
||||
this complex chain from the beginning, the end, or anywhere in the middle. It also provides a way to
|
||||
document variants where the exact relation may not be known.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="ancestors" type="bom:componentsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Describes zero or more components in which a component is derived
|
||||
from. This is commonly used to describe forks from existing projects where the forked version
|
||||
contains a ancestor node containing the original component it was forked from. For example,
|
||||
Component A is the original component. Component B is the component being used and documented
|
||||
in the BOM. However, Component B contains a pedigree node with a single ancestor documenting
|
||||
Component A - the original component from which Component B is derived from.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="descendants" type="bom:componentsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Descendants are the exact opposite of ancestors. This provides a
|
||||
way to document all forks (and their forks) of an original or root component.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="variants" type="bom:componentsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Variants describe relations where the relationship between the
|
||||
components are not known. For example, if Component A contains nearly identical code to
|
||||
Component B. They are both related, but it is unclear if one is derived from the other,
|
||||
or if they share a common ancestor.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="commits" type="bom:commitsType" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">A list of zero or more commits which provide a trail describing
|
||||
how the component deviates from an ancestor, descendant, or variant.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Notes, observations, and other non-structured commentary
|
||||
describing the components pedigree.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="bom">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="components" type="bom:componentsType"/>
|
||||
<xs:element name="externalReferences" type="bom:externalReferences" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Provides the ability to document external references related to the BOM or
|
||||
to the project the BOM describes.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Allows any undeclared elements as long as the elements are placed in a different namespace.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:any>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:integer" default="1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The version allows component publishers/authors to make changes to existing
|
||||
BOMs to update various aspects of the document such as description or licenses. When a system
|
||||
is presented with multiple BOMs for the same component, the system should use the most recent
|
||||
version of the BOM. The default version is '1' and should be incremented for each version of the
|
||||
BOM that is published. Each version of a component should have a unique BOM and if no changes are
|
||||
made to the BOMs, then each BOM will have a version of '1'.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="serialNumber" type="bom:urnUuid">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Every BOM generated should have a unique serial number, even if the contents
|
||||
of the BOM being generated have not changed over time. The process or tool responsible for
|
||||
creating the BOM should create random UUID's for every BOM generated.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:anyAttribute namespace="##any" processContents="lax">
|
||||
<xs:annotation>
|
||||
<xs:documentation>User-defined attributes may be used on this element as long as they
|
||||
do not have the same name as an existing attribute used by the schema.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:anyAttribute>
|
||||
</xs:complexType>
|
||||
<xs:unique name="bom-ref">
|
||||
<xs:selector xpath=".//*"/>
|
||||
<xs:field xpath="@bom-ref"/>
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,240 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "http://cyclonedx.org/schema/jsf-0.82.schema.json",
|
||||
"type": "object",
|
||||
"title": "JSON Signature Format (JSF) standard",
|
||||
"$comment" : "JSON Signature Format schema is published under the terms of the Apache License 2.0. JSF was developed by Anders Rundgren (anders.rundgren.net@gmail.com) as a part of the OpenKeyStore project. This schema supports the entirely of the JSF standard excluding 'extensions'.",
|
||||
"definitions": {
|
||||
"signature": {
|
||||
"type": "object",
|
||||
"title": "Signature",
|
||||
"oneOf": [
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"signers": {
|
||||
"type": "array",
|
||||
"title": "Signature",
|
||||
"description": "Unique top level property for Multiple Signatures. (multisignature)",
|
||||
"items": {"$ref": "#/definitions/signer"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"chain": {
|
||||
"type": "array",
|
||||
"title": "Signature",
|
||||
"description": "Unique top level property for Signature Chains. (signaturechain)",
|
||||
"items": {"$ref": "#/definitions/signer"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Signature",
|
||||
"description": "Unique top level property for simple signatures. (signaturecore)",
|
||||
"$ref": "#/definitions/signer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"signer": {
|
||||
"type": "object",
|
||||
"title": "Signature",
|
||||
"required": [
|
||||
"algorithm",
|
||||
"value"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"algorithm": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"title": "Algorithm",
|
||||
"description": "Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".",
|
||||
"enum": [
|
||||
"RS256",
|
||||
"RS384",
|
||||
"RS512",
|
||||
"PS256",
|
||||
"PS384",
|
||||
"PS512",
|
||||
"ES256",
|
||||
"ES384",
|
||||
"ES512",
|
||||
"Ed25519",
|
||||
"Ed448",
|
||||
"HS256",
|
||||
"HS384",
|
||||
"HS512"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"title": "Algorithm",
|
||||
"description": "Signature algorithm. Note: If proprietary signature algorithms are added, they must be expressed as URIs.",
|
||||
"format": "uri"
|
||||
}
|
||||
]
|
||||
},
|
||||
"keyId": {
|
||||
"type": "string",
|
||||
"title": "Key ID",
|
||||
"description": "Optional. Application specific string identifying the signature key."
|
||||
},
|
||||
"publicKey": {
|
||||
"title": "Public key",
|
||||
"description": "Optional. Public key object.",
|
||||
"$ref": "#/definitions/publicKey"
|
||||
},
|
||||
"certificatePath": {
|
||||
"type": "array",
|
||||
"title": "Certificate path",
|
||||
"description": "Optional. Sorted array of X.509 [RFC5280] certificates, where the first element must contain the signature certificate. The certificate path must be contiguous but is not required to be complete.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"excludes": {
|
||||
"type": "array",
|
||||
"title": "Excludes",
|
||||
"description": "Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the \"excludes\" property itself, must also be excluded from the signature process. Since both the \"excludes\" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"title": "Signature",
|
||||
"description": "The signature data. Note that the binary representation must follow the JWA [RFC7518] specifications."
|
||||
}
|
||||
}
|
||||
},
|
||||
"keyType": {
|
||||
"type": "string",
|
||||
"title": "Key type",
|
||||
"description": "Key type indicator.",
|
||||
"enum": [
|
||||
"EC",
|
||||
"OKP",
|
||||
"RSA"
|
||||
]
|
||||
},
|
||||
"publicKey": {
|
||||
"title": "Public key",
|
||||
"description": "Optional. Public key object.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kty"
|
||||
],
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"kty": {
|
||||
"$ref": "#/definitions/keyType"
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": { "kty": { "const": "EC" } }
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"kty",
|
||||
"crv",
|
||||
"x",
|
||||
"y"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"kty": {
|
||||
"$ref": "#/definitions/keyType"
|
||||
},
|
||||
"crv": {
|
||||
"type": "string",
|
||||
"title": "Curve name",
|
||||
"description": "EC curve name.",
|
||||
"enum": [
|
||||
"P-256",
|
||||
"P-384",
|
||||
"P-521"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"type": "string",
|
||||
"title": "Coordinate",
|
||||
"description": "EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-521\", the decoded argument must be 66 bytes."
|
||||
},
|
||||
"y": {
|
||||
"type": "string",
|
||||
"title": "Coordinate",
|
||||
"description": "EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-256\", the decoded argument must be 32 bytes."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": { "kty": { "const": "OKP" } }
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"kty",
|
||||
"crv",
|
||||
"x"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"kty": {
|
||||
"$ref": "#/definitions/keyType"
|
||||
},
|
||||
"crv": {
|
||||
"type": "string",
|
||||
"title": "Curve name",
|
||||
"description": "EdDSA curve name.",
|
||||
"enum": [
|
||||
"Ed25519",
|
||||
"Ed448"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"type": "string",
|
||||
"title": "Coordinate",
|
||||
"description": "EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"Ed25519\", the decoded argument must be 32 bytes."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": { "kty": { "const": "RSA" } }
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"kty",
|
||||
"n",
|
||||
"e"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"kty": {
|
||||
"$ref": "#/definitions/keyType"
|
||||
},
|
||||
"n": {
|
||||
"type": "string",
|
||||
"title": "Modulus",
|
||||
"description": "RSA modulus."
|
||||
},
|
||||
"e": {
|
||||
"type": "string",
|
||||
"title": "Exponent",
|
||||
"description": "RSA exponent."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,737 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "http://cyclonedx.org/schema/spdx.schema.json",
|
||||
"$comment": "v1.0-3.24.0",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"0BSD",
|
||||
"3D-Slicer-1.0",
|
||||
"AAL",
|
||||
"Abstyles",
|
||||
"AdaCore-doc",
|
||||
"Adobe-2006",
|
||||
"Adobe-Display-PostScript",
|
||||
"Adobe-Glyph",
|
||||
"Adobe-Utopia",
|
||||
"ADSL",
|
||||
"AFL-1.1",
|
||||
"AFL-1.2",
|
||||
"AFL-2.0",
|
||||
"AFL-2.1",
|
||||
"AFL-3.0",
|
||||
"Afmparse",
|
||||
"AGPL-1.0",
|
||||
"AGPL-1.0-only",
|
||||
"AGPL-1.0-or-later",
|
||||
"AGPL-3.0",
|
||||
"AGPL-3.0-only",
|
||||
"AGPL-3.0-or-later",
|
||||
"Aladdin",
|
||||
"AMD-newlib",
|
||||
"AMDPLPA",
|
||||
"AML",
|
||||
"AML-glslang",
|
||||
"AMPAS",
|
||||
"ANTLR-PD",
|
||||
"ANTLR-PD-fallback",
|
||||
"any-OSI",
|
||||
"Apache-1.0",
|
||||
"Apache-1.1",
|
||||
"Apache-2.0",
|
||||
"APAFML",
|
||||
"APL-1.0",
|
||||
"App-s2p",
|
||||
"APSL-1.0",
|
||||
"APSL-1.1",
|
||||
"APSL-1.2",
|
||||
"APSL-2.0",
|
||||
"Arphic-1999",
|
||||
"Artistic-1.0",
|
||||
"Artistic-1.0-cl8",
|
||||
"Artistic-1.0-Perl",
|
||||
"Artistic-2.0",
|
||||
"ASWF-Digital-Assets-1.0",
|
||||
"ASWF-Digital-Assets-1.1",
|
||||
"Baekmuk",
|
||||
"Bahyph",
|
||||
"Barr",
|
||||
"bcrypt-Solar-Designer",
|
||||
"Beerware",
|
||||
"Bitstream-Charter",
|
||||
"Bitstream-Vera",
|
||||
"BitTorrent-1.0",
|
||||
"BitTorrent-1.1",
|
||||
"blessing",
|
||||
"BlueOak-1.0.0",
|
||||
"Boehm-GC",
|
||||
"Borceux",
|
||||
"Brian-Gladman-2-Clause",
|
||||
"Brian-Gladman-3-Clause",
|
||||
"BSD-1-Clause",
|
||||
"BSD-2-Clause",
|
||||
"BSD-2-Clause-Darwin",
|
||||
"BSD-2-Clause-first-lines",
|
||||
"BSD-2-Clause-FreeBSD",
|
||||
"BSD-2-Clause-NetBSD",
|
||||
"BSD-2-Clause-Patent",
|
||||
"BSD-2-Clause-Views",
|
||||
"BSD-3-Clause",
|
||||
"BSD-3-Clause-acpica",
|
||||
"BSD-3-Clause-Attribution",
|
||||
"BSD-3-Clause-Clear",
|
||||
"BSD-3-Clause-flex",
|
||||
"BSD-3-Clause-HP",
|
||||
"BSD-3-Clause-LBNL",
|
||||
"BSD-3-Clause-Modification",
|
||||
"BSD-3-Clause-No-Military-License",
|
||||
"BSD-3-Clause-No-Nuclear-License",
|
||||
"BSD-3-Clause-No-Nuclear-License-2014",
|
||||
"BSD-3-Clause-No-Nuclear-Warranty",
|
||||
"BSD-3-Clause-Open-MPI",
|
||||
"BSD-3-Clause-Sun",
|
||||
"BSD-4-Clause",
|
||||
"BSD-4-Clause-Shortened",
|
||||
"BSD-4-Clause-UC",
|
||||
"BSD-4.3RENO",
|
||||
"BSD-4.3TAHOE",
|
||||
"BSD-Advertising-Acknowledgement",
|
||||
"BSD-Attribution-HPND-disclaimer",
|
||||
"BSD-Inferno-Nettverk",
|
||||
"BSD-Protection",
|
||||
"BSD-Source-beginning-file",
|
||||
"BSD-Source-Code",
|
||||
"BSD-Systemics",
|
||||
"BSD-Systemics-W3Works",
|
||||
"BSL-1.0",
|
||||
"BUSL-1.1",
|
||||
"bzip2-1.0.5",
|
||||
"bzip2-1.0.6",
|
||||
"C-UDA-1.0",
|
||||
"CAL-1.0",
|
||||
"CAL-1.0-Combined-Work-Exception",
|
||||
"Caldera",
|
||||
"Caldera-no-preamble",
|
||||
"Catharon",
|
||||
"CATOSL-1.1",
|
||||
"CC-BY-1.0",
|
||||
"CC-BY-2.0",
|
||||
"CC-BY-2.5",
|
||||
"CC-BY-2.5-AU",
|
||||
"CC-BY-3.0",
|
||||
"CC-BY-3.0-AT",
|
||||
"CC-BY-3.0-AU",
|
||||
"CC-BY-3.0-DE",
|
||||
"CC-BY-3.0-IGO",
|
||||
"CC-BY-3.0-NL",
|
||||
"CC-BY-3.0-US",
|
||||
"CC-BY-4.0",
|
||||
"CC-BY-NC-1.0",
|
||||
"CC-BY-NC-2.0",
|
||||
"CC-BY-NC-2.5",
|
||||
"CC-BY-NC-3.0",
|
||||
"CC-BY-NC-3.0-DE",
|
||||
"CC-BY-NC-4.0",
|
||||
"CC-BY-NC-ND-1.0",
|
||||
"CC-BY-NC-ND-2.0",
|
||||
"CC-BY-NC-ND-2.5",
|
||||
"CC-BY-NC-ND-3.0",
|
||||
"CC-BY-NC-ND-3.0-DE",
|
||||
"CC-BY-NC-ND-3.0-IGO",
|
||||
"CC-BY-NC-ND-4.0",
|
||||
"CC-BY-NC-SA-1.0",
|
||||
"CC-BY-NC-SA-2.0",
|
||||
"CC-BY-NC-SA-2.0-DE",
|
||||
"CC-BY-NC-SA-2.0-FR",
|
||||
"CC-BY-NC-SA-2.0-UK",
|
||||
"CC-BY-NC-SA-2.5",
|
||||
"CC-BY-NC-SA-3.0",
|
||||
"CC-BY-NC-SA-3.0-DE",
|
||||
"CC-BY-NC-SA-3.0-IGO",
|
||||
"CC-BY-NC-SA-4.0",
|
||||
"CC-BY-ND-1.0",
|
||||
"CC-BY-ND-2.0",
|
||||
"CC-BY-ND-2.5",
|
||||
"CC-BY-ND-3.0",
|
||||
"CC-BY-ND-3.0-DE",
|
||||
"CC-BY-ND-4.0",
|
||||
"CC-BY-SA-1.0",
|
||||
"CC-BY-SA-2.0",
|
||||
"CC-BY-SA-2.0-UK",
|
||||
"CC-BY-SA-2.1-JP",
|
||||
"CC-BY-SA-2.5",
|
||||
"CC-BY-SA-3.0",
|
||||
"CC-BY-SA-3.0-AT",
|
||||
"CC-BY-SA-3.0-DE",
|
||||
"CC-BY-SA-3.0-IGO",
|
||||
"CC-BY-SA-4.0",
|
||||
"CC-PDDC",
|
||||
"CC0-1.0",
|
||||
"CDDL-1.0",
|
||||
"CDDL-1.1",
|
||||
"CDL-1.0",
|
||||
"CDLA-Permissive-1.0",
|
||||
"CDLA-Permissive-2.0",
|
||||
"CDLA-Sharing-1.0",
|
||||
"CECILL-1.0",
|
||||
"CECILL-1.1",
|
||||
"CECILL-2.0",
|
||||
"CECILL-2.1",
|
||||
"CECILL-B",
|
||||
"CECILL-C",
|
||||
"CERN-OHL-1.1",
|
||||
"CERN-OHL-1.2",
|
||||
"CERN-OHL-P-2.0",
|
||||
"CERN-OHL-S-2.0",
|
||||
"CERN-OHL-W-2.0",
|
||||
"CFITSIO",
|
||||
"check-cvs",
|
||||
"checkmk",
|
||||
"ClArtistic",
|
||||
"Clips",
|
||||
"CMU-Mach",
|
||||
"CMU-Mach-nodoc",
|
||||
"CNRI-Jython",
|
||||
"CNRI-Python",
|
||||
"CNRI-Python-GPL-Compatible",
|
||||
"COIL-1.0",
|
||||
"Community-Spec-1.0",
|
||||
"Condor-1.1",
|
||||
"copyleft-next-0.3.0",
|
||||
"copyleft-next-0.3.1",
|
||||
"Cornell-Lossless-JPEG",
|
||||
"CPAL-1.0",
|
||||
"CPL-1.0",
|
||||
"CPOL-1.02",
|
||||
"Cronyx",
|
||||
"Crossword",
|
||||
"CrystalStacker",
|
||||
"CUA-OPL-1.0",
|
||||
"Cube",
|
||||
"curl",
|
||||
"cve-tou",
|
||||
"D-FSL-1.0",
|
||||
"DEC-3-Clause",
|
||||
"diffmark",
|
||||
"DL-DE-BY-2.0",
|
||||
"DL-DE-ZERO-2.0",
|
||||
"DOC",
|
||||
"Dotseqn",
|
||||
"DRL-1.0",
|
||||
"DRL-1.1",
|
||||
"DSDP",
|
||||
"dtoa",
|
||||
"dvipdfm",
|
||||
"ECL-1.0",
|
||||
"ECL-2.0",
|
||||
"eCos-2.0",
|
||||
"EFL-1.0",
|
||||
"EFL-2.0",
|
||||
"eGenix",
|
||||
"Elastic-2.0",
|
||||
"Entessa",
|
||||
"EPICS",
|
||||
"EPL-1.0",
|
||||
"EPL-2.0",
|
||||
"ErlPL-1.1",
|
||||
"etalab-2.0",
|
||||
"EUDatagrid",
|
||||
"EUPL-1.0",
|
||||
"EUPL-1.1",
|
||||
"EUPL-1.2",
|
||||
"Eurosym",
|
||||
"Fair",
|
||||
"FBM",
|
||||
"FDK-AAC",
|
||||
"Ferguson-Twofish",
|
||||
"Frameworx-1.0",
|
||||
"FreeBSD-DOC",
|
||||
"FreeImage",
|
||||
"FSFAP",
|
||||
"FSFAP-no-warranty-disclaimer",
|
||||
"FSFUL",
|
||||
"FSFULLR",
|
||||
"FSFULLRWD",
|
||||
"FTL",
|
||||
"Furuseth",
|
||||
"fwlw",
|
||||
"GCR-docs",
|
||||
"GD",
|
||||
"GFDL-1.1",
|
||||
"GFDL-1.1-invariants-only",
|
||||
"GFDL-1.1-invariants-or-later",
|
||||
"GFDL-1.1-no-invariants-only",
|
||||
"GFDL-1.1-no-invariants-or-later",
|
||||
"GFDL-1.1-only",
|
||||
"GFDL-1.1-or-later",
|
||||
"GFDL-1.2",
|
||||
"GFDL-1.2-invariants-only",
|
||||
"GFDL-1.2-invariants-or-later",
|
||||
"GFDL-1.2-no-invariants-only",
|
||||
"GFDL-1.2-no-invariants-or-later",
|
||||
"GFDL-1.2-only",
|
||||
"GFDL-1.2-or-later",
|
||||
"GFDL-1.3",
|
||||
"GFDL-1.3-invariants-only",
|
||||
"GFDL-1.3-invariants-or-later",
|
||||
"GFDL-1.3-no-invariants-only",
|
||||
"GFDL-1.3-no-invariants-or-later",
|
||||
"GFDL-1.3-only",
|
||||
"GFDL-1.3-or-later",
|
||||
"Giftware",
|
||||
"GL2PS",
|
||||
"Glide",
|
||||
"Glulxe",
|
||||
"GLWTPL",
|
||||
"gnuplot",
|
||||
"GPL-1.0",
|
||||
"GPL-1.0+",
|
||||
"GPL-1.0-only",
|
||||
"GPL-1.0-or-later",
|
||||
"GPL-2.0",
|
||||
"GPL-2.0+",
|
||||
"GPL-2.0-only",
|
||||
"GPL-2.0-or-later",
|
||||
"GPL-2.0-with-autoconf-exception",
|
||||
"GPL-2.0-with-bison-exception",
|
||||
"GPL-2.0-with-classpath-exception",
|
||||
"GPL-2.0-with-font-exception",
|
||||
"GPL-2.0-with-GCC-exception",
|
||||
"GPL-3.0",
|
||||
"GPL-3.0+",
|
||||
"GPL-3.0-only",
|
||||
"GPL-3.0-or-later",
|
||||
"GPL-3.0-with-autoconf-exception",
|
||||
"GPL-3.0-with-GCC-exception",
|
||||
"Graphics-Gems",
|
||||
"gSOAP-1.3b",
|
||||
"gtkbook",
|
||||
"Gutmann",
|
||||
"HaskellReport",
|
||||
"hdparm",
|
||||
"Hippocratic-2.1",
|
||||
"HP-1986",
|
||||
"HP-1989",
|
||||
"HPND",
|
||||
"HPND-DEC",
|
||||
"HPND-doc",
|
||||
"HPND-doc-sell",
|
||||
"HPND-export-US",
|
||||
"HPND-export-US-acknowledgement",
|
||||
"HPND-export-US-modify",
|
||||
"HPND-export2-US",
|
||||
"HPND-Fenneberg-Livingston",
|
||||
"HPND-INRIA-IMAG",
|
||||
"HPND-Intel",
|
||||
"HPND-Kevlin-Henney",
|
||||
"HPND-Markus-Kuhn",
|
||||
"HPND-merchantability-variant",
|
||||
"HPND-MIT-disclaimer",
|
||||
"HPND-Pbmplus",
|
||||
"HPND-sell-MIT-disclaimer-xserver",
|
||||
"HPND-sell-regexpr",
|
||||
"HPND-sell-variant",
|
||||
"HPND-sell-variant-MIT-disclaimer",
|
||||
"HPND-sell-variant-MIT-disclaimer-rev",
|
||||
"HPND-UC",
|
||||
"HPND-UC-export-US",
|
||||
"HTMLTIDY",
|
||||
"IBM-pibs",
|
||||
"ICU",
|
||||
"IEC-Code-Components-EULA",
|
||||
"IJG",
|
||||
"IJG-short",
|
||||
"ImageMagick",
|
||||
"iMatix",
|
||||
"Imlib2",
|
||||
"Info-ZIP",
|
||||
"Inner-Net-2.0",
|
||||
"Intel",
|
||||
"Intel-ACPI",
|
||||
"Interbase-1.0",
|
||||
"IPA",
|
||||
"IPL-1.0",
|
||||
"ISC",
|
||||
"ISC-Veillard",
|
||||
"Jam",
|
||||
"JasPer-2.0",
|
||||
"JPL-image",
|
||||
"JPNIC",
|
||||
"JSON",
|
||||
"Kastrup",
|
||||
"Kazlib",
|
||||
"Knuth-CTAN",
|
||||
"LAL-1.2",
|
||||
"LAL-1.3",
|
||||
"Latex2e",
|
||||
"Latex2e-translated-notice",
|
||||
"Leptonica",
|
||||
"LGPL-2.0",
|
||||
"LGPL-2.0+",
|
||||
"LGPL-2.0-only",
|
||||
"LGPL-2.0-or-later",
|
||||
"LGPL-2.1",
|
||||
"LGPL-2.1+",
|
||||
"LGPL-2.1-only",
|
||||
"LGPL-2.1-or-later",
|
||||
"LGPL-3.0",
|
||||
"LGPL-3.0+",
|
||||
"LGPL-3.0-only",
|
||||
"LGPL-3.0-or-later",
|
||||
"LGPLLR",
|
||||
"Libpng",
|
||||
"libpng-2.0",
|
||||
"libselinux-1.0",
|
||||
"libtiff",
|
||||
"libutil-David-Nugent",
|
||||
"LiLiQ-P-1.1",
|
||||
"LiLiQ-R-1.1",
|
||||
"LiLiQ-Rplus-1.1",
|
||||
"Linux-man-pages-1-para",
|
||||
"Linux-man-pages-copyleft",
|
||||
"Linux-man-pages-copyleft-2-para",
|
||||
"Linux-man-pages-copyleft-var",
|
||||
"Linux-OpenIB",
|
||||
"LOOP",
|
||||
"LPD-document",
|
||||
"LPL-1.0",
|
||||
"LPL-1.02",
|
||||
"LPPL-1.0",
|
||||
"LPPL-1.1",
|
||||
"LPPL-1.2",
|
||||
"LPPL-1.3a",
|
||||
"LPPL-1.3c",
|
||||
"lsof",
|
||||
"Lucida-Bitmap-Fonts",
|
||||
"LZMA-SDK-9.11-to-9.20",
|
||||
"LZMA-SDK-9.22",
|
||||
"Mackerras-3-Clause",
|
||||
"Mackerras-3-Clause-acknowledgment",
|
||||
"magaz",
|
||||
"mailprio",
|
||||
"MakeIndex",
|
||||
"Martin-Birgmeier",
|
||||
"McPhee-slideshow",
|
||||
"metamail",
|
||||
"Minpack",
|
||||
"MirOS",
|
||||
"MIT",
|
||||
"MIT-0",
|
||||
"MIT-advertising",
|
||||
"MIT-CMU",
|
||||
"MIT-enna",
|
||||
"MIT-feh",
|
||||
"MIT-Festival",
|
||||
"MIT-Khronos-old",
|
||||
"MIT-Modern-Variant",
|
||||
"MIT-open-group",
|
||||
"MIT-testregex",
|
||||
"MIT-Wu",
|
||||
"MITNFA",
|
||||
"MMIXware",
|
||||
"Motosoto",
|
||||
"MPEG-SSG",
|
||||
"mpi-permissive",
|
||||
"mpich2",
|
||||
"MPL-1.0",
|
||||
"MPL-1.1",
|
||||
"MPL-2.0",
|
||||
"MPL-2.0-no-copyleft-exception",
|
||||
"mplus",
|
||||
"MS-LPL",
|
||||
"MS-PL",
|
||||
"MS-RL",
|
||||
"MTLL",
|
||||
"MulanPSL-1.0",
|
||||
"MulanPSL-2.0",
|
||||
"Multics",
|
||||
"Mup",
|
||||
"NAIST-2003",
|
||||
"NASA-1.3",
|
||||
"Naumen",
|
||||
"NBPL-1.0",
|
||||
"NCBI-PD",
|
||||
"NCGL-UK-2.0",
|
||||
"NCL",
|
||||
"NCSA",
|
||||
"Net-SNMP",
|
||||
"NetCDF",
|
||||
"Newsletr",
|
||||
"NGPL",
|
||||
"NICTA-1.0",
|
||||
"NIST-PD",
|
||||
"NIST-PD-fallback",
|
||||
"NIST-Software",
|
||||
"NLOD-1.0",
|
||||
"NLOD-2.0",
|
||||
"NLPL",
|
||||
"Nokia",
|
||||
"NOSL",
|
||||
"Noweb",
|
||||
"NPL-1.0",
|
||||
"NPL-1.1",
|
||||
"NPOSL-3.0",
|
||||
"NRL",
|
||||
"NTP",
|
||||
"NTP-0",
|
||||
"Nunit",
|
||||
"O-UDA-1.0",
|
||||
"OAR",
|
||||
"OCCT-PL",
|
||||
"OCLC-2.0",
|
||||
"ODbL-1.0",
|
||||
"ODC-By-1.0",
|
||||
"OFFIS",
|
||||
"OFL-1.0",
|
||||
"OFL-1.0-no-RFN",
|
||||
"OFL-1.0-RFN",
|
||||
"OFL-1.1",
|
||||
"OFL-1.1-no-RFN",
|
||||
"OFL-1.1-RFN",
|
||||
"OGC-1.0",
|
||||
"OGDL-Taiwan-1.0",
|
||||
"OGL-Canada-2.0",
|
||||
"OGL-UK-1.0",
|
||||
"OGL-UK-2.0",
|
||||
"OGL-UK-3.0",
|
||||
"OGTSL",
|
||||
"OLDAP-1.1",
|
||||
"OLDAP-1.2",
|
||||
"OLDAP-1.3",
|
||||
"OLDAP-1.4",
|
||||
"OLDAP-2.0",
|
||||
"OLDAP-2.0.1",
|
||||
"OLDAP-2.1",
|
||||
"OLDAP-2.2",
|
||||
"OLDAP-2.2.1",
|
||||
"OLDAP-2.2.2",
|
||||
"OLDAP-2.3",
|
||||
"OLDAP-2.4",
|
||||
"OLDAP-2.5",
|
||||
"OLDAP-2.6",
|
||||
"OLDAP-2.7",
|
||||
"OLDAP-2.8",
|
||||
"OLFL-1.3",
|
||||
"OML",
|
||||
"OpenPBS-2.3",
|
||||
"OpenSSL",
|
||||
"OpenSSL-standalone",
|
||||
"OpenVision",
|
||||
"OPL-1.0",
|
||||
"OPL-UK-3.0",
|
||||
"OPUBL-1.0",
|
||||
"OSET-PL-2.1",
|
||||
"OSL-1.0",
|
||||
"OSL-1.1",
|
||||
"OSL-2.0",
|
||||
"OSL-2.1",
|
||||
"OSL-3.0",
|
||||
"PADL",
|
||||
"Parity-6.0.0",
|
||||
"Parity-7.0.0",
|
||||
"PDDL-1.0",
|
||||
"PHP-3.0",
|
||||
"PHP-3.01",
|
||||
"Pixar",
|
||||
"pkgconf",
|
||||
"Plexus",
|
||||
"pnmstitch",
|
||||
"PolyForm-Noncommercial-1.0.0",
|
||||
"PolyForm-Small-Business-1.0.0",
|
||||
"PostgreSQL",
|
||||
"PPL",
|
||||
"PSF-2.0",
|
||||
"psfrag",
|
||||
"psutils",
|
||||
"Python-2.0",
|
||||
"Python-2.0.1",
|
||||
"python-ldap",
|
||||
"Qhull",
|
||||
"QPL-1.0",
|
||||
"QPL-1.0-INRIA-2004",
|
||||
"radvd",
|
||||
"Rdisc",
|
||||
"RHeCos-1.1",
|
||||
"RPL-1.1",
|
||||
"RPL-1.5",
|
||||
"RPSL-1.0",
|
||||
"RSA-MD",
|
||||
"RSCPL",
|
||||
"Ruby",
|
||||
"SAX-PD",
|
||||
"SAX-PD-2.0",
|
||||
"Saxpath",
|
||||
"SCEA",
|
||||
"SchemeReport",
|
||||
"Sendmail",
|
||||
"Sendmail-8.23",
|
||||
"SGI-B-1.0",
|
||||
"SGI-B-1.1",
|
||||
"SGI-B-2.0",
|
||||
"SGI-OpenGL",
|
||||
"SGP4",
|
||||
"SHL-0.5",
|
||||
"SHL-0.51",
|
||||
"SimPL-2.0",
|
||||
"SISSL",
|
||||
"SISSL-1.2",
|
||||
"SL",
|
||||
"Sleepycat",
|
||||
"SMLNJ",
|
||||
"SMPPL",
|
||||
"SNIA",
|
||||
"snprintf",
|
||||
"softSurfer",
|
||||
"Soundex",
|
||||
"Spencer-86",
|
||||
"Spencer-94",
|
||||
"Spencer-99",
|
||||
"SPL-1.0",
|
||||
"ssh-keyscan",
|
||||
"SSH-OpenSSH",
|
||||
"SSH-short",
|
||||
"SSLeay-standalone",
|
||||
"SSPL-1.0",
|
||||
"StandardML-NJ",
|
||||
"SugarCRM-1.1.3",
|
||||
"Sun-PPP",
|
||||
"Sun-PPP-2000",
|
||||
"SunPro",
|
||||
"SWL",
|
||||
"swrule",
|
||||
"Symlinks",
|
||||
"TAPR-OHL-1.0",
|
||||
"TCL",
|
||||
"TCP-wrappers",
|
||||
"TermReadKey",
|
||||
"TGPPL-1.0",
|
||||
"threeparttable",
|
||||
"TMate",
|
||||
"TORQUE-1.1",
|
||||
"TOSL",
|
||||
"TPDL",
|
||||
"TPL-1.0",
|
||||
"TTWL",
|
||||
"TTYP0",
|
||||
"TU-Berlin-1.0",
|
||||
"TU-Berlin-2.0",
|
||||
"UCAR",
|
||||
"UCL-1.0",
|
||||
"ulem",
|
||||
"UMich-Merit",
|
||||
"Unicode-3.0",
|
||||
"Unicode-DFS-2015",
|
||||
"Unicode-DFS-2016",
|
||||
"Unicode-TOU",
|
||||
"UnixCrypt",
|
||||
"Unlicense",
|
||||
"UPL-1.0",
|
||||
"URT-RLE",
|
||||
"Vim",
|
||||
"VOSTROM",
|
||||
"VSL-1.0",
|
||||
"W3C",
|
||||
"W3C-19980720",
|
||||
"W3C-20150513",
|
||||
"w3m",
|
||||
"Watcom-1.0",
|
||||
"Widget-Workshop",
|
||||
"Wsuipa",
|
||||
"WTFPL",
|
||||
"wxWindows",
|
||||
"X11",
|
||||
"X11-distribute-modifications-variant",
|
||||
"Xdebug-1.03",
|
||||
"Xerox",
|
||||
"Xfig",
|
||||
"XFree86-1.1",
|
||||
"xinetd",
|
||||
"xkeyboard-config-Zinoviev",
|
||||
"xlock",
|
||||
"Xnet",
|
||||
"xpp",
|
||||
"XSkat",
|
||||
"xzoom",
|
||||
"YPL-1.0",
|
||||
"YPL-1.1",
|
||||
"Zed",
|
||||
"Zeeff",
|
||||
"Zend-2.0",
|
||||
"Zimbra-1.3",
|
||||
"Zimbra-1.4",
|
||||
"Zlib",
|
||||
"zlib-acknowledgement",
|
||||
"ZPL-1.1",
|
||||
"ZPL-2.0",
|
||||
"ZPL-2.1",
|
||||
"389-exception",
|
||||
"Asterisk-exception",
|
||||
"Asterisk-linking-protocols-exception",
|
||||
"Autoconf-exception-2.0",
|
||||
"Autoconf-exception-3.0",
|
||||
"Autoconf-exception-generic",
|
||||
"Autoconf-exception-generic-3.0",
|
||||
"Autoconf-exception-macro",
|
||||
"Bison-exception-1.24",
|
||||
"Bison-exception-2.2",
|
||||
"Bootloader-exception",
|
||||
"Classpath-exception-2.0",
|
||||
"CLISP-exception-2.0",
|
||||
"cryptsetup-OpenSSL-exception",
|
||||
"DigiRule-FOSS-exception",
|
||||
"eCos-exception-2.0",
|
||||
"Fawkes-Runtime-exception",
|
||||
"FLTK-exception",
|
||||
"fmt-exception",
|
||||
"Font-exception-2.0",
|
||||
"freertos-exception-2.0",
|
||||
"GCC-exception-2.0",
|
||||
"GCC-exception-2.0-note",
|
||||
"GCC-exception-3.1",
|
||||
"Gmsh-exception",
|
||||
"GNAT-exception",
|
||||
"GNOME-examples-exception",
|
||||
"GNU-compiler-exception",
|
||||
"gnu-javamail-exception",
|
||||
"GPL-3.0-interface-exception",
|
||||
"GPL-3.0-linking-exception",
|
||||
"GPL-3.0-linking-source-exception",
|
||||
"GPL-CC-1.0",
|
||||
"GStreamer-exception-2005",
|
||||
"GStreamer-exception-2008",
|
||||
"i2p-gpl-java-exception",
|
||||
"KiCad-libraries-exception",
|
||||
"LGPL-3.0-linking-exception",
|
||||
"libpri-OpenH323-exception",
|
||||
"Libtool-exception",
|
||||
"Linux-syscall-note",
|
||||
"LLGPL",
|
||||
"LLVM-exception",
|
||||
"LZMA-exception",
|
||||
"mif-exception",
|
||||
"Nokia-Qt-exception-1.1",
|
||||
"OCaml-LGPL-linking-exception",
|
||||
"OCCT-exception-1.0",
|
||||
"OpenJDK-assembly-exception-1.0",
|
||||
"openvpn-openssl-exception",
|
||||
"PCRE2-exception",
|
||||
"PS-or-PDF-font-exception-20170817",
|
||||
"QPL-1.0-INRIA-2004-exception",
|
||||
"Qt-GPL-exception-1.0",
|
||||
"Qt-LGPL-exception-1.1",
|
||||
"Qwt-exception-1.0",
|
||||
"RRDtool-FLOSS-exception-2.0",
|
||||
"SANE-exception",
|
||||
"SHL-2.0",
|
||||
"SHL-2.1",
|
||||
"stunnel-exception",
|
||||
"SWI-exception",
|
||||
"Swift-exception",
|
||||
"Texinfo-exception",
|
||||
"u-boot-exception-2.0",
|
||||
"UBDL-exception",
|
||||
"Universal-FOSS-exception-1.0",
|
||||
"vsftpd-openssl-exception",
|
||||
"WxWindows-exception-3.1",
|
||||
"x11vnc-openssl-exception"
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,94 @@
|
||||
# This file is part of CycloneDX Python Library
|
||||
#
|
||||
# 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.
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Dict, Literal, Type
|
||||
|
||||
from py_serializable import ViewType
|
||||
|
||||
from . import SchemaVersion
|
||||
|
||||
|
||||
class BaseSchemaVersion(ABC, ViewType):
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def schema_version_enum(self) -> SchemaVersion:
|
||||
... # pragma: no cover
|
||||
|
||||
def get_schema_version(self) -> str:
|
||||
return self.schema_version_enum.to_version()
|
||||
|
||||
|
||||
class SchemaVersion1Dot6(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_6]:
|
||||
return SchemaVersion.V1_6
|
||||
|
||||
|
||||
class SchemaVersion1Dot5(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_5]:
|
||||
return SchemaVersion.V1_5
|
||||
|
||||
|
||||
class SchemaVersion1Dot4(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_4]:
|
||||
return SchemaVersion.V1_4
|
||||
|
||||
|
||||
class SchemaVersion1Dot3(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_3]:
|
||||
return SchemaVersion.V1_3
|
||||
|
||||
|
||||
class SchemaVersion1Dot2(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_2]:
|
||||
return SchemaVersion.V1_2
|
||||
|
||||
|
||||
class SchemaVersion1Dot1(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_1]:
|
||||
return SchemaVersion.V1_1
|
||||
|
||||
|
||||
class SchemaVersion1Dot0(BaseSchemaVersion):
|
||||
|
||||
@property
|
||||
def schema_version_enum(self) -> Literal[SchemaVersion.V1_0]:
|
||||
return SchemaVersion.V1_0
|
||||
|
||||
|
||||
SCHEMA_VERSIONS: Dict[SchemaVersion, Type[BaseSchemaVersion]] = {
|
||||
SchemaVersion.V1_6: SchemaVersion1Dot6,
|
||||
SchemaVersion.V1_5: SchemaVersion1Dot5,
|
||||
SchemaVersion.V1_4: SchemaVersion1Dot4,
|
||||
SchemaVersion.V1_3: SchemaVersion1Dot3,
|
||||
SchemaVersion.V1_2: SchemaVersion1Dot2,
|
||||
SchemaVersion.V1_1: SchemaVersion1Dot1,
|
||||
SchemaVersion.V1_0: SchemaVersion1Dot0,
|
||||
}
|
||||
Reference in New Issue
Block a user