Threat model
What could go wrong in Sypnia Files, and how each threat is answered.
| Threat | Answer |
|---|---|
| A user reads or overwrites another user’s files | default deny; every operation checked against policies as that user |
| An uploaded HTML or SVG file runs scripts with your app’s or Sypnia’s cookies | files are served from a separate domain (files.sypnia.app), with Content-Security-Policy: sandbox and X-Content-Type-Options: nosniff; active types are sent as downloads unless the bucket allows inline |
| A file pretends to be an image | the type is sniffed from the bytes and checked against allowedTypes |
| Malware is uploaded and shared | optional scanning per bucket; infected files are never served and are quarantined |
| A signed URL is leaked | it expires; its options are signed; buckets can require short expiries |
| A secret key reaches a browser | refused when sent with an Origin header; rotate with files keys rotate |
| A transform bomb (huge dimensions) | originals limited to 50 megapixels and 25 MB for transforms |
| One project fills shared storage | per-project quotas; uploads refused past them |