argos-sdk/argos-php

argos Security SDK for PHP

Maintainers

Package info

gitlab.com/argossecops/argus-php

Issues

pkg:composer/argos-sdk/argos-php

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-05-15 14:30 UTC

This package is not auto-updated.

Last update: 2026-05-16 10:05:42 UTC


README

Latest Version on Packagist Total Downloads License: MIT

argos is a production-grade security SDK for PHP, designed for real-time threat detection, fraud prevention, and automated response. It monitors incoming requests, scores risk using advanced ML models, and enables you to block threats instantly.

✨ Key Features

  • 🚀 High Leverage: Zero-config initialization with initialize() for environment auto-detection.
  • ⚡ Smart Batching: Automatic event queuing and background flushing via shutdown hooks.
  • 🛡️ Framework First: Native support for Laravel, WordPress, and Plain PHP applications.
  • 🔄 Resilience Built-in: Circuit breakers, exponential backoff, and TTL-based blocklist caching.
  • 🧩 Deep Locality: Centralized IP extraction and packet normalization.

📦 Installation

composer require argos-sdk/argos-php

🚀 Quick Start

1. Basic Ingestion

The simplest way to start monitoring events.

use Argos\Client\ArgosClient;
use Argos\Client\ArgosConfig;

$config = new ArgosConfig(
    apiKey: 'your-api-key',
    autoBlockOnBlock: true
);

$client = new ArgosClient($config);
$client->initialize(); // Auto-detects environment ID

// Ingest an event
$client->ingest([
    'event_type' => 'login',
    'user_id' => 'user_123',
    'status' => 'success'
]);

2. Using Middleware (The Recommended Way)

Drop argos into your application for instant protection.

Laravel Example

Register the middleware in your Kernel.php or route files:

// In a route group
Route::middleware([\Argos\Middleware\Laravel\ArgosMiddleware::class])->group(function () {
    Route::get('/secure-data', function () {
        return response()->json(['message' => 'Secure!']);
    });
});

Plain PHP Example

$middleware = new \Argos\Middleware\PlainPHP\ArgosMiddleware($client);
$middleware->run(function() {
    // Your application logic here
    echo "Processing request...";
});

🛠️ Middleware Support

PlatformMiddleware / Plugin
LaravelArgos\Middleware\Laravel\ArgosMiddleware
WordPressArgos\Middleware\WordPress\ArgosMiddleware
Plain PHPArgos\Middleware\PlainPHP\ArgosMiddleware

⚙️ Configuration Options

OptionDefaultDescription
apiKeyRequiredYour Argos API key.
environmentIdAutoSet manually or let initialize() detect it.
autoBlockOnBlockfalseAutomatically block IPs that return a BLOCK verdict.
flushInterval5sInterval for automatic background event flushing.
batchSize50Max events per batch flush.
blocklistCacheTTL60sTTL for in-memory blocklist check cache.
timeout30sRequest timeout for API calls.

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTORS.md for our coding philosophy and standards.

To run the test suite:

vendor/bin/phpunit

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright © 2026 Tachyonix Security. All rights reserved.