@bryan-thompson/inspector-assessment-client 1.12.0 → 1.13.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/dist/assets/{OAuthCallback-DD8JgGmx.js → OAuthCallback-D8KW6pFf.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-CGeg00AP.js → OAuthDebugCallback-D15nNAOl.js} +1 -1
- package/dist/assets/{index-sUICDw7A.js → index-cVkEgqCc.js} +130 -5
- package/dist/index.html +1 -1
- package/lib/lib/assessmentTypes.d.ts +17 -0
- package/lib/lib/assessmentTypes.d.ts.map +1 -1
- package/lib/lib/policyMapping.d.ts +183 -0
- package/lib/lib/policyMapping.d.ts.map +1 -0
- package/lib/lib/policyMapping.js +442 -0
- package/lib/lib/reportFormatters/MarkdownReportFormatter.d.ts +91 -0
- package/lib/lib/reportFormatters/MarkdownReportFormatter.d.ts.map +1 -0
- package/lib/lib/reportFormatters/MarkdownReportFormatter.js +498 -0
- package/lib/lib/reportFormatters/index.d.ts +50 -0
- package/lib/lib/reportFormatters/index.d.ts.map +1 -0
- package/lib/lib/reportFormatters/index.js +81 -0
- package/lib/lib/securityPatterns.d.ts +3 -3
- package/lib/lib/securityPatterns.d.ts.map +1 -1
- package/lib/lib/securityPatterns.js +129 -4
- package/lib/services/assessment/PolicyComplianceGenerator.d.ts +119 -0
- package/lib/services/assessment/PolicyComplianceGenerator.d.ts.map +1 -0
- package/lib/services/assessment/PolicyComplianceGenerator.js +632 -0
- package/lib/services/assessment/modules/ToolAnnotationAssessor.d.ts +6 -0
- package/lib/services/assessment/modules/ToolAnnotationAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/ToolAnnotationAssessor.js +77 -20
- package/package.json +1 -1
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Policy Compliance Mapping Types
|
|
3
|
+
*
|
|
4
|
+
* Maps MCP Inspector assessment results to Anthropic's official Software Directory Policy
|
|
5
|
+
* requirements (30 total). Based on:
|
|
6
|
+
* - https://support.anthropic.com/en/articles/11697096-anthropic-mcp-directory-policy
|
|
7
|
+
* - https://support.claude.com/en/articles/12922490-remote-mcp-server-submission-guide
|
|
8
|
+
*
|
|
9
|
+
* @module policyMapping
|
|
10
|
+
*/
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Anthropic Policy Requirements (30 Total)
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Complete list of Anthropic's Software Directory Policy requirements.
|
|
16
|
+
*
|
|
17
|
+
* Organized by category:
|
|
18
|
+
* - Safety & Security: 6 requirements (SAFETY-1 to SAFETY-6)
|
|
19
|
+
* - Compatibility: 6 requirements (COMPAT-1 to COMPAT-6)
|
|
20
|
+
* - Functionality: 7 requirements (FUNC-1 to FUNC-7)
|
|
21
|
+
* - Developer Requirements: 8 requirements (DEV-1 to DEV-8)
|
|
22
|
+
* - Unsupported Use Cases: 3 requirements (UNSUPP-1 to UNSUPP-3)
|
|
23
|
+
*/
|
|
24
|
+
export const ANTHROPIC_POLICY_REQUIREMENTS = [
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// SAFETY & SECURITY (6 requirements)
|
|
27
|
+
// ============================================================================
|
|
28
|
+
{
|
|
29
|
+
id: "SAFETY-1",
|
|
30
|
+
name: "AUP Compliance",
|
|
31
|
+
description: "MCP servers must not facilitate violation of Anthropic's Acceptable Use Policy (AUP). This includes all 14 prohibited categories (A-N).",
|
|
32
|
+
category: "safety_security",
|
|
33
|
+
severity: "CRITICAL",
|
|
34
|
+
moduleSource: ["aupCompliance"],
|
|
35
|
+
automatable: true,
|
|
36
|
+
policyReference: "Safety & Security Requirements",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "SAFETY-2",
|
|
40
|
+
name: "Universal Usage Standards",
|
|
41
|
+
description: "Servers must meet core safety requirements and universal usage standards as defined by Anthropic.",
|
|
42
|
+
category: "safety_security",
|
|
43
|
+
severity: "CRITICAL",
|
|
44
|
+
moduleSource: ["aupCompliance", "security"],
|
|
45
|
+
automatable: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "SAFETY-3",
|
|
49
|
+
name: "High-Risk Domain Compliance",
|
|
50
|
+
description: "Servers operating in high-risk domains (medical, legal, financial) must implement appropriate safeguards and disclaimers.",
|
|
51
|
+
category: "safety_security",
|
|
52
|
+
severity: "HIGH",
|
|
53
|
+
moduleSource: ["aupCompliance"],
|
|
54
|
+
automatable: false,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "SAFETY-4",
|
|
58
|
+
name: "OAuth 2.0 Security",
|
|
59
|
+
description: "Remote servers using authentication must implement OAuth 2.0 with PKCE and RFC 8707 resource indicators.",
|
|
60
|
+
category: "safety_security",
|
|
61
|
+
severity: "HIGH",
|
|
62
|
+
moduleSource: ["mcpSpecCompliance"],
|
|
63
|
+
automatable: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "SAFETY-5",
|
|
67
|
+
name: "No External Behavior Injection",
|
|
68
|
+
description: "Servers must not dynamically pull instructions from external sources that could modify Claude's behavior.",
|
|
69
|
+
category: "safety_security",
|
|
70
|
+
severity: "CRITICAL",
|
|
71
|
+
moduleSource: ["security"],
|
|
72
|
+
automatable: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "SAFETY-6",
|
|
76
|
+
name: "No Server Interference",
|
|
77
|
+
description: "Servers must not interfere with other MCP servers or the host system.",
|
|
78
|
+
category: "safety_security",
|
|
79
|
+
severity: "HIGH",
|
|
80
|
+
moduleSource: ["security"],
|
|
81
|
+
automatable: true,
|
|
82
|
+
},
|
|
83
|
+
// ============================================================================
|
|
84
|
+
// COMPATIBILITY (6 requirements)
|
|
85
|
+
// ============================================================================
|
|
86
|
+
{
|
|
87
|
+
id: "COMPAT-1",
|
|
88
|
+
name: "Streamable HTTP Transport",
|
|
89
|
+
description: "Remote servers must support Streamable HTTP transport for Claude web and mobile clients.",
|
|
90
|
+
category: "compatibility",
|
|
91
|
+
severity: "HIGH",
|
|
92
|
+
moduleSource: ["mcpSpecCompliance"],
|
|
93
|
+
automatable: false,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "COMPAT-2",
|
|
97
|
+
name: "SSE Deprecation Warning",
|
|
98
|
+
description: "Server-Sent Events (SSE) transport is deprecated. Servers should migrate to Streamable HTTP.",
|
|
99
|
+
category: "compatibility",
|
|
100
|
+
severity: "MEDIUM",
|
|
101
|
+
moduleSource: ["mcpSpecCompliance"],
|
|
102
|
+
automatable: true,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "COMPAT-3",
|
|
106
|
+
name: "Current Dependencies",
|
|
107
|
+
description: "Servers must use reasonably current package versions without known critical vulnerabilities.",
|
|
108
|
+
category: "compatibility",
|
|
109
|
+
severity: "MEDIUM",
|
|
110
|
+
moduleSource: ["prohibitedLibraries"],
|
|
111
|
+
automatable: true,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "COMPAT-4",
|
|
115
|
+
name: "Token Efficiency",
|
|
116
|
+
description: "Servers should use tokens frugally, with usage commensurate with the task complexity.",
|
|
117
|
+
category: "compatibility",
|
|
118
|
+
severity: "MEDIUM",
|
|
119
|
+
moduleSource: ["functionality"],
|
|
120
|
+
automatable: false,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "COMPAT-5",
|
|
124
|
+
name: "Response Size Limit",
|
|
125
|
+
description: "Tool responses should not exceed 25,000 tokens per response.",
|
|
126
|
+
category: "compatibility",
|
|
127
|
+
severity: "MEDIUM",
|
|
128
|
+
moduleSource: ["functionality"],
|
|
129
|
+
automatable: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "COMPAT-6",
|
|
133
|
+
name: "Cross-Platform Portability",
|
|
134
|
+
description: "Local servers must work across platforms without hardcoded paths or platform-specific assumptions.",
|
|
135
|
+
category: "compatibility",
|
|
136
|
+
severity: "MEDIUM",
|
|
137
|
+
moduleSource: ["portability"],
|
|
138
|
+
automatable: true,
|
|
139
|
+
},
|
|
140
|
+
// ============================================================================
|
|
141
|
+
// FUNCTIONALITY (7 requirements)
|
|
142
|
+
// ============================================================================
|
|
143
|
+
{
|
|
144
|
+
id: "FUNC-1",
|
|
145
|
+
name: "Reliable Performance",
|
|
146
|
+
description: "Servers must provide fast, reliable response times appropriate for the operation.",
|
|
147
|
+
category: "functionality",
|
|
148
|
+
severity: "HIGH",
|
|
149
|
+
moduleSource: ["functionality"],
|
|
150
|
+
automatable: true,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "FUNC-2",
|
|
154
|
+
name: "High Availability",
|
|
155
|
+
description: "Remote servers must maintain consistent uptime and availability.",
|
|
156
|
+
category: "functionality",
|
|
157
|
+
severity: "HIGH",
|
|
158
|
+
moduleSource: ["functionality"],
|
|
159
|
+
automatable: false,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "FUNC-3",
|
|
163
|
+
name: "Graceful Error Handling",
|
|
164
|
+
description: "Servers must provide helpful error feedback following MCP protocol. No generic 'unknown error' messages.",
|
|
165
|
+
category: "functionality",
|
|
166
|
+
severity: "HIGH",
|
|
167
|
+
moduleSource: ["errorHandling"],
|
|
168
|
+
automatable: true,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: "FUNC-4",
|
|
172
|
+
name: "Tool Description Accuracy",
|
|
173
|
+
description: "Tool descriptions must accurately reflect actual functionality. No misleading or exaggerated claims.",
|
|
174
|
+
category: "functionality",
|
|
175
|
+
severity: "HIGH",
|
|
176
|
+
moduleSource: ["functionality", "documentation"],
|
|
177
|
+
automatable: false,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "FUNC-5",
|
|
181
|
+
name: "Tool Annotations Required",
|
|
182
|
+
description: "All tools must include readOnlyHint and destructiveHint annotations per MCP specification.",
|
|
183
|
+
category: "functionality",
|
|
184
|
+
severity: "HIGH",
|
|
185
|
+
moduleSource: ["toolAnnotations"],
|
|
186
|
+
automatable: true,
|
|
187
|
+
policyReference: "Policy #17",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "FUNC-6",
|
|
191
|
+
name: "No Unexpected Functionality",
|
|
192
|
+
description: "Servers must not include hidden functionality or fail to deliver promised features.",
|
|
193
|
+
category: "functionality",
|
|
194
|
+
severity: "HIGH",
|
|
195
|
+
moduleSource: ["functionality", "security"],
|
|
196
|
+
automatable: false,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "FUNC-7",
|
|
200
|
+
name: "Clear Tool Identity",
|
|
201
|
+
description: "Tools must have clear, non-conflicting descriptions that don't confuse with other servers.",
|
|
202
|
+
category: "functionality",
|
|
203
|
+
severity: "MEDIUM",
|
|
204
|
+
moduleSource: ["usability"],
|
|
205
|
+
automatable: true,
|
|
206
|
+
},
|
|
207
|
+
// ============================================================================
|
|
208
|
+
// DEVELOPER REQUIREMENTS (8 requirements)
|
|
209
|
+
// ============================================================================
|
|
210
|
+
{
|
|
211
|
+
id: "DEV-1",
|
|
212
|
+
name: "Privacy Policy",
|
|
213
|
+
description: "Developers must provide clear data handling documentation and privacy policy URLs.",
|
|
214
|
+
category: "developer_requirements",
|
|
215
|
+
severity: "HIGH",
|
|
216
|
+
moduleSource: ["manifestValidation", "documentation"],
|
|
217
|
+
automatable: true,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: "DEV-2",
|
|
221
|
+
name: "Contact Information",
|
|
222
|
+
description: "Developers must provide verified support channels and contact information.",
|
|
223
|
+
category: "developer_requirements",
|
|
224
|
+
severity: "MEDIUM",
|
|
225
|
+
moduleSource: ["documentation"],
|
|
226
|
+
automatable: false,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: "DEV-3",
|
|
230
|
+
name: "Documentation",
|
|
231
|
+
description: "Servers must include documentation explaining how the server works and troubleshooting guidance.",
|
|
232
|
+
category: "developer_requirements",
|
|
233
|
+
severity: "HIGH",
|
|
234
|
+
moduleSource: ["documentation"],
|
|
235
|
+
automatable: true,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "DEV-4",
|
|
239
|
+
name: "Testing Account",
|
|
240
|
+
description: "Developers must provide sample data or testing accounts for verification.",
|
|
241
|
+
category: "developer_requirements",
|
|
242
|
+
severity: "MEDIUM",
|
|
243
|
+
moduleSource: [],
|
|
244
|
+
automatable: false,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "DEV-5",
|
|
248
|
+
name: "Example Prompts",
|
|
249
|
+
description: "Servers must include at least 3 example prompts demonstrating core functionality.",
|
|
250
|
+
category: "developer_requirements",
|
|
251
|
+
severity: "HIGH",
|
|
252
|
+
moduleSource: ["documentation"],
|
|
253
|
+
automatable: true,
|
|
254
|
+
policyReference: "Policy #24",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "DEV-6",
|
|
258
|
+
name: "API Ownership",
|
|
259
|
+
description: "Developers must have control of or affiliation with connected API endpoints.",
|
|
260
|
+
category: "developer_requirements",
|
|
261
|
+
severity: "HIGH",
|
|
262
|
+
moduleSource: [],
|
|
263
|
+
automatable: false,
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: "DEV-7",
|
|
267
|
+
name: "Maintenance Commitment",
|
|
268
|
+
description: "Developers must commit to addressing issues in reasonable timeframes.",
|
|
269
|
+
category: "developer_requirements",
|
|
270
|
+
severity: "MEDIUM",
|
|
271
|
+
moduleSource: [],
|
|
272
|
+
automatable: false,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: "DEV-8",
|
|
276
|
+
name: "Terms Agreement",
|
|
277
|
+
description: "Developers must accept MCP Directory Terms and Conditions.",
|
|
278
|
+
category: "developer_requirements",
|
|
279
|
+
severity: "CRITICAL",
|
|
280
|
+
moduleSource: [],
|
|
281
|
+
automatable: false,
|
|
282
|
+
},
|
|
283
|
+
// ============================================================================
|
|
284
|
+
// UNSUPPORTED USE CASES (3 requirements)
|
|
285
|
+
// ============================================================================
|
|
286
|
+
{
|
|
287
|
+
id: "UNSUPP-1",
|
|
288
|
+
name: "No Financial Transactions",
|
|
289
|
+
description: "Servers must not facilitate financial transactions, cryptocurrency, or money transfers.",
|
|
290
|
+
category: "unsupported_use_cases",
|
|
291
|
+
severity: "CRITICAL",
|
|
292
|
+
moduleSource: ["prohibitedLibraries", "aupCompliance"],
|
|
293
|
+
automatable: true,
|
|
294
|
+
policyReference: "Policy #28",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "UNSUPP-2",
|
|
298
|
+
name: "No Media Generation",
|
|
299
|
+
description: "Servers must not generate images, videos, or audio content.",
|
|
300
|
+
category: "unsupported_use_cases",
|
|
301
|
+
severity: "CRITICAL",
|
|
302
|
+
moduleSource: ["prohibitedLibraries", "aupCompliance"],
|
|
303
|
+
automatable: true,
|
|
304
|
+
policyReference: "Policy #29",
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: "UNSUPP-3",
|
|
308
|
+
name: "No Cross-Service Orchestration",
|
|
309
|
+
description: "Servers must not orchestrate actions across unrelated third-party services.",
|
|
310
|
+
category: "unsupported_use_cases",
|
|
311
|
+
severity: "HIGH",
|
|
312
|
+
moduleSource: ["aupCompliance"],
|
|
313
|
+
automatable: false,
|
|
314
|
+
policyReference: "Policy #30",
|
|
315
|
+
},
|
|
316
|
+
];
|
|
317
|
+
// ============================================================================
|
|
318
|
+
// Helper Functions
|
|
319
|
+
// ============================================================================
|
|
320
|
+
/**
|
|
321
|
+
* Get all requirements for a specific category
|
|
322
|
+
*/
|
|
323
|
+
export function getRequirementsByCategory(category) {
|
|
324
|
+
return ANTHROPIC_POLICY_REQUIREMENTS.filter((r) => r.category === category);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get a specific requirement by ID
|
|
328
|
+
*/
|
|
329
|
+
export function getRequirementById(id) {
|
|
330
|
+
return ANTHROPIC_POLICY_REQUIREMENTS.find((r) => r.id === id);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get all requirements that a specific module provides evidence for
|
|
334
|
+
*/
|
|
335
|
+
export function getRequirementsForModule(moduleName) {
|
|
336
|
+
return ANTHROPIC_POLICY_REQUIREMENTS.filter((r) => r.moduleSource.includes(moduleName));
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Get all critical requirements
|
|
340
|
+
*/
|
|
341
|
+
export function getCriticalRequirements() {
|
|
342
|
+
return ANTHROPIC_POLICY_REQUIREMENTS.filter((r) => r.severity === "CRITICAL");
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Get all automatable requirements
|
|
346
|
+
*/
|
|
347
|
+
export function getAutomatableRequirements() {
|
|
348
|
+
return ANTHROPIC_POLICY_REQUIREMENTS.filter((r) => r.automatable);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Get human-readable category name
|
|
352
|
+
*/
|
|
353
|
+
export function getCategoryDisplayName(category) {
|
|
354
|
+
const names = {
|
|
355
|
+
safety_security: "Safety & Security",
|
|
356
|
+
compatibility: "Compatibility",
|
|
357
|
+
functionality: "Functionality",
|
|
358
|
+
developer_requirements: "Developer Requirements",
|
|
359
|
+
unsupported_use_cases: "Unsupported Use Cases",
|
|
360
|
+
};
|
|
361
|
+
return names[category];
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Convert ComplianceStatus to AssessmentStatus
|
|
365
|
+
*/
|
|
366
|
+
export function complianceToAssessmentStatus(status) {
|
|
367
|
+
switch (status) {
|
|
368
|
+
case "PASS":
|
|
369
|
+
return "PASS";
|
|
370
|
+
case "FAIL":
|
|
371
|
+
case "FLAG":
|
|
372
|
+
return "FAIL";
|
|
373
|
+
case "REVIEW":
|
|
374
|
+
case "NOT_TESTED":
|
|
375
|
+
case "NOT_APPLICABLE":
|
|
376
|
+
return "NEED_MORE_INFO";
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Calculate compliance score from results
|
|
381
|
+
*/
|
|
382
|
+
export function calculateComplianceScore(results) {
|
|
383
|
+
const applicableResults = results.filter((r) => r.status !== "NOT_APPLICABLE" && r.status !== "NOT_TESTED");
|
|
384
|
+
if (applicableResults.length === 0)
|
|
385
|
+
return 0;
|
|
386
|
+
const passed = applicableResults.filter((r) => r.status === "PASS").length;
|
|
387
|
+
return Math.round((passed / applicableResults.length) * 100);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Determine overall compliance status
|
|
391
|
+
*/
|
|
392
|
+
export function determineOverallStatus(results) {
|
|
393
|
+
// Check for any critical failures
|
|
394
|
+
const criticalFailures = results.filter((r) => r.requirement.severity === "CRITICAL" && r.status === "FAIL");
|
|
395
|
+
if (criticalFailures.length > 0) {
|
|
396
|
+
return "NON_COMPLIANT";
|
|
397
|
+
}
|
|
398
|
+
// Check for any failures
|
|
399
|
+
const failures = results.filter((r) => r.status === "FAIL");
|
|
400
|
+
if (failures.length > 0) {
|
|
401
|
+
return "NON_COMPLIANT";
|
|
402
|
+
}
|
|
403
|
+
// Check if any need review
|
|
404
|
+
const needsReview = results.filter((r) => r.status === "REVIEW" || r.status === "FLAG");
|
|
405
|
+
if (needsReview.length > 0) {
|
|
406
|
+
return "NEEDS_REVIEW";
|
|
407
|
+
}
|
|
408
|
+
return "COMPLIANT";
|
|
409
|
+
}
|
|
410
|
+
// ============================================================================
|
|
411
|
+
// Module-to-Policy Mapping
|
|
412
|
+
// ============================================================================
|
|
413
|
+
/**
|
|
414
|
+
* Mapping of assessment modules to the policy requirements they satisfy.
|
|
415
|
+
* Used by PolicyComplianceGenerator to map results.
|
|
416
|
+
*/
|
|
417
|
+
export const MODULE_TO_POLICY_MAP = {
|
|
418
|
+
aupCompliance: [
|
|
419
|
+
"SAFETY-1",
|
|
420
|
+
"SAFETY-2",
|
|
421
|
+
"SAFETY-3",
|
|
422
|
+
"UNSUPP-1",
|
|
423
|
+
"UNSUPP-2",
|
|
424
|
+
"UNSUPP-3",
|
|
425
|
+
],
|
|
426
|
+
security: ["SAFETY-2", "SAFETY-5", "SAFETY-6", "FUNC-6"],
|
|
427
|
+
functionality: ["COMPAT-4", "COMPAT-5", "FUNC-1", "FUNC-4", "FUNC-6"],
|
|
428
|
+
errorHandling: ["FUNC-3"],
|
|
429
|
+
usability: ["FUNC-7"],
|
|
430
|
+
documentation: ["DEV-1", "DEV-3", "DEV-5", "FUNC-4"],
|
|
431
|
+
mcpSpecCompliance: ["SAFETY-4", "COMPAT-1", "COMPAT-2"],
|
|
432
|
+
toolAnnotations: ["FUNC-5"],
|
|
433
|
+
prohibitedLibraries: ["COMPAT-3", "UNSUPP-1", "UNSUPP-2"],
|
|
434
|
+
manifestValidation: ["DEV-1"],
|
|
435
|
+
portability: ["COMPAT-6"],
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Get which policy requirements are evaluated by a given module
|
|
439
|
+
*/
|
|
440
|
+
export function getPolicyRequirementsForModule(moduleName) {
|
|
441
|
+
return MODULE_TO_POLICY_MAP[moduleName] || [];
|
|
442
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markdown Report Formatter
|
|
3
|
+
*
|
|
4
|
+
* Generates human-readable markdown reports from MCP assessment results.
|
|
5
|
+
* Designed for reviewers, auditors, and developers.
|
|
6
|
+
*
|
|
7
|
+
* @module MarkdownReportFormatter
|
|
8
|
+
*/
|
|
9
|
+
import type { MCPDirectoryAssessment } from "../assessmentTypes.js";
|
|
10
|
+
import type { PolicyComplianceReport } from "../policyMapping.js";
|
|
11
|
+
/**
|
|
12
|
+
* Options for markdown report generation
|
|
13
|
+
*/
|
|
14
|
+
export interface MarkdownReportOptions {
|
|
15
|
+
/** Include policy compliance section */
|
|
16
|
+
includePolicy?: boolean;
|
|
17
|
+
/** Policy compliance report (required if includePolicy is true) */
|
|
18
|
+
policyReport?: PolicyComplianceReport;
|
|
19
|
+
/** Include detailed module results */
|
|
20
|
+
includeDetails?: boolean;
|
|
21
|
+
/** Include recommendations */
|
|
22
|
+
includeRecommendations?: boolean;
|
|
23
|
+
/** Server name override */
|
|
24
|
+
serverName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Formats assessment results as Markdown
|
|
28
|
+
*/
|
|
29
|
+
export declare class MarkdownReportFormatter {
|
|
30
|
+
private options;
|
|
31
|
+
constructor(options?: MarkdownReportOptions);
|
|
32
|
+
/**
|
|
33
|
+
* Format assessment results as markdown
|
|
34
|
+
*/
|
|
35
|
+
format(assessment: MCPDirectoryAssessment): string;
|
|
36
|
+
/**
|
|
37
|
+
* Format header section
|
|
38
|
+
*/
|
|
39
|
+
private formatHeader;
|
|
40
|
+
/**
|
|
41
|
+
* Format executive summary
|
|
42
|
+
*/
|
|
43
|
+
private formatExecutiveSummary;
|
|
44
|
+
/**
|
|
45
|
+
* Format module status table
|
|
46
|
+
*/
|
|
47
|
+
private formatModuleStatusTable;
|
|
48
|
+
/**
|
|
49
|
+
* Format a single module row
|
|
50
|
+
*/
|
|
51
|
+
private formatModuleRow;
|
|
52
|
+
/**
|
|
53
|
+
* Format key findings section
|
|
54
|
+
*/
|
|
55
|
+
private formatKeyFindings;
|
|
56
|
+
/**
|
|
57
|
+
* Format policy compliance section
|
|
58
|
+
*/
|
|
59
|
+
private formatPolicyCompliance;
|
|
60
|
+
/**
|
|
61
|
+
* Format recommendations section
|
|
62
|
+
*/
|
|
63
|
+
private formatRecommendations;
|
|
64
|
+
/**
|
|
65
|
+
* Format detailed results section
|
|
66
|
+
*/
|
|
67
|
+
private formatDetailedResults;
|
|
68
|
+
/**
|
|
69
|
+
* Format footer section
|
|
70
|
+
*/
|
|
71
|
+
private formatFooter;
|
|
72
|
+
private getStatusEmoji;
|
|
73
|
+
private getComplianceStatusEmoji;
|
|
74
|
+
private complianceToAssessment;
|
|
75
|
+
private getFunctionalityFinding;
|
|
76
|
+
private getSecurityFinding;
|
|
77
|
+
private getErrorHandlingFinding;
|
|
78
|
+
private getDocumentationFinding;
|
|
79
|
+
private getUsabilityFinding;
|
|
80
|
+
private getMCPSpecFinding;
|
|
81
|
+
private getAUPFinding;
|
|
82
|
+
private getAnnotationFinding;
|
|
83
|
+
private getCriticalIssues;
|
|
84
|
+
private getWarnings;
|
|
85
|
+
private getPositiveFindings;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Create a markdown formatter with options
|
|
89
|
+
*/
|
|
90
|
+
export declare function createMarkdownFormatter(options?: MarkdownReportOptions): MarkdownReportFormatter;
|
|
91
|
+
//# sourceMappingURL=MarkdownReportFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownReportFormatter.d.ts","sourceRoot":"","sources":["../../../src/lib/reportFormatters/MarkdownReportFormatter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8BAA8B;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,OAAO,CAAwB;gBAE3B,OAAO,GAAE,qBAA0B;IAQ/C;;OAEG;IACH,MAAM,CAAC,UAAU,EAAE,sBAAsB,GAAG,MAAM;IAoClD;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAkC9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgF/B;;OAEG;IACH,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmCzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA2D9B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkD7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAwE7B;;OAEG;IACH,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,wBAAwB;IAmBhC,OAAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,WAAW;IA4BnB,OAAO,CAAC,mBAAmB;CAiC5B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,uBAAuB,CAEzB"}
|