Rule 5: hidden columns in every clause and through stars

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sql
Lĩnh vực
database, security

Hướng nghiên cứu

Start with src/sqlguardllm/rules/columns.py and its tests in tests/rules/test_columns.py, and check whether #4 (its dependency) is merged. Walk the select list, WHERE, join conditions, GROUP BY, HAVING, ORDER BY and window clauses to see where a hidden column can slip through, including * and t.* expansion. Done means gallery cases 22-24 are rejected as hidden_column, both the no-schema and Policy.schema modes have tests, and aliases resolve.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:core area:security size:m type:feature
Goal

A hidden column can't be read, filtered, sorted or reached through * (docs/DESIGN.md#5-columns).

Acceptance criteria
  • A hidden column referenced in the select list, WHERE, JOIN ... ON, GROUP BY, HAVING, ORDER BY, window clauses or subqueries → hidden_column (gallery cases 22-24)
  • * and t.* over a source with hidden columns → hidden_column
  • Without Policy.schema, unqualified columns that match a hidden column name of any source in scope are rejected; with Policy.schema, columns are qualified with sqlglot.optimizer.qualify and checked exactly (tests for both modes)
  • Table and column aliases (c.email AS contact) are resolved
Relevant files
  • src/sqlguardllm/rules/columns.py
  • tests/rules/test_columns.py
Size

M (1-2 days)

Notes
Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
1 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jmmana/sqlguardllm

Tất cả issue của jmmana/sqlguardllm

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.