Skip to content

Trust Boundaries ​

The first step in security practice is being clear about what you can trust and what you can't. This framework draws that line in very explicit places.

Four principles ​

1. Everything sent by the browser is user input ​

data-linker-args, data-linker-extra, data-param-*, form fields, client state: the user can change all of them in DevTools. On the server:

  • A Linker method without #[Validate] receives no arguments at all (deny unless declared).
  • renderBlade's params.* are only guaranteed to be scalars of length ≤ 2048; business rules are checked in renderCallSafely().
  • An id in extra must still pass #[Authorize] or a policy.

2. What can be called is a list, not a directory ​

ListWhereWhy it's manual
Linker componentsLinkerServiceProvider::registerComponents()Dropping a file into a folder shouldn't open a door
Callable methodsMethods marked #[Computable]grep '#\[Computable' is your attack surface
Browser actionsregisterActions() + actions.jsThe most the server can make the browser do
renderBlade controllersControllers using CanRenderCallSafelyThe trait is the allow list

3. Business state never leaves the server ​

In Stateful mode, $this->set('step', 2) lives in the server cache; the browser only has the uuid and rev. The step the browser sees is just a display value returned by ok(['step' => 2]). Changing it doesn't affect what the server decides.

Client state only holds things where "changing it makes the screen look odd at worst". The test:

If the user changes this value in DevTools, what's the worst that happens?

4. The server never sends code ​

  • Linker returns named actions, not JS strings. There is no eval path, so CSP doesn't need unsafe-eval.
  • A chart hook() can only reference a name registered on the front end; it can't send code.
  • Error messages are fixed text (language files). Server exceptions, SQL and paths never reach the screen.

Development-time boundaries vs security mechanisms ​

ThingSecurity mechanism?Its value
@renderObject allow list❌The template is the truth; catches slips
allowsRefererUrls()❌ (shrinks the surface)Stops other sites embedding your endpoint
Stateless signed URL❌ (integrity + expiry)Proves the capability wasn't tampered with or expired
#[RequiresAuth] / #[Authorize] / policies✅The real gatekeeping
#[Validate]✅Argument shape
CSRF✅Cross-site requests

Next: Server-side Checks → Front End & XSS → Deployment & Operations → Review Checklist.