@cdxgen/cdxgen 13.4.0 → 13.5.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 +7 -7
- package/bin/cdxgen-secure.js +15 -0
- package/bin/cdxgen.js +25 -5
- package/bin/evinse.js +5 -0
- package/bin/hbom.js +15 -7
- package/bin/repl.js +29 -0
- package/data/cbomosdb-queries.json +13 -1
- package/data/component-tags.json +8 -0
- package/data/queries-darwin.json +25 -1
- package/data/queries-win.json +19 -1
- package/data/queries.json +41 -0
- package/data/remediations.json +283 -1
- 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/lib/audit/index.js +14 -0
- package/lib/cli/bomAssembly.js +28 -3
- package/lib/cli/cliOptions.js +110 -3
- package/lib/cli/index.js +73 -4
- package/lib/cli/jvmBom.js +126 -20
- package/lib/cli/managedBom.js +711 -71
- package/lib/cli/nativeBom.js +225 -28
- package/lib/core/env.js +30 -8
- package/lib/core/fs.js +28 -19
- package/lib/core/httpClient.js +74 -45
- package/lib/core/projectConfig.js +1 -0
- package/lib/core/projectTooling.js +97 -0
- package/lib/core/propertySanitizer.js +72 -0
- package/lib/ecosystems/golem.js +550 -6
- package/lib/ecosystems/gradleutils.js +30 -20
- package/lib/ecosystems/parsers-dotnet.js +117 -18
- package/lib/ecosystems/parsers-go.js +1090 -367
- package/lib/ecosystems/parsers-jvm.js +259 -17
- package/lib/ecosystems/parsers-misc.js +229 -44
- package/lib/ecosystems/parsers-python.js +11 -10
- package/lib/ecosystems/rubyutils.js +6 -3
- package/lib/ecosystems/rusi.js +10 -0
- package/lib/ecosystems/scalacliutils.js +2 -1
- package/lib/ecosystems/scalasem.js +3 -1
- package/lib/evinser/evinser.js +126 -18
- package/lib/evinser/swiftsem.js +68 -5
- package/lib/inventory/agentSkillSpec.js +17 -0
- package/lib/inventory/apkInstalledDb.js +243 -0
- package/lib/inventory/atomUtils.js +33 -0
- package/lib/inventory/auditCategories.js +3 -3
- package/lib/inventory/cacheDir.js +52 -9
- package/lib/inventory/certificates.js +2371 -0
- package/lib/inventory/communityAiConfigParser.js +4 -9
- package/lib/inventory/deps.js +6 -4
- package/lib/inventory/display.js +200 -3
- package/lib/inventory/dosai.js +500 -58
- package/lib/inventory/dynamic.js +45 -3
- package/lib/inventory/envcontext.js +168 -5
- package/lib/inventory/evidenceUtils.js +436 -23
- package/lib/inventory/formulationParsers.js +3 -2
- package/lib/inventory/goBuildInfo.js +140 -0
- package/lib/inventory/hbom.js +67 -7
- package/lib/inventory/hbomAnalysis.js +16 -0
- package/lib/inventory/hostTopology.js +21 -0
- package/lib/inventory/osPackagePurl.js +244 -0
- package/lib/inventory/osPackageResolver.js +89 -87
- package/lib/inventory/osinfo.js +79 -31
- package/lib/inventory/osqueryTransform.js +114 -5
- package/lib/inventory/phpBuildInfo.js +487 -0
- package/lib/inventory/phpHostProbe.js +641 -0
- package/lib/inventory/rootfsCerts.js +426 -0
- package/lib/inventory/source.js +207 -3
- 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 +529 -183
- package/lib/managers/docker.js +166 -12
- package/lib/parsers/email.js +277 -0
- package/lib/parsers/largeJson.js +34 -2
- package/lib/server/server.js +186 -1
- 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 +58 -1
- package/lib/stages/postgen/specVersionCompat.js +30 -0
- package/lib/stages/pregen/pregen.js +117 -5
- package/lib/validator/bomValidator.js +26 -5
- package/lib/validator/generated/runtime.mjs +13 -0
- package/lib/validator/generated/validate-1.6.mjs +26 -7
- package/lib/validator/generated/validate-1.7.mjs +31 -12
- package/lib/validator/generated/validate-2.0.mjs +30 -11
- package/package.json +17 -17
- 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 +9 -2
- 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/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/env.d.ts +18 -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.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/ecosystems/cppEvidence.d.ts +1 -1
- 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 +10 -8
- package/types/lib/ecosystems/gradleutils.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-jvm.d.ts +28 -2
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +18 -58
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +4 -3
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +25 -0
- 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 +14 -0
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/cacheDir.d.ts +12 -4
- package/types/lib/inventory/cacheDir.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 +145 -6
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- 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 +40 -2
- 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/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/hostTopology.d.ts.map +1 -1
- 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 +6 -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/source.d.ts +28 -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 +12 -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 +13 -0
- 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/pregen.d.ts +14 -1
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swiftsem.d.ts","sourceRoot":"","sources":["../../../lib/evinser/swiftsem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swiftsem.d.ts","sourceRoot":"","sources":["../../../lib/evinser/swiftsem.js"],"names":[],"mappings":"AAqGA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,QAAA,UAEhC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,QAAA,GAFrC,OAAO,CAYnB;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAHpC,MAGoC,GAFlC,SAAS,GAAC,MAAM,CAqB5B;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,QAAA,GAFjC,SAAS,GAAC,MAAM,CAkB5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EALA,MAKA,EACT,QAAQ,AALP,CACA,QAI0B,GAJhB,SAAS,GAAC,MAAM,CA4C5B;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,QAAA,EAAE,GAAG,AAJvC,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;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,OAAA,GAFvC,MAAM,CAuClB;AAsFD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,QAAA,GAF/B,KAAK,CAAC,MAAM,CAAC,CAmDzB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,QAAA,GAFpC,MAAM,CA0ClB;AAqED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,QAAA,EACR,WAAW,QAAA,EACX,OAAO,EAPE,MAOF,EACP,YAAY,AAPX,CACA,EADQ,MAOG,GAND,MAAM,CAyNlB;AAiCD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,AAHrC,CACA,EADQ,MAG6B,GAF3B,OAAO,CA6BnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA;;;;;;;;cAkNtD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the frontmatter of a SKILL.md satisfies the open Agent Skills
|
|
3
|
+
* constraints (agentskills.io): a name of 1-64 lowercase letters, digits and
|
|
4
|
+
* hyphens, and a description of 1-1024 characters.
|
|
5
|
+
*
|
|
6
|
+
* @param {{name?: unknown, description?: unknown}|undefined} metadata Frontmatter values
|
|
7
|
+
* @returns {boolean} true when both constraints hold
|
|
8
|
+
*/
|
|
9
|
+
export declare function isAgentSkillSpecValid(metadata: {
|
|
10
|
+
name?: unknown;
|
|
11
|
+
description?: unknown;
|
|
12
|
+
} | undefined): boolean;
|
|
13
|
+
//# sourceMappingURL=agentSkillSpec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSkillSpec.d.ts","sourceRoot":"","sources":["../../../lib/inventory/agentSkillSpec.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAC,GAAC,SAGL,GAFjC,OAAO,CAUnB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** The database, or the packages it lists, past these is unreadable rather than read in part. */
|
|
2
|
+
export declare const MAX_APK_DATABASE_BYTES: number;
|
|
3
|
+
export declare const MAX_APK_PACKAGES = 100000;
|
|
4
|
+
/** Where apk keeps the installed database, relative to the root, in the order they are tried. */
|
|
5
|
+
export declare const APK_INSTALLED_DB_PATHS: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Read the packages of the apk installed database.
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} [options] Read options
|
|
10
|
+
* @param {string} [options.rootPath="/"] Directory the database paths hang off;
|
|
11
|
+
* tests point it at a built tree
|
|
12
|
+
* @param {string} [options.databaseFile] Read this file instead of looking
|
|
13
|
+
* under `rootPath`
|
|
14
|
+
* @param {Set<string>} [options.wantedFiles] Absolute paths whose owner is
|
|
15
|
+
* wanted. A package comes back with the ones it owns in `files`; the other
|
|
16
|
+
* files of a package are only counted, so a large database stays small.
|
|
17
|
+
* @param {number} [options.maxBytes] Largest database to read, 64 MiB by default
|
|
18
|
+
* @param {number} [options.maxPackages] Most packages to accept, 100000 by default
|
|
19
|
+
* @param {string} [options.platform] `linux` by default for the process; an apk
|
|
20
|
+
* database exists on Linux only
|
|
21
|
+
* @returns {{state: string, path?: string, packages: Object[], malformed: number}}
|
|
22
|
+
* `state` is `ok`, `absent` (no database, or not Linux), `unreadable` (a
|
|
23
|
+
* database that could not be read in full) or `skipped` (a dry run).
|
|
24
|
+
* `malformed` counts the records left out for having no name or version.
|
|
25
|
+
* Each package has `name`, `version` and `fileCount`, `files`, and, when the
|
|
26
|
+
* record has them, `arch`, `origin`, `maintainer`, `license`, `url` and
|
|
27
|
+
* `description`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function readApkInstalledDb(options?: {
|
|
30
|
+
rootPath?: string;
|
|
31
|
+
databaseFile?: string;
|
|
32
|
+
wantedFiles?: Set<string>;
|
|
33
|
+
maxBytes?: number;
|
|
34
|
+
maxPackages?: number;
|
|
35
|
+
platform?: string;
|
|
36
|
+
}): {
|
|
37
|
+
state: string;
|
|
38
|
+
path?: string;
|
|
39
|
+
packages: Object[];
|
|
40
|
+
malformed: number;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=apkInstalledDb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apkInstalledDb.d.ts","sourceRoot":"","sources":["../../../lib/inventory/apkInstalledDb.js"],"names":[],"mappings":"AA6BA,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AACvD,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,UAIlC,CAAC;AAiHF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,AApBvC,CAYA,EAXA;IAAyB,QAAQ,AAAjC,CAEA,EAFQ,MAAM,CAEd;IAAyB,YAAY,AAArC,CAEA,EAFQ,MAAM,CAEd;IAA8B,WAAW,AAAzC,CAGA,EAHQ,GAAG,CAAC,MAAM,CAAC,CAGnB;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,QAAQ,AAAjC,CAEA,EAFQ,MAAM,CAEd;CAQ4C,GARlC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,CA4EjF"}
|
|
@@ -61,6 +61,20 @@ export declare function atomFrontendArgKeys(language: string): Set<string>;
|
|
|
61
61
|
* @returns {string[]} Arguments to add to the atom command
|
|
62
62
|
*/
|
|
63
63
|
export declare function atomCompileCommandsArgs(src: string, language: string, options?: Object): string[];
|
|
64
|
+
/**
|
|
65
|
+
* The arguments that stop atom's Java frontend from running the scanned
|
|
66
|
+
* project's build. In its default delombok mode, atom runs
|
|
67
|
+
* `mvn dependency:build-classpath` inside a Maven project, which loads the
|
|
68
|
+
* project's `.mvn` configuration and build extensions, so delombok and
|
|
69
|
+
* dependency fetching are turned off whenever the project's own tooling may
|
|
70
|
+
* not run.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} language atom `-l` value
|
|
73
|
+
* @param {Object} options CLI options
|
|
74
|
+
* @returns {string[]|undefined} Arguments to add to the atom command, or
|
|
75
|
+
* undefined when the installed atom cannot be told to leave the build alone
|
|
76
|
+
*/
|
|
77
|
+
export declare function atomBuildToolArgs(language: string, options?: Object): string[] | undefined;
|
|
64
78
|
/**
|
|
65
79
|
* Convert cdxgen's glob-style exclude patterns to a Scala/Java regex string.
|
|
66
80
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atomUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/atomUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"atomUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/atomUtils.js"],"names":[],"mappings":"AAkEA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,aAM/B,CAAC;AA2CH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,EAAE,OAAO,GAHrC,MAG0C,GAFxC,MAAM,GAAC,SAAS,CA6C5B;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,MAG6B,GAF3B,CAAC,MAAM,EAAE,MAAM,GAAC,SAAS,CAAC,CAwBtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAHjC,MAGiC,GAF/B,GAAG,CAAC,MAAM,CAA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EAJ1B,MAAM,EAIoB,EAAE,SAAS,GAHrC,MAG0C,GAFxC,OAAO,CA0KnB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAHpC,MAGoC,GAFlC,MAAM,EAAE,CAwBpB;AAcD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAF1C,MAE0C,QAQpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAJ9B,MAI8B,EAAE,SAAS,EAHzC,MAGyC,GAFvC,GAAC,CAcb;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAHpC,MAGoC,GAFlC,MAAM,EAAE,GAAC,MAAM,GAAC,SAAS,CAwBrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EARM,MAQN,EACH,QAAQ,EARC,MAQD,EACR,WAAW,GARF,MAQa,EACtB,UAAU,GARD,MAQa,EACtB,OAAO,GARE,MAQG,OA8Cb"}
|
|
@@ -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"}
|
|
@@ -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,uB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AFhC,MAAM,EAE0B,QA0C1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAJnC,MAImC,EAAE,IAAI,AAHjD,CACA,EADQ,MAGyC,GAFvC,MAAM,CAuBlB;AAqaD;;;;;GAKG;AACH,qBAAa,oBAAoB;IAExB,YAAY;IACZ,IAAI;IAFX,cAGC;IAED,SAAS,CAAC,MAAM,KAAA,QAUf;IAED,UAAU,CAAC,OAAO,KAAA,QAIjB;IAED,0BAA0B,CAAC,SAAS,KAAA,EAAE,OAAO,KAAA,QAI5C;IAED,MAAM,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE;;;KAAA,QAK9B;IAED;;;;;OAKG;IACH,KAAK,IAFQ;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,YAAY,EAAE,MAAM,EAAE,CAAA;KAAC,CA8J1D;CACF;AAYD;;;;;;;GAOG;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/inventory/deps.js"],"names":[],"mappings":"AAgCA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AA0DD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAPC,MAOD,EACR,QAAQ,EAPC,MAOD,EACR,OAAO,GANE,OAMK,EACd,eAAe,GANN,OAMc,eA2ExB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAL/B,MAK+B,EAAE,UAAU,GAJ3C,MAIgD,eA4I1D;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,YAAY,EAH9C,MAG8C,GAF5C,OAAO,CAAC,MAAM,EAAE,CAAC,CAgE7B;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,UAAU,KAAA,GAFzB,MAAM,CAkClB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAHjC,MAGiC,GAF/B,MAAM,CA0BlB;AAgBD;;;;;GAKG;AACH,wBAAgB,yBAAyB,C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AAsB,CAC1C,OAAO,EARE,MAQF,EACP,YAAY,EARH,MAQG,EACZ,EAAE,eAAyB,EAAE,aAA+B,EAAE,AAR7D,CAGA,EAFA;IAAsB,eAAe,AAArC,CACA,EADQ,MAAM,CACd;IAAsB,aAAa,AAAnC,CACA,EADQ,MAAM,CACd;CAKkE,GALxD,OAAO,CAAC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC,CAkDxD;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAJhC,MAIgC,gBAqE1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,eAAe,EANhC,MAMgC,EAAE,OAAO,EALzC,MAAM,EAKmC,EAAE,cAAc,EAJzD,MAIyD,EAAE,CAAC,EAH5D,MAG4D,GAF1D,IAAI,CAqDhB;AAED;;;;;;;;;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,kBAAkB,CAAC,OAAO,EAF/B,MAE+B,QAKzC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAHpC,MAGoC,GAFlC,MAAM,EAAE,CA2CpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAF/B,MAE+B,QAKzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAHnC,MAGmC,GAFjC,MAAM,EAAE,CAyBpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAF/B,MAE+B,QAKzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAHnC,MAGmC,GAFjC,MAAM,EAAE,CAwBpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAF/B,MAE+B,QAKzC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,YANxB,MAAM,eACN,MAAM,EAAE,GAAC,SAAS,eAClB,MAAM,GAAC,SAAS,6BAChB,MAAM,KACJ,MAAM,EAoGlB,CA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