Skip to main content
友田 陽大

Category

Next.js × Supabase アプリ層セキュリティ(脆弱性の検出・多層防御・RLS/認可の検証)実装ガイド

アプリ層セキュリティは『自動化できる水平統制』と『設計でしか守れない垂直リスク』に分かれます。前者——セキュリティヘッダー/CSP、サーバーレスで正しく効くレート制限、CSRF/Origin検証、型付きenv境界、SQLi/SSRF/XSS等の注入——はツールで網羅的に検出・強化できます。後者——認可/IDOR・Supabase RLSの設計の正しさ・テナント分離・業務ロジック——は検出・警告はできても、修正は人間の設計判断に委ねられます。本クラスタは、無料OSS『Aegis』のscan(SAST)・RLS検証・probe(DAST)・CI(SARIF)を軸に、競合が見落とすSupabase RLSの設定ミス検出を中核に据え、何が自動で守れて、何が監査・設計を要するのかを正直に切り分けます。経済産業大臣賞のB2B SaaS、本番二重課金0件の決済基盤の知見を根拠に、速く・安く・安全に作るための判断材料を提供します。

22 articles in total

Foundational guide

Foundational guide (start here)

Next.js
Supabase
RLS
セキュリティ
TypeScript

Next.js × Supabase Application Security Complete Guide — Protecting Authorization and RLS with Vulnerability Detection and Defense in Depth

The overall picture of security for AI-mass-produced Next.js × Supabase apps. We divide it into automatable horizontal controls (CSP, rate limiting, CSRF, Zod validation), injection detected by static analysis (SQLi/SSRF/XSS), and vertical risks only design can close (authorization/IDOR, RLS, tenant isolation), and systematize how to protect with 3 detection layers and defense in depth.

22 min read

Related practical articles