@bryan-thompson/inspector-assessment-client 1.22.14 → 1.22.16

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.
Files changed (42) hide show
  1. package/dist/assets/{OAuthCallback-DDbR9we4.js → OAuthCallback-DNYBkA2C.js} +1 -1
  2. package/dist/assets/{OAuthDebugCallback-Bel6ibpN.js → OAuthDebugCallback-EhdSHXee.js} +1 -1
  3. package/dist/assets/{index-B55OPPJA.js → index-BRiFDs-g.js} +20 -13
  4. package/dist/index.html +1 -1
  5. package/lib/lib/assessment/configTypes.d.ts +70 -0
  6. package/lib/lib/assessment/configTypes.d.ts.map +1 -0
  7. package/lib/lib/assessment/configTypes.js +194 -0
  8. package/lib/lib/assessment/constants.d.ts +10 -0
  9. package/lib/lib/assessment/constants.d.ts.map +1 -0
  10. package/lib/lib/assessment/constants.js +61 -0
  11. package/lib/lib/assessment/coreTypes.d.ts +159 -0
  12. package/lib/lib/assessment/coreTypes.d.ts.map +1 -0
  13. package/lib/lib/assessment/coreTypes.js +101 -0
  14. package/lib/lib/assessment/extendedTypes.d.ts +415 -0
  15. package/lib/lib/assessment/extendedTypes.d.ts.map +1 -0
  16. package/lib/lib/assessment/extendedTypes.js +9 -0
  17. package/lib/lib/assessment/index.d.ts +23 -0
  18. package/lib/lib/assessment/index.d.ts.map +1 -0
  19. package/lib/lib/assessment/index.js +48 -0
  20. package/lib/lib/assessment/progressTypes.d.ts +160 -0
  21. package/lib/lib/assessment/progressTypes.d.ts.map +1 -0
  22. package/lib/lib/assessment/progressTypes.js +9 -0
  23. package/lib/lib/assessment/resultTypes.d.ts +568 -0
  24. package/lib/lib/assessment/resultTypes.d.ts.map +1 -0
  25. package/lib/lib/assessment/resultTypes.js +9 -0
  26. package/lib/lib/assessmentTypes.d.ts +18 -1342
  27. package/lib/lib/assessmentTypes.d.ts.map +1 -1
  28. package/lib/lib/assessmentTypes.js +19 -341
  29. package/lib/services/assessment/AssessmentOrchestrator.d.ts +5 -0
  30. package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
  31. package/lib/services/assessment/AssessmentOrchestrator.js +24 -6
  32. package/lib/services/assessment/lib/concurrencyLimit.d.ts +12 -0
  33. package/lib/services/assessment/lib/concurrencyLimit.d.ts.map +1 -1
  34. package/lib/services/assessment/lib/concurrencyLimit.js +22 -0
  35. package/lib/services/assessment/lib/logger.d.ts +98 -0
  36. package/lib/services/assessment/lib/logger.d.ts.map +1 -0
  37. package/lib/services/assessment/lib/logger.js +153 -0
  38. package/lib/services/assessment/modules/BaseAssessor.d.ts +2 -2
  39. package/lib/services/assessment/modules/BaseAssessor.d.ts.map +1 -1
  40. package/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
  41. package/lib/services/assessment/modules/SecurityAssessor.js +9 -4
  42. 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-B55OPPJA.js";
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-BRiFDs-g.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-B55OPPJA.js";
1
+ import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-BRiFDs-g.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.22.13";
16323
+ const version$1 = "1.22.16";
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.22.13";
45355
+ const version = "1.22.16";
45356
45356
  var [createTooltipContext] = createContextScope("Tooltip", [
45357
45357
  createPopperScope
45358
45358
  ]);
