@cdxgen/cdxgen 13.5.0 → 13.7.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 +17 -10
- package/bin/audit.js +7 -4
- package/bin/cdxgen.js +260 -37
- package/bin/convert.js +146 -22
- package/bin/evinse.js +28 -3
- package/bin/repl.js +47 -3
- package/bin/sign.js +211 -34
- package/bin/tracebom.js +18 -6
- package/bin/validate.js +24 -3
- package/bin/verify.js +113 -5
- package/data/behavior-taxonomy.schema.json +1491 -0
- package/data/cyclonedx-2.0-bundled.schema.json +18606 -5528
- package/data/cyclonedx-2.0-cryptography-defs.schema.json +857 -0
- package/data/license-aliases.json +24 -2
- package/data/pqc-migration.json +239 -0
- package/data/remediations.json +176 -0
- package/data/rules/ai-bom.yaml +1 -1
- package/data/rules/brotli-decoder.yaml +107 -0
- package/data/rules/cbom-security.yaml +4 -3
- package/data/rules/package-integrity.yaml +28 -0
- package/data/rules/vscode-extensions.yaml +75 -0
- package/data/spdx-license-list.json +121 -7
- package/data/spdx-licenses.json +69 -0
- package/data/spdx.schema.json +845 -2
- package/lib/audit/index.js +25 -3
- package/lib/cli/bomAssembly.js +172 -4
- package/lib/cli/cliOptions.js +121 -17
- package/lib/cli/index.js +720 -902
- package/lib/cli/jsBom.js +156 -64
- package/lib/cli/jvmBom.js +602 -86
- package/lib/cli/managedBom.js +161 -19
- package/lib/cli/nativeBom.js +52 -5
- package/lib/core/boundedFile.js +344 -0
- package/lib/core/brotliProbe.js +182 -0
- package/lib/core/env.js +34 -0
- package/lib/core/fs.js +138 -3
- package/lib/core/globPatterns.js +218 -0
- package/lib/core/httpClient.js +98 -1
- package/lib/core/lockPaths.js +38 -0
- package/lib/core/paths.js +24 -1
- package/lib/core/processTree.js +100 -8
- package/lib/core/projectConfig.js +332 -25
- package/lib/core/toolRegistry.js +184 -0
- package/lib/ecosystems/cppEvidence.js +263 -106
- package/lib/ecosystems/cppIncludeResolver.js +16 -5
- package/lib/ecosystems/denoutils.js +2 -2
- package/lib/ecosystems/ecosystems.js +25 -10
- package/lib/ecosystems/gemHostProbe.js +301 -0
- package/lib/ecosystems/golem.js +3 -8
- package/lib/ecosystems/gradleutils.js +1909 -229
- package/lib/ecosystems/jsEvidence.js +90 -38
- package/lib/ecosystems/kosi.js +3 -5
- package/lib/ecosystems/npmVersionResolution.js +376 -0
- package/lib/ecosystems/parsers-bazel.js +107 -6
- package/lib/ecosystems/parsers-js.js +505 -22
- package/lib/ecosystems/parsers-misc.js +209 -20
- package/lib/ecosystems/parsers-python.js +178 -30
- package/lib/ecosystems/parsers-rust.js +117 -15
- package/lib/ecosystems/pythonutils.js +128 -2
- package/lib/ecosystems/remote/huggingface.js +22 -0
- package/lib/ecosystems/rubyutils.js +538 -31
- package/lib/ecosystems/rusi.js +2 -4
- package/lib/ecosystems/scalacliutils.js +2 -0
- package/lib/ecosystems/scalasem.js +798 -152
- package/lib/ecosystems/vendoredCode.js +237 -3
- package/lib/ecosystems/venvProbe.js +360 -0
- package/lib/evinser/evinser.js +536 -71
- package/lib/evinser/scalasem.js +5 -1
- package/lib/helpers/agenticToolutils.js +525 -94
- package/lib/helpers/bomSigner.js +43 -9
- package/lib/helpers/jssSigner.js +1276 -0
- package/lib/helpers/vsixutils.js +1574 -315
- package/lib/inventory/agentBlueprint.js +193 -0
- package/lib/inventory/agentToolNames.js +145 -0
- package/lib/inventory/aiCollector.js +153 -7
- package/lib/inventory/aiInventory.js +44 -8
- package/lib/inventory/aiProviders.js +324 -0
- package/lib/inventory/atomUtils.js +77 -0
- package/lib/inventory/bomUtils.js +8 -1
- package/lib/inventory/brotliDecoder.js +142 -0
- package/lib/inventory/buildToolRateLimit.js +1 -1
- package/lib/inventory/cbomutils.js +56 -7
- package/lib/inventory/ciParsers/githubActionsLock.js +821 -0
- package/lib/inventory/citations.js +31 -2
- package/lib/inventory/communityAiConfigParser.js +978 -80
- package/lib/inventory/cyclonedx20.js +152 -0
- package/lib/inventory/cyclonedx20Common.js +286 -0
- package/lib/inventory/cyclonedx20Derived.js +159 -0
- package/lib/inventory/cyclonedx20Parties.js +552 -0
- package/lib/inventory/cyclonedx20Read.js +768 -0
- package/lib/inventory/cyclonedx20ReadCommon.js +374 -0
- package/lib/inventory/cyclonedx20ReadComponents.js +692 -0
- package/lib/inventory/cyclonedx20ReadContext.js +380 -0
- package/lib/inventory/cyclonedx20ReadEvidence.js +466 -0
- package/lib/inventory/cyclonedx20ReadSections.js +599 -0
- package/lib/inventory/cyclonedx20Render.js +766 -0
- package/lib/inventory/cyclonedx20RenderComponents.js +716 -0
- package/lib/inventory/cyclonedx20RenderDefinitions.js +405 -0
- package/lib/inventory/cyclonedx20RenderEvidence.js +726 -0
- package/lib/inventory/cyclonedx20RenderHardware.js +203 -0
- package/lib/inventory/cyclonedx20RenderPatents.js +174 -0
- package/lib/inventory/cyclonedx20RenderRefIds.js +314 -0
- package/lib/inventory/cyclonedx20RenderSections.js +499 -0
- package/lib/inventory/cyclonedx20Tables.js +594 -0
- package/lib/inventory/deps.js +141 -13
- package/lib/inventory/dosai.js +375 -6
- package/lib/inventory/dosaiParsers.js +3 -6
- package/lib/inventory/dotnetRuntime.js +367 -0
- package/lib/inventory/ecosystemFormulationParsers.js +979 -0
- package/lib/inventory/envcontext.js +436 -48
- package/lib/inventory/evidenceUtils.js +13 -1
- package/lib/inventory/fetchBatch.js +1 -1
- package/lib/inventory/formulationParsers.js +124 -14
- package/lib/inventory/gtfobins.js +13 -0
- package/lib/inventory/hbom.js +45 -6
- package/lib/inventory/hbomLoader.js +166 -0
- package/lib/inventory/hostRuntimeProbe.js +686 -0
- package/lib/inventory/jvmLocalRepos.js +9 -2
- package/lib/inventory/jvmToolEnv.js +29 -0
- package/lib/inventory/licenseEnhancer.js +12 -0
- package/lib/inventory/mavenCentralMirror.js +534 -0
- package/lib/inventory/mcpConfigParser.js +5 -0
- package/lib/inventory/nodeBuildInfo.js +218 -0
- package/lib/inventory/nodeHostProbe.js +202 -0
- package/lib/inventory/occurrenceKey.js +90 -0
- package/lib/inventory/osPackageResolver.js +182 -0
- package/lib/inventory/phpBuildInfo.js +10 -59
- package/lib/inventory/phpHostProbe.js +32 -488
- package/lib/inventory/pqcMigration.js +426 -0
- package/lib/inventory/rubyBuildInfo.js +972 -0
- package/lib/inventory/rubyHostProbe.js +218 -0
- package/lib/inventory/rustFormulationParser.js +21 -10
- package/lib/inventory/scalaCoords.js +4 -3
- package/lib/inventory/scalaDedupe.js +440 -0
- package/lib/inventory/source.js +114 -8
- package/lib/managers/binary.js +337 -3
- package/lib/managers/docker.js +79 -0
- package/lib/parsers/huggingfaceManifest.js +9 -1
- package/lib/parsers/huggingfaceUtils.js +18 -0
- package/lib/parsers/kiroPermissions.js +166 -0
- package/lib/parsers/largeJson.js +28 -11
- package/lib/parsers/vscodeExtensionId.js +183 -0
- package/lib/server/server.js +48 -35
- package/lib/stages/postgen/postgen.js +41 -1
- package/lib/stages/postgen/ruleEngine.js +13 -5
- package/lib/stages/postgen/specVersionCompat.js +76 -0
- package/lib/stages/pregen/envAudit.js +1 -0
- package/lib/stages/pregen/pregen.js +114 -57
- package/lib/validator/bomValidator.js +14 -2
- package/lib/validator/complianceEngine.js +30 -3
- package/lib/validator/complianceRules.js +1416 -4
- package/lib/validator/generated/validate-1.6.mjs +1 -1
- package/lib/validator/generated/validate-1.7.mjs +1 -1
- package/lib/validator/generated/validate-2.0.mjs +57554 -13851
- package/lib/validator/index.js +49 -8
- package/lib/validator/reporters/json.js +6 -0
- package/package.json +11 -10
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts +6 -2
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +29 -1
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +6 -0
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts +3 -18
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts +15 -0
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/boundedFile.d.ts +100 -0
- package/types/lib/core/boundedFile.d.ts.map +1 -0
- package/types/lib/core/brotliProbe.d.ts +37 -0
- package/types/lib/core/brotliProbe.d.ts.map +1 -0
- package/types/lib/core/env.d.ts +14 -0
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts +4 -0
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/globPatterns.d.ts +70 -0
- package/types/lib/core/globPatterns.d.ts.map +1 -0
- package/types/lib/core/httpClient.d.ts +24 -0
- package/types/lib/core/httpClient.d.ts.map +1 -1
- package/types/lib/core/lockPaths.d.ts +19 -0
- package/types/lib/core/lockPaths.d.ts.map +1 -0
- package/types/lib/core/paths.d.ts +9 -0
- package/types/lib/core/paths.d.ts.map +1 -1
- package/types/lib/core/processTree.d.ts +17 -4
- package/types/lib/core/processTree.d.ts.map +1 -1
- package/types/lib/core/projectConfig.d.ts +47 -8
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/toolRegistry.d.ts +36 -0
- package/types/lib/core/toolRegistry.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +40 -13
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts +2 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/gemHostProbe.d.ts +28 -0
- package/types/lib/ecosystems/gemHostProbe.d.ts.map +1 -0
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +294 -20
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts +14 -1
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts.map +1 -1
- package/types/lib/ecosystems/npmVersionResolution.d.ts +119 -0
- package/types/lib/ecosystems/npmVersionResolution.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-bazel.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +17 -20
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +19 -0
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +10 -0
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +19 -1
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +144 -12
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalasem.d.ts +58 -16
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
- package/types/lib/ecosystems/vendoredCode.d.ts +26 -0
- package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -1
- package/types/lib/ecosystems/venvProbe.d.ts +40 -0
- package/types/lib/ecosystems/venvProbe.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +120 -13
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/scalasem.d.ts.map +1 -1
- package/types/lib/helpers/agenticToolutils.d.ts +53 -19
- package/types/lib/helpers/agenticToolutils.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +20 -3
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/helpers/jssSigner.d.ts +288 -0
- package/types/lib/helpers/jssSigner.d.ts.map +1 -0
- package/types/lib/helpers/vsixutils.d.ts +303 -19
- package/types/lib/helpers/vsixutils.d.ts.map +1 -1
- package/types/lib/inventory/agentBlueprint.d.ts +70 -0
- package/types/lib/inventory/agentBlueprint.d.ts.map +1 -0
- package/types/lib/inventory/agentToolNames.d.ts +51 -0
- package/types/lib/inventory/agentToolNames.d.ts.map +1 -0
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/aiInventory.d.ts.map +1 -1
- package/types/lib/inventory/aiProviders.d.ts +85 -0
- package/types/lib/inventory/aiProviders.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +19 -0
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/bomUtils.d.ts.map +1 -1
- package/types/lib/inventory/brotliDecoder.d.ts +58 -0
- package/types/lib/inventory/brotliDecoder.d.ts.map +1 -0
- package/types/lib/inventory/cbomutils.d.ts +17 -0
- package/types/lib/inventory/cbomutils.d.ts.map +1 -1
- package/types/lib/inventory/ciParsers/githubActionsLock.d.ts +101 -0
- package/types/lib/inventory/ciParsers/githubActionsLock.d.ts.map +1 -0
- package/types/lib/inventory/citations.d.ts +5 -0
- package/types/lib/inventory/citations.d.ts.map +1 -1
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/cyclonedx20.d.ts +99 -0
- package/types/lib/inventory/cyclonedx20.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Common.d.ts +102 -0
- package/types/lib/inventory/cyclonedx20Common.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Derived.d.ts +74 -0
- package/types/lib/inventory/cyclonedx20Derived.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Parties.d.ts +91 -0
- package/types/lib/inventory/cyclonedx20Parties.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Read.d.ts +51 -0
- package/types/lib/inventory/cyclonedx20Read.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20ReadCommon.d.ts +69 -0
- package/types/lib/inventory/cyclonedx20ReadCommon.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20ReadComponents.d.ts +77 -0
- package/types/lib/inventory/cyclonedx20ReadComponents.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20ReadContext.d.ts +118 -0
- package/types/lib/inventory/cyclonedx20ReadContext.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts +40 -0
- package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20ReadSections.d.ts +45 -0
- package/types/lib/inventory/cyclonedx20ReadSections.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Render.d.ts +53 -0
- package/types/lib/inventory/cyclonedx20Render.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderComponents.d.ts +73 -0
- package/types/lib/inventory/cyclonedx20RenderComponents.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts +29 -0
- package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts +110 -0
- package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderHardware.d.ts +42 -0
- package/types/lib/inventory/cyclonedx20RenderHardware.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderPatents.d.ts +26 -0
- package/types/lib/inventory/cyclonedx20RenderPatents.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts +55 -0
- package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20RenderSections.d.ts +45 -0
- package/types/lib/inventory/cyclonedx20RenderSections.d.ts.map +1 -0
- package/types/lib/inventory/cyclonedx20Tables.d.ts +134 -0
- package/types/lib/inventory/cyclonedx20Tables.d.ts.map +1 -0
- package/types/lib/inventory/deps.d.ts +35 -2
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +36 -1
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
- package/types/lib/inventory/dotnetRuntime.d.ts +91 -0
- package/types/lib/inventory/dotnetRuntime.d.ts.map +1 -0
- package/types/lib/inventory/ecosystemFormulationParsers.d.ts +73 -0
- package/types/lib/inventory/ecosystemFormulationParsers.d.ts.map +1 -0
- package/types/lib/inventory/envcontext.d.ts +74 -12
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
- package/types/lib/inventory/gtfobins.d.ts.map +1 -1
- package/types/lib/inventory/hbom.d.ts +11 -0
- package/types/lib/inventory/hbom.d.ts.map +1 -1
- package/types/lib/inventory/hbomLoader.d.ts +54 -0
- package/types/lib/inventory/hbomLoader.d.ts.map +1 -1
- package/types/lib/inventory/hostRuntimeProbe.d.ts +44 -0
- package/types/lib/inventory/hostRuntimeProbe.d.ts.map +1 -0
- package/types/lib/inventory/jvmLocalRepos.d.ts +5 -1
- package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -1
- package/types/lib/inventory/jvmToolEnv.d.ts +12 -0
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
- package/types/lib/inventory/licenseEnhancer.d.ts.map +1 -1
- package/types/lib/inventory/mavenCentralMirror.d.ts +170 -0
- package/types/lib/inventory/mavenCentralMirror.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/nodeBuildInfo.d.ts +95 -0
- package/types/lib/inventory/nodeBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/nodeHostProbe.d.ts +15 -0
- package/types/lib/inventory/nodeHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/occurrenceKey.d.ts +52 -0
- package/types/lib/inventory/occurrenceKey.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +38 -0
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
- package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -1
- package/types/lib/inventory/phpHostProbe.d.ts.map +1 -1
- package/types/lib/inventory/pqcMigration.d.ts +84 -0
- package/types/lib/inventory/pqcMigration.d.ts.map +1 -0
- package/types/lib/inventory/rubyBuildInfo.d.ts +271 -0
- package/types/lib/inventory/rubyBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/rubyHostProbe.d.ts +47 -0
- package/types/lib/inventory/rubyHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/rustFormulationParser.d.ts +7 -2
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/scalaCoords.d.ts.map +1 -1
- package/types/lib/inventory/scalaDedupe.d.ts +43 -0
- package/types/lib/inventory/scalaDedupe.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts +25 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +12 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/parsers/huggingfaceManifest.d.ts +10 -1
- package/types/lib/parsers/huggingfaceManifest.d.ts.map +1 -1
- package/types/lib/parsers/huggingfaceUtils.d.ts +12 -0
- package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
- package/types/lib/parsers/kiroPermissions.d.ts +62 -0
- package/types/lib/parsers/kiroPermissions.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +4 -3
- package/types/lib/parsers/largeJson.d.ts.map +1 -1
- package/types/lib/parsers/vscodeExtensionId.d.ts +48 -0
- package/types/lib/parsers/vscodeExtensionId.d.ts.map +1 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts +7 -0
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts +25 -0
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +12 -8
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts +5 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/complianceEngine.d.ts +4 -4
- package/types/lib/validator/complianceEngine.d.ts.map +1 -1
- package/types/lib/validator/complianceRules.d.ts +14 -2
- package/types/lib/validator/complianceRules.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +10 -0
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frozen lookup tables for the CycloneDX 2.0 renderer and reader: schema enums,
|
|
3
|
+
* the aggregate spelling table, the pinned 2.0 cryptography enums and the field
|
|
4
|
+
* lists that say which 1.x members each converter carries. Every value is
|
|
5
|
+
* quoted from the pinned draft schema
|
|
6
|
+
* (data/cyclonedx-2.0-bundled.schema.json, CycloneDX/specification 2.0-dev at
|
|
7
|
+
* ea8c3605829d1da13339a0790b6da73548e42a6b).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { readFileSync } from "node:fs";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
|
|
13
|
+
import { dirNameStr } from "../core/paths.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal key that carries 2.0-only sections (risks, blueprints, threats,
|
|
17
|
+
* controls, perspectives, profiles, declarations and definitions.parties)
|
|
18
|
+
* through the 1.x-shaped model so a read-then-render round trip preserves
|
|
19
|
+
* them. Never serialized: renderCycloneDx20 re-emits them and
|
|
20
|
+
* applySpecVersionCompatibility strips the key for 1.x output.
|
|
21
|
+
*/
|
|
22
|
+
export const CDX20_INTERNAL_SECTIONS_KEY = "cdx20Sections";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The formula property that names, as a JSON array of refIds, the
|
|
26
|
+
* definitions components of a subject-less 2.0 document that belong to the
|
|
27
|
+
* formula (2.0 has no formula member for them).
|
|
28
|
+
*/
|
|
29
|
+
export const FORMULA_COMPONENT_REFS_PROPERTY = "cdx:formulation:componentRefs";
|
|
30
|
+
|
|
31
|
+
/** refId of the cdxgen party declared in definitions.parties. */
|
|
32
|
+
export const CDXGEN_PARTY_REF_ID = "party-cdxgen";
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Message shown when a CycloneDX 2.0 document would be uploaded to
|
|
36
|
+
* Dependency-Track, which ingests CycloneDX 1.x only.
|
|
37
|
+
*/
|
|
38
|
+
export const DEPENDENCY_TRACK_CDX20_ERROR =
|
|
39
|
+
"Dependency-Track does not ingest the CycloneDX 2.0 draft, so a 2.0 document cannot be uploaded with --server-url. Generate with --spec-version 1.7 to upload to Dependency-Track.";
|
|
40
|
+
|
|
41
|
+
/** identityScheme enum (#/$defs/cyclonedx-component-2.0/$defs/identityScheme). */
|
|
42
|
+
export const IDENTITY_SCHEME_ENUM = new Set([
|
|
43
|
+
"purl",
|
|
44
|
+
"cpe",
|
|
45
|
+
"swid",
|
|
46
|
+
"swhid",
|
|
47
|
+
"omniborid",
|
|
48
|
+
"epc-rfid",
|
|
49
|
+
"giai",
|
|
50
|
+
"gln",
|
|
51
|
+
"gmn",
|
|
52
|
+
"gtin-8",
|
|
53
|
+
"gtin-12",
|
|
54
|
+
"gtin-13",
|
|
55
|
+
"gtin-14",
|
|
56
|
+
"mpn",
|
|
57
|
+
"part-number",
|
|
58
|
+
"model-number",
|
|
59
|
+
"sku",
|
|
60
|
+
"serial-number",
|
|
61
|
+
"asset-tag",
|
|
62
|
+
"udi-di",
|
|
63
|
+
"udi-pi",
|
|
64
|
+
"fcc-id",
|
|
65
|
+
"imei",
|
|
66
|
+
"mac-address",
|
|
67
|
+
"tei",
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
// identificationMethod
|
|
71
|
+
// (#/$defs/cyclonedx-evidence-2.0/$defs/identificationMethod) forbids these
|
|
72
|
+
// techniques for identity evidence; methods using them are dropped at 2.0.
|
|
73
|
+
export const FORBIDDEN_IDENTITY_TECHNIQUES = new Set([
|
|
74
|
+
"signature",
|
|
75
|
+
"reachability-analysis",
|
|
76
|
+
"taint-analysis",
|
|
77
|
+
"penetration-testing",
|
|
78
|
+
"exploitation",
|
|
79
|
+
"runtime-protection",
|
|
80
|
+
"emulation",
|
|
81
|
+
"pipeline-analysis",
|
|
82
|
+
"infrastructure-as-code-analysis",
|
|
83
|
+
"mobile-analysis",
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
// analysisTechnique enum values; `other` (1.x) is gone and `unknown` was added.
|
|
87
|
+
export const ANALYSIS_TECHNIQUE_ENUM = new Set([
|
|
88
|
+
"source-code-analysis",
|
|
89
|
+
"binary-analysis",
|
|
90
|
+
"dynamic-analysis",
|
|
91
|
+
"instrumentation",
|
|
92
|
+
"manifest-analysis",
|
|
93
|
+
"ast-fingerprint",
|
|
94
|
+
"content-match",
|
|
95
|
+
"hash-comparison",
|
|
96
|
+
"filename",
|
|
97
|
+
"software-identifier",
|
|
98
|
+
"signature",
|
|
99
|
+
"reachability-analysis",
|
|
100
|
+
"taint-analysis",
|
|
101
|
+
"penetration-testing",
|
|
102
|
+
"exploitation",
|
|
103
|
+
"runtime-protection",
|
|
104
|
+
"emulation",
|
|
105
|
+
"pipeline-analysis",
|
|
106
|
+
"infrastructure-as-code-analysis",
|
|
107
|
+
"mobile-analysis",
|
|
108
|
+
"visual-inspection",
|
|
109
|
+
"x-ray-inspection",
|
|
110
|
+
"electrical-testing",
|
|
111
|
+
"material-analysis",
|
|
112
|
+
"decapsulation",
|
|
113
|
+
"manual-review",
|
|
114
|
+
"attestation",
|
|
115
|
+
"unknown",
|
|
116
|
+
]);
|
|
117
|
+
|
|
118
|
+
// aggregateType (#/$defs/cyclonedx-composition-2.0/$defs/aggregateType):
|
|
119
|
+
// 2.0 spells the incomplete qualifiers with hyphens where 1.x used
|
|
120
|
+
// underscores. An explicit, frozen table, never a regex.
|
|
121
|
+
export const AGGREGATE_1X_TO_20 = Object.freeze({
|
|
122
|
+
complete: "complete",
|
|
123
|
+
incomplete: "incomplete",
|
|
124
|
+
incomplete_first_party_only: "incomplete-first-party-only",
|
|
125
|
+
incomplete_first_party_proprietary_only:
|
|
126
|
+
"incomplete-first-party-proprietary-only",
|
|
127
|
+
incomplete_first_party_opensource_only:
|
|
128
|
+
"incomplete-first-party-opensource-only",
|
|
129
|
+
incomplete_third_party_only: "incomplete-third-party-only",
|
|
130
|
+
incomplete_third_party_proprietary_only:
|
|
131
|
+
"incomplete-third-party-proprietary-only",
|
|
132
|
+
incomplete_third_party_opensource_only:
|
|
133
|
+
"incomplete-third-party-opensource-only",
|
|
134
|
+
unknown: "unknown",
|
|
135
|
+
not_specified: "not-specified",
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
/** The inverse of AGGREGATE_1X_TO_20. */
|
|
139
|
+
export const AGGREGATE_20_TO_1X = Object.freeze(
|
|
140
|
+
Object.fromEntries(
|
|
141
|
+
Object.entries(AGGREGATE_1X_TO_20).map(([oneX, twoOh]) => [twoOh, oneX]),
|
|
142
|
+
),
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
// The pinned 2.0 cryptography defs
|
|
146
|
+
// (data/cyclonedx-2.0-cryptography-defs.schema.json, the
|
|
147
|
+
// ../cryptography-defs.schema.json the bundled schema references), read once.
|
|
148
|
+
// algorithmFamily
|
|
149
|
+
// (#/$defs/cyclonedx-cryptography-2.0/$defs/cryptoProperties/properties/algorithmProperties/properties/algorithmFamily)
|
|
150
|
+
// and protocolProperties.type are closed enums there; unlike 1.x, the 2.0
|
|
151
|
+
// protocol enum has no `other`/`unknown`.
|
|
152
|
+
const CRYPTO_DEFS_20 = JSON.parse(
|
|
153
|
+
readFileSync(
|
|
154
|
+
join(dirNameStr, "data", "cyclonedx-2.0-cryptography-defs.schema.json"),
|
|
155
|
+
"utf-8",
|
|
156
|
+
),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
/** 2.0 algorithmFamily values (pinned 2.0 cryptography defs). */
|
|
160
|
+
export const ALGORITHM_FAMILY_ENUM = Object.freeze(
|
|
161
|
+
new Set(CRYPTO_DEFS_20.definitions.algorithmFamiliesEnum.enum),
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
/** 2.0 protocolProperties.type values (pinned 2.0 cryptography defs). */
|
|
165
|
+
export const PROTOCOL_FAMILY_ENUM = Object.freeze(
|
|
166
|
+
new Set(CRYPTO_DEFS_20.definitions.protocolFamiliesEnum.enum),
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
// componentData.type (#/$defs/cyclonedx-component-2.0/$defs/componentData).
|
|
170
|
+
export const COMPONENT_DATA_TYPE_ENUM = new Set([
|
|
171
|
+
"source-code",
|
|
172
|
+
"configuration",
|
|
173
|
+
"dataset",
|
|
174
|
+
"definition",
|
|
175
|
+
"other",
|
|
176
|
+
]);
|
|
177
|
+
|
|
178
|
+
// dataClassification (#/$defs/cyclonedx-data-2.0/$defs/dataClassification):
|
|
179
|
+
// one of these values or a custom `{name}`. 1.x allowed any string.
|
|
180
|
+
export const DATA_CLASSIFICATION_ENUM = new Set([
|
|
181
|
+
"confidential",
|
|
182
|
+
"internal",
|
|
183
|
+
"public",
|
|
184
|
+
"restricted",
|
|
185
|
+
"classified",
|
|
186
|
+
]);
|
|
187
|
+
|
|
188
|
+
// postalAddress (#/$defs/cyclonedx-party-2.0/$defs/postalAddress and
|
|
189
|
+
// #/$defs/cyclonedx-common-2.0/$defs/postalAddress) fields shared with 1.x.
|
|
190
|
+
export const POSTAL_ADDRESS_FIELDS = [
|
|
191
|
+
"country",
|
|
192
|
+
"region",
|
|
193
|
+
"locality",
|
|
194
|
+
"postOfficeBoxNumber",
|
|
195
|
+
"postalCode",
|
|
196
|
+
"streetAddress",
|
|
197
|
+
];
|
|
198
|
+
|
|
199
|
+
// Keys under which a component entry may be replaced by a componentReference
|
|
200
|
+
// (#/$defs/cyclonedx-component-2.0/$defs/componentEntry and the pedigree
|
|
201
|
+
// ancestor/descendant/variant items).
|
|
202
|
+
export const COMPONENT_ENTRY_ARRAY_KEYS = new Set([
|
|
203
|
+
"components",
|
|
204
|
+
"ancestors",
|
|
205
|
+
"descendants",
|
|
206
|
+
"variants",
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
// licenseEvidence members besides license/expression that a 2.0 document read
|
|
210
|
+
// back into the internal model may carry.
|
|
211
|
+
export const LICENSE_EVIDENCE_DETAIL_FIELDS = [
|
|
212
|
+
"refId",
|
|
213
|
+
"confidence",
|
|
214
|
+
"methods",
|
|
215
|
+
"tools",
|
|
216
|
+
"occurrences",
|
|
217
|
+
"assertion",
|
|
218
|
+
"timestamp",
|
|
219
|
+
];
|
|
220
|
+
|
|
221
|
+
/** 1.x componentData members the renderer handles. */
|
|
222
|
+
export const COMPONENT_DATA_FIELDS = new Set([
|
|
223
|
+
"bom-ref",
|
|
224
|
+
"type",
|
|
225
|
+
"name",
|
|
226
|
+
"contents",
|
|
227
|
+
"classification",
|
|
228
|
+
"sensitiveData",
|
|
229
|
+
"graphics",
|
|
230
|
+
"governance",
|
|
231
|
+
]);
|
|
232
|
+
|
|
233
|
+
// Component fields copied by name; `pedigree` and `licenses` are converted in
|
|
234
|
+
// place afterwards so the key order stays stable.
|
|
235
|
+
export const COMPONENT_COPY_FIELDS = [
|
|
236
|
+
"type",
|
|
237
|
+
"name",
|
|
238
|
+
"version",
|
|
239
|
+
"group",
|
|
240
|
+
"description",
|
|
241
|
+
"scope",
|
|
242
|
+
"copyright",
|
|
243
|
+
"hashes",
|
|
244
|
+
"properties",
|
|
245
|
+
"externalReferences",
|
|
246
|
+
"tags",
|
|
247
|
+
"pedigree",
|
|
248
|
+
"versionRange",
|
|
249
|
+
"isExternal",
|
|
250
|
+
"patentAssertions",
|
|
251
|
+
"endpoints",
|
|
252
|
+
"releaseNotes",
|
|
253
|
+
"certifications",
|
|
254
|
+
"quantity",
|
|
255
|
+
];
|
|
256
|
+
|
|
257
|
+
/** 1.x component members the renderer handles; the rest are counted. */
|
|
258
|
+
export const COMPONENT_HANDLED_FIELDS = new Set([
|
|
259
|
+
...COMPONENT_COPY_FIELDS,
|
|
260
|
+
"bom-ref",
|
|
261
|
+
"purl",
|
|
262
|
+
"cpe",
|
|
263
|
+
"swid",
|
|
264
|
+
"omniborId",
|
|
265
|
+
"swhid",
|
|
266
|
+
"author",
|
|
267
|
+
"authors",
|
|
268
|
+
"publisher",
|
|
269
|
+
"supplier",
|
|
270
|
+
"manufacturer",
|
|
271
|
+
"licenses",
|
|
272
|
+
"mimeType",
|
|
273
|
+
"mime-type",
|
|
274
|
+
"modelCard",
|
|
275
|
+
"modelProperties",
|
|
276
|
+
"evidence",
|
|
277
|
+
"cryptoProperties",
|
|
278
|
+
"data",
|
|
279
|
+
"components",
|
|
280
|
+
"services",
|
|
281
|
+
]);
|
|
282
|
+
|
|
283
|
+
// Service fields copied by name; `licenses` is converted in place afterwards.
|
|
284
|
+
export const SERVICE_COPY_FIELDS = [
|
|
285
|
+
"name",
|
|
286
|
+
"version",
|
|
287
|
+
"group",
|
|
288
|
+
"description",
|
|
289
|
+
"endpoints",
|
|
290
|
+
"licenses",
|
|
291
|
+
"properties",
|
|
292
|
+
"tags",
|
|
293
|
+
"externalReferences",
|
|
294
|
+
"releaseNotes",
|
|
295
|
+
"patentAssertions",
|
|
296
|
+
];
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* 1.x service members without a 2.0 field, carried at 2.0 as the documented
|
|
300
|
+
* cdx:service:* properties (docs/CUSTOM_PROPERTIES.md) so the mcp-server
|
|
301
|
+
* audit rules keep firing on a document read back from 2.0. Each entry is
|
|
302
|
+
* [1.x field, property name, value kind]; the renderer appends them in this
|
|
303
|
+
* order and the reader turns them back into the 1.x fields.
|
|
304
|
+
*/
|
|
305
|
+
export const CARRIED_SERVICE_PROPERTIES = Object.freeze([
|
|
306
|
+
Object.freeze(["authenticated", "cdx:service:authenticated", "boolean"]),
|
|
307
|
+
Object.freeze(["x-trust-boundary", "cdx:service:xTrustBoundary", "boolean"]),
|
|
308
|
+
Object.freeze(["trustZone", "cdx:service:trustZone", "string"]),
|
|
309
|
+
]);
|
|
310
|
+
|
|
311
|
+
/** 1.x service members the renderer handles; the rest are counted. */
|
|
312
|
+
export const SERVICE_HANDLED_FIELDS = new Set([
|
|
313
|
+
...SERVICE_COPY_FIELDS,
|
|
314
|
+
...CARRIED_SERVICE_PROPERTIES.map(([field]) => field),
|
|
315
|
+
"bom-ref",
|
|
316
|
+
"provider",
|
|
317
|
+
"data",
|
|
318
|
+
"evidence",
|
|
319
|
+
"services",
|
|
320
|
+
]);
|
|
321
|
+
|
|
322
|
+
// ---------------------------------------------------------------------------
|
|
323
|
+
// 1.x tables the reader checks 2.0 values against. They are quoted from
|
|
324
|
+
// data/bom-1.7.schema.json and data/cryptography-defs.schema.json (the
|
|
325
|
+
// newest 1.x the internal model follows); cyclonedx20Read.poku.js compares
|
|
326
|
+
// each one with the schema so they cannot drift.
|
|
327
|
+
// ---------------------------------------------------------------------------
|
|
328
|
+
|
|
329
|
+
const CRYPTO_DEFS_1X = JSON.parse(
|
|
330
|
+
readFileSync(
|
|
331
|
+
join(dirNameStr, "data", "cryptography-defs.schema.json"),
|
|
332
|
+
"utf-8",
|
|
333
|
+
),
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
/** 1.x algorithmFamily values (cryptography-defs algorithmFamiliesEnum). */
|
|
337
|
+
export const ALGORITHM_FAMILY_1X = Object.freeze(
|
|
338
|
+
new Set(CRYPTO_DEFS_1X.definitions.algorithmFamiliesEnum.enum),
|
|
339
|
+
);
|
|
340
|
+
|
|
341
|
+
/** 1.x ellipticCurve values (cryptography-defs ellipticCurvesEnum). */
|
|
342
|
+
export const ELLIPTIC_CURVE_1X = Object.freeze(
|
|
343
|
+
new Set(CRYPTO_DEFS_1X.definitions.ellipticCurvesEnum.enum),
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
/** 1.7 externalReference.type values. */
|
|
347
|
+
export const EXTERNAL_REFERENCE_TYPES_1X = Object.freeze(
|
|
348
|
+
new Set([
|
|
349
|
+
"vcs",
|
|
350
|
+
"issue-tracker",
|
|
351
|
+
"website",
|
|
352
|
+
"advisories",
|
|
353
|
+
"bom",
|
|
354
|
+
"mailing-list",
|
|
355
|
+
"social",
|
|
356
|
+
"chat",
|
|
357
|
+
"documentation",
|
|
358
|
+
"support",
|
|
359
|
+
"source-distribution",
|
|
360
|
+
"distribution",
|
|
361
|
+
"distribution-intake",
|
|
362
|
+
"license",
|
|
363
|
+
"build-meta",
|
|
364
|
+
"build-system",
|
|
365
|
+
"release-notes",
|
|
366
|
+
"security-contact",
|
|
367
|
+
"model-card",
|
|
368
|
+
"log",
|
|
369
|
+
"configuration",
|
|
370
|
+
"evidence",
|
|
371
|
+
"formulation",
|
|
372
|
+
"attestation",
|
|
373
|
+
"threat-model",
|
|
374
|
+
"adversary-model",
|
|
375
|
+
"risk-assessment",
|
|
376
|
+
"vulnerability-assertion",
|
|
377
|
+
"exploitability-statement",
|
|
378
|
+
"pentest-report",
|
|
379
|
+
"static-analysis-report",
|
|
380
|
+
"dynamic-analysis-report",
|
|
381
|
+
"runtime-analysis-report",
|
|
382
|
+
"component-analysis-report",
|
|
383
|
+
"maturity-report",
|
|
384
|
+
"certification-report",
|
|
385
|
+
"codified-infrastructure",
|
|
386
|
+
"quality-metrics",
|
|
387
|
+
"poam",
|
|
388
|
+
"electronic-signature",
|
|
389
|
+
"digital-signature",
|
|
390
|
+
"rfc-9116",
|
|
391
|
+
"patent",
|
|
392
|
+
"patent-family",
|
|
393
|
+
"patent-assertion",
|
|
394
|
+
"citation",
|
|
395
|
+
"other",
|
|
396
|
+
]),
|
|
397
|
+
);
|
|
398
|
+
|
|
399
|
+
/** 1.7 component.type values. */
|
|
400
|
+
export const COMPONENT_TYPES_1X = Object.freeze(
|
|
401
|
+
new Set([
|
|
402
|
+
"application",
|
|
403
|
+
"framework",
|
|
404
|
+
"library",
|
|
405
|
+
"container",
|
|
406
|
+
"platform",
|
|
407
|
+
"operating-system",
|
|
408
|
+
"device",
|
|
409
|
+
"device-driver",
|
|
410
|
+
"firmware",
|
|
411
|
+
"file",
|
|
412
|
+
"machine-learning-model",
|
|
413
|
+
"data",
|
|
414
|
+
"cryptographic-asset",
|
|
415
|
+
]),
|
|
416
|
+
);
|
|
417
|
+
|
|
418
|
+
/** 1.7 componentIdentityEvidence.field values. */
|
|
419
|
+
export const IDENTITY_FIELDS_1X = Object.freeze(
|
|
420
|
+
new Set([
|
|
421
|
+
"group",
|
|
422
|
+
"name",
|
|
423
|
+
"version",
|
|
424
|
+
"purl",
|
|
425
|
+
"cpe",
|
|
426
|
+
"omniborId",
|
|
427
|
+
"swhid",
|
|
428
|
+
"swid",
|
|
429
|
+
"hash",
|
|
430
|
+
]),
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
/** 1.7 identity-evidence method techniques. */
|
|
434
|
+
export const IDENTITY_TECHNIQUES_1X = Object.freeze(
|
|
435
|
+
new Set([
|
|
436
|
+
"source-code-analysis",
|
|
437
|
+
"binary-analysis",
|
|
438
|
+
"manifest-analysis",
|
|
439
|
+
"ast-fingerprint",
|
|
440
|
+
"hash-comparison",
|
|
441
|
+
"instrumentation",
|
|
442
|
+
"dynamic-analysis",
|
|
443
|
+
"filename",
|
|
444
|
+
"attestation",
|
|
445
|
+
"other",
|
|
446
|
+
]),
|
|
447
|
+
);
|
|
448
|
+
|
|
449
|
+
/** 1.7 vulnerability rating `method` values (scoreMethod). */
|
|
450
|
+
export const SCORE_METHODS_1X = Object.freeze(
|
|
451
|
+
new Set(["CVSSv2", "CVSSv3", "CVSSv31", "CVSSv4", "OWASP", "SSVC", "other"]),
|
|
452
|
+
);
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* 1.7 cryptoProperties algorithmProperties enums, by member name. Members
|
|
456
|
+
* whose 2.0 value is a list in 1.7 too are checked entry by entry.
|
|
457
|
+
*/
|
|
458
|
+
export const ALGORITHM_PROPERTY_ENUMS_1X = Object.freeze({
|
|
459
|
+
primitive: Object.freeze(
|
|
460
|
+
new Set([
|
|
461
|
+
"drbg",
|
|
462
|
+
"mac",
|
|
463
|
+
"block-cipher",
|
|
464
|
+
"stream-cipher",
|
|
465
|
+
"signature",
|
|
466
|
+
"hash",
|
|
467
|
+
"pke",
|
|
468
|
+
"xof",
|
|
469
|
+
"kdf",
|
|
470
|
+
"key-agree",
|
|
471
|
+
"kem",
|
|
472
|
+
"ae",
|
|
473
|
+
"combiner",
|
|
474
|
+
"key-wrap",
|
|
475
|
+
"other",
|
|
476
|
+
"unknown",
|
|
477
|
+
]),
|
|
478
|
+
),
|
|
479
|
+
executionEnvironment: Object.freeze(
|
|
480
|
+
new Set([
|
|
481
|
+
"software-plain-ram",
|
|
482
|
+
"software-encrypted-ram",
|
|
483
|
+
"software-tee",
|
|
484
|
+
"hardware",
|
|
485
|
+
"other",
|
|
486
|
+
"unknown",
|
|
487
|
+
]),
|
|
488
|
+
),
|
|
489
|
+
implementationPlatform: Object.freeze(
|
|
490
|
+
new Set([
|
|
491
|
+
"generic",
|
|
492
|
+
"x86_32",
|
|
493
|
+
"x86_64",
|
|
494
|
+
"armv7-a",
|
|
495
|
+
"armv7-m",
|
|
496
|
+
"armv8-a",
|
|
497
|
+
"armv8-m",
|
|
498
|
+
"armv9-a",
|
|
499
|
+
"armv9-m",
|
|
500
|
+
"s390x",
|
|
501
|
+
"ppc64",
|
|
502
|
+
"ppc64le",
|
|
503
|
+
"other",
|
|
504
|
+
"unknown",
|
|
505
|
+
]),
|
|
506
|
+
),
|
|
507
|
+
mode: Object.freeze(
|
|
508
|
+
new Set([
|
|
509
|
+
"cbc",
|
|
510
|
+
"ecb",
|
|
511
|
+
"ccm",
|
|
512
|
+
"gcm",
|
|
513
|
+
"cfb",
|
|
514
|
+
"ofb",
|
|
515
|
+
"ctr",
|
|
516
|
+
"other",
|
|
517
|
+
"unknown",
|
|
518
|
+
]),
|
|
519
|
+
),
|
|
520
|
+
padding: Object.freeze(
|
|
521
|
+
new Set(["pkcs5", "pkcs7", "pkcs1v15", "oaep", "raw", "other", "unknown"]),
|
|
522
|
+
),
|
|
523
|
+
cryptoFunctions: Object.freeze(
|
|
524
|
+
new Set([
|
|
525
|
+
"generate",
|
|
526
|
+
"keygen",
|
|
527
|
+
"encrypt",
|
|
528
|
+
"decrypt",
|
|
529
|
+
"digest",
|
|
530
|
+
"tag",
|
|
531
|
+
"keyderive",
|
|
532
|
+
"sign",
|
|
533
|
+
"verify",
|
|
534
|
+
"encapsulate",
|
|
535
|
+
"decapsulate",
|
|
536
|
+
"other",
|
|
537
|
+
"unknown",
|
|
538
|
+
]),
|
|
539
|
+
),
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
/** 1.7 protocolProperties.type values. */
|
|
543
|
+
export const PROTOCOL_TYPES_1X = Object.freeze(
|
|
544
|
+
new Set([
|
|
545
|
+
"tls",
|
|
546
|
+
"ssh",
|
|
547
|
+
"ipsec",
|
|
548
|
+
"ike",
|
|
549
|
+
"sstp",
|
|
550
|
+
"wpa",
|
|
551
|
+
"dtls",
|
|
552
|
+
"quic",
|
|
553
|
+
"eap-aka",
|
|
554
|
+
"eap-aka-prime",
|
|
555
|
+
"prins",
|
|
556
|
+
"5g-aka",
|
|
557
|
+
"other",
|
|
558
|
+
"unknown",
|
|
559
|
+
]),
|
|
560
|
+
);
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Party roles (#/$defs/cyclonedx-party-2.0/$defs/preDefinedRole) the 1.x
|
|
564
|
+
* component and service fields can hold, with the 1.x field.
|
|
565
|
+
*/
|
|
566
|
+
export const PARTY_ROLE_FIELDS_1X = Object.freeze({
|
|
567
|
+
supplier: "supplier",
|
|
568
|
+
manufacturer: "manufacturer",
|
|
569
|
+
author: "authors",
|
|
570
|
+
publisher: "publisher",
|
|
571
|
+
provider: "provider",
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Identity schemes (#/$defs/cyclonedx-component-2.0/$defs/identityScheme) the
|
|
576
|
+
* 1.x identifier fields hold, with the 1.x field. `omniborid` and `swhid` are
|
|
577
|
+
* lists in 1.x; the others hold one value.
|
|
578
|
+
*/
|
|
579
|
+
export const IDENTITY_SCHEME_FIELDS_1X = Object.freeze({
|
|
580
|
+
purl: "purl",
|
|
581
|
+
cpe: "cpe",
|
|
582
|
+
swid: "swid",
|
|
583
|
+
omniborid: "omniborId",
|
|
584
|
+
swhid: "swhid",
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
/** 2.0 identity-evidence scheme → 1.x field, for the predefined schemes. */
|
|
588
|
+
export const IDENTITY_EVIDENCE_SCHEME_TO_FIELD = Object.freeze({
|
|
589
|
+
purl: "purl",
|
|
590
|
+
cpe: "cpe",
|
|
591
|
+
swid: "swid",
|
|
592
|
+
swhid: "swhid",
|
|
593
|
+
omniborid: "omniborId",
|
|
594
|
+
});
|