Skip to content

docs(cli): document commandBlocklist hard command-rejection setting#1210

Open
shashank-factory wants to merge 1 commit into
mainfrom
ssharma/docs-command-blocklist
Open

docs(cli): document commandBlocklist hard command-rejection setting#1210
shashank-factory wants to merge 1 commit into
mainfrom
ssharma/docs-command-blocklist

Conversation

@shashank-factory

Copy link
Copy Markdown
Contributor

Summary

Documents the new commandBlocklist CLI setting (hard command rejection) that ships in the factory-mono PR for cli-791. Blocklisted commands can never run: there is no approval prompt and the block holds even under full autonomy, auto-run, or --skip-permissions-unsafe. Enforcement resolves the actual program being invoked, so wrapper shells, absolute paths, quoting tricks, and command substitution cannot bypass it.

Changes

  • docs/cli/configuration/settings.mdx – new settings-table row, renamed "Command allowlist, denylist & blocklist" section, commandBlocklist bullet, precedence note (blocklist > deny/allow), and example JSON.
  • docs/cli/user-guides/auto-run.mdx – command-policy bullets updated + a <Warning> explaining bypass resistance.
  • docs/enterprise/hierarchical-settings-and-org-control.mdxcommandBlocklist ResponseField in the org-managed settings schema + org example JSON.
  • Mirrored all of the above in the jp/ counterparts.

Notes

Paired with the implementation + review-remediation PR in factory-mono (branch ssharma/cli-791-add-hard-command-rejection-rules-without-approval). No behavior changes here; docs only.

Add the new commandBlocklist option (hard-blocked commands that can never
run, even under full autonomy/auto-run/--skip-permissions-unsafe) alongside
the existing allowlist/denylist docs:

- cli/configuration/settings.mdx: settings table row, section rename, bullet,
  precedence note, and example JSON
- cli/user-guides/auto-run.mdx: command-policy bullets + bypass-resistance
  warning
- enterprise/hierarchical-settings-and-org-control.mdx: ResponseField +
  org example
- mirrored all of the above in the jp/ counterparts
@factory-droid

factory-droid Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Droid finished @shashank-factory's task —— View job


Security Review

The new commandBlocklist docs are clear and consistent across EN/JP. A couple of earlier autonomy-level lines still omit the hard-stop behavior, and the EN enterprise schema appears incomplete (missing wikiCloudSync), so small wording/schema tweaks would prevent confusion between denylist and blocklist.

@mintlify

mintlify Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
factory 🟢 Ready View Preview Jun 9, 2026, 10:33 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

- **Spec approval** – When approving a Spec Mode plan, choose **Proceed with implementation** to keep the current Autonomy Level, or choose an available Low, Medium, or High option for implementation. Organization Maximum Autonomy Level can hide higher options.

## Command allowlists and denylists
## Command allowlists, denylists, and blocklists

Copy link
Copy Markdown
Contributor

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 commandBlocklist is 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.

- **仕様承認** – Spec Modeのプランを承認するときは、現在の自律レベルを維持する**実装を進める**を選ぶか、実装用に利用可能なLow、Medium、Highを選択します。組織の最大自律レベルによっては、より高い選択肢が表示されない場合があります。

## コマンドallowlistとdenylist
## コマンドallowlist、denylist、blocklist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 commandBlocklist is an unconditional hard stop. Update those earlier lines to include blocklist so the described behavior matches what is documented below (blocklisted commands never run regardless of autonomy level or allowlist).

Shell command patterns that are always denied (accumulated across levels). A denied command still runs if the user explicitly approves it.
</ResponseField>

<ResponseField name="commandBlocklist" type="string[]">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Add missing wikiCloudSync to the “full schema”

This page states the <ResponseField> list is the full org-managed settings schema, but wikiCloudSync is referenced later on the same page and appears in the JP schema while the EN schema omits it. Add a <ResponseField name="wikiCloudSync" type="boolean">…</ResponseField> (near cloudSessionSync) so the EN schema is complete and consistent.


<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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Reword commandDenylist from “always denied” to “confirm-required”

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 commandBlocklist. Consider wording consistent with the CLI docs (for example, “always require confirmation; can run if explicitly approved”) to avoid implying a hard block.


<ResponseField name="commandDenylist" type="string[]">
常に拒否されるシェルコマンドパターン(レベル間で累積)
常に拒否されるシェルコマンドパターン(レベル間で累積)。拒否されたコマンドでも、ユーザーが明示的に承認すれば実行できます。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] JP commandDenylist wording is easy to misread as a hard block

In the JP schema, commandDenylist is described as “常に拒否される…(ただし明示的に承認すれば実行可)”, which can be confusing given commandBlocklist is the true hard stop. Align the wording with the intended semantics (“常に確認が必要…明示的に承認すれば実行可”) so denylist vs blocklist stays unambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant