@cyclonedx/cdxgen 9.8.10 → 9.9.1
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 +43 -41
- package/analyzer.js +6 -2
- package/bin/cdxgen.js +78 -17
- package/bin/evinse.js +44 -22
- package/bin/verify.js +2 -0
- package/binary.js +20 -2
- package/data/README.md +1 -0
- package/data/frameworks-list.json +146 -0
- package/data/lic-mapping.json +44 -5
- package/data/pypi-pkg-aliases.json +6 -0
- package/display.js +34 -0
- package/docker.js +64 -5
- package/evinser.js +254 -55
- package/index.js +128 -90
- package/package.json +5 -5
- package/server.js +34 -21
- package/utils.js +695 -262
- package/utils.test.js +81 -7
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"all": [
|
|
3
|
+
"System.Web",
|
|
4
|
+
"System.ServiceModel",
|
|
5
|
+
"System.Data",
|
|
6
|
+
"spring",
|
|
7
|
+
"pkg:pypi/flask",
|
|
8
|
+
"pkg:pypi/django",
|
|
9
|
+
"beego",
|
|
10
|
+
"chi",
|
|
11
|
+
"echo",
|
|
12
|
+
"github.com/gin-gonic/gin",
|
|
13
|
+
"gorilla",
|
|
14
|
+
"rye",
|
|
15
|
+
"httprouter",
|
|
16
|
+
"akka",
|
|
17
|
+
"dropwizard",
|
|
18
|
+
"vertx",
|
|
19
|
+
"gwt",
|
|
20
|
+
"jax-rs",
|
|
21
|
+
"jax-ws",
|
|
22
|
+
"jsf",
|
|
23
|
+
"play",
|
|
24
|
+
"spark",
|
|
25
|
+
"struts",
|
|
26
|
+
"angular",
|
|
27
|
+
"react",
|
|
28
|
+
"next",
|
|
29
|
+
"ember",
|
|
30
|
+
"express",
|
|
31
|
+
"knex",
|
|
32
|
+
"vue",
|
|
33
|
+
"pkg:pypi/aiohttp",
|
|
34
|
+
"pkg:pypi/bottle",
|
|
35
|
+
"pkg:pypi/cherrypy",
|
|
36
|
+
"pkg:pypi/drt",
|
|
37
|
+
"pkg:pypi/falcon",
|
|
38
|
+
"pkg:pypi/hug",
|
|
39
|
+
"pkg:pypi/pyramid",
|
|
40
|
+
"pkg:pypi/sanic",
|
|
41
|
+
"pkg:pypi/tornado",
|
|
42
|
+
"pkg:pypi/fastapi",
|
|
43
|
+
"pkg:pypi/pyqt",
|
|
44
|
+
"pkg:pypi/tkinter",
|
|
45
|
+
"pkg:pypi/kivy",
|
|
46
|
+
"pkg:pypi/pyside",
|
|
47
|
+
"pkg:pypi/scikit",
|
|
48
|
+
"pkg:pypi/tensorflow",
|
|
49
|
+
"pkg:pypi/pytorch",
|
|
50
|
+
"pkg:pypi/keras",
|
|
51
|
+
"pkg:pypi/numpy",
|
|
52
|
+
"pkg:pypi/scipy",
|
|
53
|
+
"pkg:pypi/pandas",
|
|
54
|
+
"pkg:pypi/matplotlib",
|
|
55
|
+
"pkg:pypi/google-api-core",
|
|
56
|
+
"pkg:pypi/google-cloud",
|
|
57
|
+
"pkg:pypi/botocore",
|
|
58
|
+
"pkg:pypi/boto3",
|
|
59
|
+
"pkg:pypi/azure",
|
|
60
|
+
"vibora",
|
|
61
|
+
"koa",
|
|
62
|
+
"-sdk",
|
|
63
|
+
"org.apache",
|
|
64
|
+
"appfuse",
|
|
65
|
+
"drools",
|
|
66
|
+
"jbpm",
|
|
67
|
+
"activiti",
|
|
68
|
+
"barracuda",
|
|
69
|
+
"birt",
|
|
70
|
+
"biojava",
|
|
71
|
+
"bluecove",
|
|
72
|
+
"bouncycastle",
|
|
73
|
+
"cascading",
|
|
74
|
+
"deeplearning4j",
|
|
75
|
+
"eclipselink",
|
|
76
|
+
"geoapi",
|
|
77
|
+
"geotools",
|
|
78
|
+
"hibernate",
|
|
79
|
+
"hsqldb",
|
|
80
|
+
"ibatis",
|
|
81
|
+
"javassist",
|
|
82
|
+
"jersey",
|
|
83
|
+
"jetty",
|
|
84
|
+
"jfreechart",
|
|
85
|
+
"jhipster",
|
|
86
|
+
"jmonkeyengine",
|
|
87
|
+
"jsf",
|
|
88
|
+
"keycloak",
|
|
89
|
+
"liquibase",
|
|
90
|
+
"lwjgl",
|
|
91
|
+
"micronaut",
|
|
92
|
+
"mybatis",
|
|
93
|
+
"netty",
|
|
94
|
+
"neuroph",
|
|
95
|
+
"opencv",
|
|
96
|
+
"orientdb",
|
|
97
|
+
"ormlite",
|
|
98
|
+
"payara",
|
|
99
|
+
"primefaces",
|
|
100
|
+
"quarkus",
|
|
101
|
+
"quartz",
|
|
102
|
+
"sax",
|
|
103
|
+
"slf4j",
|
|
104
|
+
"jasper",
|
|
105
|
+
"spock",
|
|
106
|
+
"thymeleaf",
|
|
107
|
+
"vaadin",
|
|
108
|
+
"vertx",
|
|
109
|
+
"wildfly",
|
|
110
|
+
"zkoss",
|
|
111
|
+
"org.ow2.asm",
|
|
112
|
+
"backbone",
|
|
113
|
+
"dojo",
|
|
114
|
+
"ember",
|
|
115
|
+
"enyo",
|
|
116
|
+
"extjs",
|
|
117
|
+
"jquery",
|
|
118
|
+
"jqwidgets",
|
|
119
|
+
"knockout",
|
|
120
|
+
"mootools",
|
|
121
|
+
"prototypejs",
|
|
122
|
+
"qooxdoo",
|
|
123
|
+
"openui5",
|
|
124
|
+
"solidjs",
|
|
125
|
+
"sproutcore",
|
|
126
|
+
"svelte",
|
|
127
|
+
"wakanda",
|
|
128
|
+
"webix",
|
|
129
|
+
"github.com/aerogo/aero",
|
|
130
|
+
"github.com/aofei/air",
|
|
131
|
+
"github.com/go-the-way/anoweb",
|
|
132
|
+
"github.com/appist/appy",
|
|
133
|
+
"github.com/ungerik/go-rest",
|
|
134
|
+
"goa.design/goa",
|
|
135
|
+
"github.com/aceld/zinx",
|
|
136
|
+
"github.com/dolab/gogo",
|
|
137
|
+
"github.com/yarf-framework/yarf",
|
|
138
|
+
"github.com/norunners/vert",
|
|
139
|
+
"pkg:cargo/rocket",
|
|
140
|
+
"pkg:cargo/actix",
|
|
141
|
+
"pkg:cargo/nickel",
|
|
142
|
+
"pkg:cargo/yew",
|
|
143
|
+
"pkg:cargo/azul",
|
|
144
|
+
"pkg:cargo/conrod"
|
|
145
|
+
]
|
|
146
|
+
}
|
package/data/lic-mapping.json
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
{
|
|
3
3
|
"exp": "Apache-2.0",
|
|
4
4
|
"names": [
|
|
5
|
+
"Apache2",
|
|
5
6
|
"Apache 2",
|
|
6
7
|
"Apache 2.0",
|
|
7
8
|
"Apache Version 2.0",
|
|
8
9
|
"Apache 2.0 License",
|
|
9
10
|
"Apache Software License, Version 2.0",
|
|
10
11
|
"The Apache Software License, Version 2.0",
|
|
12
|
+
"Apache License v2.0",
|
|
11
13
|
"Apache License (v2.0)",
|
|
12
14
|
"Apache License 2.0",
|
|
13
15
|
"Apache License Version 2.0",
|
|
@@ -20,6 +22,9 @@
|
|
|
20
22
|
"Apache-2.0 OR MIT",
|
|
21
23
|
"Apache2.0",
|
|
22
24
|
"apache-2-0",
|
|
25
|
+
"APL2",
|
|
26
|
+
"the Apache License, ASL Version 2.0",
|
|
27
|
+
"Apache Publich License 2.0",
|
|
23
28
|
"https://opensource.org/licenses/Apache2.0",
|
|
24
29
|
"https://opensource.org/license/apache-2-0",
|
|
25
30
|
"http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
@@ -27,7 +32,14 @@
|
|
|
27
32
|
},
|
|
28
33
|
{
|
|
29
34
|
"exp": "0BSD",
|
|
30
|
-
"names": [
|
|
35
|
+
"names": [
|
|
36
|
+
"Zero-Clause BSD",
|
|
37
|
+
"BSD",
|
|
38
|
+
"BSD License",
|
|
39
|
+
"BSD-like",
|
|
40
|
+
"new BSD License",
|
|
41
|
+
"new BSD"
|
|
42
|
+
]
|
|
31
43
|
},
|
|
32
44
|
{
|
|
33
45
|
"exp": "BSD-2-Clause",
|
|
@@ -37,7 +49,8 @@
|
|
|
37
49
|
"BSD-2-Clause",
|
|
38
50
|
"BSD 2-Clause License",
|
|
39
51
|
"The BSD 2-Clause License",
|
|
40
|
-
"The 2-Clause BSD License"
|
|
52
|
+
"The 2-Clause BSD License",
|
|
53
|
+
"The BSD License"
|
|
41
54
|
]
|
|
42
55
|
},
|
|
43
56
|
{
|
|
@@ -46,6 +59,7 @@
|
|
|
46
59
|
"BSD 3 Clause",
|
|
47
60
|
"BSD 3-Clause",
|
|
48
61
|
"BSD-3-Clause",
|
|
62
|
+
"BSD 3-clause",
|
|
49
63
|
"BSD 3-Clause License",
|
|
50
64
|
"The BSD 3-Clause License",
|
|
51
65
|
"BSD 3-Clause \"New\" or \"Revised\" License (BSD-3-Clause)",
|
|
@@ -55,7 +69,8 @@
|
|
|
55
69
|
"Revised BSD",
|
|
56
70
|
"Revised BSD License",
|
|
57
71
|
"The New BSD License",
|
|
58
|
-
"BSD (3-clause)"
|
|
72
|
+
"BSD (3-clause)",
|
|
73
|
+
"3-Clause BSD License"
|
|
59
74
|
]
|
|
60
75
|
},
|
|
61
76
|
{
|
|
@@ -70,6 +85,10 @@
|
|
|
70
85
|
"BSD (4-clause)"
|
|
71
86
|
]
|
|
72
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"exp": "CC0-1.0",
|
|
90
|
+
"names": ["CC0"]
|
|
91
|
+
},
|
|
73
92
|
{
|
|
74
93
|
"exp": "CDDL-1.0",
|
|
75
94
|
"names": [
|
|
@@ -151,6 +170,7 @@
|
|
|
151
170
|
"LGPL v2.1",
|
|
152
171
|
"LGPL-2.1",
|
|
153
172
|
"LGPL2.1",
|
|
173
|
+
"LGPL, version 2.1",
|
|
154
174
|
"GNU Lesser General Public License",
|
|
155
175
|
"GNU Lesser General Public License Version 2.1",
|
|
156
176
|
"GNU Lesser General Public License Version 2.1, February 1999",
|
|
@@ -270,7 +290,13 @@
|
|
|
270
290
|
},
|
|
271
291
|
{
|
|
272
292
|
"exp": "MPL-2.0",
|
|
273
|
-
"names": [
|
|
293
|
+
"names": [
|
|
294
|
+
"MPL 2.0",
|
|
295
|
+
"Mozilla Public License 2.0",
|
|
296
|
+
"Mozilla Public License version 2.0",
|
|
297
|
+
"Mozilla Public License, version 2.0",
|
|
298
|
+
"Mozilla Public License 2.0 (MPL 2.0)"
|
|
299
|
+
]
|
|
274
300
|
},
|
|
275
301
|
{
|
|
276
302
|
"exp": "NetCDF",
|
|
@@ -282,6 +308,19 @@
|
|
|
282
308
|
},
|
|
283
309
|
{
|
|
284
310
|
"exp": "ISC",
|
|
285
|
-
"names": ["ISC license"]
|
|
311
|
+
"names": ["ISC license", "ISC License (ISCL)"]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"exp": "ICU",
|
|
315
|
+
"names": ["Unicode/ICU License"]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"exp": "PSF-2.0",
|
|
319
|
+
"names": [
|
|
320
|
+
"Python Software Foundation License",
|
|
321
|
+
"Python Software Foundation License (PSFL)",
|
|
322
|
+
"Python Software Foundation License 2.0",
|
|
323
|
+
"PSFL"
|
|
324
|
+
]
|
|
286
325
|
}
|
|
287
326
|
]
|
|
@@ -553,6 +553,7 @@
|
|
|
553
553
|
"creole": "python-creole",
|
|
554
554
|
"creoleparser": "creoleparser",
|
|
555
555
|
"crispy-forms": "django-crispy-forms",
|
|
556
|
+
"crum": "django-crum",
|
|
556
557
|
"cronlog": "python-crontab",
|
|
557
558
|
"crontab": "python-crontab",
|
|
558
559
|
"crypto": "pycryptodome",
|
|
@@ -589,6 +590,7 @@
|
|
|
589
590
|
"djcelery": "django-celery",
|
|
590
591
|
"djkombu": "django-kombu",
|
|
591
592
|
"djorm-pgarray": "djorm-ext-pgarray",
|
|
593
|
+
"django-filters": "filters-django",
|
|
592
594
|
"dns": "dnspython",
|
|
593
595
|
"docgen": "ansible-docgenerator",
|
|
594
596
|
"docker": "docker-py",
|
|
@@ -631,6 +633,7 @@
|
|
|
631
633
|
"fdpexpect": "pexpect",
|
|
632
634
|
"fedora": "python-fedora",
|
|
633
635
|
"fias": "ailove-django-fias",
|
|
636
|
+
"fieldsignals": "django-fieldsignals",
|
|
634
637
|
"fiftyone-degrees": "51degrees-mobile-detector",
|
|
635
638
|
"fiftyonedegrees": "51degrees-mobile-detector-v3-wrapper",
|
|
636
639
|
"five": "five.customerize",
|
|
@@ -709,6 +712,7 @@
|
|
|
709
712
|
"igraph": "python-igraph",
|
|
710
713
|
"imdb": "imdbpy",
|
|
711
714
|
"impala": "impyla",
|
|
715
|
+
"imagekit": "django-imagekit",
|
|
712
716
|
"impersonate": "django-impersonate",
|
|
713
717
|
"inmemorystorage": "ambition-inmemorystorage",
|
|
714
718
|
"ipaddress": "backport-ipaddress",
|
|
@@ -845,6 +849,7 @@
|
|
|
845
849
|
"path": "path.py",
|
|
846
850
|
"patricia": "patricia-trie",
|
|
847
851
|
"paver": "paver",
|
|
852
|
+
"packageurl": "packageurl-python",
|
|
848
853
|
"peak": "proxytypes",
|
|
849
854
|
"picasso": "anderson.picasso",
|
|
850
855
|
"picklefield": "django-picklefield",
|
|
@@ -1057,6 +1062,7 @@
|
|
|
1057
1062
|
"slugify": "unicode-slugify",
|
|
1058
1063
|
"smarkets": "smk-python-sdk",
|
|
1059
1064
|
"snappy": "ctypes-snappy",
|
|
1065
|
+
"social-core": "social-auth-core",
|
|
1060
1066
|
"social-django": "social-auth-app-django",
|
|
1061
1067
|
"socketio": "python-socketio",
|
|
1062
1068
|
"socketserver": "pies2overrides",
|
package/display.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "fs";
|
|
1
2
|
import { createStream, table } from "table";
|
|
2
3
|
|
|
3
4
|
// https://github.com/yangshun/tree-node-cli/blob/master/src/index.js
|
|
@@ -277,3 +278,36 @@ const recursePrint = (depMap, subtree, level, shownList, treeGraphics) => {
|
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
};
|
|
281
|
+
|
|
282
|
+
export const printReachables = (sliceArtefacts) => {
|
|
283
|
+
const reachablesSlicesFile = sliceArtefacts.reachablesSlicesFile;
|
|
284
|
+
if (!existsSync(reachablesSlicesFile)) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const purlCounts = {};
|
|
288
|
+
const reachablesSlices = JSON.parse(
|
|
289
|
+
readFileSync(reachablesSlicesFile, "utf-8")
|
|
290
|
+
);
|
|
291
|
+
for (const areachable of reachablesSlices.reachables || []) {
|
|
292
|
+
const purls = areachable.purls || [];
|
|
293
|
+
for (const apurl of purls) {
|
|
294
|
+
purlCounts[apurl] = (purlCounts[apurl] || 0) + 1;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
const sortedPurls = Object.fromEntries(
|
|
298
|
+
Object.entries(purlCounts).sort(([, a], [, b]) => b - a)
|
|
299
|
+
);
|
|
300
|
+
const data = [["Package URL", "Reachable Flows"]];
|
|
301
|
+
for (const apurl of Object.keys(sortedPurls)) {
|
|
302
|
+
data.push([apurl, "" + sortedPurls[apurl]]);
|
|
303
|
+
}
|
|
304
|
+
const config = {
|
|
305
|
+
header: {
|
|
306
|
+
alignment: "center",
|
|
307
|
+
content: "Reachable Components\nGenerated with \u2665 by cdxgen"
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
if (data.length > 1) {
|
|
311
|
+
console.log(table(data, config));
|
|
312
|
+
}
|
|
313
|
+
};
|
package/docker.js
CHANGED
|
@@ -323,6 +323,9 @@ export const parseImageName = (fullImageName) => {
|
|
|
323
323
|
fullImageName = fullImageName.replace(":" + nameObj.tag, "");
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
+
if (fullImageName && fullImageName.startsWith("library/")) {
|
|
327
|
+
fullImageName = fullImageName.replace("library/", "");
|
|
328
|
+
}
|
|
326
329
|
// The left over string is the repo name
|
|
327
330
|
nameObj.repo = fullImageName;
|
|
328
331
|
return nameObj;
|
|
@@ -333,7 +336,9 @@ export const parseImageName = (fullImageName) => {
|
|
|
333
336
|
*/
|
|
334
337
|
export const getImage = async (fullImageName) => {
|
|
335
338
|
let localData = undefined;
|
|
339
|
+
let pullData = undefined;
|
|
336
340
|
const { repo, tag, digest } = parseImageName(fullImageName);
|
|
341
|
+
let repoWithTag = `${repo}:${tag !== "" ? tag : ":latest"}`;
|
|
337
342
|
// Fetch only the latest tag if none is specified
|
|
338
343
|
if (tag === "" && digest === "") {
|
|
339
344
|
fullImageName = fullImageName + ":latest";
|
|
@@ -379,6 +384,14 @@ export const getImage = async (fullImageName) => {
|
|
|
379
384
|
}
|
|
380
385
|
}
|
|
381
386
|
}
|
|
387
|
+
try {
|
|
388
|
+
localData = await makeRequest(`images/${repoWithTag}/json`);
|
|
389
|
+
if (localData) {
|
|
390
|
+
return localData;
|
|
391
|
+
}
|
|
392
|
+
} catch (err) {
|
|
393
|
+
// ignore
|
|
394
|
+
}
|
|
382
395
|
try {
|
|
383
396
|
localData = await makeRequest(`images/${repo}/json`);
|
|
384
397
|
} catch (err) {
|
|
@@ -397,7 +410,7 @@ export const getImage = async (fullImageName) => {
|
|
|
397
410
|
}
|
|
398
411
|
// If the data is not available locally
|
|
399
412
|
try {
|
|
400
|
-
|
|
413
|
+
pullData = await makeRequest(
|
|
401
414
|
`images/create?fromImage=${fullImageName}`,
|
|
402
415
|
"POST"
|
|
403
416
|
);
|
|
@@ -415,15 +428,42 @@ export const getImage = async (fullImageName) => {
|
|
|
415
428
|
return undefined;
|
|
416
429
|
}
|
|
417
430
|
} catch (err) {
|
|
418
|
-
|
|
431
|
+
try {
|
|
432
|
+
if (DEBUG_MODE) {
|
|
433
|
+
console.log(`Re-trying the pull with the name ${repoWithTag}.`);
|
|
434
|
+
}
|
|
435
|
+
pullData = await makeRequest(
|
|
436
|
+
`images/create?fromImage=${repoWithTag}`,
|
|
437
|
+
"POST"
|
|
438
|
+
);
|
|
439
|
+
} catch (err) {
|
|
440
|
+
// continue regardless of error
|
|
441
|
+
}
|
|
419
442
|
}
|
|
420
443
|
try {
|
|
421
444
|
if (DEBUG_MODE) {
|
|
422
|
-
console.log(`Trying with ${
|
|
445
|
+
console.log(`Trying with ${repoWithTag}`);
|
|
446
|
+
}
|
|
447
|
+
localData = await makeRequest(`images/${repoWithTag}/json`);
|
|
448
|
+
if (localData) {
|
|
449
|
+
return localData;
|
|
423
450
|
}
|
|
424
|
-
localData = await makeRequest(`images/${repo}/json`);
|
|
425
451
|
} catch (err) {
|
|
426
452
|
try {
|
|
453
|
+
if (DEBUG_MODE) {
|
|
454
|
+
console.log(`Trying with ${repo}`);
|
|
455
|
+
}
|
|
456
|
+
localData = await makeRequest(`images/${repo}/json`);
|
|
457
|
+
if (localData) {
|
|
458
|
+
return localData;
|
|
459
|
+
}
|
|
460
|
+
} catch (err) {
|
|
461
|
+
// continue regardless of error
|
|
462
|
+
}
|
|
463
|
+
try {
|
|
464
|
+
if (DEBUG_MODE) {
|
|
465
|
+
console.log(`Trying with ${fullImageName}`);
|
|
466
|
+
}
|
|
427
467
|
localData = await makeRequest(`images/${fullImageName}/json`);
|
|
428
468
|
} catch (err) {
|
|
429
469
|
// continue regardless of error
|
|
@@ -701,7 +741,26 @@ export const exportImage = async (fullImageName) => {
|
|
|
701
741
|
})
|
|
702
742
|
);
|
|
703
743
|
} catch (err) {
|
|
704
|
-
|
|
744
|
+
if (localData && localData.Id) {
|
|
745
|
+
console.log(`Retrying with ${localData.Id}`);
|
|
746
|
+
try {
|
|
747
|
+
await stream.pipeline(
|
|
748
|
+
client.stream(`images/${localData.Id}/get`),
|
|
749
|
+
x({
|
|
750
|
+
sync: true,
|
|
751
|
+
preserveOwner: false,
|
|
752
|
+
noMtime: true,
|
|
753
|
+
noChmod: true,
|
|
754
|
+
strict: true,
|
|
755
|
+
C: tempDir,
|
|
756
|
+
portable: true,
|
|
757
|
+
onwarn: () => {}
|
|
758
|
+
})
|
|
759
|
+
);
|
|
760
|
+
} catch (err) {
|
|
761
|
+
console.log(err);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
705
764
|
}
|
|
706
765
|
}
|
|
707
766
|
// Continue with extracting the layers
|