-
Notifications
You must be signed in to change notification settings - Fork 75
docs(cli): document commandBlocklist hard command-rejection setting #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,7 +106,11 @@ Below is the full schema for org-managed settings. These are configured by org a | |
| </ResponseField> | ||
|
|
||
| <ResponseField name="commandDenylist" type="string[]"> | ||
| Shell command patterns that are always denied (accumulated across levels). | ||
| Shell command patterns that are always denied (accumulated across levels). A denied command still runs if the user explicitly approves it. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Reword The schema currently says commands are “always denied” but then immediately notes they can still run if explicitly approved, which reads contradictory and blurs the line with |
||
| </ResponseField> | ||
|
|
||
| <ResponseField name="commandBlocklist" type="string[]"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1] Add missing This page states the |
||
| Shell command patterns that can never run (accumulated across levels). Unlike the denylist, blocked commands have no approval path: the block holds even under full autonomy, auto-run, or `--skip-permissions-unsafe`. droid resolves the actual program being invoked before matching, so a blocked command cannot be bypassed with a wrapper shell, an absolute path, quoting tricks, or command substitution. Use this for organization-mandated hard stops. | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="customModels" type="object[]"> | ||
|
|
@@ -418,6 +422,7 @@ Again, users cannot override these rules; they can only choose safer personal de | |
| "ideAutoConnect": true, | ||
| "commandAllowlist": ["npm *", "yarn *", "pnpm *", "make *"], | ||
| "commandDenylist": ["rm -rf /", "sudo *"], | ||
| "commandBlocklist": ["shutdown", "mkfs", "curl"], | ||
| "customModels": [ | ||
| { | ||
| "model": "my-internal-model", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,17 +31,22 @@ ExecuteコマンドとMCPツールにはリスクレベル(`low`、`medium`、 | |
| - **常に許可** – 「常に許可」を選ぶと、そのプロンプトに必要なレベルまで現在の自律レベルが引き上げられます。サンドボックスの「常に許可」オプションは、代わりに許可されたパスやドメインを永続化します。 | ||
| - **仕様承認** – Spec Modeのプランを承認するときは、現在の自律レベルを維持する**実装を進める**を選ぶか、実装用に利用可能なLow、Medium、Highを選択します。組織の最大自律レベルによっては、より高い選択肢が表示されない場合があります。 | ||
|
|
||
| ## コマンドallowlistとdenylist | ||
| ## コマンドallowlist、denylist、blocklist | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1] JP autonomy rules omit blocklist In the JP guide, the “レベルを選ぶ” sentence and the allowlist bullet still mention only denylist/sandbox as exceptions for automatic execution, but |
||
|
|
||
| ユーザープロファイル、プロジェクト、ローカルのプロジェクト上書き、またはネストされたフォルダごとのコマンドポリシーを定義するには、[設定](/jp/cli/configuration/settings)の`commandAllowlist`と`commandDenylist`を使用します。 | ||
| ユーザープロファイル、プロジェクト、ローカルのプロジェクト上書き、またはネストされたフォルダごとのコマンドポリシーを定義するには、[設定](/jp/cli/configuration/settings)の`commandAllowlist`、`commandDenylist`、`commandBlocklist`を使用します。 | ||
|
|
||
| - allowlistのエントリは、そのスコープでは低リスクとして扱われます。 | ||
| - denylistのエントリは、常にallowlistより優先されます。 | ||
| - どちらのリストにも含まれないコマンドは、現在の自律レベルとコマンド制限に従います。 | ||
| - denylistのエントリは、常にallowlistより優先されます。拒否されたコマンドでも、明示的に承認すれば実行できます。 | ||
| - blocklistのエントリは絶対に実行されません。承認のプロンプトはなく、完全自律、自動実行、`--skip-permissions-unsafe`のいずれの場合でもブロックが適用されます。承認に関係なくハードストップすべきコマンドに使用してください。 | ||
| - いずれのリストにも含まれないコマンドは、現在の自律レベルとコマンド制限に従います。 | ||
| - 組織管理の設定が最優先されます。ローカル設定やプロジェクト設定でリポジトリやマシン向けのデフォルトを追加できますが、組織のコマンドポリシーを弱めたり、組織の最大値を超えて自律レベルを上げたりすることはできません。詳細は[階層設定と組織管理](/jp/enterprise/hierarchical-settings-and-org-control)を参照してください。 | ||
|
|
||
| 組み込みのdenylistには、ファイルシステムの消去、ディスク初期化、シャットダウンコマンド、fork bomb、広範な権限・所有者変更など、一般的な破壊的パターンが含まれます。リポジトリに追加の危険なスクリプトやデプロイ経路がある場合は、プロジェクト固有のコマンドを追加してください。 | ||
|
|
||
| <Warning> | ||
| blocklistは承認では回避できないため、利用可能な最も強力な制御です。droidは照合前に実際に呼び出されるプログラムを解決するため、ラッパーシェル(例:`bash -c "…"`)、絶対パス、クォートのトリック、コマンド置換でブロックされたコマンドを回避することはできません。 | ||
| </Warning> | ||
|
|
||
| ## レベルを変更する | ||
|
|
||
| - `Ctrl+L`で`Off → Low → Medium → High → Off`の順に切り替えます。組織ポリシーで利用可能な最高レベルが制限される場合があります。 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,7 +88,11 @@ User → ~/.factory/ | |
| </ResponseField> | ||
|
|
||
| <ResponseField name="commandDenylist" type="string[]"> | ||
| 常に拒否されるシェルコマンドパターン(レベル間で累積) | ||
| 常に拒否されるシェルコマンドパターン(レベル間で累積)。拒否されたコマンドでも、ユーザーが明示的に承認すれば実行できます。 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] JP In the JP schema, |
||
| </ResponseField> | ||
|
|
||
| <ResponseField name="commandBlocklist" type="string[]"> | ||
| 絶対に実行されないシェルコマンドパターン(レベル間で累積)。拒否リストとは異なり、ブロックされたコマンドには承認の手段がありません。完全自律、自動実行、`--skip-permissions-unsafe`のいずれの場合でもブロックが適用されます。droidは照合前に実際に呼び出されるプログラムを解決するため、ラッパーシェル、絶対パス、クォートのトリック、コマンド置換で回避することはできません。組織が義務付けるハードストップに使用してください。 | ||
| </ResponseField> | ||
|
|
||
| <ResponseField name="customModels" type="object[]"> | ||
|
|
@@ -399,6 +403,7 @@ Factoryは、従来の「上書き」動作ではなく、**拡張のみ**のセ | |
| "ideAutoConnect": true, | ||
| "commandAllowlist": ["npm *", "yarn *", "pnpm *", "make *"], | ||
| "commandDenylist": ["rm -rf /", "sudo *"], | ||
| "commandBlocklist": ["shutdown", "mkfs", "curl"], | ||
| "customModels": [ | ||
| { | ||
| "model": "my-internal-model", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Mention blocklist in autonomy-level rules
The earlier Autonomy Level rules still describe auto-execution as being gated by risk level plus denylist/sandbox approval, but
commandBlocklistis a hard stop with no approval path. Consider updating those earlier sentences/bullets to explicitly include blocklist as another reason a command will not run, even when risk <= Autonomy Level or the command is allowlisted.