Live demo · platform/gateway.py
ThreatShield Gateway
This page talks to the actual ThreatShield Gateway v1.0.0 from the GOLD
workspace (GOLD/platform/gateway.py, Python stdlib only), running as a service and
reached through a Cloudflare Tunnel and this site's same-origin /api/ proxy.
Every result below is the gateway's real response — nothing is mocked or simulated.
- Gateway health — checking /api/health…
Send a payload
The gateway threat-scores the request body: each injection-pattern class that matches adds 25 points (capped at 100). Score ≥ 70 → 403 BLOCKED; 35–69 → 200 with verdict WARN; below 35 → 200 ALLOW. Blocked requests are scored before the rate limiter runs.
Gateway response
No request sent yet. The gateway's exact HTTP status and JSON will appear here.
What it checks — the six pattern classes
| Class | What matches | Example trigger |
|---|---|---|
| SQL tautology | A quote followed by OR/AND and a numeric equality — the classic always-true login bypass. | ' OR 1=1 |
| SQL keywords | DROP, INSERT, SELECT, UPDATE, DELETE or UNION followed by whitespace. | DROP TABLE |
| Path traversal | Parent-directory sequences, forward or back slash. | ../ · ..\ |
| Cross-site scripting | An opening script tag. | <script> |
| Prototype pollution | A __proto__ key assignment in a JSON body. | "__proto__": |
| NoSQL injection | A MongoDB-style $where clause key. | "$where": |
Rate limiting & metering — stated plainly
- Rate limit: 100 calls per 60 seconds per license key (the anonymous bucket if no key is sent). Over the limit, the gateway returns 429 RATE_LIMITED. This page counts your demo calls in this tab so you can see where you stand; the counter is local to your browser, the limit is enforced by the gateway.
- Metering: each non-blocked and blocked verdict fires a
usage event at AURICORE (
127.0.0.1:8000/v1/meter, 2.5 royalty rate). AURICORE is not running in this deployment, so those calls fail silently — fire-and-forget by design, they never change a verdict. - What this gateway is — and is not: it is a
threat-verdict gateway demo. It scores the body and returns a verdict JSON
(
PROXIED/ score / verdict). It does not forward traffic to a real upstream service, and it is a single-file stdlib demo from the GOLD platform folder — not a production reverse proxy. - Source:
GOLD/platform/gateway.pyon Devin Royal's external drive, fetched 2026-11-23 via the JAVA1KIND Bridge and run unmodified (sha256f28ee64d…5839) as a systemd service on the portal's VM, bound to loopback only; this page reaches it through a Cloudflare Tunnel + the site's/api/Pages Function.
Sending…
'; raw.style.display='none'; fetch('/api/check',{method:'POST',headers:headers,body:body}).then(function(r){ return r.text().then(function(txt){return {status:r.status,txt:txt};}); }).then(function(o){ calls++; setCounter(); raw.style.display='block'; raw.textContent='HTTP '+o.status+' '+o.txt; var j=null; try{j=JSON.parse(o.txt);}catch(e){} if(!j){res.innerHTML='NON-JSON RESPONSE';return;} if(j.error==='BLOCKED'){res.innerHTML='BLOCKED Score '+j.score+'/100 — HTTP 403. Three or more pattern classes matched, so the gateway refused the payload before rate limiting.';} else if(j.error==='RATE_LIMITED'){res.innerHTML='RATE LIMITED — HTTP 429. This license key (or the anonymous bucket) exceeded 100 calls in 60 seconds.';} else if(j.error){res.innerHTML=''+j.error+' — see the raw response below.';} else{ var cls=j.verdict==='WARN'?'warn':'allow'; res.innerHTML=''+j.verdict+' Score '+j.score+'/100 — HTTP 200. '+(j.verdict==='WARN'?'One or two pattern classes matched: allowed through, flagged.':'No pattern class matched.'); var pct=Math.min(j.score,100); res.innerHTML+=''; } }).catch(function(e){ res.innerHTML='GATEWAY UNREACHABLE — the request failed before a verdict ('+e.message+'). No result is shown because none exists.'; }); });