@cyclonedx/cdxgen 12.1.3 → 12.1.5

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.
Files changed (107) hide show
  1. package/README.md +1 -1
  2. package/bin/cdxgen.js +12 -0
  3. package/bin/repl.js +2 -2
  4. package/lib/cli/index.js +164 -71
  5. package/lib/evinser/evinser.js +3 -4
  6. package/lib/evinser/swiftsem.js +1 -1
  7. package/lib/helpers/caxa.js +1 -1
  8. package/lib/helpers/display.js +6 -10
  9. package/lib/helpers/envcontext.js +5 -5
  10. package/lib/helpers/pythonutils.js +296 -0
  11. package/lib/helpers/pythonutils.poku.js +469 -0
  12. package/lib/helpers/utils.js +303 -95
  13. package/lib/helpers/utils.poku.js +84 -1
  14. package/lib/managers/piptree.js +1 -1
  15. package/lib/parsers/npmrc.js +88 -0
  16. package/lib/parsers/npmrc.poku.js +492 -0
  17. package/lib/server/openapi.yaml +0 -9
  18. package/lib/server/server.js +18 -5
  19. package/lib/stages/pregen/env-audit.js +34 -0
  20. package/lib/stages/pregen/env-audit.poku.js +290 -0
  21. package/lib/third-party/arborist/lib/deepest-nesting-target.js +1 -1
  22. package/lib/third-party/arborist/lib/node.js +3 -3
  23. package/lib/third-party/arborist/lib/shrinkwrap.js +1 -1
  24. package/lib/third-party/arborist/lib/tree-check.js +1 -1
  25. package/package.json +6 -6
  26. package/types/lib/cli/index.d.ts +39 -39
  27. package/types/lib/cli/index.d.ts.map +1 -1
  28. package/types/lib/evinser/evinser.d.ts +19 -19
  29. package/types/lib/evinser/evinser.d.ts.map +1 -1
  30. package/types/lib/evinser/swiftsem.d.ts +14 -14
  31. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  32. package/types/lib/helpers/cbomutils.d.ts +1 -1
  33. package/types/lib/helpers/cbomutils.d.ts.map +1 -1
  34. package/types/lib/helpers/db.d.ts +2 -2
  35. package/types/lib/helpers/db.d.ts.map +1 -1
  36. package/types/lib/helpers/display.d.ts +2 -2
  37. package/types/lib/helpers/display.d.ts.map +1 -1
  38. package/types/lib/helpers/envcontext.d.ts +14 -14
  39. package/types/lib/helpers/envcontext.d.ts.map +1 -1
  40. package/types/lib/helpers/logger.d.ts +1 -1
  41. package/types/lib/helpers/logger.d.ts.map +1 -1
  42. package/types/lib/helpers/protobom.d.ts +4 -2
  43. package/types/lib/helpers/protobom.d.ts.map +1 -1
  44. package/types/lib/helpers/pythonutils.d.ts +9 -0
  45. package/types/lib/helpers/pythonutils.d.ts.map +1 -0
  46. package/types/lib/helpers/utils.d.ts +103 -88
  47. package/types/lib/helpers/utils.d.ts.map +1 -1
  48. package/types/lib/managers/binary.d.ts +2 -2
  49. package/types/lib/managers/binary.d.ts.map +1 -1
  50. package/types/lib/managers/docker.d.ts +2 -2
  51. package/types/lib/managers/docker.d.ts.map +1 -1
  52. package/types/lib/managers/oci.d.ts +1 -1
  53. package/types/lib/managers/oci.d.ts.map +1 -1
  54. package/types/lib/managers/piptree.d.ts +1 -1
  55. package/types/lib/managers/piptree.d.ts.map +1 -1
  56. package/types/lib/parsers/iri.d.ts +6 -6
  57. package/types/lib/parsers/iri.d.ts.map +1 -1
  58. package/types/lib/parsers/npmrc.d.ts +23 -0
  59. package/types/lib/parsers/npmrc.d.ts.map +1 -0
  60. package/types/lib/server/server.d.ts +1 -1
  61. package/types/lib/server/server.d.ts.map +1 -1
  62. package/types/lib/stages/postgen/annotator.d.ts +3 -3
  63. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  64. package/types/lib/stages/postgen/postgen.d.ts +5 -5
  65. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  66. package/types/lib/stages/pregen/env-audit.d.ts +2 -0
  67. package/types/lib/stages/pregen/env-audit.d.ts.map +1 -0
  68. package/types/lib/stages/pregen/pregen.d.ts +6 -6
  69. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  70. package/types/lib/third-party/arborist/lib/arborist/index.d.ts +4 -3
  71. package/types/lib/third-party/arborist/lib/arborist/index.d.ts.map +1 -1
  72. package/types/lib/third-party/arborist/lib/can-place-dep.d.ts +5 -5
  73. package/types/lib/third-party/arborist/lib/can-place-dep.d.ts.map +1 -1
  74. package/types/lib/third-party/arborist/lib/case-insensitive-map.d.ts +4 -4
  75. package/types/lib/third-party/arborist/lib/case-insensitive-map.d.ts.map +1 -1
  76. package/types/lib/third-party/arborist/lib/diff.d.ts +3 -3
  77. package/types/lib/third-party/arborist/lib/diff.d.ts.map +1 -1
  78. package/types/lib/third-party/arborist/lib/edge.d.ts +2 -2
  79. package/types/lib/third-party/arborist/lib/edge.d.ts.map +1 -1
  80. package/types/lib/third-party/arborist/lib/gather-dep-set.d.ts +1 -1
  81. package/types/lib/third-party/arborist/lib/gather-dep-set.d.ts.map +1 -1
  82. package/types/lib/third-party/arborist/lib/inventory.d.ts +3 -2
  83. package/types/lib/third-party/arborist/lib/inventory.d.ts.map +1 -1
  84. package/types/lib/third-party/arborist/lib/link.d.ts +10 -7
  85. package/types/lib/third-party/arborist/lib/link.d.ts.map +1 -1
  86. package/types/lib/third-party/arborist/lib/node.d.ts +8 -8
  87. package/types/lib/third-party/arborist/lib/node.d.ts.map +1 -1
  88. package/types/lib/third-party/arborist/lib/optional-set.d.ts +1 -1
  89. package/types/lib/third-party/arborist/lib/optional-set.d.ts.map +1 -1
  90. package/types/lib/third-party/arborist/lib/override-set.d.ts +3 -3
  91. package/types/lib/third-party/arborist/lib/override-set.d.ts.map +1 -1
  92. package/types/lib/third-party/arborist/lib/peer-entry-sets.d.ts +1 -1
  93. package/types/lib/third-party/arborist/lib/peer-entry-sets.d.ts.map +1 -1
  94. package/types/lib/third-party/arborist/lib/place-dep.d.ts +3 -3
  95. package/types/lib/third-party/arborist/lib/place-dep.d.ts.map +1 -1
  96. package/types/lib/third-party/arborist/lib/shrinkwrap.d.ts +7 -7
  97. package/types/lib/third-party/arborist/lib/shrinkwrap.d.ts.map +1 -1
  98. package/types/lib/third-party/arborist/lib/version-from-tgz.d.ts +1 -1
  99. package/types/lib/third-party/arborist/lib/version-from-tgz.d.ts.map +1 -1
  100. package/types/lib/third-party/arborist/lib/yarn-lock.d.ts +4 -3
  101. package/types/lib/third-party/arborist/lib/yarn-lock.d.ts.map +1 -1
  102. package/types/lib/third-party/arborist/lib/arborist/load-actual.d.ts +0 -34
  103. package/types/lib/third-party/arborist/lib/arborist/load-actual.d.ts.map +0 -1
  104. package/types/lib/third-party/arborist/lib/arborist/load-virtual.d.ts +0 -24
  105. package/types/lib/third-party/arborist/lib/arborist/load-virtual.d.ts.map +0 -1
  106. package/types/lib/third-party/arborist/lib/tracker.d.ts +0 -13
  107. package/types/lib/third-party/arborist/lib/tracker.d.ts.map +0 -1
