@cyclonedx/cdxgen 12.3.0 → 12.3.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 +15 -5
- package/bin/audit.js +7 -0
- package/bin/cdxgen.js +241 -81
- package/bin/repl.js +138 -0
- package/data/rules/ai-agent-governance.yaml +249 -0
- package/data/rules/dependency-sources.yaml +41 -0
- package/data/rules/mcp-servers.yaml +304 -0
- package/data/rules/package-integrity.yaml +123 -0
- package/lib/audit/index.js +353 -29
- package/lib/audit/index.poku.js +247 -7
- package/lib/audit/reporters.js +26 -0
- package/lib/audit/scoring.js +262 -13
- package/lib/audit/scoring.poku.js +179 -0
- package/lib/audit/targets.js +391 -2
- package/lib/audit/targets.poku.js +416 -3
- package/lib/cli/index.js +588 -45
- package/lib/cli/index.poku.js +735 -1
- package/lib/evinser/evinser.js +8 -5
- package/lib/helpers/agentFormulationParser.js +318 -0
- package/lib/helpers/aiInventory.js +262 -0
- package/lib/helpers/aiInventory.poku.js +111 -0
- package/lib/helpers/analyzer.js +1769 -0
- package/lib/helpers/analyzer.poku.js +284 -3
- package/lib/helpers/auditCategories.js +76 -0
- package/lib/helpers/ciParsers/githubActions.js +140 -16
- package/lib/helpers/ciParsers/githubActions.poku.js +110 -0
- package/lib/helpers/communityAiConfigParser.js +672 -0
- package/lib/helpers/communityAiConfigParser.poku.js +63 -0
- package/lib/helpers/depsUtils.js +108 -0
- package/lib/helpers/depsUtils.poku.js +72 -1
- package/lib/helpers/display.js +325 -3
- package/lib/helpers/display.poku.js +301 -0
- package/lib/helpers/formulationParsers.js +28 -0
- package/lib/helpers/formulationParsers.poku.js +504 -1
- package/lib/helpers/jsonLike.js +102 -0
- package/lib/helpers/jsonLike.poku.js +34 -0
- package/lib/helpers/mcp.js +248 -0
- package/lib/helpers/mcp.poku.js +101 -0
- package/lib/helpers/mcpConfigParser.js +656 -0
- package/lib/helpers/mcpConfigParser.poku.js +126 -0
- package/lib/helpers/mcpDiscovery.js +84 -0
- package/lib/helpers/mcpDiscovery.poku.js +21 -0
- package/lib/helpers/protobom.js +3 -3
- package/lib/helpers/provenanceUtils.js +29 -4
- package/lib/helpers/provenanceUtils.poku.js +29 -3
- package/lib/helpers/registryProvenance.js +210 -0
- package/lib/helpers/registryProvenance.poku.js +144 -0
- package/lib/helpers/rustFormulationParser.js +330 -0
- package/lib/helpers/source.js +21 -2
- package/lib/helpers/source.poku.js +38 -0
- package/lib/helpers/utils.js +1331 -83
- package/lib/helpers/utils.poku.js +599 -188
- package/lib/helpers/vsixutils.js +12 -4
- package/lib/helpers/vsixutils.poku.js +34 -0
- package/lib/managers/binary.js +36 -12
- package/lib/managers/binary.poku.js +68 -0
- package/lib/managers/docker.js +59 -9
- package/lib/managers/docker.poku.js +61 -0
- package/lib/managers/piptree.js +12 -7
- package/lib/managers/piptree.poku.js +44 -0
- package/lib/stages/postgen/annotator.js +2 -1
- package/lib/stages/postgen/annotator.poku.js +15 -0
- package/lib/stages/postgen/auditBom.js +20 -6
- package/lib/stages/postgen/auditBom.poku.js +694 -1
- package/lib/stages/postgen/postgen.js +262 -11
- package/lib/stages/postgen/postgen.poku.js +306 -2
- package/lib/stages/postgen/ruleEngine.js +49 -1
- package/lib/stages/postgen/spdxConverter.poku.js +70 -0
- package/lib/stages/pregen/pregen.js +6 -4
- package/package.json +1 -1
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/audit/reporters.d.ts.map +1 -1
- package/types/lib/audit/scoring.d.ts.map +1 -1
- package/types/lib/audit/targets.d.ts +12 -0
- package/types/lib/audit/targets.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts +2 -8
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/helpers/agentFormulationParser.d.ts +19 -0
- package/types/lib/helpers/agentFormulationParser.d.ts.map +1 -0
- package/types/lib/helpers/aiInventory.d.ts +23 -0
- package/types/lib/helpers/aiInventory.d.ts.map +1 -0
- package/types/lib/helpers/analyzer.d.ts +10 -0
- package/types/lib/helpers/analyzer.d.ts.map +1 -1
- package/types/lib/helpers/auditCategories.d.ts +12 -0
- package/types/lib/helpers/auditCategories.d.ts.map +1 -0
- package/types/lib/helpers/ciParsers/githubActions.d.ts.map +1 -1
- package/types/lib/helpers/communityAiConfigParser.d.ts +29 -0
- package/types/lib/helpers/communityAiConfigParser.d.ts.map +1 -0
- package/types/lib/helpers/depsUtils.d.ts +8 -0
- package/types/lib/helpers/depsUtils.d.ts.map +1 -1
- package/types/lib/helpers/display.d.ts +17 -1
- package/types/lib/helpers/display.d.ts.map +1 -1
- package/types/lib/helpers/formulationParsers.d.ts.map +1 -1
- package/types/lib/helpers/jsonLike.d.ts +4 -0
- package/types/lib/helpers/jsonLike.d.ts.map +1 -0
- package/types/lib/helpers/mcp.d.ts +29 -0
- package/types/lib/helpers/mcp.d.ts.map +1 -0
- package/types/lib/helpers/mcpConfigParser.d.ts +30 -0
- package/types/lib/helpers/mcpConfigParser.d.ts.map +1 -0
- package/types/lib/helpers/mcpDiscovery.d.ts +5 -0
- package/types/lib/helpers/mcpDiscovery.d.ts.map +1 -0
- package/types/lib/helpers/provenanceUtils.d.ts +5 -3
- package/types/lib/helpers/provenanceUtils.d.ts.map +1 -1
- package/types/lib/helpers/registryProvenance.d.ts +9 -0
- package/types/lib/helpers/registryProvenance.d.ts.map +1 -1
- package/types/lib/helpers/rustFormulationParser.d.ts +17 -0
- package/types/lib/helpers/rustFormulationParser.d.ts.map +1 -0
- package/types/lib/helpers/source.d.ts.map +1 -1
- package/types/lib/helpers/utils.d.ts +31 -1
- package/types/lib/helpers/utils.d.ts.map +1 -1
- package/types/lib/helpers/vsixutils.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/types/lib/managers/piptree.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
existsSync,
|
|
3
|
+
mkdirSync,
|
|
4
|
+
readFileSync,
|
|
5
|
+
rmSync,
|
|
6
|
+
writeFileSync,
|
|
7
|
+
} from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
2
10
|
|
|
3
11
|
import { assert, it } from "poku";
|
|
4
12
|
|
|
5
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
getRecordedActivities,
|
|
15
|
+
resetRecordedActivities,
|
|
16
|
+
setDryRunMode,
|
|
17
|
+
} from "../../helpers/utils.js";
|
|
18
|
+
import {
|
|
19
|
+
cleanupEnv,
|
|
20
|
+
cleanupTmpDir,
|
|
21
|
+
filterBom,
|
|
22
|
+
postProcess,
|
|
23
|
+
} from "./postgen.js";
|
|
6
24
|
|
|
7
25
|
it("filter bom tests", () => {
|
|
8
26
|
const bomJson = JSON.parse(
|
|
@@ -70,6 +88,70 @@ it("filter bom tests2", () => {
|
|
|
70
88
|
]);
|
|
71
89
|
});
|
|
72
90
|
|
|
91
|
+
it("exclude-type mcp removes inventory artifacts but retains MCP SDK packages", () => {
|
|
92
|
+
const bomJson = {
|
|
93
|
+
components: [
|
|
94
|
+
{
|
|
95
|
+
"bom-ref": "pkg:npm/%40modelcontextprotocol/server-filesystem@1.0.0",
|
|
96
|
+
name: "@modelcontextprotocol/server-filesystem",
|
|
97
|
+
purl: "pkg:npm/%40modelcontextprotocol/server-filesystem@1.0.0",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"bom-ref": "file:/repo/.vscode/mcp.json",
|
|
101
|
+
name: "mcp.json",
|
|
102
|
+
properties: [{ name: "cdx:file:kind", value: "mcp-config" }],
|
|
103
|
+
type: "file",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"bom-ref": "urn:mcp:tool:docs:search",
|
|
107
|
+
name: "search",
|
|
108
|
+
properties: [
|
|
109
|
+
{ name: "cdx:mcp:role", value: "tool" },
|
|
110
|
+
{
|
|
111
|
+
name: "cdx:mcp:serviceRef",
|
|
112
|
+
value: "urn:service:mcp:docs:latest",
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
type: "application",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
dependencies: [
|
|
119
|
+
{
|
|
120
|
+
dependsOn: ["urn:mcp:tool:docs:search"],
|
|
121
|
+
ref: "urn:service:mcp:docs:latest",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
provides: ["urn:mcp:tool:docs:search"],
|
|
125
|
+
ref: "pkg:npm/%40modelcontextprotocol/server-filesystem@1.0.0",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
metadata: { properties: [] },
|
|
129
|
+
services: [
|
|
130
|
+
{
|
|
131
|
+
"bom-ref": "urn:service:mcp:docs:latest",
|
|
132
|
+
group: "mcp",
|
|
133
|
+
name: "docs",
|
|
134
|
+
properties: [{ name: "cdx:mcp:inventorySource", value: "config-file" }],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const filteredBom = filterBom(bomJson, { excludeType: ["mcp"] });
|
|
140
|
+
|
|
141
|
+
assert.deepStrictEqual(
|
|
142
|
+
filteredBom.components.map((component) => component["bom-ref"]),
|
|
143
|
+
["pkg:npm/%40modelcontextprotocol/server-filesystem@1.0.0"],
|
|
144
|
+
);
|
|
145
|
+
assert.deepStrictEqual(filteredBom.services, []);
|
|
146
|
+
assert.deepStrictEqual(filteredBom.dependencies, [
|
|
147
|
+
{
|
|
148
|
+
dependsOn: [],
|
|
149
|
+
provides: [],
|
|
150
|
+
ref: "pkg:npm/%40modelcontextprotocol/server-filesystem@1.0.0",
|
|
151
|
+
},
|
|
152
|
+
]);
|
|
153
|
+
});
|
|
154
|
+
|
|
73
155
|
it("postProcess adds formulation exactly once when includeFormulation is true", () => {
|
|
74
156
|
const bomNSData = {
|
|
75
157
|
bomJson: {
|
|
@@ -159,6 +241,90 @@ it("postProcess passes formulationList from bomNSData into the formulation secti
|
|
|
159
241
|
);
|
|
160
242
|
});
|
|
161
243
|
|
|
244
|
+
it("postProcess merges formulation-discovered MCP config services into bomJson.services", () => {
|
|
245
|
+
const tmpDir = join(tmpdir(), `cdxgen-postgen-${Date.now()}`);
|
|
246
|
+
mkdirSync(join(tmpDir, ".vscode"), { recursive: true });
|
|
247
|
+
writeFileSync(
|
|
248
|
+
join(tmpDir, ".vscode", "mcp.json"),
|
|
249
|
+
JSON.stringify({
|
|
250
|
+
mcpServers: {
|
|
251
|
+
gateway: {
|
|
252
|
+
endpoint: "https://demo.ngrok-free.app/mcp",
|
|
253
|
+
transport: "http",
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
257
|
+
);
|
|
258
|
+
const bomNSData = {
|
|
259
|
+
bomJson: {
|
|
260
|
+
bomFormat: "CycloneDX",
|
|
261
|
+
specVersion: "1.7",
|
|
262
|
+
components: [],
|
|
263
|
+
dependencies: [],
|
|
264
|
+
metadata: {
|
|
265
|
+
properties: [],
|
|
266
|
+
tools: {
|
|
267
|
+
components: [
|
|
268
|
+
{ group: "@cyclonedx", name: "cdxgen", version: "test" },
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
const options = { includeFormulation: true, specVersion: 1.7 };
|
|
275
|
+
try {
|
|
276
|
+
const result = postProcess(bomNSData, options, tmpDir);
|
|
277
|
+
assert.ok(
|
|
278
|
+
result.bomJson.services?.some(
|
|
279
|
+
(service) =>
|
|
280
|
+
service.name === "gateway" &&
|
|
281
|
+
service.properties?.some(
|
|
282
|
+
(property) =>
|
|
283
|
+
property.name === "cdx:mcp:inventorySource" &&
|
|
284
|
+
property.value === "config-file",
|
|
285
|
+
),
|
|
286
|
+
),
|
|
287
|
+
"expected config-discovered MCP service to be merged into bomJson.services",
|
|
288
|
+
);
|
|
289
|
+
} finally {
|
|
290
|
+
rmSync(tmpDir, { force: true, recursive: true });
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
it("postProcess labels formulation execute activities with the Formulation type", () => {
|
|
295
|
+
const bomNSData = {
|
|
296
|
+
bomJson: {
|
|
297
|
+
bomFormat: "CycloneDX",
|
|
298
|
+
specVersion: "1.5",
|
|
299
|
+
components: [],
|
|
300
|
+
dependencies: [],
|
|
301
|
+
metadata: { properties: [] },
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
const options = { includeFormulation: true, specVersion: 1.5 };
|
|
305
|
+
setDryRunMode(true);
|
|
306
|
+
resetRecordedActivities();
|
|
307
|
+
try {
|
|
308
|
+
postProcess(bomNSData, options, "/home/runner/work/cdxgen/cdxgen");
|
|
309
|
+
const executeActivities = getRecordedActivities().filter(
|
|
310
|
+
(activity) => activity.kind === "execute",
|
|
311
|
+
);
|
|
312
|
+
assert.ok(
|
|
313
|
+
executeActivities.length > 0,
|
|
314
|
+
"expected formulation generation to record execute activities in dry-run mode",
|
|
315
|
+
);
|
|
316
|
+
assert.ok(
|
|
317
|
+
executeActivities.every(
|
|
318
|
+
(activity) => activity.projectType === "Formulation",
|
|
319
|
+
),
|
|
320
|
+
"formulation execute activities should be labeled with the Formulation type",
|
|
321
|
+
);
|
|
322
|
+
} finally {
|
|
323
|
+
setDryRunMode(false);
|
|
324
|
+
resetRecordedActivities();
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
162
328
|
it("postProcess attaches releaseNotes to cdxgen metadata tool component", () => {
|
|
163
329
|
const bomNSData = {
|
|
164
330
|
bomJson: {
|
|
@@ -205,3 +371,141 @@ it("postProcess attaches releaseNotes to cdxgen metadata tool component", () =>
|
|
|
205
371
|
assert.ok(aresolve.description);
|
|
206
372
|
}
|
|
207
373
|
});
|
|
374
|
+
|
|
375
|
+
it("postProcess fails for weak TLP when sensitive property values are present", () => {
|
|
376
|
+
const bomNSData = {
|
|
377
|
+
bomJson: {
|
|
378
|
+
bomFormat: "CycloneDX",
|
|
379
|
+
specVersion: "1.7",
|
|
380
|
+
components: [
|
|
381
|
+
{
|
|
382
|
+
"bom-ref": "urn:service:mcp:gateway:latest",
|
|
383
|
+
name: "gateway",
|
|
384
|
+
properties: [
|
|
385
|
+
{
|
|
386
|
+
name: "cdx:mcp:configuredEndpoints",
|
|
387
|
+
value:
|
|
388
|
+
"https://user:pass@example.com/mcp?access_token=abc123456789",
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
type: "application",
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
dependencies: [],
|
|
395
|
+
metadata: {
|
|
396
|
+
distributionConstraints: { tlp: "CLEAR" },
|
|
397
|
+
properties: [],
|
|
398
|
+
tools: {
|
|
399
|
+
components: [
|
|
400
|
+
{ group: "@cyclonedx", name: "cdxgen", version: "test" },
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
assert.throws(
|
|
407
|
+
() => postProcess(bomNSData, { failOnError: true, specVersion: 1.7 }),
|
|
408
|
+
/TLP classification 'CLEAR'/,
|
|
409
|
+
);
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
it("postProcess allows sensitive property values when TLP is strong", () => {
|
|
413
|
+
const bomNSData = {
|
|
414
|
+
bomJson: {
|
|
415
|
+
bomFormat: "CycloneDX",
|
|
416
|
+
specVersion: "1.7",
|
|
417
|
+
components: [
|
|
418
|
+
{
|
|
419
|
+
"bom-ref": "urn:service:mcp:gateway:latest",
|
|
420
|
+
name: "gateway",
|
|
421
|
+
properties: [
|
|
422
|
+
{
|
|
423
|
+
name: "cdx:mcp:command",
|
|
424
|
+
value: "Authorization: Bearer super-secret-token-value",
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
type: "application",
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
dependencies: [],
|
|
431
|
+
metadata: {
|
|
432
|
+
distributionConstraints: { tlp: "RED" },
|
|
433
|
+
properties: [],
|
|
434
|
+
tools: {
|
|
435
|
+
components: [
|
|
436
|
+
{ group: "@cyclonedx", name: "cdxgen", version: "test" },
|
|
437
|
+
],
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
};
|
|
442
|
+
const result = postProcess(bomNSData, {
|
|
443
|
+
failOnError: true,
|
|
444
|
+
specVersion: 1.7,
|
|
445
|
+
});
|
|
446
|
+
assert.strictEqual(
|
|
447
|
+
result.bomJson.metadata.distributionConstraints.tlp,
|
|
448
|
+
"RED",
|
|
449
|
+
);
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
it("postProcess does not enforce TLP validation when no TLP is set", () => {
|
|
453
|
+
const bomNSData = {
|
|
454
|
+
bomJson: {
|
|
455
|
+
bomFormat: "CycloneDX",
|
|
456
|
+
specVersion: "1.7",
|
|
457
|
+
components: [
|
|
458
|
+
{
|
|
459
|
+
"bom-ref": "urn:service:mcp:gateway:latest",
|
|
460
|
+
name: "gateway",
|
|
461
|
+
properties: [
|
|
462
|
+
{
|
|
463
|
+
name: "cdx:mcp:resourceUri",
|
|
464
|
+
value: "https://user:pass@example.com/private#fragment",
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
type: "application",
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
dependencies: [],
|
|
471
|
+
metadata: {
|
|
472
|
+
properties: [],
|
|
473
|
+
tools: {
|
|
474
|
+
components: [
|
|
475
|
+
{ group: "@cyclonedx", name: "cdxgen", version: "test" },
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
const result = postProcess(bomNSData, {
|
|
482
|
+
failOnError: true,
|
|
483
|
+
specVersion: 1.7,
|
|
484
|
+
});
|
|
485
|
+
assert.strictEqual(
|
|
486
|
+
result.bomJson.metadata.distributionConstraints,
|
|
487
|
+
undefined,
|
|
488
|
+
);
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
it("cleanup helpers do not delete directories in dry-run mode", () => {
|
|
492
|
+
const pipTarget = join(tmpdir(), `cdxgen-pip-${Date.now()}`);
|
|
493
|
+
const tmpDir = join(tmpdir(), `cdxgen-tmp-${Date.now()}`);
|
|
494
|
+
mkdirSync(pipTarget, { recursive: true });
|
|
495
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
496
|
+
process.env.PIP_TARGET = pipTarget;
|
|
497
|
+
process.env.CDXGEN_TMP_DIR = tmpDir;
|
|
498
|
+
setDryRunMode(true);
|
|
499
|
+
try {
|
|
500
|
+
cleanupEnv({});
|
|
501
|
+
cleanupTmpDir();
|
|
502
|
+
assert.ok(existsSync(pipTarget));
|
|
503
|
+
assert.ok(existsSync(tmpDir));
|
|
504
|
+
} finally {
|
|
505
|
+
setDryRunMode(false);
|
|
506
|
+
delete process.env.PIP_TARGET;
|
|
507
|
+
delete process.env.CDXGEN_TMP_DIR;
|
|
508
|
+
rmSync(pipTarget, { recursive: true, force: true });
|
|
509
|
+
rmSync(tmpDir, { recursive: true, force: true });
|
|
510
|
+
}
|
|
511
|
+
});
|
|
@@ -77,6 +77,31 @@ function getAuditWorkflows(bomJson) {
|
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
function flattenServices(services, result = []) {
|
|
81
|
+
if (!Array.isArray(services)) {
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
for (const service of services) {
|
|
85
|
+
if (!service) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
result.push(service);
|
|
89
|
+
if (Array.isArray(service.services) && service.services.length) {
|
|
90
|
+
flattenServices(service.services, result);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getAuditServices(bomJson) {
|
|
97
|
+
const formulationServices = getFormulationEntries(bomJson).flatMap(
|
|
98
|
+
(entry) => entry?.services || [],
|
|
99
|
+
);
|
|
100
|
+
return dedupeObjectsByIdentity(
|
|
101
|
+
flattenServices([...(bomJson?.services || []), ...formulationServices]),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
80
105
|
function normalizeAttackMetadata(rule) {
|
|
81
106
|
const tactics = Array.isArray(rule?.attack?.tactics)
|
|
82
107
|
? rule.attack.tactics
|
|
@@ -94,6 +119,23 @@ function normalizeAttackMetadata(rule) {
|
|
|
94
119
|
};
|
|
95
120
|
}
|
|
96
121
|
|
|
122
|
+
function normalizeStandardsMetadata(rule) {
|
|
123
|
+
if (!rule?.standards || typeof rule.standards !== "object") {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
const normalized = {};
|
|
127
|
+
for (const [standardName, entries] of Object.entries(rule.standards)) {
|
|
128
|
+
const values = Array.isArray(entries) ? entries : [entries];
|
|
129
|
+
const filtered = values
|
|
130
|
+
.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
131
|
+
.map((value) => value.trim());
|
|
132
|
+
if (filtered.length) {
|
|
133
|
+
normalized[standardName] = filtered;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return Object.keys(normalized).length ? normalized : undefined;
|
|
137
|
+
}
|
|
138
|
+
|
|
97
139
|
/**
|
|
98
140
|
* Helper: Check if property exists and equals expected value
|
|
99
141
|
* Usage: $hasProp(component, 'cdx:foo', 'bar')
|
|
@@ -211,6 +253,9 @@ function registerCdxHelpers(expression) {
|
|
|
211
253
|
expression.registerFunction("auditWorkflows", (bomJson) =>
|
|
212
254
|
getAuditWorkflows(bomJson),
|
|
213
255
|
);
|
|
256
|
+
expression.registerFunction("auditServices", (bomJson) =>
|
|
257
|
+
getAuditServices(bomJson),
|
|
258
|
+
);
|
|
214
259
|
expression.registerFunction("formulationComponents", (bomJson) =>
|
|
215
260
|
getFormulationComponents(bomJson),
|
|
216
261
|
);
|
|
@@ -361,13 +406,15 @@ export async function evaluateRule(rule, bomJson) {
|
|
|
361
406
|
}
|
|
362
407
|
for (const item of matches) {
|
|
363
408
|
const attack = normalizeAttackMetadata(rule);
|
|
409
|
+
const standards = normalizeStandardsMetadata(rule);
|
|
364
410
|
const context = {
|
|
365
411
|
...item,
|
|
366
412
|
bom: bomJson,
|
|
367
413
|
components: getAuditComponents(bomJson),
|
|
368
414
|
workflows: getAuditWorkflows(bomJson),
|
|
415
|
+
auditServices: getAuditServices(bomJson),
|
|
369
416
|
formulationComponents: getFormulationComponents(bomJson),
|
|
370
|
-
services: bomJson
|
|
417
|
+
services: getAuditServices(bomJson),
|
|
371
418
|
metadata: bomJson.metadata || {},
|
|
372
419
|
};
|
|
373
420
|
const message = await interpolateTemplate(rule.message, context);
|
|
@@ -405,6 +452,7 @@ export async function evaluateRule(rule, bomJson) {
|
|
|
405
452
|
attack,
|
|
406
453
|
attackTactics: attack.tactics,
|
|
407
454
|
attackTechniques: attack.techniques,
|
|
455
|
+
standards,
|
|
408
456
|
ruleId: rule.id,
|
|
409
457
|
name: rule.name || rule.id,
|
|
410
458
|
description: rule.description,
|
|
@@ -247,6 +247,76 @@ describe("convertCycloneDxToSpdx", () => {
|
|
|
247
247
|
);
|
|
248
248
|
});
|
|
249
249
|
|
|
250
|
+
it("preserves MCP services and community skill components in SPDX export extensions", () => {
|
|
251
|
+
const bom = sampleBom();
|
|
252
|
+
bom.services = [
|
|
253
|
+
{
|
|
254
|
+
"bom-ref": "urn:service:mcp:remoteDocs:configured",
|
|
255
|
+
name: "remoteDocs",
|
|
256
|
+
endpoints: ["https://docs.example.com/mcp"],
|
|
257
|
+
properties: [
|
|
258
|
+
{ name: "cdx:mcp:inventorySource", value: "config-file" },
|
|
259
|
+
{ name: "cdx:mcp:configFormat", value: "opencode" },
|
|
260
|
+
{ name: "cdx:mcp:authPosture", value: "oauth" },
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
];
|
|
264
|
+
bom.formulation[0].components = [
|
|
265
|
+
{
|
|
266
|
+
type: "file",
|
|
267
|
+
name: "SKILL.md",
|
|
268
|
+
"bom-ref": "file:/repo/.opencode/skills/git-release/SKILL.md",
|
|
269
|
+
properties: [
|
|
270
|
+
{ name: "cdx:file:kind", value: "skill-file" },
|
|
271
|
+
{ name: "cdx:skill:name", value: "git-release" },
|
|
272
|
+
{
|
|
273
|
+
name: "cdx:skill:description",
|
|
274
|
+
value: "Prepare consistent releases",
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
];
|
|
279
|
+
|
|
280
|
+
const spdxJson = convertCycloneDxToSpdx(bom, {
|
|
281
|
+
projectName: "demo-app",
|
|
282
|
+
});
|
|
283
|
+
const documentElement = spdxJson["@graph"].find(
|
|
284
|
+
(element) => element.type === "SpdxDocument",
|
|
285
|
+
);
|
|
286
|
+
assert.ok(documentElement);
|
|
287
|
+
const documentExtensionProperties =
|
|
288
|
+
getExtensionPropertyMap(documentElement);
|
|
289
|
+
assert.strictEqual(
|
|
290
|
+
documentExtensionProperties.get("services"),
|
|
291
|
+
JSON.stringify(bom.services),
|
|
292
|
+
);
|
|
293
|
+
const serviceElement = spdxJson["@graph"].find(
|
|
294
|
+
(element) =>
|
|
295
|
+
getExtensionPropertyMap(element).get("bomRef") ===
|
|
296
|
+
"urn:service:mcp:remoteDocs:configured",
|
|
297
|
+
);
|
|
298
|
+
assert.ok(
|
|
299
|
+
serviceElement,
|
|
300
|
+
"expected synthetic SPDX element for MCP service",
|
|
301
|
+
);
|
|
302
|
+
assert.strictEqual(
|
|
303
|
+
getExtensionPropertyMap(serviceElement).get(
|
|
304
|
+
"properties.cdx:mcp:inventorySource",
|
|
305
|
+
),
|
|
306
|
+
"config-file",
|
|
307
|
+
);
|
|
308
|
+
const skillElement = spdxJson["@graph"].find(
|
|
309
|
+
(element) =>
|
|
310
|
+
getExtensionPropertyMap(element).get("bomRef") ===
|
|
311
|
+
"file:/repo/.opencode/skills/git-release/SKILL.md",
|
|
312
|
+
);
|
|
313
|
+
assert.ok(skillElement, "expected SPDX element for skill file component");
|
|
314
|
+
assert.strictEqual(
|
|
315
|
+
getExtensionPropertyMap(skillElement).get("properties.cdx:skill:name"),
|
|
316
|
+
"git-release",
|
|
317
|
+
);
|
|
318
|
+
});
|
|
319
|
+
|
|
250
320
|
it("omits document-level SPDX extensions while package-level metadata still enables the extension profile", () => {
|
|
251
321
|
const spdxJson = convertCycloneDxToSpdx(minimalBom(), {
|
|
252
322
|
projectName: "demo-app",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { arch, platform } from "node:os";
|
|
3
3
|
import { delimiter, dirname, join, resolve } from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
@@ -22,11 +22,13 @@ import {
|
|
|
22
22
|
getAllFiles,
|
|
23
23
|
getTmpDir,
|
|
24
24
|
hasAnyProjectType,
|
|
25
|
+
isDryRun,
|
|
25
26
|
isFeatureEnabled,
|
|
26
27
|
isMac,
|
|
27
28
|
isSecureMode,
|
|
28
29
|
isWin,
|
|
29
30
|
safeExistsSync,
|
|
31
|
+
safeMkdtempSync,
|
|
30
32
|
safeSpawnSync,
|
|
31
33
|
TIMEOUT_MS,
|
|
32
34
|
} from "../../helpers/utils.js";
|
|
@@ -38,7 +40,7 @@ import {
|
|
|
38
40
|
* @param {Object} options CLI options
|
|
39
41
|
*/
|
|
40
42
|
export function prepareEnv(filePath, options) {
|
|
41
|
-
if (!options.projectType || isSecureMode) {
|
|
43
|
+
if (!options.projectType || isSecureMode || isDryRun) {
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
for (const pt of options.projectType) {
|
|
@@ -109,7 +111,7 @@ export function preparePythonEnv(_filePath, options) {
|
|
|
109
111
|
options.projectType?.includes(pyversion) &&
|
|
110
112
|
!process.env.PIP_INSTALL_ARGS
|
|
111
113
|
) {
|
|
112
|
-
const tempDir =
|
|
114
|
+
const tempDir = safeMkdtempSync(join(getTmpDir(), "cdxgen-pip-"));
|
|
113
115
|
const py_version_number = pyversion.replace("python3", "3.");
|
|
114
116
|
process.env.PIP_INSTALL_ARGS = `--python-version ${py_version_number} --ignore-requires-python --no-warn-conflicts --only-binary=:all:`;
|
|
115
117
|
process.env.PIP_TARGET = tempDir;
|
|
@@ -400,7 +402,7 @@ export function prepareRubyEnv(filePath, options) {
|
|
|
400
402
|
process.env.CDXGEN_GEM_HOME ||
|
|
401
403
|
process.env.BUNDLE_PATH ||
|
|
402
404
|
process.env.GEM_HOME ||
|
|
403
|
-
|
|
405
|
+
safeMkdtempSync(join(getTmpDir(), "cdxgen-gem-home-"));
|
|
404
406
|
process.env.CDXGEN_GEM_HOME = cdxgenGemHome;
|
|
405
407
|
// Is there a .ruby-version file in the project?
|
|
406
408
|
if (safeExistsSync(join(filePath, ".ruby-version"))) {
|
package/package.json
CHANGED
package/types/bin/repl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../bin/repl.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../bin/repl.js"],"names":[],"mappings":";AA4OO,kDAwDN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/audit/index.js"],"names":[],"mappings":"AAyFA;;;;;GAKG;AACH,qCAHW,MAAM,GACJ,MAAM,CAclB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,GACJ,MAAM,EAAE,CAoBpB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,GACJ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;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M,CAAA;CAAE,CAqBhD;AAED;;;;;GAKG;AACH,2CAHW,MAAM,GACJ,MAAM,GAAG,SAAS,CAU9B;AAxpED,gDAKE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporters.d.ts","sourceRoot":"","sources":["../../../lib/audit/reporters.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reporters.d.ts","sourceRoot":"","sources":["../../../lib/audit/reporters.js"],"names":[],"mappings":"AAqaA,qEAkDC;AAED;;;;;GAKG;AACH,yCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;GAMG;AACH,4CAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAiDlB;AAED;;;;;;;GAOG;AACH,8CALW,MAAM,UACN,MAAM,YACN,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;;GAOG;AACH,oDALW,MAAM,WACN,MAAM,YACN,MAAM,GACJ,MAAM,EAAE,CAgFpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scoring.d.ts","sourceRoot":"","sources":["../../../lib/audit/scoring.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scoring.d.ts","sourceRoot":"","sources":["../../../lib/audit/scoring.js"],"names":[],"mappings":"AAoLA;;;;;GAKG;AACH,4CAHW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;GAMG;AACH,iDAJW,MAAM,aACN,MAAM,GACJ,OAAO,CAMnB;AAED;;;;;;;;;;GAUG;AACH,0CALW,MAAM,EAAE,UACR,MAAM,YACN,MAAM,GACJ,MAAM,CAoVlB"}
|
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
* @returns {boolean} true when the component is required for predictive audit selection
|
|
8
8
|
*/
|
|
9
9
|
export function isRequiredComponentScope(scope: string | undefined): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Enrich input BOM components with registry provenance/trusted-publishing
|
|
12
|
+
* metadata so audit target filtering can exclude trusted packages even when the
|
|
13
|
+
* input BOM was generated without --bom-audit.
|
|
14
|
+
*
|
|
15
|
+
* @param {{ source: string, bomJson: object }[]} inputBoms loaded input BOMs
|
|
16
|
+
* @returns {Promise<void>}
|
|
17
|
+
*/
|
|
18
|
+
export function enrichInputBomsWithRegistryMetadata(inputBoms: {
|
|
19
|
+
source: string;
|
|
20
|
+
bomJson: object;
|
|
21
|
+
}[]): Promise<void>;
|
|
10
22
|
/**
|
|
11
23
|
* Normalize package names for safe matching and grouping.
|
|
12
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../lib/audit/targets.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../lib/audit/targets.js"],"names":[],"mappings":"AA4CA;;;;;;;GAOG;AACH,gDAHW,MAAM,GAAG,SAAS,GAChB,OAAO,CAOnB;AAuOD;;;;;;;GAOG;AACH,+DAHW;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC,CA6EzB;AAkBD;;;;;GAKG;AACH,kDAHW,MAAM,GAAG,SAAS,GAChB,MAAM,CAOlB;AAED;;;;;;;GAOG;AACH,mDALW,MAAM,cACN,MAAM,YACN,MAAM,GAAG,MAAM,GAAG,SAAS,GACzB;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAmFpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,+CAfW;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,YACrC,MAAM,GAAG,MAAM,GAAG,SAAS,GACzB;IACR,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE;QACL,gBAAgB,EAAE,MAAM,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAyIH;AA7nBD,+CAA+D"}
|
package/types/lib/cli/index.d.ts
CHANGED
|
@@ -42,14 +42,7 @@ export function createBinaryBom(path: string, options: Object): Object | undefin
|
|
|
42
42
|
* @returns {Promise<Object>} Promise resolving to BOM object
|
|
43
43
|
*/
|
|
44
44
|
export function createJavaBom(path: string, options: Object): Promise<Object>;
|
|
45
|
-
|
|
46
|
-
* Function to create bom string for Node.js projects
|
|
47
|
-
*
|
|
48
|
-
* @param {string} path to the project
|
|
49
|
-
* @param {Object} options Parse options from the cli
|
|
50
|
-
* @returns {Promise<Object>} Promise resolving to BOM object
|
|
51
|
-
*/
|
|
52
|
-
export function createNodejsBom(path: string, options: Object): Promise<Object>;
|
|
45
|
+
export function createNodejsBom(path: any, options: any): Promise<Object>;
|
|
53
46
|
/**
|
|
54
47
|
* Function to create bom string for Projects that use Pixi package manager.
|
|
55
48
|
* createPixiBom is based on createPythonBom.
|
|
@@ -304,4 +297,5 @@ export function createBom(path: string, options: Object): Promise<Object>;
|
|
|
304
297
|
export function submitBom(args: Object, bomContents: Object): Promise<{
|
|
305
298
|
token: string;
|
|
306
299
|
} | undefined>;
|
|
300
|
+
export { summarizeAiInventory } from "../helpers/aiInventory.js";
|
|
307
301
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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":"AAg4BA;;;;;;;;;GASG;AACH,wCANW,MAAM,cACN,MAAM,OACN,MAAM,UACN,MAAM,GACJ,MAAM,EAAE,CAcpB;AAwb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,CAAC,MAAM,CAAC,CAi7B3B;AAED;;;;;;GAMG;AACH,iCAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmWrC;AAED;;;;;;GAMG;AACH,gCAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAoS3B;AAED;;;;;;;GAOG;AACH,gCALW,MAAM,eACN,MAAM,GACL,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAwGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../../../lib/evinser/evinser.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../../../lib/evinser/evinser.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,mCAFW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAyDhB;AAED,6GAiDC;AAED,gGAkCC;AAED,wGAqBC;AAED;;;;;;;;;;;;;;;;;;GAuKC;AAED,6EAuBC;AAED;;;EA8BC;AAcD;;;;;GAKG;AACH,yCAHW,MAAM,WACN,MAAM;;;;;;;;;;;;;;GA4KhB;AAED,wLA8DC;AAED;;;;;;;;;;;GAWG;AACH,2CARW,MAAM,uBACN,MAAM,0BAEN,MAAM,mBACN,MAAM,kBACN,MAAM,iBAqOhB;AAED;;;;;;;GAOG;AACH,yFAHW,MAAM,GACJ,MAAM,CAiGlB;AAyBD,sGAyEC;AAED,wGAmCC;AAED;;;;;;GAMG;AACH,mDAJW,MAAM,8BAEN,MAAM,uBA6DhB;AAED;;;;;;GAMG;AACH,gDAJW,MAAM,wCAEN,MAAM,QAkDhB;AAED,yEAWC;AAED,gEAsFC;AAED;;;;;;GAMG;AACH,iDAJW,MAAM,WACN,MAAM,OA2KhB;AAED;;;;;;;;;;GAUG;AACH,gDAPW,MAAM,uBACN,MAAM,iBACN,MAAM,YACN,MAAM,oBACN,MAAM,kBACN,MAAM,eAoHhB;AAED;;;;;;;GAOG;AACH,kDAHW,MAAM,mBACN,MAAM;;;;;;;;;;;;;EA4FhB;AAED;;;;;GAKG;AACH,kDAaC;AAED;;;;;GAKG;AACH,2CAHW,MAAM,UAKhB;AAED,gGAiDC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export namespace agentFormulationParser {
|
|
2
|
+
export let id: string;
|
|
3
|
+
export { AGENT_FILE_PATTERNS as patterns };
|
|
4
|
+
export function parse(files: any, _options?: {}): {
|
|
5
|
+
components: {
|
|
6
|
+
"bom-ref": string;
|
|
7
|
+
name: any;
|
|
8
|
+
properties: {
|
|
9
|
+
name: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}[];
|
|
12
|
+
type: string;
|
|
13
|
+
}[];
|
|
14
|
+
services: any[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const AGENT_FILE_PATTERNS: string[];
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=agentFormulationParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/helpers/agentFormulationParser.js"],"names":[],"mappings":";;;IA6IE;;;;;;;;;;;MA+KC;;AAjTH,4CASE"}
|