@cyclonedx/cdxgen 10.3.5 → 10.4.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 +2 -4
- package/analyzer.js +18 -18
- package/bin/cdxgen.js +78 -77
- package/bin/evinse.js +26 -26
- package/bin/repl.js +56 -62
- package/bin/verify.js +9 -9
- package/binary.js +55 -54
- package/cbomutils.js +6 -6
- package/db.js +17 -17
- package/display.js +30 -30
- package/display.test.js +2 -2
- package/docker.js +92 -89
- package/docker.test.js +30 -30
- package/envcontext.js +15 -15
- package/envcontext.test.js +1 -1
- package/evinser.js +94 -93
- package/evinser.test.js +24 -24
- package/index.js +522 -482
- package/package.json +8 -16
- package/piptree.js +6 -6
- package/postgen.js +2 -2
- package/postgen.test.js +5 -5
- package/protobom.js +37 -7
- package/protobom.test.js +6 -6
- package/server.js +16 -16
- package/types/analyzer.d.ts +7 -4
- package/types/binary.d.ts +12 -8
- package/types/cbomutils.d.ts +1 -1
- package/types/db.d.ts +23 -11
- package/types/display.d.ts +1 -1
- package/types/docker.d.ts +52 -32
- package/types/envcontext.d.ts +40 -40
- package/types/evinser.d.ts +3436 -717
- package/types/index.d.ts +66 -40
- package/types/jest.config.d.ts +2 -2
- package/types/piptree.d.ts +6 -2
- package/types/postgen.d.ts +1 -1
- package/types/protobom.d.ts +7 -3
- package/types/protobom.d.ts.map +1 -1
- package/types/server.d.ts +1 -1
- package/types/utils.d.ts +496 -302
- package/types/validator.d.ts +1 -1
- package/utils.js +742 -675
- package/utils.test.js +716 -674
- package/validator.js +20 -17
package/types/utils.d.ts
CHANGED
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
* @param {string} dirPath Root directory for search
|
|
5
5
|
* @param {string} pattern Glob pattern (eg: *.gradle)
|
|
6
6
|
*/
|
|
7
|
-
export function getAllFiles(
|
|
7
|
+
export function getAllFiles(
|
|
8
|
+
dirPath: string,
|
|
9
|
+
pattern: string,
|
|
10
|
+
options?: {},
|
|
11
|
+
): string[];
|
|
8
12
|
/**
|
|
9
13
|
* Method to get files matching a pattern
|
|
10
14
|
*
|
|
@@ -12,7 +16,11 @@ export function getAllFiles(dirPath: string, pattern: string, options?: {}): str
|
|
|
12
16
|
* @param {string} pattern Glob pattern (eg: *.gradle)
|
|
13
17
|
* @param {Array} ignoreList Directory patterns to ignore
|
|
14
18
|
*/
|
|
15
|
-
export function getAllFilesWithIgnore(
|
|
19
|
+
export function getAllFilesWithIgnore(
|
|
20
|
+
dirPath: string,
|
|
21
|
+
pattern: string,
|
|
22
|
+
ignoreList: any[],
|
|
23
|
+
): string[];
|
|
16
24
|
/**
|
|
17
25
|
* Performs a lookup + validation of the license specified in the
|
|
18
26
|
* package. If the license is a valid SPDX license ID, set the 'id'
|
|
@@ -38,8 +46,11 @@ export function addLicenseText(pkg: any, l: any, licenseContent: any): void;
|
|
|
38
46
|
* Read the file from the given path to the license text object and includes
|
|
39
47
|
* content-type attribute, if not default. Returns the license text object.
|
|
40
48
|
*/
|
|
41
|
-
export function readLicenseText(
|
|
42
|
-
|
|
49
|
+
export function readLicenseText(
|
|
50
|
+
licenseFilepath: any,
|
|
51
|
+
licenseContentType: any,
|
|
52
|
+
): {
|
|
53
|
+
content: string;
|
|
43
54
|
};
|
|
44
55
|
export function getSwiftPackageMetadata(pkgList: any): Promise<any[]>;
|
|
45
56
|
/**
|
|
@@ -54,16 +65,22 @@ export function getNpmMetadata(pkgList: any[]): Promise<any[]>;
|
|
|
54
65
|
* @param {string} pkgJsonFile package.json file
|
|
55
66
|
* @param {boolean} simple Return a simpler representation of the component by skipping extended attributes and license fetch.
|
|
56
67
|
*/
|
|
57
|
-
export function parsePkgJson(
|
|
68
|
+
export function parsePkgJson(
|
|
69
|
+
pkgJsonFile: string,
|
|
70
|
+
simple?: boolean,
|
|
71
|
+
): Promise<any[]>;
|
|
58
72
|
/**
|
|
59
73
|
* Parse nodejs package lock file
|
|
60
74
|
*
|
|
61
75
|
* @param {string} pkgLockFile package-lock.json file
|
|
62
76
|
* @param {object} options Command line options
|
|
63
77
|
*/
|
|
64
|
-
export function parsePkgLock(
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
export function parsePkgLock(
|
|
79
|
+
pkgLockFile: string,
|
|
80
|
+
options?: object,
|
|
81
|
+
): Promise<{
|
|
82
|
+
pkgList: any;
|
|
83
|
+
dependenciesList: any;
|
|
67
84
|
}>;
|
|
68
85
|
/**
|
|
69
86
|
* Given a lock file this method would return an Object with the identiy as the key and parsed name and value
|
|
@@ -80,8 +97,8 @@ export function yarnLockToIdentMap(lockData: string): {};
|
|
|
80
97
|
* @param {string} yarnLockFile yarn.lock file
|
|
81
98
|
*/
|
|
82
99
|
export function parseYarnLock(yarnLockFile: string): Promise<{
|
|
83
|
-
|
|
84
|
-
|
|
100
|
+
pkgList: any[];
|
|
101
|
+
dependenciesList: any[];
|
|
85
102
|
}>;
|
|
86
103
|
/**
|
|
87
104
|
* Parse nodejs shrinkwrap deps file
|
|
@@ -95,16 +112,22 @@ export function parseNodeShrinkwrap(swFile: string): Promise<any[]>;
|
|
|
95
112
|
* @param {string} pnpmLock pnpm-lock.yaml file
|
|
96
113
|
* @param {object} parentComponent parent component
|
|
97
114
|
*/
|
|
98
|
-
export function parsePnpmLock(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
115
|
+
export function parsePnpmLock(
|
|
116
|
+
pnpmLock: string,
|
|
117
|
+
parentComponent?: object,
|
|
118
|
+
): Promise<
|
|
119
|
+
| {
|
|
120
|
+
pkgList?: undefined;
|
|
121
|
+
dependenciesList?: undefined;
|
|
122
|
+
}
|
|
123
|
+
| {
|
|
124
|
+
pkgList: any[];
|
|
125
|
+
dependenciesList: {
|
|
104
126
|
ref: string;
|
|
105
127
|
dependsOn: string[];
|
|
106
|
-
|
|
107
|
-
}
|
|
128
|
+
}[];
|
|
129
|
+
}
|
|
130
|
+
>;
|
|
108
131
|
/**
|
|
109
132
|
* Parse bower json file
|
|
110
133
|
*
|
|
@@ -123,42 +146,44 @@ export function parseMinJs(minJsFile: string): Promise<any[]>;
|
|
|
123
146
|
* @param {string} pom file to parse
|
|
124
147
|
*/
|
|
125
148
|
export function parsePom(pomFile: any): {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
group: any;
|
|
150
|
+
name: any;
|
|
151
|
+
version: any;
|
|
152
|
+
qualifiers: {
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
properties: {
|
|
156
|
+
name: string;
|
|
157
|
+
value: any;
|
|
158
|
+
}[];
|
|
159
|
+
evidence: {
|
|
160
|
+
identity: {
|
|
161
|
+
field: string;
|
|
162
|
+
confidence: number;
|
|
163
|
+
methods: {
|
|
164
|
+
technique: string;
|
|
165
|
+
confidence: number;
|
|
134
166
|
value: any;
|
|
135
|
-
|
|
136
|
-
evidence: {
|
|
137
|
-
identity: {
|
|
138
|
-
field: string;
|
|
139
|
-
confidence: number;
|
|
140
|
-
methods: {
|
|
141
|
-
technique: string;
|
|
142
|
-
confidence: number;
|
|
143
|
-
value: any;
|
|
144
|
-
}[];
|
|
145
|
-
};
|
|
167
|
+
}[];
|
|
146
168
|
};
|
|
169
|
+
};
|
|
147
170
|
}[];
|
|
148
171
|
/**
|
|
149
172
|
* Parse maven tree output
|
|
150
173
|
* @param {string} rawOutput Raw string output
|
|
151
174
|
*/
|
|
152
|
-
export function parseMavenTree(rawOutput: string):
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
175
|
+
export function parseMavenTree(rawOutput: string):
|
|
176
|
+
| {
|
|
177
|
+
pkgList?: undefined;
|
|
178
|
+
dependenciesList?: undefined;
|
|
179
|
+
}
|
|
180
|
+
| {
|
|
181
|
+
pkgList: any[];
|
|
182
|
+
dependenciesList: {
|
|
158
183
|
ref: string;
|
|
159
184
|
dependsOn: any;
|
|
160
|
-
|
|
161
|
-
};
|
|
185
|
+
}[];
|
|
186
|
+
};
|
|
162
187
|
/**
|
|
163
188
|
* Parse gradle dependencies output
|
|
164
189
|
* @param {string} rawOutput Raw string output
|
|
@@ -166,23 +191,30 @@ export function parseMavenTree(rawOutput: string): {
|
|
|
166
191
|
* @param {string} rootProjectName Root project name
|
|
167
192
|
* @param {string} rootProjectVersion Root project version
|
|
168
193
|
*/
|
|
169
|
-
export function parseGradleDep(
|
|
170
|
-
|
|
194
|
+
export function parseGradleDep(
|
|
195
|
+
rawOutput: string,
|
|
196
|
+
rootProjectGroup?: string,
|
|
197
|
+
rootProjectName?: string,
|
|
198
|
+
rootProjectVersion?: string,
|
|
199
|
+
):
|
|
200
|
+
| {
|
|
201
|
+
pkgList: {
|
|
171
202
|
group: any;
|
|
172
203
|
name: any;
|
|
173
204
|
version: any;
|
|
174
205
|
qualifiers: {
|
|
175
|
-
|
|
206
|
+
type: string;
|
|
176
207
|
};
|
|
177
|
-
|
|
178
|
-
|
|
208
|
+
}[];
|
|
209
|
+
dependenciesList: {
|
|
179
210
|
ref: string;
|
|
180
211
|
dependsOn: any;
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
212
|
+
}[];
|
|
213
|
+
}
|
|
214
|
+
| {
|
|
215
|
+
pkgList?: undefined;
|
|
216
|
+
dependenciesList?: undefined;
|
|
217
|
+
};
|
|
186
218
|
/**
|
|
187
219
|
* Parse clojure cli dependencies output
|
|
188
220
|
* @param {string} rawOutput Raw string output
|
|
@@ -200,8 +232,8 @@ export function parseLeinMap(node: any, keys_cache: any, deps: any): any;
|
|
|
200
232
|
* @param {string} rawOutput Raw string output
|
|
201
233
|
*/
|
|
202
234
|
export function parseGradleProjects(rawOutput: string): {
|
|
203
|
-
|
|
204
|
-
|
|
235
|
+
rootProject: string;
|
|
236
|
+
projects: any[];
|
|
205
237
|
};
|
|
206
238
|
/**
|
|
207
239
|
* Parse gradle properties output
|
|
@@ -209,13 +241,13 @@ export function parseGradleProjects(rawOutput: string): {
|
|
|
209
241
|
* @param {string} rawOutput Raw string output
|
|
210
242
|
*/
|
|
211
243
|
export function parseGradleProperties(rawOutput: string): {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
244
|
+
rootProject: string;
|
|
245
|
+
projects: any[];
|
|
246
|
+
metadata: {
|
|
247
|
+
group: string;
|
|
248
|
+
version: string;
|
|
249
|
+
properties: any[];
|
|
250
|
+
};
|
|
219
251
|
};
|
|
220
252
|
/**
|
|
221
253
|
* Execute gradle properties command and return parsed output
|
|
@@ -224,7 +256,11 @@ export function parseGradleProperties(rawOutput: string): {
|
|
|
224
256
|
* @param {string} rootPath Root directory
|
|
225
257
|
* @param {string} subProject Sub project name
|
|
226
258
|
*/
|
|
227
|
-
export function executeGradleProperties(
|
|
259
|
+
export function executeGradleProperties(
|
|
260
|
+
dir: string,
|
|
261
|
+
rootPath: string,
|
|
262
|
+
subProject: string,
|
|
263
|
+
): {};
|
|
228
264
|
/**
|
|
229
265
|
* Parse bazel action graph output
|
|
230
266
|
* @param {string} rawOutput Raw string output
|
|
@@ -262,7 +298,10 @@ export function guessLicenseId(content: any): any;
|
|
|
262
298
|
* @param {Array} pkgList Package list
|
|
263
299
|
* @param {Object} jarNSMapping Jar Namespace mapping object
|
|
264
300
|
*/
|
|
265
|
-
export function getMvnMetadata(
|
|
301
|
+
export function getMvnMetadata(
|
|
302
|
+
pkgList: any[],
|
|
303
|
+
jarNSMapping?: any,
|
|
304
|
+
): Promise<any[]>;
|
|
266
305
|
/**
|
|
267
306
|
* Method to compose URL of pom.xml
|
|
268
307
|
*
|
|
@@ -273,7 +312,12 @@ export function getMvnMetadata(pkgList: any[], jarNSMapping?: any): Promise<any[
|
|
|
273
312
|
*
|
|
274
313
|
* @return {String} fullUrl
|
|
275
314
|
*/
|
|
276
|
-
export function composePomXmlUrl({
|
|
315
|
+
export function composePomXmlUrl({
|
|
316
|
+
urlPrefix,
|
|
317
|
+
group,
|
|
318
|
+
name,
|
|
319
|
+
version,
|
|
320
|
+
}: string): string;
|
|
277
321
|
/**
|
|
278
322
|
* Method to fetch pom.xml data and parse it to JSON
|
|
279
323
|
*
|
|
@@ -284,7 +328,12 @@ export function composePomXmlUrl({ urlPrefix, group, name, version }: string): s
|
|
|
284
328
|
*
|
|
285
329
|
* @return {Object|undefined}
|
|
286
330
|
*/
|
|
287
|
-
export function fetchPomXmlAsJson({
|
|
331
|
+
export function fetchPomXmlAsJson({
|
|
332
|
+
urlPrefix,
|
|
333
|
+
group,
|
|
334
|
+
name,
|
|
335
|
+
version,
|
|
336
|
+
}: string): any | undefined;
|
|
288
337
|
/**
|
|
289
338
|
* Method to fetch pom.xml data
|
|
290
339
|
*
|
|
@@ -295,7 +344,12 @@ export function fetchPomXmlAsJson({ urlPrefix, group, name, version }: string):
|
|
|
295
344
|
*
|
|
296
345
|
* @return {Promise<String>}
|
|
297
346
|
*/
|
|
298
|
-
export function fetchPomXml({
|
|
347
|
+
export function fetchPomXml({
|
|
348
|
+
urlPrefix,
|
|
349
|
+
group,
|
|
350
|
+
name,
|
|
351
|
+
version,
|
|
352
|
+
}: string): Promise<string>;
|
|
299
353
|
/**
|
|
300
354
|
* Method extract single or multiple license entries that might appear in pom.xml
|
|
301
355
|
*
|
|
@@ -312,15 +366,20 @@ export function parseLicenseEntryOrArrayFromPomXml(license: any | any[]): any[];
|
|
|
312
366
|
*
|
|
313
367
|
* @return {Promise<String>} License ID
|
|
314
368
|
*/
|
|
315
|
-
export function extractLicenseCommentFromPomXml({
|
|
369
|
+
export function extractLicenseCommentFromPomXml({
|
|
370
|
+
urlPrefix,
|
|
371
|
+
group,
|
|
372
|
+
name,
|
|
373
|
+
version,
|
|
374
|
+
}: string): Promise<string>;
|
|
316
375
|
/**
|
|
317
376
|
* Method to parse python requires_dist attribute found in pypi setup.py
|
|
318
377
|
*
|
|
319
378
|
* @param requires_dist string
|
|
320
379
|
*/
|
|
321
380
|
export function parsePyRequiresDist(dist_string: any): {
|
|
322
|
-
|
|
323
|
-
|
|
381
|
+
name: string;
|
|
382
|
+
version: string;
|
|
324
383
|
};
|
|
325
384
|
/**
|
|
326
385
|
* Method to mimic pip version solver using node-semver
|
|
@@ -328,14 +387,20 @@ export function parsePyRequiresDist(dist_string: any): {
|
|
|
328
387
|
* @param {Array} versionsList List of version numbers available
|
|
329
388
|
* @param {*} versionSpecifiers pip version specifier
|
|
330
389
|
*/
|
|
331
|
-
export function guessPypiMatchingVersion(
|
|
390
|
+
export function guessPypiMatchingVersion(
|
|
391
|
+
versionsList: any[],
|
|
392
|
+
versionSpecifiers: any,
|
|
393
|
+
): any;
|
|
332
394
|
/**
|
|
333
395
|
* Method to retrieve metadata for python packages by querying pypi
|
|
334
396
|
*
|
|
335
397
|
* @param {Array} pkgList Package list
|
|
336
398
|
* @param {Boolean} fetchDepsInfo Fetch dependencies info from pypi
|
|
337
399
|
*/
|
|
338
|
-
export function getPyMetadata(
|
|
400
|
+
export function getPyMetadata(
|
|
401
|
+
pkgList: any[],
|
|
402
|
+
fetchDepsInfo: boolean,
|
|
403
|
+
): Promise<any[]>;
|
|
339
404
|
/**
|
|
340
405
|
* Method to parse bdist_wheel metadata
|
|
341
406
|
*
|
|
@@ -360,21 +425,30 @@ export function parsePyProjectToml(tomlFile: string): {};
|
|
|
360
425
|
* @param {Object} lockData JSON data from poetry.lock
|
|
361
426
|
* @param {string} lockFile Lock file name for evidence
|
|
362
427
|
*/
|
|
363
|
-
export function parsePoetrylockData(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
428
|
+
export function parsePoetrylockData(
|
|
429
|
+
lockData: any,
|
|
430
|
+
lockFile: string,
|
|
431
|
+
): Promise<
|
|
432
|
+
| any[]
|
|
433
|
+
| {
|
|
434
|
+
pkgList: any[];
|
|
435
|
+
rootList: any[];
|
|
436
|
+
dependenciesList: {
|
|
367
437
|
ref: string;
|
|
368
438
|
dependsOn: any[];
|
|
369
|
-
|
|
370
|
-
}
|
|
439
|
+
}[];
|
|
440
|
+
}
|
|
441
|
+
>;
|
|
371
442
|
/**
|
|
372
443
|
* Method to parse requirements.txt data
|
|
373
444
|
*
|
|
374
445
|
* @param {Object} reqData Requirements.txt data
|
|
375
446
|
* @param {Boolean} fetchDepsInfo Fetch dependencies info from pypi
|
|
376
447
|
*/
|
|
377
|
-
export function parseReqFile(
|
|
448
|
+
export function parseReqFile(
|
|
449
|
+
reqData: any,
|
|
450
|
+
fetchDepsInfo: boolean,
|
|
451
|
+
): Promise<any[]>;
|
|
378
452
|
/**
|
|
379
453
|
* Method to find python modules by parsing the imports and then checking with PyPI to obtain the latest version
|
|
380
454
|
*
|
|
@@ -382,14 +456,18 @@ export function parseReqFile(reqData: any, fetchDepsInfo: boolean): Promise<any[
|
|
|
382
456
|
* @param {Array} epkgList Existing package list
|
|
383
457
|
* @returns List of packages
|
|
384
458
|
*/
|
|
385
|
-
export function getPyModules(
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
459
|
+
export function getPyModules(
|
|
460
|
+
src: string,
|
|
461
|
+
epkgList: any[],
|
|
462
|
+
options: any,
|
|
463
|
+
): Promise<{
|
|
464
|
+
allImports: {};
|
|
465
|
+
pkgList: any;
|
|
466
|
+
dependenciesList: {
|
|
467
|
+
ref: string;
|
|
468
|
+
dependsOn: any[];
|
|
469
|
+
}[];
|
|
470
|
+
modList: any;
|
|
393
471
|
}>;
|
|
394
472
|
/**
|
|
395
473
|
* Method to parse setup.py data
|
|
@@ -402,7 +480,9 @@ export function parseSetupPyFile(setupPyData: any): Promise<any[]>;
|
|
|
402
480
|
* @param {Object} repoMetadata Repo metadata with group and name
|
|
403
481
|
* @return {String|undefined} github api url (or undefined - if not enough data)
|
|
404
482
|
*/
|
|
405
|
-
export function repoMetadataToGitHubApiUrl(
|
|
483
|
+
export function repoMetadataToGitHubApiUrl(
|
|
484
|
+
repoMetadata: any,
|
|
485
|
+
): string | undefined;
|
|
406
486
|
/**
|
|
407
487
|
* Method to split GitHub url into its parts
|
|
408
488
|
* @param {String} repoUrl Repository url
|
|
@@ -415,7 +495,10 @@ export function getGithubUrlParts(repoUrl: string): [string];
|
|
|
415
495
|
* @param {Object} repoMetadata Object containing group and package name strings
|
|
416
496
|
* @return {String|undefined} github api url (or undefined - if not a GitHub repo)
|
|
417
497
|
*/
|
|
418
|
-
export function toGitHubApiUrl(
|
|
498
|
+
export function toGitHubApiUrl(
|
|
499
|
+
repoUrl: string,
|
|
500
|
+
repoMetadata: any,
|
|
501
|
+
): string | undefined;
|
|
419
502
|
/**
|
|
420
503
|
* Method to retrieve repo license by querying github api
|
|
421
504
|
*
|
|
@@ -423,14 +506,22 @@ export function toGitHubApiUrl(repoUrl: string, repoMetadata: any): string | und
|
|
|
423
506
|
* @param {Object} repoMetadata Object containing group and package name strings
|
|
424
507
|
* @return {Promise<String>} SPDX license id
|
|
425
508
|
*/
|
|
426
|
-
export function getRepoLicense(
|
|
509
|
+
export function getRepoLicense(
|
|
510
|
+
repoUrl: string,
|
|
511
|
+
repoMetadata: any,
|
|
512
|
+
): Promise<string>;
|
|
427
513
|
/**
|
|
428
514
|
* Method to get go pkg license from go.dev site.
|
|
429
515
|
*
|
|
430
516
|
* @param {Object} repoMetadata Repo metadata
|
|
431
517
|
*/
|
|
432
518
|
export function getGoPkgLicense(repoMetadata: any): Promise<any>;
|
|
433
|
-
export function getGoPkgComponent(
|
|
519
|
+
export function getGoPkgComponent(
|
|
520
|
+
group: any,
|
|
521
|
+
name: any,
|
|
522
|
+
version: any,
|
|
523
|
+
hash: any,
|
|
524
|
+
): Promise<{}>;
|
|
434
525
|
export function parseGoModData(goModData: any, gosumMap: any): Promise<any[]>;
|
|
435
526
|
/**
|
|
436
527
|
* Parse go list output
|
|
@@ -438,9 +529,12 @@ export function parseGoModData(goModData: any, gosumMap: any): Promise<any[]>;
|
|
|
438
529
|
* @param {string} rawOutput Output from go list invocation
|
|
439
530
|
* @returns Object with parent component and List of packages
|
|
440
531
|
*/
|
|
441
|
-
export function parseGoListDep(
|
|
442
|
-
|
|
443
|
-
|
|
532
|
+
export function parseGoListDep(
|
|
533
|
+
rawOutput: string,
|
|
534
|
+
gosumMap: any,
|
|
535
|
+
): Promise<{
|
|
536
|
+
parentComponent: {};
|
|
537
|
+
pkgList: {}[];
|
|
444
538
|
}>;
|
|
445
539
|
/**
|
|
446
540
|
* Parse go mod graph
|
|
@@ -452,12 +546,18 @@ export function parseGoListDep(rawOutput: string, gosumMap: any): Promise<{
|
|
|
452
546
|
*
|
|
453
547
|
* @returns Object containing List of packages and dependencies
|
|
454
548
|
*/
|
|
455
|
-
export function parseGoModGraph(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
549
|
+
export function parseGoModGraph(
|
|
550
|
+
rawOutput: string,
|
|
551
|
+
goModFile: string,
|
|
552
|
+
gosumMap: any,
|
|
553
|
+
epkgList?: any[],
|
|
554
|
+
parentComponent?: {},
|
|
555
|
+
): Promise<{
|
|
556
|
+
pkgList: any[];
|
|
557
|
+
dependenciesList: {
|
|
558
|
+
ref: string;
|
|
559
|
+
dependsOn: any[];
|
|
560
|
+
}[];
|
|
461
561
|
}>;
|
|
462
562
|
/**
|
|
463
563
|
* Parse go mod why output
|
|
@@ -491,21 +591,28 @@ export function parseGemspecData(gemspecData: string): Promise<any[]>;
|
|
|
491
591
|
* @param {object} gemLockData Gemfile.lock data
|
|
492
592
|
* @param {string} lockFile Lock file
|
|
493
593
|
*/
|
|
494
|
-
export function parseGemfileLockData(
|
|
495
|
-
|
|
496
|
-
|
|
594
|
+
export function parseGemfileLockData(
|
|
595
|
+
gemLockData: object,
|
|
596
|
+
lockFile: string,
|
|
597
|
+
): Promise<
|
|
598
|
+
| any[]
|
|
599
|
+
| {
|
|
600
|
+
pkgList: any[];
|
|
601
|
+
dependenciesList: {
|
|
497
602
|
ref: string;
|
|
498
603
|
dependsOn: any[];
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
604
|
+
}[];
|
|
605
|
+
rootList?: undefined;
|
|
606
|
+
}
|
|
607
|
+
| {
|
|
608
|
+
pkgList: any[];
|
|
609
|
+
dependenciesList: {
|
|
504
610
|
ref: string;
|
|
505
611
|
dependsOn: any[];
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
612
|
+
}[];
|
|
613
|
+
rootList: any[];
|
|
614
|
+
}
|
|
615
|
+
>;
|
|
509
616
|
/**
|
|
510
617
|
* Method to retrieve metadata for rust packages by querying crates
|
|
511
618
|
*
|
|
@@ -535,7 +642,10 @@ export function getDartMetadata(pkgList: any[]): Promise<any[]>;
|
|
|
535
642
|
*
|
|
536
643
|
* @returns {array} Package list
|
|
537
644
|
*/
|
|
538
|
-
export function parseCargoTomlData(
|
|
645
|
+
export function parseCargoTomlData(
|
|
646
|
+
cargoTomlFile: string,
|
|
647
|
+
simple?: boolean,
|
|
648
|
+
): any[];
|
|
539
649
|
/**
|
|
540
650
|
* Parse a Cargo.lock file to find components within the Rust project.
|
|
541
651
|
*
|
|
@@ -546,19 +656,23 @@ export function parseCargoTomlData(cargoTomlFile: string, simple?: boolean): any
|
|
|
546
656
|
*/
|
|
547
657
|
export function parseCargoData(cargoLockFile: string, simple?: boolean): any[];
|
|
548
658
|
export function parseCargoDependencyData(cargoLockData: any): {
|
|
549
|
-
|
|
550
|
-
|
|
659
|
+
ref: string;
|
|
660
|
+
dependsOn: any;
|
|
551
661
|
}[];
|
|
552
662
|
export function parseCargoAuditableData(cargoData: any): Promise<any[]>;
|
|
553
663
|
export function parsePubLockData(pubLockData: any): Promise<any[]>;
|
|
554
664
|
export function parsePubYamlData(pubYamlData: any): any[];
|
|
555
665
|
export function parseHelmYamlData(helmData: any): any[];
|
|
556
|
-
export function recurseImageNameLookup(
|
|
666
|
+
export function recurseImageNameLookup(
|
|
667
|
+
keyValueObj: any,
|
|
668
|
+
pkgList: any,
|
|
669
|
+
imgList: any,
|
|
670
|
+
): any;
|
|
557
671
|
export function parseContainerFile(fileContents: any): {
|
|
558
|
-
|
|
672
|
+
image: any;
|
|
559
673
|
}[];
|
|
560
674
|
export function parseBitbucketPipelinesFile(fileContents: any): {
|
|
561
|
-
|
|
675
|
+
image: any;
|
|
562
676
|
}[];
|
|
563
677
|
export function parseContainerSpecData(dcData: any): any[];
|
|
564
678
|
export function identifyFlow(processingObj: any): string;
|
|
@@ -576,18 +690,27 @@ export function parseNupkg(nupkgFile: any): Promise<any[]>;
|
|
|
576
690
|
export function parseNuspecData(nupkgFile: any, nuspecData: any): any[];
|
|
577
691
|
export function parseCsPkgData(pkgData: any): any[];
|
|
578
692
|
export function parseCsProjData(csProjData: any, projFile: any): any[];
|
|
579
|
-
export function parseCsProjAssetsData(
|
|
580
|
-
|
|
581
|
-
|
|
693
|
+
export function parseCsProjAssetsData(
|
|
694
|
+
csProjData: any,
|
|
695
|
+
assetsJsonFile: any,
|
|
696
|
+
): {
|
|
697
|
+
pkgList: any[];
|
|
698
|
+
dependenciesList: any[];
|
|
582
699
|
};
|
|
583
|
-
export function parseCsPkgLockData(
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
700
|
+
export function parseCsPkgLockData(
|
|
701
|
+
csLockData: any,
|
|
702
|
+
pkgLockFile: any,
|
|
703
|
+
): {
|
|
704
|
+
pkgList: any[];
|
|
705
|
+
dependenciesList: any[];
|
|
706
|
+
rootList: any[];
|
|
587
707
|
};
|
|
588
|
-
export function parsePaketLockData(
|
|
589
|
-
|
|
590
|
-
|
|
708
|
+
export function parsePaketLockData(
|
|
709
|
+
paketLockData: any,
|
|
710
|
+
pkgLockFile: any,
|
|
711
|
+
): {
|
|
712
|
+
pkgList: any[];
|
|
713
|
+
dependenciesList: any[];
|
|
591
714
|
};
|
|
592
715
|
/**
|
|
593
716
|
* Parse composer lock file
|
|
@@ -595,8 +718,13 @@ export function parsePaketLockData(paketLockData: any, pkgLockFile: any): {
|
|
|
595
718
|
* @param {string} pkgLockFile composer.lock file
|
|
596
719
|
* @param {array} rootRequires require section from composer.json
|
|
597
720
|
*/
|
|
598
|
-
export function parseComposerLock(
|
|
599
|
-
|
|
721
|
+
export function parseComposerLock(
|
|
722
|
+
pkgLockFile: string,
|
|
723
|
+
rootRequires: any[],
|
|
724
|
+
):
|
|
725
|
+
| any[]
|
|
726
|
+
| {
|
|
727
|
+
pkgList: {
|
|
600
728
|
group: string;
|
|
601
729
|
name: string;
|
|
602
730
|
purl: string;
|
|
@@ -607,26 +735,26 @@ export function parseComposerLock(pkgLockFile: string, rootRequires: any[]): any
|
|
|
607
735
|
description: any;
|
|
608
736
|
scope: string;
|
|
609
737
|
properties: {
|
|
610
|
-
|
|
611
|
-
|
|
738
|
+
name: string;
|
|
739
|
+
value: string;
|
|
612
740
|
}[];
|
|
613
741
|
evidence: {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
742
|
+
identity: {
|
|
743
|
+
field: string;
|
|
744
|
+
confidence: number;
|
|
745
|
+
methods: {
|
|
746
|
+
technique: string;
|
|
747
|
+
confidence: number;
|
|
748
|
+
value: string;
|
|
749
|
+
}[];
|
|
750
|
+
};
|
|
623
751
|
};
|
|
624
|
-
|
|
625
|
-
|
|
752
|
+
}[];
|
|
753
|
+
dependenciesList: {
|
|
626
754
|
ref: string;
|
|
627
755
|
dependsOn: any[];
|
|
628
|
-
|
|
629
|
-
|
|
756
|
+
}[];
|
|
757
|
+
rootList: {
|
|
630
758
|
group: string;
|
|
631
759
|
name: string;
|
|
632
760
|
purl: string;
|
|
@@ -637,28 +765,28 @@ export function parseComposerLock(pkgLockFile: string, rootRequires: any[]): any
|
|
|
637
765
|
description: any;
|
|
638
766
|
scope: string;
|
|
639
767
|
properties: {
|
|
640
|
-
|
|
641
|
-
|
|
768
|
+
name: string;
|
|
769
|
+
value: string;
|
|
642
770
|
}[];
|
|
643
771
|
evidence: {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
772
|
+
identity: {
|
|
773
|
+
field: string;
|
|
774
|
+
confidence: number;
|
|
775
|
+
methods: {
|
|
776
|
+
technique: string;
|
|
777
|
+
confidence: number;
|
|
778
|
+
value: string;
|
|
779
|
+
}[];
|
|
780
|
+
};
|
|
653
781
|
};
|
|
654
|
-
|
|
655
|
-
};
|
|
782
|
+
}[];
|
|
783
|
+
};
|
|
656
784
|
export function parseSbtTree(sbtTreeFile: any): {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
785
|
+
pkgList: any[];
|
|
786
|
+
dependenciesList: {
|
|
787
|
+
ref: string;
|
|
788
|
+
dependsOn: any;
|
|
789
|
+
}[];
|
|
662
790
|
};
|
|
663
791
|
/**
|
|
664
792
|
* Parse sbt lock file
|
|
@@ -666,26 +794,26 @@ export function parseSbtTree(sbtTreeFile: any): {
|
|
|
666
794
|
* @param {string} pkgLockFile build.sbt.lock file
|
|
667
795
|
*/
|
|
668
796
|
export function parseSbtLock(pkgLockFile: string): {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
797
|
+
group: any;
|
|
798
|
+
name: any;
|
|
799
|
+
version: any;
|
|
800
|
+
_integrity: string;
|
|
801
|
+
scope: string;
|
|
802
|
+
properties: {
|
|
803
|
+
name: string;
|
|
804
|
+
value: string;
|
|
805
|
+
}[];
|
|
806
|
+
evidence: {
|
|
807
|
+
identity: {
|
|
808
|
+
field: string;
|
|
809
|
+
confidence: number;
|
|
810
|
+
methods: {
|
|
811
|
+
technique: string;
|
|
812
|
+
confidence: number;
|
|
676
813
|
value: string;
|
|
677
|
-
|
|
678
|
-
evidence: {
|
|
679
|
-
identity: {
|
|
680
|
-
field: string;
|
|
681
|
-
confidence: number;
|
|
682
|
-
methods: {
|
|
683
|
-
technique: string;
|
|
684
|
-
confidence: number;
|
|
685
|
-
value: string;
|
|
686
|
-
}[];
|
|
687
|
-
};
|
|
814
|
+
}[];
|
|
688
815
|
};
|
|
816
|
+
};
|
|
689
817
|
}[];
|
|
690
818
|
/**
|
|
691
819
|
* Method to execute dpkg --listfiles to determine the files provided by a given package
|
|
@@ -730,60 +858,75 @@ export function executeEqueryList(pkgName: string): string[];
|
|
|
730
858
|
* @param {Array} results Query Results
|
|
731
859
|
* @param {Boolean} enhance Optionally enhance results by invoking additional package manager commands
|
|
732
860
|
*/
|
|
733
|
-
export function convertOSQueryResults(
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
861
|
+
export function convertOSQueryResults(
|
|
862
|
+
queryCategory: any,
|
|
863
|
+
queryObj: any,
|
|
864
|
+
results: any[],
|
|
865
|
+
enhance?: boolean,
|
|
866
|
+
): {
|
|
867
|
+
name: any;
|
|
868
|
+
group: string;
|
|
869
|
+
version: any;
|
|
870
|
+
description: any;
|
|
871
|
+
publisher: any;
|
|
872
|
+
"bom-ref": string;
|
|
873
|
+
purl: string;
|
|
874
|
+
scope: any;
|
|
875
|
+
type: any;
|
|
743
876
|
}[];
|
|
744
877
|
/**
|
|
745
878
|
* Parse swift dependency tree output json object
|
|
746
879
|
* @param {string} jsonObject Swift dependencies json object
|
|
747
880
|
* @param {string} pkgFile Package.swift file
|
|
748
881
|
*/
|
|
749
|
-
export function parseSwiftJsonTreeObject(
|
|
882
|
+
export function parseSwiftJsonTreeObject(
|
|
883
|
+
pkgList: any,
|
|
884
|
+
dependenciesList: any,
|
|
885
|
+
jsonObject: string,
|
|
886
|
+
pkgFile: string,
|
|
887
|
+
): string;
|
|
750
888
|
/**
|
|
751
889
|
* Parse swift dependency tree output
|
|
752
890
|
* @param {string} rawOutput Swift dependencies json output
|
|
753
891
|
* @param {string} pkgFile Package.swift file
|
|
754
892
|
*/
|
|
755
|
-
export function parseSwiftJsonTree(
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
893
|
+
export function parseSwiftJsonTree(
|
|
894
|
+
rawOutput: string,
|
|
895
|
+
pkgFile: string,
|
|
896
|
+
):
|
|
897
|
+
| {
|
|
898
|
+
pkgList?: undefined;
|
|
899
|
+
dependenciesList?: undefined;
|
|
900
|
+
}
|
|
901
|
+
| {
|
|
902
|
+
pkgList: any[];
|
|
903
|
+
dependenciesList: any[];
|
|
904
|
+
};
|
|
762
905
|
/**
|
|
763
906
|
* Parse swift package resolved file
|
|
764
907
|
* @param {string} resolvedFile Package.resolved file
|
|
765
908
|
*/
|
|
766
909
|
export function parseSwiftResolved(resolvedFile: string): {
|
|
910
|
+
name: string;
|
|
911
|
+
group: string;
|
|
912
|
+
version: string;
|
|
913
|
+
purl: string;
|
|
914
|
+
"bom-ref": string;
|
|
915
|
+
properties: {
|
|
767
916
|
name: string;
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
917
|
+
value: string;
|
|
918
|
+
}[];
|
|
919
|
+
evidence: {
|
|
920
|
+
identity: {
|
|
921
|
+
field: string;
|
|
922
|
+
confidence: number;
|
|
923
|
+
methods: {
|
|
924
|
+
technique: string;
|
|
925
|
+
confidence: number;
|
|
774
926
|
value: string;
|
|
775
|
-
|
|
776
|
-
evidence: {
|
|
777
|
-
identity: {
|
|
778
|
-
field: string;
|
|
779
|
-
confidence: number;
|
|
780
|
-
methods: {
|
|
781
|
-
technique: string;
|
|
782
|
-
confidence: number;
|
|
783
|
-
value: string;
|
|
784
|
-
}[];
|
|
785
|
-
};
|
|
927
|
+
}[];
|
|
786
928
|
};
|
|
929
|
+
};
|
|
787
930
|
}[];
|
|
788
931
|
/**
|
|
789
932
|
* Collect maven dependencies
|
|
@@ -793,8 +936,18 @@ export function parseSwiftResolved(resolvedFile: string): {
|
|
|
793
936
|
* @param {boolean} cleanup Remove temporary directories
|
|
794
937
|
* @param {boolean} includeCacheDir Include maven and gradle cache directories
|
|
795
938
|
*/
|
|
796
|
-
export function collectMvnDependencies(
|
|
797
|
-
|
|
939
|
+
export function collectMvnDependencies(
|
|
940
|
+
mavenCmd: string,
|
|
941
|
+
basePath: string,
|
|
942
|
+
cleanup?: boolean,
|
|
943
|
+
includeCacheDir?: boolean,
|
|
944
|
+
): Promise<{}>;
|
|
945
|
+
export function collectGradleDependencies(
|
|
946
|
+
gradleCmd: any,
|
|
947
|
+
basePath: any,
|
|
948
|
+
cleanup?: boolean,
|
|
949
|
+
includeCacheDir?: boolean,
|
|
950
|
+
): Promise<{}>;
|
|
798
951
|
/**
|
|
799
952
|
* Method to collect class names from all jars in a directory
|
|
800
953
|
*
|
|
@@ -805,35 +958,35 @@ export function collectGradleDependencies(gradleCmd: any, basePath: any, cleanup
|
|
|
805
958
|
*/
|
|
806
959
|
export function collectJarNS(jarPath: string, pomPathMap?: object): Promise<{}>;
|
|
807
960
|
export function convertJarNSToPackages(jarNSMapping: any): {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
value: any;
|
|
822
|
-
}[];
|
|
823
|
-
};
|
|
824
|
-
};
|
|
825
|
-
properties: {
|
|
826
|
-
name: string;
|
|
961
|
+
name: any;
|
|
962
|
+
group: any;
|
|
963
|
+
version: any;
|
|
964
|
+
description: any;
|
|
965
|
+
purl: string;
|
|
966
|
+
"bom-ref": string;
|
|
967
|
+
evidence: {
|
|
968
|
+
identity: {
|
|
969
|
+
field: string;
|
|
970
|
+
confidence: number;
|
|
971
|
+
methods: {
|
|
972
|
+
technique: string;
|
|
973
|
+
confidence: number;
|
|
827
974
|
value: any;
|
|
828
|
-
|
|
975
|
+
}[];
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
properties: {
|
|
979
|
+
name: string;
|
|
980
|
+
value: any;
|
|
981
|
+
}[];
|
|
829
982
|
}[];
|
|
830
983
|
export function parsePomXml(pomXmlData: any): {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
984
|
+
artifactId: any;
|
|
985
|
+
groupId: any;
|
|
986
|
+
version: any;
|
|
987
|
+
description: any;
|
|
988
|
+
url: any;
|
|
989
|
+
scm: any;
|
|
837
990
|
};
|
|
838
991
|
export function parseJarManifest(jarMetadata: any): {};
|
|
839
992
|
export function parsePomProperties(pomProperties: any): {};
|
|
@@ -862,7 +1015,11 @@ export function checksumFile(hashName: string, path: string): Promise<string>;
|
|
|
862
1015
|
*
|
|
863
1016
|
* @return pkgList Package list
|
|
864
1017
|
*/
|
|
865
|
-
export function extractJarArchive(
|
|
1018
|
+
export function extractJarArchive(
|
|
1019
|
+
jarFile: string,
|
|
1020
|
+
tempDir: string,
|
|
1021
|
+
jarNSMapping?: object,
|
|
1022
|
+
): Promise<any[]>;
|
|
866
1023
|
/**
|
|
867
1024
|
* Determine the version of SBT used in compilation of this project.
|
|
868
1025
|
* By default it looks into a standard SBT location i.e.
|
|
@@ -892,7 +1049,10 @@ export function addPlugin(projectPath: string, plugin: string): string;
|
|
|
892
1049
|
* @param {string} projectPath Path to the SBT project
|
|
893
1050
|
* @param {string} originalPluginsFile Location of the original plugins file, if any
|
|
894
1051
|
*/
|
|
895
|
-
export function cleanupPlugin(
|
|
1052
|
+
export function cleanupPlugin(
|
|
1053
|
+
projectPath: string,
|
|
1054
|
+
originalPluginsFile: string,
|
|
1055
|
+
): boolean;
|
|
896
1056
|
/**
|
|
897
1057
|
* Returns a default location of the plugins file.
|
|
898
1058
|
*
|
|
@@ -908,7 +1068,11 @@ export function sbtPluginsPath(projectPath: string): string;
|
|
|
908
1068
|
*
|
|
909
1069
|
* @returns File contents
|
|
910
1070
|
*/
|
|
911
|
-
export function readZipEntry(
|
|
1071
|
+
export function readZipEntry(
|
|
1072
|
+
zipFile: string,
|
|
1073
|
+
filePattern: string,
|
|
1074
|
+
contentEncoding?: string,
|
|
1075
|
+
): Promise<any>;
|
|
912
1076
|
/**
|
|
913
1077
|
* Method to get the classes and relevant sources in a jar file
|
|
914
1078
|
*
|
|
@@ -945,7 +1109,12 @@ export function executeAtom(src: any, args: any): boolean;
|
|
|
945
1109
|
* @param {string} slicesFile
|
|
946
1110
|
* @returns List of imported modules
|
|
947
1111
|
*/
|
|
948
|
-
export function findAppModules(
|
|
1112
|
+
export function findAppModules(
|
|
1113
|
+
src: string,
|
|
1114
|
+
language: string,
|
|
1115
|
+
methodology?: string,
|
|
1116
|
+
slicesFile?: string,
|
|
1117
|
+
): any;
|
|
949
1118
|
/**
|
|
950
1119
|
* Execute pip freeze by creating a virtual env in a temp directory and construct the dependency tree
|
|
951
1120
|
*
|
|
@@ -954,39 +1123,43 @@ export function findAppModules(src: string, language: string, methodology?: stri
|
|
|
954
1123
|
* @param {string} tempVenvDir Temp venv dir
|
|
955
1124
|
* @returns List of packages from the virtual env
|
|
956
1125
|
*/
|
|
957
|
-
export function getPipFrozenTree(
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1126
|
+
export function getPipFrozenTree(
|
|
1127
|
+
basePath: string,
|
|
1128
|
+
reqOrSetupFile: string,
|
|
1129
|
+
tempVenvDir: string,
|
|
1130
|
+
): {
|
|
1131
|
+
pkgList: {
|
|
1132
|
+
name: any;
|
|
1133
|
+
version: any;
|
|
1134
|
+
purl: string;
|
|
1135
|
+
"bom-ref": string;
|
|
1136
|
+
evidence: {
|
|
1137
|
+
identity: {
|
|
1138
|
+
field: string;
|
|
1139
|
+
confidence: number;
|
|
1140
|
+
methods: {
|
|
1141
|
+
technique: string;
|
|
1142
|
+
confidence: number;
|
|
1143
|
+
value: any;
|
|
1144
|
+
}[];
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
}[];
|
|
1148
|
+
rootList: {
|
|
1149
|
+
name: any;
|
|
1150
|
+
version: any;
|
|
1151
|
+
}[];
|
|
1152
|
+
dependenciesList: {
|
|
1153
|
+
ref: string;
|
|
1154
|
+
dependsOn: any;
|
|
1155
|
+
}[];
|
|
1156
|
+
frozen: boolean;
|
|
984
1157
|
};
|
|
985
1158
|
export function parsePackageJsonName(name: any): {
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1159
|
+
scope: any;
|
|
1160
|
+
fullName: string;
|
|
1161
|
+
projectName: string;
|
|
1162
|
+
moduleName: string;
|
|
990
1163
|
};
|
|
991
1164
|
/**
|
|
992
1165
|
* Method to add occurrence evidence for components based on import statements. Currently useful for js
|
|
@@ -995,19 +1168,32 @@ export function parsePackageJsonName(name: any): {
|
|
|
995
1168
|
* @param {object} allImports Import statements object with package name as key and an object with file and location details
|
|
996
1169
|
* @param {object} allExports Exported modules if available from node_modules
|
|
997
1170
|
*/
|
|
998
|
-
export function addEvidenceForImports(
|
|
1171
|
+
export function addEvidenceForImports(
|
|
1172
|
+
pkgList: any[],
|
|
1173
|
+
allImports: object,
|
|
1174
|
+
allExports: object,
|
|
1175
|
+
deep: any,
|
|
1176
|
+
): Promise<any[]>;
|
|
999
1177
|
export function componentSorter(a: any, b: any): any;
|
|
1000
|
-
export function parseCmakeDotFile(
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1178
|
+
export function parseCmakeDotFile(
|
|
1179
|
+
dotFile: any,
|
|
1180
|
+
pkgType: any,
|
|
1181
|
+
options?: {},
|
|
1182
|
+
): {
|
|
1183
|
+
parentComponent: {};
|
|
1184
|
+
pkgList: any[];
|
|
1185
|
+
dependenciesList: {
|
|
1186
|
+
ref: string;
|
|
1187
|
+
dependsOn: any[];
|
|
1188
|
+
}[];
|
|
1007
1189
|
};
|
|
1008
|
-
export function parseCmakeLikeFile(
|
|
1009
|
-
|
|
1010
|
-
|
|
1190
|
+
export function parseCmakeLikeFile(
|
|
1191
|
+
cmakeListFile: any,
|
|
1192
|
+
pkgType: any,
|
|
1193
|
+
options?: {},
|
|
1194
|
+
): {
|
|
1195
|
+
parentComponent: {};
|
|
1196
|
+
pkgList: any[];
|
|
1011
1197
|
};
|
|
1012
1198
|
export function getOSPackageForFile(afile: any, osPkgsList: any): any;
|
|
1013
1199
|
/**
|
|
@@ -1018,13 +1204,18 @@ export function getOSPackageForFile(afile: any, osPkgsList: any): any;
|
|
|
1018
1204
|
* @param {array} osPkgsList Array of OS pacakges represented as components
|
|
1019
1205
|
* @param {array} epkgList Existing packages list
|
|
1020
1206
|
*/
|
|
1021
|
-
export function getCppModules(
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1207
|
+
export function getCppModules(
|
|
1208
|
+
src: string,
|
|
1209
|
+
options: object,
|
|
1210
|
+
osPkgsList: any[],
|
|
1211
|
+
epkgList: any[],
|
|
1212
|
+
): {
|
|
1213
|
+
parentComponent: {};
|
|
1214
|
+
pkgList: any[];
|
|
1215
|
+
dependenciesList: {
|
|
1216
|
+
ref: any;
|
|
1217
|
+
dependsOn: any[];
|
|
1218
|
+
}[];
|
|
1028
1219
|
};
|
|
1029
1220
|
/**
|
|
1030
1221
|
* NOT IMPLEMENTED YET.
|
|
@@ -1040,9 +1231,12 @@ export function parseCUsageSlice(sliceData: any): {};
|
|
|
1040
1231
|
*
|
|
1041
1232
|
* @param {Array} pkgList Package list
|
|
1042
1233
|
*/
|
|
1043
|
-
export function getNugetMetadata(
|
|
1044
|
-
|
|
1045
|
-
|
|
1234
|
+
export function getNugetMetadata(
|
|
1235
|
+
pkgList: any[],
|
|
1236
|
+
dependencies?: any,
|
|
1237
|
+
): Promise<{
|
|
1238
|
+
pkgList: any[];
|
|
1239
|
+
dependencies: any[];
|
|
1046
1240
|
}>;
|
|
1047
1241
|
export function addEvidenceForDotnet(pkgList: any, slicesFile: any): any;
|
|
1048
1242
|
export const dirNameStr: string;
|
|
@@ -1072,4 +1266,4 @@ export let LEIN_CMD: string;
|
|
|
1072
1266
|
export let SWIFT_CMD: string;
|
|
1073
1267
|
export const cdxgenAgent: any;
|
|
1074
1268
|
export const RUBY_PLATFORM_PREFIXES: string[];
|
|
1075
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
1269
|
+
//# sourceMappingURL=utils.d.ts.map
|