Skip to content

fix(cli): docker sandbox and test sandbox dry runs check the workspace as the real run does #1383

Closed

Description

@dan-petty

Problem

#1115 made the sandbox workspace check request-free: it reads the engine endpoint from DOCKER_HOST or the default socket without the egress lookup (DockerEngineService.configured_host()), and devops sandbox deploy --dry-run now runs the check. devops docker sandbox --dry-run and devops test sandbox --dry-run still return before validating the workspace, so a dry run of either command can report success for a workspace that the real run refuses (a directory holding the engine socket, the user's runtime directory, a system path).

Acceptance criteria

  • devops docker sandbox --dry-run and devops test sandbox --dry-run run validate_sandbox_workspace and refuse every workspace the real run refuses, each with its own error type (DockerSandboxError).
  • The dry runs still make no request: a test with DOCKER_HOST=tcp://example.com:2375 and private networks disallowed records no host lookup and no client call.
  • Tests reuse _REFUSED_WORKSPACES (tests/test_sandbox_lifecycle.py) for both dry runs; each call phase stays under 1 s and uv run devops ci passes.
  • changelog.d/<n>.md records the change; CHANGELOG.md and docs/ROADMAP.md are untouched.

Strategic alignment


Found on 2026-10-08 while delivering #1115. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.

Activity

  1. added
    type/bug
    scope/security
    scope/cli
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. The real run still refuses the dangerous workspace, so there is no new security hole, but a dry run that reports success for a workspace the real run rejects is a misleading correctness bug worth fixing promptly.
    • Value: Medium. Users relying on dry-run to verify their sandbox configuration before a real run can be misled into thinking a dangerous workspace is acceptable.
    • Effort: Low. The fix is to call the existing validate_sandbox_workspace in two dry-run code paths and add tests reusing the existing _REFUSED_WORKSPACES fixture.
  3. added this to the v0.2.30 milestone on Oct 8, 2026
  4. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Placed in v0.2.30 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: P1 secret and sandbox-boundary fixes, the review tools lock, kube-linter finding identity and a faster gate. Position 5 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.

  5. modified the milestones: v0.2.30, v0.2.31 on Oct 9, 2026
  6. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    Moved to v0.2.31: v0.2.30 started with more than 12 items, and this was its lowest-ranked unstarted item. (devops roadmap reprioritize)

  7. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1476, merged into release/v0.2.31 as 95ced1a.

    Resolves #1383

    5 file(s) changed.

    How it was verified

    Check runs at 768ea6b:

    • Prune PR DevContainer Images: pass
    • Tests & Coverage: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1383-sandbox-dry-run-workspace.md:

    • devops docker sandbox --dry-run and devops test sandbox --dry-run run validate_sandbox_workspace and refuse every workspace the real run refuses, each with its own error type (DockerSandboxError).
    • The dry runs still make no request: a test with DOCKER_HOST=tcp://example.com:2375 and private networks disallowed records no host lookup and no client call (test_docker_and_test_sandbox_dry_runs_make_no_request in tests/test_sandbox_lifecycle.py).
    • Tests reuse _REFUSED_WORKSPACES (tests/test_sandbox_lifecycle.py) for both dry runs; each call phase stays under 1 s and uv run devops ci passes.
    • changelog.d/1383.md records the change; CHANGELOG.md and docs/ROADMAP.md are untouched.
  8. added a commit that references this issue on Oct 9, 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

    scope/cliscope/securitysource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions