Open source · Security & Privacy

Secure File Upload Fixture

Exercise file upload limits, type checks, storage paths and rejection behavior.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Run inert local fixtures against an upload size, extension, declared MIME and generated-filename policy, and assert every acceptance and every rejection.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/secure-file-upload-fixture.mjs --root examples/clean

Scope

maxCases (500), maxCaseBytes (1 MiB), maxTotalBytes (8 MiB), maxFileBytes (5 MiB) and maxFindings (1000), each with a hard cap, each settable on the command line, each reported by name when it fires. Exceeding one is an incomplete run with a finding naming the limit — never a silent truncation, and never a pass. Both budgets that can stop the walk are re-checked after the loop as well as inside it.