@bryan-thompson/inspector-assessment-client 1.19.5 → 1.19.6
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/assets/{OAuthCallback-DbXCayzE.js → OAuthCallback-2egbdNUk.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-DO4zwsDb.js → OAuthDebugCallback-BfKpx34j.js} +1 -1
- package/dist/assets/{index-BToUV-36.js → index-coKZl3U4.js} +9 -4
- package/dist/index.html +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +75 -3
- package/lib/services/assessment/modules/DocumentationAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/DocumentationAssessor.js +12 -1
- package/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/ErrorHandlingAssessor.js +5 -0
- package/lib/services/assessment/modules/SecurityAssessor.d.ts +13 -7
- package/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.js +13 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-
|
|
1
|
+
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-coKZl3U4.js";
|
|
2
2
|
const OAuthCallback = ({ onConnect }) => {
|
|
3
3
|
const { toast } = useToast();
|
|
4
4
|
const hasProcessedRef = reactExports.useRef(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-
|
|
1
|
+
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-coKZl3U4.js";
|
|
2
2
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
3
3
|
reactExports.useEffect(() => {
|
|
4
4
|
let isProcessed = false;
|
|
@@ -16320,7 +16320,7 @@ object({
|
|
|
16320
16320
|
token_type_hint: string().optional()
|
|
16321
16321
|
}).strip();
|
|
16322
16322
|
const name = "@bryan-thompson/inspector-assessment-client";
|
|
16323
|
-
const version$1 = "1.19.
|
|
16323
|
+
const version$1 = "1.19.6";
|
|
16324
16324
|
const packageJson = {
|
|
16325
16325
|
name,
|
|
16326
16326
|
version: version$1
|
|
@@ -45352,7 +45352,7 @@ const useTheme = () => {
|
|
|
45352
45352
|
[theme, setThemeWithSideEffect]
|
|
45353
45353
|
);
|
|
45354
45354
|
};
|
|
45355
|
-
const version = "1.19.
|
|
45355
|
+
const version = "1.19.6";
|
|
45356
45356
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
45357
45357
|
createPopperScope
|
|
45358
45358
|
]);
|
|
@@ -48915,6 +48915,11 @@ class ErrorHandlingAssessor extends BaseAssessor {
|
|
|
48915
48915
|
}
|
|
48916
48916
|
selectToolsForTesting(tools) {
|
|
48917
48917
|
if (this.config.selectedToolsForTesting !== void 0) {
|
|
48918
|
+
if (this.config.maxToolsToTestForErrors !== void 0) {
|
|
48919
|
+
this.log(
|
|
48920
|
+
`Warning: Both selectedToolsForTesting and maxToolsToTestForErrors are set. Using selectedToolsForTesting (maxToolsToTestForErrors is deprecated).`
|
|
48921
|
+
);
|
|
48922
|
+
}
|
|
48918
48923
|
const selectedNames = new Set(this.config.selectedToolsForTesting);
|
|
48919
48924
|
const selectedTools = tools.filter(
|
|
48920
48925
|
(tool) => selectedNames.has(tool.name)
|
|
@@ -59161,13 +59166,13 @@ const App = () => {
|
|
|
59161
59166
|
) });
|
|
59162
59167
|
if (window.location.pathname === "/oauth/callback") {
|
|
59163
59168
|
const OAuthCallback = React.lazy(
|
|
59164
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
59169
|
+
() => __vitePreload(() => import("./OAuthCallback-2egbdNUk.js"), true ? [] : void 0)
|
|
59165
59170
|
);
|
|
59166
59171
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
59167
59172
|
}
|
|
59168
59173
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
59169
59174
|
const OAuthDebugCallback = React.lazy(
|
|
59170
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
59175
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-BfKpx34j.js"), true ? [] : void 0)
|
|
59171
59176
|
);
|
|
59172
59177
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
59173
59178
|
}
|
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/mcp.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MCP Inspector</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-coKZl3U4.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-DiyPO_Zj.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAGvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAiC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAGvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAiC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAgKhC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,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OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI;CAG7D"}
|
|
@@ -51,6 +51,7 @@ function emitModuleStartedEvent(moduleName, estimatedTests, toolCount) {
|
|
|
51
51
|
/**
|
|
52
52
|
* Emit module_complete event with score and duration.
|
|
53
53
|
* Uses shared score calculator for consistent scoring logic.
|
|
54
|
+
* For AUP module, includes enriched violation data for Claude analysis.
|
|
54
55
|
*/
|
|
55
56
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
57
|
function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
@@ -61,8 +62,8 @@ function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
|
61
62
|
const startTime = moduleStartTimes.get(moduleKey);
|
|
62
63
|
const duration = startTime ? Date.now() - startTime : 0;
|
|
63
64
|
moduleStartTimes.delete(moduleKey);
|
|
64
|
-
//
|
|
65
|
-
|
|
65
|
+
// Build base event
|
|
66
|
+
const event = {
|
|
66
67
|
event: "module_complete",
|
|
67
68
|
module: moduleKey,
|
|
68
69
|
status,
|
|
@@ -70,7 +71,78 @@ function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
|
70
71
|
testsRun,
|
|
71
72
|
duration,
|
|
72
73
|
version: INSPECTOR_VERSION,
|
|
73
|
-
}
|
|
74
|
+
};
|
|
75
|
+
// Add AUP enrichment when module is AUP
|
|
76
|
+
if (moduleKey === "aup" && result) {
|
|
77
|
+
const aupEnrichment = buildAUPEnrichment(result);
|
|
78
|
+
Object.assign(event, aupEnrichment);
|
|
79
|
+
}
|
|
80
|
+
// Emit JSONL to stderr with version field
|
|
81
|
+
console.error(JSON.stringify(event));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Build AUP enrichment data from an AUP compliance assessment result.
|
|
85
|
+
* Samples violations prioritizing by severity (CRITICAL > HIGH > MEDIUM).
|
|
86
|
+
*/
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
+
function buildAUPEnrichment(aupResult, maxSamples = 10) {
|
|
89
|
+
const violations = aupResult.violations || [];
|
|
90
|
+
// Calculate metrics
|
|
91
|
+
const metrics = {
|
|
92
|
+
total: violations.length,
|
|
93
|
+
critical: violations.filter((v) => v.severity === "CRITICAL").length,
|
|
94
|
+
high: violations.filter((v) => v.severity === "HIGH")
|
|
95
|
+
.length,
|
|
96
|
+
medium: violations.filter((v) => v.severity === "MEDIUM").length,
|
|
97
|
+
byCategory: {},
|
|
98
|
+
};
|
|
99
|
+
// Count by category
|
|
100
|
+
for (const v of violations) {
|
|
101
|
+
metrics.byCategory[v.category] = (metrics.byCategory[v.category] || 0) + 1;
|
|
102
|
+
}
|
|
103
|
+
// Sample violations prioritizing by severity
|
|
104
|
+
const sampled = [];
|
|
105
|
+
const severityOrder = ["CRITICAL", "HIGH", "MEDIUM"];
|
|
106
|
+
for (const severity of severityOrder) {
|
|
107
|
+
if (sampled.length >= maxSamples)
|
|
108
|
+
break;
|
|
109
|
+
const bySeverity = violations.filter((v) => v.severity === severity);
|
|
110
|
+
for (const v of bySeverity) {
|
|
111
|
+
if (sampled.length >= maxSamples)
|
|
112
|
+
break;
|
|
113
|
+
sampled.push({
|
|
114
|
+
category: v.category,
|
|
115
|
+
categoryName: v.categoryName,
|
|
116
|
+
severity: v.severity,
|
|
117
|
+
matchedText: v.matchedText,
|
|
118
|
+
location: v.location,
|
|
119
|
+
confidence: v.confidence,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Build sampling note
|
|
124
|
+
let samplingNote = "";
|
|
125
|
+
if (violations.length === 0) {
|
|
126
|
+
samplingNote = "No violations detected.";
|
|
127
|
+
}
|
|
128
|
+
else if (violations.length <= maxSamples) {
|
|
129
|
+
samplingNote = `All ${violations.length} violation(s) included.`;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
samplingNote = `Sampled ${sampled.length} of ${violations.length} violations, prioritized by severity (CRITICAL > HIGH > MEDIUM).`;
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
violationsSample: sampled,
|
|
136
|
+
samplingNote,
|
|
137
|
+
violationMetrics: metrics,
|
|
138
|
+
scannedLocations: aupResult.scannedLocations || {
|
|
139
|
+
toolNames: false,
|
|
140
|
+
toolDescriptions: false,
|
|
141
|
+
readme: false,
|
|
142
|
+
sourceCode: false,
|
|
143
|
+
},
|
|
144
|
+
highRiskDomains: (aupResult.highRiskDomains || []).slice(0, 10),
|
|
145
|
+
};
|
|
74
146
|
}
|
|
75
147
|
export class AssessmentOrchestrator {
|
|
76
148
|
config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentationAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/DocumentationAssessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,uBAAuB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,qBAAa,qBAAsB,SAAQ,YAAY;IAC/C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocumentationAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/DocumentationAssessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,uBAAuB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,qBAAa,qBAAsB,SAAQ,YAAY;IAC/C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAwC1E,OAAO,CAAC,oBAAoB;IA6H5B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAuEjC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAiBhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmC9B;;OAEG;IACH,OAAO,CAAC,aAAa;IAKrB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA4C3B,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,cAAc;IAUtB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA4B3B,OAAO,CAAC,4BAA4B;IAmBpC,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,uBAAuB;CA+BhC"}
|
|
@@ -7,7 +7,18 @@ export class DocumentationAssessor extends BaseAssessor {
|
|
|
7
7
|
async assess(context) {
|
|
8
8
|
this.log("Starting documentation assessment");
|
|
9
9
|
const readmeContent = context.readmeContent || "";
|
|
10
|
-
const
|
|
10
|
+
const validVerbosityLevels = ["minimal", "standard", "verbose"];
|
|
11
|
+
const configVerbosity = this.config.documentationVerbosity;
|
|
12
|
+
let verbosity = "standard";
|
|
13
|
+
if (configVerbosity) {
|
|
14
|
+
if (validVerbosityLevels.includes(configVerbosity)) {
|
|
15
|
+
verbosity = configVerbosity;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.log(`Warning: Invalid documentationVerbosity "${configVerbosity}". ` +
|
|
19
|
+
`Valid options: ${validVerbosityLevels.join(", ")}. Using "standard".`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
11
22
|
const metrics = this.analyzeDocumentation(readmeContent, context.tools, verbosity);
|
|
12
23
|
const status = this.determineDocumentationStatus(metrics);
|
|
13
24
|
const explanation = this.generateExplanation(metrics);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHandlingAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/ErrorHandlingAssessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,uBAAuB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,qBAAa,qBAAsB,SAAQ,YAAY;IAC/C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA+D1E,OAAO,CAAC,qBAAqB;
|
|
1
|
+
{"version":3,"file":"ErrorHandlingAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/ErrorHandlingAssessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,uBAAuB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,qBAAa,qBAAsB,SAAQ,YAAY;IAC/C,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA+D1E,OAAO,CAAC,qBAAqB;YAqDf,qBAAqB;YAuBrB,qBAAqB;YAmGrB,cAAc;YAmFd,iBAAiB;YA8DjB,kBAAkB;IA6DhC,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,uBAAuB;IAgC/B,OAAO,CAAC,0BAA0B;IAgClC,OAAO,CAAC,uBAAuB;IA4B/B,OAAO,CAAC,gBAAgB;IAoGxB,OAAO,CAAC,4BAA4B;IAapC,OAAO,CAAC,mBAAmB;IAuE3B,OAAO,CAAC,uBAAuB;CA4ChC"}
|
|
@@ -46,6 +46,11 @@ export class ErrorHandlingAssessor extends BaseAssessor {
|
|
|
46
46
|
// Prefer new selectedToolsForTesting configuration
|
|
47
47
|
// Note: undefined/null means "test all" (default), empty array [] means "test none" (explicit)
|
|
48
48
|
if (this.config.selectedToolsForTesting !== undefined) {
|
|
49
|
+
// Warn if deprecated maxToolsToTestForErrors is also set
|
|
50
|
+
if (this.config.maxToolsToTestForErrors !== undefined) {
|
|
51
|
+
this.log(`Warning: Both selectedToolsForTesting and maxToolsToTestForErrors are set. ` +
|
|
52
|
+
`Using selectedToolsForTesting (maxToolsToTestForErrors is deprecated).`);
|
|
53
|
+
}
|
|
49
54
|
const selectedNames = new Set(this.config.selectedToolsForTesting);
|
|
50
55
|
const selectedTools = tools.filter((tool) => selectedNames.has(tool.name));
|
|
51
56
|
// Empty array means user explicitly selected 0 tools
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Security Assessor Module
|
|
3
3
|
* Tests for backend API security vulnerabilities using 20 focused patterns
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* BASIC MODE (5 patterns - enableDomainTesting=false):
|
|
6
|
+
* Command Injection, Calculator Injection, SQL Injection, Path Traversal, Unicode Bypass
|
|
7
|
+
*
|
|
8
|
+
* ADVANCED MODE (all 20 patterns - enableDomainTesting=true):
|
|
9
|
+
* - Critical Injection (6): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
|
|
10
|
+
* - Input Validation (3): Type Safety, Boundary Testing, Required Fields
|
|
11
|
+
* - Protocol Compliance (2): MCP Error Format, Timeout Handling
|
|
12
|
+
* - Tool-Specific (6): SSRF, Nested Injection, Package Squatting,
|
|
13
|
+
* Data Exfiltration, Configuration Drift, Tool Shadowing
|
|
14
|
+
* - Encoding Bypass (1): Unicode Bypass
|
|
15
|
+
* - Resource Exhaustion (1): DoS/Resource Exhaustion
|
|
16
|
+
* - Deserialization (1): Insecure Deserialization
|
|
11
17
|
*/
|
|
12
18
|
import { SecurityAssessment } from "../../../lib/assessmentTypes.js";
|
|
13
19
|
import { BaseAssessor } from "./BaseAssessor.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAc9D,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,iBAAiB,CAAuC;IAC1D,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuFrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;;;OAIG;YACW,yBAAyB;IAuKvC;;;;OAIG;YACW,qBAAqB;IA4JnC;;OAEG;YACW,WAAW;IA2HzB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAgDzB;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAiDtC;;OAEG;IACH,OAAO,CAAC,aAAa;IA+BrB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAgClC;;;OAGG;IACH,OAAO,CAAC,eAAe;IA6HvB;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAiE7B;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAqC5B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAkC5B;;OAEG;YACW,+BAA+B;IAiC7C;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkEnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAuI3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAsB5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,oBAAoB;IAuM5B;;;;;;;;;OASG;IACH,OAAO,CAAC,wBAAwB;IAwDhC;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAuBtC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IA8BhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;IAoH5B;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAmB3B"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Security Assessor Module
|
|
3
3
|
* Tests for backend API security vulnerabilities using 20 focused patterns
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* BASIC MODE (5 patterns - enableDomainTesting=false):
|
|
6
|
+
* Command Injection, Calculator Injection, SQL Injection, Path Traversal, Unicode Bypass
|
|
7
|
+
*
|
|
8
|
+
* ADVANCED MODE (all 20 patterns - enableDomainTesting=true):
|
|
9
|
+
* - Critical Injection (6): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
|
|
10
|
+
* - Input Validation (3): Type Safety, Boundary Testing, Required Fields
|
|
11
|
+
* - Protocol Compliance (2): MCP Error Format, Timeout Handling
|
|
12
|
+
* - Tool-Specific (6): SSRF, Nested Injection, Package Squatting,
|
|
13
|
+
* Data Exfiltration, Configuration Drift, Tool Shadowing
|
|
14
|
+
* - Encoding Bypass (1): Unicode Bypass
|
|
15
|
+
* - Resource Exhaustion (1): DoS/Resource Exhaustion
|
|
16
|
+
* - Deserialization (1): Insecure Deserialization
|
|
11
17
|
*/
|
|
12
18
|
import { BaseAssessor } from "./BaseAssessor.js";
|
|
13
19
|
import { getAllAttackPatterns, getPayloadsForAttack, } from "../../../lib/securityPatterns.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-client",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.6",
|
|
4
4
|
"description": "Client-side application for the Enhanced MCP Inspector with assessment capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|