Skip to content

Commit 649fde5

Browse files
committed
spdx example clean-up
Signed-off-by: Brian DeHamer <[email protected]>
1 parent be514e6 commit 649fde5

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

accepted/0000-sbom-command.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ The <code>[externalRefs](https://spdx.github.io/spdx-spec/v2.3/package-informati
142142
Making it a distinct command allows us to add SBOM-specific features in the future like a `--sign` flag which could be used to generate a signed SBOM. \
143143
\
144144
_Recommendation: Add a distinct command for generating an SBOM._
145-
146-
* SPDX doesn’t provide a natural way to differentiate between the various npm dependency types like “dev”, “peer”, and “optional”. We might consider using something like the [package comment field](https://spdx.github.io/spdx-spec/v2.3/package-information/#720-package-comment-field) to capture this information. \
147-
\
148-
_Recommendation: Skip for the first version of this feature. Wait to see if there is demand for this information and/or if the specification evolves to account for this metadata._
149145

150146
* Does `npm-sbom` command have a notion of a “default” SBOM format? Do we give preference to one of CycloneDX/SPDX or do we remain totally neutral (possibly at the expense of DX)? \
151147
\
@@ -304,7 +300,7 @@ The proposed SPDX SBOM generated for the project above would look like the follo
304300
"name": "[email protected]",
305301
"documentNamespace": "http://spdx.org/spdxdocs/hello-world-1.0.0-<uuid>",
306302
"creationInfo": {
307-
"created": "2023-08-04T21:41:02.071Z",
303+
"created": "2023-08-09T22:31:28.107Z",
308304
"creators": [
309305
"Tool: npm/cli-9.8.1"
310306
]
@@ -327,7 +323,7 @@ The proposed SPDX SBOM generated for the project above would look like the follo
327323
},
328324
{
329325
"referenceCategory": "PACKAGE-MANAGER",
330-
"referernceType": "purl",
326+
"referenceType": "purl",
331327
"referenceLocator": "pkg:npm/[email protected]"
332328
}
333329
]
@@ -341,12 +337,12 @@ The proposed SPDX SBOM generated for the project above would look like the follo
341337
"externalRefs": [
342338
{
343339
"referenceCategory": "PACKAGE-MANAGER",
344-
"referernceType": "npm",
340+
"referenceType": "npm",
345341
"referenceLocator": "@tsconfig/[email protected]"
346342
},
347343
{
348344
"referenceCategory": "PACKAGE-MANAGER",
349-
"referernceType": "purl",
345+
"referenceType": "purl",
350346
"referenceLocator": "pkg:npm/%40tsconfig/[email protected]"
351347
}
352348
],
@@ -366,12 +362,12 @@ The proposed SPDX SBOM generated for the project above would look like the follo
366362
"externalRefs": [
367363
{
368364
"referenceCategory": "PACKAGE-MANAGER",
369-
"referernceType": "npm",
365+
"referenceType": "npm",
370366
"referenceLocator": "[email protected]"
371367
},
372368
{
373369
"referenceCategory": "PACKAGE-MANAGER",
374-
"referernceType": "purl",
370+
"referenceType": "purl",
375371
"referenceLocator": "pkg:npm/[email protected]"
376372
}
377373
],
@@ -391,12 +387,12 @@ The proposed SPDX SBOM generated for the project above would look like the follo
391387
"externalRefs": [
392388
{
393389
"referenceCategory": "PACKAGE-MANAGER",
394-
"referernceType": "npm",
390+
"referenceType": "npm",
395391
"referenceLocator": "[email protected]"
396392
},
397393
{
398394
"referenceCategory": "PACKAGE-MANAGER",
399-
"referernceType": "purl",
395+
"referenceType": "purl",
400396
"referenceLocator": "pkg:npm/[email protected]"
401397
}
402398
],
@@ -407,6 +403,28 @@ The proposed SPDX SBOM generated for the project above would look like the follo
407403
}
408404
]
409405
}
406+
],
407+
"relationships": [
408+
{
409+
"spdxElementId": "SPDXRef-DOCUMENT",
410+
"relatedSpdxElement": "SPDXRef-Package-hello-world-1.0.0",
411+
"relationshipType": "DESCRIBES"
412+
},
413+
{
414+
"spdxElementId": "SPDXRef-Package-debug-4.3.4",
415+
"relatedSpdxElement": "SPDXRef-Package-hello-world-1.0.0",
416+
"relationshipType": "DEPENDENCY_OF"
417+
},
418+
{
419+
"spdxElementId": "SPDXRef-Package-tsconfig.node14-1.0.3",
420+
"relatedSpdxElement": "SPDXRef-Package-hello-world-1.0.0",
421+
"relationshipType": "DEV_DEPENDENCY_OF"
422+
},
423+
{
424+
"spdxElementId": "SPDXRef-Package-ms-2.1.2",
425+
"relatedSpdxElement": "SPDXRef-Package-debug-4.3.4",
426+
"relationshipType": "DEPENDENCY_OF"
427+
}
410428
]
411429
}
412430
```

0 commit comments

Comments
 (0)