@cdxgen/cdxgen 0.0.1 → 13.0.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 +921 -87
- package/bin/audit.js +239 -0
- package/bin/cdxgen.js +2324 -0
- package/bin/convert.js +213 -0
- package/bin/evinse.js +353 -0
- package/bin/hbom.js +495 -0
- package/bin/repl.js +2224 -0
- package/bin/sign.js +195 -0
- package/bin/tracebom.js +295 -0
- package/bin/validate.js +268 -0
- package/bin/verify.js +189 -0
- package/data/README.md +307 -0
- package/data/bom-1.4.schema.json +1605 -0
- package/data/bom-1.5.schema.json +3660 -0
- package/data/bom-1.6.schema.json +5511 -0
- package/data/bom-1.7.schema.json +6700 -0
- package/data/cbomosdb-queries.json +68 -0
- package/data/component-tags.json +339 -0
- package/data/container-knowledge-index.json +125 -0
- package/data/cosdb-queries.json +17 -0
- package/data/crypto-oid.json +1998 -0
- package/data/cryptography-defs.json +3793 -0
- package/data/cryptography-defs.schema.json +576 -0
- package/data/cyclonedx-2.0-bundled.schema.json +7182 -0
- package/data/frameworks-list.json +219 -0
- package/data/glibc-stdlib.json +117 -0
- package/data/gtfobins-index.json +6296 -0
- package/data/helpers/init.gradle +71 -0
- package/data/jsf-0.82.schema.json +211 -0
- package/data/known-licenses.json +82 -0
- package/data/lic-mapping.json +338 -0
- package/data/license-aliases.json +6624 -0
- package/data/license-db.json +39059 -0
- package/data/license-deprecations.json +302 -0
- package/data/lolbas-index.json +150 -0
- package/data/predictive-audit-allowlist.json +11 -0
- package/data/pypi-pkg-aliases.json +1199 -0
- package/data/python-stdlib.json +308 -0
- package/data/queries-darwin.json +193 -0
- package/data/queries-win.json +257 -0
- package/data/queries.json +268 -0
- package/data/ruby-known-modules.json +281 -0
- package/data/rules/ai-agent-governance.yaml +323 -0
- package/data/rules/ai-bom.yaml +268 -0
- package/data/rules/ai-oversight.yaml +186 -0
- package/data/rules/ai-provenance.yaml +92 -0
- package/data/rules/asar-archives.yaml +150 -0
- package/data/rules/cbom-security.yaml +165 -0
- package/data/rules/chrome-extensions.yaml +248 -0
- package/data/rules/ci-permissions.yaml +802 -0
- package/data/rules/container-risk.yaml +353 -0
- package/data/rules/dependency-sources.yaml +236 -0
- package/data/rules/golem-go.yaml +229 -0
- package/data/rules/hbom-compliance.yaml +325 -0
- package/data/rules/hbom-performance.yaml +307 -0
- package/data/rules/hbom-security.yaml +248 -0
- package/data/rules/host-topology.yaml +165 -0
- package/data/rules/mcp-servers.yaml +388 -0
- package/data/rules/obom-runtime.yaml +1776 -0
- package/data/rules/package-integrity.yaml +364 -0
- package/data/rules/rootfs-hardening.yaml +179 -0
- package/data/rules/vscode-extensions.yaml +237 -0
- package/data/spdx-export.schema.json +6794 -0
- package/data/spdx-license-list.json +7449 -0
- package/data/spdx-licenses.json +759 -0
- package/data/spdx.schema.json +819 -0
- package/data/templates/README.md +3 -0
- package/data/templates/asvs-4.0.3.cdx.json +2943 -0
- package/data/templates/asvs-5.0.cdx.json +3046 -0
- package/data/templates/bsimm-v13.cdx.json +1008 -0
- package/data/templates/masvs-2.0.0.cdx.json +225 -0
- package/data/templates/nist-ssdf-1.1.cdx.json +828 -0
- package/data/templates/pcissc-secure-slc-1.1.cdx.json +1027 -0
- package/data/templates/scvs-1.0.0.cdx.json +813 -0
- package/data/templates/ssaf-DRAFT-2023-11.cdx.json +127 -0
- package/data/vendor-alias.json +41967 -0
- package/data/wrapdb-releases.json +4227 -0
- package/index.cjs +15 -0
- package/lib/audit/index.js +2800 -0
- package/lib/audit/progress.js +114 -0
- package/lib/audit/reporters.js +937 -0
- package/lib/audit/scoring.js +560 -0
- package/lib/audit/targets.js +798 -0
- package/lib/cli/bomAssembly.js +1833 -0
- package/lib/cli/cliOptions.js +513 -0
- package/lib/cli/index.js +2759 -0
- package/lib/cli/jsBom.js +2087 -0
- package/lib/cli/jvmBom.js +1858 -0
- package/lib/cli/managedBom.js +2083 -0
- package/lib/cli/nativeBom.js +2125 -0
- package/lib/core/activity.js +1087 -0
- package/lib/core/env.js +719 -0
- package/lib/core/fs.js +1058 -0
- package/lib/core/httpClient.js +730 -0
- package/lib/core/logger.js +142 -0
- package/lib/core/parallel.js +323 -0
- package/lib/core/paths.js +70 -0
- package/lib/core/projectConfig.js +122 -0
- package/lib/core/propertySanitizer.js +174 -0
- package/lib/core/spdx.js +5 -0
- package/lib/core/state.js +59 -0
- package/lib/core/text.js +207 -0
- package/lib/core/ui.js +876 -0
- package/lib/core/urls.js +84 -0
- package/lib/ecosystems/asarutils.js +1636 -0
- package/lib/ecosystems/bunutils.js +402 -0
- package/lib/ecosystems/caxa.js +77 -0
- package/lib/ecosystems/chromextutils.js +1174 -0
- package/lib/ecosystems/cmakeResolver.js +587 -0
- package/lib/ecosystems/cppEvidence.js +305 -0
- package/lib/ecosystems/denoutils.js +1094 -0
- package/lib/ecosystems/dotnetutils.js +132 -0
- package/lib/ecosystems/ecosystems.js +2772 -0
- package/lib/ecosystems/golem.js +1807 -0
- package/lib/ecosystems/gradleutils.js +1048 -0
- package/lib/ecosystems/jsEvidence.js +317 -0
- package/lib/ecosystems/npmutils.js +586 -0
- package/lib/ecosystems/parsers-bazel.js +875 -0
- package/lib/ecosystems/parsers-dotnet.js +1430 -0
- package/lib/ecosystems/parsers-gleam.js +302 -0
- package/lib/ecosystems/parsers-go.js +818 -0
- package/lib/ecosystems/parsers-js.js +4222 -0
- package/lib/ecosystems/parsers-jvm.js +948 -0
- package/lib/ecosystems/parsers-misc.js +3191 -0
- package/lib/ecosystems/parsers-python.js +2070 -0
- package/lib/ecosystems/parsers-rust.js +1294 -0
- package/lib/ecosystems/parsers-zig.js +861 -0
- package/lib/ecosystems/pep770.js +341 -0
- package/lib/ecosystems/pylockutils.js +427 -0
- package/lib/ecosystems/pythonutils.js +1281 -0
- package/lib/ecosystems/registryProvenance.js +1003 -0
- package/lib/ecosystems/remote/huggingface.js +1343 -0
- package/lib/ecosystems/rubyutils.js +1629 -0
- package/lib/ecosystems/rusi.js +820 -0
- package/lib/ecosystems/sbtutils.js +972 -0
- package/lib/ecosystems/tea.js +607 -0
- package/lib/ecosystems/utils.js +575 -0
- package/lib/ecosystems/zigResolver.js +410 -0
- package/lib/evinser/db.js +145 -0
- package/lib/evinser/evinser.js +2362 -0
- package/lib/evinser/scalasem.js +65 -0
- package/lib/evinser/swiftsem.js +767 -0
- package/lib/helpers/annotationFormatter.js +84 -0
- package/lib/helpers/bomSigner.js +312 -0
- package/lib/helpers/exportUtils.js +160 -0
- package/lib/helpers/remote/dependency-track.js +117 -0
- package/lib/helpers/versutils.js +202 -0
- package/lib/helpers/vsixutils.js +1069 -0
- package/lib/inventory/agentFormulationParser.js +322 -0
- package/lib/inventory/aiCollector.js +2140 -0
- package/lib/inventory/aiInventory.js +414 -0
- package/lib/inventory/aiModelVariants.js +121 -0
- package/lib/inventory/aiOversightCollector.js +661 -0
- package/lib/inventory/aiProvenanceCollector.js +822 -0
- package/lib/inventory/analyzer.js +6089 -0
- package/lib/inventory/analyzerScope.js +807 -0
- package/lib/inventory/astWorker.js +20 -0
- package/lib/inventory/atomUtils.js +1092 -0
- package/lib/inventory/auditCategories.js +192 -0
- package/lib/inventory/bomUtils.js +369 -0
- package/lib/inventory/cacheCommands.js +182 -0
- package/lib/inventory/cacheDir.js +104 -0
- package/lib/inventory/cbomutils.js +590 -0
- package/lib/inventory/cdxrs.js +434 -0
- package/lib/inventory/ciParsers/azurePipelines.js +295 -0
- package/lib/inventory/ciParsers/circleCi.js +286 -0
- package/lib/inventory/ciParsers/common.js +24 -0
- package/lib/inventory/ciParsers/githubActions.js +2434 -0
- package/lib/inventory/ciParsers/gitlabCi.js +213 -0
- package/lib/inventory/ciParsers/jenkins.js +180 -0
- package/lib/inventory/citations.js +234 -0
- package/lib/inventory/communityAiConfigParser.js +756 -0
- package/lib/inventory/containerRisk.js +204 -0
- package/lib/inventory/cryptoAlgorithmFamily.js +258 -0
- package/lib/inventory/deps.js +807 -0
- package/lib/inventory/depsUtils.js +588 -0
- package/lib/inventory/display.js +2128 -0
- package/lib/inventory/dosai.js +601 -0
- package/lib/inventory/dosaiParsers.js +154 -0
- package/lib/inventory/dynamic.js +145 -0
- package/lib/inventory/envcontext.js +1789 -0
- package/lib/inventory/evidenceUtils.js +774 -0
- package/lib/inventory/fetchBatch.js +779 -0
- package/lib/inventory/fetchRate.js +255 -0
- package/lib/inventory/forgeEnricher.js +300 -0
- package/lib/inventory/formulationParsers.js +422 -0
- package/lib/inventory/gtfobins.js +339 -0
- package/lib/inventory/hbom.js +719 -0
- package/lib/inventory/hbomAnalysis.js +310 -0
- package/lib/inventory/hbomLoader.js +35 -0
- package/lib/inventory/hostTopology.js +835 -0
- package/lib/inventory/inventoryStats.js +100 -0
- package/lib/inventory/jsonLike.js +121 -0
- package/lib/inventory/licenseEnhancer.js +918 -0
- package/lib/inventory/lolbas.js +285 -0
- package/lib/inventory/mcp.js +253 -0
- package/lib/inventory/mcpConfigParser.js +683 -0
- package/lib/inventory/mcpDiscovery.js +112 -0
- package/lib/inventory/mcpPinning.js +209 -0
- package/lib/inventory/osPackageResolver.js +493 -0
- package/lib/inventory/osinfo.js +277 -0
- package/lib/inventory/osqueryTransform.js +274 -0
- package/lib/inventory/plugins.js +466 -0
- package/lib/inventory/protobom.js +231 -0
- package/lib/inventory/protobomLoader.js +43 -0
- package/lib/inventory/provenanceUtils.js +224 -0
- package/lib/inventory/purl.js +749 -0
- package/lib/inventory/rustFormulationParser.js +339 -0
- package/lib/inventory/sbomDocument.js +340 -0
- package/lib/inventory/source.js +1488 -0
- package/lib/inventory/spdx.js +361 -0
- package/lib/inventory/spdxExpression.js +512 -0
- package/lib/inventory/spdxUtils.js +107 -0
- package/lib/inventory/table.js +263 -0
- package/lib/inventory/traceRunner.js +439 -0
- package/lib/inventory/unicodeScan.js +147 -0
- package/lib/managers/binary.js +3307 -0
- package/lib/managers/containerutils.js +125 -0
- package/lib/managers/docker.js +2145 -0
- package/lib/managers/dockerConnection.js +162 -0
- package/lib/managers/oci.js +704 -0
- package/lib/managers/piptree.js +267 -0
- package/lib/parsers/cmakeCache.js +199 -0
- package/lib/parsers/gguf.js +492 -0
- package/lib/parsers/gitAiNotes.js +233 -0
- package/lib/parsers/gitmodules.js +239 -0
- package/lib/parsers/htmlExtract.js +610 -0
- package/lib/parsers/huggingfaceManifest.js +551 -0
- package/lib/parsers/huggingfaceUtils.js +506 -0
- package/lib/parsers/iri.js +618 -0
- package/lib/parsers/npmrc.js +99 -0
- package/lib/parsers/ollama.js +101 -0
- package/lib/parsers/xml.js +841 -0
- package/lib/server/openapi.yaml +433 -0
- package/lib/server/server.js +616 -0
- package/lib/stages/postgen/annotator.js +977 -0
- package/lib/stages/postgen/auditBom.js +468 -0
- package/lib/stages/postgen/postgen.js +1239 -0
- package/lib/stages/postgen/ruleEngine.js +731 -0
- package/lib/stages/postgen/sortBom.js +195 -0
- package/lib/stages/postgen/spdxConverter.js +796 -0
- package/lib/stages/postgen/specVersionCompat.js +703 -0
- package/lib/stages/pregen/envAudit.js +388 -0
- package/lib/stages/pregen/pregen.js +637 -0
- package/lib/third-party/README.md +9 -0
- package/lib/third-party/arborist/CHANGELOG.md +1109 -0
- package/lib/third-party/arborist/LICENSE.md +20 -0
- package/lib/third-party/arborist/README.md +315 -0
- package/lib/third-party/arborist/lib/arborist/index.js +258 -0
- package/lib/third-party/arborist/lib/arborist/load-actual.js +605 -0
- package/lib/third-party/arborist/lib/arborist/load-virtual.js +300 -0
- package/lib/third-party/arborist/lib/bin-links.js +120 -0
- package/lib/third-party/arborist/lib/calc-dep-flags.js +130 -0
- package/lib/third-party/arborist/lib/case-insensitive-map.js +51 -0
- package/lib/third-party/arborist/lib/consistent-resolve.js +42 -0
- package/lib/third-party/arborist/lib/debug.js +50 -0
- package/lib/third-party/arborist/lib/dep-valid.js +190 -0
- package/lib/third-party/arborist/lib/edge.js +417 -0
- package/lib/third-party/arborist/lib/from-path.js +36 -0
- package/lib/third-party/arborist/lib/gather-dep-set.js +43 -0
- package/lib/third-party/arborist/lib/index.js +22 -0
- package/lib/third-party/arborist/lib/inventory.js +138 -0
- package/lib/third-party/arborist/lib/link.js +169 -0
- package/lib/third-party/arborist/lib/node.js +1673 -0
- package/lib/third-party/arborist/lib/npm-extension.js +45 -0
- package/lib/third-party/arborist/lib/override-resolves.js +11 -0
- package/lib/third-party/arborist/lib/override-set.js +319 -0
- package/lib/third-party/arborist/lib/package-extensions.js +289 -0
- package/lib/third-party/arborist/lib/printable.js +210 -0
- package/lib/third-party/arborist/lib/proc-log.js +30 -0
- package/lib/third-party/arborist/lib/realpath.js +100 -0
- package/lib/third-party/arborist/lib/relpath.js +4 -0
- package/lib/third-party/arborist/lib/shrinkwrap.js +1291 -0
- package/lib/third-party/arborist/lib/spec-from-lock.js +34 -0
- package/lib/third-party/arborist/lib/tree-check.js +165 -0
- package/lib/third-party/arborist/lib/validate-npm-package-name.js +107 -0
- package/lib/third-party/arborist/lib/version-from-tgz.js +51 -0
- package/lib/third-party/arborist/lib/yarn-lock.js +397 -0
- package/lib/validator/bomValidator.js +985 -0
- package/lib/validator/complianceEngine.js +241 -0
- package/lib/validator/complianceRules.js +1680 -0
- package/lib/validator/generated/runtime.mjs +17 -0
- package/lib/validator/generated/validate-1.6.mjs +21258 -0
- package/lib/validator/generated/validate-1.7.mjs +24803 -0
- package/lib/validator/generated/validate-2.0.mjs +22931 -0
- package/lib/validator/index.js +246 -0
- package/lib/validator/reporters/annotations.js +142 -0
- package/lib/validator/reporters/console.js +160 -0
- package/lib/validator/reporters/index.js +41 -0
- package/lib/validator/reporters/json.js +37 -0
- package/lib/validator/reporters/sarif.js +184 -0
- package/package.json +209 -26
- package/types/bin/audit.d.ts +3 -0
- package/types/bin/audit.d.ts.map +1 -0
- package/types/bin/cdxgen.d.ts +3 -0
- package/types/bin/cdxgen.d.ts.map +1 -0
- package/types/bin/convert.d.ts +3 -0
- package/types/bin/convert.d.ts.map +1 -0
- package/types/bin/evinse.d.ts +3 -0
- package/types/bin/evinse.d.ts.map +1 -0
- package/types/bin/hbom.d.ts +3 -0
- package/types/bin/hbom.d.ts.map +1 -0
- package/types/bin/repl.d.ts +3 -0
- package/types/bin/repl.d.ts.map +1 -0
- package/types/bin/sign.d.ts +3 -0
- package/types/bin/sign.d.ts.map +1 -0
- package/types/bin/tracebom.d.ts +3 -0
- package/types/bin/tracebom.d.ts.map +1 -0
- package/types/bin/validate.d.ts +14 -0
- package/types/bin/validate.d.ts.map +1 -0
- package/types/bin/verify.d.ts +3 -0
- package/types/bin/verify.d.ts.map +1 -0
- package/types/lib/audit/index.d.ts +153 -0
- package/types/lib/audit/index.d.ts.map +1 -0
- package/types/lib/audit/progress.d.ts +31 -0
- package/types/lib/audit/progress.d.ts.map +1 -0
- package/types/lib/audit/reporters.d.ts +62 -0
- package/types/lib/audit/reporters.d.ts.map +1 -0
- package/types/lib/audit/scoring.d.ts +36 -0
- package/types/lib/audit/scoring.d.ts.map +1 -0
- package/types/lib/audit/targets.d.ts +77 -0
- package/types/lib/audit/targets.d.ts.map +1 -0
- package/types/lib/cli/bomAssembly.d.ts +315 -0
- package/types/lib/cli/bomAssembly.d.ts.map +1 -0
- package/types/lib/cli/cliOptions.d.ts +156 -0
- package/types/lib/cli/cliOptions.d.ts.map +1 -0
- package/types/lib/cli/index.d.ts +107 -0
- package/types/lib/cli/index.d.ts.map +1 -0
- package/types/lib/cli/jsBom.d.ts +94 -0
- package/types/lib/cli/jsBom.d.ts.map +1 -0
- package/types/lib/cli/jvmBom.d.ts +54 -0
- package/types/lib/cli/jvmBom.d.ts.map +1 -0
- package/types/lib/cli/managedBom.d.ts +105 -0
- package/types/lib/cli/managedBom.d.ts.map +1 -0
- package/types/lib/cli/nativeBom.d.ts +143 -0
- package/types/lib/cli/nativeBom.d.ts.map +1 -0
- package/types/lib/core/activity.d.ts +178 -0
- package/types/lib/core/activity.d.ts.map +1 -0
- package/types/lib/core/env.d.ts +192 -0
- package/types/lib/core/env.d.ts.map +1 -0
- package/types/lib/core/fs.d.ts +158 -0
- package/types/lib/core/fs.d.ts.map +1 -0
- package/types/lib/core/httpClient.d.ts +149 -0
- package/types/lib/core/httpClient.d.ts.map +1 -0
- package/types/lib/core/logger.d.ts +28 -0
- package/types/lib/core/logger.d.ts.map +1 -0
- package/types/lib/core/parallel.d.ts +95 -0
- package/types/lib/core/parallel.d.ts.map +1 -0
- package/types/lib/core/paths.d.ts +36 -0
- package/types/lib/core/paths.d.ts.map +1 -0
- package/types/lib/core/projectConfig.d.ts +23 -0
- package/types/lib/core/projectConfig.d.ts.map +1 -0
- package/types/lib/core/propertySanitizer.d.ts +23 -0
- package/types/lib/core/propertySanitizer.d.ts.map +1 -0
- package/types/lib/core/spdx.d.ts +5 -0
- package/types/lib/core/spdx.d.ts.map +1 -0
- package/types/lib/core/state.d.ts +20 -0
- package/types/lib/core/state.d.ts.map +1 -0
- package/types/lib/core/text.d.ts +78 -0
- package/types/lib/core/text.d.ts.map +1 -0
- package/types/lib/core/ui.d.ts +87 -0
- package/types/lib/core/ui.d.ts.map +1 -0
- package/types/lib/core/urls.d.ts +43 -0
- package/types/lib/core/urls.d.ts.map +1 -0
- package/types/lib/ecosystems/asarutils.d.ts +71 -0
- package/types/lib/ecosystems/asarutils.d.ts.map +1 -0
- package/types/lib/ecosystems/bunutils.d.ts +38 -0
- package/types/lib/ecosystems/bunutils.d.ts.map +1 -0
- package/types/lib/ecosystems/caxa.d.ts +8 -0
- package/types/lib/ecosystems/caxa.d.ts.map +1 -0
- package/types/lib/ecosystems/chromextutils.d.ts +97 -0
- package/types/lib/ecosystems/chromextutils.d.ts.map +1 -0
- package/types/lib/ecosystems/cmakeResolver.d.ts +176 -0
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +35 -0
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -0
- package/types/lib/ecosystems/denoutils.d.ts +76 -0
- package/types/lib/ecosystems/denoutils.d.ts.map +1 -0
- package/types/lib/ecosystems/dotnetutils.d.ts +45 -0
- package/types/lib/ecosystems/dotnetutils.d.ts.map +1 -0
- package/types/lib/ecosystems/ecosystems.d.ts +279 -0
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -0
- package/types/lib/ecosystems/golem.d.ts +60 -0
- package/types/lib/ecosystems/golem.d.ts.map +1 -0
- package/types/lib/ecosystems/gradleutils.d.ts +139 -0
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -0
- package/types/lib/ecosystems/jsEvidence.d.ts +17 -0
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -0
- package/types/lib/ecosystems/npmutils.d.ts +183 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-bazel.d.ts +36 -0
- package/types/lib/ecosystems/parsers-bazel.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts +116 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-gleam.d.ts +33 -0
- package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-go.d.ts +92 -0
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-js.d.ts +242 -0
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-jvm.d.ts +100 -0
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-misc.d.ts +450 -0
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-python.d.ts +145 -0
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-rust.d.ts +56 -0
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-zig.d.ts +83 -0
- package/types/lib/ecosystems/parsers-zig.d.ts.map +1 -0
- package/types/lib/ecosystems/pep770.d.ts +38 -0
- package/types/lib/ecosystems/pep770.d.ts.map +1 -0
- package/types/lib/ecosystems/pylockutils.d.ts +68 -0
- package/types/lib/ecosystems/pylockutils.d.ts.map +1 -0
- package/types/lib/ecosystems/pythonutils.d.ts +70 -0
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -0
- package/types/lib/ecosystems/registryProvenance.d.ts +26 -0
- package/types/lib/ecosystems/registryProvenance.d.ts.map +1 -0
- package/types/lib/ecosystems/remote/huggingface.d.ts +31 -0
- package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -0
- package/types/lib/ecosystems/rubyutils.d.ts +182 -0
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -0
- package/types/lib/ecosystems/rusi.d.ts +40 -0
- package/types/lib/ecosystems/rusi.d.ts.map +1 -0
- package/types/lib/ecosystems/sbtutils.d.ts +179 -0
- package/types/lib/ecosystems/sbtutils.d.ts.map +1 -0
- package/types/lib/ecosystems/tea.d.ts +180 -0
- package/types/lib/ecosystems/tea.d.ts.map +1 -0
- package/types/lib/ecosystems/utils.d.ts +41 -0
- package/types/lib/ecosystems/utils.d.ts.map +1 -0
- package/types/lib/ecosystems/zigResolver.d.ts +70 -0
- package/types/lib/ecosystems/zigResolver.d.ts.map +1 -0
- package/types/lib/evinser/db.d.ts +17 -0
- package/types/lib/evinser/db.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +354 -0
- package/types/lib/evinser/evinser.d.ts.map +1 -0
- package/types/lib/evinser/scalasem.d.ts +15 -0
- package/types/lib/evinser/scalasem.d.ts.map +1 -0
- package/types/lib/evinser/swiftsem.d.ts +103 -0
- package/types/lib/evinser/swiftsem.d.ts.map +1 -0
- package/types/lib/helpers/annotationFormatter.d.ts +23 -0
- package/types/lib/helpers/annotationFormatter.d.ts.map +1 -0
- package/types/lib/helpers/bomSigner.d.ts +28 -0
- package/types/lib/helpers/bomSigner.d.ts.map +1 -0
- package/types/lib/helpers/exportUtils.d.ts +52 -0
- package/types/lib/helpers/exportUtils.d.ts.map +1 -0
- package/types/lib/helpers/remote/dependency-track.d.ts +23 -0
- package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -0
- package/types/lib/helpers/versutils.d.ts +8 -0
- package/types/lib/helpers/versutils.d.ts.map +1 -0
- package/types/lib/helpers/vsixutils.d.ts +130 -0
- package/types/lib/helpers/vsixutils.d.ts.map +1 -0
- package/types/lib/inventory/agentFormulationParser.d.ts +21 -0
- package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -0
- package/types/lib/inventory/aiCollector.d.ts +61 -0
- package/types/lib/inventory/aiCollector.d.ts.map +1 -0
- package/types/lib/inventory/aiInventory.d.ts +103 -0
- package/types/lib/inventory/aiInventory.d.ts.map +1 -0
- package/types/lib/inventory/aiModelVariants.d.ts +31 -0
- package/types/lib/inventory/aiModelVariants.d.ts.map +1 -0
- package/types/lib/inventory/aiOversightCollector.d.ts +28 -0
- package/types/lib/inventory/aiOversightCollector.d.ts.map +1 -0
- package/types/lib/inventory/aiProvenanceCollector.d.ts +13 -0
- package/types/lib/inventory/aiProvenanceCollector.d.ts.map +1 -0
- package/types/lib/inventory/analyzer.d.ts +157 -0
- package/types/lib/inventory/analyzer.d.ts.map +1 -0
- package/types/lib/inventory/analyzerScope.d.ts +106 -0
- package/types/lib/inventory/analyzerScope.d.ts.map +1 -0
- package/types/lib/inventory/astWorker.d.ts +9 -0
- package/types/lib/inventory/astWorker.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +159 -0
- package/types/lib/inventory/atomUtils.d.ts.map +1 -0
- package/types/lib/inventory/auditCategories.d.ts +80 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -0
- package/types/lib/inventory/bomUtils.d.ts +145 -0
- package/types/lib/inventory/bomUtils.d.ts.map +1 -0
- package/types/lib/inventory/cacheCommands.d.ts +28 -0
- package/types/lib/inventory/cacheCommands.d.ts.map +1 -0
- package/types/lib/inventory/cacheDir.d.ts +55 -0
- package/types/lib/inventory/cacheDir.d.ts.map +1 -0
- package/types/lib/inventory/cbomutils.d.ts +37 -0
- package/types/lib/inventory/cbomutils.d.ts.map +1 -0
- package/types/lib/inventory/cdxrs.d.ts +90 -0
- package/types/lib/inventory/cdxrs.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/azurePipelines.d.ts +27 -0
- package/types/lib/inventory/ciParsers/azurePipelines.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/circleCi.d.ts +27 -0
- package/types/lib/inventory/ciParsers/circleCi.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/common.d.ts +11 -0
- package/types/lib/inventory/ciParsers/common.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/githubActions.d.ts +38 -0
- package/types/lib/inventory/ciParsers/githubActions.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/gitlabCi.d.ts +26 -0
- package/types/lib/inventory/ciParsers/gitlabCi.d.ts.map +1 -0
- package/types/lib/inventory/ciParsers/jenkins.d.ts +26 -0
- package/types/lib/inventory/ciParsers/jenkins.d.ts.map +1 -0
- package/types/lib/inventory/citations.d.ts +90 -0
- package/types/lib/inventory/citations.d.ts.map +1 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts +14 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -0
- package/types/lib/inventory/containerRisk.d.ts +20 -0
- package/types/lib/inventory/containerRisk.d.ts.map +1 -0
- package/types/lib/inventory/cryptoAlgorithmFamily.d.ts +37 -0
- package/types/lib/inventory/cryptoAlgorithmFamily.d.ts.map +1 -0
- package/types/lib/inventory/deps.d.ts +140 -0
- package/types/lib/inventory/deps.d.ts.map +1 -0
- package/types/lib/inventory/depsUtils.d.ts +74 -0
- package/types/lib/inventory/depsUtils.d.ts.map +1 -0
- package/types/lib/inventory/display.d.ts +227 -0
- package/types/lib/inventory/display.d.ts.map +1 -0
- package/types/lib/inventory/dosai.d.ts +130 -0
- package/types/lib/inventory/dosai.d.ts.map +1 -0
- package/types/lib/inventory/dosaiParsers.d.ts +59 -0
- package/types/lib/inventory/dosaiParsers.d.ts.map +1 -0
- package/types/lib/inventory/dynamic.d.ts +25 -0
- package/types/lib/inventory/dynamic.d.ts.map +1 -0
- package/types/lib/inventory/envcontext.d.ts +377 -0
- package/types/lib/inventory/envcontext.d.ts.map +1 -0
- package/types/lib/inventory/evidenceUtils.d.ts +74 -0
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -0
- package/types/lib/inventory/fetchBatch.d.ts +127 -0
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -0
- package/types/lib/inventory/fetchRate.d.ts +118 -0
- package/types/lib/inventory/fetchRate.d.ts.map +1 -0
- package/types/lib/inventory/forgeEnricher.d.ts +31 -0
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -0
- package/types/lib/inventory/formulationParsers.d.ts +50 -0
- package/types/lib/inventory/formulationParsers.d.ts.map +1 -0
- package/types/lib/inventory/gtfobins.d.ts +27 -0
- package/types/lib/inventory/gtfobins.d.ts.map +1 -0
- package/types/lib/inventory/hbom.d.ts +58 -0
- package/types/lib/inventory/hbom.d.ts.map +1 -0
- package/types/lib/inventory/hbomAnalysis.d.ts +56 -0
- package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -0
- package/types/lib/inventory/hbomLoader.d.ts +7 -0
- package/types/lib/inventory/hbomLoader.d.ts.map +1 -0
- package/types/lib/inventory/hostTopology.d.ts +47 -0
- package/types/lib/inventory/hostTopology.d.ts.map +1 -0
- package/types/lib/inventory/inventoryStats.d.ts +42 -0
- package/types/lib/inventory/inventoryStats.d.ts.map +1 -0
- package/types/lib/inventory/jsonLike.d.ts +23 -0
- package/types/lib/inventory/jsonLike.d.ts.map +1 -0
- package/types/lib/inventory/licenseEnhancer.d.ts +70 -0
- package/types/lib/inventory/licenseEnhancer.d.ts.map +1 -0
- package/types/lib/inventory/lolbas.d.ts +16 -0
- package/types/lib/inventory/lolbas.d.ts.map +1 -0
- package/types/lib/inventory/mcp.d.ts +29 -0
- package/types/lib/inventory/mcp.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts +20 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -0
- package/types/lib/inventory/mcpDiscovery.d.ts +33 -0
- package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -0
- package/types/lib/inventory/mcpPinning.d.ts +11 -0
- package/types/lib/inventory/mcpPinning.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +49 -0
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -0
- package/types/lib/inventory/osinfo.d.ts +120 -0
- package/types/lib/inventory/osinfo.d.ts.map +1 -0
- package/types/lib/inventory/osqueryTransform.d.ts +84 -0
- package/types/lib/inventory/osqueryTransform.d.ts.map +1 -0
- package/types/lib/inventory/plugins.d.ts +58 -0
- package/types/lib/inventory/plugins.d.ts.map +1 -0
- package/types/lib/inventory/protobom.d.ts +71 -0
- package/types/lib/inventory/protobom.d.ts.map +1 -0
- package/types/lib/inventory/protobomLoader.d.ts +17 -0
- package/types/lib/inventory/protobomLoader.d.ts.map +1 -0
- package/types/lib/inventory/provenanceUtils.d.ts +98 -0
- package/types/lib/inventory/provenanceUtils.d.ts.map +1 -0
- package/types/lib/inventory/purl.d.ts +313 -0
- package/types/lib/inventory/purl.d.ts.map +1 -0
- package/types/lib/inventory/rustFormulationParser.d.ts +17 -0
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -0
- package/types/lib/inventory/sbomDocument.d.ts +59 -0
- package/types/lib/inventory/sbomDocument.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts +163 -0
- package/types/lib/inventory/source.d.ts.map +1 -0
- package/types/lib/inventory/spdx.d.ts +66 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -0
- package/types/lib/inventory/spdxExpression.d.ts +58 -0
- package/types/lib/inventory/spdxExpression.d.ts.map +1 -0
- package/types/lib/inventory/spdxUtils.d.ts +12 -0
- package/types/lib/inventory/spdxUtils.d.ts.map +1 -0
- package/types/lib/inventory/table.d.ts +19 -0
- package/types/lib/inventory/table.d.ts.map +1 -0
- package/types/lib/inventory/traceRunner.d.ts +80 -0
- package/types/lib/inventory/traceRunner.d.ts.map +1 -0
- package/types/lib/inventory/unicodeScan.d.ts +46 -0
- package/types/lib/inventory/unicodeScan.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts +76 -0
- package/types/lib/managers/binary.d.ts.map +1 -0
- package/types/lib/managers/containerutils.d.ts +30 -0
- package/types/lib/managers/containerutils.d.ts.map +1 -0
- package/types/lib/managers/docker.d.ts +157 -0
- package/types/lib/managers/docker.d.ts.map +1 -0
- package/types/lib/managers/dockerConnection.d.ts +42 -0
- package/types/lib/managers/dockerConnection.d.ts.map +1 -0
- package/types/lib/managers/oci.d.ts +21 -0
- package/types/lib/managers/oci.d.ts.map +1 -0
- package/types/lib/managers/piptree.d.ts +13 -0
- package/types/lib/managers/piptree.d.ts.map +1 -0
- package/types/lib/parsers/cmakeCache.d.ts +70 -0
- package/types/lib/parsers/cmakeCache.d.ts.map +1 -0
- package/types/lib/parsers/gguf.d.ts +39 -0
- package/types/lib/parsers/gguf.d.ts.map +1 -0
- package/types/lib/parsers/gitAiNotes.d.ts +15 -0
- package/types/lib/parsers/gitAiNotes.d.ts.map +1 -0
- package/types/lib/parsers/gitmodules.d.ts +88 -0
- package/types/lib/parsers/gitmodules.d.ts.map +1 -0
- package/types/lib/parsers/htmlExtract.d.ts +34 -0
- package/types/lib/parsers/htmlExtract.d.ts.map +1 -0
- package/types/lib/parsers/huggingfaceManifest.d.ts +153 -0
- package/types/lib/parsers/huggingfaceManifest.d.ts.map +1 -0
- package/types/lib/parsers/huggingfaceUtils.d.ts +155 -0
- package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -0
- package/types/lib/parsers/iri.d.ts +68 -0
- package/types/lib/parsers/iri.d.ts.map +1 -0
- package/types/lib/parsers/npmrc.d.ts +33 -0
- package/types/lib/parsers/npmrc.d.ts.map +1 -0
- package/types/lib/parsers/ollama.d.ts +22 -0
- package/types/lib/parsers/ollama.d.ts.map +1 -0
- package/types/lib/parsers/xml.d.ts +47 -0
- package/types/lib/parsers/xml.d.ts.map +1 -0
- package/types/lib/server/server.d.ts +51 -0
- package/types/lib/server/server.d.ts.map +1 -0
- package/types/lib/stages/postgen/annotator.d.ts +36 -0
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -0
- package/types/lib/stages/postgen/auditBom.d.ts +92 -0
- package/types/lib/stages/postgen/auditBom.d.ts.map +1 -0
- package/types/lib/stages/postgen/postgen.d.ts +59 -0
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -0
- package/types/lib/stages/postgen/ruleEngine.d.ts +18 -0
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -0
- package/types/lib/stages/postgen/sortBom.d.ts +34 -0
- package/types/lib/stages/postgen/sortBom.d.ts.map +1 -0
- package/types/lib/stages/postgen/spdxConverter.d.ts +11 -0
- package/types/lib/stages/postgen/spdxConverter.d.ts.map +1 -0
- package/types/lib/stages/postgen/specVersionCompat.d.ts +71 -0
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -0
- package/types/lib/stages/pregen/envAudit.d.ts +14 -0
- package/types/lib/stages/pregen/envAudit.d.ts.map +1 -0
- package/types/lib/stages/pregen/pregen.d.ts +59 -0
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/arborist/index.d.ts +47 -0
- package/types/lib/third-party/arborist/lib/arborist/index.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/arborist/load-actual.d.ts +4 -0
- package/types/lib/third-party/arborist/lib/arborist/load-actual.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/arborist/load-virtual.d.ts +4 -0
- package/types/lib/third-party/arborist/lib/arborist/load-virtual.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/bin-links.d.ts +18 -0
- package/types/lib/third-party/arborist/lib/bin-links.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/calc-dep-flags.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/calc-dep-flags.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/case-insensitive-map.d.ts +9 -0
- package/types/lib/third-party/arborist/lib/case-insensitive-map.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/consistent-resolve.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/consistent-resolve.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/debug.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/debug.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/dep-valid.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/dep-valid.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/edge.d.ts +46 -0
- package/types/lib/third-party/arborist/lib/edge.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/from-path.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/from-path.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/gather-dep-set.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/gather-dep-set.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/index.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/index.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/inventory.d.ts +14 -0
- package/types/lib/third-party/arborist/lib/inventory.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/link.d.ts +18 -0
- package/types/lib/third-party/arborist/lib/link.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/node.d.ts +112 -0
- package/types/lib/third-party/arborist/lib/node.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/npm-extension.d.ts +18 -0
- package/types/lib/third-party/arborist/lib/npm-extension.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/override-resolves.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/override-resolves.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/override-set.d.ts +27 -0
- package/types/lib/third-party/arborist/lib/override-set.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/package-extensions.d.ts +36 -0
- package/types/lib/third-party/arborist/lib/package-extensions.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/printable.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/printable.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/proc-log.d.ts +20 -0
- package/types/lib/third-party/arborist/lib/proc-log.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/realpath.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/realpath.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/relpath.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/relpath.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/shrinkwrap.d.ts +54 -0
- package/types/lib/third-party/arborist/lib/shrinkwrap.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/spec-from-lock.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/spec-from-lock.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/tree-check.d.ts +3 -0
- package/types/lib/third-party/arborist/lib/tree-check.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/validate-npm-package-name.d.ts +13 -0
- package/types/lib/third-party/arborist/lib/validate-npm-package-name.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/version-from-tgz.d.ts +6 -0
- package/types/lib/third-party/arborist/lib/version-from-tgz.d.ts.map +1 -0
- package/types/lib/third-party/arborist/lib/yarn-lock.d.ts +35 -0
- package/types/lib/third-party/arborist/lib/yarn-lock.d.ts.map +1 -0
- package/types/lib/validator/bomValidator.d.ts +40 -0
- package/types/lib/validator/bomValidator.d.ts.map +1 -0
- package/types/lib/validator/complianceEngine.d.ts +72 -0
- package/types/lib/validator/complianceEngine.d.ts.map +1 -0
- package/types/lib/validator/complianceRules.d.ts +61 -0
- package/types/lib/validator/complianceRules.d.ts.map +1 -0
- package/types/lib/validator/index.d.ts +101 -0
- package/types/lib/validator/index.d.ts.map +1 -0
- package/types/lib/validator/reporters/annotations.d.ts +37 -0
- package/types/lib/validator/reporters/annotations.d.ts.map +1 -0
- package/types/lib/validator/reporters/console.d.ts +34 -0
- package/types/lib/validator/reporters/console.d.ts.map +1 -0
- package/types/lib/validator/reporters/index.d.ts +30 -0
- package/types/lib/validator/reporters/index.d.ts.map +1 -0
- package/types/lib/validator/reporters/json.d.ts +11 -0
- package/types/lib/validator/reporters/json.d.ts.map +1 -0
- package/types/lib/validator/reporters/sarif.d.ts +22 -0
- package/types/lib/validator/reporters/sarif.d.ts.map +1 -0
- package/mod.d.ts +0 -7
- package/mod.js +0 -22
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flatten a scalar or nested-array value into a single-level array of
|
|
3
|
+
* individual resolved values.
|
|
4
|
+
*
|
|
5
|
+
* @param {*} value Scalar, array, or nested array of values.
|
|
6
|
+
* @returns {Array} Flat array of individual values (empty for undefined).
|
|
7
|
+
*/
|
|
8
|
+
export declare const toResolvedValueArray: (value: any) => any[];
|
|
9
|
+
/**
|
|
10
|
+
* Build a stable dedup key string for a resolved value, prefixing the type so
|
|
11
|
+
* that distinct types never collide.
|
|
12
|
+
*
|
|
13
|
+
* @param {*} value Resolved value to key.
|
|
14
|
+
* @returns {string} Stable dedup key (e.g. "string:abc", "object:{...}").
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolvedValueKey: (value: any) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Merge one or more scalar/array resolved values into a single deduplicated
|
|
19
|
+
* value, returning a scalar when only one unique value remains.
|
|
20
|
+
*
|
|
21
|
+
* @param {...*} values Resolved values to merge.
|
|
22
|
+
* @returns {*} Merged scalar, deduplicated array, or undefined when empty.
|
|
23
|
+
*/
|
|
24
|
+
export declare const mergeResolvedValues: (...values: any[]) => any;
|
|
25
|
+
/**
|
|
26
|
+
* Filter the resolved values within a scalar/array by a predicate and re-merge
|
|
27
|
+
* the surviving values.
|
|
28
|
+
*
|
|
29
|
+
* @param {*} value Scalar or array of resolved values.
|
|
30
|
+
* @param {(candidate: *) => boolean} predicate Predicate function to retain values.
|
|
31
|
+
* @returns {*} Re-merged filtered result.
|
|
32
|
+
*/
|
|
33
|
+
export declare const filterResolvedValues: (value: any, predicate: (candidate: any) => boolean) => any;
|
|
34
|
+
/**
|
|
35
|
+
* Determine whether every resolved value within a scalar/array satisfies the
|
|
36
|
+
* given predicate.
|
|
37
|
+
*
|
|
38
|
+
* @param {*} value Scalar or array of resolved values.
|
|
39
|
+
* @param {(candidate: *) => boolean} predicate Predicate function to test.
|
|
40
|
+
* @returns {boolean} True when there is at least one value and all satisfy the predicate.
|
|
41
|
+
*/
|
|
42
|
+
export declare const hasOnlyResolvedValues: (value: any, predicate: (candidate: any) => boolean) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Read a named property from a statically-resolved object or array value,
|
|
45
|
+
* mapping across array elements when the value is an array.
|
|
46
|
+
*
|
|
47
|
+
* @param {object|Array} objectValue Resolved object or array value.
|
|
48
|
+
* @param {string} propertyName Property name to read.
|
|
49
|
+
* @returns {*} The property value, a merged array of results, or undefined.
|
|
50
|
+
*/
|
|
51
|
+
export declare const getStaticObjectProperty: (objectValue: object | any[], propertyName: string) => any;
|
|
52
|
+
/**
|
|
53
|
+
* Derive narrowed identifier-to-value bindings from a conditional AST node,
|
|
54
|
+
* given whether the branch was taken.
|
|
55
|
+
*
|
|
56
|
+
* Handles parenthesized/type-cast wrappers, logical (&&, ||) and unary (!)
|
|
57
|
+
* expressions, and equality (==, ===, !=, !==) comparisons between an
|
|
58
|
+
* identifier and a literal.
|
|
59
|
+
*
|
|
60
|
+
* @param {object} astNode The conditional AST node to analyze.
|
|
61
|
+
* @param {boolean} branchTaken Whether the consequent (true) or alternate (false) branch applies.
|
|
62
|
+
* @param {(node: object) => (string|undefined)} getLiteralStringValue Function to extract a literal string from an AST node.
|
|
63
|
+
* @returns {Map<string, *>|undefined} Map of identifier name to narrowed value, or undefined.
|
|
64
|
+
*/
|
|
65
|
+
export declare const deriveStaticNarrowingsFromCondition: (astNode: object, branchTaken: boolean, getLiteralStringValue: (node: object) => (string | undefined)) => Map<string, any> | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Best-effort static resolution of an AST node to a concrete value.
|
|
68
|
+
*
|
|
69
|
+
* Resolves literals, identifiers (via the provided name→value map),
|
|
70
|
+
* conditional and logical expressions, member expressions, array and object
|
|
71
|
+
* expressions, template literals, and binary concatenation. Recursion is
|
|
72
|
+
* bounded by a depth limit to avoid unbounded analysis.
|
|
73
|
+
*
|
|
74
|
+
* @param {object} astNode The AST node to resolve.
|
|
75
|
+
* @param {Map<string, *>} staticValueByName Map of identifier name to known static value.
|
|
76
|
+
* @param {(node: object) => (string|undefined)} getLiteralStringValue Function to extract a literal string from an AST node.
|
|
77
|
+
* @param {(node: object) => (string|undefined)} getMemberExpressionPropertyName Function to extract the property name from a member-expression node.
|
|
78
|
+
* @param {number} [depth=0] Current recursion depth (capped internally).
|
|
79
|
+
* @returns {*} The resolved value, or undefined when it cannot be determined.
|
|
80
|
+
*/
|
|
81
|
+
export declare const resolveStaticValue: (astNode: object, staticValueByName: Map<string, any>, getLiteralStringValue: (node: object) => (string | undefined), getMemberExpressionPropertyName: (node: object) => (string | undefined), depth?: number) => any;
|
|
82
|
+
/**
|
|
83
|
+
* Derive narrowed identifier-to-value bindings from a switch-case node by
|
|
84
|
+
* inspecting the switch discriminant and fall-through case chain.
|
|
85
|
+
*
|
|
86
|
+
* @param {object} switchCaseNode The `SwitchCase` AST node currently in scope.
|
|
87
|
+
* @param {object} switchStatementNode The enclosing `SwitchStatement` AST node.
|
|
88
|
+
* @param {Map<string, *>} staticValueByName Map of identifier name to known static value.
|
|
89
|
+
* @param {(node: object) => (string|undefined)} getLiteralStringValue Function to extract a literal string from an AST node.
|
|
90
|
+
* @param {(node: object) => (string|undefined)} getMemberExpressionPropertyName Function to extract the property name from a member-expression node.
|
|
91
|
+
* @returns {Map<string, *>|undefined} Map of discriminant identifier name to narrowed value, or undefined.
|
|
92
|
+
*/
|
|
93
|
+
export declare const deriveStaticNarrowingsFromSwitchCase: (switchCaseNode: object, switchStatementNode: object, staticValueByName: Map<string, any>, getLiteralStringValue: (node: object) => (string | undefined), getMemberExpressionPropertyName: (node: object) => (string | undefined)) => Map<string, any> | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Build a name-to-value map for a Babel path by starting from the provided
|
|
96
|
+
* static values and applying narrowing derived from ancestor if-statements
|
|
97
|
+
* and switch-cases.
|
|
98
|
+
*
|
|
99
|
+
* @param {object} path Babel traversal path whose ancestors are inspected.
|
|
100
|
+
* @param {Map<string, *>} staticValueByName Initial map of identifier name to known static value.
|
|
101
|
+
* @param {(node: object) => (string|undefined)} getLiteralStringValue Function to extract a literal string from an AST node.
|
|
102
|
+
* @param {(node: object) => (string|undefined)} getMemberExpressionPropertyName Function to extract the property name from a member-expression node.
|
|
103
|
+
* @returns {Map<string, *>} Scoped name-to-value map including ancestor narrowings.
|
|
104
|
+
*/
|
|
105
|
+
export declare const getScopedStaticValueByName: (path: object, staticValueByName: Map<string, any>, getLiteralStringValue: (node: object) => (string | undefined), getMemberExpressionPropertyName: (node: object) => (string | undefined)) => Map<string, any>;
|
|
106
|
+
//# sourceMappingURL=analyzerScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzerScope.d.ts","sourceRoot":"","sources":["../../../lib/inventory/analyzerScope.js"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAHtB,GAAC,UAWX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,UAHlB,GAAC,KACC,MAOZ,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,cAHlB,GAAC,EAAA,KACF,GAmBZ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,UAJtB,GAAC,aACD,CAAC,SAAS,EAAE,GAAC,KAAK,OAAO,KACvB,GAMZ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,UAJvB,GAAC,aACD,CAAC,SAAS,EAAE,GAAC,KAAK,OAAO,KACvB,OAKZ,CAAC;AAaF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,gBAJzB,MAAM,QAAM,gBACZ,MAAM,KACJ,GAcZ,CAAC;AAmEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mCAAmC,YALrC,MAAM,eACN,OAAO,yBACP,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,KAClC,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,GAAC,SAwF3B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,YAPpB,MAAM,qBACN,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,yBACd,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,mCACpC,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,UACpC,MAAM,KACJ,GAmPZ,CAAC;AAgEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oCAAoC,mBAPtC,MAAM,uBACN,MAAM,qBACN,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,yBACd,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,mCACpC,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,KAClC,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,GAAC,SAqF3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,SAN5B,MAAM,qBACN,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,yBACd,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,mCACpC,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAC,SAAS,CAAC,KAClC,GAAG,CAAC,MAAM,EAAE,GAAC,CA+DzB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker entry for parallel AST analysis. Each task is `{ src, file }`;
|
|
3
|
+
* the result is `{ imports, exports }` produced by `parseFileASTTreeCollected`.
|
|
4
|
+
*
|
|
5
|
+
* Parse failures return `null` so the caller can skip the file, matching the
|
|
6
|
+
* `catch (_err)` behaviour of the serial loop.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=astWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astWorker.d.ts","sourceRoot":"","sources":["../../../lib/inventory/astWorker.js"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-specific @appthreat/atom-* native package names that carry the
|
|
3
|
+
* bundled native `atom` binary.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ATOM_NATIVE_PACKAGES: Set<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Convert cdxgen's glob-style exclude patterns to a Scala/Java regex string.
|
|
8
|
+
*
|
|
9
|
+
* @param {string[]} patterns Glob patterns from cdxgen's `--exclude` option
|
|
10
|
+
* @returns {string|undefined} Scala-compatible regex or undefined when empty
|
|
11
|
+
*/
|
|
12
|
+
export declare function globPatternsToAtomIgnoreRegex(patterns?: string[]): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Determine whether a file path is excluded by the given atom-style glob
|
|
15
|
+
* exclude patterns.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} filePath File path to test.
|
|
18
|
+
* @param {string[]} [patterns=[]] Glob exclude patterns.
|
|
19
|
+
* @returns {boolean} True when the path matches an exclude pattern.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isPathExcludedByGlobPatterns(filePath: string, patterns?: string[]): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Remove atom-slice entries whose source file matches the given glob exclude
|
|
24
|
+
* patterns, preserving the original slice structure otherwise.
|
|
25
|
+
*
|
|
26
|
+
* Filters `objectSlices`, `userDefinedTypes`, `reachables`, and reachable
|
|
27
|
+
* `paths`/`graph` nodes/edges that reference excluded files.
|
|
28
|
+
*
|
|
29
|
+
* @param {object|Array} sliceData Atom slice data object or array.
|
|
30
|
+
* @param {string[]} [patterns=[]] Glob exclude patterns.
|
|
31
|
+
* @returns {object|Array} Filtered slice data (shallow copy when an object).
|
|
32
|
+
*/
|
|
33
|
+
export declare function filterAtomSlicesByExcludePatterns(sliceData: object | any[], patterns?: string[]): object | any[];
|
|
34
|
+
/**
|
|
35
|
+
* Build additional environment variables for Atom from cdxgen CLI options.
|
|
36
|
+
*
|
|
37
|
+
* @param {Object} options CLI options
|
|
38
|
+
* @param {string} language Atom language name
|
|
39
|
+
* @returns {Object} Environment variables to pass to Atom
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildAtomCommandEnv(options?: Object, language?: string): Object;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the atom platform sub-package name and provider kind for the current
|
|
44
|
+
* (or supplied) runtime. This is a cdxgen-side reimplementation of atom's own
|
|
45
|
+
* `resolveAtomProvider`, kept here rather than imported from
|
|
46
|
+
* `@appthreat/atom/resolve.js` so it is safe under every cdxgen runtime
|
|
47
|
+
* (node, bun, deno, caxa) and inside the extracted caxa tree where the
|
|
48
|
+
* dispatcher's own resolver may not find a sibling sub-package.
|
|
49
|
+
*
|
|
50
|
+
* The returned `preferredPkg`/`kind` pair must agree with atom's
|
|
51
|
+
* `resolveAtomProvider` and `NATIVE_PACKAGES`; the parity test in
|
|
52
|
+
* atomUtils.poku.js asserts the agreement for all eight published triples.
|
|
53
|
+
*
|
|
54
|
+
* @param {Object} [opts] Optional overrides for testability
|
|
55
|
+
* @param {string} [opts.platform] Defaults to `process.platform`
|
|
56
|
+
* @param {string} [opts.arch] Defaults to `process.arch`
|
|
57
|
+
* @param {string} [opts.libc] Defaults to detected libc on linux
|
|
58
|
+
* @returns {{preferredPkg: string, kind: "native"|"jar", platform: string, arch: string, libc?: string}}
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveAtomProvider(opts?: {
|
|
61
|
+
platform?: string;
|
|
62
|
+
arch?: string;
|
|
63
|
+
libc?: string;
|
|
64
|
+
}): {
|
|
65
|
+
preferredPkg: string;
|
|
66
|
+
kind: "native" | "jar";
|
|
67
|
+
platform: string;
|
|
68
|
+
arch: string;
|
|
69
|
+
libc?: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Returns `"native"` or `"jar"` for the currently resolved atom provider.
|
|
73
|
+
* Used to gate Java/JDK advice so users on the five native platforms are not
|
|
74
|
+
* told to install a JDK for a failure that has nothing to do with Java.
|
|
75
|
+
*/
|
|
76
|
+
export declare function atomProviderKind(): "jar" | "native";
|
|
77
|
+
/**
|
|
78
|
+
* Locate the `php-parse` binary that the PHP frontend needs.
|
|
79
|
+
*
|
|
80
|
+
* atom 3's dispatcher unconditionally sets `PHP_PARSER_BIN=<ATOM_HOME>/bin/php-parse`,
|
|
81
|
+
* which for a native sub-package does not exist and also clobbers a caller-set
|
|
82
|
+
* value. cdxgen therefore resolves the real location and forwards it through
|
|
83
|
+
* the child env (see `buildAtomCommandEnv`); `executeAtom` then spawns the
|
|
84
|
+
* native binary directly for PHP so the dispatcher cannot clobber it (see
|
|
85
|
+
* `resolveDirectAtomBinaryPath`). Resolution order:
|
|
86
|
+
* 1. explicit `PHP_PARSER_BIN` env var (operators / container images)
|
|
87
|
+
* 2. `@appthreat/atom-parsetools/plugins/bin/php-parse` under cdxgen's own
|
|
88
|
+
* node_modules, then under `GLOBAL_NODE_MODULES_PATH` for global installs
|
|
89
|
+
*
|
|
90
|
+
* Returns `undefined` when neither is found, in which case PHP analysis runs
|
|
91
|
+
* through the dispatcher unchanged (and fails on native platforms until atom
|
|
92
|
+
* fixes the clobber).
|
|
93
|
+
*
|
|
94
|
+
* @returns {string|undefined}
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolvePhpParseBin(): string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Resolve the atom native binary path directly, bypassing the dispatcher.
|
|
99
|
+
*
|
|
100
|
+
* This is required for the PHP frontend: the dispatcher clobbers
|
|
101
|
+
* `PHP_PARSER_BIN` with a path that does not exist on native platforms, and
|
|
102
|
+
* atom 3.0.x crashes in `defaultPhpParserBin` parsing that bogus value before
|
|
103
|
+
* any `--frontend-args php-parser-bin=` override is consulted. Spawning the
|
|
104
|
+
* native binary directly lets cdxgen control the child env, so the correct
|
|
105
|
+
* `PHP_PARSER_BIN` reaches atom. Returns `undefined` when the provider is the
|
|
106
|
+
* jar kind or the native binary cannot be located (in which case the dispatcher
|
|
107
|
+
* is used as-is).
|
|
108
|
+
*
|
|
109
|
+
* @returns {string|undefined}
|
|
110
|
+
*/
|
|
111
|
+
export declare function resolveDirectAtomBinaryPath(): string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Retrieves the atom command by referring to various environment variables
|
|
114
|
+
*/
|
|
115
|
+
export declare function getAtomCommand(): any;
|
|
116
|
+
/**
|
|
117
|
+
* Compute the maximum heap atom may grow to, in bytes.
|
|
118
|
+
*
|
|
119
|
+
* Neither of atom's two runtimes bounds itself to anything a machine can
|
|
120
|
+
* comfortably back: a GraalVM native image defaults to
|
|
121
|
+
* `MaximumHeapSizePercent=80` of physical memory, and HotSpot to a quarter of
|
|
122
|
+
* it. Both use a collector that grows the heap in preference to collecting, so
|
|
123
|
+
* on a large host atom reserves tens of gigabytes and the machine, not atom,
|
|
124
|
+
* is what runs out of memory.
|
|
125
|
+
*
|
|
126
|
+
* The ceiling is therefore the smaller of half of physical memory and
|
|
127
|
+
* `ATOM_MAX_HEAP_CAP_BYTES`, with a floor so that a small container still gets
|
|
128
|
+
* a workable heap. `ATOM_MAX_HEAP` overrides the whole calculation and accepts
|
|
129
|
+
* a plain byte count or a `k`/`m`/`g` suffix.
|
|
130
|
+
*
|
|
131
|
+
* @returns {number|undefined} Heap ceiling in bytes, or `undefined` to leave the runtime default in place
|
|
132
|
+
*/
|
|
133
|
+
export declare function atomMaxHeapBytes(): number | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Execute the atom tool against a source directory or file with the given arguments.
|
|
136
|
+
*
|
|
137
|
+
* Resolves the atom binary via `getAtomCommand`, sets up the required environment
|
|
138
|
+
* (including `JAVA_HOME` from `ATOM_JAVA_HOME` if set), and spawns the process.
|
|
139
|
+
* Logs diagnostic messages for common failure modes such as unsupported Java versions,
|
|
140
|
+
* missing `astgen`, and JVM crashes.
|
|
141
|
+
*
|
|
142
|
+
* @param {string} src Path to the source directory or file to analyse
|
|
143
|
+
* @param {string[]} args Arguments to pass to the atom command
|
|
144
|
+
* @param {Object} extra_env Additional environment variables to merge into the process environment
|
|
145
|
+
* @returns {boolean} `true` if atom executed successfully and the language is supported; `false` otherwise
|
|
146
|
+
*/
|
|
147
|
+
export declare function executeAtom(src: string, args: string[], extra_env?: Object): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Find the imported modules in the application with atom parsedeps command
|
|
150
|
+
*
|
|
151
|
+
* @param {string} src
|
|
152
|
+
* @param {string} language
|
|
153
|
+
* @param {string} methodology
|
|
154
|
+
* @param {string} slicesFile
|
|
155
|
+
* @param {Object} options CLI options
|
|
156
|
+
* @returns List of imported modules
|
|
157
|
+
*/
|
|
158
|
+
export declare function findAppModules(src: string, language: string, methodology?: string, slicesFile?: string, options?: Object): any;
|
|
159
|
+
//# sourceMappingURL=atomUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/atomUtils.js"],"names":[],"mappings":"AA6CA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,aAM/B,CAAC;AA4RH;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,GAH3C,MAAM,EAG0C,GAF9C,MAAM,GAAC,SAAS,CAU5B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAJ1C,MAI0C,EAAE,QAAQ,AAH5D,CACA,EADQ,MAAM,EAGmD,GAFvD,OAAO,CAkBnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAAC,SAAS,EAJhD,MAAM,QAI0C,EAAE,QAAQ,AAHlE,CACA,EADQ,MAAM,EAGyD,GAF7D,MAAM,QAAM,CA2DxB;AA4BD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAJhC,MAIqC,EAAE,QAAQ,GAH/C,MAGoD,GAFlD,MAAM,CAkDlB;AAgBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,AANrC,CAIA,EAHA;IAAsB,QAAQ,AAA9B,CACA,EADQ,MAAM,CACd;IAAsB,IAAI,AAA1B,CACA,EADQ,MAAM,CACd;IAAsB,IAAI,AAA1B,CACA,EADQ,MAAM,CACd;CAE0C,GAFhC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAC,KAAK,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CA6CvG;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,qBAE/B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,IAFrB,MAAM,GAAC,SAAS,CAyB5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,IAF9B,MAAM,GAAC,SAAS,CAkD5B;AAsBD;;GAEG;AACH,wBAAgB,cAAc,QAwB7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,GAAC,SAAS,CA0B5B;AA0DD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EALpB,MAKoB,EAAE,IAAI,EAJ1B,MAAM,EAIoB,EAAE,SAAS,GAHrC,MAG0C,GAFxC,OAAO,CAqJnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EARM,MAQN,EACH,QAAQ,EARC,MAQD,EACR,WAAW,GARF,MAQa,EACtB,UAAU,GARD,MAQa,EACtB,OAAO,GARE,MAQG,OAsCb"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** Frozen list of hardware-bill-of-materials (HBOM) audit categories. */
|
|
2
|
+
export declare const HBOM_AUDIT_CATEGORIES: readonly string[];
|
|
3
|
+
/** Frozen list of cryptographic-bill-of-materials (CBOM) audit categories. */
|
|
4
|
+
export declare const CBOM_AUDIT_CATEGORIES: readonly string[];
|
|
5
|
+
/** Frozen list of host-topology audit categories. */
|
|
6
|
+
export declare const HOST_TOPOLOGY_AUDIT_CATEGORIES: readonly string[];
|
|
7
|
+
/** Frozen list of Golem (Go Evinse) audit categories. */
|
|
8
|
+
export declare const GOLEM_AUDIT_CATEGORIES: readonly string[];
|
|
9
|
+
/** Frozen list of AI-bill-of-materials audit categories. */
|
|
10
|
+
export declare const AI_BOM_AUDIT_CATEGORIES: readonly string[];
|
|
11
|
+
/** Comma-separated default HBOM category string used when none is specified. */
|
|
12
|
+
export declare const DEFAULT_HBOM_AUDIT_CATEGORIES: string;
|
|
13
|
+
/**
|
|
14
|
+
* Frozen map of category alias names to their expanded concrete category lists.
|
|
15
|
+
* Used by `expandBomAuditCategories` to resolve shorthand aliases.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BOM_AUDIT_CATEGORY_ALIASES: Readonly<{
|
|
18
|
+
"ai-inventory": string[];
|
|
19
|
+
aibom: string[];
|
|
20
|
+
"ai-bom": string[];
|
|
21
|
+
"ai-provenance": string[];
|
|
22
|
+
"ai-oversight": string[];
|
|
23
|
+
cbom: string[];
|
|
24
|
+
"crypto-bom": string[];
|
|
25
|
+
golem: string[];
|
|
26
|
+
hbom: string[];
|
|
27
|
+
host: string[];
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Normalize a category string or array into a deduplicated array of trimmed,
|
|
31
|
+
* non-empty category names.
|
|
32
|
+
*
|
|
33
|
+
* @param {string|string[]} categories Comma-separated string or array of categories.
|
|
34
|
+
* @returns {string[]} Deduplicated, trimmed category names.
|
|
35
|
+
*/
|
|
36
|
+
export declare function normalizeBomAuditCategories(categories: string | string[]): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Expand category aliases into their concrete category lists, returning a
|
|
39
|
+
* deduplicated array of resolved categories.
|
|
40
|
+
*
|
|
41
|
+
* @param {string|string[]} categories Comma-separated string or array of categories or aliases.
|
|
42
|
+
* @returns {string[]} Deduplicated, fully expanded category names.
|
|
43
|
+
*/
|
|
44
|
+
export declare function expandBomAuditCategories(categories: string | string[]): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Collect the sorted set of unique categories present in the loaded audit rules.
|
|
47
|
+
*
|
|
48
|
+
* @param {Array<{category?: string}>} rules Loaded audit rule objects.
|
|
49
|
+
* @returns {string[]} Sorted unique category names found in the rules.
|
|
50
|
+
*/
|
|
51
|
+
export declare function availableBomAuditCategories(rules: Array<{
|
|
52
|
+
category?: string;
|
|
53
|
+
}>): string[];
|
|
54
|
+
/**
|
|
55
|
+
* Validate that every requested category is a known category or alias,
|
|
56
|
+
* throwing an Error listing the valid options otherwise.
|
|
57
|
+
*
|
|
58
|
+
* @param {string|string[]} categories Comma-separated string or array of categories to validate.
|
|
59
|
+
* @param {Array<{category?: string}>} rules Loaded audit rule objects to derive valid categories from.
|
|
60
|
+
* @returns {{categories: string[], expandedCategories: string[], validCategories: string[]}} Normalized, expanded, and valid category lists.
|
|
61
|
+
*/
|
|
62
|
+
export declare function validateBomAuditCategories(categories: string | string[], rules: Array<{
|
|
63
|
+
category?: string;
|
|
64
|
+
}>): {
|
|
65
|
+
categories: string[];
|
|
66
|
+
expandedCategories: string[];
|
|
67
|
+
validCategories: string[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Determine the default BOM audit categories for the current CLI invocation.
|
|
71
|
+
*
|
|
72
|
+
* OBOM-focused runs should default to the runtime-specific rule pack unless the
|
|
73
|
+
* user explicitly requests other categories.
|
|
74
|
+
*
|
|
75
|
+
* @param {object} options CLI options
|
|
76
|
+
* @param {string} [commandPath] Invoked command path or name
|
|
77
|
+
* @returns {string | undefined} Default category string, if any
|
|
78
|
+
*/
|
|
79
|
+
export declare function getDefaultBomAuditCategories(options: object, commandPath?: string): string | undefined;
|
|
80
|
+
//# sourceMappingURL=auditCategories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditCategories.d.ts","sourceRoot":"","sources":["../../../lib/inventory/auditCategories.js"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,mBAIhC,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,mBAGhC,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,8BAA8B,mBAAmC,CAAC;AAE/E,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,mBAIjC,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,mBAIlC,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,QAAkC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;EAWrC,CAAC;AAMH;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAH3C,MAAM,GAAC,MAAM,EAG8B,GAFzC,MAAM,EAAE,CAiBpB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAHxC,MAAM,GAAC,MAAM,EAG2B,GAFtC,MAAM,EAAE,CAapB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAHtC,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,CAGa,GAFpC,MAAM,EAAE,CAMpB;AAUD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAJ1C,MAAM,GAAC,MAAM,EAI6B,EAAE,KAAK,EAHjD,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,CAGwB,GAF/C;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,EAAE,CAAA;CAAC,CAyB3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAJzC,MAIyC,EAAE,WAAW,AAH9D,CACA,EADQ,MAGsD,GAFpD,MAAM,GAAG,SAAS,CA8B9B"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default CycloneDX specification version used across cdxgen when a caller
|
|
3
|
+
* does not specify one (matches the `--spec-version` CLI default).
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_CDX_SPEC_VERSION = 1.7;
|
|
6
|
+
/**
|
|
7
|
+
* Frozen map of CycloneDX spec versions (as "major.minor" strings) to the
|
|
8
|
+
* frozen list of component types supported by that version.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CYCLONEDX_COMPONENT_TYPES_BY_SPEC_VERSION: Readonly<{
|
|
11
|
+
1.4: readonly string[];
|
|
12
|
+
1.5: readonly string[];
|
|
13
|
+
1.6: readonly string[];
|
|
14
|
+
1.7: readonly string[];
|
|
15
|
+
"2.0": readonly string[];
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Determine whether the given BOM object is an SPDX JSON-LD document.
|
|
19
|
+
*
|
|
20
|
+
* @param {object} bomJson BOM JSON object to inspect.
|
|
21
|
+
* @returns {boolean} True when the object carries an SPDX `@context` and an `SpdxDocument` graph entry.
|
|
22
|
+
*/
|
|
23
|
+
export declare const isSpdxJsonLd: (bomJson: object) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Normalize a CycloneDX spec version to a numeric major.minor value.
|
|
26
|
+
*
|
|
27
|
+
* @param {string|number} specVersion Spec version string or number (e.g. "1.5", 1.6).
|
|
28
|
+
* @returns {number|undefined} Numeric major.minor version, or undefined when unparseable.
|
|
29
|
+
*/
|
|
30
|
+
export declare const normalizeCycloneDxSpecVersion: (specVersion: string | number) => number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Format a CycloneDX spec version as a "major.minor" string.
|
|
33
|
+
*
|
|
34
|
+
* @param {string|number} specVersion Spec version string or number.
|
|
35
|
+
* @returns {string|undefined} "major.minor" string, or undefined when unparseable.
|
|
36
|
+
*/
|
|
37
|
+
export declare const toCycloneDxSpecVersionString: (specVersion: string | number) => string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Determine whether a spec version is greater than or equal to a minimum version,
|
|
40
|
+
* comparing major then minor components.
|
|
41
|
+
*
|
|
42
|
+
* @param {string|number} specVersion The spec version to test.
|
|
43
|
+
* @param {string|number} minimumVersion The minimum required spec version.
|
|
44
|
+
* @returns {boolean} True when specVersion is at least minimumVersion.
|
|
45
|
+
*/
|
|
46
|
+
export declare const isCycloneDxSpecVersionAtLeast: (specVersion: string | number, minimumVersion: string | number) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Determine whether a spec version is CycloneDX 2.0 or later.
|
|
49
|
+
*
|
|
50
|
+
* @param {string|number} specVersion The spec version to test.
|
|
51
|
+
* @returns {boolean} True when the spec version is at least 2.0.
|
|
52
|
+
*/
|
|
53
|
+
export declare const isCycloneDx20SpecVersion: (specVersion: string | number) => boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Return the list of component types supported by a given CycloneDX spec
|
|
56
|
+
* version, falling back to the 1.7 list when the version is unrecognized.
|
|
57
|
+
*
|
|
58
|
+
* @param {string|number} [specVersion=1.7] CycloneDX spec version.
|
|
59
|
+
* @returns {string[]} Supported component type names for that version.
|
|
60
|
+
*/
|
|
61
|
+
export declare const getSupportedCycloneDxComponentTypes: (specVersion?: string | number) => string[];
|
|
62
|
+
/**
|
|
63
|
+
* Normalize a component type filter (single value, array, or falsy) into a
|
|
64
|
+
* deduplicated array of trimmed, non-empty type strings.
|
|
65
|
+
*
|
|
66
|
+
* @param {string|string[]} componentType Component type or array of types.
|
|
67
|
+
* @returns {string[]} Deduplicated, trimmed component type strings.
|
|
68
|
+
*/
|
|
69
|
+
export declare const normalizeCycloneDxComponentTypeFilter: (componentType: string | string[]) => string[];
|
|
70
|
+
/**
|
|
71
|
+
* Determine whether a component type is enabled given the configured type
|
|
72
|
+
* filter and spec version.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} componentType The component type to test.
|
|
75
|
+
* @param {object} [options] Options carrying the filter and spec version.
|
|
76
|
+
* @param {string|string[]} [options.componentType] Explicit type filter from CLI options.
|
|
77
|
+
* @param {string|number} [options.specVersion] CycloneDX spec version for default support lookup.
|
|
78
|
+
* @returns {boolean} True when the component type passes the filter.
|
|
79
|
+
*/
|
|
80
|
+
export declare const isCycloneDxComponentTypeEnabled: (componentType: string, options?: {
|
|
81
|
+
componentType?: string | string[];
|
|
82
|
+
specVersion?: string | number;
|
|
83
|
+
}) => boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Return the appropriate CycloneDX root format key ("bomFormat" or
|
|
86
|
+
* "specFormat") for the given spec version or BOM object.
|
|
87
|
+
*
|
|
88
|
+
* @param {string|number|object} specVersionOrBom Spec version, or a BOM object whose `specVersion` is read.
|
|
89
|
+
* @returns {string} The root format key name to use.
|
|
90
|
+
*/
|
|
91
|
+
export declare const getCycloneDxRootFormatKey: (specVersionOrBom: string | number | object) => string;
|
|
92
|
+
/**
|
|
93
|
+
* Return the BOM format identifier string from a BOM object.
|
|
94
|
+
*
|
|
95
|
+
* @param {object} bomJson BOM JSON object.
|
|
96
|
+
* @returns {string|undefined} The `specFormat` or `bomFormat` value.
|
|
97
|
+
*/
|
|
98
|
+
export declare const getCycloneDxFormat: (bomJson: object) => string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Determine whether a BOM object carries the CycloneDX format identifier.
|
|
101
|
+
*
|
|
102
|
+
* @param {object} bomJson BOM JSON object.
|
|
103
|
+
* @returns {boolean} True when the format identifier equals "CycloneDX".
|
|
104
|
+
*/
|
|
105
|
+
export declare const hasCycloneDxFormat: (bomJson: object) => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Determine whether an object is a valid CycloneDX BOM by checking both the
|
|
108
|
+
* format identifier and a parseable spec version.
|
|
109
|
+
*
|
|
110
|
+
* @param {object} bomJson BOM JSON object.
|
|
111
|
+
* @returns {boolean} True when the object is a valid CycloneDX BOM.
|
|
112
|
+
*/
|
|
113
|
+
export declare const isCycloneDxBom: (bomJson: object) => boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Mutates a CycloneDX BOM object so the appropriate root format key is present
|
|
116
|
+
* for the requested spec version, while preserving conventional serialized
|
|
117
|
+
* root-key ordering (`bomFormat`/`specFormat` and `specVersion` first). Only the currently
|
|
118
|
+
* supported CycloneDX major.minor version shape is accepted; multi-component
|
|
119
|
+
* future versions such as `2.0.1` intentionally return `undefined` from the
|
|
120
|
+
* normalizer rather than being silently truncated.
|
|
121
|
+
*
|
|
122
|
+
* @param {object} bomJson BOM JSON object to mutate.
|
|
123
|
+
* @param {string|number} specVersion Desired CycloneDX spec version.
|
|
124
|
+
* @param {object} options Root-key compatibility options.
|
|
125
|
+
* @returns {object} The same `bomJson` object, after in-place mutation.
|
|
126
|
+
*/
|
|
127
|
+
export declare const setCycloneDxFormat: (bomJson: object, specVersion: string | number, { preserveLegacyBomFormat }?: object) => object;
|
|
128
|
+
/**
|
|
129
|
+
* Detect the format of a BOM object, distinguishing CycloneDX, SPDX JSON-LD,
|
|
130
|
+
* and unknown formats.
|
|
131
|
+
*
|
|
132
|
+
* @param {object} bomJson BOM JSON object.
|
|
133
|
+
* @returns {string} "cyclonedx", "spdx", or "unknown".
|
|
134
|
+
*/
|
|
135
|
+
export declare const detectBomFormat: (bomJson: object) => string;
|
|
136
|
+
/**
|
|
137
|
+
* Build a user-facing error message explaining that the supplied BOM is not a
|
|
138
|
+
* CycloneDX document, tailored to the detected format.
|
|
139
|
+
*
|
|
140
|
+
* @param {object} bomJson BOM JSON object that was rejected.
|
|
141
|
+
* @param {string} [commandName="This command"] Name of the command requiring CycloneDX input.
|
|
142
|
+
* @returns {string} Human-readable error message.
|
|
143
|
+
*/
|
|
144
|
+
export declare const getNonCycloneDxErrorMessage: (bomJson: object, commandName?: string) => string;
|
|
145
|
+
//# sourceMappingURL=bomUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bomUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/bomUtils.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAuC5C;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;;EAMpD,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,YAAY,YAHd,MAAM,KACJ,OAOV,CAAC;AAgBJ;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,gBAH/B,MAAM,GAAC,MAAM,KACX,MAAM,GAAC,SAQnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,gBAH9B,MAAM,GAAC,MAAM,KACX,MAAM,GAAC,SAWnB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,gBAJ/B,MAAM,GAAC,MAAM,kBACb,MAAM,GAAC,MAAM,KACX,OAYZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,gBAH1B,MAAM,GAAC,MAAM,KACX,OAGkC,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,iBAHrC,MAAM,GAAC,MAAM,KACX,MAAM,EAQlB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,kBAHvC,MAAM,GAAC,MAAM,EAAE,KACb,MAAM,EAYlB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,kBANjC,MAAM,YAEd;IAAkC,aAAa,AAA/C,CACA,EADQ,MAAM,GAAC,MAAM,EAAE,CACvB;IAAgC,WAAW,AAA3C,CACA,EADQ,MAAM,GAAC,MAAM,CACrB;CAAA,KAAU,OAkBZ,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,qBAH3B,MAAM,GAAC,MAAM,GAAC,MAAM,KAClB,MAUZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YAHpB,MAAM,KACJ,MAAM,GAAC,SAGuB,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YAHpB,MAAM,KACJ,OAGqC,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,YAHhB,MAAM,KACJ,OAIsD,CAAC;AAoCpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,YALpB,MAAM,eACN,MAAM,GAAC,MAAM,gCACb,MAAM,KACJ,MAkCZ,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,YAHjB,MAAM,KACJ,MAUZ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,YAJ7B,MAAM,gBACN,MAAM,KACJ,MAWZ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cdxgen cache` subcommand — inspect and purge the metadata fetch cache.
|
|
3
|
+
*
|
|
4
|
+
* This module operates directly on the filesystem because JS is the authority
|
|
5
|
+
* for the cache directory. The cache layout is:
|
|
6
|
+
* <cacheDir>/cdxrs-fetch/<host>/<hash>.json
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Gather statistics about the fetch cache.
|
|
10
|
+
*
|
|
11
|
+
* @returns {Object} Cache info: directory, entryCount, totalBytes,
|
|
12
|
+
* perHost breakdown, oldestMtime, newestMtime.
|
|
13
|
+
*/
|
|
14
|
+
export declare function cacheInfo(): Object;
|
|
15
|
+
/**
|
|
16
|
+
* Remove all entries from the fetch cache.
|
|
17
|
+
*
|
|
18
|
+
* @returns {Object} Result with removedCount, freedBytes, directory.
|
|
19
|
+
*/
|
|
20
|
+
export declare function cacheClear(): Object;
|
|
21
|
+
/**
|
|
22
|
+
* Run the cache subcommand and print results.
|
|
23
|
+
*
|
|
24
|
+
* @param {"info"|"clear"} action What to do.
|
|
25
|
+
* @returns {Promise<number>} Exit code.
|
|
26
|
+
*/
|
|
27
|
+
export declare function runCacheCommand(action: "info" | "clear"): Promise<number>;
|
|
28
|
+
//# sourceMappingURL=cacheCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheCommands.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cacheCommands.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgCH;;;;;GAKG;AACH,wBAAgB,SAAS,IAHZ,MAAM,CAwDlB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAFb,MAAM,CAwBlB;AAUD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAHjC,MAAM,GAAC,OAG0B,GAF/B,OAAO,CAAC,MAAM,CAAC,CAyC3B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache directory resolution for the cdxrs fetch metadata cache.
|
|
3
|
+
*
|
|
4
|
+
* JS is the single source of truth for the path. `fetchBatch.js` passes
|
|
5
|
+
* `--cache-dir <path>` to every `cdxrs fetch` invocation; Rust keeps its own
|
|
6
|
+
* resolution only as the fallback for standalone CLI use. Both sides follow
|
|
7
|
+
* the same rules so they agree — verified by a parity test.
|
|
8
|
+
*
|
|
9
|
+
* Resolution order:
|
|
10
|
+
* 1. `CDXGEN_CACHE_DIR` if set and non-empty (documented escape hatch).
|
|
11
|
+
* 2. Platform cache directory with a `cdxgen` component.
|
|
12
|
+
* 3. `null` — cache disabled. A cache that cannot find a home must not fall
|
|
13
|
+
* back to the current working directory or a temp dir.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the cache directory from explicit inputs, with no reference to the
|
|
17
|
+
* ambient environment or the host platform.
|
|
18
|
+
*
|
|
19
|
+
* Mirrors `HttpCache::resolve_cache_for` in cdxrs. Taking the platform as an
|
|
20
|
+
* argument is what lets every branch be tested on every host; keep it that way
|
|
21
|
+
* rather than reading `isWin`/`isMac` here, or the Windows and Linux branches
|
|
22
|
+
* become untestable on a macOS developer machine.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} inputs Resolution inputs.
|
|
25
|
+
* @param {"linux"|"macos"|"windows"} inputs.platform Which convention to apply.
|
|
26
|
+
* @param {string} [inputs.cdxgenCacheDir] `CDXGEN_CACHE_DIR`.
|
|
27
|
+
* @param {string} [inputs.xdgCacheHome] `XDG_CACHE_HOME`. Ignored unless
|
|
28
|
+
* absolute, per the XDG spec, so it cannot point inside the working directory.
|
|
29
|
+
* @param {string} [inputs.home] Home directory.
|
|
30
|
+
* @param {string} [inputs.localAppData] `LOCALAPPDATA`.
|
|
31
|
+
* @returns {string|null} Absolute path, or null when nothing resolves.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveCacheDirFor({ platform, cdxgenCacheDir, xdgCacheHome, home, localAppData, }: {
|
|
34
|
+
platform: "linux" | "macos" | "windows";
|
|
35
|
+
cdxgenCacheDir?: string;
|
|
36
|
+
xdgCacheHome?: string;
|
|
37
|
+
home?: string;
|
|
38
|
+
localAppData?: string;
|
|
39
|
+
}): string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the metadata cache directory from the environment.
|
|
42
|
+
*
|
|
43
|
+
* @returns {string|null} Absolute path, or null when no home directory can be
|
|
44
|
+
* determined and `CDXGEN_CACHE_DIR` is unset.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveCacheDir(): string | null;
|
|
47
|
+
/**
|
|
48
|
+
* The fetch subdirectory inside the cache root. All cdxrs fetch entries live
|
|
49
|
+
* under `<cacheDir>/cdxrs-fetch/<host>/<hash>.json`.
|
|
50
|
+
*
|
|
51
|
+
* @param {string} cacheDir Resolved cache directory.
|
|
52
|
+
* @returns {string} Path to the fetch subdirectory.
|
|
53
|
+
*/
|
|
54
|
+
export declare function fetchCacheDir(cacheDir: string): string;
|
|
55
|
+
//# sourceMappingURL=cacheDir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheDir.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cacheDir.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,IAAI,EACJ,YAAY,GACb,EAdE;IAA0C,QAAQ,EAA1C,OAAO,GAAC,OAAO,GAAC,SAAS,CACjC;IAAwB,cAAc,AAAtC,CACA,EADQ,MAAM,CACd;IAAwB,YAAY,AAApC,CAEA,EAFQ,MAAM,CAEd;IAAwB,IAAI,AAA5B,CACA,EADQ,MAAM,CACd;IAAwB,YAAY,AAApC,CACA,EADQ,MAAM,CACd;CAQF,GARY,MAAM,GAAC,IAAI,CA2BvB;AAcD;;;;;GAKG;AACH,wBAAgB,eAAe,IAHlB,MAAM,GAAC,IAAI,CAWvB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,MAAM,CAIlB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Method to collect crypto and ssl libraries from the OS.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} options
|
|
5
|
+
* @returns osPkgsList Array of OS crypto packages
|
|
6
|
+
*/
|
|
7
|
+
export declare function collectOSCryptoLibs(options: Object, executeOsQueryFn: any): any[];
|
|
8
|
+
/**
|
|
9
|
+
* Build cryptographic-asset components by running source-level JS crypto
|
|
10
|
+
* detection over the given directory.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} src Path to the source directory to scan.
|
|
13
|
+
* @param {object} [options] Collection options forwarded to the detector and evidence normalizer.
|
|
14
|
+
* @param {boolean} [options.deep] When true, perform a deep scan including nested directories.
|
|
15
|
+
* @returns {Promise<Object[]>} Sorted array of cryptographic-asset component objects.
|
|
16
|
+
*/
|
|
17
|
+
export declare function collectSourceCryptoComponents(src: string, options?: {
|
|
18
|
+
deep?: boolean;
|
|
19
|
+
}): Promise<Object[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Build cryptographic-asset components from dosai crypto analysis output,
|
|
22
|
+
* mapping detected algorithms, operations, and key materials into CycloneDX
|
|
23
|
+
* components.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} src Path to the source directory used for evidence attribution.
|
|
26
|
+
* @param {object} [options] Collection options forwarded to the analyzer and evidence normalizer.
|
|
27
|
+
* @returns {Promise<Object[]>} Sorted array of cryptographic-asset component objects (empty when dosai produces no output).
|
|
28
|
+
*/
|
|
29
|
+
export declare function collectDosaiCryptoComponents(src: string, options?: object): Promise<Object[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Find crypto algorithm in the given code snippet
|
|
32
|
+
*
|
|
33
|
+
* @param {string} code Code snippet
|
|
34
|
+
* @returns {Array} Arary of crypto algorithm objects with oid and description
|
|
35
|
+
*/
|
|
36
|
+
export declare function findCryptoAlgos(code: string): any[];
|
|
37
|
+
//# sourceMappingURL=cbomutils.d.ts.map
|