feat: CI/CD pipeline setup complete - Ansible playbooks updated, secrets configured, workflow ready

This commit is contained in:
2025-10-31 01:39:24 +01:00
parent 55c04e4fd0
commit e26eb2aa12
601 changed files with 44184 additions and 32477 deletions

View File

@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace App\Application\Security\Services;
use App\Application\Security\Events\File\SuspiciousFileUploadEvent;
use App\Framework\Core\Events\EventDispatcher;
use App\Framework\Core\Events\EventDispatcherInterface;
use App\Framework\Http\UploadedFile;
final class FileUploadSecurityService
@@ -29,7 +29,7 @@ final class FileUploadSecurityService
];
public function __construct(
private EventDispatcher $eventDispatcher
private EventDispatcherInterface $eventDispatcher
) {
}
@@ -61,22 +61,24 @@ final class FileUploadSecurityService
// MIME-Type prüfen
$mimeType = $file->getMimeType();
if (! in_array($mimeType, self::ALLOWED_MIME_TYPES)) {
$this->dispatchSuspiciousUpload($file->name, $mimeType, $file->size, 'forbidden_mime_type', $userEmail);
$mimeTypeString = $mimeType->getValue();
if (! in_array($mimeTypeString, self::ALLOWED_MIME_TYPES)) {
$this->dispatchSuspiciousUpload($file->name, $mimeTypeString, $file->size, 'forbidden_mime_type', $userEmail);
return false;
}
// Dateiinhalt auf Malware-Signaturen prüfen
if ($this->containsMalwareSignatures($file->tmpName)) {
$this->dispatchSuspiciousUpload($file->name, $mimeType, $file->size, 'malware_signatures_detected', $userEmail);
$this->dispatchSuspiciousUpload($file->name, $mimeTypeString, $file->size, 'malware_signatures_detected', $userEmail);
return false;
}
// Double-Extension prüfen (z.B. file.jpg.php)
if ($this->hasDoubleExtension($file->name)) {
$this->dispatchSuspiciousUpload($file->name, $mimeType, $file->size, 'double_extension', $userEmail);
$this->dispatchSuspiciousUpload($file->name, $mimeTypeString, $file->size, 'double_extension', $userEmail);
return false;
}