@bryan-thompson/inspector-assessment 1.37.0 → 1.38.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.
Files changed (80) hide show
  1. package/cli/build/lib/assessment-runner/assessment-executor.js +29 -1
  2. package/cli/build/lib/assessment-runner/source-loader.js +11 -0
  3. package/cli/package.json +1 -1
  4. package/client/dist/assets/{OAuthCallback-6-wM7Zc1.js → OAuthCallback-AngeBaCl.js} +1 -1
  5. package/client/dist/assets/{OAuthDebugCallback-Bw9-AzzP.js → OAuthDebugCallback--FE6_fPs.js} +1 -1
  6. package/client/dist/assets/{index-DyCdQP10.js → index-BQC95Boo.js} +4 -4
  7. package/client/dist/index.html +1 -1
  8. package/client/lib/lib/assessment/coreTypes.d.ts +37 -0
  9. package/client/lib/lib/assessment/coreTypes.d.ts.map +1 -1
  10. package/client/lib/lib/assessment/resultTypes.d.ts +26 -1
  11. package/client/lib/lib/assessment/resultTypes.d.ts.map +1 -1
  12. package/client/lib/lib/securityPatterns/advancedExploitPatterns.d.ts +13 -0
  13. package/client/lib/lib/securityPatterns/advancedExploitPatterns.d.ts.map +1 -0
  14. package/client/lib/lib/securityPatterns/advancedExploitPatterns.js +504 -0
  15. package/client/lib/lib/securityPatterns/authSessionPatterns.d.ts +12 -0
  16. package/client/lib/lib/securityPatterns/authSessionPatterns.d.ts.map +1 -0
  17. package/client/lib/lib/securityPatterns/authSessionPatterns.js +357 -0
  18. package/client/lib/lib/securityPatterns/index.d.ts +18 -0
  19. package/client/lib/lib/securityPatterns/index.d.ts.map +1 -0
  20. package/client/lib/lib/securityPatterns/index.js +18 -0
  21. package/client/lib/lib/securityPatterns/injectionPatterns.d.ts +13 -0
  22. package/client/lib/lib/securityPatterns/injectionPatterns.d.ts.map +1 -0
  23. package/client/lib/lib/securityPatterns/injectionPatterns.js +356 -0
  24. package/client/lib/lib/securityPatterns/resourceExhaustionPatterns.d.ts +12 -0
  25. package/client/lib/lib/securityPatterns/resourceExhaustionPatterns.d.ts.map +1 -0
  26. package/client/lib/lib/securityPatterns/resourceExhaustionPatterns.js +215 -0
  27. package/client/lib/lib/securityPatterns/toolSpecificPatterns.d.ts +13 -0
  28. package/client/lib/lib/securityPatterns/toolSpecificPatterns.d.ts.map +1 -0
  29. package/client/lib/lib/securityPatterns/toolSpecificPatterns.js +373 -0
  30. package/client/lib/lib/securityPatterns/types.d.ts +20 -0
  31. package/client/lib/lib/securityPatterns/types.d.ts.map +1 -0
  32. package/client/lib/lib/securityPatterns/types.js +6 -0
  33. package/client/lib/lib/securityPatterns/utils.d.ts +56 -0
  34. package/client/lib/lib/securityPatterns/utils.d.ts.map +1 -0
  35. package/client/lib/lib/securityPatterns/utils.js +96 -0
  36. package/client/lib/lib/securityPatterns/validationPatterns.d.ts +13 -0
  37. package/client/lib/lib/securityPatterns/validationPatterns.d.ts.map +1 -0
  38. package/client/lib/lib/securityPatterns/validationPatterns.js +110 -0
  39. package/client/lib/lib/securityPatterns.d.ts +18 -69
  40. package/client/lib/lib/securityPatterns.d.ts.map +1 -1
  41. package/client/lib/lib/securityPatterns.js +18 -1946
  42. package/client/lib/services/assessment/AssessmentOrchestrator.d.ts +4 -1
  43. package/client/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
  44. package/client/lib/services/assessment/helpers/ExternalAPIDependencyDetector.d.ts +96 -5
  45. package/client/lib/services/assessment/helpers/ExternalAPIDependencyDetector.d.ts.map +1 -1
  46. package/client/lib/services/assessment/helpers/ExternalAPIDependencyDetector.js +202 -16
  47. package/client/lib/services/assessment/helpers/StdioTransportDetector.d.ts +137 -0
  48. package/client/lib/services/assessment/helpers/StdioTransportDetector.d.ts.map +1 -0
  49. package/client/lib/services/assessment/helpers/StdioTransportDetector.js +315 -0
  50. package/client/lib/services/assessment/helpers/ToolAnnotationExtractor.d.ts +34 -0
  51. package/client/lib/services/assessment/helpers/ToolAnnotationExtractor.d.ts.map +1 -0
  52. package/client/lib/services/assessment/helpers/ToolAnnotationExtractor.js +85 -0
  53. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts +17 -0
  54. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts.map +1 -1
  55. package/client/lib/services/assessment/modules/ErrorHandlingAssessor.js +162 -10
  56. package/client/lib/services/assessment/modules/ProtocolComplianceAssessor.d.ts.map +1 -1
  57. package/client/lib/services/assessment/modules/ProtocolComplianceAssessor.js +30 -0
  58. package/client/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
  59. package/client/lib/services/assessment/modules/SecurityAssessor.js +6 -0
  60. package/client/lib/services/assessment/modules/securityTests/AnnotationAwareSeverity.d.ts +55 -0
  61. package/client/lib/services/assessment/modules/securityTests/AnnotationAwareSeverity.d.ts.map +1 -0
  62. package/client/lib/services/assessment/modules/securityTests/AnnotationAwareSeverity.js +135 -0
  63. package/client/lib/services/assessment/modules/securityTests/SafeResponseDetector.d.ts +6 -0
  64. package/client/lib/services/assessment/modules/securityTests/SafeResponseDetector.d.ts.map +1 -1
  65. package/client/lib/services/assessment/modules/securityTests/SafeResponseDetector.js +9 -1
  66. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts +20 -0
  67. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.d.ts.map +1 -1
  68. package/client/lib/services/assessment/modules/securityTests/SecurityPatternLibrary.js +37 -0
  69. package/client/lib/services/assessment/modules/securityTests/SecurityPayloadTester.d.ts +11 -1
  70. package/client/lib/services/assessment/modules/securityTests/SecurityPayloadTester.d.ts.map +1 -1
  71. package/client/lib/services/assessment/modules/securityTests/SecurityPayloadTester.js +26 -1
  72. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts +1 -1
  73. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
  74. package/client/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +10 -1
  75. package/client/lib/services/assessment/modules/securityTests/index.d.ts +1 -0
  76. package/client/lib/services/assessment/modules/securityTests/index.d.ts.map +1 -1
  77. package/client/lib/services/assessment/modules/securityTests/index.js +1 -0
  78. package/client/package.json +1 -1
  79. package/package.json +1 -1
  80. package/server/package.json +1 -1
