Back to Pnpm

@pnpm/fetching.binary-fetcher

fetching/binary-fetcher/README.md

11.0.6891 B
Original Source

@pnpm/fetching.binary-fetcher

A fetcher for binary archives

Installation

pnpm add @pnpm/fetching.binary-fetcher

Testing

Test Fixtures

The test/fixtures/ directory contains malicious ZIP files for testing path traversal protection:

FileEntry PathPurpose
path-traversal.zip../../../.npmrcTests ../ escape sequences
absolute-path.zip/etc/passwdTests absolute path entries
backslash-traversal.zip..\..\..\evil.txtTests Windows backslash traversal (Windows-only)

These fixtures are manually crafted because AdmZip's addFile() sanitizes paths automatically.

Note: The backslash test only runs on Windows because \ is a valid filename character on Unix.

Regenerating Fixtures

bash
node --experimental-strip-types scripts/create-fixtures.ts

License

MIT