Policy files in YAML and JSON with a published JSON Schema

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
json, python, yaml
Domain
backend

Research direction

Start in src/sqlguardllm/policy.py, where Policy.from_file() and Policy.from_dict() would need to accept YAML and JSON input, and read examples/policy.yaml to see the expected shape. The YAML dependency belongs in an optional sqlguardllm[yaml] extra, so the core runtime stays sqlglot-only. schema/policy.schema.json must be generated and must reject unknown keys with the key path in the error. Done means the valid and invalid policy file tests pass. This issue depends on #2, so check that it is merged first.

Written by the indexing model from the issue text.

Description

area:core size:s type:feature
Goal

Let teams keep policies in version control and review them like code.

Acceptance criteria
  • Policy.from_file() and Policy.from_dict() load examples/policy.yaml; YAML support through the optional extra sqlguardllm[yaml] so the runtime stays sqlglot-only
  • JSON Schema generated to schema/policy.schema.json; unknown keys are errors that name the key path
  • Tests for valid and invalid files
Relevant files
  • src/sqlguardllm/policy.py
  • schema/policy.schema.json
  • examples/policy.yaml
Size

S (up to half a day)

Notes
Dominant language
Python
Stars
0
Forks
0
Avg merge
1m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jmmana/sqlguardllm

All issues in jmmana/sqlguardllm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.