Guard.explain(): what a query reads, in data and in words

Aperta
#27 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, sql
Ambito
security

Direzione di ricerca

Start in src/sqlguardllm/explain.py and tests/test_explain.py, and read how Guard validates and rewrites SQL, since explain() must report the same tables, filters, masks, limit and violations. Issue #10 is listed as a dependency, so check whether it is merged before designing the Explanation structure. Done means Guard.explain covers joins, subqueries, CTEs and rejected queries, and to_text produces the English and Spanish sentences shown in the issue, with tests for each case.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:core size:m type:feature
Goal

Show users, auditors and UIs what a query will read before or after running it.

Acceptance criteria
  • Guard.explain(sql, context) returns tables, columns read per table, row filters and masks that apply, the limit and any violations
  • Explanation.to_text(language) in English and Spanish, e.g. "Reads branches.name and the sum of invoices.total for branches 1 and 2, up to 1000 rows"
  • Works for rejected queries too, listing why
  • Tests for joins, subqueries, CTEs and rejected queries
Relevant files
  • src/sqlguardllm/explain.py
  • tests/test_explain.py
Size

M (1-2 days)

Notes
Lingua principale
Python
Stelle
0
Fork
0
Merge medio
1m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jmmana/sqlguardllm

Tutte le issue di jmmana/sqlguardllm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.