Guide

Check files for prompt-injection patterns before AI upload

Treat unfamiliar documents as data, not trusted instructions for an AI. ScanBeforeOpen searches known text patterns and selected invisible characters. It does not assess complete meaning or guarantee protection from prompt injection.

Responsible operator: Tom Silas Helmke, operator of ScanBeforeOpen. Content revised: .

Open scanner

Document content is not a system instruction

A line such as ignore previous instructions may be quoted training material or a manipulation attempt. Pattern matching can flag either. Reworded, multilingual or visual attacks can also escape detection.

The app calls no language model. It checks locally available text and file patterns. Roles, tool permissions and separation of document data from executable instructions need controls in the AI system itself.

How hidden text reaches an AI request
File (PDF, CSV, text, SVG)visible and invisible textText extractionalso reads hidden textAI requesttext becomes part of the inputInstruction in the documentmodel may treat it as a commandCheck beforehandmark, remove or reveal patterns

The sequence in words

  1. A document holds more text than you see: comments, metadata, hidden characters or tiny, white colored type.
  2. When the file is read out for the AI, this text is often extracted too, because programs do not distinguish by visibility.
  3. The extracted text becomes part of the input. For the model, document content and user question are then not strictly separated.
  4. If an instruction stands there, a model may follow it. This is called prompt injection. Foreign documents are data, not instructions.
  5. ScanBeforeOpen searches for known phrasings and invisible characters and can mark, remove or reveal them. It does not understand meaning and guarantees no protection.

What the scanner actually reads

Text and raw-data checks often inspect at most the first 2 MB. Exported text excerpts are limited to 200,000 characters. Office excerpts can include comments or hidden content; PDF inspection does not provide complete text extraction from all structures.

An excerpt is not a complete cleaned original. Image text, compressed PDF content, attachments or unsupported encodings can be missing. Inspection coverage and format limits determine its conclusions.

Mark, remove or reveal characters

The AI text excerpt has three modes: mark known suspicious lines, remove them, or reveal selected invisible characters. The selected change can affect legitimate content.

Privacy text rebuild additionally normalizes Unicode and removes selected markers. Neither feature automatically checks for personal data, business secrets or every hidden instruction.

Before the actual upload

Read the exported TXT excerpt and compare important sections with approved source material. Remove private information yourself and obtain necessary organizational approval for sensitive content.

Also review the AI service’s terms. Local processing by ScanBeforeOpen sends nothing there; a later upload by you is a separate action.

Reproducible synthetic example

U+200B appears between A and B. The quoted test phrase ignore previous instructions also triggers text.prompt. The scanner detects patterns, not the author’s intent.

The findings come from an actual local scan of this test file. Download it and choose it in the scanner. No real personal data or malware.

Download test file: unicode-demo.txt

Example inspection coverage: complete.

Practical checklist

  • Treat unfamiliar content as data
  • Read inspection coverage and excerpt scope
  • Choose a marking or removal mode deliberately
  • Review export for lost content and confidential information
  • Check AI system permissions and upload approval separately

Clear limits

Heuristic text matching is not complete prompt-injection prevention, data approval or anonymization. Document context and AI system permissions remain essential.

FAQ

Is the prompt injection checker complete?

No. The app searches known patterns without complete semantic review or a model call. False positives and missed instructions are both possible.

Does TXT export make a file safe for AI?

No. It is a limited, modified excerpt. Confidential information and unknown manipulation patterns can remain.

Are documents sent to an AI model?

No. This app’s inspection remains local. A later user upload to another service is separate.

Related reading

Technical sources