Skip to content

test(vscode): prove untrusted activation has zero real process and network activity in the extension host #1871

Open

Description

@EffortlessSteven

Parents and current foundation

PR #1867 proves the controller's injected runtime does not reach server resolution, subprocess execution, watcher creation, or client creation while untrusted. That is necessary, but it is not the extension-host acceptance required by #1623: a real VS Code activation still needs an adversarial test proving that configured executable and network sentinels remain untouched.

Scope — one PR

Add a real @vscode/test-electron fixture for untrusted activation only.

The fixture must:

  1. launch VS Code with Workspace Trust enabled and the test workspace deterministically untrusted;
  2. configure ripr.server.path to a sentinel executable that records any invocation;
  3. configure ripr.server.downloadBaseUrl to a loopback request counter or another deterministic network sentinel;
  4. activate the real extension through its normal activation events;
  5. assert that no sentinel process ran, no request was received, no language client/server process exists, and the user-facing state is the typed untrusted pause state;
  6. prove copy/open/repair/CLI-fallback commands do not cross the trust boundary.

If the VS Code test API cannot create an untrusted workspace deterministically, add the narrowest test-only launch hook or test profile necessary. Do not add a product setting that lets a workspace spoof trust.

Suggested seams

  • editors/vscode/src/test/runTest.ts
  • editors/vscode/src/test/suite/
  • editors/vscode/src/client.ts
  • test fixture workspace and sentinel assets under the existing approved editor-test surface

Proof

  • cd editors/vscode && npm ci
  • cd editors/vscode && npm run compile
  • cd editors/vscode && npm test
  • cd editors/vscode && npm run test:e2e
  • cd editors/vscode && npm run package
  • existing file/process/network policy gates

The test must fail before the trust boundary or manifest correction and pass with PR #1867's behavior.

Dependencies

Acceptance

  • Real extension activation in an untrusted workspace produces zero child-process launches.
  • Real extension activation produces zero requests to the configured network sentinel.
  • Workspace-provided executable, args, version, auto-download, and mirror values do not reach runtime services.
  • Commands that can copy, open, verify, receive, or run RIPR return a trust blocker without side effects.
  • The fixture runs in the existing VS Code lane; no new CI job is added.

Non-goals

Activity

  1. added
    vscode
    status/blocked-repo
    on Jul 19, 2026
  2. coderabbitai commented on Jul 19, 2026

    @coderabbitai
    🔗 Related PRs

    #1612 - fix(lsp): reject ambiguous workspace roots [merged]
    #1659 - feat(lsp): reload repository configuration safely [merged]
    #1691 - specs(ripr): materialize first RIPR-SPEC v2 requirement [open]
    #1714 - audit(goals): add fail-closed authority audit framework [merged]
    #1845 - fix(ci): unblock authority and policy gates [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. EffortlessSteven commented on Aug 1, 2026

    @EffortlessSteven
    MemberAuthor

    Earnest review (2026-08-01)

    STATUS: Open — premise correct, not resolved.
    PLAN QUALITY: Good. Acceptance criteria are crisp, falsifiable, correctly scoped.
    ASSESSMENT: A real @vscode/test-electron harness exists (test/runTest.ts) and workspace_trust_runtime.test.ts proves zero resolver/process/watcher calls — but via injected mock RiprClientRuntime, not real activation against a real sentinel executable. The mock proof is necessary, not sufficient.
    NEXT STEP: Build the deterministic untrusted fixture harness that activates the real extension and asserts zero real process/network. The test infrastructure exists; the gap is the real-activation layer.

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

    status/blocked-repovscode

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions