mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-02-04 15:53:17 +00:00
✨ Add Security Monitoring System with Command, Model, and Service
- 🛡️ Introduce `SecurityMonitor` service for tampering and malicious activity detection. - 🏷️ Add `SecurityAttempt` model and migration to log, categorize, and query security attempts. - 🖥️ Create `SecurityAttemptsCommand` for filtering, statistics, and top IP analysis. - ✅ Add extensive tests to ensure the reliability of security monitoring and logging. - 🔗 Integrate `SecurityMonitor` into the exception handling pipeline for real-time monitoring.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Services\SecurityMonitor;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
@@ -18,4 +19,8 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
Integration::handles($exceptions);
|
||||
|
||||
$exceptions->report(function (Throwable $e) {
|
||||
app(SecurityMonitor::class)->recordFromException($e);
|
||||
});
|
||||
})->create();
|
||||
|
||||
Reference in New Issue
Block a user