Surface
Surface checks files and text before your app or AI agent acts on them, and answers with one of three words: Allow, Review, or Block. You send the content, and your code does what the answer says. You don't need a security background to use it.
Surface is part of your Tendrl account, alongside Contact and Strand. There is no separate sign-up.
Connect the Surface MCP server and your assistant can scan text and files for you. The hosted endpoint and the npx server work on every plan, Free included.
Start with what you're building#
| You have | What can go wrong | Start here |
|---|---|---|
| A form or endpoint that accepts file uploads | Someone uploads malware: a file built to harm whoever opens it, or the server that processes it | Scan file uploads |
| A chatbot or assistant that reads web pages, emails, tickets, or documents | Prompt injection: text written to make the model follow someone else's instructions instead of yours | Protect a chatbot from prompt injection |
| An AI agent that can take actions (send email, issue refunds, delete records) | The agent is talked into, or drifts into, an action nobody asked for | Screen an agent's tool calls |
Not sure yet? The quick start runs your first scan in the dashboard with no code, then repeats it from the API.
The answer you get back#
Every scan returns a recommendedAction. It is the one field your code needs to read.
recommendedAction |
What it means | What your code does |
|---|---|---|
| Allow | Nothing of concern was found | Carry on: store the file, pass the text to the model, run the tool |
| Review | Real warning signs, but not proof | Hold it. Quarantine the upload, or ask a person to confirm the action |
| Block | Strong evidence of harm, or the scan could not run | Refuse it |
Two rules cover most integrations:
- Continue only on
Allow. Treat every other value, including one you don't recognize, as not safe. - For file uploads, refuse
Reviewas well asBlock.Blockneeds precise evidence such as a known-malware match, so brand-new malware usually comes back asReview.
The result also carries a score from 0 to 100 (higher is safer), a threat level such as Clean or Malicious, and a one-line reason. They explain the decision; they are not a second decision to make. Reading a scan result covers every field.
What Surface checks for#
In files
- Known malware, and files that link to known-malicious sites
- New or modified malware that resembles known threats, even when no exact match exists
- Documents with harmful macros, hidden scripts, or embedded objects
- Archives (ZIP, RAR, 7-Zip, tar), unpacked and checked entry by entry
In text (chat messages, web pages, emails, API bodies, tool calls)
- Prompt injection: instructions planted in text to take over an AI model
- Sensitive data: exposed API keys, passwords, and personal information
- Hidden code: shell commands and scripts embedded in what looks like plain text
- Harmful actions: an agent tool call that would leak data, delete records, or move money nobody asked to move
Surface analyzes some formats more deeply than others, and every result says how deep the analysis went. Detection coverage lists what Surface catches and what it doesn't. Detection deep dive explains how the engines work together.
Ways to scan#
- Dashboard: paste text or drop a file into Scanner. No code, no API key
- REST API: scan files and text from any language (reference)
- SDKs: Python, JavaScript and Go clients, with middleware and an agent tool guard (docs)
- MCP server: give Claude, Cursor, VS Code, or any MCP-capable agent scanning tools (docs)
- Scanner binary (paid plans): run scans on your own machines or in CI; content never leaves them (docs)
- Strand and Contact: scan inside a Strand workflow or a Contact message flow (Strand, Contact)
Results can also be delivered to your own endpoint with signed webhooks, and large files can be scanned in the background with async scanning.
Privacy#
Files and payloads are loaded into memory for scanning and discarded immediately after. Surface stores scan results, metadata, content hashes, and the short redacted excerpts that evidence a finding, never the file or payload itself. When using the scanner binary, content never leaves your machine at all.
Next steps#
- Quick start: first scan in the dashboard, then from code
- Concepts in plain English: the terms used in these docs, explained
- Guides: uploads, chatbots, agent tool calls, and tuning strictness
- Reading a scan result: every field and what to do with it
- FAQ and Troubleshooting
- API Reference: interactive Swagger docs
Tendrl