@securecode-ai/mcp 0.5.7 → 0.6.0
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 +2 -1
- package/dist/api/client.d.ts +11 -1
- package/dist/api/client.js +93 -8
- package/dist/api/client.js.map +1 -1
- package/dist/api/types.d.ts +24 -0
- package/dist/approval/policy.js +5 -0
- package/dist/approval/policy.js.map +1 -1
- package/dist/attack/agentScanBatchProtocol.d.ts +98 -0
- package/dist/attack/agentScanBatchProtocol.js +125 -0
- package/dist/attack/agentScanBatchProtocol.js.map +1 -0
- package/dist/attack/agentScanBatchSelection.d.ts +38 -0
- package/dist/attack/agentScanBatchSelection.js +167 -0
- package/dist/attack/agentScanBatchSelection.js.map +1 -0
- package/dist/attack/agentScanCoordinator.d.ts +33 -0
- package/dist/attack/agentScanCoordinator.js +116 -0
- package/dist/attack/agentScanCoordinator.js.map +1 -0
- package/dist/attack/agentScanCreditPlan.d.ts +40 -0
- package/dist/attack/agentScanCreditPlan.js +50 -0
- package/dist/attack/agentScanCreditPlan.js.map +1 -0
- package/dist/attack/agentScanLoop.js +173 -111
- package/dist/attack/agentScanLoop.js.map +1 -1
- package/dist/attack/agentScanProtocol.d.ts +2 -2
- package/dist/attack/agentScanProtocol.js.map +1 -1
- package/dist/attack/investigationState.d.ts +1 -0
- package/dist/attack/investigationState.js +20 -7
- package/dist/attack/investigationState.js.map +1 -1
- package/dist/attack/scanScheduler.d.ts +5 -0
- package/dist/attack/scanScheduler.js +37 -2
- package/dist/attack/scanScheduler.js.map +1 -1
- package/dist/attack/scanState.d.ts +6 -0
- package/dist/attack/scanState.js +5 -0
- package/dist/attack/scanState.js.map +1 -1
- package/dist/mcp/server.js +2 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools.js +35 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/project-map/scanCache.d.ts +4 -1
- package/dist/project-map/scanCache.js +15 -0
- package/dist/project-map/scanCache.js.map +1 -1
- package/dist/tools/agentScan.js +10 -1
- package/dist/tools/agentScan.js.map +1 -1
- package/dist/tools/agentScanBatch.d.ts +18 -0
- package/dist/tools/agentScanBatch.js +178 -0
- package/dist/tools/agentScanBatch.js.map +1 -0
- package/icon.svg +6 -0
- package/package.json +4 -2
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* securecode.agent-scan-batch MCP tool — sequential batch agent scanning.
|
|
4
|
+
*
|
|
5
|
+
* Maps the project, runs architecture scout, selects the top N
|
|
6
|
+
* security-relevant files, and scans them ONE AT A TIME. Stops after
|
|
7
|
+
* the first incomplete or failed scan and reports remaining files
|
|
8
|
+
* as not-started.
|
|
9
|
+
*
|
|
10
|
+
* Rules:
|
|
11
|
+
* - Scans are strictly sequential (for...of + await, never Promise.all).
|
|
12
|
+
* - _skipFix is always true (no fix generation in batch mode).
|
|
13
|
+
* - Stops on incomplete, failed, cancelled, or thrown errors.
|
|
14
|
+
* - Does NOT stop merely because a completed scan has findings.
|
|
15
|
+
* - Does NOT include full transcripts in batch output.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.toolAgentScanBatch = toolAgentScanBatch;
|
|
19
|
+
const map_1 = require("./map");
|
|
20
|
+
const agentScan_1 = require("./agentScan");
|
|
21
|
+
const client_1 = require("../api/client");
|
|
22
|
+
const agentScanBatchSelection_1 = require("../attack/agentScanBatchSelection");
|
|
23
|
+
const agentScanCreditPlan_1 = require("../attack/agentScanCreditPlan");
|
|
24
|
+
const agentScanCoordinator_1 = require("../attack/agentScanCoordinator");
|
|
25
|
+
const agentScanBatchProtocol_1 = require("../attack/agentScanBatchProtocol");
|
|
26
|
+
async function toolAgentScanBatch(ctx, args) {
|
|
27
|
+
return agentScanCoordinator_1.globalScanCoordinator.runExclusive(ctx.workspaceRoot, () => toolAgentScanBatchInner(ctx, args), {
|
|
28
|
+
signal: args._signal,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async function toolAgentScanBatchInner(ctx, args) {
|
|
32
|
+
const progress = args._progress;
|
|
33
|
+
const signal = args._signal;
|
|
34
|
+
const topN = args.topN ?? 3;
|
|
35
|
+
const architectureDepth = args.architectureDepth ?? 'standard';
|
|
36
|
+
const fileSelection = args.fileSelection ?? 'recommendedScanOrder';
|
|
37
|
+
const noCache = !!args.noCache;
|
|
38
|
+
const stopOnIncomplete = args.stopOnIncomplete !== false;
|
|
39
|
+
const stopOnFailure = args.stopOnFailure !== false;
|
|
40
|
+
if (progress)
|
|
41
|
+
progress(0, 3, 'Mapping project + running architecture scout...');
|
|
42
|
+
let architecture = null;
|
|
43
|
+
let archCached = false;
|
|
44
|
+
try {
|
|
45
|
+
const archResult = await (0, map_1.toolMap)(ctx, {
|
|
46
|
+
action: 'architecture',
|
|
47
|
+
depth: architectureDepth,
|
|
48
|
+
_noCache: noCache,
|
|
49
|
+
_signal: signal,
|
|
50
|
+
_progress: progress ? (p, t, m) => {
|
|
51
|
+
progress(Math.min(p, 1), 3, `Architecture: ${m}`);
|
|
52
|
+
} : undefined,
|
|
53
|
+
});
|
|
54
|
+
architecture = archResult.architecture ?? null;
|
|
55
|
+
archCached = archResult.cached === true;
|
|
56
|
+
if (!architecture) {
|
|
57
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('architecture-failed', topN, [], []);
|
|
58
|
+
}
|
|
59
|
+
if (architecture.completeness === 'failed') {
|
|
60
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('architecture-incomplete', topN, [], []);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('architecture-failed', topN, [], []);
|
|
65
|
+
}
|
|
66
|
+
if (signal?.aborted) {
|
|
67
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('cancelled', topN, [], []);
|
|
68
|
+
}
|
|
69
|
+
if (progress)
|
|
70
|
+
progress(1, 3, 'Selecting files for sequential scanning...');
|
|
71
|
+
const selection = (0, agentScanBatchSelection_1.selectAgentScanBatchFiles)(ctx.workspaceRoot, architecture, {
|
|
72
|
+
topN,
|
|
73
|
+
fileSelection,
|
|
74
|
+
});
|
|
75
|
+
if (selection.selected.length === 0) {
|
|
76
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('completed', topN, [], []);
|
|
77
|
+
}
|
|
78
|
+
const selectedFiles = selection.selected.map(f => f.filePath);
|
|
79
|
+
if (progress)
|
|
80
|
+
progress(2, 3, `Preflight credit check for ${selectedFiles.length} file(s)...`);
|
|
81
|
+
const creditPlan = (0, agentScanCreditPlan_1.calculateBatchCredits)({
|
|
82
|
+
depth: architectureDepth,
|
|
83
|
+
architectureCacheHit: archCached,
|
|
84
|
+
uncachedFileCount: selection.selected.length,
|
|
85
|
+
cachedFileCount: 0,
|
|
86
|
+
});
|
|
87
|
+
try {
|
|
88
|
+
const client = new client_1.ApiClient({ baseUrl: ctx.apiUrl, token: ctx.apiToken });
|
|
89
|
+
const balance = await client.getJson('/credits/balance', signal);
|
|
90
|
+
if (balance.scanCredits < creditPlan.total) {
|
|
91
|
+
if (progress)
|
|
92
|
+
progress(3, 3, `Insufficient credits: have ${balance.scanCredits}, need ${creditPlan.total}.`);
|
|
93
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('insufficient-credits', topN, selectedFiles, selection.selected.map((f, i) => (0, agentScanBatchProtocol_1.buildNotStartedFileResult)(f.filePath, f.rank, f.role, f.importance)));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
if (signal?.aborted) {
|
|
98
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)('cancelled', topN, [], []);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const fileResults = [];
|
|
102
|
+
let stopReason = 'completed';
|
|
103
|
+
let shouldStop = false;
|
|
104
|
+
for (const file of selection.selected) {
|
|
105
|
+
if (shouldStop) {
|
|
106
|
+
fileResults.push((0, agentScanBatchProtocol_1.buildNotStartedFileResult)(file.filePath, file.rank, file.role, file.importance));
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (signal?.aborted) {
|
|
110
|
+
fileResults.push((0, agentScanBatchProtocol_1.buildNotStartedFileResult)(file.filePath, file.rank, file.role, file.importance));
|
|
111
|
+
stopReason = 'cancelled';
|
|
112
|
+
shouldStop = true;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (progress) {
|
|
116
|
+
progress(file.rank, selection.selected.length, `Scanning ${file.filePath} (${file.rank}/${selection.selected.length})...`);
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
const scanResult = await (0, agentScan_1.toolAgentScan)(ctx, {
|
|
120
|
+
filePath: file.filePath,
|
|
121
|
+
_skipFix: true,
|
|
122
|
+
_skipCoordinator: true,
|
|
123
|
+
_noCache: noCache,
|
|
124
|
+
_signal: signal,
|
|
125
|
+
_progress: progress ? (p, t, m) => {
|
|
126
|
+
progress(file.rank, selection.selected.length, `${file.filePath}: ${m}`);
|
|
127
|
+
} : undefined,
|
|
128
|
+
});
|
|
129
|
+
const batchFile = (0, agentScanBatchProtocol_1.buildBatchFileResult)(file.filePath, file.rank, file.role, file.importance, {
|
|
130
|
+
status: scanResult.status,
|
|
131
|
+
findings: scanResult.agentFindings || [],
|
|
132
|
+
investigationNotes: scanResult.investigationNotes || [],
|
|
133
|
+
coverageGaps: scanResult.coverageGaps || [],
|
|
134
|
+
stepsUsed: scanResult.stepsUsed,
|
|
135
|
+
stepsGranted: 40,
|
|
136
|
+
extensionsGranted: 0,
|
|
137
|
+
costSpentUsd: scanResult.costSpentUsd,
|
|
138
|
+
transcript: [],
|
|
139
|
+
terminationReason: scanResult.terminationReason,
|
|
140
|
+
error: scanResult.error,
|
|
141
|
+
}, scanResult.cached);
|
|
142
|
+
fileResults.push(batchFile);
|
|
143
|
+
if (batchFile.status === 'incomplete' && stopOnIncomplete) {
|
|
144
|
+
stopReason = 'scan-incomplete';
|
|
145
|
+
shouldStop = true;
|
|
146
|
+
}
|
|
147
|
+
else if (batchFile.status === 'failed' && stopOnFailure) {
|
|
148
|
+
stopReason = 'scan-failed';
|
|
149
|
+
shouldStop = true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
const batchFile = {
|
|
154
|
+
filePath: file.filePath,
|
|
155
|
+
rank: file.rank,
|
|
156
|
+
role: file.role,
|
|
157
|
+
importance: file.importance,
|
|
158
|
+
status: 'failed',
|
|
159
|
+
findings: [],
|
|
160
|
+
investigationNotes: [],
|
|
161
|
+
coverageGaps: [],
|
|
162
|
+
stepsUsed: 0,
|
|
163
|
+
costSpentUsd: 0,
|
|
164
|
+
error: { message: err?.message || String(err) },
|
|
165
|
+
};
|
|
166
|
+
fileResults.push(batchFile);
|
|
167
|
+
if (stopOnFailure) {
|
|
168
|
+
stopReason = 'scan-failed';
|
|
169
|
+
shouldStop = true;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (progress && !shouldStop) {
|
|
174
|
+
progress(selection.selected.length, selection.selected.length, 'Batch complete.');
|
|
175
|
+
}
|
|
176
|
+
return (0, agentScanBatchProtocol_1.aggregateBatchResult)(stopReason, topN, selectedFiles, fileResults);
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=agentScanBatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentScanBatch.js","sourceRoot":"","sources":["../../src/tools/agentScanBatch.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AA2CH,gDAWC;AAnDD,+BAAgC;AAChC,2CAA4C;AAC5C,0CAA0C;AAC1C,+EAA8E;AAC9E,uEAAuF;AACvF,yEAAuE;AAGvE,6EAS0C;AAuBnC,KAAK,UAAU,kBAAkB,CACpC,GAAkB,EAClB,IAA8C;IAE9C,OAAO,4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AAQ;gBACvB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,EAAE;gBACZ,kBAAkB,EAAE,EAAE;gBACtB,YAAY,EAAE,EAAE;gBAChB,SAAS,EAAE,CAAC;gBACZ,YAAY,EAAE,CAAC;gBACf,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;aAClD,CAAC;YACF,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAE5B,IAAI,aAAa,EAAE,CAAC;gBAChB,UAAU,GAAG,aAAa,CAAC;gBAC3B,UAAU,GAAG,IAAI,CAAC;YACtB,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1B,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACtF,CAAC;IAED,OAAO,IAAA,6CAAoB,EAAC,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC"}
|
package/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="256" height="256" rx="48" fill="#0F172A"/>
|
|
3
|
+
<path d="M128 48 L192 72 V128 C192 168 160 192 128 208 C96 192 64 168 64 128 V72 L128 48Z" fill="#3B82F6" fill-opacity="0.15" stroke="#3B82F6" stroke-width="4" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M104 128 L120 144 L160 104" stroke="#3B82F6" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<text x="128" y="240" text-anchor="middle" fill="#94A3B8" font-family="system-ui, sans-serif" font-size="24" font-weight="600">SecureCode</text>
|
|
6
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@securecode-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Standalone SecureCode MCP server — scan, map, fix, and attack tools for AI coding assistants. Works without the VS Code extension.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"securecode-mcp": "dist/index.js"
|
|
8
8
|
},
|
|
9
|
+
"icon": "icon.svg",
|
|
9
10
|
"scripts": {
|
|
10
11
|
"build": "tsc -p ./",
|
|
11
12
|
"start": "node dist/index.js serve",
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"dist/",
|
|
19
|
-
"resources/tree-sitter/"
|
|
20
|
+
"resources/tree-sitter/",
|
|
21
|
+
"icon.svg"
|
|
20
22
|
],
|
|
21
23
|
"keywords": [
|
|
22
24
|
"mcp",
|