/** * Prompt Injection Sanitizer for MCP Tool Outputs * * Implements SEC-H9: Sanitizes user-controlled content returned by MCP tools * to prevent prompt injection attacks where attacker-controlled data * (contact names, group names, message previews) could manipulate LLM behavior. * * Defense strategy: * 1. Boundary markers clearly delineate user data from system output * 2. Tool name references are defanged to prevent tool-call injection * 3. Markdown control characters that could be interpreted as instructions are stripped */ /** * Sanitize user-controlled content before embedding in MCP tool output. * * @param text - Raw user content (contact name, group name, message preview, etc.) * @returns Sanitized string wrapped in boundary markers, or empty string for nullish input */ export declare function sanitizeUserContent(text: string | null | undefined): string; //# sourceMappingURL=sanitizer.d.ts.map