@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,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,6 +79,55 @@ 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[];
|
|
44
131
|
/**
|
|
45
132
|
* Read a dosai methods report of any size.
|
|
46
133
|
*
|
|
@@ -97,6 +184,13 @@ export declare function dosaiRunTimedOut(result: Object): boolean;
|
|
|
97
184
|
* @returns {"timeout"|"buffer"|"signal"|undefined} Why the run was stopped, or undefined when it ended by itself
|
|
98
185
|
*/
|
|
99
186
|
export declare function dosaiRunStopReason(result: Object): "timeout" | "buffer" | "signal" | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Note that the .NET host's refusal to start a dosai executable has been
|
|
189
|
+
* reported, so dosai runs of the same executable do not repeat the warning.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} executable dosai executable
|
|
192
|
+
*/
|
|
193
|
+
export declare function markDosaiLaunchFailureReported(executable: string): void;
|
|
100
194
|
/**
|
|
101
195
|
* Whether the dosai run that should have written a file was stopped (by the
|
|
102
196
|
* time limit, the output buffer limit, or a signal) and already reported so.
|
|
@@ -105,14 +199,30 @@ export declare function dosaiRunStopReason(result: Object): "timeout" | "buffer"
|
|
|
105
199
|
* @returns {boolean} true when the run was stopped
|
|
106
200
|
*/
|
|
107
201
|
export declare function dosaiRunWasStopped(outputFile: string): boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the dosai run that should have written a file failed in a way it has
|
|
204
|
+
* already reported: it was stopped (see dosaiRunWasStopped), or the .NET host
|
|
205
|
+
* refused to start dosai and the warning named the missing runtime.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} outputFile Output file passed to the dosai run
|
|
208
|
+
* @returns {boolean} true when the failure has been reported
|
|
209
|
+
*/
|
|
210
|
+
export declare function dosaiFailureReported(outputFile: string): boolean;
|
|
108
211
|
/**
|
|
109
212
|
* Run a dosai subcommand ("methods", "dataflows", or "crypto") against a source
|
|
110
213
|
* tree and write its JSON output to the given file.
|
|
111
214
|
*
|
|
215
|
+
* Flags cdxgen adds for its own benefit that an older dosai may not know
|
|
216
|
+
* (--exclude, --sections, --crypto-dataflows) are optional: when dosai reports
|
|
217
|
+
* them as unknown, every rejected one is dropped in a single retry, later runs
|
|
218
|
+
* of the same executable skip them up front, and dropping is reported once
|
|
219
|
+
* (a warning for --exclude, whose loss changes results; a debug line for the
|
|
220
|
+
* size-only flags). A run that rejects anything else has simply failed.
|
|
221
|
+
*
|
|
112
222
|
* @param {string} command Dosai subcommand to execute
|
|
113
223
|
* @param {string} src Source directory to analyze
|
|
114
224
|
* @param {string} outputFile Path where the dosai JSON output is written
|
|
115
|
-
* @param {Object} [options] Options carrying dosaiCommand, dataFlowPatterns, patternPacks,
|
|
225
|
+
* @param {Object} [options] Options carrying dosaiCommand, dataFlowPatterns, patternPacks, exclude globs, or dosaiMethodsSections
|
|
116
226
|
* @returns {boolean} True when the command succeeded and produced the output file, false otherwise
|
|
117
227
|
*/
|
|
118
228
|
export declare function runDosaiCommand(command: string, src: string, outputFile: string, options?: Object): boolean;
|
|
@@ -121,7 +231,7 @@ export declare function runDosaiCommand(command: string, src: string, outputFile
|
|
|
121
231
|
*
|
|
122
232
|
* @param {string} src Source directory to analyze
|
|
123
233
|
* @param {string} outputFile Path where the methods slice JSON is written
|
|
124
|
-
* @param {Object} [options] Options forwarded to runDosaiCommand
|
|
234
|
+
* @param {Object} [options] Options forwarded to runDosaiCommand; `dosaiMethodsSections` names the top-level sections to write (see dosaiMethodsSectionsArgument), omitted for the full report
|
|
125
235
|
* @returns {boolean} True when the slice was produced successfully
|
|
126
236
|
*/
|
|
127
237
|
export declare function createDosaiMethodsSlice(src: string, outputFile: string, options?: Object): boolean;
|
|
@@ -151,6 +261,27 @@ export declare function createDosaiCryptoAnalysis(src: string, outputFile: strin
|
|
|
151
261
|
* @returns {Object|undefined} Parsed crypto analysis JSON, or undefined when the analysis fails
|
|
152
262
|
*/
|
|
153
263
|
export declare function analyzeDosaiCrypto(src: string, options?: Object): Object | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* The tool component naming the dosai behind a methods report.
|
|
266
|
+
*
|
|
267
|
+
* A report that a dosai run of this process wrote names the executable that
|
|
268
|
+
* wrote it, with the version that executable reports. A report reused from an
|
|
269
|
+
* earlier run names the version recorded in its Metadata, or the configured
|
|
270
|
+
* dosai's own version when that is a build of the same release. No component
|
|
271
|
+
* is returned for a report that is missing or that no dosai wrote, such as
|
|
272
|
+
* when the .NET host refused to start dosai.
|
|
273
|
+
*
|
|
274
|
+
* The cdxgen-plugins-bin manifest component is returned as-is only for its
|
|
275
|
+
* own binary at its own version. Any other dosai gets a component built from
|
|
276
|
+
* the manifest's project fields (description, licenses, references), without
|
|
277
|
+
* the bundled binary's hashes or path.
|
|
278
|
+
*
|
|
279
|
+
* @param {string} reportFile Path of the dosai methods report
|
|
280
|
+
* @param {Object} [report] The report as read, for its Metadata
|
|
281
|
+
* @param {Object} [manifestComponent] dosai component of the cdxgen-plugins-bin manifest
|
|
282
|
+
* @returns {Object[]} The dosai tool component, or an empty array
|
|
283
|
+
*/
|
|
284
|
+
export declare function dosaiToolComponents(reportFile: string, report?: Object, manifestComponent?: Object): Object[];
|
|
154
285
|
/**
|
|
155
286
|
* Persist the combined native dosai report to options.semanticsSlicesFile.
|
|
156
287
|
*
|
|
@@ -158,10 +289,12 @@ export declare function analyzeDosaiCrypto(src: string, options?: Object): Objec
|
|
|
158
289
|
* analyzeGolemProject on branch feat/rusi-persist-report): when a semantics-
|
|
159
290
|
* slices path is provided, the FULL native report is written there and kept so
|
|
160
291
|
* 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
|
-
*
|
|
292
|
+
* facts that cdxgen only projects a subset of into the SBOM evidence. A
|
|
293
|
+
* methods report the user supplied with --usages-slices-file is written as
|
|
294
|
+
* given, with a recorded degradation when it was trimmed with --sections.
|
|
295
|
+
* dotnet does not otherwise use the semantics slice (atom is never run for
|
|
296
|
+
* dotnet), so the path is free to carry the combined dosai report. Returns the
|
|
297
|
+
* resolved durable path when something was persisted, otherwise undefined.
|
|
165
298
|
*/
|
|
166
299
|
export declare function persistDosaiSemanticsReport(options: any, methodsSlice: any, dataFlowSlice: any): any;
|
|
167
300
|
/**
|
|
@@ -278,6 +411,12 @@ export declare function collectDosaiServicesFromMethods(methodsSlice: Object, se
|
|
|
278
411
|
/**
|
|
279
412
|
* Normalize a services map into a sorted array of CycloneDX service objects.
|
|
280
413
|
*
|
|
414
|
+
* This is where evinse's service maps — dosai, golem, kosi, scalasem, an
|
|
415
|
+
* OpenAPI document, and the atom usage and type detectors — become
|
|
416
|
+
* `services[]`, so it is also where every endpoint is percent-encoded into the
|
|
417
|
+
* iri-reference CycloneDX requires. The collectors keep the readable template
|
|
418
|
+
* (`/users/{id}`); the BOM gets `/users/%7Bid%7D`.
|
|
419
|
+
*
|
|
281
420
|
* @param {Object} [servicesMap] Map of service name to service definition with Set-backed endpoints
|
|
282
421
|
* @returns {Object[]} Array of service objects with sorted endpoint arrays and properties
|
|
283
422
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AA+
|
|
1
|
+
{"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AA+KA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAL1C,MAAM,GAAC,MAKmC,GAJxC;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAAC,GAAC,SAAS,CAmB9E;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAI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EAFQ,MAAM,CAEd;CAKW,GALD,MAAM,CA8FlB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EARL,MAQK,EACd,UAAU,AART,CACA,EADQ,MAAM,EAQA,EACf,OAAO,AARN,CAGA,EAFA;IAAyB,OAAO,AAAhC,CAEA,EAFQ,MAAM,CAEd;CAKW,GALD,MAAM,CAwDlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAJ1C,MAI0C,EAAE,UAAU,AAH9D,CACA,OAEmE,SA6FrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAJ/C,MAI+C,EAAE,WAAW,AAHpE,CACA,EADQ,MAGiE,GAF/D,MAAM,CAyKlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EALH,MAKG,EACZ,WAAW,AALV,CACA,EADQ,MAKO,GAJL,MAAM,CA+GlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,AAHjD,CACA,EADQ,MAG8C,GAF5C,MAAM,EAAE,CAmDpB"}
|
|
@@ -23,13 +23,18 @@ export declare function librarySubpath(libPath: string): string | null;
|
|
|
23
23
|
* Services are detected from HTTP request URLs collected during tracing and
|
|
24
24
|
* follow the CycloneDX service schema with endpoints.
|
|
25
25
|
*
|
|
26
|
+
* The certificate chains servers presented in TLS ≤ 1.2 handshakes become the
|
|
27
|
+
* shared certificate model, with `provides` edges from the TLS protocol
|
|
28
|
+
* components.
|
|
29
|
+
*
|
|
26
30
|
* @param {string} commandStr - Shell command to execute and trace (e.g. "node --version")
|
|
27
31
|
* @param {string} workingDir - Working directory for the traced process
|
|
28
32
|
* @param {Object} [traceOptions] - Additional sandbox options forwarded to executeAndTrace
|
|
29
|
-
* @returns {Promise<{components: Array<Object>, services: Array<Object>}>} Components and
|
|
33
|
+
* @returns {Promise<{components: Array<Object>, services: Array<Object>, dependencies: Array<Object>}>} Components, services and dependencies
|
|
30
34
|
*/
|
|
31
35
|
export declare function buildDynamicComponents(commandStr: string, workingDir: string, traceOptions?: Object): Promise<{
|
|
32
36
|
components: Array<Object>;
|
|
33
37
|
services: Array<Object>;
|
|
38
|
+
dependencies: Array<Object>;
|
|
34
39
|
}>;
|
|
35
40
|
//# sourceMappingURL=dynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dynamic.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynamic.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dynamic.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAH3B,MAG2B,GAFzB,MAAM,GAAC,IAAI,CAevB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAND,MAMC,EACV,UAAU,EAND,MAMC,EACV,YAAY,AANX,CACA,EADQ,MAMQ,GALN,OAAO,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC,CAmNtG"}
|
|
@@ -187,6 +187,41 @@ export declare function collectRubyInfo(dir: string): {
|
|
|
187
187
|
name: string;
|
|
188
188
|
version: string;
|
|
189
189
|
} | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* Collect the PHP version of the PHP found on the PATH.
|
|
192
|
+
*
|
|
193
|
+
* `-n` stops PHP loading any php.ini, so a PHPRC or an auto_prepend_file cannot
|
|
194
|
+
* run code, and `-v` is used rather than `-r 'echo PHP_VERSION;'` because the
|
|
195
|
+
* shell on Windows does not quote arguments. The first line is
|
|
196
|
+
* `PHP 8.5.11 (cli) (built: Sep 22 2026 13:32:06) (NTS)`.
|
|
197
|
+
*
|
|
198
|
+
* The identity is `pkg:generic/php`: a probe of the PATH cannot tell which
|
|
199
|
+
* package manager, if any, installed this PHP. A banner with a distro revision,
|
|
200
|
+
* such as Ubuntu 22.04's `PHP 8.1.2-1ubuntu2.14`, is recorded as reported but
|
|
201
|
+
* without a CPE: the distro backports fixes under the old upstream number.
|
|
202
|
+
*
|
|
203
|
+
* @param {string} dir Working directory
|
|
204
|
+
* @returns Object containing the PHP details
|
|
205
|
+
*/
|
|
206
|
+
export declare function collectPhpInfo(dir: string): Object | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* Collect the Composer version.
|
|
209
|
+
*
|
|
210
|
+
* `--no-plugins` and `--no-scripts` keep the plugins and scripts of the
|
|
211
|
+
* project in the working directory from running, which `composer --version`
|
|
212
|
+
* would otherwise let a plugin do. It needs no network. The banner is
|
|
213
|
+
* `Composer version 2.10.3 2026-08-27 13:34:23`, but an older Composer on a
|
|
214
|
+
* newer PHP prints deprecation notices above it, so the first line that starts
|
|
215
|
+
* with it is read; the line after it names the PHP Composer runs on, with its
|
|
216
|
+
* path, and is never read. The banner must start its line: an indented echo of
|
|
217
|
+
* the project's composer.json in an error block does not count. Only a stable
|
|
218
|
+
* release is recorded: a pre-release or a snapshot has no version a CPE can
|
|
219
|
+
* name.
|
|
220
|
+
*
|
|
221
|
+
* @param {string} dir Working directory
|
|
222
|
+
* @returns Object containing the Composer details
|
|
223
|
+
*/
|
|
224
|
+
export declare function collectComposerInfo(dir: string): Object | undefined;
|
|
190
225
|
/**
|
|
191
226
|
* Method to run a swift command
|
|
192
227
|
*
|
|
@@ -199,12 +234,15 @@ export declare function runSwiftCommand(dir: string, args: any[]): string | unde
|
|
|
199
234
|
* Collect toolchain information components for the current environment.
|
|
200
235
|
*
|
|
201
236
|
* Probes the working directory for java, dotnet, python, node, gcc, rust, go,
|
|
202
|
-
* and
|
|
237
|
+
* ruby, php and composer toolchains and returns one component per detected
|
|
238
|
+
* tool.
|
|
203
239
|
*
|
|
204
240
|
* @param {string} dir Working directory to inspect
|
|
241
|
+
* @param {Object} [options] CLI options, which decide whether the project's
|
|
242
|
+
* own toolchain files may choose the tools that run
|
|
205
243
|
* @returns {Object[]} Array of toolchain component objects; empty when nothing is detected
|
|
206
244
|
*/
|
|
207
|
-
export declare function collectEnvInfo(dir: string): Object[];
|
|
245
|
+
export declare function collectEnvInfo(dir: string, options?: Object): Object[];
|
|
208
246
|
/**
|
|
209
247
|
* Method to check if sdkman is available.
|
|
210
248
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAyDA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAwDvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAapC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAL3B,MAK2B,EAAE,GAAG,EAJhC,MAIgC,sBAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,sBAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,GAAG,EAJ9B,MAI8B,sBAExC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,MAkBhC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAJlB,MAIkB,SA4B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,IAAI,OAAA,sBAiBvC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EALtB,MAKsB,EAAE,QAAQ,GAJhC,MAIqC,GAFnC,KAAK,CAA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,EAAE,UAAU,EAH1C,MAG0C,GAFxC,MAAM,CA6FlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,EANnB,MAMmB,EAAE,OAAO,AALpC,CAGA,EAFA;IAAyB,GAAG,AAA5B,CACA,EADQ,MAAM,CACd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;CAEyC,GAF/B,KAAK,CAAC,MAAM,CAAC,CA4CzB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAJ9B,MAI8B,EAAE,QAAQ,GAHxC,MAG6C,GAF3C,KAAK,CAAC,MAAM,CAAC,CA+BzB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CA4GlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,WAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,IAF9B,MAAM,GAAC,SAAS,CAc5B"}
|
|
@@ -76,14 +76,33 @@ export declare function addEvidenceForDotnet(pkgList: Object[], slicesFile: stri
|
|
|
76
76
|
* @param {Array} results Query Results
|
|
77
77
|
* @param {Boolean} enhance Optionally enhance results by invoking additional package manager commands
|
|
78
78
|
*/
|
|
79
|
-
export declare function convertOSQueryResults(queryCategory: string, queryObj: Object, results: any[], enhance?: boolean, osPackageListers?: undefined):
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
export declare function convertOSQueryResults(queryCategory: string, queryObj: Object, results: any[], enhance?: boolean, osPackageListers?: undefined): any[];
|
|
80
|
+
/**
|
|
81
|
+
* Convert the packages of an apk installed database into components.
|
|
82
|
+
*
|
|
83
|
+
* The packages are named as the container scan names an Alpine, Wolfi or
|
|
84
|
+
* Chainguard package, and grouped with the other OS package categories under
|
|
85
|
+
* `cdx:osquery:category` = `apk_packages`. Beyond what an osquery package row
|
|
86
|
+
* gives, an apk record knows its licence and home page, which become
|
|
87
|
+
* `licenses` and a `website` external reference.
|
|
88
|
+
*
|
|
89
|
+
* @param {Object[]} packages Packages from readApkInstalledDb()
|
|
90
|
+
* @returns {Object[]} Components
|
|
91
|
+
*/
|
|
92
|
+
export declare function convertApkPackages(packages: Object[]): Object[];
|
|
93
|
+
/**
|
|
94
|
+
* Convert the rows of the `ai_agent_skills` query into components.
|
|
95
|
+
*
|
|
96
|
+
* A skill installed on the host is what the `ai-skill` project scan finds in a
|
|
97
|
+
* repository, so it is a `file` component with the same `cdx:file:kind` and
|
|
98
|
+
* `cdx:skill:*` properties, and no purl: a skill has no package identity. Its
|
|
99
|
+
* bom-ref is the SHA-256 of its SKILL.md rather than the path, which is under a
|
|
100
|
+
* home directory, and where it was found is an occurrence. The same skill
|
|
101
|
+
* found under several roots, such as a plugin marketplace checkout and the
|
|
102
|
+
* plugin cache, is one component with one occurrence for each.
|
|
103
|
+
*
|
|
104
|
+
* @param {Object[]} results Rows of `ai_agent_skills` joined with `hash`
|
|
105
|
+
* @returns {Object[]} Components
|
|
106
|
+
*/
|
|
107
|
+
export declare function convertAgentSkillRows(results: Object[]): Object[];
|
|
89
108
|
//# sourceMappingURL=evidenceUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"AA6CA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAIsC,EAAE,OAAO,AAHvD,CACA,EADQ,MAGoD,GAFlD,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,M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,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAEvB,QAkBpC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAFb,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAAE,CAAC,CAItE;AAgDD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAZnC,MAYmC,EAAE,OAAO,EAX5C,MAW4C,EAAE,OAAO,AAT7D,CAIA,EAJQ,MAS0D,GALxD;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"formulationParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/formulationParsers.js"],"names":[],"mappings":"AA0GA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAF1B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAEvB,QAkBpC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAFb,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAAE,CAAC,CAItE;AAgDD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAZnC,MAYmC,EAAE,OAAO,EAX5C,MAW4C,EAAE,OAAO,AAT7D,CAIA,EAJQ,MAS0D,GALxD;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAwN7D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const PRE_1_18_VERSION = "unknown-pre-1.18";
|
|
2
|
+
/**
|
|
3
|
+
* Read the Go toolchain version from an executable's buildinfo header.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} filePath absolute path to a possible Go binary
|
|
6
|
+
* @returns {string|undefined} `go1.x.y`, `unknown-pre-1.18` for old layouts,
|
|
7
|
+
* or undefined when the file carries no Go buildinfo
|
|
8
|
+
*/
|
|
9
|
+
export declare function readGoBuildVersion(filePath: string): string | undefined;
|
|
10
|
+
//# sourceMappingURL=goBuildInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goBuildInfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/goBuildInfo.js"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAyDnD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,GAH9B,MAAM,GAAC,SAAS,CAuD5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hbom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hbom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbom.js"],"names":[],"mappings":"AAiWA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAHpC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGU,GAFlC,OAAO,CAMnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAHxC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGc,GAFtC,OAAO,CAUnB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAF/C,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAEqB,QAgBzD;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAF/C,MAAM,GAAC,MAAM,GAAC,SAAS,GAAC,IAEuB,QAOzD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,EAAE,WAAW,AAF/D,CACF,EADU,MAEgE,QAmB1E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,AAHzC,CACA,EADQ,MAGsC,GAFpC,MAAM,CA8BlB;AA8GD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAHtC,MAGsC,GAFpC,MAAM,CA8HlB;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,OAAO,CAAC,MAAM,CAAC,CAiC3B"}
|
|
@@ -19,6 +19,16 @@ export declare function getHbomCommandDiagnosticSummary(bomJson: Object): Object
|
|
|
19
19
|
* @returns {boolean} `true` when the BOM looks like an HBOM
|
|
20
20
|
*/
|
|
21
21
|
export declare function isHbomLikeBom(bomJson: Object): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Explain how the permission-denied enrichments of an HBOM can be recovered.
|
|
24
|
+
*
|
|
25
|
+
* Windows never uses sudo: the elevated-only batch needs an already-elevated
|
|
26
|
+
* session, and a network logon is denied every WMI query.
|
|
27
|
+
*
|
|
28
|
+
* @param {string|undefined} platform `cdx:hbom:platform` of the HBOM
|
|
29
|
+
* @returns {string} Guidance for the platform; the Linux wording for any other platform
|
|
30
|
+
*/
|
|
31
|
+
export declare function getHbomPrivilegeGuidance(platform: string | undefined): string;
|
|
22
32
|
/**
|
|
23
33
|
* Return a component's `cdx:hbom:hardwareClass` property value.
|
|
24
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hbomAnalysis.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbomAnalysis.js"],"names":[],"mappings":"AAoDA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAHtC,MAGsC,GAFpC,MAAM,EAAE,CAMpB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAH5C,MAG4C,GAF1C,MAAM,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AGyC,GAF7C;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CAkBpD;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,mBAAmB,AAH/D,CACA,EADQ;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAGsB,GAF1D,MAAM,CAOlB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAH3B,MAG2B,GAFzB,MAAM,CAkFlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostTopology.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hostTopology.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hostTopology.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hostTopology.js"],"names":[],"mappings":"AA4nBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,GAF9B,OAAO,CAUnB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAH/B,MAG+B,GAF7B;IAAC,4BAA4B,EAAE,MAAM,CAAC;IAAC,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,qBAAqB,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAC,CA0BnM;AAYD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAHvC,MAGuC,GAFrC,MAAM,CAiFlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAJpC,MAIoC,EAAE,QAAQ,EAH9C;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAGG,GAF5C,MAAM,CA8DlB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The purl types an OS scan builds from what a package manager reports.
|
|
3
|
+
* deb, rpm, apk and alpm belong to a distro; brew, macports, snap and flatpak
|
|
4
|
+
* belong to none. brew, macports, snap and flatpak are not purl-spec types;
|
|
5
|
+
* cdx-purl builds them as it builds `pkg:chocolatey`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const OS_PACKAGE_PURL_TYPES: Set<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a purl type is one of the OS package managers handled here.
|
|
10
|
+
*
|
|
11
|
+
* @param {string|undefined} type Purl type
|
|
12
|
+
* @returns {boolean} true for the types in OS_PACKAGE_PURL_TYPES
|
|
13
|
+
*/
|
|
14
|
+
export declare function isOsPackagePurlType(type: string | undefined): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a value names an architecture. rpm says `(none)` and trivy says
|
|
17
|
+
* `None` for a package that has none, such as an rpm's `gpg-pubkey` key record;
|
|
18
|
+
* neither is an architecture, and neither belongs in a purl.
|
|
19
|
+
*
|
|
20
|
+
* @param {string|undefined|null} arch Architecture as a package manager reports it
|
|
21
|
+
* @returns {boolean} true for a real architecture
|
|
22
|
+
*/
|
|
23
|
+
export declare function isRealArchitecture(arch: string | undefined | null): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The epoch of an OS package, as the `epoch` qualifier carries it.
|
|
26
|
+
*
|
|
27
|
+
* An rpm keeps its epoch in a field of its own. A deb keeps it in its version
|
|
28
|
+
* (`2:93`), so the version is read first. Epoch 0 and no epoch are the same,
|
|
29
|
+
* and apk and Homebrew packages have none.
|
|
30
|
+
*
|
|
31
|
+
* @param {{type: string, version?: string, epoch?: string|number}} pkg Package
|
|
32
|
+
* @returns {string|undefined} The epoch without leading zeros, or undefined
|
|
33
|
+
*/
|
|
34
|
+
export declare function osPackageEpoch(pkg: {
|
|
35
|
+
type: string;
|
|
36
|
+
version?: string;
|
|
37
|
+
epoch?: string | number;
|
|
38
|
+
}): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The version an OS package carries on its component and in its purl.
|
|
41
|
+
*
|
|
42
|
+
* - rpm: `[epoch:]version-release`, the form the container scan writes. The
|
|
43
|
+
* purl spec keeps the epoch out of an rpm version, but the container scan
|
|
44
|
+
* puts it in the version as well as in the `epoch` qualifier, and an OBOM must
|
|
45
|
+
* name the package the same way.
|
|
46
|
+
* - deb: the version exactly as dpkg reports it, epoch included.
|
|
47
|
+
* - macports: `version_revision`, the form `port installed` prints.
|
|
48
|
+
* - apk, alpm, brew, snap and flatpak: the version as it is. A pacman version
|
|
49
|
+
* already holds its epoch and release (`1:1.3.2-4`).
|
|
50
|
+
*
|
|
51
|
+
* @param {{type: string, version?: string, release?: string, epoch?: string|number, revision?: string|number}} pkg Package
|
|
52
|
+
* @returns {string} The version, or an empty string when the package has none
|
|
53
|
+
*/
|
|
54
|
+
export declare function osPackageVersion(pkg: {
|
|
55
|
+
type: string;
|
|
56
|
+
version?: string;
|
|
57
|
+
release?: string;
|
|
58
|
+
epoch?: string | number;
|
|
59
|
+
revision?: string | number;
|
|
60
|
+
}): string;
|
|
61
|
+
/**
|
|
62
|
+
* Build the purl of an OS package.
|
|
63
|
+
*
|
|
64
|
+
* deb, rpm and apk purls take their vendor (`ubuntu`, `almalinux`, `alpine`,
|
|
65
|
+
* `wolfi`) and the `distro` and `distro_name` qualifiers from the distro, plus
|
|
66
|
+
* `arch` and `epoch` from the package. alpm purls take the vendor (`arch`,
|
|
67
|
+
* `manjaro`) and `arch` only: that is all the alpm type defines, and an Arch
|
|
68
|
+
* system is rolling, with no release to name. A qualifier with no value is
|
|
69
|
+
* left out. brew, macports and snap purls carry neither vendor nor qualifiers;
|
|
70
|
+
* a flatpak purl carries the `arch` and `branch` of the flatpak ref.
|
|
71
|
+
*
|
|
72
|
+
* @param {Object} pkg The package
|
|
73
|
+
* @param {string} pkg.type One of OS_PACKAGE_PURL_TYPES
|
|
74
|
+
* @param {string} pkg.name Package name; a flatpak's application ID
|
|
75
|
+
* @param {string} [pkg.version] deb: the dpkg version. rpm: the version tag only. apk: version-rN. macports: the version without its revision.
|
|
76
|
+
* @param {string} [pkg.release] rpm release tag
|
|
77
|
+
* @param {string|number} [pkg.epoch] rpm epoch tag
|
|
78
|
+
* @param {string|number} [pkg.revision] MacPorts revision
|
|
79
|
+
* @param {string} [pkg.arch] Package architecture
|
|
80
|
+
* @param {string} [pkg.branch] flatpak branch (`stable`, `48`)
|
|
81
|
+
* @param {{namespace?: string, distroId?: string, distroName?: string}} [distro]
|
|
82
|
+
* What getDistroInfo() reports; read from the host's os-release when left out
|
|
83
|
+
* @returns {string|null} The purl, or null when the parts do not form a valid one
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildOsPackagePurl(pkg: {
|
|
86
|
+
type: string;
|
|
87
|
+
name: string;
|
|
88
|
+
version?: string;
|
|
89
|
+
release?: string;
|
|
90
|
+
epoch?: string | number;
|
|
91
|
+
revision?: string | number;
|
|
92
|
+
arch?: string;
|
|
93
|
+
branch?: string;
|
|
94
|
+
}, distro?: {
|
|
95
|
+
namespace?: string;
|
|
96
|
+
distroId?: string;
|
|
97
|
+
distroName?: string;
|
|
98
|
+
}): string | null;
|
|
99
|
+
//# sourceMappingURL=osPackagePurl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"osPackagePurl.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osPackagePurl.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aAShC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAH7B,MAAM,GAAC,SAGsB,GAF3B,OAAO,CAInB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAH5B,MAAM,GAAC,SAAS,GAAC,IAGW,GAF1B,OAAO,CAKnB;AAqCD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAC,MAAM,CAAA;CAG/B,GAFrB,MAAM,GAAC,SAAS,CAe5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAHzB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAC,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAC,MAAM,CAAA;CAGzE,GAFvB,MAAM,CA6BlB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAZnC;IAAoB,IAAI,EAAhB,MAAM,CACd;IAAoB,IAAI,EAAhB,MAAM,CACd;IAAqB,OAAO,AAA5B,CACA,EADQ,MAAM,CACd;IAAqB,OAAO,AAA5B,CACA,EADQ,MAAM,CACd;IAA4B,KAAK,AAAjC,CACA,EADQ,MAAM,GAAC,MAAM,CACrB;IAA4B,QAAQ,AAApC,CACA,EADQ,MAAM,GAAC,MAAM,CACrB;IAAqB,IAAI,AAAzB,CACA,EADQ,MAAM,CACd;IAAqB,MAAM,AAA3B,CACA,EADQ,MAAM,CACd;CAImC,EAAE,MAAM,AAJ3C,CAEA,EAFQ;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAIxB,GAFjC,MAAM,GAAC,IAAI,CA4DvB"}
|
|
@@ -7,13 +7,14 @@ export declare function _resetOsInfoCache(): void;
|
|
|
7
7
|
* correctly computed purl with distro qualifiers derived from /etc/os-release.
|
|
8
8
|
*
|
|
9
9
|
* @param {string} filePath - Absolute path to the library file
|
|
10
|
-
* @returns {{ name: string, version: string, arch: string, type: string, purl: string } | undefined}
|
|
10
|
+
* @returns {{ name: string, version: string, arch: string, type: string, epoch?: string, purl: string } | undefined}
|
|
11
11
|
*/
|
|
12
12
|
export declare function resolvePackageForFile(filePath: string): {
|
|
13
13
|
name: string;
|
|
14
14
|
version: string;
|
|
15
15
|
arch: string;
|
|
16
16
|
type: string;
|
|
17
|
+
epoch?: string;
|
|
17
18
|
purl: string;
|
|
18
19
|
} | undefined;
|
|
19
20
|
/**
|
|
@@ -42,8 +43,11 @@ export declare function collectExecutables(basePath: any, binPaths: any, exclude
|
|
|
42
43
|
* @param ldConf {String} Config file used by ldconfig to locate additional paths
|
|
43
44
|
* @param ldConfDirPattern {String} Config directory that can contain more .conf files for ldconfig
|
|
44
45
|
* @param excludePaths {Array[String]} Container-relative paths that should be excluded from the result set
|
|
46
|
+
* @param extraLibGlobs {Array[String]} Extra container-relative globs for files
|
|
47
|
+
* the default paths miss, such as libphp*.so under Apache's modules
|
|
48
|
+
* directory. The existing globs are unchanged; this adds candidates only.
|
|
45
49
|
*
|
|
46
50
|
* @return {Array[String]} List of executables
|
|
47
51
|
*/
|
|
48
|
-
export declare function collectSharedLibs(basePath: any, libPaths: any, ldConf: string, ldConfDirPattern: string, excludePaths?: any): any;
|
|
52
|
+
export declare function collectSharedLibs(basePath: any, libPaths: any, ldConf: string, ldConfDirPattern: string, excludePaths?: any, extraLibGlobs?: any): any;
|
|
49
53
|
//# sourceMappingURL=osPackageResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"osPackageResolver.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osPackageResolver.js"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC;
|
|
1
|
+
{"version":3,"file":"osPackageResolver.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osPackageResolver.js"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC;AAsDD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC,MAGmC,GAFjC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA8BnH;AAuGD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAJ9B,MAI8B,EAAE,UAAU,EAH1C,MAAM,EAGoC,GAFxC,MAAM,GAAC,SAAS,CA+B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA,EAAE,YAAY,MAAK,OAqEvE;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,KAAA,EACR,QAAQ,KAAA,EACR,MAAM,QAAA,EACN,gBAAgB,QAAA,EAChB,YAAY,MAAK,EACjB,aAAa,MAAK,OAiGnB"}
|