@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
package/lib/validator/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
signatureReportReasons,
|
|
17
17
|
verifyBomSignatures,
|
|
18
18
|
} from "../helpers/bomSigner.js";
|
|
19
|
+
import { loadBomForAnalysis } from "../inventory/cyclonedx20.js";
|
|
19
20
|
import {
|
|
20
21
|
validateBom,
|
|
21
22
|
validateMetadata,
|
|
@@ -113,20 +114,25 @@ export async function validateGeneratedBom(bomJson) {
|
|
|
113
114
|
* Run schema + deep validation checks from the existing validator helpers and
|
|
114
115
|
* capture their boolean results without letting them blow up the process.
|
|
115
116
|
*
|
|
117
|
+
* The schema check reads the document as given. The deep checks read the
|
|
118
|
+
* 1.x-shaped model, which for a CycloneDX 2.0 document is what
|
|
119
|
+
* loadBomForAnalysis reads from it.
|
|
120
|
+
*
|
|
116
121
|
* An exception is not a verdict on the BOM, so it is recorded in
|
|
117
122
|
* `validationErrors` instead of silently counting as a plain failure.
|
|
118
123
|
*
|
|
119
|
-
* @param {object} bomJson
|
|
124
|
+
* @param {object} bomJson Document as given
|
|
125
|
+
* @param {object} internalBom The 1.x-shaped model of the document
|
|
120
126
|
* @param {object} opts
|
|
121
127
|
* @returns {Promise<{ schemaValid: boolean, deepValid: boolean, validationErrors: Array<{ stage: string, message: string }> }>}
|
|
122
128
|
*/
|
|
123
|
-
async function runSchemaAndDeep(bomJson, opts) {
|
|
129
|
+
async function runSchemaAndDeep(bomJson, internalBom, opts) {
|
|
124
130
|
let schemaValid = true;
|
|
125
131
|
let deepValid = true;
|
|
126
132
|
const validationErrors = [];
|
|
127
133
|
if (opts.schema !== false) {
|
|
128
134
|
try {
|
|
129
|
-
schemaValid = (await validateBom(bomJson)) !== false;
|
|
135
|
+
schemaValid = (await validateBom(bomJson, { deep: false })) !== false;
|
|
130
136
|
} catch (err) {
|
|
131
137
|
schemaValid = false;
|
|
132
138
|
validationErrors.push({
|
|
@@ -139,10 +145,10 @@ async function runSchemaAndDeep(bomJson, opts) {
|
|
|
139
145
|
if (opts.deep !== false) {
|
|
140
146
|
try {
|
|
141
147
|
deepValid =
|
|
142
|
-
validateMetadata(
|
|
143
|
-
validatePurls(
|
|
144
|
-
validateRefs(
|
|
145
|
-
validateProps(
|
|
148
|
+
validateMetadata(internalBom) !== false &&
|
|
149
|
+
validatePurls(internalBom) !== false &&
|
|
150
|
+
validateRefs(internalBom) !== false &&
|
|
151
|
+
validateProps(internalBom) !== false;
|
|
146
152
|
} catch (err) {
|
|
147
153
|
deepValid = false;
|
|
148
154
|
validationErrors.push({
|
|
@@ -155,9 +161,38 @@ async function runSchemaAndDeep(bomJson, opts) {
|
|
|
155
161
|
return { schemaValid, deepValid, validationErrors };
|
|
156
162
|
}
|
|
157
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Read a BOM into the 1.x-shaped model the deep checks and compliance rules
|
|
166
|
+
* walk. A 1.x document is used as is; a CycloneDX 2.0 document is read with
|
|
167
|
+
* loadBomForAnalysis, whose losses name the parts those checks never see.
|
|
168
|
+
* A read failure is recorded rather than thrown, and the checks then run on
|
|
169
|
+
* the document as given.
|
|
170
|
+
*
|
|
171
|
+
* @param {object} bomJson Parsed CycloneDX BOM
|
|
172
|
+
* @param {Array<{ stage: string, message: string }>} validationErrors Accumulator
|
|
173
|
+
* @returns {{ internalBom: object, readLosses: Array<{ pointer: string, reason: string }> }}
|
|
174
|
+
*/
|
|
175
|
+
function readForRules(bomJson, validationErrors) {
|
|
176
|
+
try {
|
|
177
|
+
const { internalBom, losses } = loadBomForAnalysis(bomJson);
|
|
178
|
+
return { internalBom, readLosses: losses };
|
|
179
|
+
} catch (err) {
|
|
180
|
+
validationErrors.push({
|
|
181
|
+
stage: "read",
|
|
182
|
+
message: err?.message || String(err),
|
|
183
|
+
});
|
|
184
|
+
return { internalBom: bomJson, readLosses: [] };
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
158
188
|
/**
|
|
159
189
|
* Run structural + compliance validation against a parsed BOM.
|
|
160
190
|
*
|
|
191
|
+
* The JSON schema check and signature verification read the document as
|
|
192
|
+
* given. The deep checks and compliance rules read the 1.x-shaped model, so
|
|
193
|
+
* the same project gives the same rule results at 1.x and at 2.0; for a 2.0
|
|
194
|
+
* document `readLosses` lists what that model could not hold.
|
|
195
|
+
*
|
|
161
196
|
* @param {object} bomJson Parsed CycloneDX JSON BOM.
|
|
162
197
|
* @param {object} [options]
|
|
163
198
|
* @param {boolean} [options.schema] Run JSON-Schema validation (default true).
|
|
@@ -175,6 +210,7 @@ async function runSchemaAndDeep(bomJson, opts) {
|
|
|
175
210
|
* schemaValid: boolean,
|
|
176
211
|
* deepValid: boolean,
|
|
177
212
|
* validationErrors: Array<{ stage: string, message: string }>,
|
|
213
|
+
* readLosses: Array<{ pointer: string, reason: string }>,
|
|
178
214
|
* signatureVerified: boolean | null,
|
|
179
215
|
* signatureDetails: object | null,
|
|
180
216
|
* signatureEntries: Array<{ index: number, algorithm: any, keyId: any, verified: boolean }> | null,
|
|
@@ -185,11 +221,15 @@ async function runSchemaAndDeep(bomJson, opts) {
|
|
|
185
221
|
* }}
|
|
186
222
|
*/
|
|
187
223
|
export async function validateBomAdvanced(bomJson, options = {}) {
|
|
224
|
+
const readErrors = [];
|
|
225
|
+
const { internalBom, readLosses } = readForRules(bomJson, readErrors);
|
|
188
226
|
const { schemaValid, deepValid, validationErrors } = await runSchemaAndDeep(
|
|
189
227
|
bomJson,
|
|
228
|
+
internalBom,
|
|
190
229
|
options,
|
|
191
230
|
);
|
|
192
|
-
|
|
231
|
+
validationErrors.unshift(...readErrors);
|
|
232
|
+
const allFindings = evaluateAll(internalBom, {
|
|
193
233
|
categories: options.categories,
|
|
194
234
|
benchmarks: options.benchmarks,
|
|
195
235
|
});
|
|
@@ -249,6 +289,7 @@ export async function validateBomAdvanced(bomJson, options = {}) {
|
|
|
249
289
|
schemaValid,
|
|
250
290
|
deepValid,
|
|
251
291
|
validationErrors,
|
|
292
|
+
readLosses,
|
|
252
293
|
signatureVerified,
|
|
253
294
|
signatureDetails,
|
|
254
295
|
signatureEntries,
|
|
@@ -15,6 +15,12 @@ export function render(report, _options = {}) {
|
|
|
15
15
|
validationErrors: report.validationErrors || [],
|
|
16
16
|
signatureVerified: report.signatureVerified ?? null,
|
|
17
17
|
signatureEntries: report.signatureEntries ?? null,
|
|
18
|
+
// What reading a CycloneDX 2.0 input into the 1.x model behind the rules
|
|
19
|
+
// could not hold, as RFC 6901 pointers; empty for 1.x input.
|
|
20
|
+
readLosses: (report.readLosses || []).map((loss) => ({
|
|
21
|
+
pointer: loss.pointer,
|
|
22
|
+
reason: loss.reason,
|
|
23
|
+
})),
|
|
18
24
|
summary: report.summary,
|
|
19
25
|
benchmarks: report.benchmarks || [],
|
|
20
26
|
findings: (report.findings || []).map((f) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdxgen/cdxgen",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sbom",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"index.cjs"
|
|
124
124
|
],
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@babel/parser": "8.0.
|
|
127
|
-
"@babel/traverse": "8.0.
|
|
126
|
+
"@babel/parser": "8.0.10",
|
|
127
|
+
"@babel/traverse": "8.0.10",
|
|
128
128
|
"@cdxgen/cdx-purl": "0.0.6",
|
|
129
129
|
"@isaacs/string-locale-compare": "1.1.0",
|
|
130
130
|
"@npmcli/fs": "6.0.0",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"ajv-formats": "3.0.1",
|
|
136
136
|
"common-ancestor-path": "2.0.0",
|
|
137
137
|
"edn-data": "1.2.2",
|
|
138
|
-
"glob": "
|
|
138
|
+
"glob": "14.0.3",
|
|
139
139
|
"node-stream-zip": "1.16.0",
|
|
140
140
|
"npm-package-arg": "14.0.0",
|
|
141
141
|
"parse-conflict-json": "6.0.0",
|
|
@@ -150,17 +150,17 @@
|
|
|
150
150
|
"yargs": "18.2.0"
|
|
151
151
|
},
|
|
152
152
|
"devDependencies": {
|
|
153
|
-
"@biomejs/biome": "2.
|
|
154
|
-
"esmock": "
|
|
153
|
+
"@biomejs/biome": "2.6.4",
|
|
154
|
+
"esmock": "3.0.0",
|
|
155
155
|
"poku": "4.5.0",
|
|
156
156
|
"sinon": "22.1.0",
|
|
157
157
|
"typescript": "^7.0.2"
|
|
158
158
|
},
|
|
159
159
|
"optionalDependencies": {
|
|
160
|
-
"@appthreat/atom": "3.
|
|
161
|
-
"@appthreat/atom-parsetools": "1.10.
|
|
160
|
+
"@appthreat/atom": "3.2.1",
|
|
161
|
+
"@appthreat/atom-parsetools": "1.10.6",
|
|
162
162
|
"@bufbuild/protobuf": "2.16.0",
|
|
163
|
-
"@cdxgen/cdx-hbom": "0.
|
|
163
|
+
"@cdxgen/cdx-hbom": "0.8.0",
|
|
164
164
|
"@cdxgen/cdx-proto": "2.3.0",
|
|
165
165
|
"@cdxgen/cdxgen-plugins-bin": "4.2.0",
|
|
166
166
|
"@cdxgen/cdxgen-plugins-bin-darwin-amd64": "4.2.0",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"@cdxgen/cdxgen-plugins-bin-windows-amd64": "4.2.0",
|
|
175
175
|
"@cdxgen/cdxgen-plugins-bin-windows-arm64": "4.2.0",
|
|
176
176
|
"@cdxgen/safer-exec": "1.2.1",
|
|
177
|
-
"body-parser": "2.
|
|
177
|
+
"body-parser": "2.4.0",
|
|
178
178
|
"compression": "1.8.2",
|
|
179
179
|
"connect": "3.7.0",
|
|
180
180
|
"jsonata": "2.2.2"
|
|
@@ -203,6 +203,7 @@
|
|
|
203
203
|
]
|
|
204
204
|
},
|
|
205
205
|
"scripts": {
|
|
206
|
+
"check:agent-plugin": "node contrib/check-agent-plugin.js",
|
|
206
207
|
"check:boundaries": "node contrib/check-boundaries.js",
|
|
207
208
|
"check:lib-paths": "node contrib/check-lib-paths.js",
|
|
208
209
|
"check:validators": "node contrib/gen-validators.mjs --check",
|
package/types/bin/repl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../bin/repl.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../bin/repl.js"],"names":[],"mappings":";AAybA,eAAO,MAAM,UAAU,oCA0FtB,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/** Default predictive audit category list applied when none are explicitly requested. */
|
|
2
2
|
export declare const DEFAULT_AUDIT_CATEGORIES: string[];
|
|
3
3
|
/**
|
|
4
|
-
* Read and validate a CycloneDX BOM file.
|
|
4
|
+
* Read and validate a CycloneDX BOM file. A CycloneDX 2.0 document is read
|
|
5
|
+
* into cdxgen's internal 1.x-shaped model, so the audit rules keep reading
|
|
6
|
+
* `components`, `bom-ref` and `metadata.component`; the number of losses
|
|
7
|
+
* the read reported is printed once on stderr, with the details in
|
|
8
|
+
* thoughtLog.
|
|
5
9
|
*
|
|
6
10
|
* @param {string} bomPath BOM file path
|
|
7
|
-
* @returns {object} parsed CycloneDX BOM
|
|
11
|
+
* @returns {object} parsed CycloneDX BOM in the 1.x shape
|
|
8
12
|
*/
|
|
9
13
|
export declare function loadBomFile(bomPath: string): object;
|
|
10
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/audit/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/audit/index.js"],"names":[],"mappings":"AAkFA,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAuCF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAHxB,MAGwB,GAFtB,MAAM,CA4BlB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB,MAAM,EAAE,CAoBpB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CA0BjD;AA+CD;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAJ9C;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAIW,EAAE,OAAO,AAH/D,CACA,EADQ,MAG4D,GAF1D,OAAO,CAAC,MAAM,CAAC,CAuG3B;AAidD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAHtC,MAGsC,GAFpC,MAAM,EAAE,CAqdpB;AA4KD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAJ1C,MAI0C,EAAE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IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAwChD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAG,SAAS,CAU9B"}
|
|
@@ -41,10 +41,22 @@ export declare const createDefaultParentComponent: (path: string, type?: string,
|
|
|
41
41
|
* project name/version is available
|
|
42
42
|
*/
|
|
43
43
|
export declare const determineParentComponent: (options: object) => object | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Builds the tool components for the external helpers and build tools this
|
|
46
|
+
* run executed, from the run-scoped registry (issue #598). Bundled plugin
|
|
47
|
+
* helpers are enriched with the manifest component of the plugin package that
|
|
48
|
+
* ships them, so the plugin package's version and identity travel with the
|
|
49
|
+
* helper. Empty when the run spawned nothing external, which keeps such BOMs
|
|
50
|
+
* byte-identical to the previous behaviour.
|
|
51
|
+
*
|
|
52
|
+
* @returns {object[]} Sorted CycloneDX tool components
|
|
53
|
+
*/
|
|
54
|
+
export declare const buildExternalToolComponents: () => object[];
|
|
44
55
|
/**
|
|
45
56
|
* Assembles the `metadata.tools` block, including the cdxgen tool entry and,
|
|
46
57
|
* for spec versions prior to 1.5, the legacy tools array. For spec version
|
|
47
|
-
* 1.6+ the author field is converted to the authors array.
|
|
58
|
+
* 1.6+ the author field is converted to the authors array. The tools this run
|
|
59
|
+
* executed follow the context tools, sorted by name, and cdxgen comes last.
|
|
48
60
|
*
|
|
49
61
|
* @param {object} options CLI options
|
|
50
62
|
* @param {object} [context={}] Additional context carrying existing components
|
|
@@ -170,6 +182,22 @@ export declare function getPackageBinCommandNames(pkg: object): Set<string>;
|
|
|
170
182
|
* @returns {boolean} True when at least one bin command is imported
|
|
171
183
|
*/
|
|
172
184
|
export declare function hasNpmBinCommandEvidence(allImports: object, pkg: object): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Return a CycloneDX organisational entity built from a collector-supplied
|
|
187
|
+
* supplier or manufacturer, or undefined when the value is not a well-formed
|
|
188
|
+
* entity.
|
|
189
|
+
*
|
|
190
|
+
* An entity needs a non-empty string name. When a url is present it must be
|
|
191
|
+
* an array of valid IRI references; any other shape (a single string, an
|
|
192
|
+
* array holding non-strings) drops the entity so the BOM stays schema
|
|
193
|
+
* valid. Each contact is reduced to its string name, email and phone, and a
|
|
194
|
+
* contact with none of them is left out. The entity bom-ref is not copied,
|
|
195
|
+
* because CycloneDX 1.4 does not allow it there.
|
|
196
|
+
*
|
|
197
|
+
* @param {Object} entity Collector-supplied organisational entity
|
|
198
|
+
* @returns {Object|undefined} Organisational entity, or undefined
|
|
199
|
+
*/
|
|
200
|
+
export declare function toOrganizationalEntity(entity: Object): Object | undefined;
|
|
173
201
|
/**
|
|
174
202
|
* Given the specified package, create a CycloneDX component and add it to the list.
|
|
175
203
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bomAssembly.d.ts","sourceRoot":"","sources":["../../../lib/cli/bomAssembly.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bomAssembly.d.ts","sourceRoot":"","sources":["../../../lib/cli/bomAssembly.js"],"names":[],"mappings":"AAkEA;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,aAJ7B,MAAM,qBACN,MAAM,EAAE,KACN,OAsBZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAFf,MAG8E,CAAC;AAEzF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,0CAH9B,MAAM;;;;;CAwChB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,YAJ1B,MAAM,KACJ,MAAM,GAAC,SAyBnB,CAAC;AA8GF;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,QAF3B,MAAM,EA6BlB,CAAC;AAqCF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,YALjB,MAAM,YACN,MAAM,KACJ;IAAE,UAAU,CAAC,EAAE,MAAM,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H,eAAO,MAAM,+BAA+B,YAJjC,MAAM,mBACN,MAAM,KACJ,OAYZ,CAAC"}
|
|
@@ -184,10 +184,13 @@ export declare function applyPostConstructionOverrides(options: object, context:
|
|
|
184
184
|
* @param {object} options The options object
|
|
185
185
|
* @param {object} [context]
|
|
186
186
|
* @param {boolean} [context.isSecureMode] Whether cdxgen runs in secure mode
|
|
187
|
+
* @param {string} [context.invokedCommandName] Binary name (e.g. "cbom"),
|
|
188
|
+
* which can turn on formulation
|
|
187
189
|
* @returns {OptionsWarning[]} Warnings for the caller
|
|
188
190
|
*/
|
|
189
191
|
export declare function applyAdvancedOptions(options: object, context?: {
|
|
190
192
|
isSecureMode?: boolean;
|
|
193
|
+
invokedCommandName?: string;
|
|
191
194
|
}): OptionsWarning[];
|
|
192
195
|
/**
|
|
193
196
|
* Build the complete `options` object from parsed CLI arguments.
|
|
@@ -215,6 +218,8 @@ export declare function applyAdvancedOptions(options: object, context?: {
|
|
|
215
218
|
* @param {object} [context.projectConfig] Sanitized config file contents,
|
|
216
219
|
* whose metadata properties merge
|
|
217
220
|
* with the other sources'
|
|
221
|
+
* @param {string[]} [context.argv] Raw command-line arguments,
|
|
222
|
+
* process.argv when absent
|
|
218
223
|
* @returns {{ options: object, warnings: OptionsWarning[] }}
|
|
219
224
|
*/
|
|
220
225
|
export declare function buildOptionsFromArgs(args: object, context: {
|
|
@@ -225,6 +230,7 @@ export declare function buildOptionsFromArgs(args: object, context: {
|
|
|
225
230
|
isDryRun?: boolean;
|
|
226
231
|
isSecureMode?: boolean;
|
|
227
232
|
projectConfig?: object;
|
|
233
|
+
argv?: string[];
|
|
228
234
|
}): {
|
|
229
235
|
options: object;
|
|
230
236
|
warnings: OptionsWarning[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cliOptions.d.ts","sourceRoot":"","sources":["../../../lib/cli/cliOptions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH;;;;;;;;;;;GAWG;AACH,wB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AkB,EAAlC,MAAM,CACd;IAAwB,QAAQ,EAAxB,MAAM,CACd;IAAyB,cAAc,EAA/B,OAAO,CACf;IAAyB,kBAAkB,EAAnC,OAAO,CAEf;IAA0B,QAAQ,AAAlC,CACA,EADQ,OAAO,CACf;IAA0B,YAAY,AAAtC,CACA,EADQ,OAAO,CACf;IAAyB,aAAa,AAAtC,CAGA,EAHQ,MAAM,CAGd;IAA2B,IAAI,AAA/B,CAEA,EAFQ,MAAM,EAAE,CAEhB;CAE+C,GAFrC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAkC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AA4FA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AA8CnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,eAAe,EACf,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0C1D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,cAAc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H,wBAAsB,SAAS,CAAC,IAAI,EAJzB,MAIyB,EAAE,OAAO,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CAa3B;AAgYD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,IAAI,EALzB,MAKyB,EAAE,WAAW,EAJtC,MAIsC,GAHrC,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAyGjD"}
|
package/types/lib/cli/jsBom.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Detects an exact AI inventory type from a direct HuggingFace reference or a
|
|
3
|
-
* local Modelfile/`.gguf` file input. Returns the explicit selection from
|
|
4
|
-
* `getExactAiInventoryType` when one is present.
|
|
5
|
-
*
|
|
6
|
-
* Direct HuggingFace interpretation of the source path is opt-in: only
|
|
7
|
-
* unambiguous references (`pkg:huggingface/...` purls and huggingface.co
|
|
8
|
-
* URLs) are recognized on their own. Bare `owner/repo`-shaped values are
|
|
9
|
-
* ordinary relative paths (eg: `repotests/sveltejs-realworld`) unless an AI
|
|
10
|
-
* inventory type such as `-t ai` is explicitly selected, in which case
|
|
11
|
-
* `getExactAiInventoryType` already returned it above.
|
|
12
|
-
*
|
|
13
|
-
* @param {string} path Project or file path
|
|
14
|
-
* @param {object} options CLI options
|
|
15
|
-
* @returns {string|undefined} The detected AI inventory type (`"ai"`) or undefined
|
|
16
|
-
*/
|
|
17
|
-
export declare function getDirectAiInventoryType(path: string, options: object): string | undefined;
|
|
1
|
+
export declare function getDirectAiInventoryType(path: any, options: any): string | undefined;
|
|
18
2
|
/**
|
|
19
3
|
* Main Node.js/npm BOM generator. Parses manifests, lockfiles, and import
|
|
20
4
|
* evidence to assemble components, dependencies, formulation data, AI inventory,
|
|
@@ -112,6 +96,7 @@ export declare function analyzeExtensionDir(extDir: string, options: Object): Pr
|
|
|
112
96
|
* @param {Object} options CLI options
|
|
113
97
|
* @param {Object[]} pkgList Mutable array to push discovered components into
|
|
114
98
|
* @param {Object[]} dependencies Mutable array to merge dependencies into
|
|
99
|
+
* @param {string} [onlyEntry] Analyze only this extension folder
|
|
115
100
|
*/
|
|
116
|
-
export declare function analyzeInstalledExtensionDirs(extensionsDir: string, options: Object, pkgList: Object[], dependencies: Object[]): Promise<void>;
|
|
101
|
+
export declare function analyzeInstalledExtensionDirs(extensionsDir: string, options: Object, pkgList: Object[], dependencies: Object[], onlyEntry?: string): Promise<void>;
|
|
117
102
|
//# sourceMappingURL=jsBom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jsBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jsBom.js"],"names":[],"mappings":"AA6IA,wBAAgB,wBAAwB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,sBAsBrD;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CAy5C3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAE4C,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,YAJ9B,KAAK,CAAC,MAAM,CAAC,cACb,MAAM,KACJ,KAAK,CAAC,MAAM,CAwExB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAmD3B;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAJxC,MAIwC,EAAE,OAAO,EAHjD,MAGiD,GAF/C,OAAO,CAAC,MAAM,CAAC,CAsI3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EANhC,MAMgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,OAAO,CAAC,MAAM,CAAC,CA6B3B;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAoN3B;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAJxC,MAIwC,EAAE,OAAO,EAHjD,MAGiD,GAF/C,OAAO,CAAC,MAAM,CAAC,CAoD3B;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAJrC,MAIqC,EAAE,OAAO,EAH9C,MAG8C,GAF5C,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CA2ChE;AAED;;;;;;;;;GASG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,EAPJ,MAOI,EACb,OAAO,EAPE,MAOF,EACP,OAAO,EAPE,MAAM,EAOR,EACP,YAAY,EAPH,MAAM,EAOH,EACZ,SAAS,AAPR,CACF,EADU,MAOA,iBAyBV"}
|
|
@@ -29,6 +29,21 @@ export declare const SBT_CACHE_DIR: string;
|
|
|
29
29
|
* @returns {Promise<Object>} Jar namespace mapping keyed by package purl.
|
|
30
30
|
*/
|
|
31
31
|
export declare function collectSbtDependencyJars(pkgList: Object[], known?: Object): Promise<Object>;
|
|
32
|
+
/**
|
|
33
|
+
* Keep apart two independent Maven projects that declare the same
|
|
34
|
+
* coordinates, such as sample projects in `one/` and `two/` that both call
|
|
35
|
+
* themselves `com.example:demo:0.0.1-SNAPSHOT`. When `component` has the
|
|
36
|
+
* bom-ref of the parent or of a module already collected but comes from a
|
|
37
|
+
* different pom.xml, it gets the directory of its pom, relative to the scan
|
|
38
|
+
* root, as the purl subpath, and the dependency entries that name it follow.
|
|
39
|
+
*
|
|
40
|
+
* @param {Object} component Root component of a Maven tree, updated in place
|
|
41
|
+
* @param {Object} parentComponent Parent component and the modules under it
|
|
42
|
+
* @param {string} rootPath Directory being scanned
|
|
43
|
+
* @param {Object[]} dependenciesList Dependency entries of the tree, updated in place
|
|
44
|
+
* @returns {boolean} True when the component got a distinct identity
|
|
45
|
+
*/
|
|
46
|
+
export declare function separateDuplicateMavenProject(component: Object, parentComponent: Object, rootPath: string, dependenciesList?: Object[]): boolean;
|
|
32
47
|
/**
|
|
33
48
|
* The purls and bom-refs of a parent component and the module components
|
|
34
49
|
* nested under it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"AAsJA;;;;;GAKG;AACH,eAAO,IAAI,gBAAgB,EAFjB,MAIsD,CAAC;AAUjE;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,EAHrB,MAQT,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,aAAa,EAHhB,MAIqE,CAAC;AAuDhF;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAL3C,MAAM,EAKqC,EAAE,KAAK,AAJ1D,CAEA,EAFQ,MAIuD,GAFrD,OAAO,CAAC,MAAM,CAAC,CA2B3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAPA,MAOA,EACT,eAAe,EAPN,MAOM,EACf,QAAQ,EAPC,MAOD,EACR,gBAAgB,GAPP,MAAM,EAOM,GANV,OAAO,CA+CnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,eAAe,EAHrC,MAGqC,GAFnC,GAAG,CAAC,MAAM,CAAC,CAwBvB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAL5B,MAK4B,EAAE,OAAO,EAJrC,MAIqC,GAFnC,MAAM,CAmFlB;AAiCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAPC,MAOD,EACR,MAAM,EAPG,MAOH,EACN,GAAG,EAPM,MAON,EACH,YAAY,AAPX,CACA,EADQ,MAAM,EAOE,GANN,MAAM,EAAE,CAwEpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EALtC,MAKsC,EAAE,QAAQ,EAJhD,MAIgD,EAAE,KAAK,AAH/D,CACA,eAE+D,GAFrD;IAAC,eAAe,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAC,CAyClE;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAiiF3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managedBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/managedBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"managedBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/managedBom.js"],"names":[],"mappings":"AAiLA;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,QAJ5B,MAAM,YACN,MAAM,KACJ,OAMZ,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAJ1B,MAAM,YACN,MAAM,KACJ,OAeZ,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,QAAA,EAAE,OAAO,EAHhC,MAGgC,GAF9B,MAAM,GAAG,IAAI,CAyEzB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CAitB3B;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AYG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,OAAO,CAAC,MAAM,CAAC,CA6B3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/nativeBom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nativeBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/nativeBom.js"],"names":[],"mappings":"AAuMA;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,GAAC,SAAS,CAU5B;AA0BD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAygBvC;AAuQD,wBAAsB,aAAa,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,+BA2MhD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAiC5B;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAJ9C,MAI8C,EAAE,SAAS,AAHjE,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAyDrC;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAJnC,MAImC,EAAE,OAAO,EAH5C,MAG4C,GAF1C,OAAO,CAAC,MAAM,CAAC,CAwB3B;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAoF3B;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,MAAM,CAmgB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C,GAFrC,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAqBD;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CAyB3B;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAJ9B,MAI8B,EAAE,OAAO,EAHvC,MAGuC,GAFrC,OAAO,CAAC,MAAM,CAAC,CA4B3B;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,GAFnC,OAAO,CAAC,MAAM,CAAC,CAoE3B;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAJhC,MAIgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,OAAO,CAAC,MAAM,CAAC,CAuC3B;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,GAFnC,OAAO,CAAC,MAAM,CAAC,CA0C3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,GAFnC,OAAO,CAAC,MAAM,CAAC,CA2D3B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAJ9B,MAI8B,EAAE,OAAO,EAHvC,MAGuC,GAFrC,OAAO,CAAC,MAAM,CAAC,CAwD3B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The largest file scanFileMarkers reads. Larger files are skipped whole
|
|
3
|
+
* rather than read in part, so a marker past the cap is never mistaken for an
|
|
4
|
+
* absent one; the result says the file was skipped.
|
|
5
|
+
*
|
|
6
|
+
* @type {number}
|
|
7
|
+
*/
|
|
8
|
+
export declare const MAX_MARKER_SCAN_BYTES: number;
|
|
9
|
+
/**
|
|
10
|
+
* Open a path only when it is a regular file that does not resolve outside
|
|
11
|
+
* rootDir. lstat runs first so a FIFO is rejected without opening it (an open
|
|
12
|
+
* on a FIFO blocks until a writer appears) and a symlink is never followed.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} absPath absolute path
|
|
15
|
+
* @param {string|undefined} rootDir extracted root the path must stay under
|
|
16
|
+
* @returns {{fd: number, size: number}|undefined} an open descriptor the
|
|
17
|
+
* caller closes, or undefined
|
|
18
|
+
*/
|
|
19
|
+
export declare function openRegularFile(absPath: string, rootDir: string | undefined): {
|
|
20
|
+
fd: number;
|
|
21
|
+
size: number;
|
|
22
|
+
} | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Read a small text file in full, only when it is a regular file no larger
|
|
25
|
+
* than maxBytes. A FIFO, a directory, a symlink or an oversized file reads as
|
|
26
|
+
* undefined.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} absPath absolute path
|
|
29
|
+
* @param {number} maxBytes largest size read
|
|
30
|
+
* @param {string|undefined} [rootDir] root the path must stay under
|
|
31
|
+
* @returns {string|undefined} the text, or undefined
|
|
32
|
+
*/
|
|
33
|
+
export declare function readRegularTextFile(absPath: string, maxBytes: number, rootDir?: string | undefined): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Find byte markers in a file with bounded chunked reads.
|
|
36
|
+
*
|
|
37
|
+
* Each hit records up to `beforeBytes` bytes before the marker and up to
|
|
38
|
+
* `contextBytes` bytes after it, so a caller can read a version that follows a
|
|
39
|
+
* marker or check what a string is part of. Consecutive reads overlap by the
|
|
40
|
+
* longest marker plus the context length, so a marker split across two reads
|
|
41
|
+
* is seen whole once. Only bytes that were read are searched.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} absPath absolute path of the file
|
|
44
|
+
* @param {string|undefined} rootDir extracted root the file must stay under
|
|
45
|
+
* @param {Buffer[]} markers byte markers to look for
|
|
46
|
+
* @param {Object} [options] options
|
|
47
|
+
* @param {number} [options.maxBytes] files larger than this are not read
|
|
48
|
+
* @param {number} [options.contextBytes=64] bytes kept after each hit
|
|
49
|
+
* @param {number} [options.beforeBytes=1] bytes kept before each hit
|
|
50
|
+
* @param {number} [options.maxHits=16] hits kept per marker
|
|
51
|
+
* @returns {{hits: {before: Buffer, after: Buffer, offset: number}[][], size: number, skipped?: string}|undefined}
|
|
52
|
+
* hits per marker, in marker order, and the file size; `skipped` is
|
|
53
|
+
* `too-large` when the file is over the cap and was not read. Undefined when
|
|
54
|
+
* the file cannot be opened.
|
|
55
|
+
*/
|
|
56
|
+
export declare function scanFileMarkers(absPath: string, rootDir: string | undefined, markers: Buffer[], { maxBytes, contextBytes, beforeBytes, maxHits, }?: {
|
|
57
|
+
maxBytes?: number;
|
|
58
|
+
contextBytes?: number;
|
|
59
|
+
beforeBytes?: number;
|
|
60
|
+
maxHits?: number;
|
|
61
|
+
}): {
|
|
62
|
+
hits: {
|
|
63
|
+
before: Buffer;
|
|
64
|
+
after: Buffer;
|
|
65
|
+
offset: number;
|
|
66
|
+
}[][];
|
|
67
|
+
size: number;
|
|
68
|
+
skipped?: string;
|
|
69
|
+
} | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Compute the digest of a regular file with bounded chunked reads, under the
|
|
72
|
+
* same rules as readRegularTextFile: a FIFO, a directory, a symlink, a file
|
|
73
|
+
* that resolves outside rootDir or one larger than maxBytes yields undefined.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} absPath absolute path
|
|
76
|
+
* @param {number} maxBytes largest size hashed
|
|
77
|
+
* @param {string|undefined} [rootDir] root the path must stay under
|
|
78
|
+
* @param {string} [algorithm="sha256"] node:crypto hash algorithm
|
|
79
|
+
* @returns {string|undefined} the hex digest, or undefined
|
|
80
|
+
*/
|
|
81
|
+
export declare function hashRegularFile(absPath: string, maxBytes: number, rootDir?: string | undefined, algorithm?: string): string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* True when the process runs as root, where a symlink planted in a user's
|
|
84
|
+
* home could point a scan at files only root can read.
|
|
85
|
+
*
|
|
86
|
+
* @returns {boolean} true for uid 0
|
|
87
|
+
*/
|
|
88
|
+
export declare function isRunningAsRoot(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Read a small text file a user keeps in their home, such as an editor's or an
|
|
91
|
+
* agent's configuration. Dotfile managers often make these symlinks, so a
|
|
92
|
+
* symlink to a regular file is followed, except when the process runs as root.
|
|
93
|
+
* The target must still be a regular file no larger than maxBytes.
|
|
94
|
+
*
|
|
95
|
+
* @param {string} absPath absolute path
|
|
96
|
+
* @param {number} maxBytes largest size read
|
|
97
|
+
* @returns {string|undefined} the text, or undefined
|
|
98
|
+
*/
|
|
99
|
+
export declare function readUserFileText(absPath: string, maxBytes: number): string | undefined;
|
|
100
|
+
//# sourceMappingURL=boundedFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundedFile.d.ts","sourceRoot":"","sources":["../../../lib/core/boundedFile.js"],"names":[],"mappings":"AA8BA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAFxB,MAEiD,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAL5B,MAK4B,EAAE,OAAO,EAJrC,MAAM,GAAC,SAI8B,GAHnC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAsChD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EALhC,MAKgC,EAAE,QAAQ,EAJ1C,MAI0C,EAAE,OAAO,AAH3D,CACA,EADQ,MAAM,GAAC,SAG4C,GAFjD,MAAM,GAAC,SAAS,CAoC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAdE,MAcF,EACP,OAAO,EAdE,MAAM,GAAC,SAcT,EACP,OAAO,EAdE,MAAM,EAcR,EACP,EACE,QAAgC,EAChC,YAAiB,EACjB,WAAe,EACf,OAAY,GACb,AAnBA,CAKA,EAJA;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,YAAY,AAArC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,OAAO,AAAhC,CACA,EADQ,MAAM,CACd;CAcK,GAdK;IAAC,IAAI,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAsGjH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAPE,MAOF,EACP,QAAQ,EAPC,MAOD,EACR,OAAO,AAPN,CACA,EADQ,MAAM,GAAC,SAOT,EACP,SAAS,AAPR,CACA,EADQ,MAOW,GANT,MAAM,GAAC,SAAS,CA2C5B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAFlB,OAAO,CAInB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAJ7B,MAI6B,EAAE,QAAQ,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAkB5B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The most files of one kind (executables and libraries, or extension
|
|
3
|
+
* modules) one scan opens in search of a Brotli decoder.
|
|
4
|
+
*
|
|
5
|
+
* @type {number}
|
|
6
|
+
*/
|
|
7
|
+
export declare const MAX_BROTLI_PROBES: number;
|
|
8
|
+
/**
|
|
9
|
+
* The most bytes one scan reads in search of Brotli decoders.
|
|
10
|
+
*
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
export declare const MAX_BROTLI_PROBE_BYTES: number;
|
|
14
|
+
/**
|
|
15
|
+
* Read which Brotli decoders a native file embeds and whether each carries
|
|
16
|
+
* the CVE-2026-111497 fix.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} absPath absolute path of the file
|
|
19
|
+
* @param {string|undefined} rootDir extracted root the file must stay under
|
|
20
|
+
* @returns {{c?: {blockSwitchFix: string, evidence: string}, go?: {blockSwitchFix: string}, skipped?: string, size: number}|undefined}
|
|
21
|
+
* undefined when the file cannot be read or holds no decoder. `c` is
|
|
22
|
+
* Google's C decoder, with blockSwitchFix `true`, `false` or `unknown` and
|
|
23
|
+
* the evidence it rests on (`error-names`, `constant-names` or `tables`);
|
|
24
|
+
* `go` is the Go port. `skipped` is `too-large` for a file over the read cap.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readBrotliDecoder(absPath: string, rootDir: string | undefined): {
|
|
27
|
+
c?: {
|
|
28
|
+
blockSwitchFix: string;
|
|
29
|
+
evidence: string;
|
|
30
|
+
};
|
|
31
|
+
go?: {
|
|
32
|
+
blockSwitchFix: string;
|
|
33
|
+
};
|
|
34
|
+
skipped?: string;
|
|
35
|
+
size: number;
|
|
36
|
+
} | undefined;
|
|
37
|
+
//# sourceMappingURL=brotliProbe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brotliProbe.d.ts","sourceRoot":"","sources":["../../../lib/core/brotliProbe.js"],"names":[],"mappings":"AAmEA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAFpB,MAE2B,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAFzB,MAEmD,CAAC;AAgC9D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAR9B,MAQ8B,EAAE,OAAO,EAPvC,MAAM,GAAC,SAOgC,GANrC;IAAC,CAAC,CAAC,EAAE;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC;IAAC,EAAE,CAAC,EAAE;QAAC,cAAc,EAAE,MAAM,CAAA;KAAC,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CA+DrI"}
|