@cdxgen/cdxgen 13.3.0 → 13.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/bin/cdxgen-secure.js +15 -0
- package/bin/cdxgen.js +115 -31
- package/bin/evinse.js +23 -1
- package/bin/hbom.js +15 -7
- package/bin/repl.js +115 -0
- package/bin/sign.js +45 -15
- package/bin/tracebom.js +5 -1
- package/bin/validate.js +84 -18
- package/bin/verify.js +155 -86
- package/data/cbomosdb-queries.json +13 -1
- package/data/component-tags.json +8 -0
- package/data/helpers/init.gradle +46 -21
- package/data/queries-darwin.json +25 -1
- package/data/queries-win.json +19 -1
- package/data/queries.json +41 -0
- package/data/remediations.json +344 -1
- package/data/rules/cbom-security.yaml +235 -4
- package/data/rules/dependency-sources.yaml +67 -0
- package/data/rules/go-binaries.yaml +46 -0
- package/data/rules/golem-go.yaml +80 -0
- package/data/rules/hbom-compliance.yaml +40 -22
- package/data/rules/hbom-performance.yaml +7 -1
- package/data/rules/host-topology.yaml +1 -1
- package/data/rules/obom-runtime.yaml +31 -2
- package/data/rules/php-runtime.yaml +143 -0
- package/data/rules/scala-evidence.yaml +115 -0
- package/lib/audit/index.js +52 -6
- package/lib/cli/bomAssembly.js +28 -3
- package/lib/cli/cliOptions.js +110 -3
- package/lib/cli/index.js +186 -58
- package/lib/cli/jsBom.js +50 -29
- package/lib/cli/jvmBom.js +779 -146
- package/lib/cli/managedBom.js +1021 -261
- package/lib/cli/nativeBom.js +364 -58
- package/lib/core/activity.js +12 -0
- package/lib/core/env.js +47 -17
- package/lib/core/fs.js +31 -21
- package/lib/core/httpClient.js +233 -69
- package/lib/core/pluginRun.js +184 -0
- package/lib/core/processTree.js +100 -0
- package/lib/core/projectConfig.js +1 -0
- package/lib/core/projectTooling.js +97 -0
- package/lib/core/propertySanitizer.js +72 -0
- package/lib/core/runState.js +39 -0
- package/lib/core/toml.js +72 -0
- package/lib/ecosystems/asarutils.js +4 -2
- package/lib/ecosystems/bunutils.js +5 -7
- package/lib/ecosystems/cargoCache.js +231 -8
- package/lib/ecosystems/cmakeResolver.js +10 -21
- package/lib/ecosystems/cppBuildContext.js +631 -0
- package/lib/ecosystems/cppEvidence.js +337 -22
- package/lib/ecosystems/cppIncludeResolver.js +294 -0
- package/lib/ecosystems/denoutils.js +93 -66
- package/lib/ecosystems/ecosystems.js +1967 -788
- package/lib/ecosystems/golem.js +578 -18
- package/lib/ecosystems/gradleutils.js +340 -46
- package/lib/ecosystems/jsEvidence.js +85 -24
- package/lib/ecosystems/kosi.js +21 -4
- package/lib/ecosystems/npmutils.js +64 -0
- package/lib/ecosystems/parsers-dotnet.js +668 -153
- package/lib/ecosystems/parsers-elm.js +46 -28
- package/lib/ecosystems/parsers-gleam.js +3 -4
- package/lib/ecosystems/parsers-go.js +1283 -297
- package/lib/ecosystems/parsers-js.js +92 -26
- package/lib/ecosystems/parsers-julia.js +2 -3
- package/lib/ecosystems/parsers-jvm.js +463 -29
- package/lib/ecosystems/parsers-misc.js +405 -93
- package/lib/ecosystems/parsers-python.js +152 -20
- package/lib/ecosystems/parsers-rust.js +4 -4
- package/lib/ecosystems/parsers-terraform.js +1573 -19
- package/lib/ecosystems/pythonutils.js +102 -6
- package/lib/ecosystems/remote/huggingface.js +3 -0
- package/lib/ecosystems/rubyutils.js +73 -20
- package/lib/ecosystems/rusi.js +32 -9
- package/lib/ecosystems/sbtutils.js +243 -187
- package/lib/ecosystems/scalacliutils.js +343 -0
- package/lib/ecosystems/scalasem.js +2620 -0
- package/lib/ecosystems/terraformRegistry.js +288 -0
- package/lib/ecosystems/utils.js +2 -0
- package/lib/ecosystems/vendoredCode.js +156 -0
- package/lib/evinser/evinser.js +695 -78
- package/lib/evinser/swiftsem.js +68 -5
- package/lib/helpers/agenticToolutils.js +2 -2
- package/lib/helpers/bomSigner.js +576 -128
- package/lib/inventory/agentSkillSpec.js +17 -0
- package/lib/inventory/aiCollector.js +4 -1
- package/lib/inventory/analyzer.js +110 -127
- package/lib/inventory/apkInstalledDb.js +243 -0
- package/lib/inventory/atomUtils.js +204 -48
- package/lib/inventory/auditCategories.js +10 -3
- package/lib/inventory/buildToolRateLimit.js +144 -0
- package/lib/inventory/cacheCommands.js +2 -1
- package/lib/inventory/cacheDir.js +52 -9
- package/lib/inventory/certificates.js +2371 -0
- package/lib/inventory/cmakeBuildDirs.js +254 -0
- package/lib/inventory/communityAiConfigParser.js +4 -9
- package/lib/inventory/deps.js +507 -128
- package/lib/inventory/display.js +200 -3
- package/lib/inventory/dosai.js +747 -101
- package/lib/inventory/dosaiParsers.js +310 -15
- package/lib/inventory/dynamic.js +96 -8
- package/lib/inventory/envcontext.js +168 -5
- package/lib/inventory/evidenceUtils.js +590 -132
- package/lib/inventory/fetchBatch.js +574 -38
- package/lib/inventory/fetchDiskCache.js +597 -0
- package/lib/inventory/forgeEnricher.js +14 -5
- package/lib/inventory/formulationParsers.js +3 -2
- package/lib/inventory/goBuildInfo.js +140 -0
- package/lib/inventory/hbom.js +67 -7
- package/lib/inventory/hbomAnalysis.js +16 -0
- package/lib/inventory/hostTopology.js +21 -0
- package/lib/inventory/jvmLocalRepos.js +917 -0
- package/lib/inventory/mcpConfigParser.js +2 -3
- package/lib/inventory/osPackagePurl.js +244 -0
- package/lib/inventory/osPackageResolver.js +89 -87
- package/lib/inventory/osinfo.js +79 -31
- package/lib/inventory/osqueryTransform.js +114 -5
- package/lib/inventory/parentSelection.js +146 -0
- package/lib/inventory/phpBuildInfo.js +487 -0
- package/lib/inventory/phpHostProbe.js +641 -0
- package/lib/inventory/rootfsCerts.js +426 -0
- package/lib/inventory/rustFormulationParser.js +3 -4
- package/lib/inventory/scalaCoords.js +153 -0
- package/lib/inventory/source.js +215 -11
- package/lib/inventory/spdx.js +245 -0
- package/lib/inventory/traceRunner.js +93 -8
- package/lib/inventory/tracedCrypto.js +423 -0
- package/lib/managers/binary.js +529 -183
- package/lib/managers/docker.js +199 -44
- package/lib/managers/oci.js +24 -2
- package/lib/parsers/cmakeCache.js +69 -0
- package/lib/parsers/cmakeLists.js +16 -2
- package/lib/parsers/cmakePresets.js +400 -0
- package/lib/parsers/compileCommands.js +557 -0
- package/lib/parsers/email.js +277 -0
- package/lib/parsers/largeJson.js +34 -2
- package/lib/parsers/strictJson.js +322 -0
- package/lib/parsers/terraformConfig.js +1073 -0
- package/lib/parsers/terraformSource.js +652 -0
- package/lib/server/server.js +209 -1
- package/lib/stages/postgen/annotator.js +17 -1
- package/lib/stages/postgen/introspection/markers.js +1 -1
- package/lib/stages/postgen/introspection/reflect.js +4 -1
- package/lib/stages/postgen/postgen.js +20 -6
- package/lib/stages/postgen/ruleEngine.js +58 -1
- package/lib/stages/postgen/specVersionCompat.js +62 -0
- package/lib/stages/pregen/pregen.js +117 -5
- package/lib/validator/bomValidator.js +26 -5
- package/lib/validator/generated/runtime.mjs +13 -0
- package/lib/validator/generated/validate-1.6.mjs +26 -7
- package/lib/validator/generated/validate-1.7.mjs +31 -12
- package/lib/validator/generated/validate-2.0.mjs +30 -11
- package/lib/validator/index.js +25 -10
- package/lib/validator/reporters/json.js +1 -0
- package/package.json +23 -23
- package/types/bin/cdxgen-secure.d.ts +3 -0
- package/types/bin/cdxgen-secure.d.ts.map +1 -0
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +9 -2
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +43 -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.map +1 -1
- package/types/lib/cli/jvmBom.d.ts +44 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts +7 -4
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts +3 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/activity.d.ts.map +1 -1
- package/types/lib/core/env.d.ts +27 -2
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/httpClient.d.ts +13 -8
- package/types/lib/core/httpClient.d.ts.map +1 -1
- package/types/lib/core/pluginRun.d.ts +97 -0
- package/types/lib/core/pluginRun.d.ts.map +1 -0
- package/types/lib/core/processTree.d.ts +36 -0
- package/types/lib/core/processTree.d.ts.map +1 -0
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/projectTooling.d.ts +41 -0
- package/types/lib/core/projectTooling.d.ts.map +1 -0
- package/types/lib/core/propertySanitizer.d.ts +26 -0
- package/types/lib/core/propertySanitizer.d.ts.map +1 -1
- package/types/lib/core/runState.d.ts +29 -0
- package/types/lib/core/runState.d.ts.map +1 -0
- package/types/lib/core/toml.d.ts +20 -0
- package/types/lib/core/toml.d.ts.map +1 -0
- package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
- package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
- package/types/lib/ecosystems/cargoCache.d.ts +12 -0
- package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
- package/types/lib/ecosystems/cmakeResolver.d.ts +5 -3
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
- package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +19 -3
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
- package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
- package/types/lib/ecosystems/denoutils.d.ts +9 -3
- package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts +62 -13
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/golem.d.ts +81 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +59 -7
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -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/npmutils.d.ts +15 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +155 -5
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-go.d.ts +119 -5
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +6 -1
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts +74 -3
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +21 -59
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +57 -6
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
- package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +26 -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 +21 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/sbtutils.d.ts +88 -2
- package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
- package/types/lib/ecosystems/scalasem.d.ts +311 -0
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
- package/types/lib/ecosystems/utils.d.ts +2 -2
- package/types/lib/ecosystems/utils.d.ts.map +1 -1
- package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
- package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +100 -8
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +10 -0
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +80 -4
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
- package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
- package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +96 -10
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +3 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
- package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
- package/types/lib/inventory/cacheCommands.d.ts +2 -1
- package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
- package/types/lib/inventory/cacheDir.d.ts +12 -4
- package/types/lib/inventory/cacheDir.d.ts.map +1 -1
- package/types/lib/inventory/certificates.d.ts +205 -0
- package/types/lib/inventory/certificates.d.ts.map +1 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/deps.d.ts +61 -2
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts +18 -0
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +202 -14
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dosaiParsers.d.ts +53 -7
- package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.d.ts +16 -1
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts +40 -2
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +48 -14
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +83 -14
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
- package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
- package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
- package/types/lib/inventory/goBuildInfo.d.ts +10 -0
- package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/hbom.d.ts.map +1 -1
- package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
- package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
- package/types/lib/inventory/hostTopology.d.ts.map +1 -1
- package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
- package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/osPackagePurl.d.ts +99 -0
- package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +6 -2
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
- package/types/lib/inventory/osinfo.d.ts +31 -6
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/osqueryTransform.d.ts +51 -0
- package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
- package/types/lib/inventory/parentSelection.d.ts +34 -0
- package/types/lib/inventory/parentSelection.d.ts.map +1 -0
- package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
- package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/phpHostProbe.d.ts +35 -0
- package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/rootfsCerts.d.ts +27 -0
- package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/scalaCoords.d.ts +80 -0
- package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts +28 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +24 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +16 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +64 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts +10 -0
- 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/managers/oci.d.ts +3 -1
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/parsers/cmakeCache.d.ts +16 -0
- package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
- package/types/lib/parsers/cmakeLists.d.ts +2 -1
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
- package/types/lib/parsers/cmakePresets.d.ts +78 -0
- package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
- package/types/lib/parsers/compileCommands.d.ts +115 -0
- package/types/lib/parsers/compileCommands.d.ts.map +1 -0
- package/types/lib/parsers/email.d.ts +19 -0
- package/types/lib/parsers/email.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +13 -0
- package/types/lib/parsers/largeJson.d.ts.map +1 -1
- package/types/lib/parsers/strictJson.d.ts +46 -0
- package/types/lib/parsers/strictJson.d.ts.map +1 -0
- package/types/lib/parsers/terraformConfig.d.ts +70 -0
- package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
- package/types/lib/parsers/terraformSource.d.ts +66 -0
- package/types/lib/parsers/terraformSource.d.ts.map +1 -0
- package/types/lib/server/server.d.ts +8 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +14 -1
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +8 -0
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
|
@@ -37,6 +37,49 @@ export declare function validateSpecVersion(specVersion: number, commandName?: s
|
|
|
37
37
|
* @returns {boolean} True when the user explicitly set this flag
|
|
38
38
|
*/
|
|
39
39
|
export declare function isUserProvided(value: any, yaDefault: any): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The value the operator gave an option on the command line or through its
|
|
42
|
+
* CDXGEN_* environment variable. yargs also fills options in from defaults
|
|
43
|
+
* and from a config file, which cannot be told apart in its output.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} option kebab-case option name
|
|
46
|
+
* @param {object} [context]
|
|
47
|
+
* @param {string[]} [context.argv] Raw command-line arguments
|
|
48
|
+
* @param {object} [context.env] Environment variables
|
|
49
|
+
* @param {boolean} [context.boolean] Read the option as a boolean flag
|
|
50
|
+
* @returns {string|boolean|undefined} The operator's value, or undefined
|
|
51
|
+
*/
|
|
52
|
+
export declare function operatorOptionChoice(option: string, { argv, env, boolean }?: {
|
|
53
|
+
argv?: string[];
|
|
54
|
+
env?: object;
|
|
55
|
+
boolean?: boolean;
|
|
56
|
+
}): string | boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Make the operator's choice about running the scanned project's own code
|
|
59
|
+
* final. A config file is read from the working directory, which is usually
|
|
60
|
+
* the scanned project, so it carries that project's trust. Neither the config
|
|
61
|
+
* file nor a profile or lifecycle may turn installs on when the operator
|
|
62
|
+
* disabled them, and secure mode keeps installs off unless the operator
|
|
63
|
+
* passes --install-deps. Introspection keeps the project's build tools
|
|
64
|
+
* running with installs off, which is likewise the operator's decision, so
|
|
65
|
+
* introspection asked for only by the config file does not do that.
|
|
66
|
+
*
|
|
67
|
+
* **Mutates `options` in place.**
|
|
68
|
+
*
|
|
69
|
+
* @param {object} options The options object, after applyAdvancedOptions
|
|
70
|
+
* @param {object} [context]
|
|
71
|
+
* @param {object} [context.projectConfig] Sanitized config file contents
|
|
72
|
+
* @param {boolean} [context.isSecureMode] Whether cdxgen runs in secure mode
|
|
73
|
+
* @param {string[]} [context.argv] Raw command-line arguments
|
|
74
|
+
* @param {object} [context.env] Environment variables
|
|
75
|
+
* @returns {void}
|
|
76
|
+
*/
|
|
77
|
+
export declare function applyOperatorToolingChoice(options: object, context?: {
|
|
78
|
+
projectConfig?: object;
|
|
79
|
+
isSecureMode?: boolean;
|
|
80
|
+
argv?: string[];
|
|
81
|
+
env?: object;
|
|
82
|
+
}): void;
|
|
40
83
|
/**
|
|
41
84
|
* Combine the custom metadata properties of every source (discussion 4391):
|
|
42
85
|
* the `--metadata-property` flag, the CDXGEN_METADATA_PROPERTY and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cliOptions.d.ts","sourceRoot":"","sources":["../../../lib/cli/cliOptions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"cliOptions.d.ts","sourceRoot":"","sources":["../../../lib/cli/cliOptions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAJpC,MAIoC,EAAE,WAAW,AAHzD,CACA,EADQ,MAG4D,GAF1D,MAAM,GAAC,IAAI,CAoBvB;AA4CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAJzB,GAIyB,EAAE,SAAS,EAHpC,GAGoC,GAFlC,OAAO,CAInB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EARG,MAQH,EACN,EAAE,IAA4B,EAAE,GAAiB,EAAE,OAAe,EAAE,AARnE,CAIA,EAHA;IAA2B,IAAI,AAA/B,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,GAAG,AAA5B,CACA,EADQ,MAAM,CACd;IAA0B,OAAO,AAAjC,CACA,EADQ,OAAO,CACf;CAIwE,GAJ9D,MAAM,GAAC,OAAO,GAAC,SAAS,CA4CpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EARvC,MAQuC,EAAE,OAAO,AAPxD,CAKA,EAJA;IAAyB,aAAa,AAAtC,CACA,EADQ,MAAM,CACd;IAA0B,YAAY,AAAtC,CACA,EADQ,OAAO,CACf;IAA2B,IAAI,AAA/B,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,GAAG,AAA5B,CACA,EADQ,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;;GA2BG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAd9B,MAc8B,EAAE,OAAO,EAZ/C;IAAwB,kBAAkB,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;CAE+C,GAFrC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CA+B3D"}
|
|
@@ -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":"AAgFA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAyCnE,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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;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,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,CA+FjD"}
|
|
@@ -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":"AAiHA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CAq3C3B;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,CA+F3B;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;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,EANJ,MAMI,EACb,OAAO,EANE,MAMF,EACP,OAAO,EANE,MAAM,EAMR,EACP,YAAY,EANH,MAAM,EAMH,iBAsBb"}
|
|
@@ -18,6 +18,25 @@ export declare const GRADLE_INIT_SCRIPT: string;
|
|
|
18
18
|
* @type {string}
|
|
19
19
|
*/
|
|
20
20
|
export declare const SBT_CACHE_DIR: string;
|
|
21
|
+
/**
|
|
22
|
+
* Collect the namespaces of the jars of resolved sbt dependencies. sbt has
|
|
23
|
+
* just downloaded them into the user's caches, so each is read from there;
|
|
24
|
+
* the rest of the cache is never walked.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object[]} pkgList Packages from the sbt dependency trees.
|
|
27
|
+
* @param {Object} [known] Jar namespace mapping already collected. Packages
|
|
28
|
+
* it covers are skipped.
|
|
29
|
+
* @returns {Promise<Object>} Jar namespace mapping keyed by package purl.
|
|
30
|
+
*/
|
|
31
|
+
export declare function collectSbtDependencyJars(pkgList: Object[], known?: Object): Promise<Object>;
|
|
32
|
+
/**
|
|
33
|
+
* The purls and bom-refs of a parent component and the module components
|
|
34
|
+
* nested under it.
|
|
35
|
+
*
|
|
36
|
+
* @param {Object} parentComponent Parent component.
|
|
37
|
+
* @returns {Set<string>} Purls and bom-refs.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ownComponentRefs(parentComponent: Object): Set<string>;
|
|
21
40
|
/**
|
|
22
41
|
* Function to create bom string for Java jars
|
|
23
42
|
*
|
|
@@ -34,15 +53,39 @@ export declare function createJarBom(path: string, options: Object): Object;
|
|
|
34
53
|
* (commented-out code, examples, values that merely resemble project defs) that
|
|
35
54
|
* can lead to hangs when those bogus scopes are later passed to `dependencyTree`.
|
|
36
55
|
*
|
|
56
|
+
* The root project is kept when it has sources of its own, since it is then
|
|
57
|
+
* the application rather than a pure aggregator.
|
|
58
|
+
*
|
|
37
59
|
* Falls back to the regex-based {@link discoverSbtProjects} heuristic when the
|
|
38
60
|
* sbt invocation fails or yields nothing useful.
|
|
39
61
|
*
|
|
40
62
|
* @param {string} basePath Directory of the sbt build
|
|
41
63
|
* @param {string} sbtCmd sbt executable
|
|
42
64
|
* @param {Object} env Environment for the spawned process
|
|
65
|
+
* @param {string[]} [launcherArgs] Launcher options placed before the sbt arguments
|
|
43
66
|
* @returns {string[]} List of sbt project ids
|
|
44
67
|
*/
|
|
45
|
-
export declare function discoverSbtProjectsFromCmd(basePath: string, sbtCmd: string, env: Object): string[];
|
|
68
|
+
export declare function discoverSbtProjectsFromCmd(basePath: string, sbtCmd: string, env: Object, launcherArgs?: string[]): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Read one pom.xml without running Maven: the module it declares and its
|
|
71
|
+
* direct dependencies. Versions resolve from the pom's properties and
|
|
72
|
+
* dependencyManagement and from parent poms inside the scanned directory.
|
|
73
|
+
* Versions that an imported BOM or a parent outside the directory manages
|
|
74
|
+
* stay empty, and transitive dependencies are unknown.
|
|
75
|
+
*
|
|
76
|
+
* No dependency edges are produced. The build-fidelity rules (BF-JVM-001,
|
|
77
|
+
* BF-GEN-001) recognise a pom read without Maven by its missing graph, and a
|
|
78
|
+
* graph of direct edges alone would pass for a resolved one.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} pomFile pom.xml to read
|
|
81
|
+
* @param {string} rootPath Scanned directory
|
|
82
|
+
* @param {Map} [cache] Parent pom results shared by the poms of one scan
|
|
83
|
+
* @returns {{moduleComponent: Object|undefined, pkgList: Object[]}}
|
|
84
|
+
*/
|
|
85
|
+
export declare function readMavenModuleStatically(pomFile: string, rootPath: string, cache?: Map<any, any>): {
|
|
86
|
+
moduleComponent: Object | undefined;
|
|
87
|
+
pkgList: Object[];
|
|
88
|
+
};
|
|
46
89
|
/**
|
|
47
90
|
* Function to create bom string for Java projects
|
|
48
91
|
*
|
|
@@ -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":"AA4HA;;;;;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;;;;;;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,CAonE3B"}
|
|
@@ -127,12 +127,15 @@ export declare function createPerlBom(path: string, options: Object): Object;
|
|
|
127
127
|
/**
|
|
128
128
|
* Function to create bom string for Terraform and OpenTofu projects.
|
|
129
129
|
*
|
|
130
|
-
* The
|
|
131
|
-
*
|
|
130
|
+
* The workspace assembly turns the provider lock file, the module manifest
|
|
131
|
+
* `init` writes and the configuration files into module and provider
|
|
132
|
+
* components with a dependency graph and offline licenses. When metadata
|
|
133
|
+
* fetching is enabled, the public registries add licenses, repository URLs
|
|
134
|
+
* and registry flags to components the offline pass could not resolve.
|
|
132
135
|
*
|
|
133
136
|
* @param {string} path to the project
|
|
134
137
|
* @param {Object} options Parse options from the cli
|
|
135
|
-
* @returns {Object} BOM object
|
|
138
|
+
* @returns {Promise<Object>} BOM object
|
|
136
139
|
*/
|
|
137
|
-
export declare function createTerraformBom(path: string, options: Object): Object
|
|
140
|
+
export declare function createTerraformBom(path: string, options: Object): Promise<Object>;
|
|
138
141
|
//# sourceMappingURL=managedBom.d.ts.map
|
|
@@ -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":"AAwKA;;;;;;;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;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAJzB,MAIyB,EAAE,OAAO,EAHlC,MAGkC,GAFhC,MAAM,CAyBlB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,MAAM,CAsBlB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAJhC,MAIgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,OAAO,CAAC,MAAM,CAAC,CA2C3B;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,EAAE,OAAO,EAHhC,MAGgC,GAF9B,MAAM,CA0BlB;AAwBD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,MAAM,CAmOlB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CA8U3B;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAktBrC;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAJpC,MAIoC,EAAE,OAAO,EAH7C,MAG6C,GAF3C,OAAO,CAAC,MAAM,CAAC,CAyQ3B;AA6ND;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAJpB,MAIoB,EAAE,OAAO,EAH7B,MAG6B,GAF3B,MAAM,CA2DlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,EAAE,OAAO,EAHhC,MAGgC,GAF9B,MAAM,CAmClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,OAAO,CAAC,MAAM,CAAC,CA6B3B"}
|
|
@@ -25,7 +25,9 @@ export declare function createRustBom(path: any, options: any): Promise<Object |
|
|
|
25
25
|
export declare function buildCargoCacheComponent(crateFile: string): object | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Enriches a cargo cache component with a SHA-256 hash and filename-based
|
|
28
|
-
* identity evidence (confidence 0.5)
|
|
28
|
+
* identity evidence (confidence 0.5), and with what the archive's own manifest
|
|
29
|
+
* says: its licence, description and repository, read from the archive without
|
|
30
|
+
* extracting it anywhere. Hash computation failures are ignored.
|
|
29
31
|
*
|
|
30
32
|
* @param {string} crateFile Absolute path to the `.crate` archive
|
|
31
33
|
* @param {object} [component] Component produced by `buildCargoCacheComponent`
|
|
@@ -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":"AA8LA;;;;;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,CA0E3B;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,MAAM,CA4elB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAJ1B,MAI0B,EAAE,OAAO,EAHnC,MAGmC,GAFjC,MAAM,CA2KlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAJ5B,MAI4B,EAA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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../lib/core/activity.js"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,eAAO,MAAM,UAAU,SAEkB,CAAC;AAE1C,+GAA+G;AAC/G,eAAO,MAAM,YAAY,KAE4B,CAAC;AAQtD,8IAA8I;AAC9I,eAAO,IAAI,QAAQ,KACkD,CAAC;AAEtE,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../lib/core/activity.js"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,eAAO,MAAM,UAAU,SAEkB,CAAC;AAE1C,+GA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B,MAAM,EAAE,CAGrB;AAED,oEAAoE;AACpE,wBAAgB,uBAAuB,IADqB,IAAI,CAO/D;AAED;;;;;;;;;GASG;AACH,iBAAS,wBAAwB,CAC/B,IAAI,EARK,MAQL,EACJ,MAAM,EARG,MAQH,EACN,MAAM,EARG,MAQH,EACN,MAAM,AARL,CACA,EADQ,MAQS,EAClB,QAAQ,AARP,CACA,EADQ,MAQI,GAPF,MAAM,GAAC,SAAS,CAgB5B;AAED,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,UAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EALC,MAKD,EACR,eAAe,AALd,CACA,EADQ,MAKwD,GAJtD,OAAO,CA+BnB;AAED;;;;;GAKG;AAEH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,GAH1B,OAAO,CAmBnB;AAmED,uLAAuL;AACvL,eAAO,MAAM,WAAW,UAyItB,CAAC;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"}
|
package/types/lib/core/env.d.ts
CHANGED
|
@@ -30,6 +30,15 @@ export declare function parseMavenArgs(argsString: string): string[];
|
|
|
30
30
|
* @returns {boolean} True if the FETCH_LICENSE env var is set to "true" or "1"
|
|
31
31
|
*/
|
|
32
32
|
export declare function shouldFetchLicense(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Determines whether registry provenance, such as publish times, publishers
|
|
35
|
+
* and trusted-publishing signals, is wanted. `--bom-audit` turns it on through
|
|
36
|
+
* CDXGEN_FETCH_PKG_METADATA. Local data cannot answer these questions, so a
|
|
37
|
+
* package whose licence and description are known locally is still looked up.
|
|
38
|
+
*
|
|
39
|
+
* @returns {boolean} True if CDXGEN_FETCH_PKG_METADATA is "true" or "1"
|
|
40
|
+
*/
|
|
41
|
+
export declare function shouldFetchRegistryProvenance(): boolean;
|
|
33
42
|
/**
|
|
34
43
|
* Determines whether remote package metadata should be fetched for enrichment.
|
|
35
44
|
*
|
|
@@ -104,6 +113,10 @@ export declare let CDXGEN_TEMP_DIR: string;
|
|
|
104
113
|
export declare const SWIFT_CMD: string;
|
|
105
114
|
/** Resolved Ruby executable command (RUBY_CMD env var, or "ruby"). */
|
|
106
115
|
export declare const RUBY_CMD: string;
|
|
116
|
+
/** Resolved PHP executable command (PHP_CMD env var, or "php"). */
|
|
117
|
+
export declare const PHP_CMD: string;
|
|
118
|
+
/** Resolved Composer executable command (COMPOSER_CMD env var, or "composer"). */
|
|
119
|
+
export declare const COMPOSER_CMD: string;
|
|
107
120
|
/** Python package components that can be excluded from the generated BOM. */
|
|
108
121
|
export declare const PYTHON_EXCLUDED_COMPONENTS: string[];
|
|
109
122
|
/** Map of base cdxgen project type to the array of accepted alias strings. */
|
|
@@ -202,12 +215,24 @@ export declare function isFeatureEnabled(cliOptions: Object, feature: string): b
|
|
|
202
215
|
* @param {Boolean} defaultStatus Default return value if there are no types provided
|
|
203
216
|
*/
|
|
204
217
|
export declare function hasAnyProjectType(projectTypes: any[], options: Object, defaultStatus?: boolean): any;
|
|
218
|
+
/**
|
|
219
|
+
* Extract the lowercase command name from an invoked command path, without
|
|
220
|
+
* directories or a trailing `.js`, `.cjs`, `.mjs` or `.exe` extension. Both
|
|
221
|
+
* `/` and `\\` separators are handled, so a Windows path is inspected the
|
|
222
|
+
* same way on any host.
|
|
223
|
+
*
|
|
224
|
+
* @param {string} [commandPath] Invoked command path or name
|
|
225
|
+
* @returns {string} Lowercase command name
|
|
226
|
+
*/
|
|
227
|
+
export declare function getCommandName(commandPath?: string): string;
|
|
205
228
|
/**
|
|
206
229
|
* Determine whether the predictive dependency audit should run for the current
|
|
207
230
|
* CLI invocation.
|
|
208
231
|
*
|
|
209
|
-
* OBOM
|
|
210
|
-
*
|
|
232
|
+
* OBOM and HBOM runs (commands named `obom` or `hbom`, including `hbom-slim`)
|
|
233
|
+
* and explicit `-t os` / OS / hardware project types alone keep the direct BOM
|
|
234
|
+
* audit findings but skip the predictive dependency audit. Only the command
|
|
235
|
+
* name is tested, never the directories leading to it.
|
|
211
236
|
*
|
|
212
237
|
* @param {object} options CLI options
|
|
213
238
|
* @param {string} [commandPath] Invoked command path or name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../lib/core/env.js"],"names":[],"mappings":"AAUA,uCAAuC;AACvC,eAAO,MAAM,MAAM,SAAmD,CAAC;AACvE,mCAAmC;AACnC,eAAO,MAAM,KAAK,SAAwC,CAAC;AAC3D,oCAAoC;AACpC,eAAO,MAAM,MAAM,SAA+C,CAAC;AAEnE,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,oBAElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAIrB,CAAC;AAEX,sJAAsJ;AACtJ,eAAO,MAAM,qBAAqB,SAI/B,CAAC;AAEJ,sIAAsI;AACtI,eAAO,MAAM,sBAAsB,SAElC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAiDpB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAFrB,OAAO,CAOnB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAF7B,OAAO,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../lib/core/env.js"],"names":[],"mappings":"AAUA,uCAAuC;AACvC,eAAO,MAAM,MAAM,SAAmD,CAAC;AACvE,mCAAmC;AACnC,eAAO,MAAM,KAAK,SAAwC,CAAC;AAC3D,oCAAoC;AACpC,eAAO,MAAM,MAAM,SAA+C,CAAC;AAEnE,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,oBAElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAIrB,CAAC;AAEX,sJAAsJ;AACtJ,eAAO,MAAM,qBAAqB,SAI/B,CAAC;AAEJ,sIAA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,EACP,OAAO,EARE,MAQF,EACP,UAAU,SAAA,EACV,UAAU,OAAA,OAmDX;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAFf,MAAM,CAIlB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAFZ,MAAM,CAYlB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAJ1B,MAI0B,EAAE,IAAI,EAHhC,MAGgC,GAF9B,OAAO,QAAQ,CAU3B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,KAAA,EAAE,IAAI,EAHvC,MAGuC,GAFrC,OAAO,CAAC,MAAM,CAAC,CA8B3B"}
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
* `Content-Encoding` header, matching `got`'s transparent decoding.
|
|
27
27
|
* - Proxy support via the standard `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY`
|
|
28
28
|
* environment variables (through undici's `EnvHttpProxyAgent`).
|
|
29
|
-
* - An in-memory GET response cache
|
|
30
|
-
*
|
|
31
|
-
* cache cdxgen previously relied on.
|
|
29
|
+
* - An in-memory GET response cache that replaces the got + Keyv cache cdxgen
|
|
30
|
+
* previously relied on. A request opts out with `cache: false`.
|
|
32
31
|
* - Response objects exposing `statusCode`, `headers`, `body`, `rawBody`,
|
|
33
32
|
* `url` and `request.options`.
|
|
34
33
|
* - A lazily-resolved `.json()` method on the returned promise, mirroring
|
|
@@ -86,13 +85,19 @@ export declare function getDefaultHttpTimeoutMs(): number;
|
|
|
86
85
|
*/
|
|
87
86
|
export declare function resolveTimeout(timeout?: number | Object): number | undefined;
|
|
88
87
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* callers can toggle it at runtime.
|
|
88
|
+
* Override the response cache bounds. Returns the previous bounds so tests can
|
|
89
|
+
* restore them. Not part of the public API.
|
|
92
90
|
*
|
|
93
|
-
* @
|
|
91
|
+
* @param {{ttlMs?: number, maxBytes?: number}} limits New bounds.
|
|
92
|
+
* @returns {{ttlMs: number, maxBytes: number}} Previous bounds.
|
|
94
93
|
*/
|
|
95
|
-
export declare function
|
|
94
|
+
export declare function _setHttpCacheLimits(limits: {
|
|
95
|
+
ttlMs?: number;
|
|
96
|
+
maxBytes?: number;
|
|
97
|
+
}): {
|
|
98
|
+
ttlMs: number;
|
|
99
|
+
maxBytes: number;
|
|
100
|
+
};
|
|
96
101
|
/**
|
|
97
102
|
* Clear the in-memory HTTP response cache. Primarily useful for tests.
|
|
98
103
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../../lib/core/httpClient.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../../lib/core/httpClient.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAU3B,QAAQ;IACR,OAAO;IACP,IAAI;IAXX;;;OAGG;IACH,YAAY,QAAQ,EAHT,MAGS,EAAE,OAAO,EAFlB,MAEkB,EAQ5B;CACF;AAED;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAQ9B,OAAO;IACP,IAAI;IACJ,KAAK;IATZ;;;OAGG;IACH,YAAY,KAAK,EAHN,KAGM,EAAE,OAAO,EAFf,MAEe,EAMzB;CACF;AAmED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAF1B,MAAM,CAYlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,AAHnC,CACA,EADQ,MAAM,GAAC,MAGoB,GAFzB,MAAM,GAAC,SAAS,CAyB5B;AAsMD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAH/B;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAGH,GAF7B;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAM7C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAFjB,IAAI,CAKhB;AAoBD;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAUnC,MAAM;IACN,GAAG;IAVV;;;OAGG;IACH,YAAY,MAAM,EAHP,MAGO,EAAE,GAAG,EAFZ,MAEY,EAOtB;CACF;AASD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAJ1B,CAAC,GAAG,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAC,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,GAAC,IAAI,CAIlG,GAFxB,IAAI,CAIhB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAFvB,IAAI,CAIhB;AA8VD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,AAJtC,CACA,EADQ,MAImC,YAwC7C"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared plumbing for plugin (rusi/golem/kosi) invocations: resolving the
|
|
3
|
+
* directory to analyze, and reporting a failed run.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The working directory, when a relative source argument names it.
|
|
7
|
+
*
|
|
8
|
+
* cdxgen is frequently launched with its working directory already set to the
|
|
9
|
+
* project (depscan does exactly that) while the path argument stays relative
|
|
10
|
+
* to some repository root, e.g. cwd `/work/repo/test/data/app` with argument
|
|
11
|
+
* `test/data/app`. A plain `path.resolve` then produces the doubled
|
|
12
|
+
* `/work/repo/test/data/app/test/data/app`. This recognises that shape and
|
|
13
|
+
* nothing looser: the argument's path segments must be the trailing segments
|
|
14
|
+
* of the working directory, so a mistyped argument run from some other
|
|
15
|
+
* project is never silently redirected to that project.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} src The source path as the caller typed it.
|
|
18
|
+
* @param {string} [cwd] Working directory; defaults to `process.cwd()`.
|
|
19
|
+
* @returns {string|undefined} The absolute working directory when the
|
|
20
|
+
* argument names it, otherwise undefined.
|
|
21
|
+
*/
|
|
22
|
+
export declare function cwdNamedByRelativeSource(src: string, cwd?: string): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the source path argument once, at cdxgen's entry point.
|
|
25
|
+
*
|
|
26
|
+
* Everything downstream — the BOM generators, evinse, and the rusi/golem/kosi
|
|
27
|
+
* launchers — resolves the argument against the working directory, so the
|
|
28
|
+
* doubled-directory shape has to be corrected before any of them run;
|
|
29
|
+
* correcting it only in the plugin launchers leaves the main BOM built from a
|
|
30
|
+
* directory that does not exist.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} src The source path as the caller typed it.
|
|
33
|
+
* @param {string} [cwd] Working directory; defaults to `process.cwd()`.
|
|
34
|
+
* @returns {{path: string, rewritten: boolean, missing: boolean}} `path` is
|
|
35
|
+
* the argument to use: unchanged when it resolves to an existing path, the
|
|
36
|
+
* working directory when the argument names it (`rewritten`), and otherwise
|
|
37
|
+
* unchanged with `missing` set.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveSourcePathArgument(src: string, cwd?: string): {
|
|
40
|
+
path: string;
|
|
41
|
+
rewritten: boolean;
|
|
42
|
+
missing: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the directory a plugin should analyze.
|
|
46
|
+
*
|
|
47
|
+
* The entry point already corrects the doubled-directory shape (see
|
|
48
|
+
* resolveSourcePathArgument); this is the same rule for callers that reach a
|
|
49
|
+
* plugin launcher directly (evinse, the library API). An existing directory
|
|
50
|
+
* wins and an absolute path is never rewritten. Otherwise the working
|
|
51
|
+
* directory is used only when the argument names it AND it carries the
|
|
52
|
+
* project marker the plugin needs (a `Cargo.toml` for rusi, a `go.mod` for
|
|
53
|
+
* golem). Anything else keeps the resolved path so the plugin's own error
|
|
54
|
+
* names the directory that was actually attempted.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} src The source path as the caller typed it.
|
|
57
|
+
* @param {string[]} markerFiles File names that, present in the working
|
|
58
|
+
* directory, identify it as the project the plugin should analyze.
|
|
59
|
+
* @returns {string} The directory to pass to the plugin.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolvePluginSourceDir(src: string, markerFiles?: string[]): string;
|
|
62
|
+
/**
|
|
63
|
+
* Report a failed plugin run, keeping the two failure classes apart.
|
|
64
|
+
*
|
|
65
|
+
* A spawn error means the plugin binary itself could not run — not installed,
|
|
66
|
+
* not executable, blocked by the command policy — which is an installation
|
|
67
|
+
* problem. A non-zero exit status or a missing report means the plugin ran
|
|
68
|
+
* and the analysis failed, which must not be dressed up as an installation
|
|
69
|
+
* problem: the message names the directory and says the reachability
|
|
70
|
+
* evidence will be missing, because a silent degradation is what let a
|
|
71
|
+
* doubled `--dir` go unnoticed in the first place.
|
|
72
|
+
*
|
|
73
|
+
* Under `--fail-on-error` the failure additionally claims the process exit
|
|
74
|
+
* status through the deferred-exit contract.
|
|
75
|
+
*
|
|
76
|
+
* @param {Object} run What ran and how it failed.
|
|
77
|
+
* @param {string} run.tool Plugin name, e.g. "rusi".
|
|
78
|
+
* @param {string} run.ecosystem Ecosystem the plugin serves, e.g. "rust".
|
|
79
|
+
* @param {string} run.executable The binary that was invoked.
|
|
80
|
+
* @param {string[]} run.args The arguments it was invoked with.
|
|
81
|
+
* @param {string} run.dir The directory that was analyzed.
|
|
82
|
+
* @param {Object} run.result The spawn result.
|
|
83
|
+
* @param {string} run.outputFile The report file the plugin should have written.
|
|
84
|
+
* @param {Object} [run.options] CLI options, for the `--fail-on-error` contract.
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
export declare function reportPluginRunFailure({ tool, ecosystem, executable, args, dir, result, outputFile, options, }: {
|
|
88
|
+
tool: string;
|
|
89
|
+
ecosystem: string;
|
|
90
|
+
executable: string;
|
|
91
|
+
args: string[];
|
|
92
|
+
dir: string;
|
|
93
|
+
result: Object;
|
|
94
|
+
outputFile: string;
|
|
95
|
+
options?: Object;
|
|
96
|
+
}): void;
|
|
97
|
+
//# sourceMappingURL=pluginRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginRun.d.ts","sourceRoot":"","sources":["../../../lib/core/pluginRun.js"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EALjC,MAKiC,EAAE,GAAG,AAJ9C,CACA,EADQ,MAIsD,GAHpD,MAAM,GAAC,SAAS,CA0B5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAPlC,MAOkC,EAAE,GAAG,AAN/C,CACA,EADQ,MAMuD,GALrD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAiBhE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAL/B,MAK+B,EAAE,WAAW,GAJ5C,MAAM,EAI2C,GAF/C,MAAM,CAoBlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,SAAS,EACT,UAAU,EACV,IAAI,EACJ,GAAG,EACH,MAAM,EACN,UAAU,EACV,OAAO,GACR,EAnBE;IAAoB,IAAI,EAAhB,MAAM,CACd;IAAoB,SAAS,EAArB,MAAM,CACd;IAAoB,UAAU,EAAtB,MAAM,CACd;IAAsB,IAAI,EAAlB,MAAM,EAAE,CAChB;IAAoB,GAAG,EAAf,MAAM,CACd;IAAoB,MAAM,EAAlB,MAAM,CACd;IAAoB,UAAU,EAAtB,MAAM,CACd;IAAqB,OAAO,AAA5B,CACA,EADQ,MAAM,CACd;CAWF,GAXY,IAAI,CAuChB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for external commands stopped by cdxgen's spawn timeout.
|
|
3
|
+
*
|
|
4
|
+
* Layer 0: this module imports nothing outside `lib/core`, so both the atom
|
|
5
|
+
* and the dosai runners (layer 2) can share it.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A duration for a message: seconds to one decimal below a minute, minutes to
|
|
9
|
+
* one decimal from there.
|
|
10
|
+
*
|
|
11
|
+
* @param {number} ms Duration in milliseconds
|
|
12
|
+
* @returns {string} Human-readable duration
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatDuration(ms: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* Stop the descendants a timed-out run left behind on Windows.
|
|
17
|
+
*
|
|
18
|
+
* The spawn timeout terminates only the process cdxgen spawned, and Windows
|
|
19
|
+
* neither kills nor re-parents its children: a shell's command, a runtime's
|
|
20
|
+
* workers, or the build hosts a .NET analyzer starts keep running while still
|
|
21
|
+
* pointing at the dead process's pid. `taskkill /T` on that pid finds nothing,
|
|
22
|
+
* because the root is already gone. The live descendants are therefore found
|
|
23
|
+
* by parent pid in a process snapshot and stopped, limited to processes
|
|
24
|
+
* created after the run started. The root's own children must also predate
|
|
25
|
+
* its end: once the root is gone its pid can be handed to an unrelated
|
|
26
|
+
* process, whose children would otherwise look like the run's. Elsewhere this
|
|
27
|
+
* does nothing: an orphan is re-parented and can no longer be told apart.
|
|
28
|
+
*
|
|
29
|
+
* @param {number|undefined} rootPid pid of the process cdxgen spawned
|
|
30
|
+
* @param {number} startedAt Epoch milliseconds at which the run started
|
|
31
|
+
* @param {number} [endedAt] Epoch milliseconds at which the spawned process ended
|
|
32
|
+
* @param {string} [toolName] Name of the tool, for the debug message
|
|
33
|
+
* @returns {number[]} The pids that were stopped
|
|
34
|
+
*/
|
|
35
|
+
export declare function reapProcessTree(rootPid: number | undefined, startedAt: number, endedAt?: number, toolName?: string): number[];
|
|
36
|
+
//# sourceMappingURL=processTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processTree.d.ts","sourceRoot":"","sources":["../../../lib/core/processTree.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAHtB,MAGsB,GAFpB,MAAM,CAQlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAPE,MAAM,GAAC,SAOT,EACP,SAAS,EAPA,MAOA,EACT,OAAO,AAPN,CACA,EADQ,MAOW,EACpB,QAAQ,AAPP,CACA,EADQ,MAOY,GANV,MAAM,EAAE,CAuDpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../lib/core/projectConfig.js"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,wBAAwB,UAKpC,CAAC;
|
|
1
|
+
{"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../lib/core/projectConfig.js"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAuEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAJjC,MAIiC,EAAE,SAAS,EAH5C,MAG4C,GAF1C;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAAC,CA+CnG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether secure mode is on right now. `isSecureMode` is read once when the
|
|
3
|
+
* modules load, but the `cdxgen-secure` command turns secure mode on later,
|
|
4
|
+
* by setting CDXGEN_SECURE_MODE before the scan starts.
|
|
5
|
+
*
|
|
6
|
+
* @returns {boolean} true when secure mode is on
|
|
7
|
+
*/
|
|
8
|
+
export declare function isSecureModeActive(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the scan may run the scanned project's own build tooling, such as
|
|
11
|
+
* wrapper scripts or build definitions that Maven, Gradle, sbt, Mill, Poetry,
|
|
12
|
+
* PDM, MSBuild, SwiftPM, Leiningen and CocoaPods evaluate.
|
|
13
|
+
*
|
|
14
|
+
* Tooling follows `options.installDeps`, which defaults to off in secure mode
|
|
15
|
+
* when a caller does not set it. Introspection mode exists to observe the
|
|
16
|
+
* project's own toolchain, so it keeps that tooling on even when dependency
|
|
17
|
+
* installation is disabled, as long as the operator asked for it rather than
|
|
18
|
+
* a config file in the scanned project. Secure mode still wins:
|
|
19
|
+
* CDXGEN_INTROSPECT alone must not make a secure-mode scan run the scanned
|
|
20
|
+
* project's code.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} [options] CLI options
|
|
23
|
+
* @returns {boolean} true when project tooling may run
|
|
24
|
+
*/
|
|
25
|
+
export declare function isProjectToolingAllowed(options?: Object): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Tell the user that a tool was skipped because project tooling is not
|
|
28
|
+
* allowed, and record the matching degradation for the fidelity report.
|
|
29
|
+
* Each skip is reported once per scan, however many manifests it applies to.
|
|
30
|
+
* A skip that only costs evidence, not BOM content, passes no remediation id
|
|
31
|
+
* and is only shown.
|
|
32
|
+
*
|
|
33
|
+
* @param {Object} options CLI options of the scan
|
|
34
|
+
* @param {string|null} remediationId Remediation id from
|
|
35
|
+
* data/remediations.json, or null for a message only
|
|
36
|
+
* @param {string} message Console message shown to the user
|
|
37
|
+
* @param {Object} [fields] Degradation fields (ecosystem, tool, impact, detail)
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
export declare function reportProjectToolingSkipped(options: Object, remediationId: string | null, message: string, fields?: Object): void;
|
|
41
|
+
//# sourceMappingURL=projectTooling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectTooling.d.ts","sourceRoot":"","sources":["../../../lib/core/projectTooling.js"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAFrB,OAAO,CAOnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,AAH5C,CACA,EADQ,MAGoC,GAFlC,OAAO,CAanB;AAOD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EARE,MAQF,EACP,aAAa,EARJ,MAAM,GAAC,IAQH,EACb,OAAO,EAPE,MAOF,EACP,MAAM,AAPL,CACA,EADQ,MAOH,GANK,IAAI,CAuBhB"}
|
|
@@ -12,6 +12,32 @@ export declare function sanitizeStructuredValueForBom(value: unknown): unknown;
|
|
|
12
12
|
* @returns {string} sanitized URL
|
|
13
13
|
*/
|
|
14
14
|
export declare function sanitizeBomUrl(value: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Percent-encode what an RFC 3986 URI reference cannot hold as it is, so a
|
|
17
|
+
* route template or URL can be emitted where CycloneDX expects an
|
|
18
|
+
* iri-reference, such as `services[].endpoints[]`. The braces of a route
|
|
19
|
+
* template, spaces, `<>`, `[]` outside an IPv6 host, `|`, `^`, non-ASCII
|
|
20
|
+
* characters and a `%` that starts no escape are encoded:
|
|
21
|
+
* `/users/{id}` becomes `/users/%7Bid%7D`. The scheme and authority of an
|
|
22
|
+
* absolute URL are kept as written, the query and fragment stay a query and
|
|
23
|
+
* fragment, and existing escapes are kept, so encoding twice changes
|
|
24
|
+
* nothing. Nothing is removed; strip credentials with {@link sanitizeBomUrl}
|
|
25
|
+
* first.
|
|
26
|
+
*
|
|
27
|
+
* @param {unknown} value Route template, path or URL
|
|
28
|
+
* @returns {string} The encoded reference
|
|
29
|
+
*/
|
|
30
|
+
export declare function encodeUriReference(value: unknown): string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a value carries a token shape the BOM sanitizer redacts: cloud
|
|
33
|
+
* access keys, bearer tokens, GitHub, Slack and npm tokens, JWTs and the
|
|
34
|
+
* like. Callers that cannot splice a `[redacted]` marker into the value, such
|
|
35
|
+
* as a URL path segment, use it to drop the value instead.
|
|
36
|
+
*
|
|
37
|
+
* @param {unknown} value Value to check
|
|
38
|
+
* @returns {boolean} true when the value holds an inline credential
|
|
39
|
+
*/
|
|
40
|
+
export declare function hasInlineCredential(value: unknown): boolean;
|
|
15
41
|
/**
|
|
16
42
|
* Sanitize a property value before serializing it into BOM properties.
|
|
17
43
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertySanitizer.d.ts","sourceRoot":"","sources":["../../../lib/core/propertySanitizer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"propertySanitizer.d.ts","sourceRoot":"","sources":["../../../lib/core/propertySanitizer.js"],"names":[],"mappings":"AAkEA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAHxC,OAGwC,GAFtC,OAAO,CAInB;AAyED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB,MAGyB,GAFvB,MAAM,CAIlB;AAWD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAH7B,OAG6B,GAF3B,MAAM,CAsBlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAH9B,OAG8B,GAF5B,OAAO,CAQnB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAJlC,MAIkC,EAAE,KAAK,EAHzC,OAGyC,GAFvC,MAAM,GAAC,OAAO,CAoB1B"}
|