Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

De-fork spike S3: HardPolicy kill gate (non-bypassable DDL denies at every dispatcher)

オープン
#1,017 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
shell, sql, typescript
領域
security, tooling

調査の方向性

まず packages/opencode/src/altimate/policy/hard-policy.ts と、session/prompt.ts、session/tools.ts、tool/batch.ts、effect/app-runtime.ts で指定されている dispatcher の箇所を読みます。18 テストのバイパスマトリクスを実行します。完了の条件は、一覧にあるすべての dispatcher が hook 後の最終引数を検査し、拒否が fail closed かつ terminal に失敗し、監査オラクルが通ることです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
813
フォーク
134
平均マージ
2日 3時間
マージ済み PR(30日)
65

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。