Repository navigation
Description
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_shelland a toolchain preset that allowsgitand refusesbash. - THEN The test shows that the
Shellallowsgitand refusesbash.
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.shandgit grep foowith the neutral preset. - THEN The test shows that
uv run bash x.shis refused andgit grep foois 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_TOOLSatsrc/devops_cli/roadmap/runner_tools.py:126and is not inNOT_IN_RUNNERatsrc/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
- WHEN The test data holds each case of the policy test file at the commit before refactor(roadmap): run implement on stock Coder with a real shell #6527, and a test replays each case against the devops-cli preset.
- THEN The test shows the same allowed or refused decision for each 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_shellinsrc/devops_cli/roadmap/implement/implement_shell.pybuilds the shell. It builds the stock harnessShellwith no allowed command, no refused command and no refused operator.implement_step.pycalls 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_TOOLSatsrc/devops_cli/roadmap/runner_tools.py:126names the programs of the runner image.NOT_IN_RUNNERatsrc/devops_cli/roadmap/runner_tools.py:254names 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.mdstates 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.pyalready 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_TOOLSandNOT_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.pynext toRUNNER_TOOLS.RUNNER_TOOLSis a fact of the image, and the preset is a fact of a toolchain.
- 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
- 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.mdstates 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.
- Rejected: Security control.
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 29, 2026
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.
devops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Dec 1, 2026
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.