Code, Cloud, Runtime and AI Pentest are now part of Longstride.See what’s new
Runtime

An in-app firewall that ships with your code.

Shield is a zero-dependency library for Node.js, Python, Ruby, Go, Java, PHP and .NET that stops injection attacks inside your app, rate-limits abusers, blocks vulnerability scanners and (if you choose) AI scrapers, and reports every attack to Longstride.

Checkout API · last 24h
SQL injection · /login214 blocked
Path traversal · /files37 blocked
sqlmap scanner1,902 blocked
XSS · /search (monitor mode)6 allowed
GPTBot scrapingblocked
The problem

Some vulnerabilities will always reach production.

Patching takes time, and a new injection bug can ship on any Friday. A web application firewall at the edge cannot see how your app parses a JSON body. Shield sits inside the app, where it can.

  • SQL and NoSQL injection, XSS, path traversal, command injection, SSRF and Log4Shell
  • Inspects paths, query strings, JSON bodies, cookies and key headers
  • Prototype-pollution and NoSQL-operator detection in request bodies
  • Per-IP rate limiting, IP allow and block lists
  • Scanner blocking, with optional AI-scraper blocking
  • Monitor mode first, block when you are confident
What you get

Runtime, in detail.

Drop-in

Express, Fastify and node:http for Node; WSGI and ASGI middleware for Flask, Django, FastAPI and Starlette; Rack middleware for Rails and Sinatra; net/http for Go; a Servlet filter for Spring Boot; PSR-15 for PHP; ASP.NET Core middleware for .NET.

Fails open

If Shield ever errors it lets the request through. Your app’s availability always wins.

Attack telemetry

Every blocked or allowed attack appears in Longstride within seconds, with the payload and source.

AI scraper control

Block GPTBot, ClaudeBot, CCBot, Bytespider and others at the application layer, independent of robots.txt.

No data leaves by default

Without an API key Shield runs fully offline. With one, only attack events are sent.

Open source

Apache-2.0 licensed, so your team can read every line it runs.

How it works

Up and running fast.

1

Install

npm i @longstride/shield, then add the middleware.

2

Monitor

Watch real attacks for a week with nothing blocked.

3

Block

Switch to block mode and keep watching the feed.

FAQ

Questions, answered.

Which languages are supported?

Node.js, Python, Ruby, Go, Java, PHP and .NET.

Does it slow requests down?

Shield runs a handful of regular expressions over request input in-process, with no network call on the request path. Events are batched and sent every ten seconds in the background.

Is this a replacement for a WAF?

It complements one. An edge WAF absorbs volume; Shield sees parsed request bodies and app context that an edge cannot.

Get started

See your exposure in a 30-minute walkthrough.

We’ll scan your estate live, show you what attackers see, and leave you with a prioritised plan, whether or not you buy.