-
Notifications
You must be signed in to change notification settings - Fork 0
Security
Kritarth-Dandapat edited this page Jul 19, 2026
·
1 revision
FreeFlow's trust model: whoever holds SECRET_API_KEY can publish arbitrary HTML to your domain, and anyone with a draft URL (plus PIN, if set) can view it. That's a small, honest surface — but a few gaps are open and tracked.
-
SECRET_API_KEYis the only write-path auth. Treat it like a root credential — anyone with it can serve arbitrary content (including script) from your domain. -
Draft URLs are bearer capabilities. No PIN = anyone with the link can view. This is by design (unlisted, not private) unless
--secure <pin>is used. -
PIN is not strong auth — short numeric PINs, no rate limiting on guesses at
GET /d/:id.
Known gaps — tracked in issue #2
-
Stored XSS by design — uploaded HTML is served raw as
text/html, noContent-Security-Policy, noX-Frame-Options. Anyone with the API key can host arbitrary script on the Worker's domain. -
PIN leaks via URL — sent as
?key=query param, landing in browser history, access logs,Refererheaders. Stored as plaintext in KV. - No TTL / no delete endpoint — drafts live in KV forever.
-
No upload size limit — arbitrarily large
htmlaccepted; fails late against the 25MB KV value cap. -
No rate limiting on
/upload— a leaked key can spam-fill KV with no throttling. - Guessable draft IDs — 8 hex chars, small keyspace, enumerable for unlisted (non-PIN) drafts.
-
Swallowed errors — top-level
fetchcatch returns bare 500, no server-side logging. - CLI has no local file size guard — large local files read fully into memory before upload.
A GitHub Copilot coding agent is assigned to issue #2 to land fixes for all of the above (CSP/XFO headers, PIN off the URL, TTL + delete endpoint, upload size cap, rate limiting, wider ID entropy, error logging, CLI size guard).
- Rotate
SECRET_API_KEYif you suspect it leaked. - Don't publish drafts containing secrets or PII — there's no encryption at rest beyond Cloudflare's platform defaults, and no delete path yet.
- Don't rely on the PIN for anything beyond casual link-sharing friction — it is not a substitute for real access control.
- Keep
wrangler.toml(holds account/namespace IDs) out of version control — it's already git-ignored.
-
masterbranch: force-push and deletion blocked (no required status checks yet — no CI configured).
- API Reference for exact auth semantics per endpoint
- Architecture for the full data flow