Skip to content

Commit f770797

Browse files
authored
feat: basic support CycloneDX v1.6 (#1041)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 0a2a8e5 commit f770797

File tree

191 files changed

+26429
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+26429
-43
lines changed

.eslintignore

+6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
/dist/**
66
/dist.*/**
77
/docs/api/**
8+
/docs/_build/**
9+
/docs/.venv/**
810
/examples/**/dist/**
911

1012

1113
!/src/**
1214
!/libs/**
1315

1416
!/tools/schema-downloader/**
17+
18+
19+
**/.idea/**
20+
**/.vscode/**

HISTORY.md

+19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ All notable changes to this project will be documented in this file.
66

77
<!-- add unreleased items here -->
88

9+
Added support for [_CycloneDX_ Specification-1.6](https://github.com/CycloneDX/specification/releases/tag/1.6).
10+
11+
* Changed
12+
* Normalizers support _CycloneDX_ Specification-1.6 ([#1039] via [#1041])
13+
* Validators support _CycloneDX_ Specification-1.6 ([#1039] via [#1041])
14+
* Added
15+
* Existing `Enums` got the new members and values for _CycloneDX_ Specification-1.6 ([#1039] via [#1041])
16+
* `Enums.ComponentType.CryptographicAsset`
17+
* `Enums.ExternalReferenceType.SourceDistribution`
18+
* `Enums.ExternalReferenceType.ElectronicSignature`
19+
* `Enums.ExternalReferenceType.DigitalSignature`
20+
* `Enums.ExternalReferenceType.RFC9116`
21+
* Namespace `Spec` was enhanced for _CycloneDX_ Specification-1.6 ([#1039] via [#1041])
22+
* `Spec.Spec1dot6`
23+
* `Spec.Version.v1dot6`
24+
25+
[#1039]: https://github.com/CycloneDX/cyclonedx-javascript-library/issues/1039
26+
[#1041]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1041
27+
928
## 6.4.2 -- 2024-03-21
1029

1130
* Build

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ written in _TypeScript_ and compiled for the target.
8282
* Builders for the following use cases:
8383
* Specific to _Node.js_: create deep data models `Tool` or `Component` from PackageJson-like data structures
8484
* Implementation of the [_CycloneDX_ Specification][CycloneDX-spec] for the following versions:
85+
* `1.6`
8586
* `1.5`
8687
* `1.4`
8788
* `1.3`

examples/node/javascript/example.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

examples/node/javascript/example.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

examples/node/typescript/example.cjs/src/example.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

examples/node/typescript/example.mjs/src/example.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

examples/web/parcel/src/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

examples/web/webpack/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ componentA.purl = purlFac.makeFromComponent(componentA)
4646
bom.components.add(componentA)
4747
bom.metadata.component.dependencies.add(componentA.bomRef)
4848

49-
const serializeSpec = CDX.Spec.Spec1dot5
49+
const serializeSpec = CDX.Spec.Spec1dot6
5050

5151
const jsonSerializer = new CDX.Serialize.JsonSerializer(
5252
new CDX.Serialize.JSON.Normalize.Factory(serializeSpec))

res/schema/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Resources: Schema files
22

33
some schema for offline use as download via [script](../../tools/schema-downloader/download.js).
4-
original sources: <https://github.com/CycloneDX/specification/blob/1.5>
4+
original sources: <https://github.com/CycloneDX/specification/blob/master>
55

66
Currently using version
7-
[c320fc0f0b46873864927d9d5684eea7ba439728](https://github.com/CycloneDX/specification/commit/c320fc0f0b46873864927d9d5684eea7ba439728)
7+
[9899d5cb13e3f380cc35c36829525188472f5ce3](https://github.com/CycloneDX/specification/commit/9899d5cb13e3f380cc35c36829525188472f5ce3)
88

99
| file | note |
1010
|------|------|
@@ -14,10 +14,12 @@ Currently using version
1414
| [`bom-1.3.SNAPSHOT.xsd`](bom-1.3.SNAPSHOT.xsd) | applied changes: 1 |
1515
| [`bom-1.4.SNAPSHOT.xsd`](bom-1.4.SNAPSHOT.xsd) | applied changes: 1 |
1616
| [`bom-1.5.SNAPSHOT.xsd`](bom-1.5.SNAPSHOT.xsd) | applied changes: 1 |
17+
| [`bom-1.6.SNAPSHOT.xsd`](bom-1.6.SNAPSHOT.xsd) | applied changes: 1 |
1718
| [`bom-1.2.SNAPSHOT.schema.json`](bom-1.2.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
1819
| [`bom-1.3.SNAPSHOT.schema.json`](bom-1.3.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
1920
| [`bom-1.4.SNAPSHOT.schema.json`](bom-1.4.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
2021
| [`bom-1.5.SNAPSHOT.schema.json`](bom-1.5.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
22+
| [`bom-1.6.SNAPSHOT.schema.json`](bom-1.6.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
2123
| [`bom-1.2-strict.SNAPSHOT.schema.json`](bom-1.2-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
2224
| [`bom-1.3-strict.SNAPSHOT.schema.json`](bom-1.3-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5 |
2325
| [`spdx.SNAPSHOT.xsd`](spdx.SNAPSHOT.xsd) | |

res/schema/bom-1.5.SNAPSHOT.xsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ limitations under the License.
474474
<xs:documentation>Specifies a description for the component</xs:documentation>
475475
</xs:annotation>
476476
</xs:element>
477-
<xs:element name="scope" type="bom:scope" minOccurs="0" maxOccurs="1">
477+
<xs:element name="scope" type="bom:scope" minOccurs="0" maxOccurs="1" default="required">
478478
<xs:annotation>
479479
<xs:documentation>Specifies the scope of the component. If scope is not specified, 'required'
480480
scope SHOULD be assumed by the consumer of the BOM.</xs:documentation>

0 commit comments

Comments
 (0)