kriosa-ai / kriosa-php
AI-Powered Web Application Middleware - Protect your apps from SQL injection, XSS, and 10+ attack vectors in 30 seconds
v1.0.0
2026-06-20 13:20 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.0
README
Kriosa is an intelligent security middleware for PHP applications that acts as a smart layer between users and your application, detecting, filtering, and logging malicious activities before they reach your core application.
AI-powered Web Application Middleware built for developers and businesses. One file. Zero dependencies. Instant protection.
Features
- 🛡️ AI-Powered Threat Detection — Hybrid ML engine combining Random Forest and Neural Networks
- 🔍 Attack Detection — SQL Injection, XSS, Path Traversal, Bot Detection, Rate Limiting
- 🌍 Built for Africa — Optimized for African web infrastructure and threat landscape
- 🚀 Framework Agnostic — Works with Laravel, WordPress, Symfony, and vanilla PHP
- ⚡ High Performance — Minimal overhead with 5ms average response time
- 📊 Explainable AI — XAI dashboard shows exactly why a request was blocked
- 📝 Real-time Analytics — Live threat scoring, confidence levels, and attack metrics
Installation
composer require kriosa-ai/kriosa-php
Quick Start
require 'vendor/autoload.php'; $kriosa = new Kriosa('sk_your_api_key'); $kriosa->protect();
One-Line Protection
kriosa_protect('sk_your_api_key');
Laravel Integration
// In app/Http/Middleware/KriosaMiddleware.php $kriosa = new Kriosa(config('services.kriosa.key')); $kriosa->protect();
WordPress Integration
// In wp-config.php or functions.php require_once 'kriosa.php'; kriosa_protect('sk_your_api_key');
Configuration
$kriosa = new Kriosa('sk_your_api_key', [ 'timeout' => 5, // API timeout in seconds 'debug' => false, // Enable debug logging 'fail_closed' => false, // Block requests if API unreachable 'show_badge' => true, // Show "Protected by Kriosa" badge 'badge_position' => 'bottom-right' // Badge position ]);
Get Your API Key
- Sign up at kriosa.com
- Go to the API key section
- Copy your API key
Documentation
Full documentation at kriosa.com/docs
Support
- 📧 Email: support@kriosa.com
- 🌐 Website: kriosa.com
License
MIT License — see LICENSE for details.
Built in Cameroon 🇨🇲 for Africa 🌍