@bryan-thompson/inspector-assessment 1.26.6 → 1.26.7
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/cli/build/__tests__/assessment-runner/assessment-executor.test.js +248 -0
- package/cli/build/__tests__/assessment-runner/config-builder.test.js +289 -0
- package/cli/build/__tests__/assessment-runner/index.test.js +41 -0
- package/cli/build/__tests__/assessment-runner/server-config.test.js +249 -0
- package/cli/build/__tests__/assessment-runner/server-connection.test.js +221 -0
- package/cli/build/__tests__/assessment-runner/source-loader.test.js +341 -0
- package/cli/build/__tests__/assessment-runner/tool-wrapper.test.js +114 -0
- package/cli/build/__tests__/assessment-runner-facade.test.js +118 -0
- package/cli/build/assess-full.js +26 -1254
- package/cli/build/lib/assessment-runner/assessment-executor.js +323 -0
- package/cli/build/lib/assessment-runner/config-builder.js +127 -0
- package/cli/build/lib/assessment-runner/index.js +20 -0
- package/cli/build/lib/assessment-runner/server-config.js +78 -0
- package/cli/build/lib/assessment-runner/server-connection.js +80 -0
- package/cli/build/lib/assessment-runner/source-loader.js +139 -0
- package/cli/build/lib/assessment-runner/tool-wrapper.js +40 -0
- package/cli/build/lib/assessment-runner/types.js +8 -0
- package/cli/build/lib/assessment-runner.js +6 -740
- package/cli/build/lib/comparison-handler.js +84 -0
- package/cli/build/lib/result-output.js +154 -0
- package/cli/package.json +1 -1
- package/client/dist/assets/{OAuthCallback-CCWVtjr7.js → OAuthCallback-kF1MLuwg.js} +1 -1
- package/client/dist/assets/{OAuthDebugCallback-DqbXfUi4.js → OAuthDebugCallback-Nv-8u0GR.js} +1 -1
- package/client/dist/assets/{index-CsDJSSWq.js → index-CCiX5wkF.js} +4 -4
- package/client/dist/index.html +1 -1
- package/client/lib/lib/assessment/configTypes.d.ts +2 -0
- package/client/lib/lib/assessment/configTypes.d.ts.map +1 -1
- package/client/lib/lib/securityPatterns.d.ts +4 -2
- package/client/lib/lib/securityPatterns.d.ts.map +1 -1
- package/client/lib/lib/securityPatterns.js +146 -2
- package/client/lib/services/assessment/modules/AUPComplianceAssessor.js +9 -9
- package/client/lib/services/assessment/modules/AuthenticationAssessor.js +4 -4
- package/client/lib/services/assessment/modules/BaseAssessor.d.ts +0 -14
- package/client/lib/services/assessment/modules/BaseAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/BaseAssessor.js +1 -33
- package/client/lib/services/assessment/modules/CrossCapabilitySecurityAssessor.js +1 -1
- package/client/lib/services/assessment/modules/DeveloperExperienceAssessor.js +1 -1
- package/client/lib/services/assessment/modules/DocumentationAssessor.js +2 -2
- package/client/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/ErrorHandlingAssessor.js +8 -8
- package/client/lib/services/assessment/modules/ExternalAPIScannerAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/ExternalAPIScannerAssessor.js +3 -3
- package/client/lib/services/assessment/modules/FunctionalityAssessor.js +9 -9
- package/client/lib/services/assessment/modules/MCPSpecComplianceAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/MCPSpecComplianceAssessor.js +12 -12
- package/client/lib/services/assessment/modules/ManifestValidationAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/ManifestValidationAssessor.js +9 -5
- package/client/lib/services/assessment/modules/PortabilityAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/PortabilityAssessor.js +3 -3
- package/client/lib/services/assessment/modules/ProhibitedLibrariesAssessor.js +4 -4
- package/client/lib/services/assessment/modules/PromptAssessor.js +2 -2
- package/client/lib/services/assessment/modules/ProtocolComplianceAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/ProtocolComplianceAssessor.js +7 -7
- package/client/lib/services/assessment/modules/ProtocolConformanceAssessor.js +1 -1
- package/client/lib/services/assessment/modules/ResourceAssessor.js +1 -1
- package/client/lib/services/assessment/modules/SecurityAssessor.d.ts +25 -2
- package/client/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/SecurityAssessor.js +149 -17
- package/client/lib/services/assessment/modules/TemporalAssessor.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/TemporalAssessor.js +10 -10
- package/client/lib/services/assessment/modules/ToolAnnotationAssessor.js +9 -9
- package/client/lib/services/assessment/modules/UsabilityAssessor.js +1 -1
- package/client/lib/services/assessment/modules/annotations/DescriptionPoisoningDetector.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/annotations/DescriptionPoisoningDetector.js +37 -0
- package/client/lib/services/assessment/modules/index.d.ts +3 -0
- package/client/lib/services/assessment/modules/index.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/securityTests/ChainExecutionTester.d.ts +104 -0
- package/client/lib/services/assessment/modules/securityTests/ChainExecutionTester.d.ts.map +1 -0
- package/client/lib/services/assessment/modules/securityTests/ChainExecutionTester.js +257 -0
- package/client/lib/services/assessment/modules/securityTests/CrossToolStateTester.d.ts +91 -0
- package/client/lib/services/assessment/modules/securityTests/CrossToolStateTester.d.ts.map +1 -0
- package/client/lib/services/assessment/modules/securityTests/CrossToolStateTester.js +225 -0
- package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts +120 -0
- package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.js +338 -0
- package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts +59 -0
- package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +168 -0
- package/client/lib/services/assessment/modules/securityTests/index.d.ts +3 -1
- package/client/lib/services/assessment/modules/securityTests/index.d.ts.map +1 -1
- package/client/lib/services/assessment/modules/securityTests/index.js +2 -0
- package/client/package.json +1 -1
- package/package.json +9 -1
- package/server/package.json +1 -1
|
@@ -338,6 +338,344 @@ export const AUTH_FAIL_CLOSED_PATTERNS = [
|
|
|
338
338
|
{ pattern: /"denial_reason"/i, evidence: "denial reason provided" },
|
|
339
339
|
];
|
|
340
340
|
// =============================================================================
|
|
341
|
+
// CROSS-TOOL STATE-BASED AUTH PATTERNS (Issue #92, Challenge #7)
|
|
342
|
+
// =============================================================================
|
|
343
|
+
/**
|
|
344
|
+
* Patterns indicating vulnerable shared state authorization
|
|
345
|
+
* Detects cross-tool privilege escalation via shared mutable state
|
|
346
|
+
* Used by: analyzeStateBasedAuthBypass()
|
|
347
|
+
*/
|
|
348
|
+
export const STATE_AUTH_VULNERABLE_PATTERNS = [
|
|
349
|
+
{
|
|
350
|
+
pattern: /"admin_mode"\s*:\s*true/i,
|
|
351
|
+
evidence: "admin_mode enabled in response",
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
pattern: /hint.*use\s+config_modifier/i,
|
|
355
|
+
evidence: "Tool hints at cross-tool state dependency",
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
pattern: /admin_mode.*set\s+by.*another\s+tool/i,
|
|
359
|
+
evidence: "Explicit cross-tool state dependency",
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
pattern: /"evidence".*cross-tool.*privilege/i,
|
|
363
|
+
evidence: "Cross-tool privilege escalation detected",
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
pattern: /elevated\s+privileges?\s+granted/i,
|
|
367
|
+
evidence: "Elevated privileges granted",
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
pattern: /admin\s+mode\s+activated/i,
|
|
371
|
+
evidence: "Admin mode activated (state modifier)",
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
pattern: /"hint".*config_modifier.*admin_mode/i,
|
|
375
|
+
evidence: "Response hints at config_modifier for admin_mode",
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
pattern: /Use\s+config_modifier.*enable.*admin_mode/i,
|
|
379
|
+
evidence: "Tool depends on config_modifier for authorization",
|
|
380
|
+
},
|
|
381
|
+
];
|
|
382
|
+
/**
|
|
383
|
+
* Patterns indicating safe independent authorization
|
|
384
|
+
* Detects tools that use per-request authentication (secure)
|
|
385
|
+
* Used by: analyzeStateBasedAuthBypass()
|
|
386
|
+
*/
|
|
387
|
+
export const STATE_AUTH_SAFE_PATTERNS = [
|
|
388
|
+
{
|
|
389
|
+
pattern: /"shared_state_checked"\s*:\s*false/i,
|
|
390
|
+
evidence: "Tool explicitly states it doesn't use shared state",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
pattern: /"independent_auth_required"\s*:\s*true/i,
|
|
394
|
+
evidence: "Tool requires independent per-request auth",
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
pattern: /requires\s+independent\s+authorization/i,
|
|
398
|
+
evidence: "Independent authorization required",
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
pattern: /(?:not|does\s+not|doesn't)\s+(?:use\s+)?shared\s+state/i,
|
|
402
|
+
evidence: "Tool confirms it does not use shared state",
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
pattern: /stored.*for.*admin.*review/i,
|
|
406
|
+
evidence: "Request stored for admin review (no auto-execution)",
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
pattern: /per-request\s+auth/i,
|
|
410
|
+
evidence: "Per-request authentication enforced",
|
|
411
|
+
},
|
|
412
|
+
];
|
|
413
|
+
/**
|
|
414
|
+
* Patterns indicating vulnerable chain execution behavior
|
|
415
|
+
* - Arbitrary tool invocation without allowlist
|
|
416
|
+
* - Output injection via template substitution
|
|
417
|
+
* - Recursive/circular chain execution
|
|
418
|
+
* - Missing depth limits
|
|
419
|
+
* - State poisoning between steps
|
|
420
|
+
*
|
|
421
|
+
* Used by: analyzeChainExploitation()
|
|
422
|
+
*/
|
|
423
|
+
export const CHAIN_EXPLOIT_VULNERABLE_PATTERNS = [
|
|
424
|
+
// Chain execution evidence
|
|
425
|
+
{
|
|
426
|
+
pattern: /chain_results/i,
|
|
427
|
+
weight: 0.9,
|
|
428
|
+
category: "chain_execution",
|
|
429
|
+
description: "Chain execution returning step results",
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
pattern: /steps_executed/i,
|
|
433
|
+
weight: 0.8,
|
|
434
|
+
category: "chain_execution",
|
|
435
|
+
description: "Steps executed counter in response",
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
pattern: /vulnerabilities_triggered/i,
|
|
439
|
+
weight: 1.0,
|
|
440
|
+
category: "chain_execution",
|
|
441
|
+
description: "Explicit vulnerabilities triggered indicator",
|
|
442
|
+
},
|
|
443
|
+
// Output injection evidence
|
|
444
|
+
{
|
|
445
|
+
pattern: /output_injection/i,
|
|
446
|
+
weight: 1.0,
|
|
447
|
+
category: "output_injection",
|
|
448
|
+
description: "Output injection between chain steps",
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
pattern: /\{\{output\}\}.*substitut/i,
|
|
452
|
+
weight: 0.9,
|
|
453
|
+
category: "output_injection",
|
|
454
|
+
description: "Template output substitution performed",
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
pattern: /last_output.*passed/i,
|
|
458
|
+
weight: 0.8,
|
|
459
|
+
category: "output_injection",
|
|
460
|
+
description: "Raw output passed to next step",
|
|
461
|
+
},
|
|
462
|
+
// Recursive chain evidence
|
|
463
|
+
{
|
|
464
|
+
pattern: /recursive_chain/i,
|
|
465
|
+
weight: 1.0,
|
|
466
|
+
category: "recursive_chain",
|
|
467
|
+
description: "Self-referential chain execution",
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
pattern: /chain_executor.*within.*chain/i,
|
|
471
|
+
weight: 0.9,
|
|
472
|
+
category: "recursive_chain",
|
|
473
|
+
description: "Chain executor called recursively",
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
pattern: /circular.*chain/i,
|
|
477
|
+
weight: 0.9,
|
|
478
|
+
category: "recursive_chain",
|
|
479
|
+
description: "Circular chain reference detected",
|
|
480
|
+
},
|
|
481
|
+
// Arbitrary tool acceptance
|
|
482
|
+
{
|
|
483
|
+
pattern: /arbitrary.*tool.*step/i,
|
|
484
|
+
weight: 0.9,
|
|
485
|
+
category: "arbitrary_tool",
|
|
486
|
+
description: "Arbitrary tool name accepted in chain",
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
pattern: /unknown.*tool.*executed/i,
|
|
490
|
+
weight: 0.8,
|
|
491
|
+
category: "arbitrary_tool",
|
|
492
|
+
description: "Unknown tool executed without validation",
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
pattern: /attempted.*execute.*unknown/i,
|
|
496
|
+
weight: 0.8,
|
|
497
|
+
category: "arbitrary_tool",
|
|
498
|
+
description: "Attempted execution of unknown tool",
|
|
499
|
+
},
|
|
500
|
+
// Shadowed tool execution
|
|
501
|
+
{
|
|
502
|
+
pattern: /shadowed.*tool/i,
|
|
503
|
+
weight: 1.0,
|
|
504
|
+
category: "tool_shadowing",
|
|
505
|
+
description: "Shadowed/poisoned tool executed",
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
pattern: /shadowed_definition/i,
|
|
509
|
+
weight: 0.9,
|
|
510
|
+
category: "tool_shadowing",
|
|
511
|
+
description: "Shadowed definition used instead of original",
|
|
512
|
+
},
|
|
513
|
+
];
|
|
514
|
+
/**
|
|
515
|
+
* Patterns indicating safe/hardened chain handling
|
|
516
|
+
* - Tool allowlist validation
|
|
517
|
+
* - No execution (validation only)
|
|
518
|
+
* - Depth limits enforced
|
|
519
|
+
* - Output injection blocked
|
|
520
|
+
*
|
|
521
|
+
* Used by: analyzeChainExploitation()
|
|
522
|
+
*/
|
|
523
|
+
// =============================================================================
|
|
524
|
+
// CHAIN VULNERABILITY THRESHOLDS (Issue #93)
|
|
525
|
+
// =============================================================================
|
|
526
|
+
/**
|
|
527
|
+
* Threshold for confirming vulnerable chain execution behavior.
|
|
528
|
+
* Value of 1.5 requires ~2 weighted pattern matches to confirm vulnerability.
|
|
529
|
+
*
|
|
530
|
+
* Derived from A/B testing against vulnerable-mcp/hardened-mcp testbed:
|
|
531
|
+
* - vulnerable-mcp: typical scores 2.0-4.0 for vulnerable chains
|
|
532
|
+
* - hardened-mcp: typical scores 0.0-0.8 for safe chains
|
|
533
|
+
*
|
|
534
|
+
* Setting at 1.5 provides margin against false positives while
|
|
535
|
+
* maintaining detection of genuine vulnerabilities.
|
|
536
|
+
*/
|
|
537
|
+
export const CHAIN_VULNERABLE_THRESHOLD = 1.5;
|
|
538
|
+
/**
|
|
539
|
+
* Threshold for confirming safe/hardened chain behavior.
|
|
540
|
+
* Value of 1.0 requires 1+ weighted safe pattern matches.
|
|
541
|
+
*
|
|
542
|
+
* Derived from A/B testing:
|
|
543
|
+
* - hardened-mcp: typical scores 1.5-3.0 for safe chains
|
|
544
|
+
* - vulnerable-mcp: typical scores 0.0-0.5 for safe patterns
|
|
545
|
+
*/
|
|
546
|
+
export const CHAIN_SAFE_THRESHOLD = 1.0;
|
|
547
|
+
// =============================================================================
|
|
548
|
+
// CHAIN VULNERABILITY CATEGORY PATTERNS (Issue #93)
|
|
549
|
+
// =============================================================================
|
|
550
|
+
/**
|
|
551
|
+
* Maps vulnerability categories to detection patterns.
|
|
552
|
+
* Used by analyzeChainExploitation() for category classification.
|
|
553
|
+
*
|
|
554
|
+
* Extracted from inline patterns to maintain single source of truth.
|
|
555
|
+
*/
|
|
556
|
+
export const CHAIN_CATEGORY_PATTERNS = {
|
|
557
|
+
OUTPUT_INJECTION: [
|
|
558
|
+
{ pattern: /output_injection/i, category: "OUTPUT_INJECTION" },
|
|
559
|
+
{ pattern: /\{\{output\}\}.*substitut/i, category: "OUTPUT_INJECTION" },
|
|
560
|
+
],
|
|
561
|
+
RECURSIVE_CHAIN: [
|
|
562
|
+
{ pattern: /recursive_chain/i, category: "RECURSIVE_CHAIN" },
|
|
563
|
+
{ pattern: /chain_executor.*within/i, category: "RECURSIVE_CHAIN" },
|
|
564
|
+
],
|
|
565
|
+
ARBITRARY_TOOL_INVOCATION: [
|
|
566
|
+
{ pattern: /arbitrary.*tool/i, category: "ARBITRARY_TOOL_INVOCATION" },
|
|
567
|
+
{
|
|
568
|
+
pattern: /unknown.*tool.*executed/i,
|
|
569
|
+
category: "ARBITRARY_TOOL_INVOCATION",
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
TOOL_SHADOWING: [
|
|
573
|
+
{ pattern: /shadowed.*tool/i, category: "TOOL_SHADOWING" },
|
|
574
|
+
{ pattern: /shadowed_definition/i, category: "TOOL_SHADOWING" },
|
|
575
|
+
],
|
|
576
|
+
MISSING_DEPTH_LIMIT: [
|
|
577
|
+
{
|
|
578
|
+
pattern: /steps_executed.*[1-9][0-9]/i,
|
|
579
|
+
category: "MISSING_DEPTH_LIMIT",
|
|
580
|
+
},
|
|
581
|
+
{ pattern: /no.*depth.*limit/i, category: "MISSING_DEPTH_LIMIT" },
|
|
582
|
+
],
|
|
583
|
+
STATE_POISONING: [
|
|
584
|
+
{ pattern: /state.*poison/i, category: "STATE_POISONING" },
|
|
585
|
+
{ pattern: /config.*modified.*chain/i, category: "STATE_POISONING" },
|
|
586
|
+
],
|
|
587
|
+
};
|
|
588
|
+
/**
|
|
589
|
+
* Detect vulnerability categories from response text.
|
|
590
|
+
* Returns array of detected category names.
|
|
591
|
+
*/
|
|
592
|
+
export function detectVulnerabilityCategories(responseText) {
|
|
593
|
+
const categories = [];
|
|
594
|
+
for (const [categoryName, patterns] of Object.entries(CHAIN_CATEGORY_PATTERNS)) {
|
|
595
|
+
for (const { pattern } of patterns) {
|
|
596
|
+
if (pattern.test(responseText)) {
|
|
597
|
+
if (!categories.includes(categoryName)) {
|
|
598
|
+
categories.push(categoryName);
|
|
599
|
+
}
|
|
600
|
+
break; // Found match for this category, move to next
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
return categories;
|
|
605
|
+
}
|
|
606
|
+
export const CHAIN_EXPLOIT_SAFE_PATTERNS = [
|
|
607
|
+
// Validation-only behavior
|
|
608
|
+
{
|
|
609
|
+
pattern: /stored.*for.*review/i,
|
|
610
|
+
weight: 0.8,
|
|
611
|
+
category: "safe_storage",
|
|
612
|
+
description: "Chain stored for review, not executed",
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
pattern: /validation.*only/i,
|
|
616
|
+
weight: 0.9,
|
|
617
|
+
category: "safe_validation",
|
|
618
|
+
description: "Chain validated but not executed",
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
pattern: /chain.*validated/i,
|
|
622
|
+
weight: 0.7,
|
|
623
|
+
category: "safe_validation",
|
|
624
|
+
description: "Chain validation response",
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
pattern: /pending.*review/i,
|
|
628
|
+
weight: 0.8,
|
|
629
|
+
category: "safe_storage",
|
|
630
|
+
description: "Request pending admin review",
|
|
631
|
+
},
|
|
632
|
+
// Allowlist enforcement
|
|
633
|
+
{
|
|
634
|
+
pattern: /tool.*not.*in.*allowlist/i,
|
|
635
|
+
weight: 0.9,
|
|
636
|
+
category: "allowlist",
|
|
637
|
+
description: "Tool rejected - not in allowlist",
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
pattern: /only.*safe.*tools.*permitted/i,
|
|
641
|
+
weight: 0.9,
|
|
642
|
+
category: "allowlist",
|
|
643
|
+
description: "Allowlist enforcement message",
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
pattern: /blocked.*tool.*chain/i,
|
|
647
|
+
weight: 0.8,
|
|
648
|
+
category: "allowlist",
|
|
649
|
+
description: "Tool blocked from chain execution",
|
|
650
|
+
},
|
|
651
|
+
// Depth limit enforcement
|
|
652
|
+
{
|
|
653
|
+
pattern: /depth.*limit.*enforced/i,
|
|
654
|
+
weight: 0.8,
|
|
655
|
+
category: "depth_limit",
|
|
656
|
+
description: "Depth limit properly enforced",
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
pattern: /max.*depth.*exceeded/i,
|
|
660
|
+
weight: 0.7,
|
|
661
|
+
category: "depth_limit",
|
|
662
|
+
description: "Chain rejected for exceeding depth",
|
|
663
|
+
},
|
|
664
|
+
// No execution indicators
|
|
665
|
+
{
|
|
666
|
+
pattern: /chain_executed.*false/i,
|
|
667
|
+
weight: 0.9,
|
|
668
|
+
category: "no_execution",
|
|
669
|
+
description: "Chain execution disabled",
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
pattern: /execution.*disabled/i,
|
|
673
|
+
weight: 0.8,
|
|
674
|
+
category: "no_execution",
|
|
675
|
+
description: "Execution capability disabled",
|
|
676
|
+
},
|
|
677
|
+
];
|
|
678
|
+
// =============================================================================
|
|
341
679
|
// SEARCH/RETRIEVAL PATTERNS
|
|
342
680
|
// =============================================================================
|
|
343
681
|
/**
|
|
@@ -35,6 +35,40 @@ export interface AuthBypassResult {
|
|
|
35
35
|
failureMode: "FAIL_OPEN" | "FAIL_CLOSED" | "UNKNOWN";
|
|
36
36
|
evidence?: string;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Result of cross-tool state-based auth bypass analysis (Issue #92, Challenge #7)
|
|
40
|
+
* Detects privilege escalation via shared mutable state between tools
|
|
41
|
+
*/
|
|
42
|
+
export interface StateBasedAuthResult {
|
|
43
|
+
vulnerable: boolean;
|
|
44
|
+
safe: boolean;
|
|
45
|
+
stateDependency: "SHARED_STATE" | "INDEPENDENT" | "UNKNOWN";
|
|
46
|
+
evidence: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Chain execution type classification (Issue #93, Challenge #6)
|
|
50
|
+
*/
|
|
51
|
+
export type ChainExecutionType = "VULNERABLE_EXECUTION" | "SAFE_VALIDATION" | "PARTIAL" | "UNKNOWN";
|
|
52
|
+
/**
|
|
53
|
+
* Chain vulnerability categories (Issue #93, Challenge #6)
|
|
54
|
+
*/
|
|
55
|
+
export type ChainVulnerabilityCategory = "OUTPUT_INJECTION" | "RECURSIVE_CHAIN" | "ARBITRARY_TOOL_INVOCATION" | "TOOL_SHADOWING" | "MISSING_DEPTH_LIMIT" | "STATE_POISONING";
|
|
56
|
+
/**
|
|
57
|
+
* Result of chain exploitation analysis (Issue #93, Challenge #6)
|
|
58
|
+
* Detects multi-tool chained exploitation attacks
|
|
59
|
+
*/
|
|
60
|
+
export interface ChainExploitationAnalysis {
|
|
61
|
+
vulnerable: boolean;
|
|
62
|
+
safe: boolean;
|
|
63
|
+
chainType: ChainExecutionType;
|
|
64
|
+
vulnerabilityCategories: ChainVulnerabilityCategory[];
|
|
65
|
+
evidence: {
|
|
66
|
+
vulnerablePatterns: string[];
|
|
67
|
+
safePatterns: string[];
|
|
68
|
+
vulnerableScore: number;
|
|
69
|
+
safeScore: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
38
72
|
/**
|
|
39
73
|
* Error classification types
|
|
40
74
|
*/
|
|
@@ -70,6 +104,31 @@ export declare class SecurityResponseAnalyzer {
|
|
|
70
104
|
* Detects fail-open authentication vulnerabilities (CVE-2025-52882)
|
|
71
105
|
*/
|
|
72
106
|
analyzeAuthBypassResponse(response: CompatibilityCallToolResult): AuthBypassResult;
|
|
107
|
+
/**
|
|
108
|
+
* Analyze response for cross-tool state-based authorization bypass (Issue #92)
|
|
109
|
+
* Detects Challenge #7: Privilege escalation via shared mutable state
|
|
110
|
+
*
|
|
111
|
+
* Vulnerable pattern: Tool checks shared state (e.g., config_state["admin_mode"])
|
|
112
|
+
* that can be modified by another tool (e.g., config_modifier)
|
|
113
|
+
*
|
|
114
|
+
* Safe pattern: Tool uses independent per-request authorization,
|
|
115
|
+
* indicated by shared_state_checked: false or independent_auth_required: true
|
|
116
|
+
*/
|
|
117
|
+
analyzeStateBasedAuthBypass(response: CompatibilityCallToolResult): StateBasedAuthResult;
|
|
118
|
+
/**
|
|
119
|
+
* Analyze response for chain exploitation vulnerabilities (Issue #93, Challenge #6)
|
|
120
|
+
* Detects multi-tool chained exploitation attacks including:
|
|
121
|
+
* - Arbitrary tool invocation without allowlist
|
|
122
|
+
* - Output injection via {{output}} template substitution
|
|
123
|
+
* - Recursive/circular chain execution (DoS potential)
|
|
124
|
+
* - State poisoning between chain steps
|
|
125
|
+
* - Tool shadowing in chains
|
|
126
|
+
* - Missing depth/size limits
|
|
127
|
+
*
|
|
128
|
+
* @param response The tool response to analyze
|
|
129
|
+
* @returns Analysis result with vulnerability status and evidence
|
|
130
|
+
*/
|
|
131
|
+
analyzeChainExploitation(response: CompatibilityCallToolResult): ChainExploitationAnalysis;
|
|
73
132
|
/**
|
|
74
133
|
* Check if response indicates connection/server failure
|
|
75
134
|
*/
|
package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityResponseAnalyzer.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityResponseAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,2BAA2B,EAC3B,IAAI,EACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAK1E,OAAO,EAAgB,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SecurityResponseAnalyzer.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityResponseAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,2BAA2B,EAC3B,IAAI,EACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAK1E,O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CAAC,wBAAwB;CAoBjC"}
|
|
@@ -19,6 +19,8 @@ import { ExecutionArtifactDetector } from "./ExecutionArtifactDetector.js";
|
|
|
19
19
|
import { MathAnalyzer } from "./MathAnalyzer.js";
|
|
20
20
|
import { SafeResponseDetector } from "./SafeResponseDetector.js";
|
|
21
21
|
import { ConfidenceScorer } from "./ConfidenceScorer.js";
|
|
22
|
+
// Import pattern library for chain exploitation analysis
|
|
23
|
+
import { CHAIN_EXPLOIT_VULNERABLE_PATTERNS, CHAIN_EXPLOIT_SAFE_PATTERNS, CHAIN_VULNERABLE_THRESHOLD, CHAIN_SAFE_THRESHOLD, detectVulnerabilityCategories, } from "./SecurityPatternLibrary.js";
|
|
22
24
|
/**
|
|
23
25
|
* Analyzes tool responses for security vulnerabilities
|
|
24
26
|
* Distinguishes between safe reflection and actual execution
|
|
@@ -153,6 +155,172 @@ export class SecurityResponseAnalyzer {
|
|
|
153
155
|
}
|
|
154
156
|
return { detected: false, failureMode: "UNKNOWN" };
|
|
155
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Analyze response for cross-tool state-based authorization bypass (Issue #92)
|
|
160
|
+
* Detects Challenge #7: Privilege escalation via shared mutable state
|
|
161
|
+
*
|
|
162
|
+
* Vulnerable pattern: Tool checks shared state (e.g., config_state["admin_mode"])
|
|
163
|
+
* that can be modified by another tool (e.g., config_modifier)
|
|
164
|
+
*
|
|
165
|
+
* Safe pattern: Tool uses independent per-request authorization,
|
|
166
|
+
* indicated by shared_state_checked: false or independent_auth_required: true
|
|
167
|
+
*/
|
|
168
|
+
analyzeStateBasedAuthBypass(response) {
|
|
169
|
+
const responseText = this.extractResponseContent(response);
|
|
170
|
+
// Vulnerable patterns - shared state authorization (Challenge #7)
|
|
171
|
+
const vulnerablePatterns = [
|
|
172
|
+
{
|
|
173
|
+
pattern: /"admin_mode"\s*:\s*true/i,
|
|
174
|
+
evidence: "admin_mode enabled in response",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
pattern: /hint.*use\s+config_modifier/i,
|
|
178
|
+
evidence: "Tool hints at cross-tool state dependency",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
pattern: /admin_mode.*set\s+by.*another\s+tool/i,
|
|
182
|
+
evidence: "Explicit cross-tool state dependency",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
pattern: /"evidence".*cross-tool.*privilege/i,
|
|
186
|
+
evidence: "Cross-tool privilege escalation detected",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
pattern: /elevated\s+privileges?\s+granted/i,
|
|
190
|
+
evidence: "Elevated privileges granted",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
pattern: /admin\s+mode\s+activated/i,
|
|
194
|
+
evidence: "Admin mode activated (state modifier)",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
pattern: /"hint".*config_modifier.*admin_mode/i,
|
|
198
|
+
evidence: "Response hints at config_modifier for admin_mode",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
pattern: /Use\s+config_modifier.*enable.*admin_mode/i,
|
|
202
|
+
evidence: "Tool depends on config_modifier for authorization",
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
// Safe patterns - independent authorization (secure)
|
|
206
|
+
const safePatterns = [
|
|
207
|
+
{
|
|
208
|
+
pattern: /"shared_state_checked"\s*:\s*false/i,
|
|
209
|
+
evidence: "Tool explicitly states it doesn't use shared state",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
pattern: /"independent_auth_required"\s*:\s*true/i,
|
|
213
|
+
evidence: "Tool requires independent per-request auth",
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
pattern: /requires\s+independent\s+authorization/i,
|
|
217
|
+
evidence: "Independent authorization required",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
pattern: /(?:not|does\s+not|doesn't)\s+(?:use\s+)?shared\s+state/i,
|
|
221
|
+
evidence: "Tool confirms it does not use shared state",
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
pattern: /stored.*for.*admin.*review/i,
|
|
225
|
+
evidence: "Request stored for admin review (no auto-execution)",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
pattern: /per-request\s+auth/i,
|
|
229
|
+
evidence: "Per-request authentication enforced",
|
|
230
|
+
},
|
|
231
|
+
];
|
|
232
|
+
// Check vulnerable patterns first (SHARED_STATE)
|
|
233
|
+
for (const { pattern, evidence } of vulnerablePatterns) {
|
|
234
|
+
if (pattern.test(responseText)) {
|
|
235
|
+
return {
|
|
236
|
+
vulnerable: true,
|
|
237
|
+
safe: false,
|
|
238
|
+
stateDependency: "SHARED_STATE",
|
|
239
|
+
evidence: `Cross-tool state dependency detected: ${evidence}`,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// Check safe patterns (INDEPENDENT)
|
|
244
|
+
for (const { pattern, evidence } of safePatterns) {
|
|
245
|
+
if (pattern.test(responseText)) {
|
|
246
|
+
return {
|
|
247
|
+
vulnerable: false,
|
|
248
|
+
safe: true,
|
|
249
|
+
stateDependency: "INDEPENDENT",
|
|
250
|
+
evidence: `Independent authorization confirmed: ${evidence}`,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
vulnerable: false,
|
|
256
|
+
safe: false,
|
|
257
|
+
stateDependency: "UNKNOWN",
|
|
258
|
+
evidence: "",
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Analyze response for chain exploitation vulnerabilities (Issue #93, Challenge #6)
|
|
263
|
+
* Detects multi-tool chained exploitation attacks including:
|
|
264
|
+
* - Arbitrary tool invocation without allowlist
|
|
265
|
+
* - Output injection via {{output}} template substitution
|
|
266
|
+
* - Recursive/circular chain execution (DoS potential)
|
|
267
|
+
* - State poisoning between chain steps
|
|
268
|
+
* - Tool shadowing in chains
|
|
269
|
+
* - Missing depth/size limits
|
|
270
|
+
*
|
|
271
|
+
* @param response The tool response to analyze
|
|
272
|
+
* @returns Analysis result with vulnerability status and evidence
|
|
273
|
+
*/
|
|
274
|
+
analyzeChainExploitation(response) {
|
|
275
|
+
const responseText = this.extractResponseContent(response);
|
|
276
|
+
let vulnerableScore = 0;
|
|
277
|
+
let safeScore = 0;
|
|
278
|
+
const matchedVulnPatterns = [];
|
|
279
|
+
const matchedSafePatterns = [];
|
|
280
|
+
// Check vulnerable patterns
|
|
281
|
+
for (const patternDef of CHAIN_EXPLOIT_VULNERABLE_PATTERNS) {
|
|
282
|
+
if (patternDef.pattern.test(responseText)) {
|
|
283
|
+
vulnerableScore += patternDef.weight;
|
|
284
|
+
matchedVulnPatterns.push(patternDef.description);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
// Check safe patterns
|
|
288
|
+
for (const patternDef of CHAIN_EXPLOIT_SAFE_PATTERNS) {
|
|
289
|
+
if (patternDef.pattern.test(responseText)) {
|
|
290
|
+
safeScore += patternDef.weight;
|
|
291
|
+
matchedSafePatterns.push(patternDef.description);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// Determine chain execution type using documented thresholds
|
|
295
|
+
let chainType = "UNKNOWN";
|
|
296
|
+
if (vulnerableScore > CHAIN_VULNERABLE_THRESHOLD &&
|
|
297
|
+
vulnerableScore > safeScore) {
|
|
298
|
+
chainType = "VULNERABLE_EXECUTION";
|
|
299
|
+
}
|
|
300
|
+
else if (safeScore > CHAIN_SAFE_THRESHOLD &&
|
|
301
|
+
safeScore > vulnerableScore) {
|
|
302
|
+
chainType = "SAFE_VALIDATION";
|
|
303
|
+
}
|
|
304
|
+
else if (vulnerableScore > 0 || safeScore > 0) {
|
|
305
|
+
chainType = "PARTIAL";
|
|
306
|
+
}
|
|
307
|
+
// Detect specific vulnerability categories using centralized pattern library
|
|
308
|
+
const detectedCategories = detectVulnerabilityCategories(responseText);
|
|
309
|
+
const vulnerabilityCategories = detectedCategories;
|
|
310
|
+
return {
|
|
311
|
+
vulnerable: vulnerableScore > CHAIN_VULNERABLE_THRESHOLD &&
|
|
312
|
+
vulnerableScore > safeScore,
|
|
313
|
+
safe: safeScore > CHAIN_SAFE_THRESHOLD && safeScore > vulnerableScore,
|
|
314
|
+
chainType,
|
|
315
|
+
vulnerabilityCategories,
|
|
316
|
+
evidence: {
|
|
317
|
+
vulnerablePatterns: matchedVulnPatterns,
|
|
318
|
+
safePatterns: matchedSafePatterns,
|
|
319
|
+
vulnerableScore,
|
|
320
|
+
safeScore,
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
}
|
|
156
324
|
/**
|
|
157
325
|
* Check if response indicates connection/server failure
|
|
158
326
|
*/
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Security Assessment Module
|
|
3
3
|
* Exports all security-related components
|
|
4
4
|
*/
|
|
5
|
-
export { SecurityResponseAnalyzer, type ConfidenceResult, type AnalysisResult, type ErrorClassification, } from "./SecurityResponseAnalyzer.js";
|
|
5
|
+
export { SecurityResponseAnalyzer, type ConfidenceResult, type AnalysisResult, type ErrorClassification, type StateBasedAuthResult, type ChainExploitationAnalysis, type ChainExecutionType, type ChainVulnerabilityCategory, } from "./SecurityResponseAnalyzer.js";
|
|
6
6
|
export { SecurityPayloadTester, type TestProgressCallback, type PayloadTestConfig, type TestLogger, } from "./SecurityPayloadTester.js";
|
|
7
7
|
export { SecurityPayloadGenerator } from "./SecurityPayloadGenerator.js";
|
|
8
|
+
export { CrossToolStateTester, type CrossToolTestResult, type ToolPair, type CallToolFunction, type CrossToolTestConfig, } from "./CrossToolStateTester.js";
|
|
9
|
+
export { ChainExecutionTester, type ChainExecutionTestResult, type ChainExploitationSummary, type ChainExecutionTesterConfig, type ChainTestReason, } from "./ChainExecutionTester.js";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,UAAU,GAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,eAAe,GACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -5,3 +5,5 @@
|
|
|
5
5
|
export { SecurityResponseAnalyzer, } from "./SecurityResponseAnalyzer.js";
|
|
6
6
|
export { SecurityPayloadTester, } from "./SecurityPayloadTester.js";
|
|
7
7
|
export { SecurityPayloadGenerator } from "./SecurityPayloadGenerator.js";
|
|
8
|
+
export { CrossToolStateTester, } from "./CrossToolStateTester.js";
|
|
9
|
+
export { ChainExecutionTester, } from "./ChainExecutionTester.js";
|
package/client/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-client",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.7",
|
|
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>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.7",
|
|
4
4
|
"description": "Enhanced MCP Inspector with comprehensive assessment capabilities for server validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|
|
@@ -53,6 +53,14 @@
|
|
|
53
53
|
"./performance": {
|
|
54
54
|
"types": "./client/lib/services/assessment/config/performanceConfig.d.ts",
|
|
55
55
|
"default": "./client/lib/services/assessment/config/performanceConfig.js"
|
|
56
|
+
},
|
|
57
|
+
"./modules": {
|
|
58
|
+
"types": "./client/lib/services/assessment/modules/index.d.ts",
|
|
59
|
+
"default": "./client/lib/services/assessment/modules/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./security": {
|
|
62
|
+
"types": "./client/lib/services/assessment/modules/securityTests/index.d.ts",
|
|
63
|
+
"default": "./client/lib/services/assessment/modules/securityTests/index.js"
|
|
56
64
|
}
|
|
57
65
|
},
|
|
58
66
|
"bin": {
|
package/server/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-server",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.7",
|
|
4
4
|
"description": "Server-side application for the Enhanced MCP Inspector with assessment capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|