@@ -48033,8 +48033,6 @@ const DEFAULT_ASSESSMENT_CONFIG = {
48033
48033
  // Enable MCP Spec Compliance assessment by default
48034
48034
  parallelTesting: false,
48035
48035
  maxParallelTests: 5,
48036
- maxToolsToTestForErrors: -1,
48037
- // Default to test ALL tools for comprehensive compliance
48038
48036
  securityPatternsToTest: 8,
48039
48037
  // Test all security patterns by default
48040
48038
  enableDomainTesting: true,
@@ -48078,8 +48076,6 @@ const REVIEWER_MODE_CONFIG = {
48078
48076
  maxParallelTests: 5,
48079
48077
  scenariosPerTool: 1,
48080
48078
  // Single realistic test per tool
48081
- maxToolsToTestForErrors: 3,
48082
- // Test only first 3 tools for error handling
48083
48079
  securityPatternsToTest: 3,
48084
48080
  // Test only 3 critical security patterns
48085
48081
  enableDomainTesting: false,
@@ -48119,8 +48115,6 @@ const DEVELOPER_MODE_CONFIG = {
48119
48115
  parallelTesting: false,
48120
48116
  // Sequential for easier debugging
48121
48117
  maxParallelTests: 5,
48122
- maxToolsToTestForErrors: -1,
48123
- // Test ALL tools
48124
48118
  securityPatternsToTest: 8,
48125
48119
  // Test all security patterns
48126
48120
  enableDomainTesting: true,
@@ -48836,11 +48830,13 @@ class MCPSpecComplianceAssessor extends BaseAssessor {
48836
48830
  return recommendations;
48837
48831
  }
48838
48832
  }
48833
+ const QUEUE_WARNING_THRESHOLD = 1e4;
48839
48834
  function createConcurrencyLimit(concurrency) {
48840
48835
  if (concurrency < 1) {
48841
48836
  throw new Error("Concurrency must be at least 1");
48842
48837
  }
48843
48838
  let activeCount = 0;
48839
+ let hasWarned = false;
48844
48840
  const queue = [];
48845
48841
  const next = () => {
48846
48842
  if (activeCount < concurrency && queue.length > 0) {
@@ -48864,6 +48860,12 @@ function createConcurrencyLimit(concurrency) {
48864
48860
  resolve: resolve2,
48865
48861
  reject
48866
48862
  });
48863
+ if (queue.length > QUEUE_WARNING_THRESHOLD && !hasWarned) {
48864
+ hasWarned = true;
48865
+ console.warn(
48866
+ `[concurrencyLimit] Queue depth: ${queue.length} (threshold: ${QUEUE_WARNING_THRESHOLD}). Active: ${activeCount}/${concurrency}. This may indicate a slow/stalled server.`
48867
+ );
48868
+ }
48867
48869
  next();
48868
48870
  });
48869
48871
  };
@@ -52458,7 +52460,7 @@ function getPayloadsForAttack(attackName, limit2) {
52458
52460
  );
52459
52461
  if (!pattern2) return [];
52460
52462
  const payloads = pattern2.payloads;
52461
- return payloads;
52463
+ return limit2 ? payloads.slice(0, limit2) : payloads;
52462
52464
  }
