Command-line tool: sqlguardllm check

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cli, python
Ambito
cli

Direzione di ricerca

The new subcommand belongs in src/sqlguardllm/cli.py, with tests in tests/test_cli.py that invoke it through subprocess. Start by reading how the existing policy and rewrite functions are called, and check the dependency on #11 before building on it. Done means exit codes 0, 1 and 2 behave as specified, --format json produces machine-readable output, and the console entry point is installed.

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

Descrizione

area:cli size:s type:feature
Goal

Try policies from the terminal and use sqlguardllm in CI pipelines.

Acceptance criteria
  • sqlguardllm check --policy FILE [--context JSON] [--dialect D] [SQL | -] reads the SQL from the argument or stdin
  • Exit code 0 when allowed (prints the rewritten SQL), 1 on violations (prints them), 2 on usage or policy errors
  • --format json output for machines
  • Console entry point installed by the package; tests run it with subprocess
Relevant files
  • src/sqlguardllm/cli.py
  • tests/test_cli.py
Size

S (up to half a day)

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.