Required filters: a table must be filtered on one of its columns
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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 theJOIN ... ON) that references one of the columns - New violation code
missing_required_filternaming the table and the columns - Corpus cases: missing, present in
WHERE, present inON, inside a CTE
Relevant files
src/sqlguardllm/rules/required_filters.pysrc/sqlguardllm/policy.pytests/corpus/required_filters.yaml
Size
S (up to half a day)
Notes
- Depends on: #4
- Milestone: v0.3 · More power
- Design: docs/DESIGN.md · threat model · attack gallery
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jmmana/sqlguardllm
-
area:security good first issue size:s type:feature
Difficulty 2/5 Half a day Newbie friendliness 68/100
jmmana/sqlguardllm#16 ·
-
area:integrations size:s type:feature
Difficulty 4/5 Half a day Newbie friendliness 25/100
jmmana/sqlguardllm#38 ·
-
area:security size:m type:infra
Difficulty 4/5 1-2 days Newbie friendliness 30/100
jmmana/sqlguardllm#37 ·
-
area:integrations help wanted size:m type:feature
Difficulty 4/5 3-5 days Newbie friendliness 30/100
jmmana/sqlguardllm#36 ·
-
area:integrations help wanted size:m type:feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
jmmana/sqlguardllm#35 ·
All issues in jmmana/sqlguardllm
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vllm-project/vllm#70030 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TigreGotico/tugaphone#408 ·
Maintainers usually reply within 1 day
-
t: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Azure/azure-sdk-for-python#50155 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day