Skip to content

Tests: no test process reaches real host tools or carries a real GitHub token (by design) #838

Open

Description

@jayden1711

Outcome: no test process can reach this machine's real host tools or carry a real GitHub token, by design. Today that depends on each test putting the right stand-ins on its own PATH.

Why (measured by #819's round-4 review, issuecomment-6277904282):

Do (by design, per the owner's durability rule: a runtime refusal, not a lint):

  1. test/isolate.ts removes GitHub token variables (and other credential variables the engine reads) from the test process environment.
  2. In a test run (the existing test-run sign), the OS adapter's exec of host tools (systemctl, launchctl, loginctl, gh and similar) refuses unless the resolved binary is inside the test's own fake dir. Fail closed with a message naming the tool.
  3. A test proves it: with the real binaries on PATH, each guarded call refuses, and nothing execs outside the test's dirs (strace or an exec recorder).

Constraints: a real (non-test) install behaves exactly as today. No exemption list without independent review (principle 9).

Related: #819, #818 (stateDir() refusal), #827, #545.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions