Security Threat Model & Engineering Controls
File utilities handle untrusted, potentially malicious user inputs. Here is how Velvetclip isolates and neutralizes file-based attack vectors.
1. Magic Byte Sniffing (Binary Verification)
Attackers frequently rename malicious executable payloads (ELF, PE, shell scripts) with safe extensions like `.pdf` or `.png`. Velvetclip ignores client-reported extensions and reads the raw binary header bytes (e.g. `%PDF-`, PNG magic bytes, JPEG SOI markers) before allowing any file buffer into memory.
2. Decompression & Pixel Bomb Defense
Image bombs (such as a 10KB PNG that uncompresses into a 100,000 x 100,000 pixel bitmap) can trigger severe out-of-memory browser crashes. Velvetclip parses PNG IHDR chunks and JPEG SOF markers to calculate uncompressed dimensions before allocating any canvas buffer, rejecting files exceeding 16,384px or 100 Megapixels.
3. Browser Sandbox Isolation
Processing runs inside the browser's native web worker sandbox. Code executing in this sandbox has zero access to your local filesystem, cannot initiate arbitrary system calls, and cannot execute unauthorized background processes.
4. True Redaction vs Visual Masking
Many basic PDF tools simply draw a black rectangle over sensitive text, leaving the underlying textual stream, selectable characters, and OCR layers completely intact. Velvetclip ensures true content destruction by removing or replacing the underlying data streams.