@cyclonedx/cdxgen 10.1.3 → 10.2.2
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 +50 -47
- package/analyzer.js +2 -0
- package/bin/cdxgen.js +52 -10
- package/binary.js +54 -13
- package/display.js +3 -3
- package/evinser.js +9 -4
- package/index.js +125 -65
- package/package.json +8 -8
- package/types/analyzer.d.ts.map +1 -1
- package/types/db.d.ts.map +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/utils.d.ts +2 -0
- package/types/utils.d.ts.map +1 -1
- package/utils.js +357 -330
- package/utils.test.js +18 -3
package/utils.test.js
CHANGED
|
@@ -1216,7 +1216,7 @@ test("parse github actions workflow data", () => {
|
|
|
1216
1216
|
dep_list = parseGitHubWorkflowData(
|
|
1217
1217
|
readFileSync("./.github/workflows/repotests.yml", { encoding: "utf-8" })
|
|
1218
1218
|
);
|
|
1219
|
-
expect(dep_list.length).toEqual(
|
|
1219
|
+
expect(dep_list.length).toEqual(9);
|
|
1220
1220
|
expect(dep_list[0]).toEqual({
|
|
1221
1221
|
group: "actions",
|
|
1222
1222
|
name: "checkout",
|
|
@@ -2712,6 +2712,21 @@ test("parse pyproject.toml", () => {
|
|
|
2712
2712
|
});
|
|
2713
2713
|
});
|
|
2714
2714
|
|
|
2715
|
+
test("parse pyproject.toml with custom poetry source", () => {
|
|
2716
|
+
const pkg = parsePyProjectToml(
|
|
2717
|
+
"./test/data/pyproject_with_custom_poetry_source.toml"
|
|
2718
|
+
);
|
|
2719
|
+
expect(pkg).toEqual({
|
|
2720
|
+
name: "cpggen",
|
|
2721
|
+
version: "1.9.0",
|
|
2722
|
+
description:
|
|
2723
|
+
"Generate CPG for multiple languages for code and threat analysis",
|
|
2724
|
+
author: "Team AppThreat <cloud@appthreat.com>",
|
|
2725
|
+
homepage: { url: "https://github.com/AppThreat/cpggen" },
|
|
2726
|
+
repository: { url: "https://github.com/AppThreat/cpggen" }
|
|
2727
|
+
});
|
|
2728
|
+
});
|
|
2729
|
+
|
|
2715
2730
|
test("parse poetry.lock", async () => {
|
|
2716
2731
|
let retMap = await parsePoetrylockData(
|
|
2717
2732
|
readFileSync("./test/data/poetry.lock", { encoding: "utf-8" }),
|
|
@@ -3218,7 +3233,7 @@ test("parse swift deps files", () => {
|
|
|
3218
3233
|
}
|
|
3219
3234
|
]);
|
|
3220
3235
|
let pkgList = parseSwiftResolved("./test/data/Package.resolved");
|
|
3221
|
-
expect(pkgList.length).toEqual(
|
|
3236
|
+
expect(pkgList.length).toEqual(6);
|
|
3222
3237
|
expect(pkgList[0]).toEqual({
|
|
3223
3238
|
name: "swift-argument-parser",
|
|
3224
3239
|
group: "github.com/apple",
|
|
@@ -3242,7 +3257,7 @@ test("parse swift deps files", () => {
|
|
|
3242
3257
|
repository: { url: "https://github.com/apple/swift-argument-parser" }
|
|
3243
3258
|
});
|
|
3244
3259
|
pkgList = parseSwiftResolved("./test/data/Package2.resolved");
|
|
3245
|
-
expect(pkgList.length).toEqual(
|
|
3260
|
+
expect(pkgList.length).toEqual(6);
|
|
3246
3261
|
expect(pkgList[0]).toEqual({
|
|
3247
3262
|
name: "swift-argument-parser",
|
|
3248
3263
|
group: "github.com/apple",
|