De-fork spike S3: HardPolicy kill gate (non-bypassable DDL denies at every dispatcher)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- shell, sql, typescript
Hướng nghiên cứu
Bắt đầu bằng cách đọc packages/opencode/src/altimate/policy/hard-policy.ts và các vị trí dispatcher được nêu trong session/prompt.ts, session/tools.ts, tool/batch.ts và effect/app-runtime.ts. Chạy ma trận bypass gồm 18 bài kiểm thử; được xem là hoàn tất khi mọi dispatcher được liệt kê đều kiểm tra các đối số cuối cùng sau hook, các lần từ chối đều fail closed và mang tính terminal, đồng thời oracle kiểm toán đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Stage S3 of the de-fork spike — the kill gate. Enforce non-bypassable hard denies (sql_execute DDL: DROP DATABASE/SCHEMA/TRUNCATE; bash DDL) at EVERY model-invoked tool-execution dispatcher, preserving today's behavior (these already block; S3 relocates them to one audited chokepoint).
- NEW `packages/opencode/src/altimate/policy/hard-policy.ts` — pure/synchronous/total `HardPolicy.check()`; malformed args fail closed (policy_internal_error), never throws/implicit-allows. Emits a structured audit record per call (the oracle — NOT the trace).
- HardPolicy.check inserted before tool.execute at all active + latent dispatchers (D1/D2/D6 in session/prompt.ts, D3/D4 in session/tools.ts, D5 in tool/batch.ts) + fail-closed init in effect/app-runtime.ts.
- Fixes a real bypass: the fork's resolvers discarded `tool.execute.before`'s return value, so a before-hook that mutated args (SELECT -> DROP DATABASE) executed the mutation unchecked. S3 captures the post-hook FINAL args and checks THOSE.
- 18 tests (bypass matrix): allow-all config still denies; near-miss controls run; deny is terminal (execute + tool.execute.after skipped); audit oracle asserted.
This is a security boundary + the spike's decision checkpoint. HELD for human go/no-go — do not auto-merge.
- Ngôn ngữ chính
- TypeScript
- Star
- 813
- Fork
- 134
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 65
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AltimateAI/altimate-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AltimateAI/altimate-code#1359 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AltimateAI/altimate-code#1323 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
AltimateAI/altimate-code#1288 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
AltimateAI/altimate-code#1284 ·
Tất cả issue của AltimateAI/altimate-code
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100