Skip to content

Commit 37eca57

Browse files
authored
feat: CDX 1.6.1 (#1177)
fixes #1176 --------- Signed-off-by: Jan Kowalleck <[email protected]>
1 parent efe2ff6 commit 37eca57

39 files changed

+929
-262
lines changed

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66

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

9+
* Added
10+
* Support CycloneDX 1.6.1 ([#1176] via [#1177])
11+
12+
[#1176]: https://github.com/CycloneDX/cyclonedx-javascript-library/issues/1176
13+
[#1177]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1177
14+
915
## 6.12.0 -- 2024-11-12
1016

1117
* Added

res/schema/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ some schema for offline use as download via [script](../../tools/schema-download
44
original sources: <https://github.com/CycloneDX/specification/blob/master>
55

66
Currently using version
7-
[5f3ee8066491d31ec6a6d02968243d9688d7e49c](https://github.com/CycloneDX/specification/commit/5f3ee8066491d31ec6a6d02968243d9688d7e49c)
7+
[8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7](https://github.com/CycloneDX/specification/commit/8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7)
88

99
| file | note |
1010
|------|------|

res/schema/bom-1.6.SNAPSHOT.schema.json

Lines changed: 90 additions & 64 deletions
Large diffs are not rendered by default.

res/schema/bom-1.6.SNAPSHOT.xsd

Lines changed: 233 additions & 91 deletions
Large diffs are not rendered by default.

tests/_data/schemaTestData/1.6/valid-annotation-1.6.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@
7777
"name": "Partner Org",
7878
"url": [
7979
"https://partner.org"
80+
],
81+
"contact" : [
82+
{
83+
"name": "Support",
84+
"email": "[email protected]",
85+
"phone": "800-555-1212"
86+
}
8087
]
8188
},
8289
"group": "org.partner",

tests/_data/schemaTestData/1.6/valid-annotation-1.6.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</contact>
2222
</organization>
2323
</annotator>
24-
<timestamp>2020-04-07T07:01:00Z</timestamp>
24+
<timestamp>2022-01-01T00:00:00Z</timestamp>
2525
<text>This is a sample annotation made by an organization</text>
2626
</annotation>
2727
<annotation bom-ref="annotation-2">
@@ -35,8 +35,8 @@
3535
<phone>800-555-1212</phone>
3636
</individual>
3737
</annotator>
38-
<timestamp>2020-04-07T07:01:00Z</timestamp>
39-
<text>This is a sample annotation made by an person</text>
38+
<timestamp>2022-01-01T00:00:00Z</timestamp>
39+
<text>This is a sample annotation made by a person</text>
4040
</annotation>
4141
<annotation bom-ref="annotation-3">
4242
<subjects>
@@ -48,7 +48,7 @@
4848
<version>9.1.2</version>
4949
</component>
5050
</annotator>
51-
<timestamp>2020-04-07T07:01:00Z</timestamp>
51+
<timestamp>2022-01-01T00:00:00Z</timestamp>
5252
<text>This is a sample annotation made by a component</text>
5353
</annotation>
5454
<annotation bom-ref="annotation-4">
@@ -62,7 +62,7 @@
6262
<url>https://partner.org</url>
6363
<contact>
6464
<name>Support</name>
65-
<email>support@partner</email>
65+
<email>support@partner.org</email>
6666
<phone>800-555-1212</phone>
6767
</contact>
6868
</provider>
@@ -76,11 +76,11 @@
7676
<authenticated>true</authenticated>
7777
<x-trust-boundary>true</x-trust-boundary>
7878
<data>
79-
<classification flow="bi-directional">pubic</classification>
79+
<classification flow="bi-directional">public</classification>
8080
</data>
8181
</service>
8282
</annotator>
83-
<timestamp>2020-04-07T07:01:00Z</timestamp>
83+
<timestamp>2022-01-01T00:00:00Z</timestamp>
8484
<text>This is a sample annotation made by a service</text>
8585
</annotation>
8686
</annotations>

tests/_data/schemaTestData/1.6/valid-attestation-1.6.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<declarations>
44
<assessors>
55
<assessor bom-ref="assessor-1">
6-
<thirdParty>false</thirdParty>
6+
<thirdParty>true</thirdParty>
77
<organization>
8-
<name>Acme Inc</name>
8+
<name>Assessors Inc</name>
99
</organization>
1010
</assessor>
1111
</assessors>
@@ -25,7 +25,7 @@
2525
<score>0.8</score>
2626
<rationale>Conformance rationale here</rationale>
2727
<mitigationStrategies>
28-
<mitigationStrategy>mitigations-1</mitigationStrategy>
28+
<mitigationStrategy>mitigationStrategy-1</mitigationStrategy>
2929
</mitigationStrategies>
3030
</conformance>
3131
<confidence>
@@ -110,7 +110,7 @@
110110
<contents>
111111
<attachment content-type="text/plain">Mitigation strategy here</attachment>
112112
</contents>
113-
<classification>Public</classification>
113+
<classification>Company Confidential</classification>
114114
<sensitiveData>Describe sensitive data here</sensitiveData>
115115
</data>
116116
<created>2023-04-25T00:00:00+00:00</created>

tests/_data/schemaTestData/1.6/valid-bom-1.6.json

Lines changed: 121 additions & 24 deletions
Large diffs are not rendered by default.

tests/_data/schemaTestData/1.6/valid-bom-1.6.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
33
<metadata>
4-
<timestamp>2020-04-07T07:01:00Z</timestamp>
4+
<timestamp>2020-04-13T20:20:39+00:00</timestamp>
55
<tools>
66
<tool>
77
<vendor>Awesome Vendor</vendor>
@@ -46,7 +46,7 @@
4646
</supplier>
4747
</metadata>
4848
<components>
49-
<component type="application">
49+
<component type="application" bom-ref="pkg:maven/com.acme/[email protected]?packaging=jar">
5050
<author>Joane Doe et al.</author>
5151
<publisher>Acme Inc</publisher>
5252
<group>com.acme</group>
@@ -90,7 +90,7 @@
9090
<uid>7638417db6d59f3c431d3e1f261cc637155684cd</uid>
9191
<url>https://location/to/7638417db6d59f3c431d3e1f261cc637155684cd</url>
9292
<author>
93-
<timestamp>2018-11-07T22:01:45Z</timestamp>
93+
<timestamp>2018-11-13T20:20:39+00:00</timestamp>
9494
<name>John Doe</name>
9595
<email>[email protected]</email>
9696
</author>
@@ -105,9 +105,9 @@
105105
<notes>Commentary here</notes>
106106
</pedigree>
107107
</component>
108-
<component type="library">
108+
<component type="library" bom-ref="pkg:maven/com.example/[email protected]?packaging=war">
109109
<supplier>
110-
<name>Example Inc.</name>
110+
<name>Example, Inc.</name>
111111
<url>https://example.com</url>
112112
<url>https://example.net</url>
113113
<contact>
@@ -121,7 +121,7 @@
121121
</contact>
122122
</supplier>
123123
<manufacturer>
124-
<name>Example-2, Inc.Example-2, Inc.</name>
124+
<name>Example-2, Inc.</name>
125125
<url>https://example.org</url>
126126
<contact>
127127
<email>[email protected]</email>
@@ -195,4 +195,9 @@
195195
</externalReferences>
196196
</component>
197197
</components>
198+
<dependencies>
199+
<dependency ref="pkg:maven/com.acme/[email protected]?packaging=jar">
200+
<dependency ref="pkg:maven/com.example/[email protected]?packaging=war"/>
201+
</dependency>
202+
</dependencies>
198203
</bom>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3+
"bomFormat": "CycloneDX",
4+
"specVersion": "1.6",
5+
"serialNumber": "urn:uuid:1b1bff0e-fdb9-4088-8b9a-1a9f2d9006da",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "data",
10+
"name": "my-configs",
11+
"version": "1337",
12+
"data": [
13+
{
14+
"type": "configuration",
15+
"name": "app.ini",
16+
"contents": {
17+
"url": "https://example.com/cfg/1337/app.ini"
18+
}
19+
},
20+
{
21+
"type": "other",
22+
"name": ".env",
23+
"contents": {
24+
"url": "https://example.com/cfg/1337/env"
25+
}
26+
}
27+
]
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)