@cyclonedx/cdxgen 11.2.5 → 11.2.6
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 +12 -1
- package/bin/cdxgen.js +0 -3
- package/data/component-tags.json +1 -1
- package/data/frameworks-list.json +10 -0
- package/lib/cli/index.js +27 -26
- package/lib/evinser/evinser.js +5 -4
- package/lib/helpers/envcontext.js +4 -4
- package/lib/helpers/utils.js +3 -1
- package/lib/helpers/utils.test.js +1 -7
- package/lib/managers/binary.js +47 -3
- package/lib/managers/docker.js +39 -23
- package/package.json +2 -2
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -516,7 +516,7 @@ Please check out our [contribute to CycloneDX/cdxgen documentation][github-contr
|
|
|
516
516
|
|
|
517
517
|
Before raising a PR, please run the following commands.
|
|
518
518
|
|
|
519
|
-
```
|
|
519
|
+
```shell
|
|
520
520
|
corepack enable pnpm
|
|
521
521
|
pnpm install --config.strict-dep-builds=true
|
|
522
522
|
# Generate types using jsdoc syntax
|
|
@@ -527,6 +527,17 @@ pnpm run lint
|
|
|
527
527
|
pnpm test
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
+
### Testing main branch
|
|
531
|
+
|
|
532
|
+
Use `pnpm add -g` command to quickly test the main branch.
|
|
533
|
+
|
|
534
|
+
```shell
|
|
535
|
+
corepack pnpm bin -g
|
|
536
|
+
corepack pnpm setup
|
|
537
|
+
corepack pnpm add -g --allow-build sqlite3 https://github.com/CycloneDX/cdxgen
|
|
538
|
+
cdxgen --help
|
|
539
|
+
```
|
|
540
|
+
|
|
530
541
|
## Sponsors
|
|
531
542
|
|
|
532
543
|
<img src="./docs/_media/LevoLogo-LightBg.jpg" width="200" height="auto">
|
package/bin/cdxgen.js
CHANGED
|
@@ -196,17 +196,14 @@ const args = yargs(hideBin(process.argv))
|
|
|
196
196
|
})
|
|
197
197
|
.option("usages-slices-file", {
|
|
198
198
|
description: "Path for the usages slices file created by atom.",
|
|
199
|
-
default: "usages.slices.json",
|
|
200
199
|
hidden: true,
|
|
201
200
|
})
|
|
202
201
|
.option("data-flow-slices-file", {
|
|
203
202
|
description: "Path for the data-flow slices file created by atom.",
|
|
204
|
-
default: "data-flow.slices.json",
|
|
205
203
|
hidden: true,
|
|
206
204
|
})
|
|
207
205
|
.option("reachables-slices-file", {
|
|
208
206
|
description: "Path for the reachables slices file created by atom.",
|
|
209
|
-
default: "reachables.slices.json",
|
|
210
207
|
hidden: true,
|
|
211
208
|
})
|
|
212
209
|
.option("semantics-slices-file", {
|
package/data/component-tags.json
CHANGED
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
"System.Data",
|
|
6
6
|
"Microsoft.AspNetCore",
|
|
7
7
|
"Microsoft.NETCore",
|
|
8
|
+
"Microsoft.EntityFrameworkCore",
|
|
9
|
+
"pkg:nuget/EntityFramework",
|
|
10
|
+
"pkg:nuget/Microsoft.Build.Framework",
|
|
11
|
+
"EntityFrameworkCore",
|
|
12
|
+
"Microsoft.Data.OData",
|
|
13
|
+
"Microsoft.NETCore.Targets",
|
|
14
|
+
"System.Diagnostics.DiagnosticSource",
|
|
15
|
+
"Microsoft.OData.",
|
|
16
|
+
"Google.Cloud.",
|
|
17
|
+
"PnP.Framework",
|
|
8
18
|
"springframework",
|
|
9
19
|
"pkg:maven/us.springett/alpine",
|
|
10
20
|
"pkg:pypi/flask",
|
package/lib/cli/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
import { platform as _platform, arch, homedir } from "node:os";
|
|
16
16
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
17
17
|
import process from "node:process";
|
|
18
|
-
import { URL } from "node:url";
|
|
19
18
|
import got from "got";
|
|
20
19
|
import { load as loadYaml } from "js-yaml";
|
|
21
20
|
import { PackageURL } from "packageurl-js";
|
|
@@ -1232,6 +1231,13 @@ function determinePackageType(pkg) {
|
|
|
1232
1231
|
}
|
|
1233
1232
|
}
|
|
1234
1233
|
}
|
|
1234
|
+
if (Object.prototype.hasOwnProperty.call(pkg, "tags")) {
|
|
1235
|
+
for (const tag of pkg.tags) {
|
|
1236
|
+
if (tag && tag.toLowerCase() === "framework") {
|
|
1237
|
+
return "framework";
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1235
1241
|
return "library";
|
|
1236
1242
|
}
|
|
1237
1243
|
|
|
@@ -1965,46 +1971,45 @@ export async function createJavaBom(path, options) {
|
|
|
1965
1971
|
options,
|
|
1966
1972
|
)
|
|
1967
1973
|
) {
|
|
1974
|
+
let includedBuilds = [];
|
|
1968
1975
|
let allProjectsStr = [];
|
|
1969
1976
|
if (process.env.GRADLE_INCLUDED_BUILDS) {
|
|
1970
|
-
|
|
1971
|
-
allProjectsStr = process.env.GRADLE_INCLUDED_BUILDS.split(",").map((b) =>
|
|
1977
|
+
includedBuilds = process.env.GRADLE_INCLUDED_BUILDS.split(",").map((b) =>
|
|
1972
1978
|
!b.startsWith(":") ? `:${b}` : b,
|
|
1973
1979
|
);
|
|
1974
1980
|
}
|
|
1975
1981
|
let parallelPropTaskOut = executeParallelGradleProperties(
|
|
1976
1982
|
gradleRootPath,
|
|
1977
|
-
[null],
|
|
1983
|
+
[null].concat(includedBuilds),
|
|
1978
1984
|
process.env.GRADLE_INCLUDED_BUILDS
|
|
1979
1985
|
? []
|
|
1980
1986
|
: ["--init-script", GRADLE_INIT_SCRIPT],
|
|
1981
1987
|
);
|
|
1982
|
-
if (
|
|
1988
|
+
if (process.env.GRADLE_INCLUDED_BUILDS === undefined) {
|
|
1983
1989
|
const outputLines = parallelPropTaskOut.split("\n");
|
|
1984
1990
|
for (const [i, line] of outputLines.entries()) {
|
|
1985
|
-
if (line.startsWith("Root project '")) {
|
|
1991
|
+
if (line.startsWith("Root project '") || line.startsWith("Project '")) {
|
|
1986
1992
|
break;
|
|
1987
1993
|
}
|
|
1988
1994
|
if (line.startsWith("<CDXGEN:includedBuild>")) {
|
|
1989
1995
|
const includedBuild = line.split(">");
|
|
1990
|
-
if (!
|
|
1991
|
-
|
|
1996
|
+
if (!includedBuilds.includes(includedBuild[1].trim())) {
|
|
1997
|
+
includedBuilds.push(includedBuild[1].trim());
|
|
1992
1998
|
}
|
|
1993
1999
|
}
|
|
1994
2000
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2001
|
+
if (includedBuilds.length > 0) {
|
|
2002
|
+
thoughtLog(
|
|
2003
|
+
`Wait, this gradle project uses composite builds. I must carefully process these ${includedBuilds.length} projects, in addition to the root.`,
|
|
2004
|
+
);
|
|
2005
|
+
if (DEBUG_MODE) {
|
|
2006
|
+
console.log(`Composite builds: ${includedBuilds.join(" ").trim()}.`);
|
|
2007
|
+
}
|
|
2008
|
+
parallelPropTaskOut = parallelPropTaskOut.concat(
|
|
2009
|
+
"\n",
|
|
2010
|
+
executeParallelGradleProperties(gradleRootPath, includedBuilds),
|
|
2011
|
+
);
|
|
2002
2012
|
}
|
|
2003
|
-
parallelPropTaskOut = parallelPropTaskOut.concat(
|
|
2004
|
-
"\n",
|
|
2005
|
-
executeParallelGradleProperties(gradleRootPath, allProjectsStr),
|
|
2006
|
-
);
|
|
2007
|
-
allProjectsStr = [];
|
|
2008
2013
|
}
|
|
2009
2014
|
const splitPropTaskOut = splitOutputByGradleProjects(parallelPropTaskOut, [
|
|
2010
2015
|
"properties",
|
|
@@ -2017,7 +2022,7 @@ export async function createJavaBom(path, options) {
|
|
|
2017
2022
|
rootProject,
|
|
2018
2023
|
retMap.metadata,
|
|
2019
2024
|
);
|
|
2020
|
-
if (!
|
|
2025
|
+
if (!includedBuilds.includes(key)) {
|
|
2021
2026
|
parentComponent = rootComponent;
|
|
2022
2027
|
}
|
|
2023
2028
|
gradleModules.set(key, rootComponent);
|
|
@@ -2762,11 +2767,7 @@ export async function createNodejsBom(path, options) {
|
|
|
2762
2767
|
let allImports = {};
|
|
2763
2768
|
let allExports = {};
|
|
2764
2769
|
if (
|
|
2765
|
-
!hasAnyProjectType(
|
|
2766
|
-
["docker", "oci", "container", "os", "pnpm"],
|
|
2767
|
-
options,
|
|
2768
|
-
false,
|
|
2769
|
-
) &&
|
|
2770
|
+
!hasAnyProjectType(["docker", "oci", "container", "os"], options, false) &&
|
|
2770
2771
|
!options.noBabel
|
|
2771
2772
|
) {
|
|
2772
2773
|
if (DEBUG_MODE) {
|
package/lib/evinser/evinser.js
CHANGED
|
@@ -235,6 +235,8 @@ export async function createSlice(
|
|
|
235
235
|
language = "js";
|
|
236
236
|
} else if (language.startsWith("python")) {
|
|
237
237
|
language = "python";
|
|
238
|
+
} else if (PROJECT_TYPE_ALIASES.scala.includes(language)) {
|
|
239
|
+
language = "scala";
|
|
238
240
|
}
|
|
239
241
|
if (
|
|
240
242
|
PROJECT_TYPE_ALIASES.swift.includes(language) &&
|
|
@@ -253,11 +255,11 @@ export async function createSlice(
|
|
|
253
255
|
}
|
|
254
256
|
const slicesFile =
|
|
255
257
|
options[`${sliceType}SlicesFile`] ||
|
|
256
|
-
join(sliceOutputDir, `${sliceType}.slices.json`);
|
|
258
|
+
join(sliceOutputDir, `${language}-${sliceType}.slices.json`);
|
|
257
259
|
const openapiSpecFile = basename(
|
|
258
260
|
options.openapiSpecFile ||
|
|
259
261
|
process.env?.ATOM_TOOLS_OPENAPI_FILENAME ||
|
|
260
|
-
|
|
262
|
+
`${language}-openapi.json`,
|
|
261
263
|
);
|
|
262
264
|
// For some languages such as scala, semantics slices file would get created during usages slicing.
|
|
263
265
|
let semanticsSlicesFile;
|
|
@@ -319,7 +321,7 @@ export async function createSlice(
|
|
|
319
321
|
ATOM_TOOLS_OPENAPI_FILENAME: openapiSpecFile, // The file would get over-written
|
|
320
322
|
ATOM_TOOLS_OPENAPI_FORMAT:
|
|
321
323
|
process.env?.ATOM_TOOLS_OPENAPI_FORMAT || "openapi3.1.0", // editor.swagger.io doesn't support 3.1.0 yet
|
|
322
|
-
ATOM_TOOLS_WORK_DIR: resolve(filePath), // This must be the directory containing semantics.slices.json
|
|
324
|
+
ATOM_TOOLS_WORK_DIR: process.env?.ATOM_TOOLS_WORK_DIR || resolve(filePath), // This must be the directory containing semantics.slices.json
|
|
323
325
|
OPENAPI_SERVER_URL: process.env?.OPENAPI_SERVER_URL,
|
|
324
326
|
});
|
|
325
327
|
if (!result || !safeExistsSync(slicesFile)) {
|
|
@@ -1410,7 +1412,6 @@ export function createEvinseFile(sliceArtefacts, options) {
|
|
|
1410
1412
|
dataFlowFrames,
|
|
1411
1413
|
cryptoComponents,
|
|
1412
1414
|
cryptoGeneratePurls,
|
|
1413
|
-
openapiSpecFile,
|
|
1414
1415
|
} = sliceArtefacts;
|
|
1415
1416
|
const bomFile = options.input;
|
|
1416
1417
|
const evinseOutFile = options.output;
|
|
@@ -29,10 +29,10 @@ export const GIT_COMMAND = process.env.GIT_CMD || "git";
|
|
|
29
29
|
|
|
30
30
|
// sdkman tool aliases
|
|
31
31
|
export const SDKMAN_JAVA_TOOL_ALIASES = {
|
|
32
|
-
java8: process.env.JAVA8_TOOL || "8.0.
|
|
33
|
-
java11: process.env.JAVA11_TOOL || "11.0.
|
|
34
|
-
java17: process.env.JAVA17_TOOL || "17.0.
|
|
35
|
-
java21: process.env.JAVA21_TOOL || "21.0.
|
|
32
|
+
java8: process.env.JAVA8_TOOL || "8.0.452-amzn", // Temurin no longer offers java8 :(
|
|
33
|
+
java11: process.env.JAVA11_TOOL || "11.0.26-tem",
|
|
34
|
+
java17: process.env.JAVA17_TOOL || "17.0.15-tem",
|
|
35
|
+
java21: process.env.JAVA21_TOOL || "21.0.7-tem",
|
|
36
36
|
java22: process.env.JAVA22_TOOL || "22.0.2-tem",
|
|
37
37
|
java23: process.env.JAVA23_TOOL || "23.0.2-tem",
|
|
38
38
|
java24: process.env.JAVA24_TOOL || "24-tem",
|
package/lib/helpers/utils.js
CHANGED
|
@@ -12665,7 +12665,9 @@ function fullScanCocoaPod(dependency, component, options) {
|
|
|
12665
12665
|
component.authors = [];
|
|
12666
12666
|
if (podspec.authors.constructor === Object) {
|
|
12667
12667
|
Object.entries(podspec.authors).forEach(([name, email]) =>
|
|
12668
|
-
|
|
12668
|
+
email.includes("@")
|
|
12669
|
+
? component.authors.push({ name, email })
|
|
12670
|
+
: component.authors.push({ name }),
|
|
12669
12671
|
);
|
|
12670
12672
|
} else if (podspec.authors.constructor === Array) {
|
|
12671
12673
|
podspec.authors.forEach((name) => component.authors.push({ name }));
|
|
@@ -1386,7 +1386,7 @@ describe("go data with licenses", () => {
|
|
|
1386
1386
|
});
|
|
1387
1387
|
}, 120000);
|
|
1388
1388
|
|
|
1389
|
-
test("parseGoModData with licenses", async () => {
|
|
1389
|
+
test.skip("parseGoModData with licenses", async () => {
|
|
1390
1390
|
let retMap = await parseGoModData(null);
|
|
1391
1391
|
expect(retMap).toEqual({});
|
|
1392
1392
|
const gosumMap = {
|
|
@@ -2462,12 +2462,6 @@ test("parse github actions workflow data", () => {
|
|
|
2462
2462
|
name: "checkout",
|
|
2463
2463
|
version: "v4",
|
|
2464
2464
|
});
|
|
2465
|
-
dep_list = parseGitHubWorkflowData(
|
|
2466
|
-
readFileSync("./.github/workflows/app-release.yml", {
|
|
2467
|
-
encoding: "utf-8",
|
|
2468
|
-
}),
|
|
2469
|
-
);
|
|
2470
|
-
expect(dep_list.length).toEqual(3);
|
|
2471
2465
|
});
|
|
2472
2466
|
|
|
2473
2467
|
test("parse cs pkg data", () => {
|
package/lib/managers/binary.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
statSync,
|
|
10
10
|
} from "node:fs";
|
|
11
11
|
import { arch as _arch, platform as _platform, homedir } from "node:os";
|
|
12
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
12
|
+
import { basename, delimiter, dirname, join, resolve } from "node:path";
|
|
13
13
|
import process from "node:process";
|
|
14
14
|
import { PackageURL } from "packageurl-js";
|
|
15
15
|
import {
|
|
@@ -28,8 +28,6 @@ import {
|
|
|
28
28
|
safeMkdirSync,
|
|
29
29
|
} from "../helpers/utils.js";
|
|
30
30
|
|
|
31
|
-
import { URL } from "node:url";
|
|
32
|
-
|
|
33
31
|
const dirName = dirNameStr;
|
|
34
32
|
|
|
35
33
|
const isWin = _platform() === "win32";
|
|
@@ -60,6 +58,9 @@ switch (arch) {
|
|
|
60
58
|
break;
|
|
61
59
|
}
|
|
62
60
|
|
|
61
|
+
// cdxgen plugins version
|
|
62
|
+
const CDXGEN_PLUGINS_VERSION = "1.6.10";
|
|
63
|
+
|
|
63
64
|
// Retrieve the cdxgen plugins directory
|
|
64
65
|
let CDXGEN_PLUGINS_DIR = process.env.CDXGEN_PLUGINS_DIR;
|
|
65
66
|
// Is there a non-empty local plugins directory
|
|
@@ -126,11 +127,54 @@ if (!CDXGEN_PLUGINS_DIR) {
|
|
|
126
127
|
`cdxgen-plugins-bin${pluginsBinSuffix}`,
|
|
127
128
|
"plugins",
|
|
128
129
|
);
|
|
130
|
+
// pnpm add -g
|
|
131
|
+
let altGlobalPlugins;
|
|
132
|
+
if (dirName.includes(join("node_modules", ".pnpm", "@cyclonedx+cdxgen"))) {
|
|
133
|
+
const tmpA = dirName.split(join("node_modules", ".pnpm"));
|
|
134
|
+
altGlobalPlugins = join(
|
|
135
|
+
tmpA[0],
|
|
136
|
+
"node_modules",
|
|
137
|
+
".pnpm",
|
|
138
|
+
`@cyclonedx+cdxgen-plugins-bin${pluginsBinSuffix}@${CDXGEN_PLUGINS_VERSION}`,
|
|
139
|
+
"node_modules",
|
|
140
|
+
"@cyclonedx",
|
|
141
|
+
`cdxgen-plugins-bin${pluginsBinSuffix}`,
|
|
142
|
+
"plugins",
|
|
143
|
+
);
|
|
144
|
+
} else if (dirName.includes(join(".pnpm", "@cyclonedx+cdxgen"))) {
|
|
145
|
+
// pnpm dlx
|
|
146
|
+
const tmpA = dirName.split(".pnpm");
|
|
147
|
+
altGlobalPlugins = join(
|
|
148
|
+
tmpA[0],
|
|
149
|
+
".pnpm",
|
|
150
|
+
`@cyclonedx+cdxgen-plugins-bin${pluginsBinSuffix}@${CDXGEN_PLUGINS_VERSION}`,
|
|
151
|
+
"node_modules",
|
|
152
|
+
"@cyclonedx",
|
|
153
|
+
`cdxgen-plugins-bin${pluginsBinSuffix}`,
|
|
154
|
+
"plugins",
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const extraNMBinPath = join(
|
|
158
|
+
globalNodePath,
|
|
159
|
+
"..",
|
|
160
|
+
".pnpm",
|
|
161
|
+
"node_modules",
|
|
162
|
+
".bin",
|
|
163
|
+
);
|
|
129
164
|
if (existsSync(globalPlugins)) {
|
|
130
165
|
CDXGEN_PLUGINS_DIR = globalPlugins;
|
|
131
166
|
if (DEBUG_MODE) {
|
|
132
167
|
console.log("Found global plugins", CDXGEN_PLUGINS_DIR);
|
|
133
168
|
}
|
|
169
|
+
} else if (altGlobalPlugins && existsSync(altGlobalPlugins)) {
|
|
170
|
+
CDXGEN_PLUGINS_DIR = altGlobalPlugins;
|
|
171
|
+
// To help detect bin commands such as atom, astgen, etc, we need to set this to the PATH variable.
|
|
172
|
+
if (!process.env?.PATH?.includes(extraNMBinPath)) {
|
|
173
|
+
process.env.PATH = `${extraNMBinPath}${delimiter}${process.env.PATH}`;
|
|
174
|
+
}
|
|
175
|
+
if (DEBUG_MODE) {
|
|
176
|
+
console.log("Found global plugins", CDXGEN_PLUGINS_DIR);
|
|
177
|
+
}
|
|
134
178
|
}
|
|
135
179
|
}
|
|
136
180
|
}
|
package/lib/managers/docker.js
CHANGED
|
@@ -650,22 +650,44 @@ export const getImage = async (fullImageName) => {
|
|
|
650
650
|
dockerCmd = "nerdctl";
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
let
|
|
653
|
+
let needsPull = true;
|
|
654
|
+
// Let's check the local cache first
|
|
655
|
+
let result = spawnSync(dockerCmd, ["images", "--format=json"], {
|
|
654
656
|
encoding: "utf-8",
|
|
655
657
|
});
|
|
656
|
-
if (result.status
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
658
|
+
if (result.status === 0 && result.stdout) {
|
|
659
|
+
for (const imgLine of result.stdout.split("\n")) {
|
|
660
|
+
try {
|
|
661
|
+
const imgObj = JSON.parse(Buffer.from(imgLine).toString());
|
|
662
|
+
if (
|
|
663
|
+
imgObj.Repository === fullImageName ||
|
|
664
|
+
imgObj?.Name?.endsWith(fullImageName)
|
|
665
|
+
) {
|
|
666
|
+
needsPull = false;
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
} catch (err) {
|
|
670
|
+
// continue regardless of error
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
if (needsPull) {
|
|
675
|
+
result = spawnSync(dockerCmd, ["pull", fullImageName], {
|
|
676
|
+
encoding: "utf-8",
|
|
677
|
+
});
|
|
678
|
+
if (result.status !== 0 || result.error) {
|
|
679
|
+
if (result.stderr?.includes("docker daemon is not running")) {
|
|
680
|
+
console.log(
|
|
681
|
+
"Ensure Docker for Desktop is running as an administrator with 'Exposing daemon on TCP without TLS' setting turned on.",
|
|
682
|
+
);
|
|
683
|
+
} else if (result.stderr?.includes("not found")) {
|
|
684
|
+
console.log(
|
|
685
|
+
"Set the environment variable DOCKER_CMD to use an alternative command such as nerdctl or podman.",
|
|
686
|
+
);
|
|
687
|
+
} else {
|
|
688
|
+
console.log(result.stderr);
|
|
689
|
+
}
|
|
667
690
|
}
|
|
668
|
-
return localData;
|
|
669
691
|
}
|
|
670
692
|
result = spawnSync(dockerCmd, ["inspect", fullImageName], {
|
|
671
693
|
encoding: "utf-8",
|
|
@@ -901,22 +923,16 @@ export const extractTar = async (fullImageName, dir, options) => {
|
|
|
901
923
|
return false;
|
|
902
924
|
} else if (["EACCES"].includes(err.code)) {
|
|
903
925
|
console.log(err);
|
|
904
|
-
|
|
905
|
-
* We do not display errors messages for errors:
|
|
906
|
-
* 1) TAR_ENTRY_INFO is an informative error indicating that an entry is being modified.
|
|
907
|
-
* 2) TAR_ENTRY_INVALID indicates that a given entry is not valid tar archive entry and will be skipped.
|
|
908
|
-
*/
|
|
909
|
-
} else if (
|
|
910
|
-
DEBUG_MODE &&
|
|
911
|
-
["TAR_ENTRY_INFO", "TAR_ENTRY_INVALID"].includes(err.code)
|
|
912
|
-
) {
|
|
926
|
+
} else if (["TAR_ENTRY_INFO", "TAR_ENTRY_INVALID"].includes(err.code)) {
|
|
913
927
|
if (
|
|
914
928
|
err?.header?.path?.includes("{") ||
|
|
915
929
|
err?.message?.includes("linkpath required")
|
|
916
930
|
) {
|
|
917
931
|
return false;
|
|
918
932
|
}
|
|
919
|
-
|
|
933
|
+
if (DEBUG_MODE) {
|
|
934
|
+
console.log(err);
|
|
935
|
+
}
|
|
920
936
|
} else if (DEBUG_MODE) {
|
|
921
937
|
console.log(err.code, "is not handled yet in extractTar method.");
|
|
922
938
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclonedx/cdxgen",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.6",
|
|
4
4
|
"description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
|
|
5
5
|
"homepage": "http://github.com/cyclonedx/cdxgen",
|
|
6
6
|
"author": "Prabhu Subramanian <prabhu@appthreat.com>",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"yoctocolors": "^2.1.1"
|
|
102
102
|
},
|
|
103
103
|
"optionalDependencies": {
|
|
104
|
-
"@appthreat/atom": "2.1.
|
|
104
|
+
"@appthreat/atom": "2.1.16",
|
|
105
105
|
"@appthreat/cdx-proto": "1.0.1",
|
|
106
106
|
"@cyclonedx/cdxgen-plugins-bin": "1.6.10",
|
|
107
107
|
"@cyclonedx/cdxgen-plugins-bin-linux-arm": "1.6.10",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AAu7BA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AA8XD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAyEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAgvChB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAmvBhB;AAED;;;;;;;;;;GAUG;AACH,+DAsEC;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAkehB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BA+YhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAuIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAkEhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,8BAqDhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BA8IhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BAmJhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAmUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAiJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAwNhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA8ZhB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;AAED;;;;;;GAMG;AACH,yDA+FC;AAED;;;;;;;;;GASG;AACH,2GAuCC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,EAAE,8BA6vBlB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAqUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBA2QhB;AAED;;;;;;;GAOG;AACH,wDAHY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CA2HjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/managers/binary.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/managers/binary.js"],"names":[],"mappings":"AAwVA,wDAkBC;AAED;;;;;GAKG;AACH,kDAFa,SAAS,MAAO,CAqB5B;AAED;;;;;;;GAOG;AACH,kEAqaC;AAsDD,gDAoDC;AAED;;;;;;GAMG;AACH,qCAJW,MAAM,cACN,MAAM,WA0ChB;AAED;;;;;;;;GAQG;AACH,kCANW,MAAM,iBACN,MAAM,YACN,OAAO,GAEN,OAAO,CA8BlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAiFA;;GAEG;AACH,oCAmBC;AAED;;GAEG;AACH,4CA6CC;AA7HD,4BAA6C;AAC7C,kCAAmC,WAAW,CAAC;AAmCxC,kDAeN;AAqFM,iCAHI,MAAM,WACN,MAAM,iDAehB;AAqBM,6DAmBN;AAgLM,4EAsGN;AAEM,oFAwBN;AAUM;;;;;;;;EAyEN;AAsBM,
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAiFA;;GAEG;AACH,oCAmBC;AAED;;GAEG;AACH,4CA6CC;AA7HD,4BAA6C;AAC7C,kCAAmC,WAAW,CAAC;AAmCxC,kDAeN;AAqFM,iCAHI,MAAM,WACN,MAAM,iDAehB;AAqBM,6DAmBN;AAgLM,4EAsGN;AAEM,oFAwBN;AAUM;;;;;;;;EAyEN;AAsBM,2DAsMN;AAgBM,yFAqGN;AAMM;;;;;;;;;;;;;;GAwDN;AAEM;;;;;;;;GAyGN;AAMM,4EA+IN;AAKM,4EA2GN;AAEM,+EAEN;AAEM,4EAyCN;AAEM,iFA0BN"}
|