Skip to content

Commit 2a56af6

Browse files
committed
Update scan controller test security mocks
1 parent 738f6cd commit 2a56af6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backend/src/__tests__/controllers/scanController.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ vi.mock('fs-extra', () => ({
4545
vi.mock('../../utils/security', () => ({
4646
execFileSafe: vi.fn().mockResolvedValue({ stdout: '', stderr: '' }),
4747
isPathWithinDirectory: vi.fn().mockReturnValue(true),
48+
resolveSafeChildPath: vi.fn((baseDir: string, childPath: string) => `${baseDir}/${childPath}`),
4849
resolveSafePath: vi.fn((path: string) => path),
4950
validateImagePath: vi.fn((path: string) => path),
5051
}));

0 commit comments

Comments
 (0)