@@ -0,0 +1,290 @@
1
+ import { strict as assert } from "node:assert";
2
+
3
+ import { describe, test } from "poku";
4
+
5
+ import { auditEnvironment } from "./env-audit.js";
6
+
7
+ const NODE_OPTIONS_ATTACK_VECTORS = [
8
+ {
9
+ name: "--require flag",
10
+ value: "--require ./evil.js",
11
+ expectedMatch: true,
12
+ },
13
+ {
14
+ name: "--require with uppercase",
15
+ value: "--REQUIRE ./evil.js",
16
+ expectedMatch: true,
17
+ },
18
+ {
19
+ name: "-r short flag",
20
+ value: "-r ./evil.js",
21
+ expectedMatch: false,
22
+ },
23
+ {
24
+ name: "--eval flag",
25
+ value: "--eval \"console.log('pwned')\"",
26
+ expectedMatch: true,
27
+ },
28
+ {
29
+ name: "--eval with complex payload",
30
+ value: "--eval \"require('child_process').execSync('id')\"",
31
+ expectedMatch: true,
32
+ },
33
+ {
34
+ name: "-e short flag",
35
+ value: "-e \"console.log('test')\"",
36
+ expectedMatch: false,
37
+ },
38
+ {
39
+ name: "--import flag (Node 18+)",
40
+ value: "--import ./malicious.mjs",
41
+ expectedMatch: true,
42
+ },
43
+ {
44
+ name: "--loader flag",
45
+ value: "--loader ./hook-loader.js",
46
+ expectedMatch: true,
47
+ },
48
+ {
49
+ name: "--inspect flag",
50
+ value: "--inspect=0.0.0.0:9229",
51
+ expectedMatch: true,
52
+ },
53
+ {
54
+ name: "--inspect-brk flag",
55
+ value: "--inspect-brk=9229",
56
+ expectedMatch: true,
57
+ },
58
+ {
59
+ name: "--inspect with host",
60
+ value: "--inspect 127.0.0.1:9229",
61
+ expectedMatch: true,
62
+ },
63
+ {
64
+ name: "safe memory flag",
65
+ value: "--max-old-space-size=4096",
66
+ expectedMatch: false,
67
+ },
68
+ {
69
+ name: "safe GC flag",
70
+ value: "--expose-gc",
71
+ expectedMatch: false,
72
+ },
73
+ {
74
+ name: "safe trace flag",
75
+ value: "--trace-warnings",
76
+ expectedMatch: false,
77
+ },
78
+ {
79
+ name: "multiple flags with one malicious",
80
+ value: "--max-old-space-size=4096 --require ./evil.js",
81
+ expectedMatch: true,
82
+ },
83
+ {
84
+ name: "empty string",
85
+ value: "",
86
+ expectedMatch: false,
87
+ },
88
+ {
89
+ name: "whitespace only",
90
+ value: " ",
91
+ expectedMatch: false,
92
+ },
93
+ ];
94
+
95
+ const DANGEROUS_ENV_VAR_CASES = [
96
+ {
97
+ name: "NODE_NO_WARNINGS set",
98
+ env: { NODE_NO_WARNINGS: "1" },
99
+ expectedWarnings: 1,
100
+ expectedVar: "NODE_NO_WARNINGS",
101
+ },
102
+ {
103
+ name: "NODE_PENDING_DEPRECATION set",
104
+ env: { NODE_PENDING_DEPRECATION: "1" },
105
+ expectedWarnings: 1,
106
+ expectedVar: "NODE_PENDING_DEPRECATION",
107
+ },
108
+ {
109
+ name: "UV_THREADPOOL_SIZE set",
110
+ env: { UV_THREADPOOL_SIZE: "128" },
111
+ expectedWarnings: 1,
112
+ expectedVar: "UV_THREADPOOL_SIZE",
113
+ },
114
+ {
115
+ name: "all dangerous vars set",
116
+ env: {
117
+ NODE_NO_WARNINGS: "1",
118
+ NODE_PENDING_DEPRECATION: "1",
119
+ UV_THREADPOOL_SIZE: "128",
120
+ },
121
+ expectedWarnings: 3,
122
+ expectedVar: null,
123
+ },
124
+ {
125
+ name: "no dangerous vars",
126
+ env: { PATH: "/usr/bin", HOME: "/home/user" },
127
+ expectedWarnings: 0,
128
+ expectedVar: null,
129
+ },
130
+ {
131
+ name: "dangerous var with empty value (falsy)",
132
+ env: { NODE_NO_WARNINGS: "" },
133
+ expectedWarnings: 0,
134
+ expectedVar: null,
135
+ },
136
+ ];
137
+
138
+ const COMBINED_ATTACK_CASES = [
139
+ {
140
+ name: "NODE_OPTIONS attack + dangerous vars",
141
+ env: {
142
+ NODE_OPTIONS: "--require ./evil.js",
143
+ NODE_NO_WARNINGS: "1",
144
+ UV_THREADPOOL_SIZE: "128",
145
+ },
146
+ minWarnings: 3,
147
+ },
148
+ {
149
+ name: "multiple NODE_OPTIONS patterns",
150
+ env: {
151
+ NODE_OPTIONS: '--require ./a.js --eval "code" --inspect',
152
+ },
153
+ minWarnings: 3,
154
+ },
155
+ {
156
+ name: "clean environment",
157
+ env: {},
158
+ minWarnings: 0,
159
+ },
160
+ ];
161
+
162
+ describe("auditEnvironment - NODE_OPTIONS Detection", () => {
163
+ for (const tc of NODE_OPTIONS_ATTACK_VECTORS) {
164
+ test(`should detect ${tc.name}`, () => {
165
+ const env = { NODE_OPTIONS: tc.value };
166
+ const warnings = auditEnvironment(env);
167
+
168
+ const hasSuspiciousWarning = warnings.some((w) =>
169
+ w.includes("NODE_OPTIONS contains code execution flag"),
170
+ );
171
+
172
+ if (tc.expectedMatch) {
173
+ assert.ok(
174
+ hasSuspiciousWarning,
175
+ `Expected warning for ${tc.name} but got: ${warnings.join(", ")}`,
176
+ );
177
+ } else {
178
+ assert.ok(
179
+ !hasSuspiciousWarning,
180
+ `Unexpected warning for ${tc.name}: ${warnings.join(", ")}`,
181
+ );
182
+ }
183
+ });
184
+ }
185
+ });
186
+
187
+ describe("auditEnvironment - Dangerous Env Vars", () => {
188
+ for (const tc of DANGEROUS_ENV_VAR_CASES) {
189
+ test(`should handle ${tc.name}`, () => {
190
+ const warnings = auditEnvironment(tc.env);
191
+
192
+ assert.strictEqual(
193
+ warnings.length,
194
+ tc.expectedWarnings,
195
+ `Expected ${tc.expectedWarnings} warnings, got ${warnings.length}: ${warnings.join(", ")}`,
196
+ );
197
+
198
+ if (tc.expectedVar) {
199
+ assert.ok(
200
+ warnings.some((w) => w.includes(tc.expectedVar)),
201
+ `Expected warning about ${tc.expectedVar} but got: ${warnings.join(", ")}`,
202
+ );
203
+ }
204
+ });
205
+ }
206
+ });
207
+
208
+ describe("auditEnvironment - Combined Attacks", () => {
209
+ for (const tc of COMBINED_ATTACK_CASES) {
210
+ test(`should handle ${tc.name}`, () => {
211
+ const warnings = auditEnvironment(tc.env);
212
+
213
+ assert.ok(
214
+ warnings.length >= tc.minWarnings,
215
+ `Expected at least ${tc.minWarnings} warnings, got ${warnings.length}: ${warnings.join(", ")}`,
216
+ );
217
+ });
218
+ }
219
+ });
220
+
221
+ describe("auditEnvironment - Edge Cases", () => {
222
+ test("should handle undefined NODE_OPTIONS", () => {
223
+ const warnings = auditEnvironment({});
224
+ const hasSuspiciousWarning = warnings.some((w) =>
225
+ w.includes("NODE_OPTIONS contains code execution flag"),
226
+ );
227
+ assert.ok(!hasSuspiciousWarning);
228
+ });
229
+
230
+ test("should handle null env (uses process.env)", () => {
231
+ const warnings = auditEnvironment();
232
+ assert.ok(Array.isArray(warnings));
233
+ });
234
+
235
+ test("should return empty array for completely clean env", () => {
236
+ const warnings = auditEnvironment({
237
+ PATH: "/usr/bin",
238
+ HOME: "/home/user",
239
+ LANG: "en_US.UTF-8",
240
+ });
241
+ assert.deepStrictEqual(warnings, []);
242
+ });
243
+
244
+ test("should detect all dangerous vars individually", () => {
245
+ const warnings1 = auditEnvironment({ NODE_NO_WARNINGS: "1" });
246
+ const warnings2 = auditEnvironment({ NODE_PENDING_DEPRECATION: "1" });
247
+ const warnings3 = auditEnvironment({ UV_THREADPOOL_SIZE: "128" });
248
+
249
+ assert.strictEqual(warnings1.length, 1);
250
+ assert.strictEqual(warnings2.length, 1);
251
+ assert.strictEqual(warnings3.length, 1);
252
+
253
+ assert.ok(warnings1[0].includes("NODE_NO_WARNINGS"));
254
+ assert.ok(warnings2[0].includes("NODE_PENDING_DEPRECATION"));
255
+ assert.ok(warnings3[0].includes("UV_THREADPOOL_SIZE"));
256
+ });
257
+
258
+ test("should be case-sensitive for env var names", () => {
259
+ const warnings = auditEnvironment({
260
+ node_no_warnings: "1",
261
+ Node_Options: "--require ./evil.js",
262
+ });
263
+ assert.strictEqual(warnings.length, 0);
264
+ });
265
+ });
266
+
267
+ describe("auditEnvironment - Warning Message Format", () => {
268
+ test("dangerous var warning should mention unsetting", () => {
269
+ const warnings = auditEnvironment({ NODE_NO_WARNINGS: "1" });
270
+ assert.ok(warnings[0].includes("Unset"));
271
+ assert.ok(warnings[0].includes("NODE_NO_WARNINGS"));
272
+ });
273
+
274
+ test("NODE_OPTIONS warning should mention the pattern", () => {
275
+ const warnings = auditEnvironment({ NODE_OPTIONS: "--require ./evil.js" });
276
+ assert.ok(warnings[0].includes("NODE_OPTIONS"));
277
+ assert.ok(warnings[0].includes("code execution flag"));
278
+ });
279
+
280
+ test("warnings should be human-readable strings", () => {
281
+ const warnings = auditEnvironment({
282
+ NODE_OPTIONS: "--eval test",
283
+ NODE_NO_WARNINGS: "1",
284
+ });
285
+ for (const w of warnings) {
286
+ assert.strictEqual(typeof w, "string");
287
+ assert.ok(w.length > 0);
288
+ }
289
+ });
290
+ });
@@ -9,7 +9,7 @@ const deepestNestingTarget = (start, name) => {
9
9
  return target;
10
10
  }
