Skip to content

Commit 6a39e36

Browse files
Ported 1.7 unit tests to 2.0.
Signed-off-by: Steve Springett <[email protected]>
1 parent 9c8c622 commit 6a39e36

File tree

87 files changed

+6050
-0
lines changed

Some content is hidden

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

87 files changed

+6050
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "AnotherFormat",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
]
9+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"metadata": {
8+
"timestamp": "2025-05-01T14:23:00Z"
9+
},
10+
"components": [
11+
{
12+
"type": "library",
13+
"bom-ref": "component-1",
14+
"name": "example-lib",
15+
"version": "1.2.3",
16+
"licenses": [
17+
{
18+
"license": {
19+
"id": "Apache-2.0"
20+
}
21+
}
22+
]
23+
}
24+
],
25+
"citations": [
26+
{
27+
"bom-ref": "citation-1",
28+
"pointers": ["/components/0/name"],
29+
"timestamp": "2025-05-01T14:00:00Z",
30+
"note": "Should have at least one of the following property sets: property 'attributedTo' or property 'process'"
31+
},
32+
{
33+
"bom-ref": "citation-1",
34+
"pointers": ["/components/0/name"],
35+
"expressions": ["$..[?(@.bom-ref=='component-1')].version"],
36+
"timestamp": "2025-05-01T14:00:00Z",
37+
"note": "Should not have both a pointer and expression."
38+
}
39+
]
40+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "library",
10+
"name": "InvalidVersions",
11+
"description": "may have `version` or `versionRange`, not both. This one does - it is invalid",
12+
"version": "9.0.14",
13+
"versionRange": "vers:pypi/0.0.0|0.0.1|0.0.2|0.0.3|1.0|2.0pre1",
14+
"isExternal": true
15+
}
16+
]
17+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "library",
10+
"bom-ref": "123",
11+
"name": "acme-library",
12+
"version": "1.0.0"
13+
},
14+
{
15+
"type": "library",
16+
"bom-ref": "",
17+
"name": "acme-library",
18+
"version": "1.0.0"
19+
}
20+
]
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "application",
10+
"authors": [ { "name": "Acme Super Heros" } ],
11+
"name": "Acme Application",
12+
"version": "9.1.1",
13+
"swid": {
14+
"name": "Acme Application",
15+
"version": "9.1.1"
16+
}
17+
}
18+
]
19+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "foo",
10+
"name": "acme-library",
11+
"version": "1.0.0"
12+
}
13+
]
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "library",
10+
"name": "InvalidVersions",
11+
"description": "versionRange may only exist on extraneous components; set `.isExternal` explicit",
12+
"isExternal": false,
13+
"versionRange": "vers:pypi/0.0.0|0.0.1|0.0.2|0.0.3|1.0|2.0pre1"
14+
}
15+
]
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "library",
10+
"name": "InvalidVersions",
11+
"description": "versionRange may only exist on extraneous components; set `.isExternal` implicit by default value",
12+
"versionRange": "vers:pypi/0.0.0|0.0.1|0.0.2|0.0.3|1.0|2.0pre1"
13+
}
14+
]
15+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"bom-ref": "library-a",
10+
"type": "library",
11+
"name": "library-a",
12+
"version": "1.0.0"
13+
},
14+
{
15+
"bom-ref": "library-b",
16+
"type": "library",
17+
"name": "library-b",
18+
"version": "1.0.0"
19+
},
20+
{
21+
"bom-ref": "library-c",
22+
"type": "library",
23+
"name": "library-c",
24+
"version": "1.0.0"
25+
}
26+
],
27+
"dependencies": [
28+
{
29+
"dependsOn": []
30+
},
31+
{
32+
"ref": "",
33+
"dependsOn": [
34+
"library-a"
35+
]
36+
},
37+
{
38+
"ref": "library-b",
39+
"dependsOn": [
40+
"library-c"
41+
]
42+
}
43+
]
44+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
3+
"specFormat": "CycloneDX",
4+
"specVersion": "2.0",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "library"
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)