@cdxgen/cdxgen 13.1.0 → 13.3.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 +32 -15
- package/bin/cdxgen.js +243 -122
- package/bin/evinse.js +7 -0
- package/bin/sign.js +88 -14
- package/bin/tracebom.js +64 -4
- package/bin/validate.js +29 -7
- package/bin/verify.js +79 -39
- package/data/crypto-oid.json +88 -12
- package/data/remediations.json +47 -0
- package/data/rules/ai-bom.yaml +78 -0
- package/data/rules/cargo-rust.yaml +132 -0
- package/data/rules/mcp-servers.yaml +122 -0
- package/lib/audit/targets.js +6 -1
- package/lib/cli/bomAssembly.js +117 -15
- package/lib/cli/cliOptions.js +93 -1
- package/lib/cli/index.js +235 -5
- package/lib/cli/jsBom.js +108 -26
- package/lib/cli/jvmBom.js +68 -12
- package/lib/cli/managedBom.js +264 -41
- package/lib/cli/nativeBom.js +923 -15
- package/lib/core/activity.js +120 -2
- package/lib/core/env.js +44 -7
- package/lib/core/fs.js +174 -6
- package/lib/core/metadataProperties.js +97 -0
- package/lib/core/projectConfig.js +31 -4
- package/lib/core/userAgent.js +151 -0
- package/lib/ecosystems/bunutils.js +269 -101
- package/lib/ecosystems/cargoCache.js +364 -0
- package/lib/ecosystems/caxa.js +447 -7
- package/lib/ecosystems/cmakeResolver.js +66 -0
- package/lib/ecosystems/cppEvidence.js +104 -33
- package/lib/ecosystems/ecosystems.js +260 -99
- package/lib/ecosystems/golem.js +11 -1
- package/lib/ecosystems/gradleutils.js +185 -9
- package/lib/ecosystems/jsEvidence.js +19 -20
- package/lib/ecosystems/kosi.js +1263 -0
- package/lib/ecosystems/npmutils.js +110 -9
- package/lib/ecosystems/parsers-crystal.js +179 -0
- package/lib/ecosystems/parsers-dotnet.js +120 -49
- package/lib/ecosystems/parsers-elm.js +816 -0
- package/lib/ecosystems/parsers-gleam.js +1 -1
- package/lib/ecosystems/parsers-go.js +47 -9
- package/lib/ecosystems/parsers-js.js +171 -50
- package/lib/ecosystems/parsers-julia.js +268 -0
- package/lib/ecosystems/parsers-lua.js +218 -0
- package/lib/ecosystems/parsers-misc.js +919 -161
- 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 +27 -15
- package/lib/ecosystems/parsers-r.js +148 -0
- package/lib/ecosystems/parsers-rebar.js +411 -0
- package/lib/ecosystems/parsers-rust.js +954 -33
- 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/rubyutils.js +1426 -166
- package/lib/ecosystems/rusi.js +158 -7
- package/lib/evinser/evinser.js +547 -129
- package/lib/evinser/swiftsem.js +1914 -302
- package/lib/helpers/agenticToolutils.js +925 -0
- package/lib/helpers/bomSigner.js +652 -221
- 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/atomUtils.js +568 -31
- package/lib/inventory/auditCategories.js +8 -0
- package/lib/inventory/cbomutils.js +30 -0
- package/lib/inventory/cdxrs.js +110 -14
- package/lib/inventory/communityAiConfigParser.js +215 -2
- package/lib/inventory/depsUtils.js +183 -11
- package/lib/inventory/display.js +4 -5
- package/lib/inventory/dosai.js +627 -13
- package/lib/inventory/dynamic.js +39 -1
- package/lib/inventory/envcontext.js +9 -6
- package/lib/inventory/evidenceUtils.js +26 -5
- package/lib/inventory/fetchBatch.js +190 -19
- package/lib/inventory/fetchRate.js +74 -11
- package/lib/inventory/forgeEnricher.js +3 -2
- package/lib/inventory/jvmToolEnv.js +6 -5
- 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/plugins.js +3 -0
- package/lib/inventory/protobom.js +62 -89
- package/lib/inventory/protobomLoader.js +4 -0
- package/lib/inventory/purl.js +152 -3
- package/lib/inventory/rustFormulationParser.js +1 -1
- package/lib/inventory/sbomDocument.js +2 -70
- package/lib/inventory/source.js +47 -23
- package/lib/inventory/stylePackageRefs.js +41 -0
- package/lib/inventory/svelteUtils.js +524 -0
- package/lib/inventory/traceRunner.js +210 -21
- package/lib/managers/binary.js +115 -24
- package/lib/managers/docker.js +440 -20
- package/lib/managers/oci.js +39 -1
- package/lib/parsers/cmakeLists.js +452 -0
- package/lib/parsers/huggingfaceUtils.js +15 -7
- package/lib/parsers/largeJson.js +454 -0
- package/lib/parsers/npmrc.js +19 -1
- package/lib/parsers/onnx.js +294 -0
- package/lib/parsers/safetensors.js +114 -0
- package/lib/stages/postgen/introspection/markers.js +29 -6
- package/lib/stages/postgen/postgen.js +237 -16
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
- package/lib/validator/bomValidator.js +6 -16
- package/lib/validator/index.js +48 -10
- package/lib/validator/reporters/console.js +3 -0
- package/lib/validator/reporters/json.js +1 -0
- package/lib/validator/reporters/sarif.js +7 -0
- package/package.json +27 -27
- package/types/lib/audit/targets.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +2 -1
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +33 -1
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts +2 -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/env.d.ts +21 -0
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts +55 -0
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/metadataProperties.d.ts +39 -0
- package/types/lib/core/metadataProperties.d.ts.map +1 -0
- package/types/lib/core/projectConfig.d.ts +6 -2
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/userAgent.d.ts +56 -0
- package/types/lib/core/userAgent.d.ts.map +1 -0
- package/types/lib/ecosystems/bunutils.d.ts +12 -5
- package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
- 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 +14 -0
- package/types/lib/ecosystems/caxa.d.ts.map +1 -1
- package/types/lib/ecosystems/cmakeResolver.d.ts +23 -0
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts +2 -2
- 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/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +40 -4
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts +5 -2
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts +86 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -0
- package/types/lib/ecosystems/npmutils.d.ts +42 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- 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-go.d.ts +10 -0
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +10 -4
- 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-lua.d.ts +50 -0
- package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-misc.d.ts +90 -3
- 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/pythonutils.d.ts +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +143 -2
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts +13 -0
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +81 -2
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +280 -15
- package/types/lib/evinser/swiftsem.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/bomSigner.d.ts +106 -13
- package/types/lib/helpers/bomSigner.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/atomUtils.d.ts +145 -3
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +4 -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/cdxrs.d.ts +8 -3
- package/types/lib/inventory/cdxrs.d.ts.map +1 -1
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/depsUtils.d.ts +15 -0
- package/types/lib/inventory/depsUtils.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +87 -1
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.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 +34 -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 +5 -4
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
- 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/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/purl.d.ts +71 -2
- package/types/lib/inventory/purl.d.ts.map +1 -1
- package/types/lib/inventory/sbomDocument.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/traceRunner.d.ts +47 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts +30 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +29 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts +14 -0
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/parsers/cmakeLists.d.ts +76 -0
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
- package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
- package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
- package/types/lib/parsers/largeJson.d.ts +52 -0
- package/types/lib/parsers/largeJson.d.ts.map +1 -0
- package/types/lib/parsers/npmrc.d.ts +5 -0
- package/types/lib/parsers/npmrc.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/introspection/markers.d.ts +3 -2
- package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts +33 -0
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +10 -1
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/console.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/types/lib/validator/reporters/sarif.d.ts.map +1 -1
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the @cdxgen/safer-exec tracing runtime could be loaded. When false,
|
|
3
|
+
* dynamic tracing cannot run at all, and every trace would otherwise exit 0
|
|
4
|
+
* with a valid but empty BOM, hiding the broken installation (#4378).
|
|
5
|
+
*
|
|
6
|
+
* @returns {boolean} True when the tracing runtime is available
|
|
7
|
+
*/
|
|
8
|
+
export declare function isSaferExecAvailable(): boolean;
|
|
1
9
|
/**
|
|
2
10
|
* Parses a command string into command and arguments array.
|
|
3
11
|
* @param {string} cmdStr - Command string to parse
|
|
@@ -40,7 +48,19 @@ export declare function resolveSaferExecBinary(): string | undefined;
|
|
|
40
48
|
* @param {boolean} [options.traceExec] - Log every child process spawned
|
|
41
49
|
* @param {string[]} [options.allowExec] - Executables the command is allowed to run
|
|
42
50
|
* @param {string[]} [options.blockExec] - Executables to block from running
|
|
43
|
-
* @
|
|
51
|
+
* @param {boolean} [options.proxyEgress] - Route egress through safer-exec's hostname-pinning proxy (network stays enabled; only allowHosts are reachable)
|
|
52
|
+
* @param {boolean} [options.allowLoopback] - Allow loopback connections
|
|
53
|
+
* @param {boolean} [options.dryRun] - Deny every filesystem and network side effect and collect a dry-run report
|
|
54
|
+
* @param {string} [options.policy] - Named safer-exec ecosystem policy (npm, pypi, maven, ...)
|
|
55
|
+
* @param {string} [options.policyFile] - Path to a safer-exec JSON policy file
|
|
56
|
+
* @param {boolean} [options.blockInterpreters] - Block interpreters with sandbox or task-port exemptions (macOS)
|
|
57
|
+
* @param {boolean} [options.denyPersistenceWrites] - Deny writes to auto-execution and persistence locations
|
|
58
|
+
* @param {boolean} [options.privateTmp] - Private tmpfs /tmp and /var/tmp (Linux)
|
|
59
|
+
* @param {string} [options.protectHome] - Home isolation: read-only, tmpfs, or off (Linux)
|
|
60
|
+
* @returns {Promise<{libPaths: string[], httpAccessEntries: Object[], egressEntries?: Object[], dryRunSummary?: Object}>} Collected libraries, HTTP URLs, proxy egress decisions, and the dry-run summary
|
|
61
|
+
* @throws {Error} When the @cdxgen/safer-exec tracing runtime is not installed
|
|
62
|
+
* (for example after pruning it from a standalone payload), since the traced
|
|
63
|
+
* command could never run and the BOM would silently be empty
|
|
44
64
|
*/
|
|
45
65
|
export declare function executeAndTrace(commandStr: string, workingDir?: string, options?: {
|
|
46
66
|
readPaths?: string[];
|
|
@@ -62,10 +82,36 @@ export declare function executeAndTrace(commandStr: string, workingDir?: string,
|
|
|
62
82
|
traceExec?: boolean;
|
|
63
83
|
allowExec?: string[];
|
|
64
84
|
blockExec?: string[];
|
|
85
|
+
proxyEgress?: boolean;
|
|
86
|
+
allowLoopback?: boolean;
|
|
87
|
+
dryRun?: boolean;
|
|
88
|
+
policy?: string;
|
|
89
|
+
policyFile?: string;
|
|
90
|
+
blockInterpreters?: boolean;
|
|
91
|
+
denyPersistenceWrites?: boolean;
|
|
92
|
+
privateTmp?: boolean;
|
|
93
|
+
protectHome?: string;
|
|
65
94
|
}): Promise<{
|
|
66
95
|
libPaths: string[];
|
|
67
96
|
httpAccessEntries: Object[];
|
|
97
|
+
egressEntries?: Object[];
|
|
98
|
+
dryRunSummary?: Object;
|
|
68
99
|
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Extracts the egress proxy's decisions from a safer-exec audit log.
|
|
102
|
+
* "proxy-connect" targets are "host:port"; "proxy-violation" targets are
|
|
103
|
+
* "CONNECT host:port" or "METHOD http://host[:port]/path". Only the authority
|
|
104
|
+
* is kept, never a path or query.
|
|
105
|
+
*
|
|
106
|
+
* @param {Object[]} auditLog - safer-exec audit entries
|
|
107
|
+
* @returns {{host: string, port: number, protocol: string, decision: string}[]} Unique egress decisions
|
|
108
|
+
*/
|
|
109
|
+
export declare function parseEgressEntries(auditLog: Object[]): {
|
|
110
|
+
host: string;
|
|
111
|
+
port: number;
|
|
112
|
+
protocol: string;
|
|
113
|
+
decision: string;
|
|
114
|
+
}[];
|
|
69
115
|
/**
|
|
70
116
|
* Groups HTTP access entries into a CycloneDX services-ready map.
|
|
71
117
|
* Each unique (host, port, protocol) combination becomes a service.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAFvB,OAAO,CAInB;AAKD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAFzB,MAAM,GAAC,SAAS,CAsE5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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qB,AAA/C,CACA,EADQ,OAAO,CACf;IAA0B,UAAU,AAApC,CACA,EADQ,OAAO,CACf;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;CAKuE,GAL7D,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAwTxH;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAAM,EAG0B,GAF9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,EAAE,CAkD9E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,iBAAiB,EAHjD,MAAM,EAG2C;eAFlB,GAAG,CAAC,MAAM,CAAC;gBAAc,MAAM,EAAE;GA+C1E"}
|
|
@@ -15,13 +15,25 @@ export declare function getPluginToolComponents(toolNames?: string[]): Object[];
|
|
|
15
15
|
* is unavailable or produced no output.
|
|
16
16
|
*/
|
|
17
17
|
export declare function getCargoAuditableInfo(src: string): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Check that sourcekitten (bundled plugin or SOURCEKITTEN_CMD) answers a
|
|
20
|
+
* trivial syntax request.
|
|
21
|
+
*
|
|
22
|
+
* @param env {Object} Optional environment overrides merged over process.env
|
|
23
|
+
* @returns {String} `ok`; `unavailable` when there is no bundled plugin and
|
|
24
|
+
* SOURCEKITTEN_CMD is unset; `not-found` when the configured executable does
|
|
25
|
+
* not exist; `failed` when it ran but could not answer
|
|
26
|
+
*/
|
|
27
|
+
export declare function probeSourcekitten(env: Object): string;
|
|
18
28
|
/**
|
|
19
29
|
* Execute sourcekitten plugin with the given arguments
|
|
20
30
|
*
|
|
21
31
|
* @param args {Array} Arguments
|
|
32
|
+
* @param env {Object} Optional environment overrides merged over process.env,
|
|
33
|
+
* used to align sourcekitten with a specific Swift toolchain
|
|
22
34
|
* @returns {undefined|Object} Command output
|
|
23
35
|
*/
|
|
24
|
-
export declare function executeSourcekitten(args: any[]): undefined | Object;
|
|
36
|
+
export declare function executeSourcekitten(args: any[], env: Object): undefined | Object;
|
|
25
37
|
/**
|
|
26
38
|
* Canonicalise the distro vendor namespace of an OS package component
|
|
27
39
|
* produced by trivy, regardless of whether trivy expressed the vendor via the
|
|
@@ -103,6 +115,23 @@ export declare function dropRedundantSourceComponents(pkgList: any[]): any[];
|
|
|
103
115
|
* @returns {Object} Metadata containing packages, dependencies, etc
|
|
104
116
|
*/
|
|
105
117
|
export declare function getOSPackages(src: string, imageConfig: Object, options?: {}): Object;
|
|
118
|
+
/**
|
|
119
|
+
* Collect the dependency edges trivy recorded for one OS package component.
|
|
120
|
+
*
|
|
121
|
+
* Trivy keys its `dependencies` by its own bom-refs, which may leave the `+` of
|
|
122
|
+
* an rpm or deb version unescaped (`...libstdc%2B%2B6@14.2.0+git10526-...`), so
|
|
123
|
+
* each ref is read structurally and re-rendered in cdxgen's decoded bom-ref
|
|
124
|
+
* form with the component's type, namespace and distro qualifiers.
|
|
125
|
+
*
|
|
126
|
+
* @param {Object<string, string[]>} tmpDependencies Trivy's refs mapped to the refs they depend on
|
|
127
|
+
* @param {string} origBomRef The component's bom-ref as trivy wrote it
|
|
128
|
+
* @param {object} comp The component after cdxgen rewrote its purl and bom-ref
|
|
129
|
+
* @returns {{ref: string, dependsOn: string[]}|undefined} Dependency entry for the component
|
|
130
|
+
*/
|
|
131
|
+
export declare const retrieveDependencies: (tmpDependencies: Record<string, string[]>, origBomRef: string, comp: object) => {
|
|
132
|
+
ref: string;
|
|
133
|
+
dependsOn: string[];
|
|
134
|
+
} | undefined;
|
|
106
135
|
/**
|
|
107
136
|
* Batch-enrich operating-system components with host-path trust data using the
|
|
108
137
|
* `trustinspector` helper on darwin and Windows.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/managers/binary.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/managers/binary.js"],"names":[],"mappings":"AA+YA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,AAH9C,CACA,EADQ,MAAM,EAGqC,GAFzC,MAAM,EAAE,CAgBpB;AA4FD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAJ9B,MAI8B,GAH5B,MAAM,GAAC,SAAS,CAmB5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EALtB,MAKsB,UA+BpC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,OAAA,EAAE,GAAG,EAJ9B,MAI8B,GAFhC,SAAS,GAAC,MAAM,CAmC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EARK,MAQL,EACJ,OAAO,EARE,MAQF,EACP,IAAI,EARK,MAQL,EACJ,KAAK,EARI,MAQJ,EACL,QAAQ,AARP,CACA,EADQ,MAQD,GAPG,MAAM,CAgDlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAJ/B,MAI+B,EAAE,QAAQ,AAHjD,CACA,EADQ,MAGyC,GAFvC,MAAM,CA6BlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,OAAA,SAoBpD;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,GAAG,QAAA,EAAE,WAAW,EAL7B,MAK6B,EAAE,OAAO,KAAK,GAFrD,MAAM,CAinBlB;AA4lDD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,0DAJtB,MAAM,QACN,MAAM,KACJ;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,SAsD/C,CAAC;AAyHF;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,AALvD,CACA,EADQ,MAAM,EAK8C,GAJlD;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CAmEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EALzB,MAKyB,GAJvB,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAJxB,MAIwB,EAAE,UAAU,EAHpC,MAGoC,WA6C9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EANrB,MAMqB,EAAE,aAAa,EALpC,MAKoC,EAAE,QAAQ,EAJ9C,OAI8C,GAF7C,OAAO,CAiClB"}
|
|
@@ -53,6 +53,27 @@ export declare const getConnection: (_options: Object, forRegistry?: string) =>
|
|
|
53
53
|
* requests, raw Buffer for other methods, or `undefined` if no client is available
|
|
54
54
|
*/
|
|
55
55
|
export declare const makeRequest: (path: string, method: string, forRegistry?: string) => Promise<Object | Buffer | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Decide whether a CLI path argument is a container image reference in the
|
|
58
|
+
* styles the container pipeline documents: name, name:tag, namespace/name,
|
|
59
|
+
* registry/namespace/name:tag, registry:port/..., and any of those with a
|
|
60
|
+
* @digest. Everything that smells like a filesystem path, a URL or a CLI
|
|
61
|
+
* option never matches, so strings such as "c:\Users", "c:/tmp" or
|
|
62
|
+
* "file:///etc" can never reach the container clients: backslashes and
|
|
63
|
+
* schemes are rejected outright, and a drive-letter prefix fails because a
|
|
64
|
+
* lone letter is neither a dotted host nor a host:port, and a tag may not
|
|
65
|
+
* begin with the "/" that follows the colon in "c:/tmp".
|
|
66
|
+
*
|
|
67
|
+
* The check mirrors how the distribution reference grammar detects a registry
|
|
68
|
+
* host: the first component counts as a host only when it carries a dot, a
|
|
69
|
+
* numeric port, or is exactly localhost. Each piece is validated by a linear
|
|
70
|
+
* regex or plain string splitting, and the input is length-capped, so hostile
|
|
71
|
+
* inputs cannot backtrack expensively.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} fullImageName Candidate image reference
|
|
74
|
+
* @returns {boolean} true when the string is a plausible image reference
|
|
75
|
+
*/
|
|
76
|
+
export declare const isImageReference: (fullImageName: string) => boolean;
|
|
56
77
|
/**
|
|
57
78
|
* Parse image name
|
|
58
79
|
*
|
|
@@ -70,6 +91,14 @@ export declare const parseImageName: (fullImageName: any) => {
|
|
|
70
91
|
group: string;
|
|
71
92
|
name: string;
|
|
72
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Prefer cli on windows, nerdctl on mac, or when using tcp/ssh based host.
|
|
96
|
+
* On Windows, fall back to wslc (WSL Containers) when the docker CLI is not
|
|
97
|
+
* installed, so OCI image scans work on hosts that only have WSL.
|
|
98
|
+
*
|
|
99
|
+
* @returns {string} Container CLI command to invoke
|
|
100
|
+
*/
|
|
101
|
+
export declare const getContainerCliCmd: () => string;
|
|
73
102
|
/**
|
|
74
103
|
* Method to get image to the local registry by pulling from the remote if required
|
|
75
104
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA+CrC,yDAAyD;AACzD,eAAO,MAAM,KAAK,SAA0B,CAAC;AAC7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAEoC,CAAC;A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;GAOG;AACH,eAAO,MAAM,WAAW,kBALb,MAAM,UACN,OAAO,KACL,OAAO,CAAC,MAAM,GAAC,SAAS,CAKpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,cALpB,MAAM,iBACN,MAAM,KACJ,MAAM,GAAC,SA2CnB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,qBAHpB,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,cACnC,KAAK,CAAC,MAAM,CAAC,SA4BvB,CAAC"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether a token realm URL belongs to the registry itself.
|
|
3
|
+
*
|
|
4
|
+
* A registry's 401 response names the realm, so a hostile registry picks the
|
|
5
|
+
* URL cdxgen will call. Credentials picked up for the registry must therefore
|
|
6
|
+
* only be attached when the realm resolves to the same host and port; public
|
|
7
|
+
* delegating realms (docker.io to auth.docker.io) are still usable, just
|
|
8
|
+
* anonymously.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} registry Registry host, optionally with a port
|
|
11
|
+
* @param {URL} realmUrl Parsed realm URL from the WWW-Authenticate header
|
|
12
|
+
* @returns {boolean} true when host and port match the registry
|
|
13
|
+
*/
|
|
14
|
+
export declare function isSameRegistryHost(registry: string, realmUrl: URL): boolean;
|
|
1
15
|
/**
|
|
2
16
|
* Retrieves a CycloneDX BOM attached to an OCI image purely in JavaScript
|
|
3
17
|
* without relying on the `oras` CLI tool.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"AAuOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,EAAE,QAAQ,EAH1C,GAG0C,GAFxC,OAAO,CAgBnB;AAoJD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAJ/B,MAI+B,EAAE,SAAS,YAAY,GAFpD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA4GrC;AAmFD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,KAAK,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmIrC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure parser for CMake language files (`CMakeLists.txt`, `*.cmake`).
|
|
3
|
+
*
|
|
4
|
+
* `parseCmakeCommands` splits a file into command invocations the way CMake
|
|
5
|
+
* reads it: command names are case-insensitive, an invocation may span several
|
|
6
|
+
* lines, and arguments may be quoted, bracketed (`[[...]]`) or interleaved with
|
|
7
|
+
* comments. `cmakeFetchDependencies` reads the commands that download a
|
|
8
|
+
* dependency at configure time: `FetchContent_Declare`, `ExternalProject_Add`
|
|
9
|
+
* and the CPM.cmake `CPMAddPackage` family.
|
|
10
|
+
*
|
|
11
|
+
* This module is layer 1 (text in, data out): no filesystem or subprocess
|
|
12
|
+
* access. `lib/ecosystems/parsers-misc.js` turns the facts into components.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Split CMake source into command invocations.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} text Contents of a CMake file
|
|
18
|
+
* @returns {{name: string, args: string[], line: number}[]} Invocations in
|
|
19
|
+
* source order. `name` is lower-cased; `args` have their quotes and bracket
|
|
20
|
+
* delimiters removed; `line` is the 1-based line of the command name.
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseCmakeCommands(text: string): {
|
|
23
|
+
name: string;
|
|
24
|
+
args: string[];
|
|
25
|
+
line: number;
|
|
26
|
+
}[];
|
|
27
|
+
/**
|
|
28
|
+
* Replace `${VAR}` references with the values of simple `set()` calls. A
|
|
29
|
+
* reference to an unknown variable is left in place, so callers can tell a
|
|
30
|
+
* resolved value from an unresolved one.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} value Argument text
|
|
33
|
+
* @param {Map<string,string>} variables Known variable values
|
|
34
|
+
* @returns {string} The expanded text
|
|
35
|
+
*/
|
|
36
|
+
export declare function expandCmakeVariables(value: string, variables: Map<string, string>): string;
|
|
37
|
+
/**
|
|
38
|
+
* The variables a file sets to a single value: `set(FOO_VERSION 1.2.3)` and
|
|
39
|
+
* `set(FOO_VERSION "1.2.3" CACHE STRING "...")`. Later definitions win.
|
|
40
|
+
*
|
|
41
|
+
* @param {{name: string, args: string[]}[]} commands Parsed commands
|
|
42
|
+
* @returns {Map<string,string>} Variable values
|
|
43
|
+
*/
|
|
44
|
+
export declare function cmakeSetVariables(commands: {
|
|
45
|
+
name: string;
|
|
46
|
+
args: string[];
|
|
47
|
+
}[]): Map<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* The dependencies a CMake file downloads at configure time.
|
|
50
|
+
*
|
|
51
|
+
* `FetchContent_Declare(<name> ...)` and `ExternalProject_Add(<name> ...)` are
|
|
52
|
+
* read for `GIT_REPOSITORY`/`GIT_TAG` and `URL`/`URL_HASH`/`URL_MD5`.
|
|
53
|
+
* `CPMAddPackage`, `CPMFindPackage` and `CPMDeclarePackage` are read in both
|
|
54
|
+
* the shorthand form and the keyword form (`NAME`, `VERSION`,
|
|
55
|
+
* `GITHUB_REPOSITORY`, `GITLAB_REPOSITORY`, `BITBUCKET_REPOSITORY`,
|
|
56
|
+
* `GIT_REPOSITORY`, `GIT_TAG`, `URL`, `URL_HASH`). `${VAR}` references are
|
|
57
|
+
* expanded with the file's simple `set()` values; anything still unresolved
|
|
58
|
+
* stays as written.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} text Contents of a CMake file
|
|
61
|
+
* @returns {{kind: string, name: string, line: number, gitRepository?: string, gitTag?: string, url?: string, urlHash?: string, version?: string, madeAvailable: boolean}[]}
|
|
62
|
+
* `kind` is `fetch`, `external-project` or `cpm`; `madeAvailable` is true
|
|
63
|
+
* when a `FetchContent_MakeAvailable` in the same file names the dependency.
|
|
64
|
+
*/
|
|
65
|
+
export declare function cmakeFetchDependencies(text: string): {
|
|
66
|
+
kind: string;
|
|
67
|
+
name: string;
|
|
68
|
+
line: number;
|
|
69
|
+
gitRepository?: string;
|
|
70
|
+
gitTag?: string;
|
|
71
|
+
url?: string;
|
|
72
|
+
urlHash?: string;
|
|
73
|
+
version?: string;
|
|
74
|
+
madeAvailable: boolean;
|
|
75
|
+
}[];
|
|
76
|
+
//# sourceMappingURL=cmakeLists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmakeLists.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakeLists.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA8DH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAK4B,GAJ1B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EAAE,CA8G1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAJ/B,MAI+B,EAAE,SAAS,EAH1C,GAAG,CAAC,MAAM,EAAC,MAAM,CAGyB,GAFxC,MAAM,CA+BlB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,EAGC,GAF7B,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAkB9B;AAgFD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EALhC,MAKgC,GAJ9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,EAAE,CAyG3K"}
|
|
@@ -84,9 +84,16 @@ export declare function toHuggingFacePurl(repoId: string, version?: string, repo
|
|
|
84
84
|
* Normalize a direct Hugging Face URL or purl into a repo reference.
|
|
85
85
|
*
|
|
86
86
|
* @param {string} value direct URL, API URL, or purl
|
|
87
|
+
* @param {object} [parseOptions] parsing options
|
|
88
|
+
* @param {boolean} [parseOptions.explicitOnly=false] resolve only unambiguous
|
|
89
|
+
* references (`pkg:huggingface/...` purls and huggingface.co URLs) so that
|
|
90
|
+
* ambiguous `owner/repo`-shaped values keep their filesystem-path meaning
|
|
91
|
+
* until an AI inventory type is explicitly selected
|
|
87
92
|
* @returns {{ assetType: string, repoId: string, version?: string }|undefined} normalized reference
|
|
88
93
|
*/
|
|
89
|
-
export declare function normalizeHuggingFaceReference(value: string
|
|
94
|
+
export declare function normalizeHuggingFaceReference(value: string, parseOptions?: {
|
|
95
|
+
explicitOnly?: boolean;
|
|
96
|
+
}): {
|
|
90
97
|
assetType: string;
|
|
91
98
|
repoId: string;
|
|
92
99
|
version?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingfaceUtils.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceUtils.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAEyC,CAAC;AACpD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAFlC,GAAG,CAAC,MAAM,CAYlB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAFtC,MAEkE,CAAC;A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,CAAC,GAAG,EAAE,MAAM,GAAC,SAAS,KAAK,MAAM,GAAC,SAAS,CAAA;CAWN,GAVpD;IACR,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,GAAC,SAAS,CAqDb;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAJ3C,MAAM,GAAC,MAIoC,EAAE,OAAO,AAH5D,CACA,EADQ;IAAE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAC,SAAS,KAAK,MAAM,GAAC,SAAS,CAAA;CAGH,GAFvD;IAAE,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAC,SAAS,CAyBtG;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,AAHhD,CACA,EADQ,KAAK,CAAC,MAAM,CAGiC,GAF3C,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBlE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,kBAAkB,EAHnD,MAAM,GAAC,MAG4C,GAFjD,MAAM,GAAC,SAAS,CAoB5B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The largest file that `JSON.parse(readFileSync(file, "utf-8"))` can always
|
|
3
|
+
* decode. V8 caps a string at this many UTF-16 code units, and UTF-8 never
|
|
4
|
+
* decodes to more code units than it has bytes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAX_JSON_TEXT_BYTES: any;
|
|
7
|
+
/**
|
|
8
|
+
* Locate the value of each member of the top-level object in a JSON file,
|
|
9
|
+
* without decoding any of them.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} filePath JSON file whose top-level value is an object
|
|
12
|
+
* @param {Object} [options] Chunk size override, for tests
|
|
13
|
+
* @returns {Map<string, {start: number, end: number}>} Byte range of each member's value, in file order. A repeated key keeps its last value, as JSON.parse does.
|
|
14
|
+
* @throws {SyntaxError} When the top-level value is not a well-formed object
|
|
15
|
+
*/
|
|
16
|
+
export declare function indexJsonObject(filePath: string, options?: Object): Map<string, {
|
|
17
|
+
start: number;
|
|
18
|
+
end: number;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Decode the JSON value stored in a byte range of a file, without ever holding
|
|
22
|
+
* more than a bounded run of it in one string.
|
|
23
|
+
*
|
|
24
|
+
* `spec` narrows what is kept. `{ members: { name: spec } }` keeps only the
|
|
25
|
+
* named members of an object, each narrowed by its own spec. `{ filter }`
|
|
26
|
+
* keeps the elements of an array that `filter(element)` accepts. Anything else
|
|
27
|
+
* keeps the whole value.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} filePath JSON file
|
|
30
|
+
* @param {{start: number, end: number}} range Byte range of the value, such as one returned by indexJsonObject
|
|
31
|
+
* @param {Object} [spec] What to keep
|
|
32
|
+
* @param {Object} [options] Batch and chunk size overrides, for tests
|
|
33
|
+
* @returns {*} The decoded value
|
|
34
|
+
* @throws {SyntaxError} When the value is malformed
|
|
35
|
+
*/
|
|
36
|
+
export declare function readJsonRange(filePath: string, range: {
|
|
37
|
+
start: number;
|
|
38
|
+
end: number;
|
|
39
|
+
}, spec?: Object, options?: Object): any;
|
|
40
|
+
/**
|
|
41
|
+
* Parse a JSON file of any size. A file that fits in one string is decoded
|
|
42
|
+
* with JSON.parse, and a larger one is streamed through readJsonRange, so the
|
|
43
|
+
* result is the same either way.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} filePath JSON file
|
|
46
|
+
* @param {Object} [spec] What to keep, as for readJsonRange
|
|
47
|
+
* @param {Object} [options] Size overrides, for tests: maxTextBytes, batchBytes, chunkBytes
|
|
48
|
+
* @returns {*} The decoded value
|
|
49
|
+
* @throws {SyntaxError} When the file is malformed
|
|
50
|
+
*/
|
|
51
|
+
export declare function readJsonFile(filePath: string, spec?: Object, options?: Object): any;
|
|
52
|
+
//# sourceMappingURL=largeJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"largeJson.d.ts","sourceRoot":"","sources":["../../../lib/parsers/largeJson.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,KAA8B,CAAC;AAiY/D;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAL7B,MAK6B,EAAE,OAAO,AAJ9C,CACA,EADQ,MAI2C,GAHzC,GAAG,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,CAarD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAP3B,MAO2B,EAAE,KAAK,EANlC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAMO,EAAE,IAAI,AALhD,CACA,EADQ,MAKoD,EAAE,OAAO,AAJrE,CACA,EADQ,MAIkE,GAHhE,GAAC,CAOb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAN1B,MAM0B,EAAE,IAAI,AALxC,CACA,EADQ,MAK4C,EAAE,OAAO,AAJ7D,CACA,EADQ,MAI0D,GAHxD,GAAC,CASb"}
|
|
@@ -9,6 +9,11 @@ export declare const DEFAULT_NPMRC_BLOCKLIST: Set<string>;
|
|
|
9
9
|
/**
|
|
10
10
|
* Parse .npmrc content into a plain key-value object.
|
|
11
11
|
*
|
|
12
|
+
* Keys that collide with JavaScript object internals are skipped: assigning
|
|
13
|
+
* them on a plain object either silently mutates Object.prototype semantics or,
|
|
14
|
+
* for the array syntax, crashed the parser with a TypeError because
|
|
15
|
+
* `result.__proto__` resolves to Object.prototype instead of an own property.
|
|
16
|
+
*
|
|
12
17
|
* @param {string} content - Raw .npmrc file content
|
|
13
18
|
* @returns {Object} Parsed key-value pairs
|
|
14
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmrc.d.ts","sourceRoot":"","sources":["../../../lib/parsers/npmrc.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAF1B,GAAG,CAAC,MAAM,CAkBlB,CAAC;
|
|
1
|
+
{"version":3,"file":"npmrc.d.ts","sourceRoot":"","sources":["../../../lib/parsers/npmrc.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAF1B,GAAG,CAAC,MAAM,CAkBlB,CAAC;AAYH;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAHvB,MAGuB,GAFrB,MAAM,CAoClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAH1B,MAGwC,GAFtC,MAAM,CAoBlB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the identifying header fields of an ONNX model file.
|
|
3
|
+
*
|
|
4
|
+
* Only `ir_version`, `producer_name`, `producer_version`, `model_version`,
|
|
5
|
+
* and the `opset_import` entries are extracted. The graph and every other
|
|
6
|
+
* payload are skipped by offset without being read, so no tensor data is
|
|
7
|
+
* ever loaded and no model code is executed.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} filePath Path to the `.onnx` file
|
|
10
|
+
* @returns {{
|
|
11
|
+
* irVersion: number,
|
|
12
|
+
* producerName: string,
|
|
13
|
+
* producerVersion: string,
|
|
14
|
+
* modelVersion: number,
|
|
15
|
+
* opsets: Array<{domain: string, version: number}>,
|
|
16
|
+
* } | undefined} Header summary, or undefined when it cannot be read
|
|
17
|
+
*/
|
|
18
|
+
export declare function readOnnxHeader(filePath: string): {
|
|
19
|
+
irVersion: number;
|
|
20
|
+
producerName: string;
|
|
21
|
+
producerVersion: string;
|
|
22
|
+
modelVersion: number;
|
|
23
|
+
opsets: Array<{
|
|
24
|
+
domain: string;
|
|
25
|
+
version: number;
|
|
26
|
+
}>;
|
|
27
|
+
} | undefined;
|
|
28
|
+
//# sourceMappingURL=onnx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../../lib/parsers/onnx.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAT5B,MAS4B,GAR1B;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAClD,GAAG,SAAS,CAwGf"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read and parse the JSON header of a safetensors model file.
|
|
3
|
+
*
|
|
4
|
+
* Only the leading header is read; tensor payloads are ignored. The returned
|
|
5
|
+
* object separates the optional `__metadata__` map from the per-tensor
|
|
6
|
+
* descriptors.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} filePath Path to a `.safetensors` file
|
|
9
|
+
* @returns {{
|
|
10
|
+
* metadata: Object,
|
|
11
|
+
* tensorCount: number,
|
|
12
|
+
* dtypes: string[],
|
|
13
|
+
* totalParameters: number,
|
|
14
|
+
* } | undefined} Parsed header summary, or undefined when it cannot be read
|
|
15
|
+
*/
|
|
16
|
+
export declare function readSafetensorsHeader(filePath: string): {
|
|
17
|
+
metadata: Object;
|
|
18
|
+
tensorCount: number;
|
|
19
|
+
dtypes: string[];
|
|
20
|
+
totalParameters: number;
|
|
21
|
+
} | undefined;
|
|
22
|
+
//# sourceMappingURL=safetensors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safetensors.d.ts","sourceRoot":"","sources":["../../../lib/parsers/safetensors.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EARnC,MAQmC,GAPjC;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,SAAS,CAuCf"}
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
* Marker table: ecosystem → manifest and lockfile names that indicate the
|
|
20
20
|
* ecosystem is part of the project. Entries are either exact file names or
|
|
21
21
|
* `{ suffix }` matchers for extension-driven ecosystems. Ecosystems cdxgen
|
|
22
|
-
* cannot parse (
|
|
23
|
-
* can report them as coverage gaps instead of silently
|
|
22
|
+
* cannot parse (currently only dub, the D package manager) are included so
|
|
23
|
+
* the reflection can report them as coverage gaps instead of silently
|
|
24
|
+
* ignoring them.
|
|
24
25
|
*
|
|
25
26
|
* @type {Readonly<Record<string, {names: string[], suffixes: string[]}>>}
|
|
26
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/markers.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH
|
|
1
|
+
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/markers.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAFpB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CA0GtE,CAAC;AAEH;;;gCAGgC;AAChC,eAAO,MAAM,eAAe,eAAY,CAAC;AAyDzC;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EALvC,MAKuC,EAAE,KAAK,AAJtD,CAEA,EADA;IAA0E,OAAO,AAAjF,CACA,EADQ,CAAC,OAAO,EAAE,MAAM,KAAK;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAC,EAAE,CACjE;CAE2D,GAFjD;IAAC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAC,CAoCnF"}
|
|
@@ -26,6 +26,39 @@ export declare function applyMetadata(bomJson: Object, options: Object): Object;
|
|
|
26
26
|
* @returns {Object} Filtered BOM JSON
|
|
27
27
|
*/
|
|
28
28
|
export declare function applyStandards(bomJson: Object, options: Object): Object;
|
|
29
|
+
/**
|
|
30
|
+
* Move the build-time-only components out of `components[]`, which describes
|
|
31
|
+
* the delivered assembly, and hand them to the formulation section, which is
|
|
32
|
+
* where CycloneDX describes how the assembly was produced.
|
|
33
|
+
*
|
|
34
|
+
* Their bom-refs stay valid because the formulation components live in the same
|
|
35
|
+
* document, so the dependency graph is left intact. `formulation` exists from
|
|
36
|
+
* CycloneDX 1.5, so an older document keeps them in `components[]` with their
|
|
37
|
+
* `cdx:cargo:hostOnly` marker rather than losing them.
|
|
38
|
+
*
|
|
39
|
+
* @param {Object} bomJson BOM JSON object
|
|
40
|
+
* @param {Object} options CLI options
|
|
41
|
+
*
|
|
42
|
+
* @returns {Object[]} The components removed from `components[]`
|
|
43
|
+
*/
|
|
44
|
+
export declare function extractBuildOnlyComponents(bomJson: Object, options: Object): Object[];
|
|
45
|
+
/**
|
|
46
|
+
* Re-apply the `--required-only` filter once the evidence stage has attached
|
|
47
|
+
* occurrence and callstack data.
|
|
48
|
+
*
|
|
49
|
+
* A manifest can only say that a dependency is optional; the evidence says
|
|
50
|
+
* whether it is reached. A component the analyzers observed in the sources is
|
|
51
|
+
* promoted to `required` so it survives the filter, while an optional component
|
|
52
|
+
* with no observed usage is dropped as before. A component scoped `excluded` -
|
|
53
|
+
* a dev or test dependency - keeps that scope: an occurrence inside the test
|
|
54
|
+
* sources is not evidence that it ships.
|
|
55
|
+
*
|
|
56
|
+
* @param {Object} bomJson BOM JSON object carrying evidence
|
|
57
|
+
* @param {Object} options CLI options
|
|
58
|
+
*
|
|
59
|
+
* @returns {Object} Filtered BOM JSON
|
|
60
|
+
*/
|
|
61
|
+
export declare function applyEvidenceBasedFilter(bomJson: Object, options: Object): Object;
|
|
29
62
|
/**
|
|
30
63
|
* Filter BOM based on options
|
|
31
64
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAiiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAgHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAL1B,MAK0B,EAAE,OAAO,EAJnC,MAImC,GAFjC,MAAM,CA6IlB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAL3B,MAK2B,EAAE,OAAO,EAJpC,MAIoC,GAFlC,MAAM,CAqClB;AAqHD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EALvC,MAKuC,EAAE,OAAO,EAJhD,MAIgD,GAF9C,MAAM,EAAE,CAmBpB;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EALrC,MAKqC,EAAE,OAAO,EAJ9C,MAI8C,GAF5C,MAAM,CAiClB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EALtB,MAKsB,EAAE,OAAO,EAJ/B,MAI+B,GAF7B,MAAM,CAoNlB;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,KAAA,QAUlC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAFhB,IAAI,CAYhB;AAMD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EALrB,MAKqB,EAAE,OAAO,EAJ9B,MAI8B,GAF5B,MAAM,CA2HlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bomValidator.d.ts","sourceRoot":"","sources":["../../../lib/validator/bomValidator.js"],"names":[],"mappings":"AAqPA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,KAEJ,OAAO,SAmCnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,aAHd,MAAM,GAAC,MAAM,KACX,OAyLZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAFlB,MAAM,YAmEhB,CAAC;AA4CF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAFf,MAAM,YA+HhB,CAAC;AA2CF;;;;GAIG;AACH,eAAO,MAAM,YAAY,YAFd,MAAM,
|
|
1
|
+
{"version":3,"file":"bomValidator.d.ts","sourceRoot":"","sources":["../../../lib/validator/bomValidator.js"],"names":[],"mappings":"AAqPA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,KAEJ,OAAO,SAmCnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,aAHd,MAAM,GAAC,MAAM,KACX,OAyLZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAFlB,MAAM,YAmEhB,CAAC;AA4CF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAFf,MAAM,YA+HhB,CAAC;AA2CF;;;;GAIG;AACH,eAAO,MAAM,YAAY,YAFd,MAAM,YA8EhB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAF1B,MAE0B,WAkIpC"}
|
|
@@ -47,10 +47,13 @@ export declare function validateGeneratedBom(bomJson: object): Promise<{
|
|
|
47
47
|
* @param {string} [options.minSeverity] Minimum severity for returned findings.
|
|
48
48
|
* @param {boolean} [options.includeManual] Include manual-review findings (default true).
|
|
49
49
|
* @param {boolean} [options.includePass] Include passing findings (default false).
|
|
50
|
-
* @param {string} [options.publicKey] If set, verify the BOM signature.
|
|
50
|
+
* @param {string} [options.publicKey] If set, verify the BOM signature with this public key.
|
|
51
|
+
* @param {string|Buffer} [options.secretKey] If set, verify an HMAC (HS*) BOM signature with this shared secret.
|
|
52
|
+
* @param {boolean} [options.nestedSignatures] Also verify component, service, and annotation signatures (default true), as cdx-verify does.
|
|
51
53
|
* @returns {{
|
|
52
54
|
* schemaValid: boolean,
|
|
53
55
|
* deepValid: boolean,
|
|
56
|
+
* validationErrors: Array<{ stage: string, message: string }>,
|
|
54
57
|
* signatureVerified: boolean | null,
|
|
55
58
|
* signatureDetails: object | null,
|
|
56
59
|
* findings: Array<object>,
|
|
@@ -68,9 +71,15 @@ export declare function validateBomAdvanced(bomJson: object, options?: {
|
|
|
68
71
|
includeManual?: boolean;
|
|
69
72
|
includePass?: boolean;
|
|
70
73
|
publicKey?: string;
|
|
74
|
+
secretKey?: string | Buffer;
|
|
75
|
+
nestedSignatures?: boolean;
|
|
71
76
|
}): {
|
|
72
77
|
schemaValid: boolean;
|
|
73
78
|
deepValid: boolean;
|
|
79
|
+
validationErrors: Array<{
|
|
80
|
+
stage: string;
|
|
81
|
+
message: string;
|
|
82
|
+
}>;
|
|
74
83
|
signatureVerified: boolean | null;
|
|
75
84
|
signatureDetails: object | null;
|
|
76
85
|
findings: Array<object>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/validator/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/validator/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;;;GAKG;AACH,QAAA,MAAM,cAAc,wBAAuD,CAAC;AA4D5E;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAHvC,MAGuC,GAFrC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,CAAC,CAKrE;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAxBtC,MAwBsC,EAAE,OAAO,AAvBvD,CAWA,EAVA;IAA0B,MAAM,AAAhC,CACA,EADQ,OAAO,CACf;IAA0B,IAAI,AAA9B,CACA,EADQ,OAAO,CACf;IAAgC,UAAU,AAA1C,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAAgC,UAAU,AAA1C,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAA0B,aAAa,AAAvC,CACA,EADQ,OAAO,CACf;IAA0B,WAAW,AAArC,CACA,EADQ,OAAO,CACf;IAAyB,SAAS,AAAlC,CACA,EADQ,MAAM,CACd;IAAgC,SAAS,AAAzC,CACA,EADQ,MAAM,GAAC,MAAM,CACrB;IAA0B,gBAAgB,A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AK,CAAC,MAAM,CAGiB,GAF3B,MAAM,CAmClB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB,MAAM,CAWlB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAHlB,MAGkB,GAFhB,MAAM,
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/console.js"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAJ5B,KAAK,CAAC,MAAM,CAIgB,EAAE,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,MAAM,CAiClB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,KAAK,CAAC,MAAM,CAGiB,GAF3B,MAAM,CAmClB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB,MAAM,CAWlB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAHlB,MAGkB,GAFhB,MAAM,CAqClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/json.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAJlB,MAIkB,EAAE,QAAQ,AAHpC,CACA,EADQ,MAGiC,GAF/B,MAAM,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/json.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAJlB,MAIkB,EAAE,QAAQ,AAHpC,CACA,EADQ,MAGiC,GAF/B,MAAM,CA6BlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sarif.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/sarif.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgIH;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAPlB,MAOkB,EAAE,OAAO,AANnC,CAIA,EAHA;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAA0B,aAAa,AAAvC,CACA,EADQ,OAAO,CACf;CAEwC,GAF9B,MAAM,
|
|
1
|
+
{"version":3,"file":"sarif.d.ts","sourceRoot":"","sources":["../../../../lib/validator/reporters/sarif.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgIH;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAPlB,MAOkB,EAAE,OAAO,AANnC,CAIA,EAHA;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAA0B,aAAa,AAAvC,CACA,EADQ,OAAO,CACf;CAEwC,GAF9B,MAAM,CAiDlB"}
|