Aggregate-only tables with a minimum group size (k-anonymity)

Aperta
#30 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, sqlite

Direzione di ricerca

Start with the issue's dependency on #4 and the existing rule in src/sqlguardllm/rules/aggregate_only.py, then see how policy.py loads per-table options. The change adds an aggregate_only: {table: k} option, rejects raw reads with aggregate_required, and appends HAVING COUNT(*) >= k while keeping any existing HAVING. Done when tests/test_aggregate_only.py passes on SQLite and shows that groups smaller than k never come back.

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

Descrizione

area:security size:m type:feature
Goal

Allow statistics over sensitive tables while making it impossible to single out a person.

Acceptance criteria
  • aggregate_only: {table: k} policy option
  • The SELECT that reads the table may only project aggregates and GROUP BY columns; raw reads are aggregate_required (new code)
  • The guard adds HAVING COUNT(*) >= k to that SELECT, combined with any existing HAVING
  • Tests on SQLite proving that groups smaller than k never come back
Relevant files
  • src/sqlguardllm/rules/aggregate_only.py
  • src/sqlguardllm/policy.py
  • tests/test_aggregate_only.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.