Framework-agnostic security engine (Python)
uv add guard-coreAdvanced security middleware with real-time threat detection, IP filtering, rate limiting, comprehensive monitoring and more.
Three consecutive weeks from a single production deployment. Same app. Same codebase. Cloudflare added between week 1 and week 2.
745
attacks blocked
74
unique attackers
Background-radiation reconnaissance: .env / .git / wp-config probes. The kind of low-sophistication scanning every public service sees. Guard caught all of it before any edge layer was in front.
48
attacks blocked
19
unique attackers
Cloudflare's free WAF ate the obvious 93% of traffic. The 48 attacks Guard caught looked exactly like normal browsers: Mozilla user agents, real referrers, real-looking IPs. That's the slice edge WAFs are structurally blind to.
748
attacks blocked
0
unique attackers
A coordinated burst over one hour, distributed across rotating identities, targeting API enumeration paths. Each request looked legitimate to the edge. Framework-embedded behavioral correlation saw the targeting and shut it down.
Edge WAFs work at L7 headers and IP reputation. Guard works at the framework layer with behavioral context: which authenticated user did what, on which endpoint, with which decorator chain. AI-coordinated attacks have to reveal intent there. They don't have to at the edge.
Comprehensive API protection with cutting-edge security middleware
Spots dozens of residential-proxy IPs attacking as one across all your instances, when no single IP trips a per-IP ban. SaaS-only cross-IP correlation the standalone library can't see
Per-endpoint × per-IP windowed tracking with detection-correlated thresholds. An IP that just tried SQLi gets banned at half the 404-sweep threshold
NFKC normalization + 21 lookalike substitutions, 3-pass URL/HTML decoding, then context-aware regex (72 patterns) and semantic scoring (5 attack families). Beats polymorphic AI payloads
AES-256-GCM with project-scoped keys, fork-safe transport, and persist-confirm Redis recovery. Telemetry stays unreadable to us, third parties, and breached infrastructure
Compose @rate_limit, @require_ip, @geo_rate_limit, @require_2fa per endpoint. Edge WAFs can't see this; framework-embedded guard does
Update IP bans, rate limits, blocked countries, and detection rules at runtime from the dashboard. Connected agents pick them up on their next poll cycle - no redeploy
Set ban thresholds and durations per attack category. SQLi or cmd_injection trips a 24-hour ban on the first hit; recon scanning a softer one
One security engine, every framework. FastAPI, Flask, Django, Tornado, Express, Fastify, Hono, NestJS, Actix, Axum, Rocket, Tower
Hosted dashboard with weekly threat reports, top attacked paths, attacker geo, daily heatmaps, and CSV/JSON export
Built-in consent management, audit logs, retention split between regulatory and operational windows, and self-service data export / deletion flows
Country-level allow/block lists with real-time IPInfo geolocation and timezone-aware time-window restrictions
Whitelist/blacklist with CIDR, automatic ban escalation on auto_ban_threshold, and configurable lockout windows
Reject traffic originating from AWS, GCP, Azure, OCI, DigitalOcean, Linode, Vultr ranges. Daily auto-refresh from upstream
SSRF-validated outbound webhooks with idempotency keys for downstream dedup. Stripe-style retry with auto-disable on persistent failure
Simple integration with your existing application
Framework-agnostic security engine (Python)
uv add guard-coreuv add fastapi-guardfrom fastapi import FastAPI
from guard import SecurityMiddleware, SecurityConfig
app = FastAPI()
config = SecurityConfig(
rate_limit=100,
auto_ban_threshold=5,
blocked_countries=["CN", "RU"],
enable_penetration_detection=True,
)
app.add_middleware(SecurityMiddleware, config=config)# guard-agent ships with fastapi-guard, no extra install.
config = SecurityConfig(
# ...protection settings...
enable_agent=True,
agent_api_key="YOUR_API_KEY",
agent_project_id="YOUR_PROJECT_ID",
agent_buffer_size=5000,
agent_flush_interval=2,
)
# Middleware drives the lifecycle, no lifespan needed.Updates, security research, and field notes.
Experience our security features in real-time with our interactive playground
Simulate SQL injection, XSS, and brute force attacks
Watch security events and blocks as they happen
Test endpoints with built-in security middleware
No signup required
We use strictly necessary cookies to run the service, and (only with your consent) analytics to improve it. Read our Cookie Policy or Privacy Policy.