kriosa-ai/kriosa-php

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

Maintainers

Package info

github.com/Kriosa-ai/kriosa-php

Homepage

Issues

Documentation

pkg:composer/kriosa-ai/kriosa-php

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-06-20 13:20 UTC

This package is auto-updated.

Last update: 2026-06-20 13:24:06 UTC


README

PHP Version License: MIT Version 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

  1. Sign up at kriosa.com
  2. Go to the API key section
  3. Copy your API key

Documentation

Full documentation at kriosa.com/docs

Support

License

MIT License — see LICENSE for details.

Built in Cameroon 🇨🇲 for Africa 🌍