Skip to content

Fail-closed confinement contract test across runtimes #75

Description

@armstrongsamr

What

A fail-closed contract test asserting every autonomous runtime spawns with a scrubbed env + confined cwd.

Why

Prevents capability/enforcement drift (the prior perActionApproval divergence is the cautionary tale). Must fail if a new executesUntrustedTools runtime spawns without going through the seam.

Design

  • Enumerate the runtime registry dynamically (not a hardcoded list); for each executesUntrustedTools === true, stub the spawn/SDK seam and assert the captured env has zero denylisted vars and a confined cwd was used.

Affected files

  • new electron/agent/runtime/__tests__/confinement-contract.test.ts; possibly a spawn/SDK stub in test-utils/runtime-stubs.ts.

Acceptance criteria

  • Test enumerates runtimes dynamically (future runtime auto-covered).
  • Fails when a flagged runtime spawns with an unscrubbed env or unconfined cwd.

Effort: S · Deps: #6, #7, #8

Part of #66

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiAgentic AIenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions