security(import): validate PDF magic bytes before S3 upload #618

Merged
marcel merged 10 commits from worktree-feat+issue-529-pdf-magic-bytes into main 2026-05-19 09:45:04 +02:00
Showing only changes of commit 93da5914a8 - Show all commits

View File

@@ -179,4 +179,24 @@ describe('ImportStatusCard', () => {
await expect.element(getByTestId('skipped-count')).not.toBeInTheDocument();
});
it('does not show skipped section when RUNNING even with skipped > 0', async () => {
const { getByTestId } = render(ImportStatusCard, {
props: {
importStatus: makeStatus({
state: 'RUNNING',
statusCode: 'IMPORT_RUNNING',
processed: 5,
skipped: 2,
skippedFiles: [
{ filename: 'a.pdf', reason: 'INVALID_PDF_SIGNATURE' },
{ filename: 'b.pdf', reason: 'INVALID_PDF_SIGNATURE' }
]
}),
ontrigger: () => {}
}
});
await expect.element(getByTestId('skipped-count')).not.toBeInTheDocument();
});
});