You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spawn guard: detect new console-less entry points instead of a hand-maintained list #1933
packages/codev/src/__tests__/windows-console-spawn-guard.test.ts checks every child_process call reachable from a hand-maintained list of console-less entry points (CONSOLE_LESS_ENTRY_POINTS: Tower, afx spawn, afx tower, afx cleanup, the porch CLI, the VS Code extension host). The list cannot notice a new console-less entry point: a new detached: true launch, or a CLI newly launched hidden (as execCodevCli made porch and afx cleanup), adds a process whose spawns the guard never scans.
Proposal
Add a second assertion that enumerates every detached: true spawn site (and every spawnCodevCli / execCodevCli call) in the repo and compares the launched program against an explicit allowlist mapped to an entry in CONSOLE_LESS_ENTRY_POINTS. A new site fails until it is mapped to an entry point (so its graph is scanned) or explicitly allowlisted with a reason.
Also worth closing while there (known guard limits, documented in its header)
Follows relative imports only: spawns inside other workspace packages (e.g. codev-sdk) are not scanned.
Recognises named and dynamic-import-destructured child_process bindings only, not import * as cp or require.
Activity
amrmelsayed commentedon Nov 18, 2026
Linked from PR #1932.