Skip to content

Commit 194be68

Browse files
committed
tests: cdx 1.6.1
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent bed614f commit 194be68

34 files changed

+598
-105
lines changed

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+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<bom serialNumber="urn:uuid:1b1bff0e-fdb9-4088-8b9a-1a9f2d9006da" version="1"
3+
xmlns="http://cyclonedx.org/schema/bom/1.6">
4+
<components>
5+
<component type="data">
6+
<name>my-configs</name>
7+
<version>1337</version>
8+
<data>
9+
<type>configuration</type>
10+
<name>app.ini</name>
11+
<contents>
12+
<url>https://example.com/cfg/1337/app.ini</url>
13+
</contents>
14+
</data>
15+
<data>
16+
<type>other</type>
17+
<name>.env</name>
18+
<contents>
19+
<url>https://example.com/cfg/1337/env</url>
20+
</contents>
21+
</data>
22+
</component>
23+
</components>
24+
</bom>

tests/_data/schemaTestData/1.6/valid-component-ref-1.6.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@
99
"type": "library",
1010
"bom-ref": "123",
1111
"name": "acme-library",
12-
"version": "1.0.0"
12+
"version": "1.0.0",
13+
"components" : [
14+
{
15+
"type": "library",
16+
"bom-ref": "456",
17+
"name": "acme-library",
18+
"version": "1.0.0"
19+
}
20+
]
1321
},
1422
{
1523
"type": "library",
16-
"bom-ref": "456",
24+
"bom-ref": "789",
1725
"name": "acme-library",
1826
"version": "1.0.0"
1927
}

tests/_data/schemaTestData/1.6/valid-component-types-1.6.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"type": "file",
4545
"name": "file-a",
4646
"version": "1.0"
47+
},
48+
{
49+
"type": "data",
50+
"name": "data-a",
51+
"version": "1.0"
4752
}
4853
]
4954
}

tests/_data/schemaTestData/1.6/valid-component-types-1.6.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@
3333
<name>file-a</name>
3434
<version>1.0</version>
3535
</component>
36+
<component type="data">
37+
<name>data-a</name>
38+
<version>1.0</version>
39+
</component>
3640
</components>
3741
</bom>

0 commit comments

Comments
 (0)