@cdxgen/cdxgen 13.4.0 → 13.6.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 +9 -9
- package/bin/cdxgen-secure.js +15 -0
- package/bin/cdxgen.js +29 -5
- package/bin/evinse.js +8 -0
- package/bin/hbom.js +15 -7
- package/bin/repl.js +29 -0
- package/bin/validate.js +6 -0
- package/data/cbomosdb-queries.json +13 -1
- package/data/component-tags.json +8 -0
- package/data/license-aliases.json +24 -2
- package/data/queries-darwin.json +25 -1
- package/data/queries-win.json +19 -1
- package/data/queries.json +41 -0
- package/data/remediations.json +407 -1
- package/data/rules/ai-bom.yaml +1 -1
- package/data/rules/brotli-decoder.yaml +107 -0
- package/data/rules/cbom-security.yaml +235 -4
- package/data/rules/go-binaries.yaml +46 -0
- package/data/rules/golem-go.yaml +80 -0
- package/data/rules/hbom-compliance.yaml +40 -22
- package/data/rules/hbom-performance.yaml +7 -1
- package/data/rules/host-topology.yaml +1 -1
- package/data/rules/obom-runtime.yaml +31 -2
- package/data/rules/php-runtime.yaml +143 -0
- package/data/rules/vscode-extensions.yaml +75 -0
- package/data/spdx-license-list.json +121 -7
- package/data/spdx-licenses.json +69 -0
- package/data/spdx.schema.json +845 -2
- package/lib/audit/index.js +14 -0
- package/lib/cli/bomAssembly.js +120 -6
- package/lib/cli/cliOptions.js +110 -3
- package/lib/cli/index.js +182 -6
- package/lib/cli/jsBom.js +153 -64
- package/lib/cli/jvmBom.js +363 -66
- package/lib/cli/managedBom.js +853 -87
- package/lib/cli/nativeBom.js +267 -33
- package/lib/core/boundedFile.js +344 -0
- package/lib/core/brotliProbe.js +182 -0
- package/lib/core/env.js +38 -8
- package/lib/core/fs.js +40 -19
- package/lib/core/httpClient.js +172 -46
- package/lib/core/lockPaths.js +38 -0
- package/lib/core/paths.js +24 -1
- package/lib/core/processTree.js +5 -0
- package/lib/core/projectConfig.js +1 -0
- package/lib/core/projectTooling.js +97 -0
- package/lib/core/propertySanitizer.js +72 -0
- package/lib/core/toolRegistry.js +170 -0
- package/lib/ecosystems/cppEvidence.js +263 -106
- package/lib/ecosystems/cppIncludeResolver.js +16 -5
- package/lib/ecosystems/ecosystems.js +25 -10
- package/lib/ecosystems/gemHostProbe.js +301 -0
- package/lib/ecosystems/golem.js +550 -6
- package/lib/ecosystems/gradleutils.js +858 -244
- package/lib/ecosystems/parsers-bazel.js +107 -6
- package/lib/ecosystems/parsers-dotnet.js +117 -18
- package/lib/ecosystems/parsers-go.js +1090 -367
- package/lib/ecosystems/parsers-js.js +505 -22
- package/lib/ecosystems/parsers-jvm.js +259 -17
- package/lib/ecosystems/parsers-misc.js +438 -64
- package/lib/ecosystems/parsers-python.js +100 -12
- package/lib/ecosystems/pythonutils.js +128 -2
- package/lib/ecosystems/rubyutils.js +544 -34
- package/lib/ecosystems/rusi.js +10 -0
- package/lib/ecosystems/scalacliutils.js +4 -1
- package/lib/ecosystems/scalasem.js +798 -151
- package/lib/ecosystems/vendoredCode.js +237 -3
- package/lib/ecosystems/venvProbe.js +360 -0
- package/lib/evinser/evinser.js +472 -61
- package/lib/evinser/swiftsem.js +68 -5
- package/lib/helpers/agenticToolutils.js +413 -93
- package/lib/helpers/vsixutils.js +1574 -315
- package/lib/inventory/agentSkillSpec.js +17 -0
- package/lib/inventory/apkInstalledDb.js +243 -0
- package/lib/inventory/atomUtils.js +110 -0
- package/lib/inventory/auditCategories.js +3 -3
- package/lib/inventory/brotliDecoder.js +142 -0
- package/lib/inventory/buildToolRateLimit.js +1 -1
- package/lib/inventory/cacheDir.js +52 -9
- package/lib/inventory/cbomutils.js +56 -7
- package/lib/inventory/certificates.js +2371 -0
- package/lib/inventory/communityAiConfigParser.js +4 -9
- package/lib/inventory/deps.js +41 -4
- package/lib/inventory/display.js +200 -3
- package/lib/inventory/dosai.js +639 -63
- package/lib/inventory/dotnetRuntime.js +217 -0
- package/lib/inventory/dynamic.js +45 -3
- package/lib/inventory/envcontext.js +475 -18
- package/lib/inventory/evidenceUtils.js +447 -23
- package/lib/inventory/fetchBatch.js +1 -1
- package/lib/inventory/formulationParsers.js +32 -3
- package/lib/inventory/goBuildInfo.js +140 -0
- package/lib/inventory/gtfobins.js +13 -0
- package/lib/inventory/hbom.js +67 -7
- package/lib/inventory/hbomAnalysis.js +16 -0
- package/lib/inventory/hostRuntimeProbe.js +686 -0
- package/lib/inventory/hostTopology.js +21 -0
- package/lib/inventory/jvmLocalRepos.js +9 -2
- package/lib/inventory/jvmToolEnv.js +29 -0
- package/lib/inventory/licenseEnhancer.js +12 -0
- package/lib/inventory/mavenCentralMirror.js +534 -0
- package/lib/inventory/nodeBuildInfo.js +218 -0
- package/lib/inventory/nodeHostProbe.js +202 -0
- package/lib/inventory/osPackagePurl.js +244 -0
- package/lib/inventory/osPackageResolver.js +271 -87
- package/lib/inventory/osinfo.js +79 -31
- package/lib/inventory/osqueryTransform.js +114 -5
- package/lib/inventory/phpBuildInfo.js +438 -0
- package/lib/inventory/phpHostProbe.js +185 -0
- package/lib/inventory/rootfsCerts.js +426 -0
- package/lib/inventory/rubyBuildInfo.js +972 -0
- package/lib/inventory/rubyHostProbe.js +218 -0
- package/lib/inventory/scalaCoords.js +4 -3
- package/lib/inventory/scalaDedupe.js +440 -0
- package/lib/inventory/source.js +256 -5
- package/lib/inventory/spdx.js +144 -0
- package/lib/inventory/traceRunner.js +5 -1
- package/lib/inventory/tracedCrypto.js +129 -0
- package/lib/managers/binary.js +866 -186
- package/lib/managers/docker.js +245 -12
- package/lib/parsers/email.js +277 -0
- package/lib/parsers/largeJson.js +62 -13
- package/lib/parsers/vscodeExtensionId.js +183 -0
- package/lib/server/server.js +198 -2
- package/lib/stages/postgen/annotator.js +17 -1
- package/lib/stages/postgen/introspection/reflect.js +4 -1
- package/lib/stages/postgen/postgen.js +5 -5
- package/lib/stages/postgen/ruleEngine.js +71 -6
- package/lib/stages/postgen/specVersionCompat.js +30 -0
- package/lib/stages/pregen/envAudit.js +1 -0
- package/lib/stages/pregen/pregen.js +231 -62
- package/lib/validator/bomValidator.js +32 -6
- package/lib/validator/generated/runtime.mjs +13 -0
- package/lib/validator/generated/validate-1.6.mjs +27 -8
- package/lib/validator/generated/validate-1.7.mjs +32 -13
- package/lib/validator/generated/validate-2.0.mjs +31 -12
- package/lib/validator/index.js +1 -1
- package/package.json +19 -18
- package/types/bin/cdxgen-secure.d.ts +3 -0
- package/types/bin/cdxgen-secure.d.ts.map +1 -0
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +22 -3
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +43 -0
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts +1 -17
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts +20 -0
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/boundedFile.d.ts +70 -0
- package/types/lib/core/boundedFile.d.ts.map +1 -0
- package/types/lib/core/brotliProbe.d.ts +37 -0
- package/types/lib/core/brotliProbe.d.ts.map +1 -0
- package/types/lib/core/env.d.ts +22 -2
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/httpClient.d.ts +24 -0
- package/types/lib/core/httpClient.d.ts.map +1 -1
- package/types/lib/core/lockPaths.d.ts +19 -0
- package/types/lib/core/lockPaths.d.ts.map +1 -0
- package/types/lib/core/processTree.d.ts +2 -0
- package/types/lib/core/processTree.d.ts.map +1 -1
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/projectTooling.d.ts +41 -0
- package/types/lib/core/projectTooling.d.ts.map +1 -0
- package/types/lib/core/propertySanitizer.d.ts +26 -0
- package/types/lib/core/propertySanitizer.d.ts.map +1 -1
- package/types/lib/core/toolRegistry.d.ts +36 -0
- package/types/lib/core/toolRegistry.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +40 -13
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts +2 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/gemHostProbe.d.ts +28 -0
- package/types/lib/ecosystems/gemHostProbe.d.ts.map +1 -0
- package/types/lib/ecosystems/golem.d.ts +81 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +57 -21
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-bazel.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +40 -4
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-go.d.ts +85 -13
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +17 -20
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts +28 -2
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +37 -58
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +14 -3
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +19 -1
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +144 -12
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
- package/types/lib/ecosystems/vendoredCode.d.ts +26 -0
- package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -1
- package/types/lib/ecosystems/venvProbe.d.ts +40 -0
- package/types/lib/ecosystems/venvProbe.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +88 -8
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +10 -0
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
- package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
- package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
- package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +33 -0
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/brotliDecoder.d.ts +58 -0
- package/types/lib/inventory/brotliDecoder.d.ts.map +1 -0
- package/types/lib/inventory/cacheDir.d.ts +12 -4
- package/types/lib/inventory/cacheDir.d.ts.map +1 -1
- package/types/lib/inventory/cbomutils.d.ts +17 -0
- package/types/lib/inventory/cbomutils.d.ts.map +1 -1
- package/types/lib/inventory/certificates.d.ts +205 -0
- package/types/lib/inventory/certificates.d.ts.map +1 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/deps.d.ts +2 -1
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts +18 -0
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +162 -7
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dotnetRuntime.d.ts +44 -0
- package/types/lib/inventory/dotnetRuntime.d.ts.map +1 -0
- package/types/lib/inventory/dynamic.d.ts +6 -1
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts +92 -8
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +29 -10
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
- package/types/lib/inventory/goBuildInfo.d.ts +10 -0
- package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/gtfobins.d.ts.map +1 -1
- package/types/lib/inventory/hbom.d.ts.map +1 -1
- package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
- package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
- package/types/lib/inventory/hostRuntimeProbe.d.ts +44 -0
- package/types/lib/inventory/hostRuntimeProbe.d.ts.map +1 -0
- package/types/lib/inventory/hostTopology.d.ts.map +1 -1
- package/types/lib/inventory/jvmToolEnv.d.ts +12 -0
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
- package/types/lib/inventory/licenseEnhancer.d.ts.map +1 -1
- package/types/lib/inventory/mavenCentralMirror.d.ts +170 -0
- package/types/lib/inventory/mavenCentralMirror.d.ts.map +1 -0
- package/types/lib/inventory/nodeBuildInfo.d.ts +95 -0
- package/types/lib/inventory/nodeBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/nodeHostProbe.d.ts +15 -0
- package/types/lib/inventory/nodeHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/osPackagePurl.d.ts +99 -0
- package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +44 -2
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
- package/types/lib/inventory/osinfo.d.ts +31 -6
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/osqueryTransform.d.ts +51 -0
- package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
- package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
- package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/phpHostProbe.d.ts +35 -0
- package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/rootfsCerts.d.ts +27 -0
- package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
- package/types/lib/inventory/rubyBuildInfo.d.ts +271 -0
- package/types/lib/inventory/rubyBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/rubyHostProbe.d.ts +47 -0
- package/types/lib/inventory/rubyHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts +38 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +15 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +4 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +22 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts +10 -0
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +24 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/parsers/email.d.ts +19 -0
- package/types/lib/parsers/email.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +17 -3
- package/types/lib/parsers/largeJson.d.ts.map +1 -1
- package/types/lib/server/server.d.ts +8 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +26 -9
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MAX_BROTLI_PROBE_BYTES, MAX_BROTLI_PROBES, readBrotliDecoder } from "../core/brotliProbe.js";
|
|
2
|
+
export { MAX_BROTLI_PROBE_BYTES, MAX_BROTLI_PROBES, readBrotliDecoder };
|
|
3
|
+
/**
|
|
4
|
+
* The properties a file component carries once it has been probed: the fix
|
|
5
|
+
* state of each decoder found in it, or why it could not be read.
|
|
6
|
+
*
|
|
7
|
+
* @param {Object} decoder result of readBrotliDecoder
|
|
8
|
+
* @returns {{name: string, value: string}[]} properties to append
|
|
9
|
+
*/
|
|
10
|
+
export declare function brotliDecoderProperties(decoder: Object): {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
/**
|
|
15
|
+
* The library component every embedded decoder links to. It has no version:
|
|
16
|
+
* no build records one, and only the per-file cdx:brotli:*:blockSwitchFix
|
|
17
|
+
* properties say whether a copy is vulnerable. The `vcs_url` qualifier names
|
|
18
|
+
* the project and keeps the identity apart from an unpackaged `brotli`
|
|
19
|
+
* executable, which is `pkg:generic/brotli`. The purl has no namespace: a
|
|
20
|
+
* `pkg:github` purl is typed as an application and `pkg:generic/google` as a
|
|
21
|
+
* framework when the BOM is assembled, and this is neither.
|
|
22
|
+
*
|
|
23
|
+
* @returns {Object} component with `purl` and `bom-ref`
|
|
24
|
+
*/
|
|
25
|
+
export declare function createBrotliComponent(): Object;
|
|
26
|
+
/**
|
|
27
|
+
* Start collecting the decoder copies of one scan.
|
|
28
|
+
*
|
|
29
|
+
* @returns {{component: Object|undefined, dependencies: Object[], copies: number, unpatched: number, unknown: number}}
|
|
30
|
+
*/
|
|
31
|
+
export declare function createBrotliInventory(): {
|
|
32
|
+
component: Object | undefined;
|
|
33
|
+
dependencies: Object[];
|
|
34
|
+
copies: number;
|
|
35
|
+
unpatched: number;
|
|
36
|
+
unknown: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Tag a probed file component and, when it holds a decoder, link it to the
|
|
40
|
+
* shared brotli component, creating that component on first use. Mutates the
|
|
41
|
+
* file component in place.
|
|
42
|
+
*
|
|
43
|
+
* @param {Object} inventory accumulator from createBrotliInventory
|
|
44
|
+
* @param {Object} fileComponent file component with a `properties` array
|
|
45
|
+
* @param {Object} decoder result of readBrotliDecoder
|
|
46
|
+
*/
|
|
47
|
+
export declare function attachBrotliDecoder(inventory: Object, fileComponent: Object, decoder: Object): void;
|
|
48
|
+
/**
|
|
49
|
+
* Finish an inventory: record the copy counts on the brotli component.
|
|
50
|
+
*
|
|
51
|
+
* @param {Object} inventory accumulator from createBrotliInventory
|
|
52
|
+
* @returns {{components: Object[], dependencies: Object[]}} what to add to the BOM
|
|
53
|
+
*/
|
|
54
|
+
export declare function finishBrotliInventory(inventory: Object): {
|
|
55
|
+
components: Object[];
|
|
56
|
+
dependencies: Object[];
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=brotliDecoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brotliDecoder.d.ts","sourceRoot":"","sources":["../../../lib/inventory/brotliDecoder.js"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;AAExE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAHpC,MAGoC,GAFlC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CAoB3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CAiBlB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB;IAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAUrH;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAJlC,MAIkC,EAAE,aAAa,EAHjD,MAGiD,EAAE,OAAO,EAF1D,MAE0D,QAyBpE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAHpC,MAGoC,GAFlC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAkB1D"}
|
|
@@ -21,13 +21,21 @@
|
|
|
21
21
|
* rather than reading `isWin`/`isMac` here, or the Windows and Linux branches
|
|
22
22
|
* become untestable on a macOS developer machine.
|
|
23
23
|
*
|
|
24
|
+
* Every environment-derived root must be absolute by the *target* platform's
|
|
25
|
+
* rules, never the host's (`path.isAbsolute` would accept `\cache` on a
|
|
26
|
+
* Windows host): a relative value is ignored, so it cannot point inside the
|
|
27
|
+
* working directory. XDG requires this of `XDG_CACHE_HOME`; the home and
|
|
28
|
+
* `LOCALAPPDATA` roots get the same treatment for the same reason.
|
|
29
|
+
*
|
|
24
30
|
* @param {Object} inputs Resolution inputs.
|
|
25
31
|
* @param {"linux"|"macos"|"windows"} inputs.platform Which convention to apply.
|
|
26
|
-
* @param {string} [inputs.cdxgenCacheDir] `CDXGEN_CACHE_DIR
|
|
32
|
+
* @param {string} [inputs.cdxgenCacheDir] `CDXGEN_CACHE_DIR`, an explicit
|
|
33
|
+
* override taken as given.
|
|
27
34
|
* @param {string} [inputs.xdgCacheHome] `XDG_CACHE_HOME`. Ignored unless
|
|
28
|
-
*
|
|
29
|
-
* @param {string} [inputs.home] Home directory.
|
|
30
|
-
* @param {string} [inputs.localAppData] `LOCALAPPDATA`.
|
|
35
|
+
* `/`-rooted.
|
|
36
|
+
* @param {string} [inputs.home] Home directory. Ignored unless absolute.
|
|
37
|
+
* @param {string} [inputs.localAppData] `LOCALAPPDATA`. Ignored unless drive-
|
|
38
|
+
* or UNC-rooted; the home profile is the fallback.
|
|
31
39
|
* @returns {string|null} Absolute path, or null when nothing resolves.
|
|
32
40
|
*/
|
|
33
41
|
export declare function resolveCacheDirFor({ platform, cdxgenCacheDir, xdgCacheHome, home, localAppData, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cacheDir.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cacheDir.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH
|
|
1
|
+
{"version":3,"file":"cacheDir.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cacheDir.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,IAAI,EACJ,YAAY,GACb,EAhBE;IAA0C,QAAQ,EAA1C,OAAO,GAAC,OAAO,GAAC,SAAS,CACjC;IAAwB,cAAc,AAAtC,CAEA,EAFQ,MAAM,CAEd;IAAwB,YAAY,AAApC,CAEA,EAFQ,MAAM,CAEd;IAAwB,IAAI,AAA5B,CACA,EADQ,MAAM,CACd;IAAwB,YAAY,AAApC,CAEA,EAFQ,MAAM,CAEd;CAQF,GARY,MAAM,GAAC,IAAI,CA6BvB;AA+CD;;;;;GAKG;AACH,wBAAgB,eAAe,IAHlB,MAAM,GAAC,IAAI,CAWvB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,MAAM,CAIlB"}
|
|
@@ -30,6 +30,23 @@ export declare function collectDosaiCryptoComponents(src: string, options?: obje
|
|
|
30
30
|
/**
|
|
31
31
|
* Find crypto algorithm in the given code snippet
|
|
32
32
|
*
|
|
33
|
+
* cleanStr fuses the snippet's identifiers into one lowercase string
|
|
34
|
+
* (`prepare_for_save(iv` becomes `prepareforsaveiv`), so a plain substring
|
|
35
|
+
* test reads short algorithm names inside unrelated identifiers (`rsa` in
|
|
36
|
+
* `for_save`). A name therefore matches only where a cleanStr word begins:
|
|
37
|
+
* the snippet's start, right after any character cleanStr strips or keeps as
|
|
38
|
+
* a separator, or at a lowercase-to-uppercase change in the original text
|
|
39
|
+
* (`SHA256withRSA`, `HmacSHA256`, `PBKDF2WithHmacSHA256`,
|
|
40
|
+
* `generateRsaKeyPair`). Boundaries are computed from the original string
|
|
41
|
+
* before it is lowercased, so case changes survive the cleanStr fusion.
|
|
42
|
+
* Letter/digit changes do not start a word: they added no match on any
|
|
43
|
+
* reviewed form or corpus snippet, while splitting every digit-bearing
|
|
44
|
+
* identifier (`md5`, `base64`) into false word starts. Fused forms the names
|
|
45
|
+
* themselves are written in still match: `algorithms.AES(key)` and
|
|
46
|
+
* `AESGCM(key)` yield `aes`, `AES-256-GCM` yields `aes256-GCM`,
|
|
47
|
+
* `createHash("sha256")` yields `sha-256`. All-uppercase fused forms
|
|
48
|
+
* (`HMACSHA256`) still hide every name but the run's first.
|
|
49
|
+
*
|
|
33
50
|
* @param {string} code Code snippet
|
|
34
51
|
* @returns {Array} Arary of crypto algorithm objects with oid and description
|
|
35
52
|
*/
|
|
@@ -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;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
|
|
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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAHzB,MAGyB,SA6CnC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
export declare function toLowerHex(value: any): any;
|
|
2
|
+
export declare function normalizeSerialHex(value: any): string | undefined;
|
|
3
|
+
export declare function serialDecimalToHex(value: any): string | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Split PEM text into labelled blocks without decoding them. Only the label
|
|
6
|
+
* line and the matching END line matter; the caller decides which labels to
|
|
7
|
+
* parse. Bounded by block count and total decoded size.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} text file contents
|
|
10
|
+
* @returns {{label: string, body: string}[]} blocks in file order
|
|
11
|
+
*/
|
|
12
|
+
export declare function splitPemBlocks(text: string): {
|
|
13
|
+
label: string;
|
|
14
|
+
body: string;
|
|
15
|
+
}[];
|
|
16
|
+
/**
|
|
17
|
+
* Decode the CERTIFICATE blocks of a PEM bundle (RFC 7468) into DER buffers.
|
|
18
|
+
* `TRUSTED CERTIFICATE` blocks (OpenSSL aux data after the DER) are not
|
|
19
|
+
* decoded here; the trustinspector plugin parses their trust/reject lists.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} text PEM file contents
|
|
22
|
+
* @returns {Buffer[]} DER buffers in file order
|
|
23
|
+
*/
|
|
24
|
+
export declare function pemCertificateDerBlocks(text: string): Buffer[];
|
|
25
|
+
export declare function privateKeyPemFormat(text: any): "DSA" | "EC" | "ENCRYPTED-PKCS8" | "OPENSSH" | "PKCS8" | "RSA" | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* A PEM public key (RFC 7468 PUBLIC KEY label) also classifies a matched
|
|
28
|
+
* file as key material rather than a certificate.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} text file contents
|
|
31
|
+
* @returns {boolean} true when a PUBLIC KEY block is present
|
|
32
|
+
*/
|
|
33
|
+
export declare function hasPemPublicKey(text: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Walk a certificate DER far enough to learn what the platform parsers may
|
|
36
|
+
* not report: the SubjectPublicKeyInfo (for the SPKI hash and key algorithm
|
|
37
|
+
* OID), the outer signature algorithm OID, the X.509 version, the subject and
|
|
38
|
+
* issuer name DER (byte equality = self-issued), and the SKI/AKI key
|
|
39
|
+
* identifiers (RFC 5280 sections 4.1, 4.2.1.1, 4.2.1.2). Malformed input
|
|
40
|
+
* yields undefined; nothing throws.
|
|
41
|
+
*
|
|
42
|
+
* @param {Buffer} der certificate DER, at most MAX_CERT_DER_BYTES
|
|
43
|
+
* @returns {object|undefined} parsed fields
|
|
44
|
+
*/
|
|
45
|
+
export declare function parseCertificateDer(der: Buffer): object | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Name a key algorithm the way the BOM model requires: the post-quantum table
|
|
48
|
+
* first, then classical names derived from the SPKI OID and key size, never
|
|
49
|
+
* the platform's own name for an algorithm it may not know. Names agree with
|
|
50
|
+
* trustinspector's (`RSA-2048`, `ECDSA-P256`, `Ed25519`, `ML-DSA-65`);
|
|
51
|
+
* unknown algorithms keep their dotted OID.
|
|
52
|
+
*
|
|
53
|
+
* @param {object} context `{oid, curveOid, bits}` from the DER walk or report
|
|
54
|
+
* @returns {string|undefined} key name such as `ML-DSA-65`, `RSA-2048`, `ECDSA-P256`
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* The family name for a key algorithm component: like
|
|
58
|
+
* {@link keyAlgorithmName} but without the key-size suffix, so every key
|
|
59
|
+
* size sharing an OID (RSA-1024 and RSA-2048, ECDSA P-256 and P-384)
|
|
60
|
+
* references the same single algorithm component. Post-quantum names are
|
|
61
|
+
* already family names (`ML-DSA-65`).
|
|
62
|
+
*
|
|
63
|
+
* @param {string} oid SPKI algorithm OID
|
|
64
|
+
* @returns {string|undefined} family name such as `RSA`, `ECDSA`, `ML-DSA-65`
|
|
65
|
+
*/
|
|
66
|
+
export declare function keyAlgorithmFamilyName(oid: string): string | undefined;
|
|
67
|
+
export declare function keyAlgorithmName(context: any): any;
|
|
68
|
+
/**
|
|
69
|
+
* Name a signature algorithm: the post-quantum table, then Go's classical
|
|
70
|
+
* names, then the dotted OID. Never "0" or "unknown".
|
|
71
|
+
*
|
|
72
|
+
* @param {object} context `{oid}` or a trusted producer name
|
|
73
|
+
* @returns {string|undefined} signature name such as `ML-DSA-65`, `SHA256-RSA`
|
|
74
|
+
*/
|
|
75
|
+
export declare function signatureAlgorithmName(context: object): string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Metadata for an algorithm component: primitive, parameter set and NIST
|
|
78
|
+
* quantum security level from the post-quantum table; classical algorithms
|
|
79
|
+
* carry level 0, which is a fact, not a policy.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} oid dotted algorithm OID
|
|
82
|
+
* @param {string} kind `"signature"` or `"kem"`/key use
|
|
83
|
+
* @returns {object} `{primitive, parameterSetIdentifier, nistQuantumSecurityLevel}` when known
|
|
84
|
+
*/
|
|
85
|
+
export declare function algorithmComponentMetadata(oid: string): object;
|
|
86
|
+
export declare function commonNameFromDn(dn: any): string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Normalise a trustinspector material (report-1 or report-2) into a
|
|
89
|
+
* certificate record. Returns undefined for non-certificate kinds.
|
|
90
|
+
*
|
|
91
|
+
* @param {object} material trustinspector material
|
|
92
|
+
* @param {object} [context] `{locationRoot}` to relativise container paths
|
|
93
|
+
* @returns {object|undefined} record
|
|
94
|
+
*/
|
|
95
|
+
export declare function certRecordFromTrustInspector(material: object, context?: object): object | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Build a certificate record from a parsed certificate (Node fallback path).
|
|
98
|
+
* The DER walk supplies the SPKI, algorithm OIDs, version and key
|
|
99
|
+
* identifiers; the X509Certificate supplies names, validity and, on runtimes
|
|
100
|
+
* that expose them, the signature algorithm. Fields the platform cannot
|
|
101
|
+
* provide (key usage bits, path length) stay unset and are documented as
|
|
102
|
+
* fallback limits.
|
|
103
|
+
*
|
|
104
|
+
* @param {Buffer} der certificate DER
|
|
105
|
+
* @param {object} context `{location, sourceType, pem}`
|
|
106
|
+
* @returns {object|undefined} record
|
|
107
|
+
*/
|
|
108
|
+
export declare function certRecordFromDer(der: Buffer, context?: object): object | undefined;
|
|
109
|
+
export declare function toWellFormedText(value: any): string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Normalise one certificate of the chain a server presented in a TLS ≤ 1.2
|
|
112
|
+
* handshake, as safer-exec's crypto result relays it (leaf first). The entry
|
|
113
|
+
* carries no DER: identity is the two SHA-256 digests, and the server's
|
|
114
|
+
* ordering is untrusted input, so the record carries no issuer edges and no
|
|
115
|
+
* SKI/AKI. Fields safer-exec already classified per PLAN section 2.5
|
|
116
|
+
* (selfSigned, keyName, signatureAlgorithm) are taken as given; `role` is
|
|
117
|
+
* re-derived from them with the same rule as the DER path.
|
|
118
|
+
*
|
|
119
|
+
* @param {object} entry safer-exec CertChainEntry
|
|
120
|
+
* @param {object} [context] `{host}` the safer-exec `host:port` the chain was
|
|
121
|
+
* presented to; the occurrence `tls://<host>` is omitted without it
|
|
122
|
+
* @returns {object|undefined} record, or undefined when the entry has no
|
|
123
|
+
* usable certificate hash
|
|
124
|
+
*/
|
|
125
|
+
export declare function certRecordFromObservedChainEntry(entry: object, context?: object): object | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Pairwise issuer linking over records parsed in one collection
|
|
128
|
+
* (`certRecordFromDer` output). A verified edge needs the signature to check;
|
|
129
|
+
* an uncheckable signature over chained names and key identifiers goes to
|
|
130
|
+
* issuersUnverified. Capped at ISSUER_LINK_LIMIT certificates.
|
|
131
|
+
*
|
|
132
|
+
* @param {object[]} records records from certRecordFromDer
|
|
133
|
+
*/
|
|
134
|
+
export declare function linkFallbackIssuers(records: object[]): void;
|
|
135
|
+
/**
|
|
136
|
+
* Relativise a host path against a scan root so producers agree on
|
|
137
|
+
* locations: `/tmp/x/rootfs/etc/ssl` with root `/tmp/x/rootfs` becomes
|
|
138
|
+
* `/etc/ssl` (PLAN section 4.4, G18).
|
|
139
|
+
*
|
|
140
|
+
* @param {string} location host or already-relative path
|
|
141
|
+
* @param {string} [root] scan root to strip
|
|
142
|
+
* @returns {string} normalised container-style path
|
|
143
|
+
*/
|
|
144
|
+
export declare function containerRelativePath(location: string, root?: string): string;
|
|
145
|
+
/**
|
|
146
|
+
* Collects certificate records from any producer, deduplicates them by
|
|
147
|
+
* certificate SHA-256 and builds the shared component model: one certificate
|
|
148
|
+
* component per certificate, one public-key component per SPKI, algorithm
|
|
149
|
+
* components, and verified issuer `dependsOn` edges.
|
|
150
|
+
*/
|
|
151
|
+
export declare class CertificateCollector {
|
|
152
|
+
recordsBySha: Map<any, any>;
|
|
153
|
+
pins: any[];
|
|
154
|
+
constructor();
|
|
155
|
+
addRecord(record: any): void;
|
|
156
|
+
addRecords(records: any): void;
|
|
157
|
+
addTrustInspectorMaterials(materials: any, context: any): void;
|
|
158
|
+
addPin({ spkiSha256, location }: {
|
|
159
|
+
location: any;
|
|
160
|
+
spkiSha256: any;
|
|
161
|
+
}): void;
|
|
162
|
+
/**
|
|
163
|
+
* Build the shared model. Deterministic: components and dependency lists
|
|
164
|
+
* are sorted, and no map iteration order reaches the output.
|
|
165
|
+
*
|
|
166
|
+
* @returns {{components: object[], dependencies: object[]}}
|
|
167
|
+
*/
|
|
168
|
+
build(): {
|
|
169
|
+
components: object[];
|
|
170
|
+
dependencies: object[];
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The file a certificate occurrence lives in. A Kubernetes secret occurrence
|
|
175
|
+
* is `<file>#data.tls.crt` (or `#stringData.ca.crt`); the file path is what
|
|
176
|
+
* internal:SrcFile records.
|
|
177
|
+
*
|
|
178
|
+
* @param {string} location occurrence location
|
|
179
|
+
* @returns {string} file path without the secret key fragment
|
|
180
|
+
*/
|
|
181
|
+
export declare function srcFileOfLocation(location: string): string;
|
|
182
|
+
/**
|
|
183
|
+
* Merge already-built certificate/public-key components that describe the
|
|
184
|
+
* same asset (same bom-ref), unioning occurrences and properties. Used at the
|
|
185
|
+
* final assembly step where producer component lists meet.
|
|
186
|
+
*
|
|
187
|
+
* @param {object[]} components component list, possibly with crypto duplicates
|
|
188
|
+
* @returns {object[]} component list with certificate duplicates merged
|
|
189
|
+
*/
|
|
190
|
+
export declare function mergeDuplicateCryptoComponents(components: object[]): object[];
|
|
191
|
+
export declare function kubernetesTlsSecretRecords(yamlText: any, { file }?: {}): object[];
|
|
192
|
+
export declare function androidNetworkSecurityConfigPins(xmlText: any, { file }?: {}): any[];
|
|
193
|
+
/**
|
|
194
|
+
* Classify a matched file by its content: certificates (PEM bundle or DER),
|
|
195
|
+
* a PEM private-key header, a GPG key, a PEM public key, or a keystore
|
|
196
|
+
* container the fallback cannot read. Nothing is decoded beyond what the
|
|
197
|
+
* header lines and a bounded DER walk reveal.
|
|
198
|
+
*
|
|
199
|
+
* @param {Buffer} bytes file contents (already size-capped by the caller)
|
|
200
|
+
* @returns {object} one of `{kind:"certificates", ders}`,
|
|
201
|
+
* `{kind:"private-key", format}`, `{kind:"gpg"}`, `{kind:"public-key"}`,
|
|
202
|
+
* `{kind:"keystore", format}` or `{kind:"unknown"}`
|
|
203
|
+
*/
|
|
204
|
+
export declare function classifyCryptoFile(bytes: Buffer): object;
|
|
205
|
+
//# sourceMappingURL=certificates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../../lib/inventory/certificates.js"],"names":[],"mappings":"AAsIA,wBAAgB,UAAU,CAAC,KAAK,KAAA,OAE/B;AAWD,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,sBASvC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,sBASvC;AAMD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAHxB,MAGwB,GAFtB;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EAAE,CA+B3C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAHjC,MAGiC,GAF/B,MAAM,EAAE,CAqBpB;AAcD,wBAAgB,mBAAmB,CAAC,IAAI,KAAA,8EAqBvC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAHzB,MAGyB,GAFvB,OAAO,CAInB;AA+FD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAH5B,MAG4B,GAF1B,MAAM,GAAC,SAAS,CA0H5B;AA4GD;;;;;;;;;GASG;AACH;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,MAG+B,GAF7B,MAAM,GAAC,SAAS,CAmB5B;AAED,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,OA6BvC;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAHnC,MAGmC,GAFjC,MAAM,GAAC,SAAS,CAY5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AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,CASlB;AAsCD;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAH9C,MAAM,EAGwC,GAF5C,MAAM,EAAE,CAyEpB;AA6BD,wBAAgB,0BAA0B,CAAC,QAAQ,KAAA,EAAE,EAAE,IAAI,EAAE,KAAK,YAwDjE;AAKD,wBAAgB,gCAAgC,CAAC,OAAO,KAAA,EAAE,EAAE,IAAI,EAAE,KAAK,SAuDtE;AA+CD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAL7B,MAK6B,GAJ3B,MAAM,CAoDlB"}
|
|
@@ -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":"AAs1BA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAL1B,MAsGT,CAAC"}
|
|
@@ -9,7 +9,8 @@ export declare function isDocumentationJar(jarName: string): boolean;
|
|
|
9
9
|
* Collect maven dependencies
|
|
10
10
|
*
|
|
11
11
|
* @param {string} mavenCmd Maven command to use
|
|
12
|
-
* @param {string} basePath Path to the maven project
|
|
12
|
+
* @param {string} basePath Path to the maven project. Without it Maven is not
|
|
13
|
+
* run, and only the local repository is read when includeCacheDir is set.
|
|
13
14
|
* @param {boolean} cleanup Remove temporary directories
|
|
14
15
|
* @param {boolean} includeCacheDir Include maven and gradle cache directories
|
|
15
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../lib/inventory/deps.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../lib/invent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;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAJtB,MAAM,GAAC,MAIe,EAAE,CAAC,EAHzB,MAAM,GAAC,MAGkB,GAFvB,MAAM,CAWlB"}
|
|
@@ -224,4 +224,22 @@ export declare function printEnvironmentAuditFindings(envAuditFindings?: EnvAudi
|
|
|
224
224
|
* @param {EnvAuditFinding[]} envAuditFindings Audit findings to display
|
|
225
225
|
*/
|
|
226
226
|
export declare function displaySelfThreatModel(filePath: string, config: Object, options: Object, envAuditFindings: EnvAuditFinding[]): void;
|
|
227
|
+
/**
|
|
228
|
+
* Print a table of the BOM's certificate components: role, name, issuer,
|
|
229
|
+
* expiry, the SPKI prefix and how many locations each certificate appears
|
|
230
|
+
* in, with a marker when the audit flagged it.
|
|
231
|
+
*
|
|
232
|
+
* @param {Object} bomJson CycloneDX BOM JSON object
|
|
233
|
+
* @returns {void}
|
|
234
|
+
*/
|
|
235
|
+
export declare function printCertificatesTable(bomJson: Object): void;
|
|
236
|
+
/**
|
|
237
|
+
* Print the issuer chain above a certificate and the certificates issued
|
|
238
|
+
* under it, walking the verified `dependsOn` edges.
|
|
239
|
+
*
|
|
240
|
+
* @param {Object} bomJson CycloneDX BOM JSON object
|
|
241
|
+
* @param {string} selector bom-ref, SPKI hex prefix or certificate ref prefix
|
|
242
|
+
* @returns {void}
|
|
243
|
+
*/
|
|
244
|
+
export declare function printCertificateChain(bomJson: Object, selector: string): void;
|
|
227
245
|
//# sourceMappingURL=display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../lib/inventory/display.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../lib/inventory/display.js"],"names":[],"mappings":"AAyKA;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAHnC,MAGmC,GAFjC,MAAM,EAAE,CAkFpB;AAED;;;;GAIG;AACH,wBAAgB,kBA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C;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CAAiB;AA6DrH;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,gBAAgB,GAHnD,eAAe,EAGyC,GAFtD,IAAI,CA+BhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EANC,MAMD,EACR,MAAM,EANG,MAMH,EACN,OAAO,EANE,MAMF,EACP,gBAAgB,EANP,eAAe,EAMR,QAgUjB;AAiCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAHnC,MAGmC,GAFjC,IAAI,CAkDhB;AAUD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAJlC,MAIkC,EAAE,QAAQ,EAH5C,MAG4C,GAF1C,IAAI,CA0EhB"}
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The .NET runtime a framework-dependent dosai needs, read from the error the
|
|
3
|
+
* .NET host prints when it refuses to start dosai.
|
|
4
|
+
*
|
|
5
|
+
* When an older runtime is installed, the host names the exact framework
|
|
6
|
+
* version it looked for. When it finds no .NET at all, it names only its own
|
|
7
|
+
* version. The app host comes from the pack of the runtime the app targets, so
|
|
8
|
+
* its major version is still the .NET release to install.
|
|
9
|
+
*
|
|
10
|
+
* @param {Object|string} resultOrOutput spawnSync result, or the text it printed
|
|
11
|
+
* @returns {{version: (string|undefined), major: (string|undefined)}|undefined}
|
|
12
|
+
* The framework version, when the host named it, and the .NET major version;
|
|
13
|
+
* undefined when the output is not a .NET host launch failure
|
|
14
|
+
*/
|
|
15
|
+
export declare function dosaiDotnetRequirement(resultOrOutput: Object | string): {
|
|
16
|
+
version: (string | undefined);
|
|
17
|
+
major: (string | undefined);
|
|
18
|
+
} | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* What stopped dosai from starting, for warnings and ledger details.
|
|
21
|
+
*
|
|
22
|
+
* @param {{version: (string|undefined), major: (string|undefined)}} [requirement] Result of dosaiDotnetRequirement
|
|
23
|
+
* @returns {string} A clause naming the missing .NET runtime when it is known
|
|
24
|
+
*/
|
|
25
|
+
export declare function dosaiDotnetRequirementDetail(requirement?: {
|
|
26
|
+
version: (string | undefined);
|
|
27
|
+
major: (string | undefined);
|
|
28
|
+
}): string;
|
|
29
|
+
/**
|
|
30
|
+
* How to get dosai running when the .NET host refused to start it.
|
|
31
|
+
*
|
|
32
|
+
* @param {{version: (string|undefined), major: (string|undefined)}} [requirement] Result of dosaiDotnetRequirement
|
|
33
|
+
* @returns {string} Install instructions, naming the .NET major version when it is known
|
|
34
|
+
*/
|
|
35
|
+
export declare function dosaiDotnetRequirementAdvice(requirement?: {
|
|
36
|
+
version: (string | undefined);
|
|
37
|
+
major: (string | undefined);
|
|
38
|
+
}): string;
|
|
1
39
|
/**
|
|
2
40
|
* Translate cdxgen --exclude globs into dosai --exclude globs.
|
|
3
41
|
*
|
|
@@ -41,24 +79,89 @@ export declare function isDosaiDotnetLanguage(language: string): boolean;
|
|
|
41
79
|
* @returns {Object|undefined} Parsed JSON content, or undefined when missing or invalid
|
|
42
80
|
*/
|
|
43
81
|
export declare function readDosaiJsonFile(jsonFile: string): Object | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The `--sections` value that writes exactly the sections cdxgen reads.
|
|
84
|
+
*
|
|
85
|
+
* Passed as `dosaiMethodsSections` by callers that know their run will not
|
|
86
|
+
* need the whole report (see {@link runsEvidenceAnalysis}); an older dosai
|
|
87
|
+
* that rejects `--sections` falls back to the full report on its own.
|
|
88
|
+
*
|
|
89
|
+
* @returns {string} Comma-separated section list for dosai `--sections`
|
|
90
|
+
*/
|
|
91
|
+
export declare function dosaiMethodsSectionsArgument(): string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this scan will run the evidence (evinse) analysis.
|
|
94
|
+
*
|
|
95
|
+
* One place answers for both the trim decision in `createCsharpBom` and the
|
|
96
|
+
* evinse gate in `bin/cdxgen.js`: `--evidence` alone runs it, and so does
|
|
97
|
+
* `--include-crypto` alone, after profiles are applied (`--profile research`
|
|
98
|
+
* turns on both). Testing `options.evidence` alone would trim a report that
|
|
99
|
+
* `--include-crypto` then needs full.
|
|
100
|
+
*
|
|
101
|
+
* @param {Object} options Scan options after profile expansion
|
|
102
|
+
* @returns {boolean} True when the scan will run evinse
|
|
103
|
+
*/
|
|
104
|
+
export declare function runsEvidenceAnalysis(options: Object): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The top-level sections a dosai methods report left out, empty for a full
|
|
107
|
+
* report. dosai v4 reports have no `OmittedSections`, so they count as full.
|
|
108
|
+
*
|
|
109
|
+
* @param {Object} [report] A dosai methods report as read by readDosaiMethodsReport
|
|
110
|
+
* @returns {string[]} The omitted section names
|
|
111
|
+
*/
|
|
112
|
+
export declare function dosaiOmittedSections(report?: Object): string[];
|
|
113
|
+
/**
|
|
114
|
+
* The top-level sections a dosai methods report file left out, read from its
|
|
115
|
+
* Metadata alone. dosai writes Metadata first, so this reads only the head of
|
|
116
|
+
* the file, however large the report is. A missing or unreadable file counts
|
|
117
|
+
* as full: the read that follows reports it.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} reportFile Path to the dosai methods JSON
|
|
120
|
+
* @returns {string[]} The omitted section names
|
|
121
|
+
*/
|
|
122
|
+
export declare function dosaiReportFileOmittedSections(reportFile: string): string[];
|
|
123
|
+
/**
|
|
124
|
+
* The omitted sections of a dosai methods report that cdxgen reads, so the
|
|
125
|
+
* evidence built from the report lacks their input.
|
|
126
|
+
*
|
|
127
|
+
* @param {string[]} omittedSections Sections the report left out
|
|
128
|
+
* @returns {string[]} The ones cdxgen reads
|
|
129
|
+
*/
|
|
130
|
+
export declare function dosaiSectionsCdxgenReads(omittedSections: string[]): string[];
|
|
131
|
+
/**
|
|
132
|
+
* The largest number of distinct method calls cdxgen keeps from one report.
|
|
133
|
+
*
|
|
134
|
+
* Reports in the millions of calls repeat the same call sites heavily, so the
|
|
135
|
+
* aggregated rows stay far below this; the cap exists so a report whose calls
|
|
136
|
+
* are all distinct degrades the occurrence evidence instead of the process.
|
|
137
|
+
*
|
|
138
|
+
* @returns {number} Cap on distinct kept rows
|
|
139
|
+
*/
|
|
140
|
+
export declare function maxDosaiMethodCalls(): number;
|
|
44
141
|
/**
|
|
45
142
|
* Read a dosai methods report of any size.
|
|
46
143
|
*
|
|
47
144
|
* A report that fits in one JavaScript string is parsed whole. A larger one is
|
|
48
145
|
* read in bounded runs, keeping the requested sections, the CallGraph nodes and
|
|
49
146
|
* edges that PackageReachability references, and the MethodCalls accepted by
|
|
50
|
-
* `keepMethodCall` (none when it is omitted).
|
|
147
|
+
* `keepMethodCall` (none when it is omitted). A kept MethodCalls row is
|
|
148
|
+
* reduced to the fields cdxgen reads and aggregated by them, so a call site
|
|
149
|
+
* reached many times is held once with a `CallCount`; distinct rows past
|
|
150
|
+
* {@link maxDosaiMethodCalls} are dropped with one warning. Nothing cdxgen
|
|
151
|
+
* reads is lost.
|
|
51
152
|
*
|
|
52
153
|
* @param {string} reportFile Path to the dosai methods JSON
|
|
53
154
|
* @param {Object} [options] Options
|
|
54
155
|
* @param {string[]} [options.sections] Sections to keep from a large report (default: every section cdxgen reads)
|
|
55
156
|
* @param {Function} [options.keepMethodCall] Predicate choosing the MethodCalls to keep from a large report
|
|
157
|
+
* @param {number} [options.maxMethodCalls] Cap on distinct kept MethodCalls, for tests
|
|
56
158
|
* @param {number} [options.maxTextBytes] Largest report parsed whole, for tests
|
|
57
159
|
* @returns {Object|undefined} Parsed report, or undefined when missing or invalid
|
|
58
160
|
*/
|
|
59
161
|
export declare function readDosaiMethodsReport(reportFile: string, options?: {
|
|
60
162
|
sections?: string[];
|
|
61
163
|
keepMethodCall?: Function;
|
|
164
|
+
maxMethodCalls?: number;
|
|
62
165
|
maxTextBytes?: number;
|
|
63
166
|
}): Object | undefined;
|
|
64
167
|
/**
|
|
@@ -97,6 +200,13 @@ export declare function dosaiRunTimedOut(result: Object): boolean;
|
|
|
97
200
|
* @returns {"timeout"|"buffer"|"signal"|undefined} Why the run was stopped, or undefined when it ended by itself
|
|
98
201
|
*/
|
|
99
202
|
export declare function dosaiRunStopReason(result: Object): "timeout" | "buffer" | "signal" | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* Note that the .NET host's refusal to start a dosai executable has been
|
|
205
|
+
* reported, so dosai runs of the same executable do not repeat the warning.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} executable dosai executable
|
|
208
|
+
*/
|
|
209
|
+
export declare function markDosaiLaunchFailureReported(executable: string): void;
|
|
100
210
|
/**
|
|
101
211
|
* Whether the dosai run that should have written a file was stopped (by the
|
|
102
212
|
* time limit, the output buffer limit, or a signal) and already reported so.
|
|
@@ -105,14 +215,30 @@ export declare function dosaiRunStopReason(result: Object): "timeout" | "buffer"
|
|
|
105
215
|
* @returns {boolean} true when the run was stopped
|
|
106
216
|
*/
|
|
107
217
|
export declare function dosaiRunWasStopped(outputFile: string): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Whether the dosai run that should have written a file failed in a way it has
|
|
220
|
+
* already reported: it was stopped (see dosaiRunWasStopped), or the .NET host
|
|
221
|
+
* refused to start dosai and the warning named the missing runtime.
|
|
222
|
+
*
|
|
223
|
+
* @param {string} outputFile Output file passed to the dosai run
|
|
224
|
+
* @returns {boolean} true when the failure has been reported
|
|
225
|
+
*/
|
|
226
|
+
export declare function dosaiFailureReported(outputFile: string): boolean;
|
|
108
227
|
/**
|
|
109
228
|
* Run a dosai subcommand ("methods", "dataflows", or "crypto") against a source
|
|
110
229
|
* tree and write its JSON output to the given file.
|
|
111
230
|
*
|
|
231
|
+
* Flags cdxgen adds for its own benefit that an older dosai may not know
|
|
232
|
+
* (--exclude, --sections, --crypto-dataflows) are optional: when dosai reports
|
|
233
|
+
* them as unknown, every rejected one is dropped in a single retry, later runs
|
|
234
|
+
* of the same executable skip them up front, and dropping is reported once
|
|
235
|
+
* (a warning for --exclude, whose loss changes results; a debug line for the
|
|
236
|
+
* size-only flags). A run that rejects anything else has simply failed.
|
|
237
|
+
*
|
|
112
238
|
* @param {string} command Dosai subcommand to execute
|
|
113
239
|
* @param {string} src Source directory to analyze
|
|
114
240
|
* @param {string} outputFile Path where the dosai JSON output is written
|
|
115
|
-
* @param {Object} [options] Options carrying dosaiCommand, dataFlowPatterns, patternPacks,
|
|
241
|
+
* @param {Object} [options] Options carrying dosaiCommand, dataFlowPatterns, patternPacks, exclude globs, or dosaiMethodsSections
|
|
116
242
|
* @returns {boolean} True when the command succeeded and produced the output file, false otherwise
|
|
117
243
|
*/
|
|
118
244
|
export declare function runDosaiCommand(command: string, src: string, outputFile: string, options?: Object): boolean;
|
|
@@ -121,7 +247,7 @@ export declare function runDosaiCommand(command: string, src: string, outputFile
|
|
|
121
247
|
*
|
|
122
248
|
* @param {string} src Source directory to analyze
|
|
123
249
|
* @param {string} outputFile Path where the methods slice JSON is written
|
|
124
|
-
* @param {Object} [options] Options forwarded to runDosaiCommand
|
|
250
|
+
* @param {Object} [options] Options forwarded to runDosaiCommand; `dosaiMethodsSections` names the top-level sections to write (see dosaiMethodsSectionsArgument), omitted for the full report
|
|
125
251
|
* @returns {boolean} True when the slice was produced successfully
|
|
126
252
|
*/
|
|
127
253
|
export declare function createDosaiMethodsSlice(src: string, outputFile: string, options?: Object): boolean;
|
|
@@ -151,6 +277,27 @@ export declare function createDosaiCryptoAnalysis(src: string, outputFile: strin
|
|
|
151
277
|
* @returns {Object|undefined} Parsed crypto analysis JSON, or undefined when the analysis fails
|
|
152
278
|
*/
|
|
153
279
|
export declare function analyzeDosaiCrypto(src: string, options?: Object): Object | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* The tool component naming the dosai behind a methods report.
|
|
282
|
+
*
|
|
283
|
+
* A report that a dosai run of this process wrote names the executable that
|
|
284
|
+
* wrote it, with the version that executable reports. A report reused from an
|
|
285
|
+
* earlier run names the version recorded in its Metadata, or the configured
|
|
286
|
+
* dosai's own version when that is a build of the same release. No component
|
|
287
|
+
* is returned for a report that is missing or that no dosai wrote, such as
|
|
288
|
+
* when the .NET host refused to start dosai.
|
|
289
|
+
*
|
|
290
|
+
* The cdxgen-plugins-bin manifest component is returned as-is only for its
|
|
291
|
+
* own binary at its own version. Any other dosai gets a component built from
|
|
292
|
+
* the manifest's project fields (description, licenses, references), without
|
|
293
|
+
* the bundled binary's hashes or path.
|
|
294
|
+
*
|
|
295
|
+
* @param {string} reportFile Path of the dosai methods report
|
|
296
|
+
* @param {Object} [report] The report as read, for its Metadata
|
|
297
|
+
* @param {Object} [manifestComponent] dosai component of the cdxgen-plugins-bin manifest
|
|
298
|
+
* @returns {Object[]} The dosai tool component, or an empty array
|
|
299
|
+
*/
|
|
300
|
+
export declare function dosaiToolComponents(reportFile: string, report?: Object, manifestComponent?: Object): Object[];
|
|
154
301
|
/**
|
|
155
302
|
* Persist the combined native dosai report to options.semanticsSlicesFile.
|
|
156
303
|
*
|
|
@@ -158,10 +305,12 @@ export declare function analyzeDosaiCrypto(src: string, options?: Object): Objec
|
|
|
158
305
|
* analyzeGolemProject on branch feat/rusi-persist-report): when a semantics-
|
|
159
306
|
* slices path is provided, the FULL native report is written there and kept so
|
|
160
307
|
* downstream tools (depscan) can consume the complete methods + data-flow
|
|
161
|
-
* facts that cdxgen only projects a subset of into the SBOM evidence.
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
308
|
+
* facts that cdxgen only projects a subset of into the SBOM evidence. A
|
|
309
|
+
* methods report the user supplied with --usages-slices-file is written as
|
|
310
|
+
* given, with a recorded degradation when it was trimmed with --sections.
|
|
311
|
+
* dotnet does not otherwise use the semantics slice (atom is never run for
|
|
312
|
+
* dotnet), so the path is free to carry the combined dosai report. Returns the
|
|
313
|
+
* resolved durable path when something was persisted, otherwise undefined.
|
|
165
314
|
*/
|
|
166
315
|
export declare function persistDosaiSemanticsReport(options: any, methodsSlice: any, dataFlowSlice: any): any;
|
|
167
316
|
/**
|
|
@@ -278,6 +427,12 @@ export declare function collectDosaiServicesFromMethods(methodsSlice: Object, se
|
|
|
278
427
|
/**
|
|
279
428
|
* Normalize a services map into a sorted array of CycloneDX service objects.
|
|
280
429
|
*
|
|
430
|
+
* This is where evinse's service maps — dosai, golem, kosi, scalasem, an
|
|
431
|
+
* OpenAPI document, and the atom usage and type detectors — become
|
|
432
|
+
* `services[]`, so it is also where every endpoint is percent-encoded into the
|
|
433
|
+
* iri-reference CycloneDX requires. The collectors keep the readable template
|
|
434
|
+
* (`/users/{id}`); the BOM gets `/users/%7Bid%7D`.
|
|
435
|
+
*
|
|
281
436
|
* @param {Object} [servicesMap] Map of service name to service definition with Set-backed endpoints
|
|
282
437
|
* @returns {Object[]} Array of service objects with sorted endpoint arrays and properties
|
|
283
438
|
*/
|