@bryan-thompson/inspector-assessment-client 1.34.1 → 1.35.1
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-C27_rGpA.js → OAuthCallback-DC1cIXHT.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-DpgDVJTf.js → OAuthDebugCallback-C3gqJjgQ.js} +1 -1
- package/dist/assets/{index-BX8lZxC_.js → index-Dn2w887x.js} +5 -4
- package/dist/index.html +1 -1
- package/lib/lib/assessment/configSchemas.d.ts +12 -12
- package/lib/lib/assessment/jsonlEventSchemas.d.ts +79 -1
- package/lib/lib/assessment/jsonlEventSchemas.d.ts.map +1 -1
- package/lib/lib/assessment/jsonlEventSchemas.js +31 -1
- package/lib/lib/assessment/progressTypes.d.ts +17 -1
- package/lib/lib/assessment/progressTypes.d.ts.map +1 -1
- package/lib/lib/assessment/resultTypes.d.ts +64 -0
- package/lib/lib/assessment/resultTypes.d.ts.map +1 -1
- package/lib/lib/assessment/sharedSchemas.d.ts +13 -0
- package/lib/lib/assessment/sharedSchemas.d.ts.map +1 -1
- package/lib/lib/assessment/sharedSchemas.js +9 -0
- package/lib/lib/assessment/summarizer/AssessmentSummarizer.d.ts +112 -0
- package/lib/lib/assessment/summarizer/AssessmentSummarizer.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/AssessmentSummarizer.js +452 -0
- package/lib/lib/assessment/summarizer/index.d.ts +19 -0
- package/lib/lib/assessment/summarizer/index.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/index.js +19 -0
- package/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.d.ts +36 -0
- package/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/stageBEnrichmentBuilder.js +282 -0
- package/lib/lib/assessment/summarizer/stageBTypes.d.ts +154 -0
- package/lib/lib/assessment/summarizer/stageBTypes.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/stageBTypes.js +24 -0
- package/lib/lib/assessment/summarizer/tokenEstimator.d.ts +103 -0
- package/lib/lib/assessment/summarizer/tokenEstimator.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/tokenEstimator.js +225 -0
- package/lib/lib/assessment/summarizer/types.d.ts +187 -0
- package/lib/lib/assessment/summarizer/types.d.ts.map +1 -0
- package/lib/lib/assessment/summarizer/types.js +20 -0
- package/lib/lib/moduleScoring.d.ts +6 -1
- package/lib/lib/moduleScoring.d.ts.map +1 -1
- package/lib/lib/moduleScoring.js +6 -1
- package/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.js +37 -3
- package/lib/services/assessment/modules/securityTests/TestValidityAnalyzer.d.ts +118 -0
- package/lib/services/assessment/modules/securityTests/TestValidityAnalyzer.d.ts.map +1 -0
- package/lib/services/assessment/modules/securityTests/TestValidityAnalyzer.js +403 -0
- package/lib/services/assessment/modules/securityTests/index.d.ts +1 -0
- package/lib/services/assessment/modules/securityTests/index.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Estimation Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides token counting and threshold detection for tiered output strategy.
|
|
5
|
+
* Uses industry-standard approximation of ~4 characters per token.
|
|
6
|
+
*
|
|
7
|
+
* Issue #136: Tiered output strategy for large assessments
|
|
8
|
+
*
|
|
9
|
+
* @module assessment/summarizer/tokenEstimator
|
|
10
|
+
*/
|
|
11
|
+
import { DEFAULT_SUMMARIZER_CONFIG } from "./types.js";
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// Constants
|
|
14
|
+
// ============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Average characters per token for modern LLMs (GPT, Claude).
|
|
17
|
+
* This is an approximation; actual tokenization varies by model and content.
|
|
18
|
+
*/
|
|
19
|
+
const CHARS_PER_TOKEN = 4;
|
|
20
|
+
/**
|
|
21
|
+
* Buffer factor to account for JSON formatting overhead.
|
|
22
|
+
* Pretty-printed JSON adds whitespace that increases character count.
|
|
23
|
+
*/
|
|
24
|
+
const JSON_FORMAT_BUFFER = 1.1;
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// Token Estimation Functions
|
|
27
|
+
// ============================================================================
|
|
28
|
+
/**
|
|
29
|
+
* Estimate the number of tokens for any content.
|
|
30
|
+
*
|
|
31
|
+
* Uses the industry-standard approximation of ~4 characters per token.
|
|
32
|
+
* For JSON content, applies a buffer for formatting overhead.
|
|
33
|
+
*
|
|
34
|
+
* @param content - Content to estimate (string, object, or array)
|
|
35
|
+
* @returns Estimated token count
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* // String content
|
|
40
|
+
* estimateTokens("Hello world"); // ~3 tokens
|
|
41
|
+
*
|
|
42
|
+
* // Object content (will be JSON stringified)
|
|
43
|
+
* estimateTokens({ name: "test", value: 123 }); // ~10 tokens
|
|
44
|
+
*
|
|
45
|
+
* // Large assessment results
|
|
46
|
+
* estimateTokens(assessmentResults); // ~50,000+ tokens
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export function estimateTokens(content) {
|
|
50
|
+
let charCount;
|
|
51
|
+
if (typeof content === "string") {
|
|
52
|
+
charCount = content.length;
|
|
53
|
+
}
|
|
54
|
+
else if (content === null || content === undefined) {
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// JSON stringify for objects/arrays
|
|
59
|
+
try {
|
|
60
|
+
const json = JSON.stringify(content, null, 2);
|
|
61
|
+
charCount = Math.ceil(json.length * JSON_FORMAT_BUFFER);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Fallback for circular references or other stringify issues
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return Math.ceil(charCount / CHARS_PER_TOKEN);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Estimate tokens for a JSON file that would be written.
|
|
72
|
+
* Accounts for pretty-printing with indent=2.
|
|
73
|
+
*
|
|
74
|
+
* @param content - Content that would be JSON.stringify'd
|
|
75
|
+
* @returns Estimated token count
|
|
76
|
+
*/
|
|
77
|
+
export function estimateJsonFileTokens(content) {
|
|
78
|
+
if (content === null || content === undefined) {
|
|
79
|
+
return 0;
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
const json = JSON.stringify(content, null, 2);
|
|
83
|
+
return Math.ceil(json.length / CHARS_PER_TOKEN);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Determine if assessment results should automatically use tiered output.
|
|
91
|
+
*
|
|
92
|
+
* Returns true when estimated token count exceeds the threshold,
|
|
93
|
+
* indicating the full output would not fit in typical LLM context windows.
|
|
94
|
+
*
|
|
95
|
+
* @param results - Full assessment results
|
|
96
|
+
* @param threshold - Token threshold (default: 100,000)
|
|
97
|
+
* @returns true if results should be tiered
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const results = await runAssessment(server);
|
|
102
|
+
*
|
|
103
|
+
* if (shouldAutoTier(results)) {
|
|
104
|
+
* // Use tiered output
|
|
105
|
+
* saveTieredResults(serverName, results, options);
|
|
106
|
+
* } else {
|
|
107
|
+
* // Use standard full output
|
|
108
|
+
* saveResults(serverName, results, options);
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export function shouldAutoTier(results, threshold = DEFAULT_SUMMARIZER_CONFIG.autoTierThreshold) {
|
|
113
|
+
const estimated = estimateTokens(results);
|
|
114
|
+
return estimated > threshold;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get a human-readable token estimate with size category.
|
|
118
|
+
*
|
|
119
|
+
* @param tokenCount - Number of tokens
|
|
120
|
+
* @returns Object with formatted token count and size category
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* formatTokenEstimate(5000);
|
|
125
|
+
* // { tokens: "5,000", category: "small", fitsContext: true }
|
|
126
|
+
*
|
|
127
|
+
* formatTokenEstimate(500000);
|
|
128
|
+
* // { tokens: "500,000", category: "very-large", fitsContext: false }
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export function formatTokenEstimate(tokenCount) {
|
|
132
|
+
const formatted = tokenCount.toLocaleString();
|
|
133
|
+
let category;
|
|
134
|
+
let fitsContext;
|
|
135
|
+
let recommendation;
|
|
136
|
+
if (tokenCount <= 10_000) {
|
|
137
|
+
category = "small";
|
|
138
|
+
fitsContext = true;
|
|
139
|
+
recommendation = "Full output recommended";
|
|
140
|
+
}
|
|
141
|
+
else if (tokenCount <= 50_000) {
|
|
142
|
+
category = "medium";
|
|
143
|
+
fitsContext = true;
|
|
144
|
+
recommendation = "Full output should fit most contexts";
|
|
145
|
+
}
|
|
146
|
+
else if (tokenCount <= 100_000) {
|
|
147
|
+
category = "large";
|
|
148
|
+
fitsContext = true;
|
|
149
|
+
recommendation = "Consider tiered output for smaller context windows";
|
|
150
|
+
}
|
|
151
|
+
else if (tokenCount <= 200_000) {
|
|
152
|
+
category = "very-large";
|
|
153
|
+
fitsContext = false;
|
|
154
|
+
recommendation = "Tiered output recommended";
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
category = "oversized";
|
|
158
|
+
fitsContext = false;
|
|
159
|
+
recommendation = "Tiered output required";
|
|
160
|
+
}
|
|
161
|
+
return { tokens: formatted, category, fitsContext, recommendation };
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Estimate tokens for each major section of assessment results.
|
|
165
|
+
* Useful for understanding which modules contribute most to output size.
|
|
166
|
+
*
|
|
167
|
+
* @param results - Assessment results to analyze
|
|
168
|
+
* @returns Map of section name to estimated token count
|
|
169
|
+
*/
|
|
170
|
+
export function estimateSectionTokens(results) {
|
|
171
|
+
const sections = {};
|
|
172
|
+
// Core assessment sections
|
|
173
|
+
const sectionKeys = [
|
|
174
|
+
"functionality",
|
|
175
|
+
"security",
|
|
176
|
+
"errorHandling",
|
|
177
|
+
"aupCompliance",
|
|
178
|
+
"toolAnnotations",
|
|
179
|
+
"temporal",
|
|
180
|
+
"resources",
|
|
181
|
+
"prompts",
|
|
182
|
+
"crossCapability",
|
|
183
|
+
"protocolCompliance",
|
|
184
|
+
"developerExperience",
|
|
185
|
+
"prohibitedLibraries",
|
|
186
|
+
"manifestValidation",
|
|
187
|
+
"authentication",
|
|
188
|
+
"portability",
|
|
189
|
+
"externalAPIScanner",
|
|
190
|
+
];
|
|
191
|
+
for (const key of sectionKeys) {
|
|
192
|
+
const section = results[key];
|
|
193
|
+
if (section !== undefined) {
|
|
194
|
+
sections[key] = estimateTokens(section);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Metadata and summary
|
|
198
|
+
sections["metadata"] = estimateTokens({
|
|
199
|
+
serverName: results.serverName,
|
|
200
|
+
overallStatus: results.overallStatus,
|
|
201
|
+
summary: results.summary,
|
|
202
|
+
recommendations: results.recommendations,
|
|
203
|
+
totalTestsRun: results.totalTestsRun,
|
|
204
|
+
executionTime: results.executionTime,
|
|
205
|
+
});
|
|
206
|
+
// Calculate total
|
|
207
|
+
sections["_total"] = Object.entries(sections)
|
|
208
|
+
.filter(([key]) => !key.startsWith("_"))
|
|
209
|
+
.reduce((sum, [, tokens]) => sum + tokens, 0);
|
|
210
|
+
return sections;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Get the top N largest sections by token count.
|
|
214
|
+
*
|
|
215
|
+
* @param results - Assessment results
|
|
216
|
+
* @param topN - Number of sections to return (default: 5)
|
|
217
|
+
* @returns Array of [sectionName, tokenCount] sorted by size descending
|
|
218
|
+
*/
|
|
219
|
+
export function getTopSections(results, topN = 5) {
|
|
220
|
+
const sections = estimateSectionTokens(results);
|
|
221
|
+
return Object.entries(sections)
|
|
222
|
+
.filter(([key]) => !key.startsWith("_"))
|
|
223
|
+
.sort((a, b) => b[1] - a[1])
|
|
224
|
+
.slice(0, topN);
|
|
225
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiered Output Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the tiered output strategy that generates
|
|
5
|
+
* LLM-consumable summaries from large assessment results.
|
|
6
|
+
*
|
|
7
|
+
* Issue #136: Tiered output strategy for large assessments
|
|
8
|
+
*
|
|
9
|
+
* @module assessment/summarizer/types
|
|
10
|
+
*/
|
|
11
|
+
import type { AssessmentStatus } from "../coreTypes.js";
|
|
12
|
+
import type { ToolSummaryStageBEnrichment } from "./stageBTypes.js";
|
|
13
|
+
/**
|
|
14
|
+
* Output format for assessment results.
|
|
15
|
+
* - "full": Complete JSON output (default, existing behavior)
|
|
16
|
+
* - "tiered": Directory structure with executive summary, tool summaries, and per-tool details
|
|
17
|
+
* - "summary-only": Only executive summary and tool summaries (no per-tool detail files)
|
|
18
|
+
*/
|
|
19
|
+
export type OutputFormat = "full" | "tiered" | "summary-only";
|
|
20
|
+
/**
|
|
21
|
+
* Risk level categorization for tools based on security assessment results.
|
|
22
|
+
*/
|
|
23
|
+
export type ToolRiskLevel = "HIGH" | "MEDIUM" | "LOW" | "SAFE";
|
|
24
|
+
/**
|
|
25
|
+
* Executive Summary - Tier 1 output.
|
|
26
|
+
* Always generated, always fits in LLM context window.
|
|
27
|
+
* Provides high-level overview for quick assessment understanding.
|
|
28
|
+
*/
|
|
29
|
+
export interface ExecutiveSummary {
|
|
30
|
+
/** Server name from assessment */
|
|
31
|
+
serverName: string;
|
|
32
|
+
/** Overall assessment status (PASS/FAIL/NEED_MORE_INFO) */
|
|
33
|
+
overallStatus: AssessmentStatus;
|
|
34
|
+
/** Calculated overall score (0-100) */
|
|
35
|
+
overallScore: number;
|
|
36
|
+
/** Total number of tools discovered */
|
|
37
|
+
toolCount: number;
|
|
38
|
+
/** Total number of tests executed */
|
|
39
|
+
testCount: number;
|
|
40
|
+
/** Total execution time in milliseconds */
|
|
41
|
+
executionTime: number;
|
|
42
|
+
/**
|
|
43
|
+
* Per-module status and score summary.
|
|
44
|
+
* Key is module name (e.g., "security", "functionality")
|
|
45
|
+
*/
|
|
46
|
+
modulesSummary: Record<string, {
|
|
47
|
+
status: AssessmentStatus;
|
|
48
|
+
score: number;
|
|
49
|
+
}>;
|
|
50
|
+
/** Critical findings aggregated from all modules */
|
|
51
|
+
criticalFindings: {
|
|
52
|
+
/** Number of security vulnerabilities detected */
|
|
53
|
+
securityVulnerabilities: number;
|
|
54
|
+
/** Number of AUP violations detected */
|
|
55
|
+
aupViolations: number;
|
|
56
|
+
/** Number of broken/non-functional tools */
|
|
57
|
+
brokenTools: number;
|
|
58
|
+
/** Number of tools missing required annotations */
|
|
59
|
+
missingAnnotations: number;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Distribution of tools by risk level.
|
|
63
|
+
* Helps quickly understand overall risk profile.
|
|
64
|
+
*/
|
|
65
|
+
toolRiskDistribution: {
|
|
66
|
+
high: number;
|
|
67
|
+
medium: number;
|
|
68
|
+
low: number;
|
|
69
|
+
safe: number;
|
|
70
|
+
};
|
|
71
|
+
/** Top recommendations aggregated from all modules */
|
|
72
|
+
recommendations: string[];
|
|
73
|
+
/** Estimated token count for this summary */
|
|
74
|
+
estimatedTokens: number;
|
|
75
|
+
/** ISO timestamp when summary was generated */
|
|
76
|
+
generatedAt: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Tool Summary - Tier 2 output.
|
|
80
|
+
* Per-tool digest without individual test results.
|
|
81
|
+
* Enables focused analysis on specific tools without full detail.
|
|
82
|
+
*/
|
|
83
|
+
export interface ToolSummary {
|
|
84
|
+
/** Tool name from MCP server */
|
|
85
|
+
toolName: string;
|
|
86
|
+
/** Calculated risk level based on security findings */
|
|
87
|
+
riskLevel: ToolRiskLevel;
|
|
88
|
+
/** Number of vulnerabilities found for this tool */
|
|
89
|
+
vulnerabilityCount: number;
|
|
90
|
+
/**
|
|
91
|
+
* Top vulnerability patterns detected.
|
|
92
|
+
* Limited to top 5 for token efficiency.
|
|
93
|
+
*/
|
|
94
|
+
topPatterns: string[];
|
|
95
|
+
/** Total number of tests run on this tool */
|
|
96
|
+
testCount: number;
|
|
97
|
+
/** Percentage of tests that passed (0-100) */
|
|
98
|
+
passRate: number;
|
|
99
|
+
/** Tool-specific recommendations */
|
|
100
|
+
recommendations: string[];
|
|
101
|
+
/** Estimated token count for this summary */
|
|
102
|
+
estimatedTokens: number;
|
|
103
|
+
/** Whether the tool has proper annotations */
|
|
104
|
+
hasAnnotations: boolean;
|
|
105
|
+
/** Annotation alignment status if available */
|
|
106
|
+
annotationStatus?: "ALIGNED" | "MISALIGNED" | "MISSING";
|
|
107
|
+
/** Stage B enrichment for Claude semantic analysis (Issue #137) */
|
|
108
|
+
stageBEnrichment?: ToolSummaryStageBEnrichment;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Collection of tool summaries with aggregate metadata.
|
|
112
|
+
*/
|
|
113
|
+
export interface ToolSummariesCollection {
|
|
114
|
+
/** Individual tool summaries */
|
|
115
|
+
tools: ToolSummary[];
|
|
116
|
+
/** Total number of tools */
|
|
117
|
+
totalTools: number;
|
|
118
|
+
/** Aggregate statistics */
|
|
119
|
+
aggregate: {
|
|
120
|
+
/** Total vulnerabilities across all tools */
|
|
121
|
+
totalVulnerabilities: number;
|
|
122
|
+
/** Average pass rate across all tools */
|
|
123
|
+
averagePassRate: number;
|
|
124
|
+
/** Tools with misaligned annotations */
|
|
125
|
+
misalignedAnnotations: number;
|
|
126
|
+
};
|
|
127
|
+
/** Estimated total tokens for all summaries */
|
|
128
|
+
estimatedTokens: number;
|
|
129
|
+
/** ISO timestamp */
|
|
130
|
+
generatedAt: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Reference to a per-tool detail file (Tier 3).
|
|
134
|
+
* Full test results stored in separate files for deep-dive analysis.
|
|
135
|
+
*/
|
|
136
|
+
export interface ToolDetailReference {
|
|
137
|
+
/** Tool name */
|
|
138
|
+
toolName: string;
|
|
139
|
+
/** Relative path to detail file (e.g., "tools/my_tool.json") */
|
|
140
|
+
relativePath: string;
|
|
141
|
+
/** Absolute path to detail file */
|
|
142
|
+
absolutePath: string;
|
|
143
|
+
/** File size in bytes */
|
|
144
|
+
fileSizeBytes: number;
|
|
145
|
+
/** Estimated token count for full detail */
|
|
146
|
+
estimatedTokens: number;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Complete tiered output structure.
|
|
150
|
+
* Contains all tiers with paths to generated files.
|
|
151
|
+
*/
|
|
152
|
+
export interface TieredOutput {
|
|
153
|
+
/** Tier 1: Executive summary */
|
|
154
|
+
executiveSummary: ExecutiveSummary;
|
|
155
|
+
/** Tier 2: Tool summaries */
|
|
156
|
+
toolSummaries: ToolSummariesCollection;
|
|
157
|
+
/** Tier 3: References to per-tool detail files */
|
|
158
|
+
toolDetailRefs: ToolDetailReference[];
|
|
159
|
+
/** Output directory path */
|
|
160
|
+
outputDir: string;
|
|
161
|
+
/** File paths for each tier */
|
|
162
|
+
paths: {
|
|
163
|
+
executiveSummary: string;
|
|
164
|
+
toolSummaries: string;
|
|
165
|
+
toolDetailsDir: string;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Configuration options for the summarizer.
|
|
170
|
+
*/
|
|
171
|
+
export interface SummarizerConfig {
|
|
172
|
+
/** Maximum number of recommendations to include in executive summary */
|
|
173
|
+
maxRecommendations?: number;
|
|
174
|
+
/** Maximum number of top patterns per tool in tool summaries */
|
|
175
|
+
maxPatternsPerTool?: number;
|
|
176
|
+
/** Token threshold for auto-tiering (default: 100,000) */
|
|
177
|
+
autoTierThreshold?: number;
|
|
178
|
+
/** Whether to include tool detail files (Tier 3) */
|
|
179
|
+
includeToolDetails?: boolean;
|
|
180
|
+
/** Enable Stage B enrichment for Claude semantic analysis (Issue #137) */
|
|
181
|
+
stageBVerbose?: boolean;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Default summarizer configuration values.
|
|
185
|
+
*/
|
|
186
|
+
export declare const DEFAULT_SUMMARIZER_CONFIG: Required<SummarizerConfig>;
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/assessment/summarizer/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAMjE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAM/D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IAEnB,2DAA2D;IAC3D,aAAa,EAAE,gBAAgB,CAAC;IAEhC,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IAErB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAElB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAElB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,EAAE,MAAM,CACpB,MAAM,EACN;QACE,MAAM,EAAE,gBAAgB,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;KACf,CACF,CAAC;IAEF,oDAAoD;IACpD,gBAAgB,EAAE;QAChB,kDAAkD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,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,gBAAgB,CAMhE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiered Output Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the tiered output strategy that generates
|
|
5
|
+
* LLM-consumable summaries from large assessment results.
|
|
6
|
+
*
|
|
7
|
+
* Issue #136: Tiered output strategy for large assessments
|
|
8
|
+
*
|
|
9
|
+
* @module assessment/summarizer/types
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Default summarizer configuration values.
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_SUMMARIZER_CONFIG = {
|
|
15
|
+
maxRecommendations: 10,
|
|
16
|
+
maxPatternsPerTool: 5,
|
|
17
|
+
autoTierThreshold: 100_000,
|
|
18
|
+
includeToolDetails: true,
|
|
19
|
+
stageBVerbose: false,
|
|
20
|
+
};
|
|
@@ -32,6 +32,11 @@ export declare const INSPECTOR_VERSION: string;
|
|
|
32
32
|
* - scripts/lib/jsonl-events.ts
|
|
33
33
|
* - cli/src/lib/jsonl-events.ts
|
|
34
34
|
* - client/src/services/assessment/orchestratorHelpers.ts
|
|
35
|
+
*
|
|
36
|
+
* Version History:
|
|
37
|
+
* - v1: Initial schema
|
|
38
|
+
* - v2: Added TestValidityWarningEvent (Issue #134)
|
|
39
|
+
* - v3: Added Stage B enrichment for Claude semantic analysis (Issue #137)
|
|
35
40
|
*/
|
|
36
|
-
export declare const SCHEMA_VERSION =
|
|
41
|
+
export declare const SCHEMA_VERSION = 3;
|
|
37
42
|
//# sourceMappingURL=moduleScoring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkCnE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkCnE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC"}
|
package/lib/lib/moduleScoring.js
CHANGED
|
@@ -69,5 +69,10 @@ export const INSPECTOR_VERSION = packageJson.version;
|
|
|
69
69
|
* - scripts/lib/jsonl-events.ts
|
|
70
70
|
* - cli/src/lib/jsonl-events.ts
|
|
71
71
|
* - client/src/services/assessment/orchestratorHelpers.ts
|
|
72
|
+
*
|
|
73
|
+
* Version History:
|
|
74
|
+
* - v1: Initial schema
|
|
75
|
+
* - v2: Added TestValidityWarningEvent (Issue #134)
|
|
76
|
+
* - v3: Added Stage B enrichment for Claude semantic analysis (Issue #137)
|
|
72
77
|
*/
|
|
73
|
-
export const SCHEMA_VERSION =
|
|
78
|
+
export const SCHEMA_VERSION = 3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAiB9D,OAAO,EACL,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,aAAa,CAAwB;IAC7C,OAAO,CAAC,gBAAgB,CAA2B;IACnD,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,YAAY,CAAiC;IAErD;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI;IAStD;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAOjC;;;OAGG;YACW,0BAA0B;gBAwBtC,MAAM,EAAE,OAAO,8BAA8B,EAAE,uBAAuB;IAwClE,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA+OrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAoC7B;;OAEG;YACW,+BAA+B;IAiC7C;;;OAGG;YACW,yBAAyB;IA0CvC;;;;;;;OAOG;YACW,yBAAyB;IAmFvC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkEnC;;;OAGG;IACH,OAAO,CAAC,0BAA0B;CAgDnC"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* Tests for multi-tool chain exploitation attacks
|
|
24
24
|
*/
|
|
25
25
|
import { BaseAssessor } from "./BaseAssessor.js";
|
|
26
|
-
import { SecurityPayloadTester, SecurityPayloadGenerator, CrossToolStateTester, ChainExecutionTester, } from "./securityTests/index.js";
|
|
26
|
+
import { SecurityPayloadTester, SecurityPayloadGenerator, CrossToolStateTester, ChainExecutionTester, TestValidityAnalyzer, } from "./securityTests/index.js";
|
|
27
27
|
import { ToolClassifier, ToolCategory } from "../ToolClassifier.js";
|
|
28
28
|
export class SecurityAssessor extends BaseAssessor {
|
|
29
29
|
payloadTester;
|
|
@@ -217,9 +217,40 @@ export class SecurityAssessor extends BaseAssessor {
|
|
|
217
217
|
// Determine overall risk level
|
|
218
218
|
const overallRiskLevel = this.determineOverallRiskLevel(highRiskCount, mediumRiskCount, vulnerabilities.length);
|
|
219
219
|
// Determine status (pass validTests array to check confidence levels, not allTests)
|
|
220
|
-
|
|
220
|
+
let status = this.determineSecurityStatus(validTests, vulnerabilities.length, validTests.length, connectionErrors.length);
|
|
221
|
+
// Issue #134: Analyze test validity (detect uniform responses)
|
|
222
|
+
const validityAnalyzer = new TestValidityAnalyzer();
|
|
223
|
+
const validityResult = validityAnalyzer.analyze(validTests);
|
|
224
|
+
// Adjust status if test validity is compromised
|
|
225
|
+
let overallConfidence;
|
|
226
|
+
if (validityResult.isCompromised) {
|
|
227
|
+
overallConfidence = validityResult.recommendedConfidence;
|
|
228
|
+
// If tests are compromised and reporting PASS, change to NEED_MORE_INFO
|
|
229
|
+
if (status === "PASS" && validityResult.warningLevel === "critical") {
|
|
230
|
+
status = "NEED_MORE_INFO";
|
|
231
|
+
this.logger.info(`⚠️ Security status changed to NEED_MORE_INFO due to ${validityResult.warning?.percentageIdentical}% identical responses`);
|
|
232
|
+
}
|
|
233
|
+
// Emit test validity warning event
|
|
234
|
+
if (context.onProgress && validityResult.warning) {
|
|
235
|
+
const validityWarningEvent = {
|
|
236
|
+
type: "test_validity_warning",
|
|
237
|
+
module: "security",
|
|
238
|
+
identicalResponseCount: validityResult.warning.identicalResponseCount,
|
|
239
|
+
totalResponses: validityResult.warning.totalResponses,
|
|
240
|
+
percentageIdentical: validityResult.warning.percentageIdentical,
|
|
241
|
+
detectedPattern: validityResult.warning.detectedPattern,
|
|
242
|
+
warningLevel: validityResult.warningLevel,
|
|
243
|
+
recommendedConfidence: validityResult.recommendedConfidence,
|
|
244
|
+
};
|
|
245
|
+
context.onProgress(validityWarningEvent);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
221
248
|
// Generate explanation (pass both validTests and connectionErrors)
|
|
222
|
-
|
|
249
|
+
let explanation = this.generateSecurityExplanation(validTests, connectionErrors, vulnerabilities, overallRiskLevel);
|
|
250
|
+
// Prepend validity warning to explanation if compromised
|
|
251
|
+
if (validityResult.isCompromised && validityResult.warning) {
|
|
252
|
+
explanation = `⚠️ TEST VALIDITY WARNING: ${validityResult.warning.explanation}\n\n${explanation}`;
|
|
253
|
+
}
|
|
223
254
|
// Issue #75: Aggregate auth bypass detection results
|
|
224
255
|
const authBypassSummary = this.aggregateAuthBypassResults(allTests);
|
|
225
256
|
return {
|
|
@@ -229,6 +260,9 @@ export class SecurityAssessor extends BaseAssessor {
|
|
|
229
260
|
status,
|
|
230
261
|
explanation,
|
|
231
262
|
authBypassSummary,
|
|
263
|
+
// Issue #134: Test validity warning for response uniformity detection
|
|
264
|
+
testValidityWarning: validityResult.warning,
|
|
265
|
+
overallConfidence,
|
|
232
266
|
};
|
|
233
267
|
}
|
|
234
268
|
/**
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Validity Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Detects when security test responses are suspiciously uniform,
|
|
5
|
+
* indicating tests may not have reached security-relevant code paths.
|
|
6
|
+
*
|
|
7
|
+
* @see Issue #134: Detect identical security test responses (test validity masking)
|
|
8
|
+
*/
|
|
9
|
+
import type { SecurityTestResult } from "../../../../lib/assessment/resultTypes.js";
|
|
10
|
+
import type { TestValidityWarning } from "../../../../lib/assessment/resultTypes.js";
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for test validity analysis
|
|
13
|
+
*/
|
|
14
|
+
export interface TestValidityConfig {
|
|
15
|
+
/** Percentage threshold to trigger warning (default: 80) */
|
|
16
|
+
warningThresholdPercent: number;
|
|
17
|
+
/** Percentage threshold to reduce confidence (default: 90) */
|
|
18
|
+
confidenceReduceThresholdPercent: number;
|
|
19
|
+
/** Minimum tests required for analysis (default: 10) */
|
|
20
|
+
minimumTestsForAnalysis: number;
|
|
21
|
+
/** Maximum response length to compare (default: 1000) */
|
|
22
|
+
maxResponseCompareLength: number;
|
|
23
|
+
/** Maximum sample payload-response pairs (default: 10) */
|
|
24
|
+
maxSamplePairs: number;
|
|
25
|
+
/** Maximum response distribution entries (default: 5) */
|
|
26
|
+
maxDistributionEntries: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Result of test validity analysis
|
|
30
|
+
*/
|
|
31
|
+
export interface TestValidityResult {
|
|
32
|
+
/** Whether test validity is compromised */
|
|
33
|
+
isCompromised: boolean;
|
|
34
|
+
/** Warning level: none, warning, critical */
|
|
35
|
+
warningLevel: "none" | "warning" | "critical";
|
|
36
|
+
/** Recommended confidence adjustment */
|
|
37
|
+
recommendedConfidence: "high" | "medium" | "low";
|
|
38
|
+
/** Detailed warning information */
|
|
39
|
+
warning?: TestValidityWarning;
|
|
40
|
+
/** Per-tool uniformity analysis */
|
|
41
|
+
toolUniformity?: Map<string, {
|
|
42
|
+
identicalCount: number;
|
|
43
|
+
totalCount: number;
|
|
44
|
+
percentageIdentical: number;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Analyzes security test results for response uniformity.
|
|
49
|
+
*
|
|
50
|
+
* When a high percentage of test responses are identical, it indicates
|
|
51
|
+
* that tests may be hitting a configuration error, connection issue,
|
|
52
|
+
* or other problem that prevents them from reaching security-relevant code.
|
|
53
|
+
*/
|
|
54
|
+
export declare class TestValidityAnalyzer {
|
|
55
|
+
private config;
|
|
56
|
+
constructor(config?: Partial<TestValidityConfig>);
|
|
57
|
+
/**
|
|
58
|
+
* Analyze test results for response uniformity
|
|
59
|
+
*
|
|
60
|
+
* @param testResults - Array of security test results with responses
|
|
61
|
+
* @returns Analysis result with warning details if uniformity detected
|
|
62
|
+
*/
|
|
63
|
+
analyze(testResults: SecurityTestResult[]): TestValidityResult;
|
|
64
|
+
/**
|
|
65
|
+
* Normalize response for comparison.
|
|
66
|
+
* Removes timestamps, UUIDs, request IDs, and other variable content.
|
|
67
|
+
*/
|
|
68
|
+
private normalizeResponse;
|
|
69
|
+
/**
|
|
70
|
+
* Count occurrences of normalized responses
|
|
71
|
+
*/
|
|
72
|
+
private countNormalizedResponses;
|
|
73
|
+
/**
|
|
74
|
+
* Find the most common response
|
|
75
|
+
*/
|
|
76
|
+
private findMostCommon;
|
|
77
|
+
/**
|
|
78
|
+
* Find original (non-normalized) sample that matches the normalized pattern
|
|
79
|
+
*/
|
|
80
|
+
private findOriginalSample;
|
|
81
|
+
/**
|
|
82
|
+
* Detect the category of the response pattern
|
|
83
|
+
*/
|
|
84
|
+
private detectPatternCategory;
|
|
85
|
+
/**
|
|
86
|
+
* Analyze uniformity per tool
|
|
87
|
+
*/
|
|
88
|
+
private analyzePerTool;
|
|
89
|
+
/**
|
|
90
|
+
* Generate human-readable explanation
|
|
91
|
+
*/
|
|
92
|
+
private generateExplanation;
|
|
93
|
+
/**
|
|
94
|
+
* Calculate Shannon entropy for response diversity (0=uniform, 1=max diversity)
|
|
95
|
+
*/
|
|
96
|
+
private calculateEntropy;
|
|
97
|
+
/**
|
|
98
|
+
* Build response distribution sorted by frequency
|
|
99
|
+
*/
|
|
100
|
+
private buildResponseDistribution;
|
|
101
|
+
/**
|
|
102
|
+
* Extract attack category from test name
|
|
103
|
+
*/
|
|
104
|
+
private extractAttackCategory;
|
|
105
|
+
/**
|
|
106
|
+
* Analyze attack pattern correlation by category
|
|
107
|
+
*/
|
|
108
|
+
private analyzeAttackPatterns;
|
|
109
|
+
/**
|
|
110
|
+
* Collect sample payload-response pairs with category diversity
|
|
111
|
+
*/
|
|
112
|
+
private collectSamplePairs;
|
|
113
|
+
/**
|
|
114
|
+
* Collect response metadata statistics
|
|
115
|
+
*/
|
|
116
|
+
private collectResponseMetadata;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=TestValidityAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestValidityAnalyzer.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/securityTests/TestValidityAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,uBAAuB,EAAE,MAAM,CAAC;IAChC,8DAA8D;IAC9D,gCAAgC,EAAE,MAAM,CAAC;IACzC,wDAAwD;IACxD,uBAAuB,EAAE,MAAM,CAAC;IAChC,yDAAyD;IACzD,wBAAwB,EAAE,MAAM,CAAC;IAEjC,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,wCAAwC;IACxC,qBAAqB,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACjD,mCAAmC;IACnC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B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