@mcp-guardian/server 1.0.1 → 1.3.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 +63 -7
- package/dist/auth/dashboard-auth.d.ts +97 -0
- package/dist/auth/dashboard-auth.d.ts.map +1 -0
- package/dist/auth/dashboard-auth.js +319 -0
- package/dist/auth/dashboard-auth.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/policy/policy-engine.d.ts +10 -0
- package/dist/policy/policy-engine.d.ts.map +1 -1
- package/dist/policy/policy-engine.js +57 -6
- package/dist/policy/policy-engine.js.map +1 -1
- package/dist/policy/shell-tokenizer.d.ts +92 -0
- package/dist/policy/shell-tokenizer.d.ts.map +1 -0
- package/dist/policy/shell-tokenizer.js +300 -0
- package/dist/policy/shell-tokenizer.js.map +1 -0
- package/dist/proxy/http-proxy-server.d.ts +3 -1
- package/dist/proxy/http-proxy-server.d.ts.map +1 -1
- package/dist/proxy/http-proxy-server.js +14 -3
- package/dist/proxy/http-proxy-server.js.map +1 -1
- package/dist/utils/dashboard-server.d.ts +14 -5
- package/dist/utils/dashboard-server.d.ts.map +1 -1
- package/dist/utils/dashboard-server.js +213 -41
- package/dist/utils/dashboard-server.js.map +1 -1
- package/dist/utils/mtls-config.d.ts +27 -0
- package/dist/utils/mtls-config.d.ts.map +1 -0
- package/dist/utils/mtls-config.js +82 -0
- package/dist/utils/mtls-config.js.map +1 -0
- package/dist/utils/payload-normalizer.d.ts +62 -0
- package/dist/utils/payload-normalizer.d.ts.map +1 -0
- package/dist/utils/payload-normalizer.js +240 -0
- package/dist/utils/payload-normalizer.js.map +1 -0
- package/package.json +9 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-normalizer.d.ts","sourceRoot":"","sources":["../../src/utils/payload-normalizer.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,QAAQ,SAAI,EAAE,SAAS,SAAY;IAK/C;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB;IAmE7C;;OAEG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASxB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoB5B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa,CAAwC;IAEpE,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiC/B,OAAO,CAAC,kBAAkB;IAmB1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,OAAO;CAqBvD;AAKD,wBAAgB,aAAa,IAAI,iBAAiB,CAKjD"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PayloadNormalizer applies multi-stage normalization to defeat
|
|
3
|
+
* common evasion techniques targeting regex-based policy engines.
|
|
4
|
+
*/
|
|
5
|
+
export class PayloadNormalizer {
|
|
6
|
+
maxDepth;
|
|
7
|
+
maxLength;
|
|
8
|
+
constructor(maxDepth = 5, maxLength = 1_000_000) {
|
|
9
|
+
this.maxDepth = maxDepth;
|
|
10
|
+
this.maxLength = maxLength;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Full normalization pipeline for policy evaluation input.
|
|
14
|
+
*/
|
|
15
|
+
normalize(input) {
|
|
16
|
+
const transformations = [];
|
|
17
|
+
let current = input;
|
|
18
|
+
let depth = 0;
|
|
19
|
+
// ── Step 0: Truncate oversized inputs (memory safety) ──
|
|
20
|
+
if (current.length > this.maxLength) {
|
|
21
|
+
current = current.slice(0, this.maxLength);
|
|
22
|
+
transformations.push('truncated');
|
|
23
|
+
}
|
|
24
|
+
// ── Step 1: Unicode normalization (NFKC) — collapses homoglyphs ──
|
|
25
|
+
const unicodeNormalized = current.normalize('NFKC');
|
|
26
|
+
if (unicodeNormalized !== current) {
|
|
27
|
+
transformations.push('unicode-nfkc');
|
|
28
|
+
current = unicodeNormalized;
|
|
29
|
+
}
|
|
30
|
+
// ── Step 2: Iterative decode loop (URL, hex, HTML entities) ──
|
|
31
|
+
while (depth < this.maxDepth) {
|
|
32
|
+
const before = current;
|
|
33
|
+
// URL decode (handles %20, %00 null bytes, %2F slashes)
|
|
34
|
+
current = this.urlDecode(current);
|
|
35
|
+
// Hex escape decode (\x41, \x00, \x2F)
|
|
36
|
+
current = this.decodeHexEscapes(current);
|
|
37
|
+
// Unicode escape decode (\u0041, \U00000041)
|
|
38
|
+
current = this.decodeUnicodeEscapes(current);
|
|
39
|
+
// HTML entity decode (<, <, <)
|
|
40
|
+
current = this.decodeHtmlEntities(current);
|
|
41
|
+
// Double-backslash unwrap (\\. → .)
|
|
42
|
+
current = this.unwrapDoubleEscapes(current);
|
|
43
|
+
if (current === before)
|
|
44
|
+
break;
|
|
45
|
+
depth++;
|
|
46
|
+
}
|
|
47
|
+
if (current !== unicodeNormalized) {
|
|
48
|
+
transformations.push('decode-loop');
|
|
49
|
+
}
|
|
50
|
+
// ── Step 3: Shell normalization ──
|
|
51
|
+
const shellNormalized = this.shellNormalize(current);
|
|
52
|
+
if (shellNormalized !== current) {
|
|
53
|
+
transformations.push('shell-normalize');
|
|
54
|
+
current = shellNormalized;
|
|
55
|
+
}
|
|
56
|
+
// ── Step 4: Whitespace normalization (collapse runs) ──
|
|
57
|
+
const whitespaceNormalized = current.replace(/\s+/g, ' ').trim();
|
|
58
|
+
if (whitespaceNormalized !== current) {
|
|
59
|
+
transformations.push('whitespace');
|
|
60
|
+
current = whitespaceNormalized;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
normalized: current,
|
|
64
|
+
wasModified: transformations.length > 0,
|
|
65
|
+
transformations,
|
|
66
|
+
original: input,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* URL decode: %XX → character, handles malformed sequences.
|
|
71
|
+
*/
|
|
72
|
+
urlDecode(input) {
|
|
73
|
+
try {
|
|
74
|
+
return decodeURIComponent(input.replace(/\+/g, ' '));
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// Gracefully handle malformed % sequences: replace only valid ones
|
|
78
|
+
return input.replace(/%([0-9A-Fa-f]{2})/g, (_match, hex) => {
|
|
79
|
+
try {
|
|
80
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return _match;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Decode hex escapes: \x41 → 'A', \x00 → null byte detection.
|
|
90
|
+
*/
|
|
91
|
+
decodeHexEscapes(input) {
|
|
92
|
+
return input.replace(/\\x([0-9A-Fa-f]{2})/g, (_match, hex) => {
|
|
93
|
+
const code = parseInt(hex, 16);
|
|
94
|
+
// Preserve null byte as marker for detection
|
|
95
|
+
if (code === 0)
|
|
96
|
+
return '\0';
|
|
97
|
+
return String.fromCharCode(code);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Decode unicode escapes: \u0041 → 'A', \U00000041 → 'A'.
|
|
102
|
+
*/
|
|
103
|
+
decodeUnicodeEscapes(input) {
|
|
104
|
+
return input
|
|
105
|
+
.replace(/\\u([0-9A-Fa-f]{4})/g, (_match, hex) => {
|
|
106
|
+
try {
|
|
107
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return _match;
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
.replace(/\\U([0-9A-Fa-f]{8})/g, (_match, hex) => {
|
|
114
|
+
try {
|
|
115
|
+
const code = parseInt(hex, 16);
|
|
116
|
+
if (code > 0x10ffff)
|
|
117
|
+
return _match; // Invalid unicode
|
|
118
|
+
return String.fromCodePoint(code);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return _match;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Decode HTML entities: < -> <, < -> <, < -> <.
|
|
127
|
+
* Entity map built at runtime to avoid source-level entity decoding issues.
|
|
128
|
+
*/
|
|
129
|
+
static htmlEntityMap = null;
|
|
130
|
+
static getHtmlEntityMap() {
|
|
131
|
+
if (PayloadNormalizer.htmlEntityMap)
|
|
132
|
+
return PayloadNormalizer.htmlEntityMap;
|
|
133
|
+
const a = String.fromCharCode(38); // ampersand char
|
|
134
|
+
const pairs = [
|
|
135
|
+
[a + 'lt;', '<'],
|
|
136
|
+
[a + 'gt;', '>'],
|
|
137
|
+
[a + 'amp;', a],
|
|
138
|
+
[a + 'quot;', '"'],
|
|
139
|
+
[a + '#39;', "'"],
|
|
140
|
+
[a + 'apos;', "'"],
|
|
141
|
+
[a + 'sol;', '/'],
|
|
142
|
+
[a + 'bsol;', '\\'],
|
|
143
|
+
[a + 'colon;', ':'],
|
|
144
|
+
[a + 'semi;', ';'],
|
|
145
|
+
[a + 'verbar;', '|'],
|
|
146
|
+
[a + 'dollar;', '$'],
|
|
147
|
+
[a + 'lpar;', '('],
|
|
148
|
+
[a + 'rpar;', ')'],
|
|
149
|
+
[a + 'lcub;', '{'],
|
|
150
|
+
[a + 'rcub;', '}'],
|
|
151
|
+
[a + 'lbrack;', '['],
|
|
152
|
+
[a + 'rbrack;', ']'],
|
|
153
|
+
];
|
|
154
|
+
PayloadNormalizer.htmlEntityMap = pairs.map(([entity, ch]) => {
|
|
155
|
+
const escaped = entity.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
156
|
+
return [new RegExp(escaped, 'g'), ch];
|
|
157
|
+
});
|
|
158
|
+
return PayloadNormalizer.htmlEntityMap;
|
|
159
|
+
}
|
|
160
|
+
decodeHtmlEntities(input) {
|
|
161
|
+
let result = input;
|
|
162
|
+
// Named entities
|
|
163
|
+
for (const [regex, ch] of PayloadNormalizer.getHtmlEntityMap()) {
|
|
164
|
+
result = result.replace(regex, ch);
|
|
165
|
+
}
|
|
166
|
+
// Numeric decimal entities: <
|
|
167
|
+
result = result.replace(/&#(\d+);/g, (_match, dec) => {
|
|
168
|
+
const code = parseInt(dec, 10);
|
|
169
|
+
return (code > 0 && code < 65536) ? String.fromCharCode(code) : _match;
|
|
170
|
+
});
|
|
171
|
+
// Numeric hex entities: <
|
|
172
|
+
result = result.replace(/&#x([0-9A-Fa-f]+);/g, (_match, hex) => {
|
|
173
|
+
const code = parseInt(hex, 16);
|
|
174
|
+
return (code > 0 && code < 65536) ? String.fromCharCode(code) : _match;
|
|
175
|
+
});
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Unwrap double escapes: \\. → literal character.
|
|
180
|
+
*/
|
|
181
|
+
unwrapDoubleEscapes(input) {
|
|
182
|
+
return input.replace(/\\(.)/g, (_match, char) => {
|
|
183
|
+
// Only unwrap if the backslash is escaping a non-special char
|
|
184
|
+
if ('\\$`"\''.includes(char))
|
|
185
|
+
return _match;
|
|
186
|
+
return char;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Shell normalize: collapse common shell obfuscation patterns.
|
|
191
|
+
*
|
|
192
|
+
* - $'cmd' → cmd (ANSI-C quoting)
|
|
193
|
+
* - "c"m"d" → cmd (quote splitting)
|
|
194
|
+
* - ''cmd'' → cmd (empty quote pairs)
|
|
195
|
+
* - c\md → cmd (backslash escapes)
|
|
196
|
+
*/
|
|
197
|
+
shellNormalize(input) {
|
|
198
|
+
let result = input;
|
|
199
|
+
// ANSI-C quoting: $'command' → command
|
|
200
|
+
result = result.replace(/\$'([^']*)'/g, '$1');
|
|
201
|
+
// Quote splitting: "a""b" → ab, 'a''b' → ab
|
|
202
|
+
result = result.replace(/["']\s*["']/g, '');
|
|
203
|
+
// Shell backslash escapes on non-special chars
|
|
204
|
+
result = result.replace(/\\([^\\$`"'|&;><~#%{}()\[\]])/g, '$1');
|
|
205
|
+
// Null byte detection (normalized → mark as NUL for policy patterns)
|
|
206
|
+
result = result.replace(/\0/g, '\\0');
|
|
207
|
+
return result;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Specifically normalize a JSON string value (tool argument).
|
|
211
|
+
* Handles nested JSON structures recursively.
|
|
212
|
+
*/
|
|
213
|
+
normalizeJsonValue(value, depth = 0) {
|
|
214
|
+
if (depth > 10)
|
|
215
|
+
return value; // Recursion guard
|
|
216
|
+
if (typeof value === 'string') {
|
|
217
|
+
return this.normalize(value).normalized;
|
|
218
|
+
}
|
|
219
|
+
if (Array.isArray(value)) {
|
|
220
|
+
return value.map((item) => this.normalizeJsonValue(item, depth + 1));
|
|
221
|
+
}
|
|
222
|
+
if (value !== null && typeof value === 'object') {
|
|
223
|
+
const result = {};
|
|
224
|
+
for (const [key, val] of Object.entries(value)) {
|
|
225
|
+
result[key] = this.normalizeJsonValue(val, depth + 1);
|
|
226
|
+
}
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
return value;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/** Singleton instance for policy engine integration */
|
|
233
|
+
let defaultInstance = null;
|
|
234
|
+
export function getNormalizer() {
|
|
235
|
+
if (!defaultInstance) {
|
|
236
|
+
defaultInstance = new PayloadNormalizer();
|
|
237
|
+
}
|
|
238
|
+
return defaultInstance;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=payload-normalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-normalizer.js","sourceRoot":"","sources":["../../src/utils/payload-normalizer.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACX,QAAQ,CAAS;IACjB,SAAS,CAAS;IAEnC,YAAY,QAAQ,GAAG,CAAC,EAAE,SAAS,GAAG,SAAS;QAC7C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAAa;QACrB,MAAM,eAAe,GAAa,EAAE,CAAC;QACrC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,0DAA0D;QAC1D,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC3C,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpC,CAAC;QAED,oEAAoE;QACpE,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,iBAAiB,KAAK,OAAO,EAAE,CAAC;YAClC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACrC,OAAO,GAAG,iBAAiB,CAAC;QAC9B,CAAC;QAED,gEAAgE;QAChE,OAAO,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,OAAO,CAAC;YAEvB,wDAAwD;YACxD,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAElC,uCAAuC;YACvC,OAAO,GA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OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAChD,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;gBAC1E,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;;AAGH,uDAAuD;AACvD,IAAI,eAAe,GAA6B,IAAI,CAAC;AAErD,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-guardian/server",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Security, cost, and health audit for MCP infrastructure",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
9
|
"bin": {
|
|
11
10
|
"mcp-guardian": "./dist/cli.js"
|
|
12
11
|
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=18"
|
|
15
15
|
},
|
|
16
|
-
"repository":
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/rudraneel93/mcp-guardian.git"
|
|
19
|
+
},
|
|
17
20
|
"bugs": "https://github.com/rudraneel93/mcp-guardian/issues",
|
|
18
21
|
"homepage": "https://www.npmjs.com/package/@mcp-guardian/server",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
19
25
|
"keywords": [
|
|
20
26
|
"mcp",
|
|
21
27
|
"model-context-protocol",
|