Skip to content

feat: harden Windows partial-shell Plan A after sealed Plan B #1653

Description

@ken-jo

Current status

PR #1657 merged as 476afcd0034ae665d0967c52cbc4877b3f949b32 and updates the current source pin to ASRT 0.0.66. It deliberately selects safe Plan B for requested Windows partial-sandbox canonical Bash/PowerShell: a host-sealed plain / kind=none execution plan, force-modal allow-once only, and a command/cwd/tool-use-bound one-shot permit. It makes no partial-isolation claim and issues no path ACL lease.

ASRT 0.0.66 still provides no handle-bound, no-follow, reparse-safe per-execution Windows filesystem grant. This issue therefore remains open only for a future Plan A replacement; PR #1657 does not close its ACL/reparse-hardening acceptance criteria.

Purpose

When a verified upstream safety primitive exists, replace the Plan B host-shell fallback with a Windows partial-shell execution boundary that is actually confined per invocation. This is not the win32 default-on task.

Owner

  • Owner: @ken-jo
  • Area: Sandbox / Security

Future Plan A scope

  • Define a host-owned, versioned ExecutionSandboxPlan with requested sandbox state, effective mode, fallback reason, canonical cwd/read/write paths, deny floor, trusted shell, and timeout.
  • Use a unique holder/lease per invocation only after the grant is handle-bound, no-follow, canonical-path checked, and safe against reparse/junction/TOCTOU replacement.
  • Bind wrapper cwd and spawn cwd identity; never share a main PID or holder PID across concurrent invocations.
  • Prove revoke/cleanup on exit, spawn failure, abort, timeout, shutdown, and startup crash recovery; a failed recovery must not publish partial/active capability.
  • Report partial only when filesystem and network confinement are demonstrably applied to that exact shell process. Otherwise retain the sealed Plan B none plan and exact user gate.

Non-goals

Acceptance criteria

  • A handle-bound/no-follow/reparse-safe per-execution grant primitive, or equivalently independently verified safety mechanism, is available and documented.
  • 3-OS execution-plan/effective-mode truth table and fallback reason coverage are fixed by tests.
  • Windows lifecycle tests cover holder/lease/wrapper/spawn/cleanup order, concurrency isolation, mismatch fail-closed behavior, abort/timeout/shutdown, and crash recovery.
  • NTFS reparse point/junction swap and canonicalization/TOCTOU bypass attempts are blocked.
  • Packaged Windows ASRT E2E and signed candidate replay remain separate release gates and are linked when they begin.

Related: #19, #1627, #1617, #1618, #1628, #1657

Metadata

Metadata

Assignees

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