@cdxgen/cdxgen 13.0.1 → 13.2.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 +30 -16
- package/bin/audit.js +6 -0
- package/bin/cdxgen.js +141 -7
- package/bin/evinse.js +3 -1
- package/data/component-tags.json +8 -1
- package/data/crypto-oid.json +88 -12
- package/data/frameworks-list.json +86 -1
- package/data/remediations.json +1167 -0
- package/data/rules/ai-bom.yaml +78 -0
- package/data/rules/asar-archives.yaml +1 -1
- package/data/rules/build-fidelity.yaml +782 -0
- package/data/rules/cargo-rust.yaml +132 -0
- package/data/rules/mcp-servers.yaml +122 -0
- package/data/rules/package-integrity.yaml +13 -13
- package/lib/audit/index.js +48 -4
- package/lib/audit/scoring.js +2 -8
- package/lib/audit/targets.js +6 -1
- package/lib/cli/bomAssembly.js +32 -1
- package/lib/cli/cliOptions.js +94 -7
- package/lib/cli/index.js +268 -49
- package/lib/cli/jsBom.js +91 -5
- package/lib/cli/jvmBom.js +1515 -1314
- package/lib/cli/managedBom.js +249 -28
- package/lib/cli/nativeBom.js +986 -10
- package/lib/core/activity.js +120 -2
- package/lib/core/buildLedger.js +799 -0
- package/lib/core/deferredExit.js +141 -0
- package/lib/core/env.js +108 -2
- package/lib/core/fs.js +60 -0
- package/lib/core/logger.js +12 -99
- package/lib/core/severity.js +16 -0
- package/lib/core/syncFileWriter.js +106 -0
- package/lib/core/userAgent.js +151 -0
- package/lib/ecosystems/cargoCache.js +364 -0
- package/lib/ecosystems/caxa.js +13 -5
- package/lib/ecosystems/cppEvidence.js +40 -2
- package/lib/ecosystems/ecosystems.js +250 -91
- package/lib/ecosystems/golem.js +11 -1
- package/lib/ecosystems/gradleutils.js +498 -17
- package/lib/ecosystems/kosi.js +1256 -0
- package/lib/ecosystems/parsers-crystal.js +179 -0
- package/lib/ecosystems/parsers-dotnet.js +69 -39
- package/lib/ecosystems/parsers-elm.js +816 -0
- package/lib/ecosystems/parsers-gleam.js +1 -1
- package/lib/ecosystems/parsers-js.js +26 -0
- package/lib/ecosystems/parsers-julia.js +268 -0
- package/lib/ecosystems/parsers-jvm.js +9 -0
- package/lib/ecosystems/parsers-lua.js +218 -0
- package/lib/ecosystems/parsers-misc.js +188 -2
- package/lib/ecosystems/parsers-nim.js +221 -0
- package/lib/ecosystems/parsers-opam.js +180 -0
- package/lib/ecosystems/parsers-perl.js +277 -0
- package/lib/ecosystems/parsers-python.js +172 -36
- package/lib/ecosystems/parsers-r.js +148 -0
- package/lib/ecosystems/parsers-rebar.js +411 -0
- package/lib/ecosystems/parsers-rust.js +944 -19
- package/lib/ecosystems/parsers-spack.js +204 -0
- package/lib/ecosystems/parsers-stack.js +264 -0
- package/lib/ecosystems/parsers-terraform.js +194 -0
- package/lib/ecosystems/pypiClassifiers.js +326 -0
- package/lib/ecosystems/pythonutils.js +49 -1
- package/lib/ecosystems/rubyutils.js +13 -0
- package/lib/ecosystems/rusi.js +126 -6
- package/lib/evinser/evinser.js +141 -13
- package/lib/helpers/agenticToolutils.js +925 -0
- package/lib/helpers/remote/dependency-track.js +81 -14
- package/lib/inventory/agentFormulationParser.js +57 -4
- package/lib/inventory/aiCollector.js +504 -10
- package/lib/inventory/aiInventory.js +12 -0
- package/lib/inventory/analyzer.js +488 -30
- package/lib/inventory/astWorker.js +6 -0
- package/lib/inventory/auditCategories.js +17 -0
- package/lib/inventory/cbomutils.js +30 -0
- package/lib/inventory/cdxrs.js +7 -2
- package/lib/inventory/communityAiConfigParser.js +215 -2
- package/lib/inventory/depsUtils.js +72 -0
- package/lib/inventory/dosai.js +508 -22
- package/lib/inventory/envcontext.js +215 -24
- package/lib/inventory/evidenceUtils.js +13 -0
- package/lib/inventory/fetchBatch.js +131 -2
- package/lib/inventory/fetchRate.js +74 -11
- package/lib/inventory/forgeEnricher.js +3 -2
- package/lib/inventory/jvmToolEnv.js +594 -0
- package/lib/inventory/mcpConfigParser.js +166 -2
- package/lib/inventory/mcpDiscovery.js +11 -0
- package/lib/inventory/mcpServerManifest.js +389 -0
- package/lib/inventory/mcpbBundle.js +419 -0
- package/lib/inventory/osinfo.js +1 -0
- package/lib/inventory/plugins.js +3 -0
- package/lib/inventory/protobom.js +54 -88
- package/lib/inventory/protobomLoader.js +4 -0
- package/lib/inventory/rustFormulationParser.js +1 -1
- package/lib/inventory/source.js +10 -4
- package/lib/inventory/stylePackageRefs.js +41 -0
- package/lib/inventory/svelteUtils.js +524 -0
- package/lib/inventory/toolRequirements.js +903 -0
- package/lib/managers/binary.js +24 -0
- package/lib/managers/docker.js +26 -5
- package/lib/parsers/huggingfaceUtils.js +15 -7
- package/lib/parsers/onnx.js +294 -0
- package/lib/parsers/safetensors.js +114 -0
- package/lib/server/server.js +1 -1
- package/lib/stages/postgen/annotationBuilder.js +97 -0
- package/lib/stages/postgen/auditBom.js +76 -79
- package/lib/stages/postgen/introspection/annotate.js +320 -0
- package/lib/stages/postgen/introspection/commandFacts.js +293 -0
- package/lib/stages/postgen/introspection/emit.js +192 -0
- package/lib/stages/postgen/introspection/formulationEvidence.js +427 -0
- package/lib/stages/postgen/introspection/markers.js +250 -0
- package/lib/stages/postgen/introspection/reflect.js +1214 -0
- package/lib/stages/postgen/introspection/report.js +1208 -0
- package/lib/stages/postgen/introspection/score.js +1067 -0
- package/lib/stages/postgen/introspection/shapeCommand.js +304 -0
- package/lib/stages/postgen/parentEdge.js +156 -0
- package/lib/stages/postgen/postgen.js +284 -3
- package/lib/stages/postgen/ruleEngine.js +17 -0
- package/lib/stages/pregen/envAudit.js +42 -2
- package/lib/stages/pregen/pregen.js +1171 -6
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
- package/lib/validator/bomValidator.js +11 -2
- package/package.json +26 -26
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/audit/scoring.d.ts +2 -8
- package/types/lib/audit/scoring.d.ts.map +1 -1
- package/types/lib/audit/targets.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +2 -1
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts +10 -2
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts +23 -0
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts +33 -0
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts +88 -8
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/activity.d.ts.map +1 -1
- package/types/lib/core/buildLedger.d.ts +272 -0
- package/types/lib/core/buildLedger.d.ts.map +1 -0
- package/types/lib/core/deferredExit.d.ts +84 -0
- package/types/lib/core/deferredExit.d.ts.map +1 -0
- package/types/lib/core/env.d.ts +43 -1
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts +21 -0
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/logger.d.ts +2 -11
- package/types/lib/core/logger.d.ts.map +1 -1
- package/types/lib/core/severity.d.ts +11 -0
- package/types/lib/core/severity.d.ts.map +1 -0
- package/types/lib/core/syncFileWriter.d.ts +33 -0
- package/types/lib/core/syncFileWriter.d.ts.map +1 -0
- package/types/lib/core/userAgent.d.ts +56 -0
- package/types/lib/core/userAgent.d.ts.map +1 -0
- package/types/lib/ecosystems/cargoCache.d.ts +75 -0
- package/types/lib/ecosystems/cargoCache.d.ts.map +1 -0
- package/types/lib/ecosystems/caxa.d.ts.map +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts +15 -1
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +53 -0
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts +73 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-crystal.d.ts +27 -0
- package/types/lib/ecosystems/parsers-crystal.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts +19 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-elm.d.ts +79 -0
- package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-julia.d.ts +57 -0
- package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-lua.d.ts +50 -0
- package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-misc.d.ts +23 -0
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-nim.d.ts +43 -0
- package/types/lib/ecosystems/parsers-nim.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-opam.d.ts +31 -0
- package/types/lib/ecosystems/parsers-opam.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-perl.d.ts +36 -0
- package/types/lib/ecosystems/parsers-perl.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-r.d.ts +35 -0
- package/types/lib/ecosystems/parsers-r.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-rebar.d.ts +42 -0
- package/types/lib/ecosystems/parsers-rebar.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-rust.d.ts +199 -0
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-spack.d.ts +33 -0
- package/types/lib/ecosystems/parsers-spack.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-stack.d.ts +35 -0
- package/types/lib/ecosystems/parsers-stack.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-terraform.d.ts +34 -0
- package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -0
- package/types/lib/ecosystems/pypiClassifiers.d.ts +80 -0
- package/types/lib/ecosystems/pypiClassifiers.d.ts.map +1 -0
- package/types/lib/ecosystems/pythonutils.d.ts +21 -1
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +34 -1
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/helpers/agenticToolutils.d.ts +87 -0
- package/types/lib/helpers/agenticToolutils.d.ts.map +1 -0
- package/types/lib/helpers/remote/dependency-track.d.ts +45 -4
- package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
- package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/aiInventory.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +12 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/cbomutils.d.ts.map +1 -1
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/depsUtils.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +43 -0
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +43 -0
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/fetchRate.d.ts +9 -6
- package/types/lib/inventory/fetchRate.d.ts.map +1 -1
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
- package/types/lib/inventory/jvmToolEnv.d.ts +190 -0
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -1
- package/types/lib/inventory/mcpServerManifest.d.ts +19 -0
- package/types/lib/inventory/mcpServerManifest.d.ts.map +1 -0
- package/types/lib/inventory/mcpbBundle.d.ts +19 -0
- package/types/lib/inventory/mcpbBundle.d.ts.map +1 -0
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/plugins.d.ts.map +1 -1
- package/types/lib/inventory/protobom.d.ts +18 -13
- package/types/lib/inventory/protobom.d.ts.map +1 -1
- package/types/lib/inventory/protobomLoader.d.ts.map +1 -1
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/stylePackageRefs.d.ts +17 -0
- package/types/lib/inventory/stylePackageRefs.d.ts.map +1 -0
- package/types/lib/inventory/svelteUtils.d.ts +124 -0
- package/types/lib/inventory/svelteUtils.d.ts.map +1 -0
- package/types/lib/inventory/toolRequirements.d.ts +216 -0
- package/types/lib/inventory/toolRequirements.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
- package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
- package/types/lib/parsers/onnx.d.ts +28 -0
- package/types/lib/parsers/onnx.d.ts.map +1 -0
- package/types/lib/parsers/safetensors.d.ts +22 -0
- package/types/lib/parsers/safetensors.d.ts.map +1 -0
- package/types/lib/stages/postgen/annotationBuilder.d.ts +53 -0
- package/types/lib/stages/postgen/annotationBuilder.d.ts.map +1 -0
- package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/annotate.d.ts +81 -0
- package/types/lib/stages/postgen/introspection/annotate.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/commandFacts.d.ts +32 -0
- package/types/lib/stages/postgen/introspection/commandFacts.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/emit.d.ts +71 -0
- package/types/lib/stages/postgen/introspection/emit.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts +154 -0
- package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/markers.d.ts +58 -0
- package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/reflect.d.ts +77 -0
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/report.d.ts +85 -0
- package/types/lib/stages/postgen/introspection/report.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/score.d.ts +149 -0
- package/types/lib/stages/postgen/introspection/score.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/shapeCommand.d.ts +79 -0
- package/types/lib/stages/postgen/introspection/shapeCommand.d.ts.map +1 -0
- package/types/lib/stages/postgen/parentEdge.d.ts +35 -0
- package/types/lib/stages/postgen/parentEdge.d.ts.map +1 -0
- package/types/lib/stages/postgen/postgen.d.ts +35 -2
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +131 -0
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The purl type used for installed agentic CLI tools. These tools ship as
|
|
3
|
+
* self-contained executables rather than as a resolvable source package, so a
|
|
4
|
+
* `pkg:generic/...` identifier is the honest representation.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AGENTIC_TOOL_PURL_TYPE = "generic";
|
|
7
|
+
/**
|
|
8
|
+
* Rewrite an absolute path under the user's home directory to a `~`-relative
|
|
9
|
+
* form so the emitted BOM does not carry the local username.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} filePath Absolute path
|
|
12
|
+
* @returns {string} Home-relative path when applicable, else the input
|
|
13
|
+
*/
|
|
14
|
+
export declare function redactHomePath(filePath: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Describe where each supported agentic CLI tool stores its per-user state.
|
|
17
|
+
*
|
|
18
|
+
* Each entry lists the tool key, a display name, and the candidate home
|
|
19
|
+
* directories per platform (mirroring how `getIdeExtensionDirs` models IDE
|
|
20
|
+
* extension locations). Only the current platform's directories plus
|
|
21
|
+
* always-present dot-directories are included.
|
|
22
|
+
*
|
|
23
|
+
* @returns {Array<{tool: string, name: string, dirs: string[], supportDirs?: string[]}>}
|
|
24
|
+
* One entry per known agentic CLI tool.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAgenticToolDirs(): Array<{
|
|
27
|
+
tool: string;
|
|
28
|
+
name: string;
|
|
29
|
+
dirs: string[];
|
|
30
|
+
supportDirs?: string[];
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Discover which agentic CLI tools are installed for the current user by
|
|
34
|
+
* checking their known home directories.
|
|
35
|
+
*
|
|
36
|
+
* @returns {Array<{tool: string, name: string, dir: string, supportDir?: string}>}
|
|
37
|
+
* One entry per discovered tool, using the first existing directory.
|
|
38
|
+
*/
|
|
39
|
+
export declare function discoverAgenticTools(): Array<{
|
|
40
|
+
tool: string;
|
|
41
|
+
name: string;
|
|
42
|
+
dir: string;
|
|
43
|
+
supportDir?: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Compute safe, redacted signal counts for a discovered tool. Only structural
|
|
47
|
+
* counts and small enumerated values are returned; no credential, transcript,
|
|
48
|
+
* or telemetry content is read.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} tool Tool key
|
|
51
|
+
* @param {string} dir Discovered tool home directory
|
|
52
|
+
* @param {string} [supportDir] Optional platform support directory
|
|
53
|
+
* @returns {Object} Map of signal name to count/boolean/small-string value
|
|
54
|
+
*/
|
|
55
|
+
export declare function collectToolSignals(tool: string, dir: string, supportDir?: string): Object;
|
|
56
|
+
/**
|
|
57
|
+
* Build a CycloneDX application component for one discovered agentic tool.
|
|
58
|
+
*
|
|
59
|
+
* @param {{tool: string, name: string, dir: string, supportDir?: string}} entry
|
|
60
|
+
* Discovered tool entry
|
|
61
|
+
* @returns {Object} CycloneDX component
|
|
62
|
+
*/
|
|
63
|
+
export declare function componentForAgenticTool(entry: {
|
|
64
|
+
tool: string;
|
|
65
|
+
name: string;
|
|
66
|
+
dir: string;
|
|
67
|
+
supportDir?: string;
|
|
68
|
+
}): Object;
|
|
69
|
+
/**
|
|
70
|
+
* Discover installed agentic CLI tools on the current host and return CycloneDX
|
|
71
|
+
* components describing each one, plus the child agents, plugins, and providers
|
|
72
|
+
* they define and the dependency edges linking children to their tool.
|
|
73
|
+
*
|
|
74
|
+
* This host scan is unconditional: it does not consult scan filters such as
|
|
75
|
+
* `--exclude` or profile/technique options, because it inventories fixed tool
|
|
76
|
+
* home directories rather than a project tree. The `options` argument is
|
|
77
|
+
* accepted for signature parity and is intentionally not used to alter results.
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} [options={}] Collection options (accepted but not applied)
|
|
80
|
+
* @returns {{components: Object[], services: Object[], dependencies: Object[]}} Discovered inventory
|
|
81
|
+
*/
|
|
82
|
+
export declare function collectAgenticTools(_options?: {}): {
|
|
83
|
+
components: Object[];
|
|
84
|
+
services: Object[];
|
|
85
|
+
dependencies: Object[];
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=agenticToolutils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agenticToolutils.d.ts","sourceRoot":"","sources":["../../../lib/helpers/agenticToolutils.js"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YAAY,CAAC;AA8BhD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B,MAAM,CAgBlB;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,IAHrB,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CAyGvF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAHvB,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAgBjF;AAoUD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAK4B,EAAE,GAAG,EAJjC,MAIiC,EAAE,UAAU,AAHrD,CACA,EADQ,MAG6C,GAF3C,MAAM,CAkClB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAJlC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAI3B,GAFhC,MAAM,CA8ClB;AA0OD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,KAAK,GAFpC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAoC9E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
1
2
|
/**
|
|
2
3
|
* Returns the Dependency-Track BOM API URL as a sanitized URL object.
|
|
3
4
|
*
|
|
@@ -13,11 +14,51 @@ export declare function getDependencyTrackBomApiUrl(serverUrl: string): URL | un
|
|
|
13
14
|
*/
|
|
14
15
|
export declare function getDependencyTrackBomUrl(serverUrl: string): string | undefined;
|
|
15
16
|
/**
|
|
16
|
-
* Build the
|
|
17
|
+
* Build the form fields for a Dependency-Track BOM submission.
|
|
18
|
+
*
|
|
19
|
+
* Field names follow the `multipart/form-data` variant of `/api/v1/bom`, which differs
|
|
20
|
+
* from the JSON variant: the JSON body calls the flag `isLatestProjectVersion` and takes
|
|
21
|
+
* `projectTags` as an array of objects, while the form takes `isLatest` and a
|
|
22
|
+
* comma-separated tag list.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} args CLI/server arguments
|
|
25
|
+
* @returns {Object | undefined} field map if the project coordinates are valid
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildDependencyTrackBomPayload(args: Object): Object | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Encode text fields and a single file part as a `multipart/form-data` body.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} fields Text fields keyed by field name
|
|
32
|
+
* @param {Object} file File part
|
|
33
|
+
* @param {string} file.name Field name of the file part
|
|
34
|
+
* @param {string} file.filename File name reported to the server
|
|
35
|
+
* @param {string} file.contentType Content type of the file part
|
|
36
|
+
* @param {Buffer} file.content File content
|
|
37
|
+
* @returns {{ body: Buffer, contentType: string }} encoded body and its content type
|
|
38
|
+
*/
|
|
39
|
+
export declare function encodeMultipartFormData(fields: Object, file: {
|
|
40
|
+
name: string;
|
|
41
|
+
filename: string;
|
|
42
|
+
contentType: string;
|
|
43
|
+
content: Buffer;
|
|
44
|
+
}): {
|
|
45
|
+
body: Buffer;
|
|
46
|
+
contentType: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Build the `multipart/form-data` request for Dependency-Track BOM submission.
|
|
50
|
+
*
|
|
51
|
+
* The JSON variant of the endpoint carries the BOM as a base64 string, which Jackson
|
|
52
|
+
* refuses to read beyond 20,000,000 characters - roughly a 15 MB BOM, which container
|
|
53
|
+
* image scans exceed routinely. The form variant carries the BOM as a file part and has
|
|
54
|
+
* no such limit, and is what the server recommends for large uploads.
|
|
17
55
|
*
|
|
18
56
|
* @param {Object} args CLI/server arguments
|
|
19
|
-
* @param {Object} bomContents BOM Json
|
|
20
|
-
* @returns {
|
|
57
|
+
* @param {Object | string} bomContents BOM Json
|
|
58
|
+
* @returns {{ body: Buffer, contentType: string } | undefined} request body and content type if the arguments are valid
|
|
21
59
|
*/
|
|
22
|
-
export declare function
|
|
60
|
+
export declare function buildDependencyTrackBomRequest(args: Object, bomContents: Object | string): {
|
|
61
|
+
body: Buffer;
|
|
62
|
+
contentType: string;
|
|
63
|
+
} | undefined;
|
|
23
64
|
//# sourceMappingURL=dependency-track.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-track.d.ts","sourceRoot":"","sources":["../../../../lib/helpers/remote/dependency-track.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dependency-track.d.ts","sourceRoot":"","sources":["../../../../lib/helpers/remote/dependency-track.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAH1C,MAG0C,GAFxC,GAAG,GAAG,SAAS,CAyB3B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,GAAG,SAAS,CAI9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAHxC,MAGwC,GAFtC,MAAM,GAAG,SAAS,CA6D9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EARnC,MAQmC,EAAE,IAAI,EANjD;IAAqB,IAAI,EAAjB,MAAM,CACd;IAAqB,QAAQ,EAArB,MAAM,CACd;IAAqB,WAAW,EAAxB,MAAM,CACd;IAAqB,OAAO,EAApB,MAAM,CACd;CAEiD,GAFvC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAyBjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAJxC,MAIwC,EAAE,WAAW,EAHrD,MAAM,GAAG,MAG4C,GAFnD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAmB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/agentFormulationParser.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agentFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/agentFormulationParser.js"],"names":[],"mappings":"AA4LA;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;CAsLlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiCollector.d.ts","sourceRoot":"","sources":["../../../lib/inventory/aiCollector.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aiCollector.d.ts","sourceRoot":"","sources":["../../../lib/inventory/aiCollector.js"],"names":[],"mappings":"AAo8DA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAJvC,MAIuC,EAAE,OAAO,AAHxD,CACA,EADQ,MAGqD,GAFnD;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA2YhF;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,aAAa,EAJpD,MAIoD,EAAE,OAAO,AAHrE,CACA,EADQ,MAGkE,GAFhE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAiMhF;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAQhF;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAQhF;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,aAAa,EAJjD,MAIiD,EAAE,OAAO,AAHlE,CACA,EADQ,MAG+D,GAF7D;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAQhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiInventory.d.ts","sourceRoot":"","sources":["../../../lib/inventory/aiInventory.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aiInventory.d.ts","sourceRoot":"","sources":["../../../lib/inventory/aiInventory.js"],"names":[],"mappings":"AAgBA,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,UAA4B,CAAC;AACpE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,aAapC,CAAC;AACH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAqEjD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAJnC,MAImC,EAAE,IAAI,EAHzC,MAGyC,GAFvC,MAAM,GAAC,SA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vB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CA+BH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../lib/inventory/analyzer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../lib/inventory/analyzer.js"],"names":[],"mappings":"AA2sDA;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAJ3B,MAAM,QACN,MAAM,KACJ;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAO7C,CAAC;AAoqBF;;;GAGG;AACH,eAAO,MAAM,wCAAwC,UAQpD,CAAC;AA4JF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,UAQpC,CAAC;AA+JF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAHrC,MAGqC,GAFnC;IAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAC,CA2J/H;AA2hBD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;EAuGhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,aAHzB,MAAM,KACJ;IAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,qBAAqB,EAAE,MAAM,EAAE,CAAA;CAe9H,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAHvC,MAGuC,GAFrC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC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,MAAM,SACN,OAAO,KACL;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAqrB7E,CAAC"}
|
|
@@ -6,6 +6,16 @@ export declare const CBOM_AUDIT_CATEGORIES: readonly string[];
|
|
|
6
6
|
export declare const HOST_TOPOLOGY_AUDIT_CATEGORIES: readonly string[];
|
|
7
7
|
/** Frozen list of Golem (Go Evinse) audit categories. */
|
|
8
8
|
export declare const GOLEM_AUDIT_CATEGORIES: readonly string[];
|
|
9
|
+
/** Frozen list of Cargo (Rust) audit categories. */
|
|
10
|
+
export declare const CARGO_AUDIT_CATEGORIES: readonly string[];
|
|
11
|
+
/**
|
|
12
|
+
* Frozen list of audit categories that never activate on their own. These
|
|
13
|
+
* rule packs serve a specific feature (`--introspect` for build-fidelity) and
|
|
14
|
+
* stay inactive unless the caller explicitly requests the category, so a
|
|
15
|
+
* default `--bom-audit` run - which evaluates every loaded rule - cannot pick
|
|
16
|
+
* them up.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OPT_IN_BOM_AUDIT_CATEGORIES: readonly string[];
|
|
9
19
|
/** Frozen list of AI-bill-of-materials audit categories. */
|
|
10
20
|
export declare const AI_BOM_AUDIT_CATEGORIES: readonly string[];
|
|
11
21
|
/** Comma-separated default HBOM category string used when none is specified. */
|
|
@@ -20,10 +30,12 @@ export declare const BOM_AUDIT_CATEGORY_ALIASES: Readonly<{
|
|
|
20
30
|
"ai-bom": string[];
|
|
21
31
|
"ai-provenance": string[];
|
|
22
32
|
"ai-oversight": string[];
|
|
33
|
+
cargo: string[];
|
|
23
34
|
cbom: string[];
|
|
24
35
|
"crypto-bom": string[];
|
|
25
36
|
golem: string[];
|
|
26
37
|
hbom: string[];
|
|
38
|
+
rust: string[];
|
|
27
39
|
host: string[];
|
|
28
40
|
}>;
|
|
29
41
|
/**
|
|
@@ -1 +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
|
|
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,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,mBAGjC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,mBAAoC,CAAC;AAE7E,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,mBAIlC,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,QAAkC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;EAarC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cbomutils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cbomutils.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,EAAE,gBAAgB,KAAA,SAiC5D;
|
|
1
|
+
{"version":3,"file":"cbomutils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cbomutils.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,EAAE,gBAAgB,KAAA,SAiC5D;AAiXD;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,EAL5C,MAK4C,EAAE,OAAO,AAJ7D,CAEA,EADA;IAA0B,IAAI,AAA9B,CACA,EADQ,OAAO,CACf;CAEkE,GAFxD,OAAO,CAAC,MAAM,EAAE,CAAC,CAkD7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAAC,GAAG,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC,MAAM,EAAE,CAAC,CAuG7B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAHzB,MAGyB,SAanC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communityAiConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/communityAiConfigParser.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"communityAiConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/communityAiConfigParser.js"],"names":[],"mappings":"AA21BA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAL1B,MAsGT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depsUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/depsUtils.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EANH,MAAM,EAMH,EACZ,eAAe,EANN,MAAM,EAMA,EACf,eAAe,GANN,MAMW,GALT,MAAM,EAAE,CAuEpB;AA4CD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,GAH9C,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAYpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,GALD,MAAM,EAKA,EACf,YAAY,GALH,MAAM,EAKE,GAJN,MAAM,EAAE,CA8DpB;
|
|
1
|
+
{"version":3,"file":"depsUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/depsUtils.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EANH,MAAM,EAMH,EACZ,eAAe,EANN,MAAM,EAMA,EACf,eAAe,GANN,MAMW,GALT,MAAM,EAAE,CAuEpB;AA4CD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,GAH9C,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAYpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,GALD,MAAM,EAKA,EACf,YAAY,GALH,MAAM,EAKE,GAJN,MAAM,EAAE,CA8DpB;AA0FD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAJ3B,MAAM,EAAE,GAAC,MAIkB,EAAE,WAAW,EAHxC,MAAM,EAAE,GAAC,MAG+B,GAFtC,MAAM,EAAE,CAqFpB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,OAAA,SAoIxC;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAH7C,MAAM,EAAE,GAAG,SAAS,GAAG,IAGsB,GAF3C,MAAM,EAAE,CA0CpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,YAAY,OAAA,EAAE,eAAe,SAAI,WAsB9D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,OAAA,EAAE,YAAY,OAAA,SAgCnD"}
|
|
@@ -86,6 +86,29 @@ export declare function buildPurlAliasMap(components?: Object[]): Map<string, st
|
|
|
86
86
|
* @returns {string|undefined} Canonical component purl, the input purl when unaliased, or undefined when empty
|
|
87
87
|
*/
|
|
88
88
|
export declare function resolveComponentPurl(purl: string, purlAliasMap: Map<string, string>): string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Copy one dosai PackageReachability fact onto a component as properties.
|
|
91
|
+
*
|
|
92
|
+
* The occurrence/location consumers of PackageReachability read SourceLocations, EdgeIds,
|
|
93
|
+
* and NodeIds only, so dosai's Confidence, EvidenceKinds, ReachabilityKind, and
|
|
94
|
+
* ConfidenceReasons never reached the BOM: an unbuilt tree (Low confidence, unresolved
|
|
95
|
+
* evidence) was indistinguishable from a package that really is only imported. These
|
|
96
|
+
* properties carry that distinction to BOM consumers. They use the consumer-facing
|
|
97
|
+
* `cdx:dosai:reachability:*` namespace - not `internal:`, which is cdxgen's private
|
|
98
|
+
* bookkeeping namespace stripped or ignored by downstream tooling.
|
|
99
|
+
*
|
|
100
|
+
* @param {Object} component BOM component object (mutated; properties created on demand)
|
|
101
|
+
* @param {Object} reachability dosai PackageReachability entry
|
|
102
|
+
*/
|
|
103
|
+
export declare function addDosaiReachabilityProperties(component: Object, reachability: Object): void;
|
|
104
|
+
/**
|
|
105
|
+
* Attach dosai PackageReachability confidence facts to matching BOM components.
|
|
106
|
+
*
|
|
107
|
+
* @param {Object} methodsSlice Parsed dosai methods slice JSON
|
|
108
|
+
* @param {Object[]} [components] BOM components used to resolve purl aliases and mutate
|
|
109
|
+
* @returns {number} Number of distinct components enriched
|
|
110
|
+
*/
|
|
111
|
+
export declare function applyDosaiReachabilityEvidence(methodsSlice: Object, components?: Object[]): number;
|
|
89
112
|
/**
|
|
90
113
|
* Map a dosai methods slice to per-purl occurrence evidence.
|
|
91
114
|
*
|
|
@@ -108,6 +131,26 @@ export declare function collectDosaiPurlEvidence(methodsSlice: Object, component
|
|
|
108
131
|
* @returns {Object} Map of canonical purl to arrays of call-stack frame objects
|
|
109
132
|
*/
|
|
110
133
|
export declare function collectDosaiDataFlowFrames(dataFlowResult: Object, components?: Object[]): Object;
|
|
134
|
+
/**
|
|
135
|
+
* Consume dosai's AiComponents[] inventory (schema 4.0.0): model identifiers,
|
|
136
|
+
* on-disk model artifacts with hashes, MCP tools, prompts (redacted), and agents
|
|
137
|
+
* become CycloneDX machine-learning-model / data components with modelCard data.
|
|
138
|
+
*
|
|
139
|
+
* @param {Object} methodsSlice Parsed dosai methods slice JSON
|
|
140
|
+
* @param {Array} [components] Component list to mutate in place
|
|
141
|
+
* @returns {Array} The updated component list
|
|
142
|
+
*/
|
|
143
|
+
export declare function collectDosaiAiComponents(methodsSlice: Object, components?: any[]): any[];
|
|
144
|
+
/**
|
|
145
|
+
* Consume dosai's first-class Services[] inventory (schema 4.0.0) directly: richer
|
|
146
|
+
* than deriving services from ApiEndpoints alone — stable bom-refs, trust zones,
|
|
147
|
+
* data classifications, providers, and per-service evidence occurrences.
|
|
148
|
+
*
|
|
149
|
+
* @param {Object} methodsSlice Parsed dosai methods slice JSON
|
|
150
|
+
* @param {Object} [servicesMap] Map of service key to service definition, mutated in place
|
|
151
|
+
* @returns {Object} The updated services map
|
|
152
|
+
*/
|
|
153
|
+
export declare function collectDosaiServiceComponents(methodsSlice: Object, servicesMap?: Object): Object;
|
|
111
154
|
/**
|
|
112
155
|
* Infer service and endpoint definitions from a dosai methods slice.
|
|
113
156
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AA8LA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC,MAGmC,GAFjC,OAAO,CAInB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAN5B,MAM4B,EAAE,GAAG,EALjC,MAKiC,EAAE,UAAU,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD,OAAO,CAiEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EALhC,MAKgC,EAAE,UAAU,EAJ5C,MAI4C,EAAE,OAAO,AAH7D,CACA,EADQ,MAG0D,GAFxD,OAAO,CAInB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EALjC,MAKiC,EAAE,UAAU,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD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AwB,CAAC,YAAY,EAJ1C,MAI0C,EAAE,UAAU,AAH9D,CACA,OAEmE,SA6FrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAJ/C,MAI+C,EAAE,WAAW,AAHpE,CACA,EADQ,MAGiE,GAF/D,MAAM,CAyKlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EALH,MAKG,EACZ,WAAW,AALV,CACA,EADQ,MAKO,GAJL,MAAM,CA+GlB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,AAHjD,CACA,EADQ,MAG8C,GAF5C,MAAM,EAAE,CA6CpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAkDA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAuCvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAapC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAL3B,MAK2B,EAAE,GAAG,EAJhC,MAIgC,sBAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,sBAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,GAAG,EAJ9B,MAI8B,sBAExC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,MAkBhC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAJlB,MAIkB,SA4B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,IAAI,OAAA,sBAiBvC;AAED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,EAAE,OAAO,AALpC,CAGA,EAFA;IAAyB,GAAG,AAA5B,CACA,EADQ,MAAM,CACd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;CAEyC,GAF/B,KAAK,CAAC,MAAM,CAAC,CA4CzB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAJ9B,MAI8B,EAAE,QAAQ,GAHxC,MAG6C,GAF3C,KAAK,CAAC,MAAM,CAAC,CA+BzB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CA4GlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,WAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,IAF9B,MAAM,GAAC,SAAS,CAc5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"AA6BA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAIsC,EAAE,OAAO,AAHvD,CACA,EADQ,MAGoD,GAFlD,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD,MAAM,GAAC,SAAS,CA8B5B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAHxC,MAGwC,GAFtC,MAAM,CAalB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAJ1B,MAAM,EAAE,GAAC,MAIiB,EAAE,SAAS,UAAA,GAFnC,MAAM,EAAE,CAmDpB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAJjC,MAAM,GAAC,MAAM,EAIoB,EAAE,QAAQ,EAH3C,MAAM,EAGqC,GAFzC,MAAM,GAAC,MAAM,EAAE,CAwB3B;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAJjC,MAAM,EAI2B,EAAE,UAAU,EAH7C,MAG6C,GAF3C,MAAM,EAAE,CAkOpB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EANJ,MAMI,EACb,QAAQ,EANC,MAMD,EACR,OAAO,OAAA,EACP,OAAO,UAAQ,EACf,gBAAgB,YAAY;;;;;;;;;IA6H7B"}
|
|
@@ -95,6 +95,49 @@ export declare function prefetchJson(requests: Array<{
|
|
|
95
95
|
}>, options?: {
|
|
96
96
|
timeoutMs?: number;
|
|
97
97
|
}): Promise<Map<string, BatchEntry>>;
|
|
98
|
+
/**
|
|
99
|
+
* Whether a hostname belongs to crates.io, including its index and CDN hosts.
|
|
100
|
+
*
|
|
101
|
+
* @param {string|null} host Hostname, or null when the URL did not parse.
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
*/
|
|
104
|
+
export declare function isCratesHost(host: string | null): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Whether a host's rate policy lives in the JS table alone and therefore needs
|
|
107
|
+
* every request to pass through the one gate the JS pool holds.
|
|
108
|
+
*
|
|
109
|
+
* @param {string|null} host Hostname, or null when the URL did not parse.
|
|
110
|
+
* @returns {boolean}
|
|
111
|
+
*/
|
|
112
|
+
export declare function isSingleGateHost(host: string | null): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Record the run-level policy or connectivity condition carried by a caught
|
|
115
|
+
* fetch error, if it names one. Shared by the batch retry loop and by the
|
|
116
|
+
* serial enrichment paths that catch and swallow the same typed errors.
|
|
117
|
+
*
|
|
118
|
+
* @param {Error} err Error caught from a `cdxgenAgent` request.
|
|
119
|
+
* @returns {void}
|
|
120
|
+
*/
|
|
121
|
+
export declare function recordPolicyDegradationFromError(err: Error): void;
|
|
122
|
+
/**
|
|
123
|
+
* Run a caller's own request under the same per-host gate the batch pool uses.
|
|
124
|
+
*
|
|
125
|
+
* Not every registry lookup goes through the pool: a caller that misses the
|
|
126
|
+
* prefetch, or runs with prefetching disabled, issues `cdxgenAgent.get`
|
|
127
|
+
* directly. Those requests reach the same host and count against the same
|
|
128
|
+
* published budget, so they have to queue behind the same limiter rather than
|
|
129
|
+
* a second one — crates.io's one-request-per-second policy is not honoured by
|
|
130
|
+
* two independent gates that each allow one per second.
|
|
131
|
+
*
|
|
132
|
+
* The per-host semaphore and limiter are module state, so this shares one gate
|
|
133
|
+
* per host for the life of the process.
|
|
134
|
+
*
|
|
135
|
+
* @template T
|
|
136
|
+
* @param {string} url The URL about to be requested.
|
|
137
|
+
* @param {() => Promise<T>} issue Issues the request and resolves its result.
|
|
138
|
+
* @returns {Promise<T>} Whatever `issue` resolves to.
|
|
139
|
+
*/
|
|
140
|
+
export declare function withHostRateLimit<T>(url: string, issue: () => Promise<T>): Promise<T>;
|
|
98
141
|
/**
|
|
99
142
|
* Read a prefetched response, or signal that the caller should fetch it itself.
|
|
100
143
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchBatch.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchBatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"fetchBatch.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchBatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA8EH;;;GAGG;AACH,wBAAgB,cAAc,IAHjB,MAAM,GAAC,IAAI,CAKvB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,IAFtB,OAAO,CASnB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,SAO1C;AAKE,YAAkB,UAAU,GAC5B;;;;IA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,GANrC;IAAC,IAAI,EAAE,GAAC,CAAA;CAAC,GAAC,SAAS,CAoB/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,IAFlB,OAAO,CAOnB"}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Per-host rate policy for batched registry fetches.
|
|
3
3
|
*
|
|
4
4
|
* This is the single source of truth for the JS transport's concurrency and
|
|
5
|
-
* minimum-interval decisions.
|
|
5
|
+
* minimum-interval decisions. Every number is shared with the Rust transport
|
|
6
6
|
* (`cdxgen-plugins-bin/thirdparty/cdxrs/src/fetch/rate.rs`); a change to one
|
|
7
7
|
* side must be reflected in the other, and `fetchRate.poku.js` pins them so a
|
|
8
|
-
* drift is visible.
|
|
8
|
+
* drift is visible. crates.io and package.elm-lang.org are routed so that their
|
|
9
|
+
* requests never reach the Rust transport, which makes this table the one that
|
|
10
|
+
* governs them in practice — their rows are mirrored there regardless, because
|
|
11
|
+
* two tables that disagree are a bug waiting for the routing to change.
|
|
9
12
|
*
|
|
10
13
|
* Why a per-host table rather than a single global interval: a single-registry
|
|
11
14
|
* project — which is to say, almost every npm project — has exactly one host,
|
|
12
15
|
* so a conservative per-host cap *is* the global cap. Applying crates.io's
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* one-per-second policy to every host would cap an npm run at one request a
|
|
17
|
+
* second, orders of magnitude slower than that registry asks for. Hosts that
|
|
18
|
+
* publish a limit get an interval; hosts that do not are bounded by the
|
|
19
|
+
* per-host concurrency cap alone, and by whatever `Retry-After` they send.
|
|
17
20
|
*/
|
|
18
21
|
export type Credentials = ("anonymous" | "authenticated");
|
|
19
22
|
export type HostPolicy = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchRate.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchRate.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetchRate.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchRate.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAYA,YAAyC,WAAW,GAA1C,CAAC,WAAW,GAAC,eAAe,CAAC,CAAa;AAOpD,YAAkB,UAAU,GAC5B;;;;IAAmB,WAAW,EAAnB,MAAM,CACjB;;;;IAAmB,cAAc,EAAtB,MAAM,CACnB;CAAA,CAAA;AAkHD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAHxB,MAGwB,GAFtB,WAAW,CAYvB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EALnB,MAKmB,EAAE,WAAW,AAJxC,CAEA,EAFQ,WAIgC,GAF9B,UAAU,CAuBtB;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;GAEjC,CAAC;AAEJ;;;;;;GAMG;AACH,qBAAa,WAAW;IAKf,YAAY;IACZ,cAAc;IACd,eAAe;IANtB;;OAEG;IACH,YAAY,WAAW,EAFZ,MAEY,EAItB;IAED;;;;;;OAMG;IACG,IAAI,IAFG,OAAO,CAAC,IAAI,CAAC,CAYzB;IAED;;;;;;OAMG;IACH,aAAa,CAAC,OAAO,EAFV,MAEU,QAMpB;IAED,wEAAwE;IACxE,IAAI,kBAAkB,IADR,MAAM,CAGnB;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAJxB,MAIwB,GAHtB;IAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,IAAI,CAAC,CAAA;CAAC,CAwBhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeEnricher.d.ts","sourceRoot":"","sources":["../../../lib/inventory/forgeEnricher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forgeEnricher.d.ts","sourceRoot":"","sources":["../../../lib/inventory/forgeEnricher.js"],"names":[],"mappings":"AAkDA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAa9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB,MAAM,GAAC,IAAI,CAWvB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAL9B,MAK8B,EAAE,SAAS,EAJzC,KAAK,CAAC,MAAM,CAI6B,EAAE,OAAO,GAHlD,MAGuD,GAFrD,OAAO,CAAC,MAAM,CAAC,CA4M3B"}
|