PYRMI security

Open source · Apache 2.0

Bot and tamper detection for your site. One script tag.

Pyrmi spots bots, scrapers, replayed requests and tampered pages in the browser. Your server asks for a verdict before it trusts a sign-up, a vote, a checkout or a score, and the dashboard shows every flag and why.

Verdict
accept · review · reject
Risk
0–100, with reasons
Browser script
1.4.2, pinned with SRI
Self-host
Cloudflare Workers or Vercel

How it works

The browser collects evidence. Your server makes the call.

01 · page

Add the script

Each visit gets a signed session from a real page load. The script watches for automation, scripted input, replaced browser functions, devtools and clock tricks.

02 · server

Check on your server

Before you act on a request, call pyrmi.verify(). You get accept, review or reject, a risk score from 0 to 100, and the reasons.

03 · dashboard

Watch it work

The dashboard shows every verdict, which checks fired, and which users keep getting flagged, so you see how well it's working instead of a yes or no.

page.html
<script src="https://pyrmi.com/sdk/1.4.2/pyrmi.js" integrity="sha384-/LUxQoNA6RTUwSJC1381rBcE/w28rwNZwK7AfX8mqAnAxhTsjKbln2RsPUCahqvz" crossorigin="anonymous" data-site="pk_..."></script>
<script type="module">
  const s = await Pyrmi.start();   // on page load
  // when the user signs up, votes, buys...
  await Pyrmi.flush();
  const body = await Pyrmi.seal({ email }); // signed: changed on the way = rejected
  await fetch('/signup', { method: 'POST',
    headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) });
</script>
server.js
const { Pyrmi, trusted } = require('pyrmi-server');
const pyrmi = new Pyrmi({ secretKey: process.env.PYRMI_SECRET_KEY });

// user: your own signed-in user, never req.body
const v = await pyrmi.verify({ sealed: req.body, req });

// a sign-up: a review goes through, flagged
if (v.verdict === 'reject') return res.status(403).end();

// a payout or a prize instead (with requireHumanCheck on, see docs):
// if (!trusted(v)) return res.status(403).end();

What it catches

Eight kinds of trouble, each with a named reason in the verdict.

Bots and headless browsersWebdriver flags, headless Chrome, Playwright, Puppeteer, Selenium and Cypress markers.
Scrapers and direct API callsA request with no signed session from a real page, or a session that never reported from one, gets flagged.
Replayed requestsEach session token works once and expires. Sending the same request twice fails.
Forged or edited tokensSessions are signed on the server. Change one byte and the verdict is reject.
Tampered pagesReplaced fetch, performance.now, requestAnimationFrame and other built-ins.
DevtoolsAn open devtools panel is noted on the session, so you can weigh it with everything else.
Scripted inputSynthetic events and typing or clicking that's too even or too fast for a human hand.
Impossible valuesActions sent faster than a person could, numbers past your caps, or values that grow too fast.

What it won't do

Block devtools or "stop code running". Whoever owns the browser can switch any of that off. Pyrmi watches and reports, and your server has the final say.

Sandbox

Try to get flagged.

This console stands in for a form on your site and the server behind it. Each button really does what it says, and the verdict is the one your server would get. Every verdict is logged on the public sandbox dashboard.

POST/api/v1/demo site pk_demo_sandbox session starting… ready
Action

Want more? Open devtools, or paste performance.now = () => 0 into the console, then send it normally again.

Verdict what your server gets back
waiting
no request
–risk / 100
trusted(v)
–
client
–
seal
–
same browser
–
human check
–
round trip
–
    Request body
    Nothing sent yet. Pick an action.
    Log this page
    1. No requests yet.
    What the script sees right now

      With a coding agent

      Paste one prompt and let your agent wire it in.

      Building with Claude Code, Cursor or another coding agent? Paste this in and it will wire Pyrmi into your pages and your server.

      prompt
      Read https://pyrmi.com/install.md and add Pyrmi Security to this site. Find the requests worth protecting (sign-ups, logins, votes, checkouts, scores, any endpoint bots hit), wire in the script tag and pyrmi-server as described, keep my secret key in an environment variable, and tell me which env vars to set.

      Open source

      Read every check. Run your own copy.

      Apache 2.0 licensed

      The browser script, the server SDK, the API and the dashboard are all Apache 2.0. Read how every check works, fork it, or send a fix; keep the NOTICE file with any copy you ship.

      Host it or self-host it

      Use pyrmi.com for free while it's in early access, or deploy your own copy to Cloudflare Workers or Vercel with a free Upstash Redis. Point pyrmi-server at your URL.