// security workers

Web pages and files

[ view markdown ]

Score Web pages, public text files, and PDFs before agents read or embed them.

Web pages

Score a URL before an agent fetches or summarizes the page. Superagent checks who owns the domain, how the page behaves, and what the visible and hidden text says.

How scoring works

A page scan runs in three tiers:

  1. Identity — domain age (RDAP), TLS certificate, registrar reputation, hosting ASN, and optional blocklists (URLhaus, Google Web Risk, PhishTank).
  2. Static analysis — redirect chains, hidden DOM, deceptive links, prompt-injection and exfiltration patterns, and obfuscated JavaScript.
  3. Rendered review — Kernel headless Chrome renders the page, then GPT-5.6 Luna Pro via OpenRouter scores the visible and hidden text. This tier runs when deterministic checks are uncertain. If Kernel is not configured, the LLM still reviews the static HTML.

A blocklisted host short-circuits to score 0 / dangerous. New lookups return a preliminary identity score immediately and finish the deep scan in the background. Pass mode=full when you need the completed result in one request.

Identifier

The identifier is a hostname (example.com fetches https://example.com/) or a hostname plus path (example.com/docs). Hostnames are case-insensitive. Paths may include additional / segments.

Use it

  • Dashboard: open Agents → Context, paste a URL, and open the result for identity, behavior, and content scores.
  • REST API: GET /api/v1/context/web_page/{identifier}. See the Context Guardrails API.
  • MCP: get_context_score.
curl "https://superagent.sh/api/v1/context/web_page/example.com?details=true" \
  -H "Authorization: Bearer sk_live_..."
curl "https://superagent.sh/api/v1/context/web_page/example.com/docs?mode=full&details=true" \
  -H "Authorization: Bearer sk_live_..."

Files

Score a public HTTP or HTTPS file before an agent opens it, embeds it, or treats it as instructions. Superagent checks the source, extracts a bounded text representation, and reviews that text for injection and exfiltration.

How scoring works

A file scan runs in three tiers:

  1. Identity — source domain age, TLS, hosting, and blocklists.
  2. Secure extraction — DNS pinned download with redirect validation, type consistency checks, and bounded extraction for text formats and PDFs.
  3. Content review — deterministic prompt injection, exfiltration, social engineering, and encoded payload checks followed by chunked LLM review.

File bytes are never stored. The identifier is the lowercase SHA-256 hex digest of the normalized URL.

Supported files

Supported files include UTF-8 text, HTML, JSON, XML, CSV, CSS, JavaScript, Markdown, YAML, SQL, and PDFs with extractable text. Downloads are limited to 25 MB.

Images, Office documents, archives, encrypted PDFs, and PDFs that require OCR are reported as unscannable instead of safe. Invalid URLs and unsupported types return a dangerous result or 400 invalid_request, depending on whether validation fails before the scan starts.

Threats

When details=true or the verdict is suspicious / dangerous, file scans may emit file_unscannable, mime_mismatch, encoded_payload, redirect_chain, extraction errors, and prompt-injection or exfiltration types shared with other origins.

Use it

  • Dashboard: open Agents → Context, paste a public file URL, and open the result for identity, behavior, and content scores.
  • REST API: POST /api/v1/context/file to score a URL and GET /api/v1/context/file/{identifier} to look up a previous result by SHA-256. See the Context Guardrails API.
  • MCP: scan_file.
curl "https://superagent.sh/api/v1/context/file?mode=full&details=true" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  --data '{"url":"https://example.com/security-guidance.pdf"}'
curl "https://superagent.sh/api/v1/context/file/<sha256>?details=true" \
  -H "Authorization: Bearer sk_live_..."

GET never starts a new scan.

Next steps