Skip to content

Commit c53cbfd

Browse files
committed
docs(observability-map): note that auth-scope reads only the builder-wrapped exports
A route whose action is builder-wrapped and whose loader is a plain export async function loader is judged on the action alone, and the pass detail reads as a claim about the whole route. Ten routes in the tree mix the two shapes and one of them is sensitive, so the check runs on exactly one of them. Hand-read: its plain loader filters on members: { some: { userId } } and is scoped, which nothing in the check saw. Known limits only; the check is unchanged.
1 parent 87e0822 commit c53cbfd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

internal-packages/observability-map/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,16 @@ Read these before trusting a specific verdict.
357357
- **`auth-scope` reads property assignments in that export's own handler.** A handler that pulls the
358358
id into a local first, `const userId = user.id; ... { userId }`, or that builds its filter in a
359359
same-file helper, scopes itself and is not seen, so it would be reported as unscoped.
360+
- **`auth-scope` reads the builder-wrapped exports and says nothing about the rest of the file.** A
361+
route whose action is builder-wrapped and whose loader is a plain `export async function loader`
362+
is judged on the action alone, and the pass detail, "every builder-wrapped export has an
363+
authorization gate", is true of what it read while reading as a claim about the whole route. Ten
364+
routes in the tree mix the two, and one of them is sensitive, so it is the only one the check runs
365+
on: `_app.orgs.$organizationSlug.settings._index/route.tsx`, whose builder-wrapped action carries
366+
the pass and whose plain loader filters on `members: { some: { userId } }` and is scoped. That was
367+
hand-read; nothing in the check saw it. Widening the check to a hand-written export means deciding
368+
first whether that export is authenticated at all, which is `auth-boundary`'s question rather than
369+
this one.
360370
- **Three login-flow routes fail `auth-boundary` correctly and unhelpfully.** `/auth/sso`,
361371
`/api/v1/authorization-code` and `/api/v1/token` are unauthenticated by design: the caller is
362372
anonymous at that point, which is the whole purpose. The check's statement about them is true and

0 commit comments

Comments
 (0)