Commit b080dcd
fix: address PR #40 review feedback (middleware leak + TSS-7 robustness)
- src/server/access/middleware.ts (HIGH): move setResponseStatus +
logger into dynamic imports inside the .server() body. middleware.ts
is reachable from start.ts, so top-level imports of
@tanstack/react-start/server and ~/utils/logger (which pulls Axiom)
would leak server-only code into the client bundle — exactly the
TSS-2 class this initiative targets, and a violation of our own
SKILL.md dynamic-import rule. logger.info/error are module-scope
closures (no `this`), so the destructure-to-logFn stays safe.
- scripts/check-tss-7.sh (MEDIUM x3):
- is_exempt now uses leading-`*` glob so ./-prefixed $CHANGED
paths (git diff --name-only) still match the exemptions.
- getRequest regex tolerates whitespace: `getRequest ()`,
`getRequest( )`.
- auth.api.getSession regex tolerates whitespace: `getSession (`.
Verified: whitespace-variant fixtures now caught; ./-prefixed exempt
paths still skipped; check-types + biome + 62 unit tests green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent d385543 commit b080dcd
2 files changed
Lines changed: 20 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
74 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
84 | | - | |
85 | | - | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
0 commit comments