Files
osint/app/Jobs/RunFinding.php
T
cedry2k1992andClaude Sonnet 5 873699e23e Initial commit: Laravel OSINT platform
Multi-user OSINT investigation tool with owner-controlled per-user and
per-group access grants. Includes Sherlock, theHarvester, crt.sh, WHOIS,
and ip-api.com collectors wired through a pluggable Runner/queue pipeline,
investigation search, and printable/CSV/JSON reporting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-20 10:22:05 +03:00

45 lines
1.1 KiB
PHP

<?php
namespace App\Jobs;
use App\Models\Finding;
use App\Osint\RunnerRegistry;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class RunFinding implements ShouldQueue
{
use Queueable;
public int $tries = 1;
public function __construct(
public readonly int $findingId,
) {
}
public function handle(RunnerRegistry $registry): void
{
$finding = Finding::with(['target', 'source'])->findOrFail($this->findingId);
$finding->update(['status' => 'running']);
try {
$result = $registry->resolve($finding->source->key)->run($finding->target);
$finding->update([
'status' => 'completed',
'raw_payload' => $result->raw,
'summary' => $result->summary,
'ran_at' => now(),
]);
} catch (\Throwable $e) {
$finding->update([
'status' => 'failed',
'error' => $e->getMessage(),
'ran_at' => now(),
]);
}
}
}