SS

supabase/splinter

Database management

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

294 stars 品質 70 トレンド 21PostgreSQL

supabase/splinter は [https://github.com/supabase/splinter.] からインポートされた Agent スキルの候補です

概要

supabase/splinter は [https://github.com/supabase/splinter.] からインポートされた Agent スキルの候補です

概要(AI 翻訳)

お問い合わせ

文書: https://supabase.github.io/splinter

ソースコード: https://github.com/supabase/splinter

お問い合わせ

Splinterは、Supabaseプロジェクト用の一連のlintsを維持します。 SQL クエリを使用して、一般的なデータベーススキーマの問題を特定します。 一部のlintsはPostgresプロジェクトのための一般的な目的であり、他の人はPostgres e.g. authとストレージにデータを格納するSupabase機能に特異的です。

使用法

プロジェクトをlintingだけに興味がある場合は、すべてのlintsの最新バージョンを含む単一のクエリは、splinterで利用できます。 repo ルートの sql です。

##API-exposure lints と [pgrst.db_schemas

複数のlints([auth_users_exposed]、[materialized_view_in_api]]、[foreign_table_in_api]]))は、データAPIを介して到達可能なオブジェクトをレポートするだけです。つまり、[pgrst.db_schemas]設定にリストされているスキーマ内のオブジェクトです。 PostgREST は実行時にこの値を設定しますが、‘not**’ は plain [psql] 接続に存在しません。

[pgrst.db_schemas が設定されていない場合、これらの lints は、**[public スキーマのみにデフォルトです。 プロジェクトが追加のスキーマを公開する場合、それらのスキーマがあまりにも覆われているので、これらのスキーマがlintsを実行する前に、PostgREST configに一致する値を設定してください

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

splinter (Supabase Postgres LINTER)


Documentation: https://supabase.github.io/splinter

Source Code: https://github.com/supabase/splinter


Splinter maintains a set of lints for Supabase projects. It uses SQL queries to identify common database schema issues. Some lints are general purpose for Postgres projects while others are specific to Supabase features storing their data in Postgres e.g. auth and storage.

Usage

If you are only interested in linting a project, a single query containing the latest version of all lints is availble in splinter.sql in the repo root.

API-exposure lints and pgrst.db_schemas

Several lints (e.g. auth_users_exposed, materialized_view_in_api, foreign_table_in_api) only report objects that are reachable through the Data API — that is, objects in a schema listed in the pgrst.db_schemas setting. PostgREST sets this value at runtime, but it is not present in a plain psql connection.

When pgrst.db_schemas is unset, these lints default to the public schema only. If your project exposes additional schemas, set the value to match your PostgREST config before running the lints so those schemas are covered too:

set pgrst.db_schemas = 'public, graphql_public, ...';

Without this, exposures in non-public schemas will not be reported.

Lint Interface

Each lint creates a view that returns a common interface. The interface is:

  • name (text) not null – Name of the lint
  • title (text) not null – Human readable title of the lint
  • level (text) not null – The level of issue. One of ERROR/WARN/INFO
  • facing (text) not null – Is it an internal (to supabase) or an external (user centric) lint. One of INTERNAL/EXTERNAL
  • categories (text[]) not null – Relevant tags for the issue. Any/All of SECURITY/PERFORMANCE (list may grow)
  • description (text) not null – This is a description of the lint and why its an issue
  • detail (text) not null – A text description of the issue that includes references to the specific table/column/constraint/whatever that fails the lint
  • remediation (text) optional – A reference to documentation to describe the issue and how to resolve it
  • metadata (jsonb) optional – Lint specific information, for example referenced entities, or entity types
GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add supabase/splinter
MCP 初心者?mcpskill.org のガイドから始めましょう →