/** * Hallucination Trap Mutation - OWASP LLM09 (Misinformation) * * This mutation triggers confident fabrication by asking about: * - Non-existent entities (fake people, companies, products) * - Impossible scenarios requiring invented details * - Requests for specific fake information * - Questions designed to make the model confident about wrong answers * * The goal is to test if the LLM will confidently assert false information * rather than acknowledge uncertainty. * * Reference: OWASP LLM Top 10 2025 - LLM09 Misinformation */ import { type CvssScore } from '../severity'; import type { Mutation } from './index'; export type HallucinationType = 'fake_entity' | 'fake_citation' | 'impossible_detail' | 'confident_wrong' | 'fabricated_history' | 'technical_fiction'; export interface HallucinationTrapOptions { /** Preferred hallucination type (random if not specified) */ hallucinationType?: HallucinationType; /** Whether to add confidence prefix */ addConfidence?: boolean; /** Whether to demand verification */ demandVerification?: boolean; } export declare class HallucinationTrapMutation implements Mutation { readonly name = "hallucination-trap"; readonly description = "Triggers confident fabrication about non-existent entities or impossible details (OWASP LLM09)"; readonly severity: "medium"; readonly cvssScore: CvssScore; /** OWASP category */ readonly owaspCategory = "LLM09"; private hallucinationType?; private addConfidence; private demandVerification; constructor(options?: HallucinationTrapOptions); /** * Get a random item from an array */ private random; /** * Get hallucination type */ private getHallucinationType; /** * Get a fake entity of a specific type */ private getFakeEntity; mutate(prompt: string): string; } //# sourceMappingURL=hallucination-trap.d.ts.map