Initial commit

This commit is contained in:
Porawit Dongwang
2026-09-16 23:20:08 +07:00
commit 0041668dbb
32577 changed files with 3687927 additions and 0 deletions
@@ -0,0 +1,27 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Dotenv\Dotenv;
use App\Engine\PlaybookEvaluator;
echo "Starting SOAR Automation Worker...\n";
// Load environment variables
if (file_exists(__DIR__ . '/../.env')) {
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
}
$evaluator = new PlaybookEvaluator();
while (true) {
try {
$evaluator->evaluateUnprocessedAlerts();
} catch (Exception $e) {
echo "Error in worker loop: " . $e->getMessage() . "\n";
}
// Sleep for 5 seconds before checking for new alerts again
sleep(5);
}