Download the PHP package defenso/sdk-php without Composer
On this page you can find all versions of the php package defenso/sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download defenso/sdk-php
More information about defenso/sdk-php
Files in defenso/sdk-php
Package sdk-php
Short Description Defenso PHP SDK — WAF, uptime, and attack-log middleware for Laravel and Symfony. Fails open.
License MIT
Homepage https://defen.so
Informations about the package sdk-php
defenso/sdk-php
One-line WAF, bot detection, and attack logging for PHP — Laravel, Symfony, and plain PHP apps. Part of Defenso — the security layer for indie devs, vibe coders, and shipping teams.
- Managed WAF with OWASP Top 10 + Core Rule Set + your custom rules
- Bot detection with UA classification + rate limits
- Attack logging with full context (IP, ASN, country, payload, route, verdict)
- Fails open — if Defenso is unreachable, your app keeps serving
- ~0.1 ms in-process latency (rules cached, evaluation is local)
- Attack events queued and flushed asynchronously
- Free tier forever · Pro $29/mo per site
- Requires PHP 8.2+ (works great on 8.4)
Install
Get a token at https://app.defen.so/developer, then set DEFENSO_TOKEN in .env.
Laravel
Register the client as a singleton in a service provider:
Append the middleware in bootstrap/app.php:
Add to config/services.php:
Symfony
Register the client and listener in config/services.yaml:
Plain PHP
Options
How it works
- Policy (WAF rules) pulled from Defenso every 5 min, cached in memory.
- Requests inspected in-process. Latency ~0.1 ms.
- Attack events queued in-memory, flushed at batch size or client destruction.
- If Defenso is down, requests are allowed. Your app never blocks.
What Defenso stops
SQL injection, XSS (reflected / stored / DOM), CSRF, SSRF, path traversal, XXE, NoSQL / LDAP / command injection, brute force, credential stuffing, malicious file uploads (polyglots, PHP-in-PNG), bot scrapers, headless browser abuse, TOR exit nodes, exposed secrets, wide-open cloud config. Full list at defen.so/threats.
Companion tools
- @defen.so/init — one-command bootstrap that detects your framework and adds the SDK correctly.
- Playground — fire attacks at a live PHP-SDK-protected origin and see what got blocked.
- MCP for Claude Code / Cursor / Windsurf / VS Code — give your AI IDE real security tools.
Links
- Marketing site: defen.so
- App: app.defen.so
- Source (monorepo): github.com/1fancy/defen.so
- Issues: github.com/1fancy/defen.so/issues
- Packagist: packagist.org/packages/defenso/sdk-php
- Pricing: defen.so/pricing
- Contact: [email protected]
License
MIT