Download the PHP package kriosa-ai/kriosa-php without Composer
On this page you can find all versions of the php package kriosa-ai/kriosa-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kriosa-ai/kriosa-php
More information about kriosa-ai/kriosa-php
Files in kriosa-ai/kriosa-php
Package kriosa-php
Short Description AI-Powered Web Application Middleware - Protect your apps from SQL injection, XSS, and 10+ attack vectors in 30 seconds
License MIT
Homepage https://kriosa.com
Informations about the package kriosa-php
Kriosa PHP SDK
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 code.
AI-powered Web Application Middleware built for developers and businesses. One file. Zero dependencies. Instant protection.
📋 Table of Contents
- Features
- How It Works
- Installation
- Quick Start
- Framework Integrations
- Configuration
- Production Recommendations
- What Developers Say
- Get Your API Key
- Documentation
- Support
- License
✨ Features
- 🛡️ AI-Powered Threat Detection — Hybrid ML engine combining Random Forest and Neural Networks
- 🔍 Comprehensive Attack Detection — SQL Injection, XSS, Path Traversal, Command Injection, Bot Detection, Rate Limiting
- ⚡ Local Fallback Protection — Pattern matching runs locally when API is unavailable
- 🧠 Explainable AI — XAI dashboard shows exactly why a request was blocked with confidence scores
- 🌍 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
- 📊 Real-time Analytics — Live threat scoring, confidence levels, and attack metrics
- 🔒 Zero Dependencies — One file, drop-in protection
⚙️ How It Works
Kriosa uses a multi-layer security architecture to protect your application:
Key Benefit: Even when the AI API is unavailable, the local pattern matching layer continues to block common attack vectors. Your application is never left completely unprotected.
📦 Installation
🚀 Quick Start
One-Line Protection
🔧 Framework Integrations
Laravel Integration
Register the middleware:
Apply to routes:
Vanilla PHP Integration
⚙️ Configuration
🏭 Production Recommendations
Understanding fail_closed
The fail_closed setting determines what happens when the Kriosa API cannot be reached:
| Setting | Behavior |
|---|---|
fail_closed: true |
Blocks requests when API is unreachable (security-first) |
fail_closed: false |
Allows requests to proceed (availability-first) |
Important: Even with fail_closed: false, the local pattern matching layer continues to block common attacks (SQLi, XSS, path traversal, command injection). Only advanced ML-based detection is affected by API unavailability.
Recommended Configurations by Use Case
| Use Case | fail_closed |
timeout |
Rationale |
|---|---|---|---|
| Public Routes | false |
3s | Prioritize availability over security for public content |
| Authenticated Routes | true |
5s | Protect sensitive user data and sessions |
| Admin Panels | true |
5s | Maximum protection for critical areas |
| Payment/Checkout | true |
3s | Financial transactions require security-first |
| API Endpoints | true |
2s | APIs handle sensitive data and are common attack targets |
| Development | false |
10s | Avoid blocking yourself while building |
Production Example
Environment-Based Configuration
💬 What Developers Say
"The explainable dashboard is genuinely rare — telling me why a request was blocked with confidence scores and matched attack patterns is a lifesaver. Quick question on the config though... the fail_closed setting is the one thing people will get wrong, so I love that the docs now cover this properly."
— Early Kriosa User
"One file. Zero dependencies. Instant protection. This is exactly what I needed for my Laravel apps. The local fallback means I don't have to worry about API downtime leaving me exposed."
— Kriosa Beta Tester
🔑 Get Your API Key
- Sign up at kriosa.com
- Navigate to the API key section
- Copy your API key
📚 Documentation
Full documentation available at: kriosa.com/documentation.php
Quick Links
🆘 Support
- 📧 Email: [email protected]
- 🌐 Website: kriosa.com
- 🐛 Issues: GitHub Issues
- 📖 Documentation: kriosa.com/documentation.php
📄 License
MIT License — see LICENSE for details.
🏆 Built with ❤️ in Cameroon 🇨🇲
Built by developers, for developers. Made in Africa, for the world.
⭐ Star us on GitHub — Your support helps us continue building better security tools for everyone.
All versions of kriosa-php with dependencies
ext-curl Version *
ext-json Version *