← ClaudeAtlas

padosoft-edge-worker-securitylisted

Use this skill when code runs at the edge in front of an origin — a Cloudflare Worker or equivalent that proxies, renders or caches on behalf of a backend. It covers who owns a control when two layers could implement it, cross-site request forgery validated at the edge, the two-hop client-address model, header forwarding and what must never reach the origin, private caching and key design, cross-origin policy, cookies, server-side rendering at the edge, secrets and bypass tokens, and edge rate limiting. Also when the user says a request is blocked and nobody knows by which layer, a header is being spoofed, a cached page showed another user's data, a bypass works with only a user agent, or asks whether a control is really on. Do not use it for the origin application's own review, for CDN configuration, or for edge performance tuning.
padosoft/skills · ★ 1 · AI & Automation · score 80
Install: claude install-skill padosoft/skills
# Edge worker security An edge worker is not a thin proxy. It terminates the request, decides things the origin will never see, renders pages, and caches. It is a **security boundary of its own** — and the failure mode that produces most of the damage is not a bug in it, it is the ambiguity between it and the origin. **The rule: every control has exactly one owner, written down. When two layers could enforce it, each assumes the other does, and nobody does.** --- ## 1. Split-brain is the headline risk Anti-forgery, header trust, rate limiting, redirect policy, security headers: the edge and the origin can each implement them. Whenever they both can: - **Name the owner in both repositories**, in a comment at the place where the other layer would have done it. A reader of either side must learn, from that side, who actually enforces it. - **If both sides keep a list** — exclusions, allow-lists, trusted paths — those lists are one artefact with two copies, and they drift. Align them in the same change, or generate one from the other. An exclusion added on one side only leaves the route uncovered on **both**. - **Do not assume a control is on. Open the file and read the flag.** A switch built as a literal in the source is the production value; a switch read from configuration may be absent. When the origin delegates to the edge and the edge is disabled, the control does not exist anywhere — and everything looks normal. ## 2. Anti-forgery, when the edge is the gat