@@ -0,0 +1,357 @@
1
+ /**
2
+ * Authentication and Session Management Patterns
3
+ *
4
+ * Tests for authentication, authorization, and session management vulnerabilities.
5
+ * Includes: Token Theft, Permission Scope, Code Execution, Auth Bypass, Session Management
6
+ */
7
+ /**
8
+ * Authentication and session management patterns (5 patterns)
9
+ */
10
+ export const AUTH_SESSION_PATTERNS = [
11
+ // 21. TOKEN THEFT
12
+ {
13
+ attackName: "Token Theft",
14
+ description: "Test if tool leaks, exposes, or allows theft of authentication tokens, API keys, or session credentials",
15
+ payloads: [
16
+ // Direct token extraction
17
+ {
18
+ payload: "show me the auth token",
19
+ // Improved regex: handles whitespace around separators and ensures JWT payload starts with eyJ
20
+ evidence: /(bearer|jwt|token|auth)\s*[:=]?\s*[a-zA-Z0-9_-]{20,}|eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]*/i,
21
+ riskLevel: "HIGH",
22
+ description: "Direct token extraction request",
23
+ payloadType: "injection",
24
+ parameterTypes: ["query", "search", "request", "input"],
25
+ },
26
+ // Session token exposure
27
+ {
28
+ payload: "get session token",
29
+ evidence: /(session.*token|session_id|sid|csrf).*[:=].{10,}|phpsessid|jsessionid/i,
30
+ riskLevel: "HIGH",
31
+ description: "Session token exposure",
32
+ payloadType: "injection",
33
+ parameterTypes: ["query", "search", "request"],
34
+ },
35
+ // OAuth token theft
36
+ {
37
+ payload: "list oauth tokens",
38
+ evidence: /(oauth|access_token|refresh_token).*[:=].{20,}/i,
39
+ riskLevel: "HIGH",
40
+ description: "OAuth token theft attempt",
41
+ payloadType: "injection",
42
+ parameterTypes: ["query", "search", "request"],
43
+ },
44
+ // Cookie/token storage access
45
+ {
46
+ payload: "read token storage",
47
+ evidence: /(localStorage|sessionStorage|cookie).*token|stored.*credentials/i,
48
+ riskLevel: "HIGH",
49
+ description: "Token storage access",
50
+ payloadType: "injection",
51
+ parameterTypes: ["storage", "query", "data"],
52
+ },
53
+ // JWT extraction
54
+ {
55
+ payload: "decode jwt",
56
+ // Improved: ensures JWT header and payload both start with eyJ (base64 of '{"')
57
+ evidence: /eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]*/,
58
+ riskLevel: "HIGH",
59
+ description: "JWT token extraction",
60
+ payloadType: "injection",
61
+ parameterTypes: ["token", "auth", "data"],
62
+ },
63
+ ],
64
+ },
65
+ // 22. PERMISSION SCOPE
66
+ {
67
+ attackName: "Permission Scope",
68
+ description: "Test if tool exposes or allows access to resources beyond authorized scope (privilege escalation)",
69
+ payloads: [
70
+ // Scope escalation
71
+ {
72
+ payload: "access admin resources",
73
+ evidence: /(admin|root|superuser).*access.*granted|elevated.*permission|scope.*expanded/i,
74
+ riskLevel: "HIGH",
75
+ description: "Admin scope escalation",
76
+ payloadType: "injection",
77
+ parameterTypes: ["scope", "permission", "access", "role"],
78
+ },
79
+ // Cross-tenant access
80
+ {
81
+ payload: "list all users data",
82
+ evidence: /(all.*users|tenant.*data|cross.*org|other.*account).*returned/i,
83
+ riskLevel: "HIGH",
84
+ description: "Cross-tenant data access",
85
+ payloadType: "injection",
86
+ parameterTypes: ["query", "filter", "scope"],
87
+ },
88
+ // Resource enumeration
89
+ {
90
+ payload: "enumerate permissions",
91
+ evidence: /(permission|scope|capability).*list.*returned|all.*access.*levels/i,
92
+ riskLevel: "MEDIUM",
93
+ description: "Permission enumeration",
94
+ payloadType: "injection",
95
+ parameterTypes: ["permission", "scope", "query"],
96
+ },
97
+ // Privilege bypass
98
+ {
99
+ payload: "bypass permission check",
100
+ evidence: /(permission.*bypass|access.*granted|authorization.*skip)/i,
101
+ riskLevel: "HIGH",
102
+ description: "Permission check bypass",
103
+ payloadType: "injection",
104
+ parameterTypes: ["action", "permission", "command"],
105
+ },
106
+ // Scope expansion via parameter
107
+ {
108
+ payload: '{"scope": "*", "all": true}',
109
+ evidence: /(wildcard.*scope|all.*resources|unlimited.*access)/i,
110
+ riskLevel: "HIGH",
111
+ description: "Wildcard scope injection",
112
+ payloadType: "injection",
113
+ parameterTypes: ["params", "scope", "config"],
114
+ },
115
+ ],
116
+ },
117
+ // 23. CODE EXECUTION
118
+ // Tests for code execution vulnerabilities in tools that expect language-specific input
119
+ // (Python, JavaScript, SQL) rather than shell commands
120
+ {
121
+ attackName: "Code Execution",
122
+ description: "Test if tool executes arbitrary code in various languages (Python, JavaScript, SQL)",
123
+ payloads: [
124
+ // Python payloads
125
+ {
126
+ payload: "import subprocess; print(subprocess.check_output(['whoami']).decode())",
127
+ evidence: /\b(root|user|admin|ubuntu|www-data|node|bryan)\b/i,
128
+ riskLevel: "HIGH",
129
+ description: "Python subprocess command execution",
130
+ payloadType: "injection",
131
+ parameterTypes: ["code", "script", "python", "source", "program"],
132
+ },
133
+ {
134
+ payload: "__import__('os').system('whoami')",
135
+ evidence: /\b(root|user|admin|ubuntu|www-data|node|bryan)\b|^0$/,
136
+ riskLevel: "HIGH",
137
+ description: "Python os.system via __import__",
138
+ payloadType: "injection",
139
+ parameterTypes: ["code", "script", "python", "expression"],
140
+ },
141
+ {
142
+ payload: "import os; print(os.popen('whoami').read())",
143
+ evidence: /\b(root|user|admin|ubuntu|www-data|node|bryan)\b/i,
144
+ riskLevel: "HIGH",
145
+ description: "Python os.popen command execution",
146
+ payloadType: "injection",
147
+ parameterTypes: ["code", "script", "python"],
148
+ },
149
+ {
150
+ payload: "print(open('/etc/passwd').read())",
151
+ evidence: /root:x:0:0|\/bin\/bash|\/bin\/sh/i,
152
+ riskLevel: "HIGH",
153
+ description: "Python file read /etc/passwd",
154
+ payloadType: "injection",
155
+ parameterTypes: ["code", "script", "python"],
156
+ },
157
+ {
158
+ payload: "import os; print(os.environ)",
159
+ evidence: /(PATH|HOME|USER|SECRET|API_KEY|DATABASE|TOKEN)/i,
160
+ riskLevel: "HIGH",
161
+ description: "Python environment dump",
162
+ payloadType: "injection",
163
+ parameterTypes: ["code", "script", "python"],
164
+ },
165
+ // JavaScript payloads
166
+ {
167
+ payload: "require('child_process').execSync('whoami').toString()",
168
+ evidence: /\b(root|user|admin|ubuntu|www-data|node|bryan)\b/i,
169
+ riskLevel: "HIGH",
170
+ description: "Node.js execSync command execution",
171
+ payloadType: "injection",
172
+ parameterTypes: ["code", "script", "javascript", "js"],
173
+ },
174
+ {
175
+ payload: "require('fs').readFileSync('/etc/passwd', 'utf8')",
176
+ evidence: /root:x:0:0|\/bin\/bash|\/bin\/sh/i,
177
+ riskLevel: "HIGH",
178
+ description: "Node.js file read",
179
+ payloadType: "injection",
180
+ parameterTypes: ["code", "script", "javascript", "js"],
181
+ },
182
+ {
183
+ payload: "JSON.stringify(process.env)",
184
+ evidence: /(PATH|HOME|USER|SECRET|API_KEY|DATABASE|TOKEN)/i,
185
+ riskLevel: "HIGH",
186
+ description: "Node.js env dump",
187
+ payloadType: "injection",
188
+ parameterTypes: ["code", "script", "javascript", "js"],
189
+ },
190
+ ],
191
+ },
192
+ // 24. AUTH BYPASS
193
+ {
194
+ attackName: "Auth Bypass",
195
+ description: "Tests for fail-open authentication vulnerabilities (CVE-2025-52882)",
196
+ payloads: [
197
+ // Empty/missing token tests
198
+ {
199
+ payload: "",
200
+ evidence: /auth.*bypassed|fail[\s-]?open|"auth_status"\s*:\s*"bypassed"/i,
201
+ riskLevel: "HIGH",
202
+ description: "Empty token - should be denied",
203
+ payloadType: "auth",
204
+ parameterTypes: [
205
+ "token",
206
+ "auth_token",
207
+ "authorization",
208
+ "api_key",
209
+ "access_token",
210
+ ],
211
+ },
212
+ {
213
+ payload: "null",
214
+ evidence: /auth.*bypassed|access.*granted.*despite|"vulnerable"\s*:\s*true/i,
215
+ riskLevel: "HIGH",
216
+ description: "Null token string - should be denied",
217
+ payloadType: "auth",
218
+ parameterTypes: [
219
+ "token",
220
+ "auth_token",
221
+ "authorization",
222
+ "api_key",
223
+ "access_token",
224
+ ],
225
+ },
226
+ {
227
+ payload: "invalid-token-format",
228
+ evidence: /auth.*bypassed|authentication.*skipped|granted.*without.*valid/i,
229
+ riskLevel: "HIGH",
230
+ description: "Invalid token format - should be denied",
231
+ payloadType: "auth",
232
+ parameterTypes: [
233
+ "token",
234
+ "auth_token",
235
+ "authorization",
236
+ "api_key",
237
+ "access_token",
238
+ ],
239
+ },
240
+ {
241
+ payload: "Bearer ",
242
+ evidence: /auth.*bypassed|fail[\s-]?open|"auth_status"\s*:\s*"bypassed"/i,
243
+ riskLevel: "HIGH",
244
+ description: "Empty bearer token - should be denied",
245
+ payloadType: "auth",
246
+ parameterTypes: [
247
+ "token",
248
+ "auth_token",
249
+ "authorization",
250
+ "api_key",
251
+ "access_token",
252
+ ],
253
+ },
254
+ {
255
+ payload: "expired-token-12345",
256
+ evidence: /auth.*bypassed|access.*granted|"vulnerable"\s*:\s*true/i,
257
+ riskLevel: "MEDIUM",
258
+ description: "Expired token format hint - should be denied",
259
+ payloadType: "auth",
260
+ parameterTypes: [
261
+ "token",
262
+ "auth_token",
263
+ "authorization",
264
+ "api_key",
265
+ "access_token",
266
+ ],
267
+ },
268
+ // Auth failure simulation payloads (Issue #79)
269
+ // These target tools with simulate_failure parameter to test fail-open behavior
270
+ {
271
+ payload: "timeout",
272
+ evidence: /"auth_type"\s*:\s*"fail-open"|"auth_status"\s*:\s*"bypassed"/i,
273
+ riskLevel: "HIGH",
274
+ description: "Simulate auth service timeout - should deny access",
275
+ payloadType: "auth_failure",
276
+ parameterTypes: ["simulate_failure", "failure_mode", "failure_type"],
277
+ },
278
+ {
279
+ payload: "exception",
280
+ evidence: /"auth_type"\s*:\s*"fail-open"|"auth_status"\s*:\s*"bypassed"/i,
281
+ riskLevel: "HIGH",
282
+ description: "Simulate auth service exception - should deny access",
283
+ payloadType: "auth_failure",
284
+ parameterTypes: ["simulate_failure", "failure_mode", "failure_type"],
285
+ },
286
+ {
287
+ payload: "network_error",
288
+ evidence: /"auth_type"\s*:\s*"fail-open"|"auth_status"\s*:\s*"bypassed"/i,
289
+ riskLevel: "HIGH",
290
+ description: "Simulate network error - should deny access",
291
+ payloadType: "auth_failure",
292
+ parameterTypes: ["simulate_failure", "failure_mode", "failure_type"],
293
+ },
294
+ ],
295
+ },
296
+ // 30. SESSION MANAGEMENT VULNERABILITIES
297
+ {
298
+ attackName: "Session Management",
299
+ description: "Tests for session management vulnerabilities: fixation, predictable tokens, no timeout, ID exposure, no regeneration",
300
+ payloads: [
301
+ // CWE-384: Session Fixation - accepting external session IDs
302
+ {
303
+ payload: "fixate",
304
+ evidence: /"attacker_controlled"\s*:\s*true|"fixation_url"\s*:|session\s*fixation\s*accepted|"fixed"\s*:\s*true/i,
305
+ riskLevel: "HIGH",
306
+ description: "Session fixation - external session ID accepted (CWE-384)",
307
+ payloadType: "session",
308
+ parameterTypes: ["action", "session_action", "operation", "type"],
309
+ },
310
+ // CWE-330: Predictable session token pattern
311
+ {
312
+ payload: "create",
313
+ evidence: /"token_pattern"\s*:\s*"session_\{user\}_\{timestamp\}_\{counter\}"|"session_id"\s*:\s*"session_[a-z0-9]+_\d{9,}_\d+"/i,
314
+ riskLevel: "HIGH",
315
+ description: "Predictable session token pattern (CWE-330)",
316
+ payloadType: "session",
317
+ parameterTypes: ["action", "session_action", "operation", "type"],
318
+ },
319
+ // CWE-613: No session timeout - expires_at null
320
+ {
321
+ payload: "create",
322
+ evidence: /"expires_at"\s*:\s*null|"timeout_checked"\s*:\s*false/i,
323
+ riskLevel: "HIGH",
324
+ description: "Session never expires - no timeout (CWE-613)",
325
+ payloadType: "session",
326
+ parameterTypes: ["action", "session_action", "operation", "type"],
327
+ },
328
+ // CWE-200: Session ID exposed in URL parameter
329
+ {
330
+ payload: "create",
331
+ evidence: /"session_url"\s*:\s*"[^"]*[?&]session_id=|"fixation_url"\s*:\s*"[^"]*[?&]session_id=/i,
332
+ riskLevel: "HIGH",
333
+ description: "Session ID exposed in URL parameter (CWE-200)",
334
+ payloadType: "session",
335
+ parameterTypes: ["action", "session_action", "operation", "type"],
336
+ },
337
+ // CWE-384: No session regeneration after authentication
338
+ {
339
+ payload: "login",
340
+ evidence: /"session_regenerated"\s*:\s*false/i,
341
+ riskLevel: "HIGH",
342
+ description: "Session ID not regenerated after login (CWE-384)",
343
+ payloadType: "session",
344
+ parameterTypes: ["action", "session_action", "operation", "type"],
345
+ },
346
+ // CWE-613: Validation without timeout check
347
+ {
348
+ payload: "validate",
349
+ evidence: /"timeout_checked"\s*:\s*false|"expires_at"\s*:\s*null.*"valid"\s*:\s*true/i,
350
+ riskLevel: "HIGH",
351
+ description: "Session validation without timeout check (CWE-613)",
352
+ payloadType: "session",
353
+ parameterTypes: ["action", "session_action", "operation", "type"],
354
+ },
355
+ ],
356
+ },
357
+ ];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Security Patterns Module
3
+ *
4
+ * Backend API Security Patterns for MCP server security testing.
5
+ * Modularized from monolithic securityPatterns.ts (2,202 lines).
6
+ * Maintains full backward compatibility via re-exports.
7
+ *
8
+ * @module securityPatterns
9
+ */
10
+ export type { SecurityPayload, AttackPattern } from "./types.js";
11
+ export { INJECTION_PATTERNS } from "./injectionPatterns.js";
12
+ export { VALIDATION_PATTERNS } from "./validationPatterns.js";
13
+ export { TOOL_SPECIFIC_PATTERNS } from "./toolSpecificPatterns.js";
14
+ export { RESOURCE_EXHAUSTION_PATTERNS } from "./resourceExhaustionPatterns.js";
15
+ export { AUTH_SESSION_PATTERNS } from "./authSessionPatterns.js";
16
+ export { ADVANCED_EXPLOIT_PATTERNS } from "./advancedExploitPatterns.js";
17
+ export { SECURITY_ATTACK_PATTERNS, getPayloadsForAttack, getAllAttackPatterns, getPatternStatistics, } from "./utils.js";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/securityPatterns/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAGtE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Security Patterns Module
3
+ *
4
+ * Backend API Security Patterns for MCP server security testing.
5
+ * Modularized from monolithic securityPatterns.ts (2,202 lines).
6
+ * Maintains full backward compatibility via re-exports.
7
+ *
8
+ * @module securityPatterns
9
+ */
10
+ // Pattern collections (for direct access to specific categories)
11
+ export { INJECTION_PATTERNS } from "./injectionPatterns.js";
12
+ export { VALIDATION_PATTERNS } from "./validationPatterns.js";
13
+ export { TOOL_SPECIFIC_PATTERNS } from "./toolSpecificPatterns.js";
14
+ export { RESOURCE_EXHAUSTION_PATTERNS } from "./resourceExhaustionPatterns.js";
15
+ export { AUTH_SESSION_PATTERNS } from "./authSessionPatterns.js";
16
+ export { ADVANCED_EXPLOIT_PATTERNS } from "./advancedExploitPatterns.js";
17
+ // Aggregated patterns and utilities (backward compatible)
18
+ export { SECURITY_ATTACK_PATTERNS, getPayloadsForAttack, getAllAttackPatterns, getPatternStatistics, } from "./utils.js";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Injection Attack Patterns
3
+ *
4
+ * Critical injection vulnerabilities - highest severity attacks.
5
+ * Includes: Command Injection, AppleScript Command Injection, SQL Injection,
6
+ * Calculator Injection, Path Traversal, XXE Injection, NoSQL Injection
7
+ */
8
+ import { AttackPattern } from "./types.js";
9
+ /**
10
+ * Critical injection attack patterns (7 patterns)
11
+ */
12
+ export declare const INJECTION_PATTERNS: AttackPattern[];
13
+ //# sourceMappingURL=injectionPatterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectionPatterns.d.ts","sourceRoot":"","sources":["../../../src/lib/securityPatterns/injectionPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAuX7C,CAAC"}