varias alteracoes
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-06 14:50:12 +02:00
parent 4f35313d06
commit e65cb26901
333 changed files with 54656 additions and 2058 deletions
+1
View File
@@ -13,6 +13,7 @@ final class EvidenceRepository
->where('s.status', 'approved')->where('s.purpose', 'investment_information')
->where('s.valid_until', '>=', now()->toDateString())->where('s.source_date', '<=', now()->toDateString())
->where('d.status', 'active')->whereNull('d.deleted_at')->whereIn('d.data_classification', ['public', 'internal'])
->where('d.malware_scan_status', 'clean')->whereColumn('d.malware_scanned_sha256', 'd.sha256')
->whereColumn('s.document_version', 'd.version_no')->whereColumn('s.document_checksum', 'd.sha256');
}
+2 -1
View File
@@ -14,7 +14,8 @@ final class SourceIngestion
{
return DB::transaction(function () use ($data, $actor): string {
$document = DB::table('documents')->where('id', $data['document_id'])->whereNull('deleted_at')->lockForUpdate()->first();
if (! $document || $document->status !== 'active' || $document->media_type !== 'text/plain'
if (! $document || $document->status !== 'active' || $document->malware_scan_status !== 'clean'
|| ! hash_equals(trim($document->sha256), trim((string) $document->malware_scanned_sha256)) || $document->media_type !== 'text/plain'
|| ! in_array($document->data_classification, ['public', 'internal'], true)) {
throw ValidationException::withMessages(['document_id' => 'Documento activo de texto autorizado necessário; fontes confidenciais/restritas não são admitidas.']);
}