공짜로 받는 것
- CSRF protection — Origin header validation + per-build encrypted action ID.
- Dead-code elimination — unused Server Action 이 build 에 안 들어감.
- POST-only — GET-by-URL 노출 없음.
- Encrypted closure — inline action 이 capture 한 값이 client 에 action reference 도착 전에 encrypt.
본인이 추가해야 할 것
| Risk | Mitigation |
|---|---|
| 믿을 수 없는 input | 모든 field server-side validate (Zod 또는 동등) |
| 잘못된 user 가 다른 사람 data mutate | Session 읽고 write 전에 resource ownership check |
| Rate abuse | IP/user 별 rate-limit (Upstash, Redis, edge middleware) |
| Closure 안 sensitive secret | Secret 직접 capture 피하고 identifier 넘긴 후 server 에서 re-fetch |