Skip to content

Commit ab2cea9

Browse files
committed
clarify cyclonedx sbom output
Signed-off-by: Brian DeHamer <[email protected]>
1 parent b550c58 commit ab2cea9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

accepted/0000-sbom-command.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ Both of the SBOM formats present a flat list of dependencies (CycloneDX groups t
7272
"version": "4.3.4",
7373
"bom-ref": "[email protected]",
7474
"purl": "pkg:npm/[email protected]",
75+
"scope": "required",
76+
"externalReferences": [
77+
{
78+
"type": "distribution",
79+
"url": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
80+
}
81+
],
7582
"properties": [
7683
{
7784
"name": "cdx:npm:package:path",
@@ -98,6 +105,8 @@ The <code>[properties](https://cyclonedx.org/docs/1.4/json/#components_items_pro
98105

99106
Similarly, there are named properties defined for identifying things like "bundled", "private", and "extraneous" dependencies. Dependencies will be annotated with this properties as appropriate.
100107

108+
The CycloneDX specification also provides [fields](https://cyclonedx.org/docs/1.4/json/#components) for capturing other package metadata like author, license, website, etc. Not all packages provide this information, but these fields will be populated when the information is available.
109+
101110
#### SPDX
102111

103112
```json
@@ -230,7 +239,14 @@ The proposed CycloneDX SBOM generated for the project above would look like the
230239
"type": "library",
231240
"name": "@tsconfig/node14",
232241
"version": "1.0.3",
242+
"scope": "required",
233243
"purl": "pkg:npm/%40tsconfig/[email protected]",
244+
"externalReferences": [
245+
{
246+
"type": "distribution",
247+
"url": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz"
248+
}
249+
],
234250
"properties": [
235251
{
236252
"name": "cdx:npm:package:path",
@@ -253,7 +269,14 @@ The proposed CycloneDX SBOM generated for the project above would look like the
253269
"type": "library",
254270
"name": "debug",
255271
"version": "4.3.4",
272+
"scope": "required",
256273
"purl": "pkg:npm/[email protected]",
274+
"externalReferences": [
275+
{
276+
"type": "distribution",
277+
"url": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
278+
}
279+
],
257280
"properties": [
258281
{
259282
"name": "cdx:npm:package:path",
@@ -272,7 +295,14 @@ The proposed CycloneDX SBOM generated for the project above would look like the
272295
"type": "library",
273296
"name": "ms",
274297
"version": "2.1.2",
298+
"scope": "required",
275299
"purl": "pkg:npm/[email protected]",
300+
"externalReferences": [
301+
{
302+
"type": "distribution",
303+
"url": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
304+
}
305+
],
276306
"properties": [
277307
{
278308
"name": "cdx:npm:package:path",

0 commit comments

Comments
 (0)