Skip to content

playbook run --help says --allow-shell implies --yes; the runtime requires both flags #503

Description

@explosivebit

What is wrong

The help text and the runtime disagree about the shell-exec security gate on playbook run.

Help text (clap registry, crates/forgeplan-cli/src/main.rs:984-988):

--allow-shell ... default-deny gate for the CWE-78 surface. Implies --yes. Alternative:
set [playbook] allow_shell = true in workspace config.yaml

Runtime (crates/forgeplan-cli/src/commands/playbook.rs:376): --yes is required independently of
--allow-shell. A non-dry-run without it exits 2 with
playbook run requires --yes confirmation (ADR-009 security gate).

The doc comment directly above that function (playbook.rs:360-367) records the PROB-053 audit
Round 7 decision to keep the two flags independent - the earlier let yes = yes || allow_shell
shadow collapsed two distinct risk acknowledgements into one toggle. The help string was not
updated when the shadow was removed.

Evidence

  • help string: main.rs:984-988; runtime gate: playbook.rs:376; rationale: playbook.rs:360-367
  • shell permission is decided solely by self.config.allow_shell
    (crates/forgeplan-core/src/playbook/executor.rs:306), and the dispatcher takes a single
    allow_shell: bool (crates/forgeplan-core/src/playbook/dispatch/mod.rs:215)
  • website/src/content/docs/docs/cli/playbook-run.md documents the runtime behaviour and flags the
    help-text discrepancy rather than repeating the claim

Fix

Either drop "Implies --yes" from the flag description, or restore the implication. Given the
Round 7 rationale, dropping it matches the intent: two flags, two acknowledgements.

Revisit trigger

Act before any release whose notes mention the playbook security gate - the wrong sentence is the
one a user reads when deciding whether their invocation is safe.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions