{"record":{"id":"50f18168ff0bc300","repo":"davila7/claude-code-templates","slug":"sem-w003","errorCode":"SEM_W003","errorMessage":"Raw output request (potential data exfiltration)","messagePattern":"Raw output request \\(potential data exfiltration\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/validation/validators/SemanticValidator.js","lineNumber":99,"sourceCode":"    ];\n\n    // Suspicious patterns (warnings, not errors)\n    this.SUSPICIOUS_PATTERNS = [\n      {\n        pattern: /\\bpretend\\s+(you\\s+are|to\\s+be)\\b/gi,\n        code: 'SEM_W001',\n        message: 'Suspicious instruction: Role pretending detected',\n        severity: 'medium'\n      },\n      {\n        pattern: /\\b(jailbreak|DAN|ChatGPT\\s+Developer\\s+Mode)\\b/gi,\n        code: 'SEM_W002',\n        message: 'Known jailbreak terminology detected',\n        severity: 'medium'\n      },\n      {\n        pattern: /output\\s+raw\\s+(code|text|data)/gi,\n        code: 'SEM_W003',\n        message: 'Raw output request (potential data exfiltration)',\n        severity: 'low'\n      },\n      {\n        pattern: /(repeat|echo)\\s+after\\s+me/gi,\n        code: 'SEM_W004',\n        message: 'Repetition instruction (potential prompt leakage)',\n        severity: 'low'\n      }\n    ];\n\n    // Sensitive data patterns\n    this.SENSITIVE_DATA_PATTERNS = [\n      {\n        pattern: /(?:password|passwd|pwd)\\s*[:=]\\s*[^\\s]+/gi,\n        code: 'SEM_E011',\n        message: 'Hardcoded password detected',\n        severity: 'critical'","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/validation/validators/SemanticValidator.js#L81-L117","documentation":"SEM_W003 is a low-severity warning emitted by SemanticValidator's suspicious-pattern scan (checkSuspiciousPatterns) when component markdown content matches /output\\s+raw\\s+(code|text|data)/gi. It flags phrasing that asks an AI to output raw, unfiltered content, which can be a data-exfiltration or guardrail-bypass vector. It is only a warning unless validation runs with options.strict = true, in which case it is promoted to an error.","triggerScenarios":"Calling validate(component, options) where component.content contains text like 'output raw code', 'output raw data', or 'output raw text' (case-insensitive, any whitespace between words). Becomes an error-level finding when options.strict is true.","commonSituations":"Agent/command markdown that legitimately instructs the model to dump raw file contents or unformatted data (e.g. a debugging agent told to 'output raw data from the log'). Documentation examples that quote the phrase verbatim also trigger it via false positive.","solutions":["Rephrase the component text to avoid the phrase 'output raw <code|text|data>' (e.g. 'print the file contents verbatim' or 'return the unprocessed payload')","If the phrasing is intentional and benign, run validation without strict mode so it stays a warning you can acknowledge","Wrap the phrase differently in docs, e.g. 'raw-output mode', so the regex no longer matches"],"exampleFix":"# before\nOutput raw code from the generated file so the user can copy it.\n# after\nPrint the generated file's contents verbatim so the user can copy them.","handlingStrategy":"validation","validationCode":"const suspicious = /output\\s+raw\\s+(code|text|data)/gi;\nif (suspicious.test(component.content)) {\n  // rephrase before validating/publishing\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run SemanticValidator.validate() locally before committing components","Avoid imperative 'output raw X' phrasing in agent/command markdown","Treat strict-mode warnings as release blockers in CI"],"tags":["prompt-injection","static-analysis","component-validation"],"backgroundTag":"prompt-injection-pattern","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}