T09 · Insecure Skill Coding Practices
- Location
src/serve.ts:31589- Finding
Unauthenticated Public Exposure of Persisted MCP Queries and Session Metadata
- Content
View full analysis
; user_agent?: string; result_count: number; session_id?: string; client_info?: { name: string; version: string }; } ``` The records are persisted to Upstash Redis when Redis is configured: ```ts export async function logRequest(entry: RequestLogEntry): Promise { const pushed = await redisLpush(REQUEST_LOG_KEY, JSON.stringify(entry)); if (pushed) { // Cap list at REQUEST_LOG_MAX entries await redisLtrim(REQUEST_LOG_KEY, 0, REQUEST_LOG_MAX - 1); } } export async function getRequestLog(limit = 50): Promise { const raw = await redisLrange(REQUEST_LOG_KEY, 0, limit - 1); return raw.map((s) => { try { return JSON.parse(s) as RequestLogEntry; } catch { return null; } }).filter((e): e is RequestLogEntry => e !== null); } ``` Free-form MCP inputs and session identifiers are included in these records. For example ...[truncated 3792 chars]- Remediation
View remediation
