プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Rls Doctor

作者:subhajitluckyバージョン 0.5.8i★ 0iパソコンで動くリポジトリ ↗
レジストリ名io.github.subhajitlucky/rls-doctor

インストール方法

What it does

Read-only Postgres/Supabase RLS audit with a rolled-back probe that proves who can read which rows.

  • Connects パソコンで動く
  • Account or key No key needed
  • Category データベース・データセット

一緒に使える

この種の作業を AI に教える Skill。これと一緒に使えます

timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

作者:google-research★ 35,6291 個の skill

Skill · 手順書

Shadowbroker

Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…

作者:BigBodyCobain★ 11,6021 個の skill

Skill · 手順書

google-maps-scraper

scrape data from Google Maps. Extracts data such as the name, address, phone number, website URL, rating, reviews number, latitude and longitude, reviews,email and more for each place

作者:gosom★ 8,2091 個の skill

Skill · 手順書

この順位の理由

一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり

人気0/80GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます
新しさ12/1230 日以内のリリースかコード更新で満点
応答中0/8前回の確認でクラウドのエンドポイントが応答
利用スコア12/100

品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: データなし (「急上昇」タブでのみ使用)

インストール

使っているAIアプリを選んで、設定をコピーしてください。

ひとことで AI にインストールしてもらう

Rls Doctor をインストールして。https://mcp.popnx.com/i/subhajitlucky-rls-doctor.md に従い、コマンドを見せて、私が OK するまで実行しないで。

パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月14日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server Rls Doctor を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "rls-doctor": { "command": "npx", "args": [ "-y", "rls-doctor" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Rls Doctor のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "rls-doctor": {
          "command": "npx",
          "args": [
            "-y",
            "rls-doctor"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    Rls Doctor を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が Rls Doctor を使っていると言うか、回答に Rls Doctor のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ Rls Doctor につなげません

Rls Doctor はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · Rls Doctor につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · データベース・データセット の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server Rls Doctor を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user rls-doctor -- npx -y rls-doctor 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Rls Doctor のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user rls-doctor -- npx -y rls-doctor
  4. Claude Code で /mcp と入力

    Rls Doctor が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    Rls Doctor を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が Rls Doctor を使っていると言うか、回答に Rls Doctor のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server Rls Doctor を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "rls-doctor": { "command": "npx", "args": [ "-y", "rls-doctor" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Rls Doctor のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    Rls Doctor を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が Rls Doctor を使っていると言うか、回答に Rls Doctor のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server Rls Doctor を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "rls-doctor": { "type": "stdio", "command": "npx", "args": [ "-y", "rls-doctor" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Rls Doctor のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    Rls Doctor を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が Rls Doctor を使っていると言うか、回答に Rls Doctor のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?Rls Doctor を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user rls-doctor -- npx -y rls-doctor

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "rls-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "rls-doctor"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "rls-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "rls-doctor"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "rls-doctor": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "rls-doctor"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
97/週
接続方法
パソコンで動く
最新バージョンi
0.5.8
レジストリ公開日i
2026年10月11日
コードの最終更新i
2026年11月13日
作者
subhajitlucky
パッケージ
npm: rls-doctor
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月19日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント subhajitlucky で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:6 日前

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

OSV.dev に rls-doctor@0.5.8 の登録はありません

このバージョンのパッケージ本体のみ確認。すべての依存関係ではありません · 確認日 2026年11月16日

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/subhajitlucky-rls-doctor.svg)](https://mcp.popnx.com/en/servers/subhajitlucky-rls-doctor)

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

データベース・データセットのほかのサーバーとの比較i

  • このカテゴリのほかの1235件のうち0%よりスターが多い
  • このカテゴリのほかの1235件のうち55%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1235件のうち99%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Rls Doctorは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は6 日前、最新バージョン(0.5.8)がレジストリに届いたのは39 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:QueryWeaver, Supabase, Neon, DBCode, Keboola MCP

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Supabase

MCP server for interacting with the Supabase platform

作者:supabase広く使われている↓ 24.6万/週★ 3018 リポジトリ全体のスター昨日更新

パソコンでもクラウドでも✓ 提供元 · supabase.com

Neon

Official Neon MCP server for managing Neon projects and Lakebase Postgres databases.

作者:neondatabase成長中★ 66613 日前更新

クラウドで動く✓ 提供元 · neon.com

DBCode

Query and explore 100+ databases through your DBCode connections.

作者:dbcodeio初期↓ 118/週★ 368 リポジトリ全体のスター2 か月前更新

パソコンで動く✓ 提供元 · dbcode.io

Keboola MCP

Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

作者:keboola成長中↓ 1421/週★ 843 日前更新

パソコンでもクラウドでも✓ 提供元 · keboola.com
似たものと比べる
これ
Rls Doctor
QueryWeaverSupabaseNeonDBCodeKeboola MCP
動く場所パソコンにインストールが必要パソコンにインストールが必要クラウドでもパソコンにインストールでも使えるクラウドで動き、インストール不要パソコンにインストールが必要クラウドでもパソコンにインストールでも使える
キーが必要いいえいいえはいいいえいいえいいえ
Claude で + から追加いいえいいえはいはいいいえいいえ
基本チェック3/33/35/55/52/35/5
ライセンスMITAGPL-3.0Apache-2.0MITNOASSERTIONMIT
料金登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

RLS Doctor

Don't trust your RLS. Prove it.

Can user A read user B's rows? Row Level Security is one of Postgres's strongest isolation tools, and one of the easiest to leave half-configured. You enable RLS, add a policy, and move on — but policies OR-combine, WITH CHECK silently falls back to USING, table owners bypass RLS entirely, and TRUNCATE is never protected at all.

rls-doctor reads your catalog and tells you what's actually reachable. And with probe, it stops analyzing and just *shows you*, impersonating your app roles in a transaction it always rolls back.

npx rls-doctor check    # reads DATABASE_URL or SUPABASE_DB_URL

npx rls-doctor demo # no database needed: disposable Postgres, proven leak

RLS Doctor Report

Generated: 2026-07-12T00:00:00.000Z Schemas: public

Summary: 1 tables, 0 policies, highest risk HIGH Findings: critical 0, high 1, medium 0, low 0, info 0 RLS Score: 90/100

public.orders RLS disabled; force RLS disabled; 0 policies [HIGH] RLS-disabled table is reachable by an application role public.orders has no row-level checks; Application role authenticated and can exercise SELECT granted to authenticated. Fix: Enable RLS and add least-privilege policies for each application role. Suggested SQL: alter table "public"."orders" enable row level security;


Prove a cross-tenant leak instead of guessing

Most RLS review is reading policies and hoping. probe is behavioral:

rls-doctor probe --connection "$DATABASE_URL" --schema public \

--app-roles authenticated --subjects \ 00000000-0000-0000-0000-000000000001 \ 00000000-0000-0000-0000-000000000002

It sets request.jwt.claims inside the transaction, so auth.uid() resolves to each real Supabase user, then counts whose rows that identity can read.

- [high] probe-cross-owner-read rls_doctor_demo.orders:

Role authenticated reads rows across 2 distinct owner_id values

  • [high] probe-cross-subject-read rls_doctor_demo.orders: Role authenticated reads rows belonging to other users

It never mutates anything. probe opens begin ... read only and always rolls back — safe against a production read replica.

Install

npx rls-doctor check              # no install

npm install -g rls-doctor # global

Requires Node.js 20 or later. Prefer DATABASE_URL or SUPABASE_DB_URL with read-only audit credentials — passing a secret via --connection exposes it in shell history and process listings.

Commands

CommandWhat it does
checkAudit one or more schemas
explain Full detail on a single table
probeImpersonate app roles and prove actual row access
shadowReplay migrations in a disposable Postgres and compare static vs live
proveProve isolation claims offline: proofs, witnesses, or undecided
fixGenerate a repair and verify it in shadow before writing it
demoSpin up a disposable Postgres and prove a cross-tenant leak
mcpServe read-only MCP tools over stdio
rls-doctor check --schema public --fail-on high

rls-doctor explain public.profiles rls-doctor probe --app-roles authenticated --owner-columns tenant_id

check options
-c, --connection <url>       Postgres connection string

-s, --schema Schemas to audit. Default: public --json Machine-readable JSON --format text, json, or sarif. Default: text --fail-on info, low, medium, high, critical, none. Default: high --baseline Compare with a prior JSON report; only new findings fail --update-baseline Write the current report to --baseline and exit 0 --schema-file Audit a SQL schema or migration file offline; no database --receipt Write a portable coverage receipt (digest-verified) --receipt-key Sign the receipt with an Ed25519 private key (PEM) --score Print only the RLS Score --badge Print a shields.io badge URL for the RLS Score --statement-timeout Catalog query timeout. Default: 10000 --app-roles Extra roles to treat as reachable application identities

On generic Postgres (not Supabase), pass your real roles so grants and memberships through them are analyzed at the same severity as authenticated:

rls-doctor check --connection "$DATABASE_URL" --app-roles app_user web_user --fail-on high
probe options
--app-roles <role...>        Roles to impersonate (required)

--subjects Supabase user ids to simulate via request.jwt.claims --owner-columns Owner/tenant columns to compare (default: owner_id user_id tenant_id account_id) --sample-limit Rows sampled per table (default: 1000)

Probe findings: probe-cross-owner-read and probe-cross-subject-read (High), probe-role-unavailable (Medium), probe-error (Low), plus informational probe-reads-rows, probe-subject-reads-own-rows, probe-reads-no-rows, and probe-read-denied.

What it catches

CheckSeverityWhy it matters
Public-like unconditional writeCriticalA public/anon policy with an unconditional predicate for INSERT, UPDATE, DELETE, or ALL
Reachable TRUNCATEHighRLS never protects TRUNCATE
RLS disabled and reachableHighAn app-facing role has row access plus schema USAGE, or can SET ROLE to a superuser, with no row checks
Public-like unconditional readHighpublic/anon policy with unconditional USING for SELECT/ALL
Application path to SUPERUSER/BYPASSRLSHighThese attributes bypass RLS even with FORCE enabled
Broad default table privilegeHigh writes / Medium readsFuture tables created by that owner inherit the privilege
Omitted WITH CHECKMediumThe write constraint silently falls back to USING
RLS enabled with no policiesMediumNon-owner roles are default-denied; app access breaks
Multiple permissive policiesMediumPolicies for the same role/command are OR-combined
RLS disabled, not currently reachableMediumA later grant can expose the table
FORCE RLS disabledInfoThe table owner bypasses RLS

Checks follow PostgreSQL command semantics: SELECT evaluates USING; INSERT evaluates WITH CHECK; DELETE evaluates USING; UPDATE evaluates both. When an UPDATE or ALL policy omits WITH CHECK, Postgres falls back to its USING expression — and rls-doctor analyzes that *effective* check. ALL is evaluated as each applicable command.

It follows direct, inherited, and SET ROLE membership paths (including PostgreSQL 16 per-membership options; 15 is normalized), and reports current access separately from default privileges affecting future tables.

Ecosystem study

We statically audited the migrations of 60 public Supabase projects: 63% contain at least one high or critical RLS pattern (median score 38/100), with coverage limitations reported honestly in 57% of them. Aggregate, anonymized, reproducible — read the report and the disclosure policy.

GitHub Action

Findings land in the Security tab.

permissions:

contents: read security-events: write

steps:

  • uses: actions/checkout@v5
  • uses: subhajitlucky/rls-doctor@v0.3.1 with: connection: ${{ secrets.READONLY_DATABASE_URL }} schema: public format: sarif upload: "true" fail-on: high app-roles: authenticated app_user

SARIF results carry logicalLocations (schema.table) and stable partialFingerprints, so code scanning tracks findings across runs even though tables aren't files.

Or run it in CI without the Action

name: RLS Audit

on: pull_request: branches: [main]

jobs: rls-audit: runs-on: ubuntu-latest steps:

  • uses: actions/checkout@v5
  • uses: actions/setup-node@v5 with: node-version: 22.x
  • run: npx rls-doctor check --schema public --json --fail-on high env: DATABASE_URL: ${{ secrets.READONLY_DATABASE_URL }}

Full guide: docs/guides/github-actions.md

Baselines

Adopt on an existing database without failing on day one:

rls-doctor check --schema public --baseline rls-baseline.json --update-baseline

rls-doctor check --schema public --baseline rls-baseline.json --fail-on high

Fingerprints derive from finding id, schema, table, and detail — so a changed predicate or privilege correctly re-reports as new. JSON reports include baseline: { new, unchanged, resolved }.

RLS Score

Every report carries a deterministic score: 100 minus severity penalties — critical 25, high 10, medium 4, low 1, info 0 — clamped to 0–100. Bands: green ≥ 80, yellow ≥ 50, red < 50. The score never replaces the report: inspect the findings before calling a database safe.

rls-doctor check --score    # RLS Score: 34/100

rls-doctor check --badge # https://img.shields.io/badge/RLS%20Score-34%2F100-red

--score and --badge print only the score or badge; exit codes still follow --fail-on. JSON reports always include the score object with its findingPenalty breakdown.

Audit migrations without a database

check --schema-file reconstructs table, policy, RLS, grant, role, and default-privilege state from a SQL file — no connection, no credentials. Unsupported statements become coverage limitations instead of guessed findings, and the RLS Score carries the offline coverage penalty.

rls-doctor check --schema-file supabase/migrations/0001_init.sql --fail-on high

Supported: CREATE SCHEMA/TABLE/ROLE/USER/POLICY, ALTER TABLE RLS and FORCE ROW LEVEL SECURITY, GRANT/REVOKE on tables, schemas, and roles, ALTER DEFAULT PRIVILEGES, DROP of the same, and unconditional role creation inside DO blocks.

Shadow verification

shadow replays your migration files in a disposable PostgreSQL container, runs the real catalog audit — and probe when seed data is provided — then compares the offline analysis with the database's actual state:

rls-doctor shadow --schema-file supabase/migrations/*.sql --seed seed.sql --fail-on high
  • Prints how many findings matched between static and live analysis, and lists any disagreement in either direction — a parser-coverage fact, never a guessed finding.
  • The container is always removed; the audited database is never touched.
  • --receipt writes a receipt marked scope=shadow and environment: shadow (disposable world).

Formal proof mode

prove decides row-isolation claims from a schema file within a small, sound fragment — no database needed:

rls-doctor prove --schema-file supabase/migrations/0001_init.sql --table orders

For each table, command, and role it returns one of:

  • proved — every row the policies admit satisfies owner_col = auth.uid() (or the policies admit no rows at all)
  • witness — the policies can admit rows outside the ownership boundary, with the reason stated (using (true), RLS disabled, mismatched columns)
  • undecided — outside the decidable fragment (NOT, subqueries, casts, function calls); listed with the rea

冒頭だけを表示しています。続きはリポジトリで読めます