GuardLayer

io.github.solvionholdings由 GitHub 帳號 solvionholdings 發布v1.0.1更新於 Nov 11, 2026

Security checks for Next.js + Supabase apps: code scan, read-only live DB check, fix confirmation.

已驗證Streamable HTTP可網頁執行資料庫開發者工具安全與監控

概覽

AI 產生的概覽

遠端 MCP 伺服器,為 Next.js + Supabase 應用程式做安全檢查:靜態程式碼掃描、唯讀即時資料庫檢查與修復確認。

可以做什麼
  • 掃描專案原始碼與 Supabase 遷移檔案,找出寫死的密鑰、外洩的 service role 金鑰、未啟用 RLS、未驗證的路由與不安全的重新導向
  • 取得唯讀 SQL,用來匯出 Supabase 目錄中繼資料(資料表、RLS 開關、原則、授權、觸發程序、函式、儲存桶),不讀取資料列
  • 搭配 Auth 設定檢查該快照,找出任何人可讀的資料表、過寬的原則、使用者可自行修改的角色或方案欄位,以及外露的函式
  • 帶上次的問題鍵重新檢查,查看哪些已關閉、哪些是新增、哪些仍未解決
適用情境
適合在部署 Next.js + Supabase 應用程式前、變更資料表或原則後使用,或當助理準備放寬存取權限以繞過權限錯誤時使用。
執行需求
遠端 Streamable HTTP 端點,無需安裝或套件。助理會送出它選擇掃描的原始碼檔案,以及唯讀 SQL 產生的 JSON 快照;該 SQL 需你自行在 Supabase SQL 編輯器執行,或透過 Supabase MCP 伺服器、或使用自己的存取權杖經 Supabase Management API 執行。
安裝前請注意
原始碼檔案與資料庫目錄中繼資料會傳送到 GuardLayer 伺服器,其聲明僅在記憶體中檢查後即丟棄;Auth 設定會先簡化為開關與數字。若走 Supabase Management API 路線,會涉及你的 Supabase 存取權杖,並適用 Supabase 自身的隱私條款。這些工具只做回報,修復需自行完成;伺服器建議以遷移方式修復,而不要關閉 RLS 或授權給 anon。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 GuardLayer,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.solvionholdings%2Fguardlayer/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "guardlayer": {
      "type": "http",
      "url": "https://www.guardlayer.io/api/mcp"
    }
  }
}

README

GuardLayer for Claude Code

Security check for Next.js + Supabase apps, run by your AI agent. GuardLayer scans the code, checks the live Supabase project read-only, and after a fix confirms what actually closed.

It catches the holes AI-built apps usually ship with: tables anyone can read, RLS off, policies that only check for a signed-in user (public in practice when anyone can sign up), users who can change their own role or plan, service role keys in frontend code or NEXT_PUBLIC_ / VITE_ variables, and API routes, Server Actions and Edge Functions that don't check the caller.

Install (Claude Code)

claude plugin marketplace add solvionholdings/guardlayer-pluginclaude plugin install guardlayer@guardlayer

The plugin adds the GuardLayer MCP server and a skill that tells Claude when to use it: before a deploy, after changing tables or policies, or when it's about to loosen access to get past a permission error. Then ask: "Check this app for security issues with GuardLayer."

Other MCP clients

The server is a remote MCP server over Streamable HTTP, no install needed:

https://www.guardlayer.io/api/mcp

Cursor (.cursor/mcp.json):

json
{ "mcpServers": { "guardlayer": { "url": "https://www.guardlayer.io/api/mcp" } } }

Tools

ToolWhat it does
scan_filesStatic scan of the files your agent sends. Each finding comes with the fix.
get_supabase_snapshot_sqlA read-only query for the project's catalog: table and column names, RLS flags, policies, grants, triggers, functions, bucket settings. Never rows.
check_supabase_snapshotChecks the snapshot together with your Auth settings. With previous_issue_keys it reports what closed, what's new and what's still open.

Privacy

Code and snapshots sent to the server are checked in memory and discarded. Your Supabase access token stays on your machine; Auth settings are reduced to on/off flags and numbers before they are read. See the privacy policy.

Data the plugin sends, and where

DestinationWhat is sentWhen
GuardLayer MCP server (https://www.guardlayer.io/api/mcp, the plugin's declared server)The source files the agent chooses to scan; the read-only catalog snapshot (table and column names, RLS flags, policies, grants, triggers, function and bucket settings, never rows); the project's Auth settings reduced to on/off flags and numbersWhen scan_files or check_supabase_snapshot runs
Supabase Management API (https://api.supabase.com), with the user's own access tokenThe read-only snapshot query, and a read of the project's Auth settingsOnly if the agent uses this route to run the snapshot query. The user can instead run it in the Supabase SQL editor or through the Supabase MCP server

Nothing is retained by GuardLayer. Supabase's handling of API requests is covered by Supabase's privacy policy. Usage is counted by tool name only (which tool ran, which client connected), never by content.

More: guardlayer.io/mcp · Browser version: guardlayer.io/check-supabase

來源:README.md,提交 c78dca6

工具

3

scan_files

Scan code for security issues

Static security scan of a Next.js + Supabase codebase: secrets in code or public env vars (NEXT_PUBLIC_, VITE_), service role keys in client code, RLS off or open policies in supabase/migrations, unauthenticated API routes, Server Actions and Edge Functions, unsafe redirects and more. Send source files (ts, tsx, js, jsx, sql, .env*, config files) with paths relative to the project root; skip node_modules, build output and lockfiles. Up to 300 files and 4 MB per call; split bigger projects. Files are scanned in memory and discarded.

輸入參數files必填ignore

get_supabase_snapshot_sql

Get the read-only Supabase snapshot query

Returns the read-only SQL for the live Supabase check and how to run it. It reads only catalog metadata (table and column names, RLS flags, policies, grants, triggers, SECURITY DEFINER functions, bucket settings), never table rows, and returns one JSON value.

無需輸入參數。

check_supabase_snapshot

Check a live Supabase project

Checks the JSON from get_supabase_snapshot_sql: tables anyone can read, RLS off, policies that only check for a signed-in user (public in practice when sign-ups are open), users who can update their own role or plan columns, exposed SECURITY DEFINER functions, public buckets. Pass auth_config (the project's Auth settings) when you can: it decides whether 'any signed-in user' means anyone. Pass previous_issue_keys from an earlier result to see what is closed, still open or new. Returns each issue with its SQL fix and a fix prompt.

輸入參數snapshot必填auth_configprevious_issue_keys

版本歷史

1
  1. v1.0.1最新Nov 11, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分