PHPackages                             kriosa/kriosa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. kriosa/kriosa

ActiveLibrary[Security](/categories/security)

kriosa/kriosa
=============

AI-Powered Web Application Middleware - Protect your apps from SQL injection, XSS, and 10+ attack vectors in 30 seconds

v1.0.0(today)00MITPHPPHP &gt;=7.4CI failing

Since Jun 20Pushed todayCompare

[ Source](https://github.com/Kriosa-ai/kriosa-php)[ Packagist](https://packagist.org/packages/kriosa/kriosa)[ Docs](https://kriosa.com)[ RSS](/packages/kriosa-kriosa/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Kriosa PHP SDK
==============

[](#kriosa-php-sdk)

[![PHP Version](https://camo.githubusercontent.com/b43c9d6cd8939c4868f963284928566c4c35dd2da0725c027f95a3d62f2f0329/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d626c75652e737667)](https://packagist.org/packages/kriosa-ai/kriosa-php)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Version](https://camo.githubusercontent.com/ba89a7edd5f97743be1ce64238bec511995f884cc2d4b0695ccb2c3b681121b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d332e302e302d677265656e2e737667)](https://github.com/kriosa-ai/kriosa-php)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
--------

[](#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
------------

[](#installation)

```
composer require kriosa-ai/kriosa-php
```

Quick Start
-----------

[](#quick-start)

```
require 'vendor/autoload.php';

$kriosa = new Kriosa('sk_your_api_key');
$kriosa->protect();
```

One-Line Protection
-------------------

[](#one-line-protection)

```
kriosa_protect('sk_your_api_key');
```

Laravel Integration
-------------------

[](#laravel-integration)

```
// In app/Http/Middleware/KriosaMiddleware.php
$kriosa = new Kriosa(config('services.kriosa.key'));
$kriosa->protect();
```

WordPress Integration
---------------------

[](#wordpress-integration)

```
// In wp-config.php or functions.php
require_once 'kriosa.php';
kriosa_protect('sk_your_api_key');
```

Configuration
-------------

[](#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
----------------

[](#get-your-api-key)

1. Sign up at [kriosa.com](https://kriosa.com)
2. Go to the API key section
3. Copy your API key

Documentation
-------------

[](#documentation)

Full documentation at [kriosa.com/docs](https://kriosa.com/documentation.php)

Support
-------

[](#support)

- 📧 Email:
- 🌐 Website: [kriosa.com](https://kriosa.com)

License
-------

[](#license)

MIT License — see [LICENSE](LICENSE) for details.

---

*Built in Cameroon 🇨🇲 for Africa 🌍*

###  Health Score

36

—

LowBetter than 80% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/85376674?v=4)[Nchiminyi](/maintainers/Nchiminyi)[@Nchiminyi](https://github.com/Nchiminyi)

---

Top Contributors

[![Nchiminyi](https://avatars.githubusercontent.com/u/85376674?v=4)](https://github.com/Nchiminyi "Nchiminyi (7 commits)")

---

Tags

securityxssSQL Injectionfirewallprotectionwafphp-securityweb-securityCameroonai-securityafrica-tech

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kriosa-kriosa/health.svg)

```
[![Health](https://phpackages.com/badges/kriosa-kriosa/health.svg)](https://phpackages.com/packages/kriosa-kriosa)
```

###  Alternatives

[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

1.0k494.9k2](/packages/akaunting-laravel-firewall)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
