@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,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a default location of the plugins file.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} projectPath Path to the SBT project
|
|
5
|
+
*/
|
|
6
|
+
export declare function sbtPluginsPath(projectPath: string): any;
|
|
7
|
+
/**
|
|
8
|
+
* Determine the version of SBT used in compilation of this project.
|
|
9
|
+
* By default it looks into a standard SBT location i.e.
|
|
10
|
+
* <path-project>/project/build.properties
|
|
11
|
+
* Returns `null` if the version cannot be determined.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} projectPath Path to the SBT project
|
|
14
|
+
*/
|
|
15
|
+
export declare function determineSbtVersion(projectPath: string): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Adds a new plugin to the SBT project by amending its plugins list.
|
|
18
|
+
* Only recommended for SBT < 1.2.0 or otherwise use `addPluginSbtFile`
|
|
19
|
+
* parameter.
|
|
20
|
+
* The change manipulates the existing plugins' file by creating a copy of it
|
|
21
|
+
* and returning a path where it is moved to.
|
|
22
|
+
* Once the SBT task is complete one must always call `cleanupPlugin` to remove
|
|
23
|
+
* the modifications made in place.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} projectPath Path to the SBT project
|
|
26
|
+
* @param {string} plugin Name of the plugin to add
|
|
27
|
+
*/
|
|
28
|
+
export declare function addPlugin(projectPath: string, plugin: string): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Cleans up modifications to the project's plugins' file made by the
|
|
31
|
+
* `addPlugin` function.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} projectPath Path to the SBT project
|
|
34
|
+
* @param {string} originalPluginsFile Location of the original plugins file, if any
|
|
35
|
+
*/
|
|
36
|
+
export declare function cleanupPlugin(projectPath: string, originalPluginsFile: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Find the repository URL from the local Coursier cache for a given Maven package.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} group Maven groupId
|
|
41
|
+
* @param {string} name Maven artifactId (original name with suffix if applicable)
|
|
42
|
+
* @param {string} version Package version
|
|
43
|
+
* @returns {string|null} The repository URL or null if not found
|
|
44
|
+
*/
|
|
45
|
+
export declare function findCoursierRegistryUrl(group: string, name: string, version: string): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Test if a given URL exists (returns 2xx/3xx for http/https, or exists on disk for file)
|
|
48
|
+
*
|
|
49
|
+
* @param {string} url URL to test
|
|
50
|
+
* @returns {Promise<boolean>} true if URL exists
|
|
51
|
+
*/
|
|
52
|
+
export declare function testUrlExists(url: string): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Find the local jar path in Coursier cache if it exists.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} group Maven groupId
|
|
57
|
+
* @param {string} name Maven artifactId (original name with suffix)
|
|
58
|
+
* @param {string} version Package version
|
|
59
|
+
* @returns {string|null} local jar path or null
|
|
60
|
+
*/
|
|
61
|
+
export declare function findLocalJarPath(group: string, name: string, version: string): string | null;
|
|
62
|
+
/**
|
|
63
|
+
* Resolve the repo/jar download URLs and optional hashes for a Maven coordinate.
|
|
64
|
+
*
|
|
65
|
+
* Looks up the Coursier registry URL for the coordinate and, when the jar is
|
|
66
|
+
* present in the local Coursier cache, computes MD5/SHA-1/SHA-256/SHA-512
|
|
67
|
+
* digests. Results are memoized per coordinate.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} group Maven groupId.
|
|
70
|
+
* @param {string} name Maven artifactId.
|
|
71
|
+
* @param {string} version Package version.
|
|
72
|
+
* @returns {Promise<{repoUrl: string, jarUrl: string, hashes?: Array<{alg: string, content: string}>}|null>}
|
|
73
|
+
* Resolved URLs with optional hashes, or null when no registry URL is found.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveJarDistribution(group: string, name: string, version: string): Promise<{
|
|
76
|
+
repoUrl: string;
|
|
77
|
+
jarUrl: string;
|
|
78
|
+
hashes?: Array<{
|
|
79
|
+
alg: string;
|
|
80
|
+
content: string;
|
|
81
|
+
}>;
|
|
82
|
+
} | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Parse an sbt dependency tree output file and return the package list and dependency tree.
|
|
85
|
+
*
|
|
86
|
+
* Reads a file produced by the sbt `dependencyTree` command and extracts Maven artifact
|
|
87
|
+
* coordinates, building a hierarchical dependency graph. Evicted packages and ranges are ignored.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} sbtTreeFile Path to the sbt dependency tree output file
|
|
90
|
+
* @returns {{ pkgList: Object[], dependenciesList: Object[] }}
|
|
91
|
+
*/
|
|
92
|
+
export declare function parseSbtTree(sbtTreeFile: string): {
|
|
93
|
+
pkgList: Object[];
|
|
94
|
+
dependenciesList: Object[];
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Parse sbt lock file
|
|
98
|
+
*
|
|
99
|
+
* @param {string} pkgLockFile build.sbt.lock file
|
|
100
|
+
*/
|
|
101
|
+
export declare function parseSbtLock(pkgLockFile: string): Promise<{
|
|
102
|
+
group: any;
|
|
103
|
+
name: any;
|
|
104
|
+
version: any;
|
|
105
|
+
_integrity: string;
|
|
106
|
+
scope: string | undefined;
|
|
107
|
+
properties: {
|
|
108
|
+
name: string;
|
|
109
|
+
value: string;
|
|
110
|
+
}[];
|
|
111
|
+
purl: any;
|
|
112
|
+
"bom-ref": string;
|
|
113
|
+
evidence: {
|
|
114
|
+
identity: {
|
|
115
|
+
field: string;
|
|
116
|
+
confidence: number;
|
|
117
|
+
concludedValue: any;
|
|
118
|
+
methods: {
|
|
119
|
+
technique: string;
|
|
120
|
+
confidence: number;
|
|
121
|
+
value: string;
|
|
122
|
+
}[];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Parse the root build.sbt to extract the aggregate project name, organization, and version.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} projectPath Directory path of the project
|
|
130
|
+
* @returns {{ name: string, group: string, version: string }|null}
|
|
131
|
+
*/
|
|
132
|
+
export declare function parseSbtRootProject(projectPath: string): {
|
|
133
|
+
name: string;
|
|
134
|
+
group: string;
|
|
135
|
+
version: string;
|
|
136
|
+
} | null;
|
|
137
|
+
/**
|
|
138
|
+
* Discover SBT subproject names statically by parsing build.sbt and project files.
|
|
139
|
+
*
|
|
140
|
+
* @param {string} projectPath Directory path of the project
|
|
141
|
+
* @returns {string[]} List of discovered subproject names
|
|
142
|
+
*/
|
|
143
|
+
export declare function discoverSbtProjects(projectPath: string): string[];
|
|
144
|
+
/**
|
|
145
|
+
* Parse the output of the sbt `projects` command to extract the real project
|
|
146
|
+
* identifiers as understood by sbt. This is more accurate than scraping the
|
|
147
|
+
* build files with a regex (see {@link discoverSbtProjects}), since it relies
|
|
148
|
+
* on sbt's own project resolution and therefore avoids false positives from
|
|
149
|
+
* commented-out code, examples or values that merely look like project
|
|
150
|
+
* definitions.
|
|
151
|
+
*
|
|
152
|
+
* A typical `sbt projects` output looks like:
|
|
153
|
+
*
|
|
154
|
+
* ```
|
|
155
|
+
* [info] In file:/path/to/build/
|
|
156
|
+
* [info] * chen
|
|
157
|
+
* [info] platform
|
|
158
|
+
* [info] dataflowengineoss
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* The project marked with `*` is the currently selected (usually the
|
|
162
|
+
* aggregating root) project.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} stdout Raw stdout captured from `sbt projects`
|
|
165
|
+
* @returns {{projects: string[], root: string | undefined}} The discovered
|
|
166
|
+
* project ids and the currently selected (root) project id, if any.
|
|
167
|
+
*/
|
|
168
|
+
export declare function parseSbtProjects(stdout: string): {
|
|
169
|
+
projects: string[];
|
|
170
|
+
root: string | undefined;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Parse plugins.sbt files to extract sbt plugins as development dependencies.
|
|
174
|
+
*
|
|
175
|
+
* @param {string} projectPath Directory path of the project
|
|
176
|
+
* @returns {Object[]} List of parsed dependency components
|
|
177
|
+
*/
|
|
178
|
+
export declare function parseSbtPlugins(projectPath: string): Object[];
|
|
179
|
+
//# sourceMappingURL=sbtutils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sbtutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/sbtutils.js"],"names":[],"mappings":"AAmEA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAF/B,MAE+B,OAEzC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAFpC,MAEoC,iBAa9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAH1B,MAG0B,EAAE,MAAM,EAFlC,MAEkC,iBAc5C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAH9B,MAG8B,EAAE,mBAAmB,EAFnD,MAEmD,WAkB7D;AA0KD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EALlC,MAKkC,EAAE,IAAI,EAJxC,MAIwC,EAAE,OAAO,EAHjD,MAGiD,GAF/C,MAAM,GAAC,IAAI,CAIvB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAH5B,MAG4B,GAF1B,OAAO,CAAC,OAAO,CAAC,CAuB5B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAL3B,MAK2B,EAAE,IAAI,EAJjC,MAIiC,EAAE,OAA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 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a Transparency Exchange Identifier (TEI) URN.
|
|
3
|
+
*
|
|
4
|
+
* Syntax: `urn:tei:<type>:<domain-name>:<unique-identifier>` where
|
|
5
|
+
* `<domain-name>` is used for `/.well-known/tea` discovery.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} tei TEI URN string
|
|
8
|
+
* @returns {{type: string, domain: string, id: string}|null} Parsed parts
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseTei(tei: string): {
|
|
11
|
+
type: string;
|
|
12
|
+
domain: string;
|
|
13
|
+
id: string;
|
|
14
|
+
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* Compare two semver strings (major.minor.patch with optional prerelease).
|
|
17
|
+
* Returns 1 when a > b, -1 when a < b, 0 when equal.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} a Version string
|
|
20
|
+
* @param {string} b Version string
|
|
21
|
+
* @returns {number} Comparison result
|
|
22
|
+
*/
|
|
23
|
+
export declare function compareTeaVersions(a: string, b: string): number;
|
|
24
|
+
/**
|
|
25
|
+
* Pick the endpoint and API version to use, per the discovery spec: the client
|
|
26
|
+
* MUST pick the endpoint with the highest matching version supported by both
|
|
27
|
+
* the client and the endpoint (SemVer comparison), preferring the highest
|
|
28
|
+
* `priority` when several tie. Returns the best-effort selection.
|
|
29
|
+
*
|
|
30
|
+
* @param {Object[]} endpoints Endpoints from the `.well-known/tea` document
|
|
31
|
+
* @param {string[]} [supported] Versions the client supports
|
|
32
|
+
* @returns {{url: string, version: string}|null} Selected endpoint
|
|
33
|
+
*/
|
|
34
|
+
export declare function selectTeaEndpoint(endpoints: Object[], supported?: string[]): {
|
|
35
|
+
url: string;
|
|
36
|
+
version: string;
|
|
37
|
+
} | null;
|
|
38
|
+
/**
|
|
39
|
+
* Discover TEA endpoints for a domain via `https://<domain>/.well-known/tea`.
|
|
40
|
+
* The well-known document must conform to the TEA Well-Known schema.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} domain Domain name from the TEI
|
|
43
|
+
* @param {Object} [options] CLI options
|
|
44
|
+
* @returns {Promise<Object|null>} Parsed well-known document
|
|
45
|
+
*/
|
|
46
|
+
export declare function discoverTeaEndpoints(domain: string, options?: Object): Promise<Object | null>;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve a TEI to a product release UUID and a selected TEA server.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} tei TEI URN string
|
|
51
|
+
* @param {Object} [options] CLI options
|
|
52
|
+
* @returns {Promise<{productReleaseUuid: string, server: {url: string, version: string}}|null>}
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveTei(tei: string, options?: Object): Promise<{
|
|
55
|
+
productReleaseUuid: string;
|
|
56
|
+
server: {
|
|
57
|
+
url: string;
|
|
58
|
+
version: string;
|
|
59
|
+
};
|
|
60
|
+
} | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Fetch the latest TEA Collection for a product (or component) release.
|
|
63
|
+
*
|
|
64
|
+
* @param {Object} input Fetch inputs
|
|
65
|
+
* @param {string} input.rootUrl TEA server root URL
|
|
66
|
+
* @param {string} input.version TEA API version
|
|
67
|
+
* @param {string} input.releaseUuid Product or component release UUID
|
|
68
|
+
* @param {string} [input.scope] `productRelease` (default) or `componentRelease`
|
|
69
|
+
* @param {Object} [input.options] CLI options
|
|
70
|
+
* @returns {Promise<Object|null>} TEA Collection object
|
|
71
|
+
*/
|
|
72
|
+
export declare function fetchLatestCollection({ rootUrl, version, releaseUuid, scope, options, }?: {
|
|
73
|
+
rootUrl: string;
|
|
74
|
+
version: string;
|
|
75
|
+
releaseUuid: string;
|
|
76
|
+
scope?: string;
|
|
77
|
+
options?: Object;
|
|
78
|
+
}): Promise<Object | null>;
|
|
79
|
+
/**
|
|
80
|
+
* Download the BOM artifacts of a TEA Collection and verify their checksums.
|
|
81
|
+
* Only artifacts whose format is a CycloneDX or SPDX JSON media type are
|
|
82
|
+
* downloaded; other formats (XML, signatures) are skipped. A checksum mismatch
|
|
83
|
+
* rejects the artifact rather than merging untrusted content.
|
|
84
|
+
*
|
|
85
|
+
* @param {Object} collection TEA Collection object
|
|
86
|
+
* @param {Object} [options] CLI options
|
|
87
|
+
* @returns {Promise<Array<{name: string, url: string, content: string, format: Object}>>}
|
|
88
|
+
*/
|
|
89
|
+
export declare function fetchBomArtifacts(collection: Object, options?: Object): Promise<Array<{
|
|
90
|
+
name: string;
|
|
91
|
+
url: string;
|
|
92
|
+
content: string;
|
|
93
|
+
format: Object;
|
|
94
|
+
}>>;
|
|
95
|
+
/**
|
|
96
|
+
* Build the POST /collection payload per the draft TEA publisher API.
|
|
97
|
+
*
|
|
98
|
+
* Collection versioning is owned by the server: the client publishes with a
|
|
99
|
+
* reason (INITIAL_RELEASE for the first collection, ARTIFACT_UPDATED /
|
|
100
|
+
* ARTIFACT_ADDED / VEX_UPDATED for updates) and the server increments the
|
|
101
|
+
* collection `version` counter.
|
|
102
|
+
*
|
|
103
|
+
* @param {Object} input Payload inputs
|
|
104
|
+
* @param {string} input.leafIdentifier UUID of the release/leaf this collection belongs to
|
|
105
|
+
* @param {string} input.productName Product name
|
|
106
|
+
* @param {string} input.productVersion Product version
|
|
107
|
+
* @param {string} input.authorName Author name
|
|
108
|
+
* @param {string} [input.authorEmail] Author email
|
|
109
|
+
* @param {string} [input.reasonType] Collection update reason enum value
|
|
110
|
+
* @param {string} [input.reasonComment] Free-text reason comment
|
|
111
|
+
* @param {string} input.artifactName Artifact name
|
|
112
|
+
* @param {string} input.artifactUrl Hosted URL of the BOM artifact
|
|
113
|
+
* @param {string} input.artifactContent BOM content used for checksum/size
|
|
114
|
+
* @param {string} [input.artifactMediaType] Media type of the BOM
|
|
115
|
+
* @param {string} [input.artifactDescription] Description of the artifact
|
|
116
|
+
* @returns {Object} Publish payload
|
|
117
|
+
*/
|
|
118
|
+
export declare function buildPublishCollectionPayload({ leafIdentifier, productName, productVersion, authorName, authorEmail, reasonType, reasonComment, artifactName, artifactUrl, artifactContent, artifactMediaType, artifactDescription, }: {
|
|
119
|
+
leafIdentifier: string;
|
|
120
|
+
productName: string;
|
|
121
|
+
productVersion: string;
|
|
122
|
+
authorName: string;
|
|
123
|
+
authorEmail?: string;
|
|
124
|
+
reasonType?: string;
|
|
125
|
+
reasonComment?: string;
|
|
126
|
+
artifactName: string;
|
|
127
|
+
artifactUrl: string;
|
|
128
|
+
artifactContent: string;
|
|
129
|
+
artifactMediaType?: string;
|
|
130
|
+
artifactDescription?: string;
|
|
131
|
+
}): Object;
|
|
132
|
+
/**
|
|
133
|
+
* Publish a TEA Collection via the draft publisher API's POST /collection.
|
|
134
|
+
*
|
|
135
|
+
* A publish failure is reported as an error to the caller; it never deletes or
|
|
136
|
+
* rewrites the locally written BOM. The caller decides the exit status.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} serverUrl TEA server base URL (e.g. https://tea.example.com)
|
|
139
|
+
* @param {Object} payload POST /collection payload
|
|
140
|
+
* @param {Object} [options] CLI options
|
|
141
|
+
* @returns {Promise<{status: number, body: Object}>} Server response
|
|
142
|
+
*/
|
|
143
|
+
export declare function publishTeaCollection(serverUrl: string, payload: Object, options?: Object): Promise<{
|
|
144
|
+
status: number;
|
|
145
|
+
body: Object;
|
|
146
|
+
}>;
|
|
147
|
+
/**
|
|
148
|
+
* Merge fetched TEA SBOM documents into the generated BOM with the same rule
|
|
149
|
+
* PEP 770 embedded SBOMs follow: an upstream document is a stronger assertion
|
|
150
|
+
* than cdxgen's inference, so its components win on conflict and the conflict
|
|
151
|
+
* is recorded by the property union rather than discarded. Returns the
|
|
152
|
+
* components, dependencies, and citations; the caller merges them.
|
|
153
|
+
*
|
|
154
|
+
* @param {Object[]} artifacts Fetched artifacts (`{name, url, content}`)
|
|
155
|
+
* @param {Object} [context] Merge context
|
|
156
|
+
* @param {string} [context.collectionUuid] UUID of the TEA collection
|
|
157
|
+
* @param {string} [context.attributedTo] bom-ref to attribute the fetched data to
|
|
158
|
+
* @returns {{components: Object[], dependencies: Object[], citations: Object[]}}
|
|
159
|
+
*/
|
|
160
|
+
export declare function mergeTeaBom(artifacts: Object[], context?: {
|
|
161
|
+
collectionUuid?: string;
|
|
162
|
+
attributedTo?: string;
|
|
163
|
+
}): {
|
|
164
|
+
components: Object[];
|
|
165
|
+
dependencies: Object[];
|
|
166
|
+
citations: Object[];
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Resolve a TEI, retrieve the latest Collection's BOM artifacts, and merge them
|
|
170
|
+
* into a generated BOM in place.
|
|
171
|
+
*
|
|
172
|
+
* Retrieval is an enrichment, never a precondition: any failure is reported and
|
|
173
|
+
* the locally generated BOM is left as it stands.
|
|
174
|
+
*
|
|
175
|
+
* @param {Object} bomNSData BOM namespace data (`bomJson`, `parentComponent`, `citations`)
|
|
176
|
+
* @param {Object} options CLI options carrying `teaFetch` and credentials
|
|
177
|
+
* @returns {Promise<Object>} The same `bomNSData`, enriched where possible
|
|
178
|
+
*/
|
|
179
|
+
export declare function applyTeaFetch(bomNSData: Object, options?: Object): Promise<Object>;
|
|
180
|
+
//# sourceMappingURL=tea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tea.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/tea.js"],"names":[],"mappings":"AAiCA;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAHjB,MAGiB,GAFf;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAQ3D;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAJzB,MAIyB,EAAE,CAAC,EAH5B,MAG4B,GAF1B,MAAM,CA4BlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EALA,MAAM,EAKN,EACT,SAAS,AALR,CACA,EADQ,MAAM,EAKmB,GAJvB;IAAC,GAAG,EAAE,MAAM,CAAC;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AO,CAAC,MAAM,CAAC,CAwD3B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deprecated re-export barrel.
|
|
3
|
+
*
|
|
4
|
+
* `utils.js` declares nothing of its own. It re-exports the 261 public names that
|
|
5
|
+
* used to live here so existing imports keep working for one major version. Each
|
|
6
|
+
* implementation, and its JSDoc, now lives in the leaf module it was moved to
|
|
7
|
+
* (`purl.js`, `spdx.js`, `deps.js`, `ecosystems.js`, `parsers-*.js`, `core-*.js`,
|
|
8
|
+
* `state.js`, `paths.js`).
|
|
9
|
+
*
|
|
10
|
+
* New code should import from the specific module instead. See MIGRATING-TO-V13.md.
|
|
11
|
+
*/
|
|
12
|
+
import { BLOCKED_HOST_ERROR_CODE, cdxgenAgent, createBlockedHostError, createDryRunError, DEBUG_MODE, DRY_RUN_ERROR_CODE, getRecordedActivities, hasDangerousUnicode, isAllowedHttpHost, isDryRun, isDryRunError, isSecureMode, isSensitiveEnvironmentVariableName, readEnvironmentVariable, recordActivity, recordDecisionActivity, recordDiscoveryActivity, recordEnvironmentRead, recordObservedActivity, recordPolicyActivity, recordSensitiveFileRead, recordSymlinkResolution, remoteHostsAccessed, resetActivityContext, resetRecordedActivities, setActivityContext, setDryRunMode } from "../core/activity.js";
|
|
13
|
+
import { CARGO_CMD, CDXGEN_SPDX_CREATED_BY, CDXGEN_TEMP_DIR, CLJ_CMD, DOTNET_CMD, extractPathEnv, FETCH_LICENSE, GCC_CMD, GO_CMD, getJavaCommand, getPythonCommand, hasAnyProjectType, includeMavenTestScope, isBun, isDeno, isFeatureEnabled, isNode, isPackageManagerAllowed, JAVA_CMD, LEIN_CMD, NODE_CMD, NPM_CMD, PACKAGE_MANAGER_ALIASES, PREFER_MAVEN_DEPS_TREE, PROJECT_TYPE_ALIASES, PYTHON_CMD, PYTHON_EXCLUDED_COMPONENTS, parseMavenArgs, RUBY_CMD, RUSTC_CMD, SEARCH_MAVEN_ORG, SWIFT_CMD, shouldFetchLicense, shouldFetchPackageMetadata, shouldFetchVCS, shouldRunPredictiveBomAudit, TABLE_BORDER_STYLE, YARN_CMD } from "../core/env.js";
|
|
14
|
+
import { checksumFile, commandsExecuted, getAllFiles, getAllFilesWithIgnore, getTimestamp, getTmpDir, MAX_BUFFER, multiChecksumFile, safeCopyFileSync, safeExistsSync, safeExtractArchive, safeMkdirSync, safeMkdtempSync, safeRmSync, safeSpawnSync, safeUnlinkSync, safeWriteSync, TIMEOUT_MS } from "../core/fs.js";
|
|
15
|
+
import { dirNameStr, isMac, isValidDriveRoot, isWin, toCamel } from "../core/paths.js";
|
|
16
|
+
import { CDXGEN_VERSION, frameworksList } from "../core/state.js";
|
|
17
|
+
import { executeAtom, findAppModules, getAtomCommand } from "../inventory/atomUtils.js";
|
|
18
|
+
import { getDefaultBomAuditCategories } from "../inventory/auditCategories.js";
|
|
19
|
+
import { collectJarNS, collectMvnDependencies, componentSorter, convertJarNSToPackages, getJarClasses, getPomPropertiesFromMavenDir, inferJarGroupFromManifest, parseJarManifest, parsePomProperties, parsePomXml, readZipEntry, trimJarGroupSuffix } from "../inventory/deps.js";
|
|
20
|
+
import { isPartialTree, recomputeScope } from "../inventory/depsUtils.js";
|
|
21
|
+
import { getRuntimeInformation, retrieveCdxgenPluginVersion, retrieveCdxgenVersion } from "../inventory/envcontext.js";
|
|
22
|
+
import { addEvidenceForDotnet, attachIdentityTools, convertOSQueryResults, extractToolRefs } from "../inventory/evidenceUtils.js";
|
|
23
|
+
export { getCppModules } from "./cppEvidence.js";
|
|
24
|
+
export { addEvidenceForImports } from "./jsEvidence.js";
|
|
25
|
+
import { collectExecutables, collectSharedLibs, getOSPackageForFile } from "../inventory/osPackageResolver.js";
|
|
26
|
+
import { encodeForPurl, locateGenericPackage, mapConanPkgRefToPurlStringAndNameAndVersion, purlFromUrlString } from "../inventory/purl.js";
|
|
27
|
+
import { addLicenseText, adjustLicenseInformation, findLicenseId, getKnownLicense, getLicenses, guessLicenseId, isSpdxLicenseExpression, readLicenseText } from "../inventory/spdx.js";
|
|
28
|
+
import { isValidIriReference } from "../parsers/iri.js";
|
|
29
|
+
import { composePomXmlUrl, extractJarArchive, extractLicenseCommentFromPomXml, fetchPomXml, fetchPomXmlAsJson, findLocalMvnArtifact, getCratesMetadata, getDartMetadata, getGithubUrlParts, getGoPkgLicense, getMvnMetadata, getNpmMetadata, getNugetMetadata, getPyMetadata, getRepoLicense, getSwiftPackageMetadata, guessPypiMatchingVersion, metadata_cache, parseBdistMetadata, parseLicenseEntryOrArrayFromPomXml, repoMetadataToGitHubApiUrl, toGitHubApiUrl } from "./ecosystems.js";
|
|
30
|
+
import { getMavenCommand, getMillCommand } from "./gradleutils.js";
|
|
31
|
+
import { createNpmWorkspacePurl } from "./npmutils.js";
|
|
32
|
+
import { getPropertyGroupTextNodes, parseCsPkgData, parseCsPkgLockData, parseCsProjAssetsData, parseCsProjData, parseNupkg, parseNuspecData, parsePaketLockData } from "./parsers-dotnet.js";
|
|
33
|
+
import { getGoPkgComponent, parseGoListDep, parseGoModData, parseGoModGraph, parseGoModulesTxt, parseGoModWhy, parseGopkgData, parseGosumData, parseGoVersionData } from "./parsers-go.js";
|
|
34
|
+
import { findPnpmPackagePath, getVersionNumPnpm, parseBowerJson, parseMinJs, parseNodeShrinkwrap, parsePackageJsonName, parsePkgJson, parsePkgLock, parsePnpmLock, parsePnpmWorkspace, parseYarnLock, parseYarnWorkspace, pnpmMetadata, splitCommandArgs, yarnLockToIdentMap } from "./parsers-js.js";
|
|
35
|
+
import { parseBazelActionGraph, parseBazelBuild, parseBazelSkyframe, parseCljDep, parseEdnData, parseKVDep, parseLeinDep, parseLeiningenData, parseLeinMap, parseMavenTree, parseMavenTreeJson, parseMillDependency, parsePom } from "./parsers-jvm.js";
|
|
36
|
+
import { buildObjectForCocoaPod, executeAlpmList, executeApkList, executeDpkgList, executeEqueryList, executePodCommand, executeRpmList, identifyFlow, parseBitbucketPipelinesFile, parseCabalData, parseCloudBuildData, parseCmakeDotFile, parseCmakeLikeFile, parseCocoaDependency, parseColliderLockData, parseComposerJson, parseComposerLock, parseConanData, parseConanLockData, parseContainerFile, parseContainerSpecData, parseCUsageSlice, parseFlakeLock, parseFlakeNix, parseGitHubWorkflowData, parseHelmYamlData, parseMakeDFile, parseMixLockData, parseOpenapiSpecData, parsePodfileLock, parsePodfileTargets, parsePrivadoFile, parsePubLockData, parsePubYamlData, parseSwiftJsonTree, parseSwiftJsonTreeObject, parseSwiftResolved, recurseImageNameLookup } from "./parsers-misc.js";
|
|
37
|
+
import { derivePythonLockMetadataFileName, generatePixiLockFile, parseMojoProject, parsePiplockData, parsePixiLockFile, parsePixiTomlFile, parsePyLockData, parsePyProjectTomlFile, parsePyRequiresDist, parseReqEnvMarkers, parseReqFile, parseSetupPyFile } from "./parsers-python.js";
|
|
38
|
+
import { parseCargoAuditableData, parseCargoData, parseCargoDependencyData, parseCargoManifestDependencyData, parseCargoTomlData } from "./parsers-rust.js";
|
|
39
|
+
import { createUVLock, getPipFrozenTree, getPipTreeForPackages, getPyModules } from "./pythonutils.js";
|
|
40
|
+
export { addEvidenceForDotnet, addLicenseText, adjustLicenseInformation, attachIdentityTools, BLOCKED_HOST_ERROR_CODE, buildObjectForCocoaPod, CARGO_CMD, CDXGEN_SPDX_CREATED_BY, CDXGEN_TEMP_DIR, CDXGEN_VERSION, CLJ_CMD, cdxgenAgent, checksumFile, collectExecutables, collectJarNS, collectMvnDependencies, collectSharedLibs, commandsExecuted, componentSorter, composePomXmlUrl, convertJarNSToPackages, convertOSQueryResults, createBlockedHostError, createDryRunError, createNpmWorkspacePurl, createUVLock, DEBUG_MODE, DOTNET_CMD, DRY_RUN_ERROR_CODE, derivePythonLockMetadataFileName, dirNameStr, encodeForPurl, executeAlpmList, executeApkList, executeAtom, executeDpkgList, executeEqueryList, executePodCommand, executeRpmList, extractJarArchive, extractLicenseCommentFromPomXml, extractPathEnv, extractToolRefs, FETCH_LICENSE, fetchPomXml, fetchPomXmlAsJson, findAppModules, findLicenseId, findLocalMvnArtifact, findPnpmPackagePath, frameworksList, GCC_CMD, GO_CMD, generatePixiLockFile, getAllFiles, getAllFilesWithIgnore, getAtomCommand, getCratesMetadata, getDartMetadata, getDefaultBomAuditCategories, getGithubUrlParts, getGoPkgComponent, getGoPkgLicense, getJarClasses, getJavaCommand, getKnownLicense, getLicenses, getMavenCommand, getMillCommand, getMvnMetadata, getNpmMetadata, getNugetMetadata, getOSPackageForFile, getPipFrozenTree, getPipTreeForPackages, getPomPropertiesFromMavenDir, getPropertyGroupTextNodes, getPyMetadata, getPyModules, getPythonCommand, getRecordedActivities, getRepoLicense, getRuntimeInformation, getSwiftPackageMetadata, getTimestamp, getTmpDir, getVersionNumPnpm, guessLicenseId, guessPypiMatchingVersion, hasAnyProjectType, hasDangerousUnicode, identifyFlow, includeMavenTestScope, inferJarGroupFromManifest, isAllowedHttpHost, isBun, isDeno, isDryRun, isDryRunError, isFeatureEnabled, isMac, isNode, isPackageManagerAllowed, isPartialTree, isSecureMode, isSensitiveEnvironmentVariableName, isSpdxLicenseExpression, isValidDriveRoot, isValidIriReference, isWin, JAVA_CMD, LEIN_CMD, locateGenericPackage, MAX_BUFFER, mapConanPkgRefToPurlStringAndNameAndVersion, metadata_cache, multiChecksumFile, NODE_CMD, NPM_CMD, PACKAGE_MANAGER_ALIASES, PREFER_MAVEN_DEPS_TREE, PROJECT_TYPE_ALIASES, PYTHON_CMD, PYTHON_EXCLUDED_COMPONENTS, parseBazelActionGraph, parseBazelBuild, parseBazelSkyframe, parseBdistMetadata, parseBitbucketPipelinesFile, parseBowerJson, parseCabalData, parseCargoAuditableData, parseCargoData, parseCargoDependencyData, parseCargoManifestDependencyData, parseCargoTomlData, parseCljDep, parseCloudBuildData, parseCmakeDotFile, parseCmakeLikeFile, parseCocoaDependency, parseColliderLockData, parseComposerJson, parseComposerLock, parseConanData, parseConanLockData, parseContainerFile, parseContainerSpecData, parseCsPkgData, parseCsPkgLockData, parseCsProjAssetsData, parseCsProjData, parseCUsageSlice, parseEdnData, parseFlakeLock, parseFlakeNix, parseGitHubWorkflowData, parseGoListDep, parseGoModData, parseGoModGraph, parseGoModulesTxt, parseGoModWhy, parseGopkgData, parseGosumData, parseGoVersionData, parseHelmYamlData, parseJarManifest, parseKVDep, parseLeinDep, parseLeiningenData, parseLeinMap, parseLicenseEntryOrArrayFromPomXml, parseMakeDFile, parseMavenArgs, parseMavenTree, parseMavenTreeJson, parseMillDependency, parseMinJs, parseMixLockData, parseMojoProject, parseNodeShrinkwrap, parseNupkg, parseNuspecData, parseOpenapiSpecData, parsePackageJsonName, parsePaketLockData, parsePiplockData, parsePixiLockFile, parsePixiTomlFile, parsePkgJson, parsePkgLock, parsePnpmLock, parsePnpmWorkspace, parsePodfileLock, parsePodfileTargets, parsePom, parsePomProperties, parsePomXml, parsePrivadoFile, parsePubLockData, parsePubYamlData, parsePyLockData, parsePyProjectTomlFile, parsePyRequiresDist, parseReqEnvMarkers, parseReqFile, parseSetupPyFile, parseSwiftJsonTree, parseSwiftJsonTreeObject, parseSwiftResolved, parseYarnLock, parseYarnWorkspace, pnpmMetadata, purlFromUrlString, RUBY_CMD, RUSTC_CMD, readEnvironmentVariable, readLicenseText, readZipEntry, recomputeScope, recordActivity, recordDecisionActivity, recordDiscoveryActivity, recordEnvironmentRead, recordObservedActivity, recordPolicyActivity, recordSensitiveFileRead, recordSymlinkResolution, recurseImageNameLookup, remoteHostsAccessed, repoMetadataToGitHubApiUrl, resetActivityContext, resetRecordedActivities, retrieveCdxgenPluginVersion, retrieveCdxgenVersion, SEARCH_MAVEN_ORG, SWIFT_CMD, safeCopyFileSync, safeExistsSync, safeExtractArchive, safeMkdirSync, safeMkdtempSync, safeRmSync, safeSpawnSync, safeUnlinkSync, safeWriteSync, setActivityContext, setDryRunMode, shouldFetchLicense, shouldFetchPackageMetadata, shouldFetchVCS, shouldRunPredictiveBomAudit, splitCommandArgs, TABLE_BORDER_STYLE, TIMEOUT_MS, toCamel, toGitHubApiUrl, trimJarGroupSuffix, YARN_CMD, yarnLockToIdentMap, };
|
|
41
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/utils.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,kCAAkC,EAClC,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,OAAO,EACP,UAAU,EACV,cAAc,EACd,aAAa,EACb,OAAO,EACP,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,0BAA0B,EAC1B,cAAc,EACd,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,QAAQ,EACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,g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B,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zig transitive dependency resolver.
|
|
3
|
+
*
|
|
4
|
+
* Zig has no central registry. A dependency is a content-addressed archive
|
|
5
|
+
* whose identity is its `.hash`. The same hash string is used as a filesystem
|
|
6
|
+
* lookup key across every Zig version — only the container differs (in-tree
|
|
7
|
+
* `zig-pkg/` directory, extracted cache directory, or cache `.tar.gz`
|
|
8
|
+
* archive). This module walks the full dependency graph by locating each
|
|
9
|
+
* dependency's `build.zig.zon` through those containers, then emits a flat
|
|
10
|
+
* component list plus a CycloneDX `dependencies[]` edge list.
|
|
11
|
+
*
|
|
12
|
+
* Resolution is a pure filesystem walk keyed on hashes already present in the
|
|
13
|
+
* manifests. No subprocess, no network, no toolchain. Populating the cache
|
|
14
|
+
* (`zig build --fetch`) is the user's job.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Validate a Zig `.hash` string against the two known encodings before it is
|
|
18
|
+
* used to build a filesystem path.
|
|
19
|
+
*
|
|
20
|
+
* A `.hash` is attacker-controlled data from a manifest. Joining it blindly
|
|
21
|
+
* into `<cache>/p/<hash>/build.zig.zon` would let a `../` in the hash escape
|
|
22
|
+
* the cache directory. The two legal encodings never contain path separators
|
|
23
|
+
* or `..` segments, so any hash that does not match one of them is refused
|
|
24
|
+
* before the filesystem is touched.
|
|
25
|
+
*
|
|
26
|
+
* The two forms are:
|
|
27
|
+
* 1. 0.14+ — `<name>-<version>-<base64url digest>` where the digest uses
|
|
28
|
+
* `[A-Za-z0-9_-]`.
|
|
29
|
+
* 2. Pre-0.14 — hex multihash, all hex digits (at least 4 characters).
|
|
30
|
+
*
|
|
31
|
+
* @param {string|undefined} hash Hash field value from the manifest
|
|
32
|
+
* @returns {boolean} `true` only when the hash matches a known Zig encoding
|
|
33
|
+
*/
|
|
34
|
+
export declare function isValidZigHash(hash: string | undefined): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the Zig global package cache directory.
|
|
37
|
+
*
|
|
38
|
+
* Order: `ZIG_GLOBAL_CACHE_DIR`, then `$XDG_CACHE_HOME/zig`, then
|
|
39
|
+
* `~/.cache/zig` on Linux **and macOS** (macOS uses `~/.cache/zig`, *not*
|
|
40
|
+
* `Library/Caches` — confirmed empirically), then `%LOCALAPPDATA%\zig` on
|
|
41
|
+
* Windows.
|
|
42
|
+
*
|
|
43
|
+
* @returns {string|null} Absolute cache directory path, or null when it cannot
|
|
44
|
+
* be determined
|
|
45
|
+
*/
|
|
46
|
+
export declare function getZigGlobalCacheDir(): string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Walk the full Zig dependency graph starting from a root `build.zig.zon`,
|
|
49
|
+
* returning a flat component list and a CycloneDX `dependencies[]` edge list.
|
|
50
|
+
*
|
|
51
|
+
* For each dependency carrying a `.hash`, the resolver locates the
|
|
52
|
+
* dependency's own `build.zig.zon` and recurses. Hashes are memoised so
|
|
53
|
+
* diamond dependencies do not re-read manifests.
|
|
54
|
+
*
|
|
55
|
+
* Unresolvable hashes (cache not populated) degrade gracefully: the component
|
|
56
|
+
* still appears with no outgoing edges, and the count is returned so callers
|
|
57
|
+
* can report a partial graph.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} rootZonFile Absolute path to the root `build.zig.zon`
|
|
60
|
+
* @param {string} projectRoot The project scan root
|
|
61
|
+
* @param {object} [_options] CLI options (reserved for future use)
|
|
62
|
+
* @returns {Promise<{ pkgList: object[], dependencies: object[], parentComponent: object, unresolvedCount: number }>}
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveZigGraph(rootZonFile: string, projectRoot: string, _options?: object): Promise<{
|
|
65
|
+
pkgList: object[];
|
|
66
|
+
dependencies: object[];
|
|
67
|
+
parentComponent: object;
|
|
68
|
+
unresolvedCount: number;
|
|
69
|
+
}>;
|
|
70
|
+
//# sourceMappingURL=zigResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zigResolver.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/zigResolver.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;GAcG;AAMH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAHxB,MAAM,GAAC,SAGiB,GAFtB,OAAO,CAoBnB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,IAHvB,MAAM,GAAC,IAAI,CAwBvB;AA4LD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CAAC,WAAW,EALtC,MAKsC,EAAE,WAAW,EAJnD,MAImD,EAAE,QAAQ,AAHrE,CACA,EADQ,MAGkE,GAFhE,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAAC,CAsGpH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create or load the in-memory Namespaces, Usages, and DataFlows models.
|
|
3
|
+
*
|
|
4
|
+
* Initialises each model and returns a sequelize-like handle along with the
|
|
5
|
+
* model references used by evinse for persisting slice evidence.
|
|
6
|
+
*
|
|
7
|
+
* @returns {Promise<{ sequelize: { close: () => boolean }, Namespaces: Object, Usages: Object, DataFlows: Object }>}
|
|
8
|
+
*/
|
|
9
|
+
export declare const createOrLoad: () => Promise<{
|
|
10
|
+
sequelize: {
|
|
11
|
+
close: () => boolean;
|
|
12
|
+
};
|
|
13
|
+
Namespaces: Object;
|
|
14
|
+
Usages: Object;
|
|
15
|
+
DataFlows: Object;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=db.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../lib/evinser/db.js"],"names":[],"mappings":"AAmHA;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,QAFZ,OAAO,CAAC;IAAE,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,OAAO,CAAA;KAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAuBlH,CAAC"}
|