@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,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render the CycloneDX 2.0 sections that sit beside the inventory:
|
|
3
|
+
* compositions, annotations, citations, vulnerabilities and formulation.
|
|
4
|
+
* Each converter restores an entry readCycloneDx20 kept as a shadow while
|
|
5
|
+
* the entry is unchanged.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Render compositions (#/$defs/cyclonedx-composition-2.0/$defs/composition,
|
|
9
|
+
* required `[kind, aggregate, targets]`). The composition's own 1.x
|
|
10
|
+
* `bom-ref` (cdxgen sets it to the subject's bom-ref) is not carried, so it
|
|
11
|
+
* cannot collide with the subject's refId.
|
|
12
|
+
*/
|
|
13
|
+
export declare function renderCompositions(compositions: any, inventory: any, carried: any, stats: any): any[] | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Render annotations (#/$defs/cyclonedx-annotation-2.0/$defs/annotation,
|
|
16
|
+
* required `[subjects, annotator, timestamp, text]`). Subjects are checked
|
|
17
|
+
* against the declared refIds once the whole document exists
|
|
18
|
+
* (see resolveAnnotationSubjects).
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderAnnotations(annotations: any, stats: any): any[] | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Render citations (#/$defs/cyclonedx-citation-2.0/$defs/citation).
|
|
23
|
+
* `attributedTo` is a refLinkType, so it names a declared object's refId; the
|
|
24
|
+
* cdxgen tool's bom-ref becomes exactly that refId. A citation may carry
|
|
25
|
+
* `attributedTo`, `process` or both, so only the ref rename and the
|
|
26
|
+
* expression rewrite are targeted.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderCitations(citations: any, usesInventory: any, stats: any): any[] | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Render vulnerabilities: `bom-ref` → `refId`, `cwes` → `weaknesses`, the
|
|
31
|
+
* tools object, credits as 2.0 organizations and contacts and the proof of
|
|
32
|
+
* concept's attachments. Members 2.0 has no field for are counted; `affects`
|
|
33
|
+
* references are resolved once every refId is known (resolveAffectsRefs).
|
|
34
|
+
*/
|
|
35
|
+
export declare function renderVulnerabilities(vulnerabilities: any, stats: any): any[] | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* formulation → workflows/tasks/triggers with refId renames. The 2.0 formula
|
|
38
|
+
* allows only refId, properties and workflows
|
|
39
|
+
* (#/$defs/cyclonedx-formulation-2.0/$defs/formula), so the 1.x
|
|
40
|
+
* formula.components move to definitions.components (upstream's
|
|
41
|
+
* valid-formulation-2.0.json declares them there too) and are collected in
|
|
42
|
+
* `stats.formulaComponents`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function convertFormulation(formulation: any, stats: any): any;
|
|
45
|
+
//# sourceMappingURL=cyclonedx20RenderSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cyclonedx20RenderSections.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cyclonedx20RenderSections.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsEH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,KAAA,EAAE,SAAS,KAAA,EAAE,OAAO,KAAA,EAAE,KAAK,KAAA,qBAwCzE;AAwBD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,KAAA,EAAE,KAAK,KAAA,qBAiCnD;AA4BD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,KAAA,EAAE,aAAa,KAAA,EAAE,KAAK,KAAA,qBAqB9D;AAkHD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,KAAA,EAAE,KAAK,KAAA,qBA+C3D;AAgBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,KAAA,EAAE,KAAK,KAAA,OA8DpD"}
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
* Internal key that carries 2.0-only sections (risks, blueprints, threats,
|
|
11
|
+
* controls, perspectives, profiles, declarations and definitions.parties)
|
|
12
|
+
* through the 1.x-shaped model so a read-then-render round trip preserves
|
|
13
|
+
* them. Never serialized: renderCycloneDx20 re-emits them and
|
|
14
|
+
* applySpecVersionCompatibility strips the key for 1.x output.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CDX20_INTERNAL_SECTIONS_KEY = "cdx20Sections";
|
|
17
|
+
/**
|
|
18
|
+
* The formula property that names, as a JSON array of refIds, the
|
|
19
|
+
* definitions components of a subject-less 2.0 document that belong to the
|
|
20
|
+
* formula (2.0 has no formula member for them).
|
|
21
|
+
*/
|
|
22
|
+
export declare const FORMULA_COMPONENT_REFS_PROPERTY = "cdx:formulation:componentRefs";
|
|
23
|
+
/** refId of the cdxgen party declared in definitions.parties. */
|
|
24
|
+
export declare const CDXGEN_PARTY_REF_ID = "party-cdxgen";
|
|
25
|
+
/**
|
|
26
|
+
* Message shown when a CycloneDX 2.0 document would be uploaded to
|
|
27
|
+
* Dependency-Track, which ingests CycloneDX 1.x only.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEPENDENCY_TRACK_CDX20_ERROR = "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.";
|
|
30
|
+
/** identityScheme enum (#/$defs/cyclonedx-component-2.0/$defs/identityScheme). */
|
|
31
|
+
export declare const IDENTITY_SCHEME_ENUM: Set<string>;
|
|
32
|
+
export declare const FORBIDDEN_IDENTITY_TECHNIQUES: Set<string>;
|
|
33
|
+
export declare const ANALYSIS_TECHNIQUE_ENUM: Set<string>;
|
|
34
|
+
export declare const AGGREGATE_1X_TO_20: Readonly<{
|
|
35
|
+
complete: "complete";
|
|
36
|
+
incomplete: "incomplete";
|
|
37
|
+
incomplete_first_party_only: "incomplete-first-party-only";
|
|
38
|
+
incomplete_first_party_proprietary_only: "incomplete-first-party-proprietary-only";
|
|
39
|
+
incomplete_first_party_opensource_only: "incomplete-first-party-opensource-only";
|
|
40
|
+
incomplete_third_party_only: "incomplete-third-party-only";
|
|
41
|
+
incomplete_third_party_proprietary_only: "incomplete-third-party-proprietary-only";
|
|
42
|
+
incomplete_third_party_opensource_only: "incomplete-third-party-opensource-only";
|
|
43
|
+
unknown: "unknown";
|
|
44
|
+
not_specified: "not-specified";
|
|
45
|
+
}>;
|
|
46
|
+
/** The inverse of AGGREGATE_1X_TO_20. */
|
|
47
|
+
export declare const AGGREGATE_20_TO_1X: Readonly<{
|
|
48
|
+
[k: string]: string;
|
|
49
|
+
}>;
|
|
50
|
+
/** 2.0 algorithmFamily values (pinned 2.0 cryptography defs). */
|
|
51
|
+
export declare const ALGORITHM_FAMILY_ENUM: Readonly<Set<any>>;
|
|
52
|
+
/** 2.0 protocolProperties.type values (pinned 2.0 cryptography defs). */
|
|
53
|
+
export declare const PROTOCOL_FAMILY_ENUM: Readonly<Set<any>>;
|
|
54
|
+
export declare const COMPONENT_DATA_TYPE_ENUM: Set<string>;
|
|
55
|
+
export declare const DATA_CLASSIFICATION_ENUM: Set<string>;
|
|
56
|
+
export declare const POSTAL_ADDRESS_FIELDS: string[];
|
|
57
|
+
export declare const COMPONENT_ENTRY_ARRAY_KEYS: Set<string>;
|
|
58
|
+
export declare const LICENSE_EVIDENCE_DETAIL_FIELDS: string[];
|
|
59
|
+
/** 1.x componentData members the renderer handles. */
|
|
60
|
+
export declare const COMPONENT_DATA_FIELDS: Set<string>;
|
|
61
|
+
export declare const COMPONENT_COPY_FIELDS: string[];
|
|
62
|
+
/** 1.x component members the renderer handles; the rest are counted. */
|
|
63
|
+
export declare const COMPONENT_HANDLED_FIELDS: Set<string>;
|
|
64
|
+
export declare const SERVICE_COPY_FIELDS: string[];
|
|
65
|
+
/**
|
|
66
|
+
* 1.x service members without a 2.0 field, carried at 2.0 as the documented
|
|
67
|
+
* cdx:service:* properties (docs/CUSTOM_PROPERTIES.md) so the mcp-server
|
|
68
|
+
* audit rules keep firing on a document read back from 2.0. Each entry is
|
|
69
|
+
* [1.x field, property name, value kind]; the renderer appends them in this
|
|
70
|
+
* order and the reader turns them back into the 1.x fields.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CARRIED_SERVICE_PROPERTIES: readonly (readonly string[])[];
|
|
73
|
+
/** 1.x service members the renderer handles; the rest are counted. */
|
|
74
|
+
export declare const SERVICE_HANDLED_FIELDS: Set<string>;
|
|
75
|
+
/** 1.x algorithmFamily values (cryptography-defs algorithmFamiliesEnum). */
|
|
76
|
+
export declare const ALGORITHM_FAMILY_1X: Readonly<Set<any>>;
|
|
77
|
+
/** 1.x ellipticCurve values (cryptography-defs ellipticCurvesEnum). */
|
|
78
|
+
export declare const ELLIPTIC_CURVE_1X: Readonly<Set<any>>;
|
|
79
|
+
/** 1.7 externalReference.type values. */
|
|
80
|
+
export declare const EXTERNAL_REFERENCE_TYPES_1X: Readonly<Set<string>>;
|
|
81
|
+
/** 1.7 component.type values. */
|
|
82
|
+
export declare const COMPONENT_TYPES_1X: Readonly<Set<string>>;
|
|
83
|
+
/** 1.7 componentIdentityEvidence.field values. */
|
|
84
|
+
export declare const IDENTITY_FIELDS_1X: Readonly<Set<string>>;
|
|
85
|
+
/** 1.7 identity-evidence method techniques. */
|
|
86
|
+
export declare const IDENTITY_TECHNIQUES_1X: Readonly<Set<string>>;
|
|
87
|
+
/** 1.7 vulnerability rating `method` values (scoreMethod). */
|
|
88
|
+
export declare const SCORE_METHODS_1X: Readonly<Set<string>>;
|
|
89
|
+
/**
|
|
90
|
+
* 1.7 cryptoProperties algorithmProperties enums, by member name. Members
|
|
91
|
+
* whose 2.0 value is a list in 1.7 too are checked entry by entry.
|
|
92
|
+
*/
|
|
93
|
+
export declare const ALGORITHM_PROPERTY_ENUMS_1X: Readonly<{
|
|
94
|
+
primitive: Readonly<Set<string>>;
|
|
95
|
+
executionEnvironment: Readonly<Set<string>>;
|
|
96
|
+
implementationPlatform: Readonly<Set<string>>;
|
|
97
|
+
mode: Readonly<Set<string>>;
|
|
98
|
+
padding: Readonly<Set<string>>;
|
|
99
|
+
cryptoFunctions: Readonly<Set<string>>;
|
|
100
|
+
}>;
|
|
101
|
+
/** 1.7 protocolProperties.type values. */
|
|
102
|
+
export declare const PROTOCOL_TYPES_1X: Readonly<Set<string>>;
|
|
103
|
+
/**
|
|
104
|
+
* Party roles (#/$defs/cyclonedx-party-2.0/$defs/preDefinedRole) the 1.x
|
|
105
|
+
* component and service fields can hold, with the 1.x field.
|
|
106
|
+
*/
|
|
107
|
+
export declare const PARTY_ROLE_FIELDS_1X: Readonly<{
|
|
108
|
+
supplier: "supplier";
|
|
109
|
+
manufacturer: "manufacturer";
|
|
110
|
+
author: "authors";
|
|
111
|
+
publisher: "publisher";
|
|
112
|
+
provider: "provider";
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Identity schemes (#/$defs/cyclonedx-component-2.0/$defs/identityScheme) the
|
|
116
|
+
* 1.x identifier fields hold, with the 1.x field. `omniborid` and `swhid` are
|
|
117
|
+
* lists in 1.x; the others hold one value.
|
|
118
|
+
*/
|
|
119
|
+
export declare const IDENTITY_SCHEME_FIELDS_1X: Readonly<{
|
|
120
|
+
purl: "purl";
|
|
121
|
+
cpe: "cpe";
|
|
122
|
+
swid: "swid";
|
|
123
|
+
omniborid: "omniborId";
|
|
124
|
+
swhid: "swhid";
|
|
125
|
+
}>;
|
|
126
|
+
/** 2.0 identity-evidence scheme → 1.x field, for the predefined schemes. */
|
|
127
|
+
export declare const IDENTITY_EVIDENCE_SCHEME_TO_FIELD: Readonly<{
|
|
128
|
+
purl: "purl";
|
|
129
|
+
cpe: "cpe";
|
|
130
|
+
swid: "swid";
|
|
131
|
+
swhid: "swhid";
|
|
132
|
+
omniborid: "omniborId";
|
|
133
|
+
}>;
|
|
134
|
+
//# sourceMappingURL=cyclonedx20Tables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cyclonedx20Tables.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cyclonedx20Tables.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,kCAAkC,CAAC;AAE/E,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,sLAC4I,CAAC;AAEtL,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,aA0B/B,CAAC;AAKH,eAAO,MAAM,6BAA6B,aAWxC,C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C;AAC1C,eAAO,MAAM,iBAAiB,uBAiB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAMpC,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iCAAiC;;;;;;EAM5C,CAAC"}
|
|
@@ -16,14 +16,27 @@ export declare function isDocumentationJar(jarName: string): boolean;
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function collectMvnDependencies(mavenCmd: string, basePath: string, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
|
|
18
18
|
/**
|
|
19
|
-
* Method to collect class names from all jars in a
|
|
19
|
+
* Method to collect class names from all jars and Android libraries in a
|
|
20
|
+
* directory
|
|
20
21
|
*
|
|
21
|
-
* @param {string} jarPath Path containing jars
|
|
22
|
+
* @param {string} jarPath Path containing jars, or a single jar or aar file
|
|
22
23
|
* @param {object} pomPathMap Map containing jar to pom names. Required to successfully parse gradle cache.
|
|
23
24
|
*
|
|
24
25
|
* @return object containing jar name and class list
|
|
25
26
|
*/
|
|
26
27
|
export declare function collectJarNS(jarPath: string, pomPathMap?: object): Promise<{}>;
|
|
28
|
+
/**
|
|
29
|
+
* The jar namespace map entries of components a jar scan produced, in the
|
|
30
|
+
* shape {@link collectJarNS} writes (`{ namespaces: string[] }`), from their
|
|
31
|
+
* `internal:Namespaces` properties. The scan reads each jar from a temporary
|
|
32
|
+
* copy, so no `jarFile` is recorded. Purls `existing` already maps keep the
|
|
33
|
+
* entry they have, which names the jar it was read from.
|
|
34
|
+
*
|
|
35
|
+
* @param {Object[]} components Components with `internal:Namespaces` properties
|
|
36
|
+
* @param {Object} [existing] Jar namespace map already collected
|
|
37
|
+
* @returns {Object} New entries keyed by purl
|
|
38
|
+
*/
|
|
39
|
+
export declare function namespaceMappingOfComponents(components: Object[], existing?: Object): Object;
|
|
27
40
|
/**
|
|
28
41
|
* Convert a JAR namespace mapping (produced by {@link collectJarNS}) into an array
|
|
29
42
|
* of CycloneDX package component objects.
|
|
@@ -174,6 +187,26 @@ export declare function readZipEntriesMatching(zipFile: string, pathFragment: st
|
|
|
174
187
|
* @returns List of classes and sources matching certain known patterns
|
|
175
188
|
*/
|
|
176
189
|
export declare function getJarClasses(jarFile: string): Promise<any>;
|
|
190
|
+
/**
|
|
191
|
+
* Method to get the classes of an Android library. An `.aar` keeps its code
|
|
192
|
+
* in `classes.jar` at its root and any number of further jars under `libs/`,
|
|
193
|
+
* each of which is read in turn.
|
|
194
|
+
*
|
|
195
|
+
* Each inner jar is unpacked to a temporary file, so in dry run mode, which
|
|
196
|
+
* blocks those writes, an aar yields no classes. An inner jar that declares
|
|
197
|
+
* more than `maxInnerJarBytes` uncompressed is skipped without being
|
|
198
|
+
* decompressed, because the whole entry is held in memory while it is copied.
|
|
199
|
+
*
|
|
200
|
+
* @param {string} aarFile Aar file to read
|
|
201
|
+
* @param {Object} [opts] Options
|
|
202
|
+
* @param {number} [opts.maxInnerJarBytes] Uncompressed size bound for each
|
|
203
|
+
* inner jar. Defaults to 256 MiB.
|
|
204
|
+
*
|
|
205
|
+
* @returns {Promise<string[]>} Sorted class names of every jar inside
|
|
206
|
+
*/
|
|
207
|
+
export declare function getAarClasses(aarFile: string, { maxInnerJarBytes }?: {
|
|
208
|
+
maxInnerJarBytes?: number;
|
|
209
|
+
}): Promise<string[]>;
|
|
177
210
|
/**
|
|
178
211
|
* Recursively flatten a Python package's transitive dependencies into the
|
|
179
212
|
* dependencies map and flat package list.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../lib/inventory/deps.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../lib/inventory/deps.js"],"names":[],"mappings":"AA0CA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AA0DD;;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MAAM,CAGd;CAIkD,GAJxC,OAAO,CAAC,MAAM,EAAE,CAAC,CA0D7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,eAAe,EANhC,MAMgC,EAAE,OAAO,EALzC,MAAM,EAKmC,EAAE,cAAc,EAJzD,MAIyD,EAAE,CAAC,EAH5D,MAG4D,GAF1D,IAAI,CAqDhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAJtB,MAAM,GAAC,MAIe,EAAE,CAAC,EAHzB,MAAM,GAAC,MAGkB,GAFvB,MAAM,CAWlB"}
|
|
@@ -128,24 +128,59 @@ export declare function dosaiReportFileOmittedSections(reportFile: string): stri
|
|
|
128
128
|
* @returns {string[]} The ones cdxgen reads
|
|
129
129
|
*/
|
|
130
130
|
export declare function dosaiSectionsCdxgenReads(omittedSections: string[]): string[];
|
|
131
|
+
/**
|
|
132
|
+
* Whether an existing dosai methods slice is newer than the sources it
|
|
133
|
+
* describes.
|
|
134
|
+
*
|
|
135
|
+
* A slice written by an earlier scan holds the occurrences of the sources as
|
|
136
|
+
* they were then, so a slice that predates an edit must be regenerated rather
|
|
137
|
+
* than reused: reusing one keeps occurrences of call sites that no longer
|
|
138
|
+
* exist (issue 4675). The slice is fresh only when its mtime is not older
|
|
139
|
+
* than the newest mtime among the files dosai analyses under the directory.
|
|
140
|
+
* A missing slice, a slice whose mtime cannot be read, a source that cannot
|
|
141
|
+
* be stat-ed, and a tree that exceeds the walk bounds all count as stale: the
|
|
142
|
+
* callers regenerate the slice, which is the run a fresh scan pays anyway.
|
|
143
|
+
*
|
|
144
|
+
* @param {string} slicesFile Candidate dosai methods slice
|
|
145
|
+
* @param {string} projectDir Directory dosai analyses
|
|
146
|
+
* @param {Object} [options] Scan options; options.exclude prunes the walk
|
|
147
|
+
* @returns {boolean} True when the slice is newer than every source it describes
|
|
148
|
+
*/
|
|
149
|
+
export declare function dosaiSlicesFileIsFresh(slicesFile: string, projectDir: string, options?: Object): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* The largest number of distinct method calls cdxgen keeps from one report.
|
|
152
|
+
*
|
|
153
|
+
* Reports in the millions of calls repeat the same call sites heavily, so the
|
|
154
|
+
* aggregated rows stay far below this; the cap exists so a report whose calls
|
|
155
|
+
* are all distinct degrades the occurrence evidence instead of the process.
|
|
156
|
+
*
|
|
157
|
+
* @returns {number} Cap on distinct kept rows
|
|
158
|
+
*/
|
|
159
|
+
export declare function maxDosaiMethodCalls(): number;
|
|
131
160
|
/**
|
|
132
161
|
* Read a dosai methods report of any size.
|
|
133
162
|
*
|
|
134
163
|
* A report that fits in one JavaScript string is parsed whole. A larger one is
|
|
135
164
|
* read in bounded runs, keeping the requested sections, the CallGraph nodes and
|
|
136
165
|
* edges that PackageReachability references, and the MethodCalls accepted by
|
|
137
|
-
* `keepMethodCall` (none when it is omitted).
|
|
166
|
+
* `keepMethodCall` (none when it is omitted). A kept MethodCalls row is
|
|
167
|
+
* reduced to the fields cdxgen reads and aggregated by them, so a call site
|
|
168
|
+
* reached many times is held once with a `CallCount`; distinct rows past
|
|
169
|
+
* {@link maxDosaiMethodCalls} are dropped with one warning. Nothing cdxgen
|
|
170
|
+
* reads is lost.
|
|
138
171
|
*
|
|
139
172
|
* @param {string} reportFile Path to the dosai methods JSON
|
|
140
173
|
* @param {Object} [options] Options
|
|
141
174
|
* @param {string[]} [options.sections] Sections to keep from a large report (default: every section cdxgen reads)
|
|
142
175
|
* @param {Function} [options.keepMethodCall] Predicate choosing the MethodCalls to keep from a large report
|
|
176
|
+
* @param {number} [options.maxMethodCalls] Cap on distinct kept MethodCalls, for tests
|
|
143
177
|
* @param {number} [options.maxTextBytes] Largest report parsed whole, for tests
|
|
144
178
|
* @returns {Object|undefined} Parsed report, or undefined when missing or invalid
|
|
145
179
|
*/
|
|
146
180
|
export declare function readDosaiMethodsReport(reportFile: string, options?: {
|
|
147
181
|
sections?: string[];
|
|
148
182
|
keepMethodCall?: Function;
|
|
183
|
+
maxMethodCalls?: number;
|
|
149
184
|
maxTextBytes?: number;
|
|
150
185
|
}): Object | undefined;
|
|
151
186
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AAkMA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAL1C,MAAM,GAAC,MAKmC,GAJxC;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAAC,GAAC,SAAS,CAmB9E;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAIlB;AAwMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAJpC,MAAM,EAI8B,EAAE,OAAO,EAH7C,MAG6C,GAF3C;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,CAyFtE;AAoDD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC,MAGmC,GAFjC,OAAO,CAIn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;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EARL,MAQK,EACd,UAAU,AART,CACA,EADQ,MAAM,EAQA,EACf,OAAO,AARN,CAGA,EAFA;IAAyB,OAAO,AAAhC,CAEA,EAFQ,MAAM,CAEd;CAKW,GALD,MAAM,CAwDlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAJ1C,MAI0C,EAAE,UAAU,AAH9D,CACA,OAEmE,SAqHrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAJ/C,MAI+C,EAAE,WAAW,AAHpE,CACA,EADQ,MAGiE,GAF/D,MAAM,CAyKlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EALH,MAKG,EACZ,WAAW,AALV,CACA,EADQ,MAKO,GAJL,MAAM,CA+GlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,AAHjD,CACA,EADQ,MAG8C,GAF5C,MAAM,EAAE,CAmDpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dosaiParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosaiParsers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dosaiParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosaiParsers.js"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EALzB,MAKyB,EAAE,GAAG,EAJ9B,MAI8B,EAAE,KAAK,EAHrC,MAGqC,GAFnC,IAAI,CAQhB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAHvB,MAGuB,GAFrB,MAAM,GAAC,SAAS,CAW5B;AAcD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAJrC,MAIqC,EAAE,OAAO,AAHtD,CACA,EADQ,MAG8C,GAF5C,MAAM,GAAC,SAAS,CAS5B;AA8BD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAHrC,MAGqC,GAFnC,MAAM,GAAC,SAAS,CAa5B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAHjC,MAGiC,GAF/B,MAAM,GAAC,SAAS,CAa5B;AAiHD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,AAN9C,CACA,EADQ,MAAM,EAMqC,EAAE,OAAO,AAL5D,CAGA,EAFA;IAAyB,OAAO,AAAhC,CAEA,EAFQ,MAAM,CAEd;CAEiE,GAFvD,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqC/B;AAsCD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EALvC,QAAQ,CAAC,MAAM,CAKwB,EAAE,YAAY,EAJrD,GAAG,CAAC,MAAM,EAAE,MAAM,CAImC,EAAE,QAAQ,AAHvE,CACA,EADQ,MAG+D,GAF7D,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EANnC,MAMmC,EAAE,YAAY,EALjD,GAAG,CAAC,MAAM,EAAE,MAAM,CAK+B,EAAE,QAAQ,AAJnE,CACA,EADQ,MAI2D,GAHzD,MAAM,GAAC,SAAS,CA6B5B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the runtime pack a shared framework's deps.json was built from.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} depsJson parsed <framework>.deps.json
|
|
5
|
+
* @param {string} framework framework directory name
|
|
6
|
+
* @returns {{pack: string, version: string, rid: string}|undefined}
|
|
7
|
+
*/
|
|
8
|
+
export declare function runtimePackFromDepsJson(depsJson: Object, framework: string): {
|
|
9
|
+
pack: string;
|
|
10
|
+
version: string;
|
|
11
|
+
rid: string;
|
|
12
|
+
} | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The CPE NVD uses for a shared framework version, with the version and update
|
|
15
|
+
* fields spelled the way the NVD CPE dictionary spells them.
|
|
16
|
+
*
|
|
17
|
+
* The product is `.net` from 5.0 on, `.net_core` before it, and `asp.net_core`
|
|
18
|
+
* for ASP.NET Core. NVD names a .NET Core x.y.0 release and its pre-releases
|
|
19
|
+
* with two version parts (`.net_core:3.1`, `.net_core:3.0:preview9`), and the
|
|
20
|
+
* .NET 5.0 pre-releases the same way (`.net:5.0:rc1`); every other version
|
|
21
|
+
* keeps three. A release candidate is `rc<N>`, and a preview is
|
|
22
|
+
* `preview.<N>` for .NET 7, 8 and 10 and `preview<N>` otherwise. A release
|
|
23
|
+
* keeps the `*` update, which is the only one NVD lists for some releases. A
|
|
24
|
+
* pre-release of any other kind names no version NVD has, so it gets no CPE.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} framework framework directory name
|
|
27
|
+
* @param {string} version runtime version
|
|
28
|
+
* @returns {string|undefined} CPE 2.3 string
|
|
29
|
+
*/
|
|
30
|
+
export declare function dotnetCpe(framework: string, version: string): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Create the platform component for one installed shared framework.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} framework framework directory name
|
|
35
|
+
* @param {{pack: string, version: string, rid: string}} runtime runtime pack
|
|
36
|
+
* @param {string} [location] root-relative path of the deps.json. A runtime
|
|
37
|
+
* found on the scanning host gets none, since host paths can name the user's
|
|
38
|
+
* home directory.
|
|
39
|
+
* @returns {Object|undefined} component, or undefined when no purl can be built
|
|
40
|
+
*/
|
|
41
|
+
export declare function createDotnetRuntimeComponent(framework: string, runtime: {
|
|
42
|
+
pack: string;
|
|
43
|
+
version: string;
|
|
44
|
+
rid: string;
|
|
45
|
+
}, location?: string): Object | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Parse the output of `dotnet --list-runtimes`, one `<framework> <version>
|
|
48
|
+
* [<directory>]` line per installed runtime. Warnings, update notices, blank
|
|
49
|
+
* lines, unknown frameworks and versions of a shape no runtime pack names are
|
|
50
|
+
* left out, and no more than MAX_FRAMEWORKS runtimes are kept.
|
|
51
|
+
*
|
|
52
|
+
* https://learn.microsoft.com/dotnet/core/install/how-to-detect-installed-versions
|
|
53
|
+
*
|
|
54
|
+
* @param {string} output output of `dotnet --list-runtimes`
|
|
55
|
+
* @returns {{framework: string, version: string, frameworkDir: string}[]} one
|
|
56
|
+
* entry per installed runtime
|
|
57
|
+
*/
|
|
58
|
+
export declare function parseDotnetListRuntimes(output: string): {
|
|
59
|
+
framework: string;
|
|
60
|
+
version: string;
|
|
61
|
+
frameworkDir: string;
|
|
62
|
+
}[];
|
|
63
|
+
/**
|
|
64
|
+
* Create the platform component for one runtime the host install reports.
|
|
65
|
+
*
|
|
66
|
+
* The identity comes from the deps.json in the runtime's own directory, read
|
|
67
|
+
* with the directory as the root so the read cannot leave it and a symlink is
|
|
68
|
+
* not followed. Only an absolute directory is read, which is what the dotnet
|
|
69
|
+
* host prints. A runtime whose deps.json is missing, unreadable or names
|
|
70
|
+
* another version keeps its name, its version and its CPE, without a purl:
|
|
71
|
+
* without the runtime identifier of the pack there is no correct nuget purl.
|
|
72
|
+
*
|
|
73
|
+
* @param {{framework: string, version: string, frameworkDir: string}} entry
|
|
74
|
+
* one entry of parseDotnetListRuntimes
|
|
75
|
+
* @returns {Object} platform component
|
|
76
|
+
*/
|
|
77
|
+
export declare function createHostDotnetRuntimeComponent(entry: {
|
|
78
|
+
framework: string;
|
|
79
|
+
version: string;
|
|
80
|
+
frameworkDir: string;
|
|
81
|
+
}): Object;
|
|
82
|
+
/**
|
|
83
|
+
* Find the .NET shared frameworks installed under a root that no package
|
|
84
|
+
* manager owns, and return one platform component per runtime pack.
|
|
85
|
+
*
|
|
86
|
+
* @param {string} rootDir extracted root file system
|
|
87
|
+
* @param {string[]} [ownedPaths] root-relative paths a package database owns
|
|
88
|
+
* @returns {Object[]} platform components
|
|
89
|
+
*/
|
|
90
|
+
export declare function collectDotnetRuntimes(rootDir: string, ownedPaths?: string[]): Object[];
|
|
91
|
+
//# sourceMappingURL=dotnetRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotnetRuntime.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dotnetRuntime.js"],"names":[],"mappings":"AAsEA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAJrC,MAIqC,EAAE,SAAS,EAHhD,MAGgD,GAF9C;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAuBlE;AA0BD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAJxB,MAIwB,EAAE,OAAO,EAHjC,MAGiC,GAF/B,MAAM,GAAC,SAAS,CAmC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAP3C,MAO2C,EAAE,OAAO,EANpD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAMS,EAAE,QAAQ,AALtE,CAGA,EAHQ,MAK8D,GAF5D,MAAM,GAAC,SAAS,CA8B5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAJnC,MAImC,GAHjC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,EAAE,CAiCxE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAJ3C;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAId,GAFzC,MAAM,CA8BlB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAJlC,MAIkC,EAAE,UAAU,AAHtD,CACA,EADQ,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAwDpB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const MAX_READ_BYTES: number;
|
|
2
|
+
export declare const MAX_ASSETS_READ_BYTES: number;
|
|
3
|
+
/**
|
|
4
|
+
* The path of a build input relative to the scanned project root, with
|
|
5
|
+
* forward slashes, as recorded in bom-refs and `internal:SrcFile`. A file
|
|
6
|
+
* outside the root, or a call without a root, records only its file name,
|
|
7
|
+
* so no path of the scanning machine reaches the BOM.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} filePath file the component describes
|
|
10
|
+
* @param {string} [rootDir] scanned project root
|
|
11
|
+
* @returns {string} project-relative path, or the file name
|
|
12
|
+
*/
|
|
13
|
+
export declare function formulationSourcePath(filePath: string, rootDir?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Parser for make and CMake build inputs (C/C++ and friends).
|
|
16
|
+
*
|
|
17
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
|
|
18
|
+
*/
|
|
19
|
+
export declare const makefileFormulationParser: {
|
|
20
|
+
id: string;
|
|
21
|
+
patterns: string[];
|
|
22
|
+
parse(files: string[], options?: Object, context?: {
|
|
23
|
+
rootDir?: string;
|
|
24
|
+
}): {
|
|
25
|
+
components: Object[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Parser for go.mod build inputs. The compiled binaries are read by the
|
|
30
|
+
* binary/OBOM path through the bounded Go buildinfo reader, not here.
|
|
31
|
+
*
|
|
32
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
|
|
33
|
+
*/
|
|
34
|
+
export declare const goModuleFormulationParser: {
|
|
35
|
+
id: string;
|
|
36
|
+
patterns: string[];
|
|
37
|
+
parse(files: string[], options?: Object, context?: {
|
|
38
|
+
rootDir?: string;
|
|
39
|
+
}): {
|
|
40
|
+
components: Object[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Parser for pip requirements and constraints files.
|
|
45
|
+
*
|
|
46
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
|
|
47
|
+
*/
|
|
48
|
+
export declare const pythonRequirementsFormulationParser: {
|
|
49
|
+
id: string;
|
|
50
|
+
patterns: string[];
|
|
51
|
+
parse(files: string[], options?: Object, context?: {
|
|
52
|
+
rootDir?: string;
|
|
53
|
+
}): {
|
|
54
|
+
components: Object[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Parser for .NET build inputs: project.assets.json (the file `dotnet
|
|
59
|
+
* restore` writes; some projects call it packages.assets.json) and the
|
|
60
|
+
* SDK-style .csproj project files.
|
|
61
|
+
*
|
|
62
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
|
|
63
|
+
*/
|
|
64
|
+
export declare const dotnetProjectFormulationParser: {
|
|
65
|
+
id: string;
|
|
66
|
+
patterns: string[];
|
|
67
|
+
parse(files: string[], options?: Object, context?: {
|
|
68
|
+
rootDir?: string;
|
|
69
|
+
}): {
|
|
70
|
+
components: Object[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=ecosystemFormulationParsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecosystemFormulationParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/ecosystemFormulationParsers.js"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,QAAkB,CAAC;AAI9C,eAAO,MAAM,qBAAqB,QAAmB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