Required filters: a table must be filtered on one of its columns

オープン
#24 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, sql
領域
security

調査の方向性

Start with src/sqlguardllm/rules/required_filters.py and the required_filters option in src/sqlguardllm/policy.py, and check whether #4, which this depends on, is already merged. Read the existing corpus format in tests/corpus/required_filters.yaml to see how cases are written. Done means the four corpus cases (missing, predicate in WHERE, predicate in ON, inside a CTE) pass and violations report missing_required_filter with the table and columns named.

索引モデルが issue の本文から書いたものです。

説明

area:core size:s type:feature
Goal

Force a predicate on large tables, such as a date range on a fact table, so a model can't scan everything.

Acceptance criteria
  • required_filters: {table: [columns]} policy option
  • Every occurrence of the table needs a predicate in its own WHERE (or the JOIN ... ON) that references one of the columns
  • New violation code missing_required_filter naming the table and the columns
  • Corpus cases: missing, present in WHERE, present in ON, inside a CTE
Relevant files
  • src/sqlguardllm/rules/required_filters.py
  • src/sqlguardllm/policy.py
  • tests/corpus/required_filters.yaml
Size

S (up to half a day)

Notes
主要言語
Python
スター
0
フォーク
0
平均マージ
1分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jmmana/sqlguardllm のほかの issue

jmmana/sqlguardllm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。