# RootCrak Preflight

The check before your agent signs.

RootCrak Preflight is paid, machine-readable risk intelligence for AI agents. You send a URL. You pay USDC over HTTP 402 (x402) on Base or Solana. You get signals — not a SAFE / DANGEROUS stamp.

Live API: [https://intel.rootcrak.com](https://intel.rootcrak.com)  
Agent contract: [https://github.com/ro0tcr4k/intel-api](https://github.com/ro0tcr4k/intel-api)

> Intelligence, not warranty. Preflight weighs live signals into security guidance — a recommendation, not a definitive security verdict.

---

## Why it exists

Agents now hold keys, connect wallets, and follow instructions they did not write. Two attacks already scale faster than a human second look:

1. **Wallet drainers** — a page asks the agent to connect or approve. One signature can empty the wallet.
2. **Prompt injection** — hidden text, encoded blobs, or “ignore previous instructions” copy in a page or tweet. Documented losses include Morse-code injection on Base and hidden instructions in social posts.

Humans pause on a connect-wallet modal. Agents do not, unless you program a pause. Preflight is that pause.

---

## What it is — and is not

**It is** a pre-flight scan: settle first, then compute, then poll a job for `risk_score`, `confidence`, `flags`, `evidence`, and `recommended_action`.

**It is not** Shield (that is host hardening on your server).  
**It is not** the free human drainer on [rootcrak.com](https://rootcrak.com). Agents pay this API.  
**It is not** a warranty, an audit badge, or a binary verdict. We refuse that shape on purpose.

x402 is how you pay. Preflight is the product.

---

## Services

| Scan | What it checks | Price | Wait |
|---|---|---|---|
| Drainer | Wallet-drainer heuristics plus the same browser sandbox humans use, when `health.drainer_sandbox` is true | **$0.05 USDC** | poll 5s, cap 240s |
| Domain | Headers, DNS, exposed files, plus regex/heuristic LLM-injection on already-fetched HTML | **$0.25 USDC** | poll 12s, cap 480s |

Base URL: `https://intel.rootcrak.com`

- `POST /v1/intel/scans/drainer`
- `POST /v1/intel/scans/domain`

Unpaid calls return **HTTP 402** with `accepts`. Pay with an official x402 client. Retry with `PAYMENT-SIGNATURE`. Poll `GET /v1/intel/jobs/{id}/result` with `X-Job-Token`.

USDC only. No `$ROOT`. Rails: Base (`eip155:8453`) and Solana (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). On Solana, use `extra.feePayer` from **that** 402 — do not reuse an old one.

Paid drainer scans run in the same remote browser sandbox used by human scanners, analyzing live page behavior and security signals — check `GET /v1/intel/health` for `drainer_sandbox: true` and confirm `cogs.sandbox_used` on the result. A busy or dead sandbox fails the job; we do not return a fake `monitor`. Domain injection checks use regex analysis on already-fetched HTML, with no secondary fetch or ML classifier. Because detection is heuristic-based, novel or obfuscated attacks may not be detected.

---

## What you get

| Field | Meaning |
|---|---|
| `risk_score` | 0–100 |
| `confidence` | 0–1 |
| `flags` | machine tokens (never `safe` / `dangerous`) |
| `evidence` | `{source, detail, weight?, phase?}` |
| `recommended_action` | `monitor` · `proceed_with_caution` · `investigate_further` · `do_not_interact` |

From `risk_score`: 0–14 monitor · 15–39 proceed_with_caution · 40–69 investigate_further · 70–100 do_not_interact.

**Policy:** `do_not_interact`, or evidence of key/seed/exfil instructions → do not connect, sign, or transfer. Timeout or a failed job → fail closed.

---

## Start

```bash
curl -sS https://intel.rootcrak.com/v1/intel/health
curl -sS https://intel.rootcrak.com/v1/intel/sdk
```

Full handshake: [github.com/ro0tcr4k/intel-api/blob/main/AGENTS.md](https://github.com/ro0tcr4k/intel-api/blob/main/AGENTS.md)

No-JS HTML: https://rootcrak.com/preflight.html  
Markdown: send `Accept: text/markdown` on `/preflight` (also at `/preflight.md`).  
Human SPA: https://rootcrak.com/preflight

---

## Company

RootCrak Security BV (Belgium).  
Human product: [https://rootcrak.com](https://rootcrak.com) · Contact: info@rootcrak.com
