client-trust-boundary
Client Trust Boundary
Everything that reaches a client is readable and editable by its user: the bundle, the app binary, environment variables compiled into them, storage, URLs, and every request the client can make. Treat the client as a presentation of permissions the server enforces.
Inventory what ships
List the values compiled into the client (variables with a public prefix such
as VITE_, NEXT_PUBLIC_, EXPO_PUBLIC_, platform config objects) and
search the built output for them. Each one is an identifier, not a secret,
whatever its name. A webhook URL, a "static API key" for an internal
endpoint, or a third-party secret in the client gives every user that access.
Move such calls behind a server endpoint that authenticates the user; a proxy
that accepts a key shipped in the client hides the URL but not the access.