11
11
  const targetEdge = target.edgesOut.get(name);
12
- if (!targetEdge || !targetEdge.peer) {
12
+ if (!targetEdge?.peer) {
13
13
  return target;
14
14
  }
15
15
  }
@@ -1052,7 +1052,7 @@ class Node {
1052
1052
  }
1053
1053
 
1054
1054
  // it's a top level pkg, or a dep of one
1055
- if (!this.resolveParent || !this.resolveParent.resolveParent) {
1055
+ if (!this.resolveParent?.resolveParent) {
1056
1056
  return false;
1057
1057
  }
1058
1058
 
@@ -1382,7 +1382,7 @@ class Node {
1382
1382
 
1383
1383
  updateOverridesEdgeInRemoved(otherOverrideSet) {
1384
1384
  // If this edge's overrides isn't equal to this node's overrides, then removing it won't change newOverrideSet later.
1385
- if (!this.overrides || !this.overrides.isEqual(otherOverrideSet)) {
1385
+ if (!this.overrides?.isEqual(otherOverrideSet)) {
1386
1386
  return false;
1387
1387
  }
1388
1388
  let newOverrideSet;
@@ -1453,7 +1453,7 @@ class Node {
1453
1453
 
1454
1454
  addEdgeIn(edge) {
1455
1455
  // We need to handle the case where the new edge in has an overrides field which is different from the current value.
1456
- if (!this.overrides || !this.overrides.isEqual(edge.overrides)) {
1456
+ if (!this.overrides?.isEqual(edge.overrides)) {
1457
1457
  this.updateOverridesEdgeInAdded(edge.overrides);
1458
1458
  }
1459
1459
  this.edgesIn.add(edge);
@@ -897,7 +897,7 @@ class Shrinkwrap {
897
897
  }
898
898
 
899
899
  // if the yarn lock is empty, nothing to do
900
- if (!this.yarnLock.entries || !this.yarnLock.entries.size) {
900
+ if (!this.yarnLock.entries?.size) {
901
901
  return;
902
902
  }
903
903
 
@@ -5,7 +5,7 @@ const checkTree = (tree, checkUnreachable = true) => {
5
5
 
6
6
  // this can only happen in tests where we have a "tree" object
7
7
  // that isn't actually a tree.
8
- if (!tree.root || !tree.root.inventory) {
8
+ if (!tree.root?.inventory) {
9
9
  return tree;
10
10
  }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cdxgen",
3
- "version": "12.1.3",
3
+ "version": "12.1.5",
4
4
  "description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
5
5
  "keywords": [
6
6
  "sbom",
@@ -129,21 +129,21 @@
129
129
  "semver": "7.7.4",
130
130
  "ssri": "13.0.1",
131
131
  "table": "6.9.0",
132
- "tar": "7.5.11",
132
+ "tar": "7.5.13",
133
133
  "treeverse": "3.0.0",
134
134
  "uuid": "13.0.0",
135
135
  "walk-up-path": "4.0.0",
136
136
  "xml-js": "1.6.11",
137
- "yaml": "2.8.2",
137
+ "yaml": "2.8.3",
138
138
  "yargs": "18.0.0",
139
139
  "yoctocolors": "2.1.2"
140
140
  },
141
141
  "devDependencies": {
142
- "@biomejs/biome": "2.4.7",
142
+ "@biomejs/biome": "2.4.10",
143
143
  "esmock": "2.7.3",
144
- "poku": "4.1.0",
144
+ "poku": "4.2.0",
145
145
  "sinon": "21.0.3",
146
- "typescript": "5.9.3"
146
+ "typescript": "6.0.2"
147
147
  },
148
148
  "optionalDependencies": {
149
149
  "@appthreat/atom": "2.5.2",
@@ -7,7 +7,7 @@
7
7
  * @param {Object} pkg Package object
8
8
  * @param {string} ptype Package type
9
9
  */
10
- export function listComponents(options: any, allImports: any, pkg: any, ptype?: string): any[];
10
+ export function listComponents(options: Object, allImports: Object, pkg: Object, ptype?: string): any[];
11
11
  /**
12
12
  * Function to create bom string for Java jars
13
13
  *
@@ -16,43 +16,43 @@ export function listComponents(options: any, allImports: any, pkg: any, ptype?:
16
16
  *
17
17
  * @returns {Object} BOM with namespace mapping
18
18
  */
19
- export function createJarBom(path: string, options: any): any;
19
+ export function createJarBom(path: string, options: Object): Object;
20
20
  /**
21
21
  * Function to create bom string for Android apps using blint
22
22
  *
23
23
  * @param {string} path to the project
24
24
  * @param {Object} options Parse options from the cli
25
25
  */
26
- export function createAndroidBom(path: string, options: any): {
26
+ export function createAndroidBom(path: string, options: Object): {
27
27
  bomJson: any;
28
28
  dependencies: any;
29
29
  parentComponent: any;
30
- };
30
+ } | undefined;
31
31
  /**
32
32
  * Function to create bom string for binaries using blint
33
33
  *
34
34
  * @param {string} path to the project
35
35
  * @param {Object} options Parse options from the cli
36
36
  */
37
- export function createBinaryBom(path: string, options: any): {
37
+ export function createBinaryBom(path: string, options: Object): {
38
38
  bomJson: any;
39
39
  dependencies: any;
40
40
  parentComponent: any;
41
- };
41
+ } | undefined;
42
42
  /**
43
43
  * Function to create bom string for Java projects
44
44
  *
45
45
  * @param {string} path to the project
46
46
  * @param {Object} options Parse options from the cli
47
47
  */
48
- export function createJavaBom(path: string, options: any): Promise<any>;
48
+ export function createJavaBom(path: string, options: Object): Promise<Object>;
49
49
  /**
50
50
  * Function to create bom string for Node.js projects
51
51
  *
52
52
  * @param {string} path to the project
53
53
  * @param {Object} options Parse options from the cli
54
54
  */
55
- export function createNodejsBom(path: string, options: any): Promise<any>;
55
+ export function createNodejsBom(path: string, options: Object): Promise<Object>;
56
56
  /**
57
57
  * Function to create bom string for Projects that use Pixi package manager.
58
58
  * createPixiBom is based on createPythonBom.
@@ -64,161 +64,161 @@ export function createNodejsBom(path: string, options: any): Promise<any>;
64
64
  * @param {String} path
65
65
  * @param {Object} options
66
66
  */
67
- export function createPixiBom(path: string, options: any): any;
67
+ export function createPixiBom(path: string, options: Object): Object | null;
68
68
  /**
69
69
  * Function to create bom string for Python projects
70
70
  *
71
71
  * @param {string} path to the project
72
72
  * @param {Object} options Parse options from the cli
73
73
  */
74
- export function createPythonBom(path: string, options: any): Promise<any>;
74
+ export function createPythonBom(path: string, options: Object): Promise<Object>;
75
75
  /**
76
76
  * Function to create bom string for Go projects
77
77
  *
78
78
  * @param {string} path to the project
79
79
  * @param {Object} options Parse options from the cli
80
80
  */
81
- export function createGoBom(path: string, options: any): Promise<any>;
81
+ export function createGoBom(path: string, options: Object): Promise<Object | undefined>;
82
82
  /**
83
83
  * Function to create bom string for Rust projects
84
84
  *
85
85
  * @param {string} path to the project
86
86
  * @param {Object} options Parse options from the cli
87
87
  */
88
- export function createRustBom(path: string, options: any): Promise<any>;
88
+ export function createRustBom(path: string, options: Object): Promise<Object | undefined>;
89
89
  /**
90
90
  * Function to create bom string for Dart projects
91
91
  *
92
92
  * @param {string} path to the project
93
93
  * @param {Object} options Parse options from the cli
94
94
  */
95
- export function createDartBom(path: string, options: any): Promise<any>;
95
+ export function createDartBom(path: string, options: Object): Promise<Object>;
96
96
  /**
97
97
  * Function to create bom string for cpp projects
98
98
  *
99
99
  * @param {string} path to the project
100
100
  * @param {Object} options Parse options from the cli
101
101
  */
102
- export function createCppBom(path: string, options: any): any;
102
+ export function createCppBom(path: string, options: Object): Object;
103
103
  /**
104
104
  * Function to create bom string for clojure projects
105
105
  *
106
106
  * @param {string} path to the project
107
107
  * @param {Object} options Parse options from the cli
108
108
  */
109
- export function createClojureBom(path: string, options: any): any;
109
+ export function createClojureBom(path: string, options: Object): Object;
110
110
  /**
111
111
  * Function to create bom string for Haskell projects
112
112
  *
113
113
  * @param {string} path to the project
114
114
  * @param {Object} options Parse options from the cli
115
115
  */
116
- export function createHaskellBom(path: string, options: any): any;
116
+ export function createHaskellBom(path: string, options: Object): Object;
117
117
  /**
118
118
  * Function to create bom string for Elixir projects
119
119
  *
120
120
  * @param {string} path to the project
121
121
  * @param {Object} options Parse options from the cli
122
122
  */
123
- export function createElixirBom(path: string, options: any): any;
123
+ export function createElixirBom(path: string, options: Object): Object;
124
124
  /**
125
125
  * Function to create bom string for GitHub action workflows
126
126
  *
127
127
  * @param {string} path to the project
128
128
  * @param {Object} options Parse options from the cli
129
129
  */
130
- export function createGitHubBom(path: string, options: any): any;
130
+ export function createGitHubBom(path: string, options: Object): Object;
131
131
  /**
132
132
  * Function to create bom string for cloudbuild yaml
133
133
  *
134
134
  * @param {string} path to the project
135
135
  * @param {Object} options Parse options from the cli
136
136
  */
137
- export function createCloudBuildBom(path: string, options: any): any;
137
+ export function createCloudBuildBom(path: string, options: Object): Object;
138
138
  /**
139
139
  * Function to create obom string for the current OS using osquery
140
140
  *
141
141
  * @param {string} _path to the project
142
142
  * @param {Object} options Parse options from the cli
143
143
  */
144
- export function createOSBom(_path: string, options: any): Promise<any>;
144
+ export function createOSBom(_path: string, options: Object): Promise<Object>;
145
145
  /**
146
146
  * Function to create bom string for Jenkins plugins
147
147
  *
148
148
  * @param {string} path to the project
149
149
  * @param {Object} options Parse options from the cli
150
150
  */
151
- export function createJenkinsBom(path: string, options: any): Promise<any>;
151
+ export function createJenkinsBom(path: string, options: Object): Promise<Object>;
152
152
  /**
153
153
  * Function to create bom string for Helm charts
154
154
  *
155
155
  * @param {string} path to the project
156
156
  * @param {Object} options Parse options from the cli
157
157
  */
158
- export function createHelmBom(path: string, options: any): any;
158
+ export function createHelmBom(path: string, options: Object): Object;
159
159
  /**
160
160
  * Function to create bom string for swift projects
161
161
  *
162
162
  * @param {string} path to the project
163
163
  * @param {Object} options Parse options from the cli
164
164
  */
165
- export function createSwiftBom(path: string, options: any): Promise<any>;
165
+ export function createSwiftBom(path: string, options: Object): Promise<Object>;
166
166
  /**
167
167
  * Function to create bom string for cocoa projects
168
168
  *
169
169
  * @param {string} path to the project
170
170
  * @param {Object} options Parse options from the cli
171
171
  */
172
- export function createCocoaBom(path: string, options: any): Promise<any>;
172
+ export function createCocoaBom(path: string, options: Object): Promise<Object | undefined>;
173
173
  /**
174
174
  * Function to create bom string for Nix flakes
175
175
  *
176
176
  * @param {string} path to the project
177
177
  * @param {Object} options Parse options from the cli
178
178
  */
179
- export function createNixBom(path: string, options: any): Promise<any>;
179
+ export function createNixBom(path: string, options: Object): Promise<Object>;
180
180
  /**
181
181
  * Function to create bom string for caxa SEA binaries
182
182
  *
183
183
  * @param {string} path to the project
184
184
  * @param {Object} options Parse options from the cli
185
185
  */
186
- export function createCaxaBom(path: string, options: any): Promise<any>;
186
+ export function createCaxaBom(path: string, options: Object): Promise<Object>;
187
187
  /**
188
188
  * Function to create bom string for docker compose
189
189
  *
190
190
  * @param {string} path to the project
191
191
  * @param {Object} options Parse options from the cli
192
192
  */
193
- export function createContainerSpecLikeBom(path: string, options: any): any;
193
+ export function createContainerSpecLikeBom(path: string, options: Object): any;
194
194
  /**
195
195
  * Function to create bom string for php projects
196
196
  *
197
197
  * @param {string} path to the project
198
198
  * @param {Object} options Parse options from the cli
199
199
  */
200
- export function createPHPBom(path: string, options: any): any;
200
+ export function createPHPBom(path: string, options: Object): Object;
201
201
  /**
202
202
  * Function to create bom string for ruby projects
203
203
  *
204
204
  * @param {string} path to the project
205
205
  * @param {Object} options Parse options from the cli
206
206
  */
207
- export function createRubyBom(path: string, options: any): Promise<any>;
207
+ export function createRubyBom(path: string, options: Object): Promise<Object>;
208
208
  /**
209
209
  * Function to create bom string for csharp projects
210
210
  *
211
211
  * @param {string} path to the project
212
212
  * @param {Object} options Parse options from the cli
213
213
  */
214
- export function createCsharpBom(path: string, options: any): Promise<any>;
214
+ export function createCsharpBom(path: string, options: Object): Promise<Object | undefined>;
215
215
  /**
216
216
  * Function to create bom object for cryptographic certificate files
217
217
  *
218
218
  * @param {string} path to the project
219
219
  * @param {Object} options Parse options from the cli
220
220
  */
221
- export function createCryptoCertsBom(path: string, options: any): Promise<{
221
+ export function createCryptoCertsBom(path: string, options: Object): Promise<{
222
222
  bomJson: {
223
223
  components: {
224
224
  name: any;
@@ -241,11 +241,11 @@ export function createCryptoCertsBom(path: string, options: any): Promise<{
241
241
  }>;
242
242
  export function mergeDependencies(dependencies: any, newDependencies: any, parentComponent?: {}): ({
243
243
  ref: string;
244
- dependsOn: any;
245
- provides: any;
244
+ dependsOn: any[];
245
+ provides: any[];
246
246
  } | {
247
247
  ref: string;
248
- dependsOn: any;
248
+ dependsOn: any[];
249
249
  provides?: undefined;
250
250
  })[];
251
251
  /**
@@ -266,28 +266,28 @@ export function trimComponents(components: any[]): any[];
266
266
  *
267
267
  * @returns {Object} Object including BOM Json
268
268
  */
269
- export function dedupeBom(options: any, components: any[], parentComponent: any, dependencies: any[]): any;
269
+ export function dedupeBom(options: Object, components: any[], parentComponent: Object, dependencies: any[]): Object;
270
270
  /**
271
271
  * Function to create bom string for all languages
272
272
  *
273
273
  * @param {string[]} pathList list of to the project
274
274
  * @param {Object} options Parse options from the cli
275
275
  */
276
- export function createMultiXBom(pathList: string[], options: any): Promise<any>;
276
+ export function createMultiXBom(pathList: string[], options: Object): Promise<Object>;
277
277
  /**
278
278
  * Function to create bom string for various languages
279
279
  *
280
280
  * @param {string} path to the project
281
281
  * @param {Object} options Parse options from the cli
282
282
  */
283
- export function createXBom(path: string, options: any): Promise<any>;
283
+ export function createXBom(path: string, options: Object): Promise<any>;
284
284
  /**
285
285
  * Function to create bom string for various languages
286
286
  *
287
287
  * @param {string} path to the project
288
288
  * @param {Object} options Parse options from the cli
289
289
  */
290
- export function createBom(path: string, options: any): any;
290
+ export function createBom(path: string, options: Object): any;
291
291
  /**
292
292
  * Method to submit the generated bom to dependency-track or cyclonedx server
293
293
  *
@@ -296,7 +296,7 @@ export function createBom(path: string, options: any): any;
296
296
  * @return {Promise<{ token: string } | undefined>} a promise with a token (if request was successful) or undefined (in case of invalid arguments)
297
297
  * @throws {Error} if the request fails
298
298
  */
299
- export function submitBom(args: any, bomContents: any): Promise<{
299
+ export function submitBom(args: Object, bomContents: Object): Promise<{
300
300
  token: string;
301
301
  } | undefined>;
302
302
  //# sourceMappingURL=index.d.ts.map