@cyclonedx/cyclonedx-library 6.4.2 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist.d/enums/componentType.d.ts +2 -1
- package/dist.d/enums/componentType.d.ts.map +1 -1
- package/dist.d/enums/externalReferenceType.d.ts +4 -0
- package/dist.d/enums/externalReferenceType.d.ts.map +1 -1
- package/dist.d/enums/vulnerability/ratingMethod.d.ts.map +1 -1
- package/dist.d/serialize/json/normalize.d.ts.map +1 -1
- package/dist.d/serialize/xml/normalize.d.ts.map +1 -1
- package/dist.d/spec/consts.d.ts +2 -0
- package/dist.d/spec/consts.d.ts.map +1 -1
- package/dist.d/spec/enums.d.ts +1 -0
- package/dist.d/spec/enums.d.ts.map +1 -1
- package/dist.node/enums/componentType.js +1 -0
- package/dist.node/enums/componentType.js.map +1 -1
- package/dist.node/enums/externalReferenceType.js +4 -0
- package/dist.node/enums/externalReferenceType.js.map +1 -1
- package/dist.node/enums/vulnerability/ratingMethod.js.map +1 -1
- package/dist.node/resources.node.js +3 -0
- package/dist.node/resources.node.js.map +1 -1
- package/dist.node/serialize/json/normalize.js +1 -0
- package/dist.node/serialize/json/normalize.js.map +1 -1
- package/dist.node/serialize/xml/normalize.js +1 -0
- package/dist.node/serialize/xml/normalize.js.map +1 -1
- package/dist.node/spec/consts.js +85 -1
- package/dist.node/spec/consts.js.map +1 -1
- package/dist.node/spec/enums.js +1 -0
- package/dist.node/spec/enums.js.map +1 -1
- package/dist.web/lib.dev.js +94 -2
- package/dist.web/lib.dev.js.map +1 -1
- package/dist.web/lib.js +1 -1
- package/dist.web/lib.js.map +1 -1
- package/package.json +4 -4
- package/res/schema/README.md +4 -2
- package/res/schema/bom-1.5.SNAPSHOT.xsd +1 -1
- package/res/schema/bom-1.6.SNAPSHOT.schema.json +5673 -0
- package/res/schema/bom-1.6.SNAPSHOT.xsd +8290 -0
- package/res/schema/spdx.SNAPSHOT.schema.json +92 -1
- package/res/schema/spdx.SNAPSHOT.xsd +456 -1
- package/src/enums/componentType.ts +1 -0
- package/src/enums/externalReferenceType.ts +7 -0
- package/src/enums/vulnerability/ratingMethod.ts +3 -0
- package/src/resources.node.ts +3 -1
- package/src/serialize/json/normalize.ts +1 -0
- package/src/serialize/xml/normalize.ts +1 -0
- package/src/spec/consts.ts +105 -0
- package/src/spec/enums.ts +1 -0
- package/tsconfig.json +1 -0
|
@@ -28,6 +28,7 @@ export enum ExternalReferenceType {
|
|
|
28
28
|
Chat = 'chat',
|
|
29
29
|
Documentation = 'documentation',
|
|
30
30
|
Support = 'support',
|
|
31
|
+
SourceDistribution = 'source-distribution',
|
|
31
32
|
Distribution = 'distribution',
|
|
32
33
|
DistributionIntake = 'distribution-intake',
|
|
33
34
|
License = 'license',
|
|
@@ -56,5 +57,11 @@ export enum ExternalReferenceType {
|
|
|
56
57
|
CodifiedInfrastructure = 'codified-infrastructure',
|
|
57
58
|
QualityMetrics = 'quality-metrics',
|
|
58
59
|
POAM = 'poam',
|
|
60
|
+
ElectronicSignature = 'electronic-signature',
|
|
61
|
+
DigitalSignature = 'digital-signature',
|
|
62
|
+
RFC9116 = 'rfc-9116',
|
|
63
|
+
|
|
64
|
+
// --
|
|
65
|
+
|
|
59
66
|
Other = 'other',
|
|
60
67
|
}
|
package/src/resources.node.ts
CHANGED
|
@@ -31,6 +31,7 @@ export const SCHEMA_ROOT = path.resolve(ROOT, 'schema')
|
|
|
31
31
|
export const FILES = Object.freeze({
|
|
32
32
|
CDX: Object.freeze({
|
|
33
33
|
XML_SCHEMA: Object.freeze({
|
|
34
|
+
[Version.v1dot6]: path.resolve(SCHEMA_ROOT, 'bom-1.6.SNAPSHOT.xsd'),
|
|
34
35
|
[Version.v1dot5]: path.resolve(SCHEMA_ROOT, 'bom-1.5.SNAPSHOT.xsd'),
|
|
35
36
|
[Version.v1dot4]: path.resolve(SCHEMA_ROOT, 'bom-1.4.SNAPSHOT.xsd'),
|
|
36
37
|
[Version.v1dot3]: path.resolve(SCHEMA_ROOT, 'bom-1.3.SNAPSHOT.xsd'),
|
|
@@ -40,6 +41,7 @@ export const FILES = Object.freeze({
|
|
|
40
41
|
|
|
41
42
|
}),
|
|
42
43
|
JSON_SCHEMA: Object.freeze({
|
|
44
|
+
[Version.v1dot6]: path.resolve(SCHEMA_ROOT, 'bom-1.6.SNAPSHOT.schema.json'),
|
|
43
45
|
[Version.v1dot5]: path.resolve(SCHEMA_ROOT, 'bom-1.5.SNAPSHOT.schema.json'),
|
|
44
46
|
[Version.v1dot4]: path.resolve(SCHEMA_ROOT, 'bom-1.4.SNAPSHOT.schema.json'),
|
|
45
47
|
[Version.v1dot3]: path.resolve(SCHEMA_ROOT, 'bom-1.3.SNAPSHOT.schema.json'),
|
|
@@ -49,7 +51,7 @@ export const FILES = Object.freeze({
|
|
|
49
51
|
[Version.v1dot0]: undefined
|
|
50
52
|
}),
|
|
51
53
|
JSON_STRICT_SCHEMA: Object.freeze({
|
|
52
|
-
|
|
54
|
+
[Version.v1dot6]: path.resolve(SCHEMA_ROOT, 'bom-1.6.SNAPSHOT.schema.json'),
|
|
53
55
|
[Version.v1dot5]: path.resolve(SCHEMA_ROOT, 'bom-1.5.SNAPSHOT.schema.json'),
|
|
54
56
|
[Version.v1dot4]: path.resolve(SCHEMA_ROOT, 'bom-1.4.SNAPSHOT.schema.json'),
|
|
55
57
|
// <= 1.3 need special files
|
|
@@ -139,6 +139,7 @@ export class Factory {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
const schemaUrl: ReadonlyMap<SpecVersion, string> = new Map([
|
|
142
|
+
[SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom-1.6.schema.json'],
|
|
142
143
|
[SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom-1.5.schema.json'],
|
|
143
144
|
[SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom-1.4.schema.json'],
|
|
144
145
|
[SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom-1.3a.schema.json'],
|
|
@@ -139,6 +139,7 @@ export class Factory {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
const xmlNamespace: ReadonlyMap<SpecVersion, string> = new Map([
|
|
142
|
+
[SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom/1.6'],
|
|
142
143
|
[SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom/1.5'],
|
|
143
144
|
[SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom/1.4'],
|
|
144
145
|
[SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom/1.3'],
|
package/src/spec/consts.ts
CHANGED
|
@@ -313,7 +313,112 @@ export const Spec1dot5: Readonly<_SpecProtocol> = Object.freeze(new _Spec(
|
|
|
313
313
|
true
|
|
314
314
|
))
|
|
315
315
|
|
|
316
|
+
/** Specification v1.6 */
|
|
317
|
+
export const Spec1dot6: Readonly<_SpecProtocol> = Object.freeze(new _Spec(
|
|
318
|
+
// @TODO
|
|
319
|
+
Version.v1dot6,
|
|
320
|
+
[
|
|
321
|
+
Format.XML,
|
|
322
|
+
Format.JSON
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
ComponentType.Application,
|
|
326
|
+
ComponentType.Framework,
|
|
327
|
+
ComponentType.Library,
|
|
328
|
+
ComponentType.Container,
|
|
329
|
+
ComponentType.Platform,
|
|
330
|
+
ComponentType.OperatingSystem,
|
|
331
|
+
ComponentType.Device,
|
|
332
|
+
ComponentType.DeviceDriver,
|
|
333
|
+
ComponentType.Firmware,
|
|
334
|
+
ComponentType.File,
|
|
335
|
+
ComponentType.MachineLearningModel,
|
|
336
|
+
ComponentType.Data,
|
|
337
|
+
ComponentType.CryptographicAsset
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
HashAlgorithm.MD5,
|
|
341
|
+
HashAlgorithm['SHA-1'],
|
|
342
|
+
HashAlgorithm['SHA-256'],
|
|
343
|
+
HashAlgorithm['SHA-384'],
|
|
344
|
+
HashAlgorithm['SHA-512'],
|
|
345
|
+
HashAlgorithm['SHA3-256'],
|
|
346
|
+
HashAlgorithm['SHA3-384'],
|
|
347
|
+
HashAlgorithm['SHA3-512'],
|
|
348
|
+
HashAlgorithm['BLAKE2b-256'],
|
|
349
|
+
HashAlgorithm['BLAKE2b-384'],
|
|
350
|
+
HashAlgorithm['BLAKE2b-512'],
|
|
351
|
+
HashAlgorithm.BLAKE3
|
|
352
|
+
],
|
|
353
|
+
/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,
|
|
354
|
+
[
|
|
355
|
+
ExternalReferenceType.VCS,
|
|
356
|
+
ExternalReferenceType.IssueTracker,
|
|
357
|
+
ExternalReferenceType.Website,
|
|
358
|
+
ExternalReferenceType.Advisories,
|
|
359
|
+
ExternalReferenceType.BOM,
|
|
360
|
+
ExternalReferenceType.MailingList,
|
|
361
|
+
ExternalReferenceType.Social,
|
|
362
|
+
ExternalReferenceType.Chat,
|
|
363
|
+
ExternalReferenceType.Documentation,
|
|
364
|
+
ExternalReferenceType.Support,
|
|
365
|
+
ExternalReferenceType.SourceDistribution,
|
|
366
|
+
ExternalReferenceType.Distribution,
|
|
367
|
+
ExternalReferenceType.DistributionIntake,
|
|
368
|
+
ExternalReferenceType.License,
|
|
369
|
+
ExternalReferenceType.BuildMeta,
|
|
370
|
+
ExternalReferenceType.BuildSystem,
|
|
371
|
+
ExternalReferenceType.ReleaseNotes,
|
|
372
|
+
ExternalReferenceType.SecurityContact,
|
|
373
|
+
ExternalReferenceType.ModelCard,
|
|
374
|
+
ExternalReferenceType.Log,
|
|
375
|
+
ExternalReferenceType.Configuration,
|
|
376
|
+
ExternalReferenceType.Evidence,
|
|
377
|
+
ExternalReferenceType.Formulation,
|
|
378
|
+
ExternalReferenceType.Attestation,
|
|
379
|
+
ExternalReferenceType.ThreatModel,
|
|
380
|
+
ExternalReferenceType.AdversaryModel,
|
|
381
|
+
ExternalReferenceType.RiskAssessment,
|
|
382
|
+
ExternalReferenceType.VulnerabilityAssertion,
|
|
383
|
+
ExternalReferenceType.ExploitabilityStatement,
|
|
384
|
+
ExternalReferenceType.PentestReport,
|
|
385
|
+
ExternalReferenceType.StaticAnalysisReport,
|
|
386
|
+
ExternalReferenceType.DynamicAnalysisReport,
|
|
387
|
+
ExternalReferenceType.RuntimeAnalysisReport,
|
|
388
|
+
ExternalReferenceType.ComponentAnalysisReport,
|
|
389
|
+
ExternalReferenceType.MaturityReport,
|
|
390
|
+
ExternalReferenceType.CertificationReport,
|
|
391
|
+
ExternalReferenceType.CodifiedInfrastructure,
|
|
392
|
+
ExternalReferenceType.QualityMetrics,
|
|
393
|
+
ExternalReferenceType.POAM,
|
|
394
|
+
ExternalReferenceType.ElectronicSignature,
|
|
395
|
+
ExternalReferenceType.DigitalSignature,
|
|
396
|
+
ExternalReferenceType.RFC9116,
|
|
397
|
+
ExternalReferenceType.Other
|
|
398
|
+
],
|
|
399
|
+
true,
|
|
400
|
+
true,
|
|
401
|
+
false,
|
|
402
|
+
true,
|
|
403
|
+
true,
|
|
404
|
+
[
|
|
405
|
+
Vulnerability.RatingMethod.CVSSv2,
|
|
406
|
+
Vulnerability.RatingMethod.CVSSv3,
|
|
407
|
+
Vulnerability.RatingMethod.CVSSv31,
|
|
408
|
+
Vulnerability.RatingMethod.CVSSv4,
|
|
409
|
+
Vulnerability.RatingMethod.OWASP,
|
|
410
|
+
Vulnerability.RatingMethod.SSVC,
|
|
411
|
+
Vulnerability.RatingMethod.Other
|
|
412
|
+
],
|
|
413
|
+
true,
|
|
414
|
+
true,
|
|
415
|
+
true,
|
|
416
|
+
true,
|
|
417
|
+
true
|
|
418
|
+
))
|
|
419
|
+
|
|
316
420
|
export const SpecVersionDict: Readonly<Partial<Record<Version, Readonly<_SpecProtocol>>>> = Object.freeze({
|
|
421
|
+
[Version.v1dot6]: Spec1dot6,
|
|
317
422
|
[Version.v1dot5]: Spec1dot5,
|
|
318
423
|
[Version.v1dot4]: Spec1dot4,
|
|
319
424
|
[Version.v1dot3]: Spec1dot3,
|
package/src/spec/enums.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"declaration": false, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
49
49
|
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
50
50
|
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
51
|
+
// ! for downstream developer experience we ship the sources and complete maps, to make debugging easier.
|
|
51
52
|
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
52
53
|
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
53
54
|
// "outDir": "./dist/", /* Specify an output folder for all emitted files. */
|