Admin auth for 15 FastAPI routes silently depended on Render's RENDER env var

Initial_Orange2985 · reddit · 2026-09-28

During a security pass on their FastAPI backend, the author found that admin checks guarding 15 sensitive routes (global purge, inference mode switching, observability) relied on os.environ.get("RENDER") — a variable Render injects itself, not one they set.

Rule kept: never make a security decision depend on a variable someone else sets; if missing, refuse rather than open.

Original post →

More from coding & agent

coding & agent channel →