Skip to content

feat(roadmap): add the implement shell tables to the toolchain preset #7685

Not planned

Description

@devops-cli-service

Split from #4645.

The implement shell has no allowlist at this commit. #6527 deleted src/devops_cli/roadmap/implement/implement_shell_policy.py, and step_shell builds the stock harness Shell with no allowed command, no denied command and no denied operator. The preset of #4635 holds the checks and commands of a toolchain, not shell programs. This part waits on #6521, which decides whether the allowlist returns. Acceptance criteria: A test shows that the devops-cli preset gives the same allowed and refused decisions as the policy before #6527 for each case in its test files. A test shows that with the neutral preset, uv run bash x.sh is refused and git grep foo is allowed. A test shows that every program of every preset is in RUNNER_TOOLS and not in NOT_IN_RUNNER. The pull request has a security section, because the allowlist is a security surface (SECURITY.md item 6).

Proposed design

Problem statement

The implement shell has no allowlist at this commit. #6527 deleted src/devops_cli/roadmap/implement/implement_shell_policy.py, and step_shell builds the stock harness Shell with no allowed command, no refused command and no refused operator. The toolchain preset of #4635 holds the checks and commands of a toolchain, not shell programs. This item waits on #6521, which decides whether the allowlist returns. This change adds the shell tables of each preset to the preset and gives them to step_shell.

Acceptance criteria

Requirement: The preset gives the shell its commands

The toolchain preset of an item SHALL hold the shell programs that its implement steps allow and refuse.

Scenario: A step takes its shell tables from the preset

  • WHEN A test builds the shell of a step with step_shell and a toolchain preset that allows git and refuses bash.
  • THEN The test shows that the Shell allows git and refuses bash.

Requirement: The neutral preset refuses a package runner

The neutral preset MUST refuse uv run bash x.sh and MUST allow git grep foo.

Scenario: Two commands under the neutral preset

  • WHEN A test decides uv run bash x.sh and git grep foo with the neutral preset.
  • THEN The test shows that uv run bash x.sh is refused and git grep foo is allowed.

Requirement: Each preset program is a runner tool

Each program of each preset MUST be in RUNNER_TOOLS and MUST NOT be in NOT_IN_RUNNER.

Scenario: Every preset program is in the runner image

  • WHEN A test reads the programs of every preset.
  • THEN The test shows that each program is in RUNNER_TOOLS at src/devops_cli/roadmap/runner_tools.py:126 and is not in NOT_IN_RUNNER at src/devops_cli/roadmap/runner_tools.py:254.

Requirement: The devops-cli preset keeps the decisions before #6527

The devops-cli preset SHALL give the same allowed and refused decision as the policy before #6527 for each case of that policy's test file.

Scenario: Replay of each policy case

Existing Tool Considered

No alternatives check has run. No open, maintained tool gives a per-toolchain list of allowed and refused shell programs. Bubblewrap (bwrap) covers the confinement that the project relies on, and HostSandbox already uses it (SECURITY.md item 6). The change adds data tables to the existing preset and one call in step_shell. The written cost to build, keep and fix that code is about 8k tokens and about 2 hours.

Key questions

  • Where does an implement step build the shell that runs a command?: step_shell in src/devops_cli/roadmap/implement/implement_shell.py builds the shell. It builds the stock harness Shell with no allowed command, no refused command and no refused operator. implement_step.py calls it. [sources: src/devops_cli/roadmap/implement/implement_shell.py, src/devops_cli/roadmap/implement/implement_step.py]
  • Which tables say that the runner image holds a program?: RUNNER_TOOLS at src/devops_cli/roadmap/runner_tools.py:126 names the programs of the runner image. NOT_IN_RUNNER at src/devops_cli/roadmap/runner_tools.py:254 names the programs that the image lacks. [sources: src/devops_cli/roadmap/runner_tools.py:126, src/devops_cli/roadmap/runner_tools.py:254]
  • Does SECURITY.md item 6 make the implement shell allowlist a security surface?: No. Item 6 is Host Sandbox Confinement: it confines model-generated shell commands in bubblewrap and names no allowlist. CONTEXT.md states that the shell of a step checks only the first word of a command and is no security boundary. [sources: SECURITY.md, CONTEXT.md]
  • Where do the shell tables of a toolchain live?: In the toolchain preset of feat(roadmap): a toolchain preset sets the implement checks #4635, next to the checks and commands of each toolchain. tests/roadmap/test_roadmap_toolchains.py already covers that preset and the runner tables. (best practice) [sources: tests/roadmap/test_roadmap_toolchains.py, src/devops_cli/roadmap/runner_tools.py:126]
    • Chosen: In the toolchain preset of feat(roadmap): a toolchain preset sets the implement checks #4635. The title and the body ask for the preset, and its test file already reads RUNNER_TOOLS and NOT_IN_RUNNER.
    • Rejected: In a new module next to implement_shell.py. A second table set splits the facts of one toolchain and needs a second test file.
    • Rejected: In runner_tools.py next to RUNNER_TOOLS. RUNNER_TOOLS is a fact of the image, and the preset is a fact of a toolchain.
  • Do the shell tables become a security control?: No. The tables give an early refusal and a clear message. The runner pod and the bubblewrap host sandbox stay the boundary of a command. (best practice) [sources: CONTEXT.md, SECURITY.md]
    • Rejected: Security control. CONTEXT.md states that the first-word shell check is no security boundary.
    • Chosen: Early refusal, with the runner as the boundary. The runner pod and the bubblewrap host sandbox confine the command, so the tables only refuse a program early.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6521

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 29, 2026
  2. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  3. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  4. dan-petty commented on Dec 1, 2026

    @dan-petty
    Owner

    Superseded by the owner decisions of 2026-12-01: the Service jobs give the agent a project-neutral prompt, and the pre-commit hooks of the repository and its pull request CI are the only checks. The toolchain presets and the devops ci command are deleted. See #8040 (implement and fix jobs) and #8039 (stage job). This item extends the toolchain presets.

  5. removed
    status/new
    on Dec 1, 2026
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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions