@bryan-thompson/inspector-assessment-client 1.28.0 → 1.29.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-JnKCxulS.js → OAuthCallback-9Gbb39Ii.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-C2zSlEIQ.js → OAuthDebugCallback-B76J2MBn.js} +1 -1
- package/dist/assets/{index-C3xZdIFQ.js → index-CHTOR9VI.js} +4 -4
- package/dist/index.html +1 -1
- package/lib/lib/assessment/resultTypes.d.ts +8 -0
- package/lib/lib/assessment/resultTypes.d.ts.map +1 -1
- package/lib/lib/securityPatterns.d.ts +1 -1
- package/lib/lib/securityPatterns.js +1 -1
- package/lib/services/assessment/modules/TemporalAssessor.d.ts +5 -129
- package/lib/services/assessment/modules/TemporalAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/TemporalAssessor.js +18 -554
- package/lib/services/assessment/modules/ToolAnnotationAssessor.d.ts +10 -70
- package/lib/services/assessment/modules/ToolAnnotationAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/ToolAnnotationAssessor.js +32 -625
- package/lib/services/assessment/modules/annotations/AlignmentChecker.d.ts +65 -0
- package/lib/services/assessment/modules/annotations/AlignmentChecker.d.ts.map +1 -0
- package/lib/services/assessment/modules/annotations/AlignmentChecker.js +289 -0
- package/lib/services/assessment/modules/annotations/ClaudeIntegration.d.ts +22 -0
- package/lib/services/assessment/modules/annotations/ClaudeIntegration.d.ts.map +1 -0
- package/lib/services/assessment/modules/annotations/ClaudeIntegration.js +139 -0
- package/lib/services/assessment/modules/annotations/EventEmitter.d.ts +20 -0
- package/lib/services/assessment/modules/annotations/EventEmitter.d.ts.map +1 -0
- package/lib/services/assessment/modules/annotations/EventEmitter.js +100 -0
- package/lib/services/assessment/modules/annotations/ExplanationGenerator.d.ts +25 -0
- package/lib/services/assessment/modules/annotations/ExplanationGenerator.d.ts.map +1 -0
- package/lib/services/assessment/modules/annotations/ExplanationGenerator.js +122 -0
- package/lib/services/assessment/modules/annotations/index.d.ts +5 -0
- package/lib/services/assessment/modules/annotations/index.d.ts.map +1 -1
- package/lib/services/assessment/modules/annotations/index.js +8 -0
- package/lib/services/assessment/modules/annotations/types.d.ts +33 -0
- package/lib/services/assessment/modules/annotations/types.d.ts.map +1 -0
- package/lib/services/assessment/modules/annotations/types.js +7 -0
- package/lib/services/assessment/modules/securityTests/SafeResponseDetector.d.ts +3 -0
- package/lib/services/assessment/modules/securityTests/SafeResponseDetector.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SafeResponseDetector.js +14 -1
- package/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts +29 -0
- package/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.js +71 -0
- package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.js +24 -0
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts +66 -0
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +228 -3
- package/lib/services/assessment/modules/temporal/MutationDetector.d.ts +75 -0
- package/lib/services/assessment/modules/temporal/MutationDetector.d.ts.map +1 -0
- package/lib/services/assessment/modules/temporal/MutationDetector.js +147 -0
- package/lib/services/assessment/modules/temporal/VarianceClassifier.d.ts +112 -0
- package/lib/services/assessment/modules/temporal/VarianceClassifier.d.ts.map +1 -0
- package/lib/services/assessment/modules/temporal/VarianceClassifier.js +427 -0
- package/lib/services/assessment/modules/temporal/index.d.ts +10 -0
- package/lib/services/assessment/modules/temporal/index.d.ts.map +1 -0
- package/lib/services/assessment/modules/temporal/index.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explanation Generator Module
|
|
3
|
+
* Generates explanations and recommendations for annotation assessment results
|
|
4
|
+
*
|
|
5
|
+
* Extracted from ToolAnnotationAssessor.ts as part of Issue #105 refactoring.
|
|
6
|
+
*/
|
|
7
|
+
import type { ToolAnnotationResult } from "../../../../lib/assessmentTypes.js";
|
|
8
|
+
import type { EnhancedToolAnnotationResult } from "./types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Generate basic explanation for annotation assessment
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateExplanation(annotatedCount: number, missingCount: number, misalignedCount: number, totalTools: number): string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate enhanced explanation with Claude analysis
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateEnhancedExplanation(annotatedCount: number, missingCount: number, highConfidenceMisalignments: number, totalTools: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Generate recommendations for annotation issues
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateRecommendations(results: ToolAnnotationResult[]): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Generate enhanced recommendations with Claude analysis
|
|
23
|
+
*/
|
|
24
|
+
export declare function generateEnhancedRecommendations(results: EnhancedToolAnnotationResult[]): string[];
|
|
25
|
+
//# sourceMappingURL=ExplanationGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplanationGenerator.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/ExplanationGenerator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,GACjB,MAAM,CA4BR;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,2BAA2B,EAAE,MAAM,EACnC,UAAU,EAAE,MAAM,GACjB,MAAM,CA0BR;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,oBAAoB,EAAE,GAC9B,MAAM,EAAE,CAuCV;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,4BAA4B,EAAE,GACtC,MAAM,EAAE,CA2EV"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explanation Generator Module
|
|
3
|
+
* Generates explanations and recommendations for annotation assessment results
|
|
4
|
+
*
|
|
5
|
+
* Extracted from ToolAnnotationAssessor.ts as part of Issue #105 refactoring.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate basic explanation for annotation assessment
|
|
9
|
+
*/
|
|
10
|
+
export function generateExplanation(annotatedCount, missingCount, misalignedCount, totalTools) {
|
|
11
|
+
const parts = [];
|
|
12
|
+
if (totalTools === 0) {
|
|
13
|
+
return "No tools found to assess for annotations.";
|
|
14
|
+
}
|
|
15
|
+
parts.push(`Tool annotation coverage: ${annotatedCount}/${totalTools} tools have annotations.`);
|
|
16
|
+
if (missingCount > 0) {
|
|
17
|
+
parts.push(`${missingCount} tool(s) are missing required annotations (readOnlyHint, destructiveHint).`);
|
|
18
|
+
}
|
|
19
|
+
if (misalignedCount > 0) {
|
|
20
|
+
parts.push(`${misalignedCount} tool(s) have potentially misaligned annotations based on naming patterns.`);
|
|
21
|
+
}
|
|
22
|
+
if (missingCount === 0 && misalignedCount === 0) {
|
|
23
|
+
parts.push("All tools are properly annotated.");
|
|
24
|
+
}
|
|
25
|
+
return parts.join(" ");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Generate enhanced explanation with Claude analysis
|
|
29
|
+
*/
|
|
30
|
+
export function generateEnhancedExplanation(annotatedCount, missingCount, highConfidenceMisalignments, totalTools) {
|
|
31
|
+
const parts = [];
|
|
32
|
+
if (totalTools === 0) {
|
|
33
|
+
return "No tools found to assess for annotations.";
|
|
34
|
+
}
|
|
35
|
+
parts.push(`Tool annotation coverage: ${annotatedCount}/${totalTools} tools have annotations.`);
|
|
36
|
+
if (missingCount > 0) {
|
|
37
|
+
parts.push(`${missingCount} tool(s) are missing required annotations (readOnlyHint, destructiveHint).`);
|
|
38
|
+
}
|
|
39
|
+
if (highConfidenceMisalignments > 0) {
|
|
40
|
+
parts.push(`Claude analysis identified ${highConfidenceMisalignments} high-confidence annotation misalignment(s).`);
|
|
41
|
+
}
|
|
42
|
+
parts.push("Analysis enhanced with Claude semantic behavior inference.");
|
|
43
|
+
return parts.join(" ");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Generate recommendations for annotation issues
|
|
47
|
+
*/
|
|
48
|
+
export function generateRecommendations(results) {
|
|
49
|
+
const recommendations = [];
|
|
50
|
+
const allRecs = new Set();
|
|
51
|
+
for (const result of results) {
|
|
52
|
+
for (const rec of result.recommendations) {
|
|
53
|
+
allRecs.add(rec);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const destructiveRecs = Array.from(allRecs).filter((r) => r.includes("destructive"));
|
|
57
|
+
const otherRecs = Array.from(allRecs).filter((r) => !r.includes("destructive"));
|
|
58
|
+
if (destructiveRecs.length > 0) {
|
|
59
|
+
recommendations.push("PRIORITY: The following tools appear to perform destructive operations but lack proper destructiveHint annotation:");
|
|
60
|
+
recommendations.push(...destructiveRecs.slice(0, 5));
|
|
61
|
+
}
|
|
62
|
+
if (otherRecs.length > 0) {
|
|
63
|
+
recommendations.push(...otherRecs.slice(0, 5));
|
|
64
|
+
}
|
|
65
|
+
if (recommendations.length === 0) {
|
|
66
|
+
recommendations.push("All tools have proper annotations. No action required.");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
recommendations.push("Reference: MCP Directory Policy #17 requires tools to have readOnlyHint and destructiveHint annotations.");
|
|
70
|
+
}
|
|
71
|
+
return recommendations;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Generate enhanced recommendations with Claude analysis
|
|
75
|
+
*/
|
|
76
|
+
export function generateEnhancedRecommendations(results) {
|
|
77
|
+
const recommendations = [];
|
|
78
|
+
const claudeMisalignments = results.filter((r) => r.claudeInference &&
|
|
79
|
+
r.claudeInference.source === "claude-inferred" &&
|
|
80
|
+
r.claudeInference.confidence >= 70 &&
|
|
81
|
+
r.claudeInference.misalignmentDetected);
|
|
82
|
+
if (claudeMisalignments.length > 0) {
|
|
83
|
+
recommendations.push("HIGH CONFIDENCE: Claude analysis identified the following annotation issues:");
|
|
84
|
+
for (const result of claudeMisalignments.slice(0, 5)) {
|
|
85
|
+
if (result.claudeInference) {
|
|
86
|
+
recommendations.push(` - ${result.toolName}: ${result.claudeInference.reasoning}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const claudeSuggestions = results
|
|
91
|
+
.filter((r) => r.claudeInference &&
|
|
92
|
+
r.claudeInference.source === "claude-inferred" &&
|
|
93
|
+
r.claudeInference.confidence >= 60)
|
|
94
|
+
.flatMap((r) => r.recommendations.filter((rec) => rec.includes("Claude")));
|
|
95
|
+
if (claudeSuggestions.length > 0) {
|
|
96
|
+
recommendations.push(...claudeSuggestions.slice(0, 5));
|
|
97
|
+
}
|
|
98
|
+
const patternRecs = new Set();
|
|
99
|
+
for (const result of results) {
|
|
100
|
+
for (const rec of result.recommendations) {
|
|
101
|
+
if (!rec.includes("Claude")) {
|
|
102
|
+
patternRecs.add(rec);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const destructiveRecs = Array.from(patternRecs).filter((r) => r.includes("destructive"));
|
|
107
|
+
const otherRecs = Array.from(patternRecs).filter((r) => !r.includes("destructive"));
|
|
108
|
+
if (destructiveRecs.length > 0) {
|
|
109
|
+
recommendations.push("PRIORITY: Potential destructive tools without proper hints:");
|
|
110
|
+
recommendations.push(...destructiveRecs.slice(0, 3));
|
|
111
|
+
}
|
|
112
|
+
if (otherRecs.length > 0 && recommendations.length < 10) {
|
|
113
|
+
recommendations.push(...otherRecs.slice(0, 3));
|
|
114
|
+
}
|
|
115
|
+
if (recommendations.length === 0) {
|
|
116
|
+
recommendations.push("All tools have proper annotations. No action required.");
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
recommendations.push("Reference: MCP Directory Policy #17 requires tools to have readOnlyHint and destructiveHint annotations.");
|
|
120
|
+
}
|
|
121
|
+
return recommendations;
|
|
122
|
+
}
|
|
@@ -10,4 +10,9 @@ export { inferBehavior, inferBehaviorEnhanced, type BehaviorInferenceResult, } f
|
|
|
10
10
|
export { analyzeDescription, hasReadOnlyIndicators, hasDestructiveIndicators, hasWriteIndicators, DESCRIPTION_BEHAVIOR_KEYWORDS, } from "./DescriptionAnalyzer.js";
|
|
11
11
|
export { analyzeInputSchema, analyzeOutputSchema, hasBulkOperationIndicators, hasPaginationParameters, hasForceFlags, INPUT_READONLY_PATTERNS, INPUT_DESTRUCTIVE_PATTERNS, INPUT_WRITE_PATTERNS, OUTPUT_READONLY_PATTERNS, OUTPUT_DESTRUCTIVE_PATTERNS, OUTPUT_WRITE_PATTERNS, type JSONSchema, } from "./SchemaAnalyzer.js";
|
|
12
12
|
export { detectArchitecture, hasDatabaseToolPatterns, extractDatabasesFromDependencies, type Tool as ArchitectureTool, type ArchitectureContext, } from "./ArchitectureDetector.js";
|
|
13
|
+
export { type ClaudeInference, type EnhancedToolAnnotationResult, } from "./types.js";
|
|
14
|
+
export { extractAnnotations, extractExtendedMetadata, extractToolParams, assessSingleTool, determineAnnotationStatus, calculateMetrics, type ExtractedAnnotations, type AlignmentMetricsResult, } from "./AlignmentChecker.js";
|
|
15
|
+
export { generateExplanation, generateEnhancedExplanation, generateRecommendations, generateEnhancedRecommendations, } from "./ExplanationGenerator.js";
|
|
16
|
+
export { emitAnnotationEvents, emitMismatchEvent } from "./EventEmitter.js";
|
|
17
|
+
export { enhanceWithClaudeInference, createPatternBasedInference, } from "./ClaudeIntegration.js";
|
|
13
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,kCAAkC,EAClC,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,eAAe,GACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gCAAgC,EAChC,KAAK,IAAI,IAAI,gBAAgB,EAC7B,KAAK,mBAAmB,GACzB,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,E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M,qBAAqB,CAAC"}
|
|
@@ -13,3 +13,11 @@ export { analyzeDescription, hasReadOnlyIndicators, hasDestructiveIndicators, ha
|
|
|
13
13
|
export { analyzeInputSchema, analyzeOutputSchema, hasBulkOperationIndicators, hasPaginationParameters, hasForceFlags, INPUT_READONLY_PATTERNS, INPUT_DESTRUCTIVE_PATTERNS, INPUT_WRITE_PATTERNS, OUTPUT_READONLY_PATTERNS, OUTPUT_DESTRUCTIVE_PATTERNS, OUTPUT_WRITE_PATTERNS, } from "./SchemaAnalyzer.js";
|
|
14
14
|
// Issue #57: Architecture Detector
|
|
15
15
|
export { detectArchitecture, hasDatabaseToolPatterns, extractDatabasesFromDependencies, } from "./ArchitectureDetector.js";
|
|
16
|
+
// Issue #105: Alignment Checker
|
|
17
|
+
export { extractAnnotations, extractExtendedMetadata, extractToolParams, assessSingleTool, determineAnnotationStatus, calculateMetrics, } from "./AlignmentChecker.js";
|
|
18
|
+
// Issue #105: Explanation Generator
|
|
19
|
+
export { generateExplanation, generateEnhancedExplanation, generateRecommendations, generateEnhancedRecommendations, } from "./ExplanationGenerator.js";
|
|
20
|
+
// Issue #105: Event Emitter
|
|
21
|
+
export { emitAnnotationEvents, emitMismatchEvent } from "./EventEmitter.js";
|
|
22
|
+
// Issue #105: Claude Integration
|
|
23
|
+
export { enhanceWithClaudeInference, createPatternBasedInference, } from "./ClaudeIntegration.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Types for Annotation Assessment Modules
|
|
3
|
+
*
|
|
4
|
+
* Consolidates common type definitions used across annotation helper modules.
|
|
5
|
+
* Created as part of Issue #105 refactoring to eliminate duplicate definitions.
|
|
6
|
+
*/
|
|
7
|
+
import type { ToolAnnotationResult } from "../../../../lib/assessmentTypes.js";
|
|
8
|
+
/**
|
|
9
|
+
* Claude inference result structure
|
|
10
|
+
* Contains semantic analysis of tool behavior from Claude
|
|
11
|
+
*/
|
|
12
|
+
export interface ClaudeInference {
|
|
13
|
+
expectedReadOnly: boolean;
|
|
14
|
+
expectedDestructive: boolean;
|
|
15
|
+
confidence: number;
|
|
16
|
+
reasoning: string;
|
|
17
|
+
suggestedAnnotations: {
|
|
18
|
+
readOnlyHint?: boolean;
|
|
19
|
+
destructiveHint?: boolean;
|
|
20
|
+
idempotentHint?: boolean;
|
|
21
|
+
};
|
|
22
|
+
misalignmentDetected: boolean;
|
|
23
|
+
misalignmentDetails?: string;
|
|
24
|
+
source: "claude-inferred" | "pattern-based";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Enhanced tool annotation result with Claude inference
|
|
28
|
+
* Extends the base result with optional Claude semantic analysis
|
|
29
|
+
*/
|
|
30
|
+
export interface EnhancedToolAnnotationResult extends ToolAnnotationResult {
|
|
31
|
+
claudeInference?: ClaudeInference;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE;QACpB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,GAAG,eAAe,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,oBAAoB;IACxE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC"}
|
|
@@ -37,6 +37,9 @@ export declare class SafeResponseDetector {
|
|
|
37
37
|
/**
|
|
38
38
|
* Check if response is just reflection (safe)
|
|
39
39
|
* Two-layer defense: Match reflection patterns, verify NO execution evidence
|
|
40
|
+
*
|
|
41
|
+
* Issue #110, Challenge #8: Also checks for LLM injection markers and
|
|
42
|
+
* output injection vulnerability metadata before declaring response safe.
|
|
40
43
|
*/
|
|
41
44
|
isReflectionResponse(responseText: string): boolean;
|
|
42
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SafeResponseDetector.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SafeResponseDetector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"SafeResponseDetector.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SafeResponseDetector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAgBjF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,iBAAiB,CAA4B;;IAMrD;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO;IAQzE;;OAEG;IACH,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAIlD;;;;;;OAMG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IA8EnD;;OAEG;IACH,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAIrD;;OAEG;IACH,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAIjD;;OAEG;IACH,qBAAqB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO;IA0CrE;;OAEG;IACH,sBAAsB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,MAAM;CAUtE"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Extracted from SecurityResponseAnalyzer.ts (Issue #53)
|
|
6
6
|
* Handles: MCP validation, HTTP errors, reflection detection, validation rejection
|
|
7
7
|
*/
|
|
8
|
-
import { VALIDATION_ERROR_PATTERNS, STATUS_PATTERNS, REFLECTION_PATTERNS, SEARCH_RESULT_PATTERNS, CREATION_PATTERNS, TEXT_REJECTION_PATTERNS, RESULT_REJECTION_PATTERNS, isHttpError, matchesAny, } from "./SecurityPatternLibrary.js";
|
|
8
|
+
import { VALIDATION_ERROR_PATTERNS, STATUS_PATTERNS, REFLECTION_PATTERNS, SEARCH_RESULT_PATTERNS, CREATION_PATTERNS, TEXT_REJECTION_PATTERNS, RESULT_REJECTION_PATTERNS, isHttpError, matchesAny, hasLLMInjectionMarkers, hasOutputInjectionVulnerability, } from "./SecurityPatternLibrary.js";
|
|
9
9
|
import { ExecutionArtifactDetector } from "./ExecutionArtifactDetector.js";
|
|
10
10
|
/**
|
|
11
11
|
* Detects safe response patterns indicating proper tool behavior
|
|
@@ -33,8 +33,21 @@ export class SafeResponseDetector {
|
|
|
33
33
|
/**
|
|
34
34
|
* Check if response is just reflection (safe)
|
|
35
35
|
* Two-layer defense: Match reflection patterns, verify NO execution evidence
|
|
36
|
+
*
|
|
37
|
+
* Issue #110, Challenge #8: Also checks for LLM injection markers and
|
|
38
|
+
* output injection vulnerability metadata before declaring response safe.
|
|
36
39
|
*/
|
|
37
40
|
isReflectionResponse(responseText) {
|
|
41
|
+
// Issue #110: Check for LLM injection markers BEFORE reflection check
|
|
42
|
+
// If response contains <IMPORTANT>, [INST], or similar markers, it's not safe
|
|
43
|
+
if (hasLLMInjectionMarkers(responseText)) {
|
|
44
|
+
return false; // Not safe - contains potential LLM injection
|
|
45
|
+
}
|
|
46
|
+
// Issue #110: Check for output injection vulnerability metadata
|
|
47
|
+
// If tool self-reports raw_content_included or injection risk, it's not safe
|
|
48
|
+
if (hasOutputInjectionVulnerability(responseText)) {
|
|
49
|
+
return false; // Not safe - tool reports output injection vulnerability
|
|
50
|
+
}
|
|
38
51
|
// Combine status patterns and reflection patterns
|
|
39
52
|
const allReflectionPatterns = [...STATUS_PATTERNS, ...REFLECTION_PATTERNS];
|
|
40
53
|
const hasReflection = matchesAny(allReflectionPatterns, responseText);
|
|
@@ -40,6 +40,25 @@ export declare const EXECUTION_ARTIFACT_PATTERNS: {
|
|
|
40
40
|
/** Context-sensitive - only count if no echoed payload */
|
|
41
41
|
readonly contextSensitive: readonly [RegExp, RegExp, RegExp];
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Patterns for detecting LLM prompt injection markers in tool output
|
|
45
|
+
* These indicate potential indirect prompt injection (output injection)
|
|
46
|
+
* Used by: hasLLMInjectionMarkers()
|
|
47
|
+
*
|
|
48
|
+
* When tool output contains these markers, it may flow to the orchestrating
|
|
49
|
+
* LLM and influence its behavior - a security concern for MCP integrations.
|
|
50
|
+
*/
|
|
51
|
+
export declare const LLM_INJECTION_MARKERS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
52
|
+
/**
|
|
53
|
+
* Patterns for detecting output injection vulnerability metadata
|
|
54
|
+
* Tools that self-report vulnerability status
|
|
55
|
+
*/
|
|
56
|
+
export declare const OUTPUT_INJECTION_METADATA: {
|
|
57
|
+
/** Tool reports it includes raw/unsanitized content */
|
|
58
|
+
readonly rawContentIncluded: readonly [RegExp, RegExp, RegExp];
|
|
59
|
+
/** Tool reports vulnerability in output handling */
|
|
60
|
+
readonly vulnerableOutput: readonly [RegExp, RegExp, RegExp, RegExp];
|
|
61
|
+
};
|
|
43
62
|
/**
|
|
44
63
|
* Patterns for connection/server errors
|
|
45
64
|
* Used by: isConnectionError(), isConnectionErrorFromException()
|
|
@@ -373,4 +392,14 @@ export declare function isHttpError(text: string): boolean;
|
|
|
373
392
|
* Check if response has MCP error prefix
|
|
374
393
|
*/
|
|
375
394
|
export declare function hasMcpErrorPrefix(text: string): boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Check if text contains LLM injection markers (Issue #110, Challenge #8)
|
|
397
|
+
* Detects XML-style tags, chat format markers, and instruction overrides
|
|
398
|
+
*/
|
|
399
|
+
export declare function hasLLMInjectionMarkers(text: string): boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Check if response indicates output injection vulnerability (Issue #110, Challenge #8)
|
|
402
|
+
* Detects tools that self-report including raw/unsanitized content
|
|
403
|
+
*/
|
|
404
|
+
export declare function hasOutputInjectionVulnerability(text: string): boolean;
|
|
376
405
|
//# sourceMappingURL=SecurityPatternLibrary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityPatternLibrary.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityPatternLibrary.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,kEAAkE;;IAIlE,8DAA8D;;IAG9D,kCAAkC;;IAGlC,gCAAgC;;CAExB,CAAC;AAMX;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,2JAmB5B,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,oBAAoB,2LAuBvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B;IACtC,iCAAiC;;IAejC,0DAA0D;;CAElD,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M,GAAG,OAAO,CAEvD"}
|
|
1
|
+
{"version":3,"file":"SecurityPatternLibrary.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityPatternLibrary.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,kEAAkE;;IAIlE,8DAA8D;;IAG9D,kCAAkC;;IAGlC,gCAAgC;;CAExB,CAAC;AAMX;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,2JAmB5B,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,oBAAoB,2LAuBvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B;IACtC,iCAAiC;;IAejC,0DAA0D;;CAElD,CAAC;AAMX;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,2KA4BxB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,yBAAyB;IACpC,uDAAuD;;IAOvD,oDAAoD;;CAO5C,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,yBAAyB;IACpC,oCAAoC;;IAqBpC,4DAA4D;;IAW5D,+BAA+B;;CAEvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;CAMhC,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,eAAe,mJAkBlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB,2rBAwGtB,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc5B,CAAC;AAMX;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;EAiCjC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAyB3B,CAAC;AAM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,eAAO,MAAM,wBAAwB,2EAS3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B,oRA4B9B,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IAClC,iCAAiC;;IAQjC,mDAAmD;;IAInD,gDAAgD;;IAIhD,oCAAoC;;IAEpC,6CAA6C;;CAIrC,CAAC;AAMX;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;IACpC,oDAAoD;;IAOpD,wCAAwC;;CAEhC,CAAC;AAMX;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKrE"}
|
|
@@ -104,6 +104,62 @@ export const EXECUTION_ARTIFACT_PATTERNS = {
|
|
|
104
104
|
contextSensitive: [/\/etc\/passwd/i, /\/etc\/shadow/i, /file:\/\/\//i],
|
|
105
105
|
};
|
|
106
106
|
// =============================================================================
|
|
107
|
+
// LLM INJECTION MARKER PATTERNS (Issue #110, Challenge #8)
|
|
108
|
+
// =============================================================================
|
|
109
|
+
/**
|
|
110
|
+
* Patterns for detecting LLM prompt injection markers in tool output
|
|
111
|
+
* These indicate potential indirect prompt injection (output injection)
|
|
112
|
+
* Used by: hasLLMInjectionMarkers()
|
|
113
|
+
*
|
|
114
|
+
* When tool output contains these markers, it may flow to the orchestrating
|
|
115
|
+
* LLM and influence its behavior - a security concern for MCP integrations.
|
|
116
|
+
*/
|
|
117
|
+
export const LLM_INJECTION_MARKERS = [
|
|
118
|
+
// XML-style instruction tags
|
|
119
|
+
/<IMPORTANT>/i,
|
|
120
|
+
/<\/IMPORTANT>/i,
|
|
121
|
+
/<SYSTEM>/i,
|
|
122
|
+
/<\/SYSTEM>/i,
|
|
123
|
+
/<INSTRUCTION>/i,
|
|
124
|
+
/<\/INSTRUCTION>/i,
|
|
125
|
+
// Chat model format markers
|
|
126
|
+
/\[INST\]/i,
|
|
127
|
+
/\[\/INST\]/i,
|
|
128
|
+
/<\|system\|>/i,
|
|
129
|
+
/<\|user\|>/i,
|
|
130
|
+
/<\|assistant\|>/i,
|
|
131
|
+
/<\|im_start\|>/i,
|
|
132
|
+
/<\|im_end\|>/i,
|
|
133
|
+
// Template injection patterns
|
|
134
|
+
/\{\{SYSTEM_PROMPT\}\}/i,
|
|
135
|
+
/\{\{USER_INPUT\}\}/i,
|
|
136
|
+
/\{\{ASSISTANT\}\}/i,
|
|
137
|
+
// Instruction override patterns
|
|
138
|
+
/ignore.*previous.*instructions/i,
|
|
139
|
+
/disregard.*above.*instructions/i,
|
|
140
|
+
/new.*instructions.*follow/i,
|
|
141
|
+
/override.*system.*prompt/i,
|
|
142
|
+
];
|
|
143
|
+
/**
|
|
144
|
+
* Patterns for detecting output injection vulnerability metadata
|
|
145
|
+
* Tools that self-report vulnerability status
|
|
146
|
+
*/
|
|
147
|
+
export const OUTPUT_INJECTION_METADATA = {
|
|
148
|
+
/** Tool reports it includes raw/unsanitized content */
|
|
149
|
+
rawContentIncluded: [
|
|
150
|
+
/"raw_content_included"\s*:\s*true/i,
|
|
151
|
+
/"unsanitized"\s*:\s*true/i,
|
|
152
|
+
/"content_sanitized"\s*:\s*false/i,
|
|
153
|
+
],
|
|
154
|
+
/** Tool reports vulnerability in output handling */
|
|
155
|
+
vulnerableOutput: [
|
|
156
|
+
/enables\s+indirect\s+prompt\s+injection/i,
|
|
157
|
+
/returns\s+unsanitized\s+user\s+content/i,
|
|
158
|
+
/output\s+injection/i,
|
|
159
|
+
/"injection_risk"\s*:\s*true/i,
|
|
160
|
+
],
|
|
161
|
+
};
|
|
162
|
+
// =============================================================================
|
|
107
163
|
// CONNECTION ERROR PATTERNS (consolidated from 2 duplicate locations)
|
|
108
164
|
// =============================================================================
|
|
109
165
|
/**
|
|
@@ -952,3 +1008,18 @@ export function isHttpError(text) {
|
|
|
952
1008
|
export function hasMcpErrorPrefix(text) {
|
|
953
1009
|
return CONNECTION_ERROR_PATTERNS.mcpPrefix.test(text);
|
|
954
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Check if text contains LLM injection markers (Issue #110, Challenge #8)
|
|
1013
|
+
* Detects XML-style tags, chat format markers, and instruction overrides
|
|
1014
|
+
*/
|
|
1015
|
+
export function hasLLMInjectionMarkers(text) {
|
|
1016
|
+
return matchesAny(LLM_INJECTION_MARKERS, text);
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Check if response indicates output injection vulnerability (Issue #110, Challenge #8)
|
|
1020
|
+
* Detects tools that self-report including raw/unsanitized content
|
|
1021
|
+
*/
|
|
1022
|
+
export function hasOutputInjectionVulnerability(text) {
|
|
1023
|
+
return (matchesAny(OUTPUT_INJECTION_METADATA.rawContentIncluded, text) ||
|
|
1024
|
+
matchesAny(OUTPUT_INJECTION_METADATA.vulnerableOutput, text));
|
|
1025
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityPayloadTester.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityPayloadTester.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAGjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,IAAI,EACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO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EAAE,EACb,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,2BAA2B,CAAC,EACzC,UAAU,CAAC,EAAE,oBAAoB,GAChC,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA8IhC;;OAEG;IACG,WAAW,CACf,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,2BAA2B,CAAC,GACxC,OAAO,CAAC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SecurityPayloadTester.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/SecurityPayloadTester.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAGjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,IAAI,EACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGL,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAOhC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,E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kBAAkB,CAAC;IAsM9B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;OAEG;IACH,OAAO,CAAC,KAAK;CAGd"}
|
|
@@ -319,6 +319,26 @@ export class SecurityPayloadTester {
|
|
|
319
319
|
authBypassEvidence: authResult.evidence,
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
+
// Issue #110: Analyze blacklist bypass patterns for "Blacklist Bypass" attack type
|
|
323
|
+
let blacklistBypassFields = {};
|
|
324
|
+
if (attackName === "Blacklist Bypass") {
|
|
325
|
+
const bypassResult = this.responseAnalyzer.analyzeBlacklistBypassResponse(response);
|
|
326
|
+
blacklistBypassFields = {
|
|
327
|
+
blacklistBypassDetected: bypassResult.detected,
|
|
328
|
+
blacklistBypassType: bypassResult.bypassType,
|
|
329
|
+
blacklistBypassMethod: bypassResult.bypassMethod,
|
|
330
|
+
blacklistBypassEvidence: bypassResult.evidence,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
// Issue #110: Analyze output injection patterns for Challenge #8
|
|
334
|
+
// Check ALL responses since any tool could have output injection vulnerabilities
|
|
335
|
+
const outputInjectionResult = this.responseAnalyzer.analyzeOutputInjectionResponse(response);
|
|
336
|
+
const outputInjectionFields = {
|
|
337
|
+
outputInjectionDetected: outputInjectionResult.detected,
|
|
338
|
+
outputInjectionType: outputInjectionResult.injectionType,
|
|
339
|
+
outputInjectionMarkers: outputInjectionResult.markers,
|
|
340
|
+
outputInjectionEvidence: outputInjectionResult.evidence,
|
|
341
|
+
};
|
|
322
342
|
return {
|
|
323
343
|
testName: attackName,
|
|
324
344
|
description: payload.description,
|
|
@@ -333,6 +353,10 @@ export class SecurityPayloadTester {
|
|
|
333
353
|
sanitizationLibraries: combinedSanitization.libraries,
|
|
334
354
|
// Issue #75: Auth bypass detection fields
|
|
335
355
|
...authBypassFields,
|
|
356
|
+
// Issue #110: Blacklist bypass detection fields
|
|
357
|
+
...blacklistBypassFields,
|
|
358
|
+
// Issue #110: Output injection detection fields (Challenge #8)
|
|
359
|
+
...outputInjectionFields,
|
|
336
360
|
...confidenceResult,
|
|
337
361
|
};
|
|
338
362
|
}
|
|
@@ -45,6 +45,26 @@ export interface StateBasedAuthResult {
|
|
|
45
45
|
stateDependency: "SHARED_STATE" | "INDEPENDENT" | "UNKNOWN";
|
|
46
46
|
evidence: string;
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Result of blacklist bypass response analysis (Issue #110, Challenge #11)
|
|
50
|
+
* Detects incomplete blacklist security controls being bypassed
|
|
51
|
+
*/
|
|
52
|
+
export interface BlacklistBypassResult {
|
|
53
|
+
detected: boolean;
|
|
54
|
+
bypassType: "BLACKLIST_BYPASS" | "ALLOWLIST_BLOCKED" | "UNKNOWN";
|
|
55
|
+
bypassMethod?: string;
|
|
56
|
+
evidence?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Result of output injection response analysis (Issue #110, Challenge #8)
|
|
60
|
+
* Detects indirect prompt injection via unsanitized tool output
|
|
61
|
+
*/
|
|
62
|
+
export interface OutputInjectionResult {
|
|
63
|
+
detected: boolean;
|
|
64
|
+
injectionType: "LLM_INJECTION_MARKERS" | "RAW_CONTENT_INCLUDED" | "SANITIZED" | "UNKNOWN";
|
|
65
|
+
markers?: string[];
|
|
66
|
+
evidence?: string;
|
|
67
|
+
}
|
|
48
68
|
/**
|
|
49
69
|
* Chain execution type classification (Issue #93, Challenge #6)
|
|
50
70
|
*/
|
|
@@ -115,6 +135,31 @@ export declare class SecurityResponseAnalyzer {
|
|
|
115
135
|
* indicated by shared_state_checked: false or independent_auth_required: true
|
|
116
136
|
*/
|
|
117
137
|
analyzeStateBasedAuthBypass(response: CompatibilityCallToolResult): StateBasedAuthResult;
|
|
138
|
+
/**
|
|
139
|
+
* Analyze response for blacklist bypass patterns (Issue #110, Challenge #11)
|
|
140
|
+
* Detects when incomplete blacklist security controls are bypassed
|
|
141
|
+
*
|
|
142
|
+
* This method extracts JSON metadata from tool responses to detect:
|
|
143
|
+
* - VULNERABLE: bypass_used: true, blacklist_check: "passed"
|
|
144
|
+
* - SAFE: execution_blocked: true, allowlist_used: true
|
|
145
|
+
*
|
|
146
|
+
* @param response The tool response to analyze
|
|
147
|
+
* @returns Analysis result with bypass detection status
|
|
148
|
+
*/
|
|
149
|
+
analyzeBlacklistBypassResponse(response: CompatibilityCallToolResult): BlacklistBypassResult;
|
|
150
|
+
/**
|
|
151
|
+
* Analyze response for output injection vulnerabilities (Issue #110, Challenge #8)
|
|
152
|
+
* Detects indirect prompt injection via unsanitized tool output
|
|
153
|
+
*
|
|
154
|
+
* This method detects:
|
|
155
|
+
* - VULNERABLE: LLM injection markers (<IMPORTANT>, [INST], etc.) in output
|
|
156
|
+
* - VULNERABLE: Tool self-reports raw_content_included: true
|
|
157
|
+
* - SAFE: Tool reports content_sanitized: true or uses hash references
|
|
158
|
+
*
|
|
159
|
+
* @param response The tool response to analyze
|
|
160
|
+
* @returns Analysis result with output injection detection status
|
|
161
|
+
*/
|
|
162
|
+
analyzeOutputInjectionResponse(response: CompatibilityCallToolResult): OutputInjectionResult;
|
|
118
163
|
/**
|
|
119
164
|
* Analyze response for chain exploitation vulnerabilities (Issue #93, Challenge #6)
|
|
120
165
|
* Detects multi-tool chained exploitation attacks including:
|
|
@@ -138,6 +183,27 @@ export declare class SecurityResponseAnalyzer {
|
|
|
138
183
|
* - Database connection strings with credentials
|
|
139
184
|
* - Environment variable values
|
|
140
185
|
* - Partial key previews
|
|
186
|
+
*
|
|
187
|
+
* @note This method must be called separately from analyzeResponse().
|
|
188
|
+
* It is not part of the standard vulnerability detection flow because
|
|
189
|
+
* secret leakage detection requires examining ALL responses, not just
|
|
190
|
+
* those matching attack payloads. Callers should invoke this method
|
|
191
|
+
* independently when auditing tool responses for credential exposure.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```typescript
|
|
195
|
+
* const analyzer = new SecurityResponseAnalyzer();
|
|
196
|
+
* const response = await client.callTool("get_status", { verbose: true });
|
|
197
|
+
*
|
|
198
|
+
* // Standard vulnerability check
|
|
199
|
+
* const vulnResult = analyzer.analyzeResponse(response, payload);
|
|
200
|
+
*
|
|
201
|
+
* // Additional secret leakage check (separate concern)
|
|
202
|
+
* const leakResult = analyzer.checkSecretLeakage(response);
|
|
203
|
+
* if (leakResult.detected) {
|
|
204
|
+
* console.warn(`Secret leaked: ${leakResult.evidence}`);
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
141
207
|
*/
|
|
142
208
|
checkSecretLeakage(response: CompatibilityCallToolResult): {
|
|
143
209
|
detected: boolean;
|
|
@@ -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;AAYxE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AAC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AQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,EACxB,kBAAkB,CAAC,EAAE,2BAA2B,GAC/C,gBAAgB;IAWnB;;;OAGG;IACH,yBAAyB,CACvB,QAAQ,EAAE,2BAA2B,GACpC,gBAAgB;IAsFnB;;;;;;;;;OASG;IACH,2BAA2B,CACzB,QAAQ,EAAE,2BAA2B,GACpC,oBAAoB;IAmGvB;;;;;;;;;;;;OAYG;IACH,wBAAwB,CACtB,QAAQ,EAAE,2BAA2B,GACpC,yBAAyB;IA6D5B
|
|
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;AAYxE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EA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