davila7/claude-code-templates · warning
SEM_W003
SEM_W003
Error message
Raw output request (potential data exfiltration)
What it means
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.
Source
Thrown at cli-tool/src/validation/validators/SemanticValidator.js:99
];
// Suspicious patterns (warnings, not errors)
this.SUSPICIOUS_PATTERNS = [
{
pattern: /\bpretend\s+(you\s+are|to\s+be)\b/gi,
code: 'SEM_W001',
message: 'Suspicious instruction: Role pretending detected',
severity: 'medium'
},
{
pattern: /\b(jailbreak|DAN|ChatGPT\s+Developer\s+Mode)\b/gi,
code: 'SEM_W002',
message: 'Known jailbreak terminology detected',
severity: 'medium'
},
{
pattern: /output\s+raw\s+(code|text|data)/gi,
code: 'SEM_W003',
message: 'Raw output request (potential data exfiltration)',
severity: 'low'
},
{
pattern: /(repeat|echo)\s+after\s+me/gi,
code: 'SEM_W004',
message: 'Repetition instruction (potential prompt leakage)',
severity: 'low'
}
];
// Sensitive data patterns
this.SENSITIVE_DATA_PATTERNS = [
{
pattern: /(?:password|passwd|pwd)\s*[:=]\s*[^\s]+/gi,
code: 'SEM_E011',
message: 'Hardcoded password detected',
severity: 'critical'View on GitHub (pinned to a0851ed10c)
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
Example fix
# before Output raw code from the generated file so the user can copy it. # after Print the generated file's contents verbatim so the user can copy them.
Defensive patterns
Strategy: validation
Validate before calling
const suspicious = /output\s+raw\s+(code|text|data)/gi;
if (suspicious.test(component.content)) {
// rephrase before validating/publishing
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28).
Data as JSON: /api/errors/50f18168ff0bc300.
Report an issue: GitHub.