Fix parseSBOMFromPath to check file size before reading

Co-authored-by: bdehamer <[email protected]>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-17 16:01:11 +00:00
co-authored by bdehamer
parent d2ffba3269
commit 4734ea3b9b
3 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ describe('parseSBOMFromPath', () => {
describe('when file does not exist', () => {
it('throws an error', async () => {
await expect(parseSBOMFromPath('/nonexistent/file.json')).rejects.toThrow(
/ENOENT/
/SBOM file not found/
)
})
})