mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
Trivy does not read archives, so a bare npm tarball always scanned clean. The scanner now extracts the tarball into node_modules/<name> in a temp dir and runs trivy rootfs on it, so the node-pkg analyzer sees the package.json. Extraction rejects absolute paths, parent segments and links that leave the tree, and caps the unpacked size at 512 MiB. The temp dir is removed after the scan. PyPI wheels and Go module zips share the archive problem and need their own extractors. This commit does not change them.