Skip to content

Commit 54a7138

Browse files
Added unit test
Signed-off-by: Steve Springett <steve@springett.us>
1 parent 367cab2 commit 54a7138

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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": "2026-01-13T18:40:00Z",
9+
"authors": [
10+
{
11+
"name": "Samantha Wright",
12+
"email": "samantha.wright@example.com",
13+
"phone": "800-555-1212"
14+
}
15+
]
16+
},
17+
"components": [
18+
{
19+
"bom-ref": "pkg:maven/com.acme/sample-library@1.0.0?packaging=jar",
20+
"type": "library",
21+
"supplier": {
22+
"name": "Acme Inc"
23+
},
24+
"group": "com.acme",
25+
"name": "sample-library",
26+
"version": "1.0.0",
27+
"purl": "pkg:maven/com.acme/sample-library@1.0.0?packaging=jar",
28+
"cpe": "cpe:2.3:a:acme:sample-library:1.0.0:*:*:*:*:*:*:*"
29+
},
30+
{
31+
"bom-ref": "pkg:maven/com.acme/sample-framework@2.1.0?packaging=jar",
32+
"type": "library",
33+
"supplier": {
34+
"name": "Acme Inc"
35+
},
36+
"group": "com.acme",
37+
"name": "sample-framework",
38+
"version": "2.1.0",
39+
"purl": "pkg:maven/com.acme/sample-framework@2.1.0?packaging=jar",
40+
"cpe": "cpe:2.3:a:acme:sample-framework:2.1.0:*:*:*:*:*:*:*"
41+
}
42+
],
43+
"dependencies": [
44+
{
45+
"ref": "pkg:maven/com.acme/sample-framework@2.1.0?packaging=jar",
46+
"dependsOn": [
47+
"pkg:maven/com.acme/sample-library@1.0.0?packaging=jar"
48+
]
49+
}
50+
],
51+
"perspectives": [
52+
{
53+
"name": "NTIA Minimum Elements",
54+
"description": "A perspective that describes the NTIA minimum elements of an SBOM.",
55+
"domains": [
56+
{
57+
"name": "regulatory-compliance"
58+
},
59+
{
60+
"name": "contractual-compliance"
61+
}
62+
],
63+
"mappings": [
64+
{
65+
"expression": "$.components[*].supplier",
66+
"nativeName": "Supplier Name",
67+
"nativeDescription": "The name of an entity that creates, defines, and identifies components.",
68+
"relevance": "required"
69+
},
70+
{
71+
"expression": "$.components[*].name",
72+
"nativeName": "Component Name",
73+
"nativeDescription": "Designation assigned to a unit of software defined by the original supplier.",
74+
"relevance": "required"
75+
},
76+
{
77+
"expression": "$.components[*].version",
78+
"nativeName": "Version of the Component",
79+
"nativeDescription": "Identifier used by the supplier to specify a change in software from a previously identified version.",
80+
"relevance": "required"
81+
},
82+
{
83+
"expression": "$.components[*]['purl','cpe']",
84+
"nativeName": "Other Unique Identifiers",
85+
"nativeDescription": "Other identifiers that are used to identify a software component, or serve as a look-up key for relevant databases.",
86+
"relevance": "required"
87+
},
88+
{
89+
"expression": "$.dependencies[*]",
90+
"nativeName": "Dependency Relationship",
91+
"nativeDescription": "The ability to track and maintain the primary relationships between components.",
92+
"relevance": "required"
93+
},
94+
{
95+
"expression": "$.metadata.authors",
96+
"nativeName": "Author of SBOM Data",
97+
"nativeDescription": "The name of the entity that creates the SBOM data for this component.",
98+
"relevance": "required"
99+
},
100+
{
101+
"expression": "$.metadata.timestamp",
102+
"nativeName": "Timestamp",
103+
"nativeDescription": "A record of the date and time of the SBOM data assembly.",
104+
"relevance": "required"
105+
}
106+
]
107+
}
108+
]
109+
}

0 commit comments

Comments
 (0)