@greenarmor/ges 0.6.0 → 0.6.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/dist/commands/mcp-setup.js +17 -4
- package/dist/commands/scan.js +11 -3
- package/package.json +12 -12
|
@@ -44,7 +44,7 @@ const CLIENTS = [
|
|
|
44
44
|
path.join(".config", "opencode", "opencode.json"),
|
|
45
45
|
],
|
|
46
46
|
configKey: "mcp",
|
|
47
|
-
format: "
|
|
47
|
+
format: "opencode",
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
id: "crush",
|
|
@@ -66,14 +66,27 @@ const CLIENTS = [
|
|
|
66
66
|
},
|
|
67
67
|
];
|
|
68
68
|
function resolveServerPath() {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
const searchPaths = [
|
|
70
|
+
path.resolve(__dirname, "..", "..", "..", "mcp-server", "dist", "server.js"),
|
|
71
|
+
path.resolve(__dirname, "..", "..", "mcp-server", "dist", "server.js"),
|
|
72
|
+
path.resolve(__dirname, "..", "..", "mcp-server", "bundle", "server.js"),
|
|
73
|
+
];
|
|
74
|
+
for (const serverPath of searchPaths) {
|
|
75
|
+
if (fs.existsSync(serverPath)) {
|
|
76
|
+
return { command: "node", args: [serverPath] };
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
return { command: "npx", args: ["-y", "@greenarmor/ges-mcp-server"] };
|
|
74
80
|
}
|
|
75
81
|
function buildServerEntry(client) {
|
|
76
82
|
const { command, args } = resolveServerPath();
|
|
83
|
+
if (client.format === "opencode") {
|
|
84
|
+
return {
|
|
85
|
+
type: "local",
|
|
86
|
+
command: [command, ...args],
|
|
87
|
+
enabled: true,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
77
90
|
const entry = { command, args };
|
|
78
91
|
if (client.format === "servers" || client.format === "mcp") {
|
|
79
92
|
entry.type = "stdio";
|
package/dist/commands/scan.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ensureGESInitialized } from "../utils/project.js";
|
|
3
|
-
import {
|
|
3
|
+
import { runAllScansWithSbom, formatScanResults, formatSbomResults, detectProject } from "@greenarmor/ges-scanner-integration";
|
|
4
4
|
import { showNextStepsMenu } from "../utils/next-steps.js";
|
|
5
5
|
export const scanCommand = new Command("scan")
|
|
6
6
|
.description("Run security scans")
|
|
7
7
|
.option("--ci", "CI mode")
|
|
8
8
|
.action(async (options) => {
|
|
9
9
|
const root = ensureGESInitialized();
|
|
10
|
-
|
|
11
|
-
const
|
|
10
|
+
const detection = detectProject(root);
|
|
11
|
+
const detail = detection.ecosystem === "node" && detection.nodePackageManager
|
|
12
|
+
? `node (${detection.nodePackageManager})`
|
|
13
|
+
: detection.ecosystem === "python" && detection.pythonToolchain
|
|
14
|
+
? `python (${detection.pythonToolchain})`
|
|
15
|
+
: detection.ecosystem;
|
|
16
|
+
console.log(`\n Detected ecosystem: ${detail}`);
|
|
17
|
+
console.log(" Running security scans...\n");
|
|
18
|
+
const results = runAllScansWithSbom(detection);
|
|
12
19
|
console.log(formatScanResults(results));
|
|
20
|
+
console.log(formatSbomResults(results));
|
|
13
21
|
if (options.ci) {
|
|
14
22
|
const failed = results.filter(r => r.status === "fail");
|
|
15
23
|
if (failed.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greenarmor/ges",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Green Engineering Standard Framework - Compliance-as-Code CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"commander": "^13.0.0",
|
|
16
|
-
"@greenarmor/ges-
|
|
17
|
-
"@greenarmor/ges-
|
|
18
|
-
"@greenarmor/ges-
|
|
19
|
-
"@greenarmor/ges-policy-engine": "0.6.
|
|
20
|
-
"@greenarmor/ges-
|
|
21
|
-
"@greenarmor/ges-
|
|
22
|
-
"@greenarmor/ges-
|
|
23
|
-
"@greenarmor/ges-
|
|
24
|
-
"@greenarmor/ges-
|
|
25
|
-
"@greenarmor/ges-
|
|
26
|
-
"@greenarmor/ges-compliance-engine": "0.6.
|
|
16
|
+
"@greenarmor/ges-audit-engine": "0.6.1",
|
|
17
|
+
"@greenarmor/ges-cicd-generator": "0.6.1",
|
|
18
|
+
"@greenarmor/ges-core": "0.6.1",
|
|
19
|
+
"@greenarmor/ges-policy-engine": "0.6.1",
|
|
20
|
+
"@greenarmor/ges-doc-generator": "0.6.1",
|
|
21
|
+
"@greenarmor/ges-report-generator": "0.6.1",
|
|
22
|
+
"@greenarmor/ges-scanner-integration": "0.6.1",
|
|
23
|
+
"@greenarmor/ges-scoring-engine": "0.6.1",
|
|
24
|
+
"@greenarmor/ges-mcp-server": "0.6.1",
|
|
25
|
+
"@greenarmor/ges-rules-engine": "0.6.1",
|
|
26
|
+
"@greenarmor/ges-compliance-engine": "0.6.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.0.0",
|