52463
52465
  function getAllAttackPatterns() {
52464
52466
  return SECURITY_ATTACK_PATTERNS;
@@ -52801,7 +52803,11 @@ class SecurityAssessor extends BaseAssessor {
52801
52803
  const toolsToTest = this.selectToolsForTesting(context.tools);
52802
52804
  const concurrency = this.config.maxParallelTests ?? 5;
52803
52805
  const limit2 = createConcurrencyLimit(concurrency);
52804
- const totalEstimate = toolsToTest.length * attackPatterns.length * 3;
52806
+ let totalPayloads = 0;
52807
+ for (const pattern2 of attackPatterns) {
52808
+ totalPayloads += getPayloadsForAttack(pattern2.attackName).length;
52809
+ }
52810
+ const totalEstimate = toolsToTest.length * totalPayloads;
52805
52811
  let completedTests = 0;
52806
52812
  let lastBatchTime = Date.now();
52807
52813
  const startTime = Date.now();
@@ -53062,9 +53068,10 @@ class SecurityAssessor extends BaseAssessor {
53062
53068
  evidence: "No compatible parameters for testing"
53063
53069
  };
53064
53070
  }
53071
+ const securityTimeout = this.config.securityTestTimeout ?? 5e3;
53065
53072
  const response = await this.executeWithTimeout(
53066
53073
  callTool(tool.name, params),
53067
- 5e3
53074
+ securityTimeout
53068
53075
  );
53069
53076
  if (this.isConnectionError(response)) {
53070
53077
  return {
@@ -59266,13 +59273,13 @@ const App = () => {
59266
59273
  ) });
59267
59274
  if (window.location.pathname === "/oauth/callback") {
59268
59275
  const OAuthCallback = React.lazy(
59269
- () => __vitePreload(() => import("./OAuthCallback-DDbR9we4.js"), true ? [] : void 0)
59276
+ () => __vitePreload(() => import("./OAuthCallback-DNYBkA2C.js"), true ? [] : void 0)
59270
59277
  );
59271
59278
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
59272
59279
  }
59273
59280
  if (window.location.pathname === "/oauth/callback/debug") {
59274
59281
  const OAuthDebugCallback = React.lazy(
59275
- () => __vitePreload(() => import("./OAuthDebugCallback-Bel6ibpN.js"), true ? [] : void 0)
59282
+ () => __vitePreload(() => import("./OAuthDebugCallback-EhdSHXee.js"), true ? [] : void 0)
59276
59283
  );
59277
59284
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
59278
59285
  }
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-B55OPPJA.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BRiFDs-g.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DiyPO_Zj.css">
10
10
  </head>
11
11
  <body>
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Assessment Configuration Types
3
+ *
4
+ * Configuration interfaces and preset configurations for assessments.
5
+ *
6
+ * @module assessment/configTypes
7
+ */
8
+ /**
9
+ * Claude Code Bridge Configuration
10
+ * Enables integration with Claude Code CLI for intelligent analysis
11
+ */
12
+ export interface ClaudeCodeConfig {
13
+ enabled: boolean;
14
+ features: {
15
+ intelligentTestGeneration: boolean;
16
+ aupSemanticAnalysis: boolean;
17
+ annotationInference: boolean;
18
+ documentationQuality: boolean;
19
+ };
20
+ timeout: number;
21
+ workingDir?: string;
22
+ maxRetries?: number;
23
+ }
24
+ export interface AssessmentConfiguration {
25
+ testTimeout: number;
26
+ /** Security-specific test timeout in ms (default: 5000). Lower than testTimeout for fast payload testing. */
27
+ securityTestTimeout?: number;
28
+ delayBetweenTests?: number;
29
+ skipBrokenTools: boolean;
30
+ reviewerMode?: boolean;
31
+ enableExtendedAssessment?: boolean;
32
+ documentationVerbosity?: "minimal" | "standard" | "verbose";
33
+ parallelTesting?: boolean;
34
+ maxParallelTests?: number;
35
+ scenariosPerTool?: number;
36
+ maxToolsToTestForErrors?: number;
37
+ selectedToolsForTesting?: string[];
38
+ securityPatternsToTest?: number;
39
+ enableDomainTesting?: boolean;
40
+ mcpProtocolVersion?: string;
41
+ enableSourceCodeAnalysis?: boolean;
42
+ patternConfigPath?: string;
43
+ claudeCode?: ClaudeCodeConfig;
44
+ temporalInvocations?: number;
45
+ assessmentCategories?: {
46
+ functionality: boolean;
47
+ security: boolean;
48
+ documentation: boolean;
49
+ errorHandling: boolean;
50
+ usability: boolean;
51
+ mcpSpecCompliance?: boolean;
52
+ aupCompliance?: boolean;
53
+ toolAnnotations?: boolean;
54
+ prohibitedLibraries?: boolean;
55
+ manifestValidation?: boolean;
56
+ portability?: boolean;
57
+ externalAPIScanner?: boolean;
58
+ authentication?: boolean;
59
+ temporal?: boolean;
60
+ resources?: boolean;
61
+ prompts?: boolean;
62
+ crossCapability?: boolean;
63
+ };
64
+ }
65
+ export declare const DEFAULT_ASSESSMENT_CONFIG: AssessmentConfiguration;
66
+ export declare const REVIEWER_MODE_CONFIG: AssessmentConfiguration;
67
+ export declare const DEVELOPER_MODE_CONFIG: AssessmentConfiguration;
68
+ export declare const AUDIT_MODE_CONFIG: AssessmentConfiguration;
69
+ export declare const CLAUDE_ENHANCED_AUDIT_CONFIG: AssessmentConfiguration;
70
+ //# sourceMappingURL=configTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configTypes.d.ts","sourceRoot":"","sources":["../../../src/lib/assessment/configTypes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE;QACR,yBAAyB,EAAE,OAAO,CAAC;QACnC,mBAAmB,EAAE,OAAO,CAAC;QAC7B,mBAAmB,EAAE,OAAO,CAAC;QAC7B,oBAAoB,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,6GAA6G;IAC7G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IAEzB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,sBAAsB,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAI5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE;QACrB,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;QAClB,aAAa,EAAE,OAAO,CAAC;QACvB,aAAa,EAAE,OAAO,CAAC;QACvB,SAAS,EAAE,OAAO,CAAC;QACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AAMD,eAAO,MAAM,yBAAyB,EAAE,uBAgCvC,CAAC;AAIF,eAAO,MAAM,oBAAoB,EAAE,uBAiClC,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,uBAgCnC,CAAC;AAIF,eAAO,MAAM,iBAAiB,EAAE,uBAgC/B,CAAC;AAIF,eAAO,MAAM,4BAA4B,EAAE,uBA2C1C,CAAC"}
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Assessment Configuration Types
3
+ *
4
+ * Configuration interfaces and preset configurations for assessments.
5
+ *
6
+ * @module assessment/configTypes
7
+ */
8
+ // ============================================================================
9
+ // Configuration Presets
10
+ // ============================================================================
11
+ export const DEFAULT_ASSESSMENT_CONFIG = {
12
+ testTimeout: 30000, // 30 seconds per tool
13
+ delayBetweenTests: 0, // No delay by default
14
+ skipBrokenTools: false,
15
+ reviewerMode: false,
16
+ enableExtendedAssessment: true, // Enable MCP Spec Compliance assessment by default
17
+ parallelTesting: false,
18
+ maxParallelTests: 5,
19
+ securityPatternsToTest: 8, // Test all security patterns by default
20
+ enableDomainTesting: true, // Enable advanced security testing by default (all 8 backend patterns)
21
+ mcpProtocolVersion: "2025-06",
22
+ enableSourceCodeAnalysis: false, // Source code analysis disabled by default (requires sourceCodePath)
23
+ assessmentCategories: {
24
+ functionality: true,
25
+ security: true,
26
+ documentation: true,
27
+ errorHandling: true,
28
+ usability: true,
29
+ mcpSpecCompliance: false,
30
+ // New assessors - disabled by default, enable for MCP Directory compliance audits
31
+ aupCompliance: false,
32
+ toolAnnotations: false,
33
+ prohibitedLibraries: false,
34
+ manifestValidation: false,
35
+ portability: false,
36
+ externalAPIScanner: false,
37
+ authentication: false,
38
+ // New capability assessors - disabled by default
39
+ resources: false,
40
+ prompts: false,
41
+ crossCapability: false,
42
+ },
43
+ };
44
+ // Reviewer mode configuration: optimized for fast, human-assisted reviews
45
+ // Focuses on Anthropic's 5 core requirements only
46
+ export const REVIEWER_MODE_CONFIG = {
47
+ testTimeout: 10000, // 10 seconds per tool (faster)
48
+ delayBetweenTests: 100, // Small delay for rate limiting
49
+ skipBrokenTools: true, // Skip broken tools to save time
50
+ reviewerMode: true,
51
+ enableExtendedAssessment: false, // Disable extended assessments (not required for directory approval)
52
+ parallelTesting: true, // Faster execution
53
+ maxParallelTests: 5,
54
+ scenariosPerTool: 1, // Single realistic test per tool
55
+ securityPatternsToTest: 3, // Test only 3 critical security patterns
56
+ enableDomainTesting: false, // Use basic security testing for speed (3 patterns)
57
+ mcpProtocolVersion: "2025-06",
58
+ enableSourceCodeAnalysis: false,
59
+ assessmentCategories: {
60
+ functionality: true,
61
+ security: true,
62
+ documentation: true,
63
+ errorHandling: true,
64
+ usability: true,
65
+ mcpSpecCompliance: false, // Not part of Anthropic's 5 core requirements
66
+ // New assessors - disabled in reviewer mode for speed
67
+ aupCompliance: false,
68
+ toolAnnotations: false,
69
+ prohibitedLibraries: false,
70
+ manifestValidation: false,
71
+ portability: false,
72
+ externalAPIScanner: false,
73
+ authentication: false,
74
+ // New capability assessors - disabled in reviewer mode for speed
75
+ resources: false,
76
+ prompts: false,
77
+ crossCapability: false,
78
+ },
79
+ };
80
+ // Developer mode configuration: comprehensive testing for debugging
81
+ export const DEVELOPER_MODE_CONFIG = {
82
+ testTimeout: 30000, // 30 seconds per tool
83
+ delayBetweenTests: 500, // Moderate delay for thorough testing
84
+ skipBrokenTools: false,
85
+ reviewerMode: false,
86
+ enableExtendedAssessment: true,
87
+ parallelTesting: false, // Sequential for easier debugging
88
+ maxParallelTests: 5,
89
+ securityPatternsToTest: 8, // Test all security patterns
90
+ enableDomainTesting: true, // Enable advanced security testing (all 8 backend patterns)
91
+ mcpProtocolVersion: "2025-06",
92
+ enableSourceCodeAnalysis: true, // Enable source code analysis if path provided
93
+ assessmentCategories: {
94
+ functionality: true,
95
+ security: true,
96
+ documentation: true,
97
+ errorHandling: true,
98
+ usability: true,
99
+ mcpSpecCompliance: true, // Include extended assessments
100
+ // New assessors - enabled in developer mode for comprehensive testing
101
+ aupCompliance: true,
102
+ toolAnnotations: true,
103
+ prohibitedLibraries: true,
104
+ manifestValidation: false, // MCPB bundle-specific, disabled by default
105
+ portability: false, // MCPB bundle-specific, disabled by default
106
+ externalAPIScanner: true,
107
+ authentication: true,
108
+ // New capability assessors - enabled in developer mode
109
+ resources: true,
110
+ prompts: true,
111
+ crossCapability: true,
112
+ },
113
+ };
114
+ // MCP Directory Audit mode: focuses on compliance gap assessors
115
+ // Use for pre-submission validation to Anthropic MCP Directory
116
+ export const AUDIT_MODE_CONFIG = {
117
+ testTimeout: 30000,
118
+ delayBetweenTests: 100,
119
+ skipBrokenTools: false,
120
+ reviewerMode: false,
121
+ enableExtendedAssessment: true,
122
+ parallelTesting: true, // Parallel for faster audits
123
+ maxParallelTests: 5,
124
+ securityPatternsToTest: 8,
125
+ enableDomainTesting: true,
126
+ mcpProtocolVersion: "2025-06",
127
+ enableSourceCodeAnalysis: true, // Deep analysis for audits
128
+ assessmentCategories: {
129
+ functionality: true,
130
+ security: true,
131
+ documentation: true,
132
+ errorHandling: true,
133
+ usability: true,
134
+ mcpSpecCompliance: true,
135
+ // All new assessors enabled for audit mode
136
+ aupCompliance: true,
137
+ toolAnnotations: true,
138
+ prohibitedLibraries: true,
139
+ manifestValidation: false, // MCPB bundle-specific, disabled by default
140
+ portability: false, // MCPB bundle-specific, disabled by default
141
+ externalAPIScanner: true,
142
+ authentication: true,
143
+ // New capability assessors - enabled in audit mode
144
+ resources: true,
145
+ prompts: true,
146
+ crossCapability: true,
147
+ },
148
+ };
149
+ // Claude-enhanced audit mode: uses Claude Code for intelligent analysis
150
+ // Reduces false positives in AUP scanning and improves test quality
151
+ export const CLAUDE_ENHANCED_AUDIT_CONFIG = {
152
+ testTimeout: 30000,
153
+ delayBetweenTests: 100,
154
+ skipBrokenTools: false,
155
+ reviewerMode: false,
156
+ enableExtendedAssessment: true,
157
+ parallelTesting: false, // Sequential when using Claude to avoid rate limiting
158
+ maxParallelTests: 1,
159
+ securityPatternsToTest: 8,
160
+ enableDomainTesting: true,
161
+ mcpProtocolVersion: "2025-06",
162
+ enableSourceCodeAnalysis: true,
163
+ // Claude Code integration enabled
164
+ claudeCode: {
165
+ enabled: true,
166
+ features: {
167
+ intelligentTestGeneration: true, // Generate semantically meaningful test params
168
+ aupSemanticAnalysis: true, // Reduce false positives in AUP scanning
169
+ annotationInference: true, // Detect annotation misalignments
170
+ documentationQuality: true, // Assess documentation quality semantically
171
+ },
172
+ timeout: 90000, // 90 seconds for Claude calls
173
+ maxRetries: 2,
174
+ },
175
+ assessmentCategories: {
176
+ functionality: true,
177
+ security: true,
178
+ documentation: true,
179
+ errorHandling: true,
180
+ usability: true,
181
+ mcpSpecCompliance: true,
182
+ aupCompliance: true,
183
+ toolAnnotations: true,
184
+ prohibitedLibraries: true,
185
+ manifestValidation: false, // MCPB bundle-specific, disabled by default
186
+ portability: false, // MCPB bundle-specific, disabled by default
187
+ externalAPIScanner: true,
188
+ authentication: true,
189
+ // New capability assessors - enabled in Claude mode
190
+ resources: true,
191
+ prompts: true,
192
+ crossCapability: true,
193
+ },
194
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Assessment Constants
3
+ *
4
+ * Constant values used in security testing.
5
+ *
6
+ * @module assessment/constants
7
+ */
8
+ import type { SecurityTestResult } from "./resultTypes.js";
9
+ export declare const PROMPT_INJECTION_TESTS: Omit<SecurityTestResult, "vulnerable" | "evidence">[];
10
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/assessment/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,eAAO,MAAM,sBAAsB,EAAE,IAAI,CACvC,kBAAkB,EAClB,YAAY,GAAG,UAAU,CAC1B,EAqDA,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Assessment Constants
3
+ *
4
+ * Constant values used in security testing.
5
+ *
6
+ * @module assessment/constants
7
+ */
8
+ // Backend API security patterns (8 total) - tests API security, not LLM behaviors
9
+ export const PROMPT_INJECTION_TESTS = [
10
+ // Critical Injection (3)
11
+ {
12
+ testName: "Command Injection",
13
+ description: "Test if tool executes system commands",
14
+ payload: "; rm -rf /; echo 'test'",
15
+ riskLevel: "HIGH",
16
+ },
17
+ {
18
+ testName: "SQL Injection",
19
+ description: "Test if tool properly escapes SQL commands",
20
+ payload: "'; DROP TABLE users;--",
21
+ riskLevel: "HIGH",
22
+ },
23
+ {
24
+ testName: "Path Traversal",
25
+ description: "Test if tool allows access to files outside intended directory",
26
+ payload: "../../../etc/passwd",
27
+ riskLevel: "HIGH",
28
+ },
29
+ // Input Validation (3)
30
+ {
31
+ testName: "Type Safety",
32
+ description: "Test if tool validates parameter types correctly",
33
+ payload: "not_a_number",
34
+ riskLevel: "MEDIUM",
35
+ },
36
+ {
37
+ testName: "Boundary Testing",
38
+ description: "Test edge cases and boundary conditions",
39
+ payload: "",
40
+ riskLevel: "LOW",
41
+ },
42
+ {
43
+ testName: "Required Fields",
44
+ description: "Test if tool validates required parameters",
45
+ payload: "MISSING_REQUIRED",
46
+ riskLevel: "MEDIUM",
47
+ },
48
+ // Protocol Compliance (2)
49
+ {
50
+ testName: "MCP Error Format",
51
+ description: "Verify errors follow MCP protocol specification",
52
+ payload: "INVALID_TRIGGER_ERROR",
53
+ riskLevel: "LOW",
54
+ },
55
+ {
56
+ testName: "Timeout Handling",
57
+ description: "Test if tool handles long operations gracefully",
58
+ payload: "SIMULATE_LONG_OPERATION",
59
+ riskLevel: "LOW",
60
+ },
61
+ ];
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Core Assessment Types
3
+ *
4
+ * Foundational types used across all assessment modules.
5
+ * These are the building blocks that other type files depend on.
6
+ *
7
+ * @module assessment/coreTypes
8
+ */
9
+ export type AssessmentStatus = "PASS" | "FAIL" | "NEED_MORE_INFO";
10
+ export type SecurityRiskLevel = "LOW" | "MEDIUM" | "HIGH";
11
+ /**
12
+ * Alignment status for tool annotations.
13
+ * Extends beyond PASS/FAIL to handle ambiguous cases.
14
+ */
15
+ export type AlignmentStatus = "ALIGNED" | "MISALIGNED" | "REVIEW_RECOMMENDED" | "UNKNOWN";
16
+ /**
17
+ * Confidence level for behavior inference
18
+ */
19
+ export type InferenceConfidence = "high" | "medium" | "low";
20
+ /**
21
+ * Assessment category tier for distinguishing core vs optional assessments.
22
+ * - "core": Always applicable to any MCP server audit
23
+ * - "optional": Contextual assessments (e.g., MCPB bundle-specific)
24
+ */
25
+ export type AssessmentCategoryTier = "core" | "optional";
26
+ /**
27
+ * Metadata for assessment categories including tier and applicability info.
28
+ */
29
+ export interface AssessmentCategoryMetadata {
30
+ tier: AssessmentCategoryTier;
31
+ description: string;
32
+ applicableTo?: string;
33
+ }
34
+ /**
35
+ * Category metadata mapping for all assessment modules.
36
+ * Used for CLI output and downstream consumers to understand category context.
37
+ *
38
+ * Note: Uses `satisfies` to preserve literal key types while ensuring type safety.
39
+ * This allows deriving AssessmentModuleName from the object keys.
40
+ */
41
+ declare const ASSESSMENT_CATEGORY_METADATA_INTERNAL: {
42
+ functionality: {
43
+ tier: "core";
44
+ description: string;
45
+ };
46
+ security: {
47
+ tier: "core";
48
+ description: string;
49
+ };
50
+ documentation: {
51
+ tier: "core";
52
+ description: string;
53
+ };
54
+ errorHandling: {
55
+ tier: "core";
56
+ description: string;
57
+ };
58
+ usability: {
59
+ tier: "core";
60
+ description: string;
61
+ };
62
+ mcpSpecCompliance: {
63
+ tier: "core";
64
+ description: string;
65
+ };
66
+ aupCompliance: {
67
+ tier: "core";
68
+ description: string;
69
+ };
70
+ toolAnnotations: {
71
+ tier: "core";
72
+ description: string;
73
+ };
74
+ prohibitedLibraries: {
75
+ tier: "core";
76
+ description: string;
77
+ };
78
+ manifestValidation: {
79
+ tier: "optional";
80
+ description: string;
81
+ applicableTo: string;
82
+ };
83
+ portability: {
84
+ tier: "optional";
85
+ description: string;
86
+ applicableTo: string;
87
+ };
88
+ externalAPIScanner: {
89
+ tier: "core";
90
+ description: string;
91
+ };
92
+ authentication: {
93
+ tier: "core";
94
+ description: string;
95
+ };
96
+ temporal: {
97
+ tier: "core";
98
+ description: string;
99
+ };
100
+ resources: {
101
+ tier: "core";
102
+ description: string;
103
+ };
104
+ prompts: {
105
+ tier: "core";
106
+ description: string;
107
+ };
108
+ crossCapability: {
109
+ tier: "core";
110
+ description: string;
111
+ };
112
+ };
113
+ /**
114
+ * Type-safe module name derived from ASSESSMENT_CATEGORY_METADATA keys.
115
+ * Use this type for compile-time validation of module names.
116
+ */
117
+ export type AssessmentModuleName = keyof typeof ASSESSMENT_CATEGORY_METADATA_INTERNAL;
118
+ /**
119
+ * Re-export with original name for backward compatibility.
120
+ * Type is preserved as Record<AssessmentModuleName, AssessmentCategoryMetadata>.
121
+ */
122
+ export declare const ASSESSMENT_CATEGORY_METADATA: Record<AssessmentModuleName, AssessmentCategoryMetadata>;
123
+ /**
124
+ * Generate module configuration derived from ASSESSMENT_CATEGORY_METADATA.
125
+ * Single source of truth for all assessment module names.
126
+ *
127
+ * @param options.sourceCodePath - If true, enables externalAPIScanner
128
+ * @param options.skipTemporal - If true, disables temporal assessment
129
+ * @returns Record of module names to enabled state (type-safe)
130
+ */
131
+ export declare function getAllModulesConfig(options: {
132
+ sourceCodePath?: boolean;
133
+ skipTemporal?: boolean;
134
+ }): Record<AssessmentModuleName, boolean>;
135
+ /**
136
+ * Persistence model for MCP servers (Three-Tier Classification).
137
+ *
138
+ * These types are re-exported from the services layer for backward compatibility
139
+ * with existing imports from `@/lib/assessmentTypes`. This cross-layer import
140
+ * is intentional and documented:
141
+ *
142
+ * **Why cross-layer?**
143
+ * - PersistenceModel and ServerPersistenceContext are defined in
144
+ * `services/assessment/config/annotationPatterns.ts` alongside the pattern
145
+ * matching logic that uses them.
146
+ * - Moving the types here would create a circular dependency since the
147
+ * annotationPatterns module needs to import its own types.
148
+ * - Type-only imports (`export type`) don't create runtime dependencies,
149
+ * so this cross-layer reference is safe.
150
+ *
151
+ * **Type definitions:**
152
+ * - "immediate": Write operations persist directly to storage (database, file, API)
153
+ * - "deferred": Write operations are in-memory until explicit save operation
154
+ * - "unknown": Cannot determine persistence model
155
+ *
156
+ * @see services/assessment/config/annotationPatterns.ts for implementation
157
+ */
158
+ export type { PersistenceModel, ServerPersistenceContext, } from "../../services/assessment/config/annotationPatterns.js";
159
+ //# sourceMappingURL=coreTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coreTypes.d.ts","sourceRoot":"","sources":["../../../src/lib/assessment/coreTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,YAAY,GACZ,oBAAoB,GACpB,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DW,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC9B,MAAM,OAAO,qCAAqC,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAC/C,oBAAoB,EACpB,0BAA0B,CACa,CAAC;AAE1C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,MAAM,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAaxC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,YAAY,EACV,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qDAAqD,CAAC"}