Agent: Windows process containment and environment allowlist (follow-up to #320)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker, electron, nodejs, powershell, typescript
- Domain
- desktop-dev, devops, security
Research direction
The work spans runtime/process-tree.ts (killTreeAndEscapees), runtime/command-environment.ts (the win32 denylist to replace with an allowlist) and a Job Object wrapper that needs a native addon or ffi. Start by reading how killTreeAndEscapees and the environment filter are wired, then decide the native-addon approach with maintainers. Done means a grandchild reparented outside the tree is killed on Stop in Windows CI, and git, node, npm and python still run under the allowlist.
Written by the indexing model from the issue text.
Description
Not finishable safely without Windows hardware or a native addon, so split out from the 0.3.7 follow-ups.
- Job Object (H2, Windows). Node cannot create a Job Object with KILL_ON_JOB_CLOSE without a native addon (e.g. a small N-API module or ffi). 0.3.7 ships a PowerShell ParentProcessId sweep plus
taskkill /T /F(runtime/process-tree.ts, killTreeAndEscapees), which cannot reach processes started through WMI/schtasks or whose parent already exited. Spawn the shell inside a Job Object and close the handle on Stop/timeout. Test on Windows CI with a grandchild that is reparented. - Windows environment allowlist (H3 / N7). runtime/command-environment.ts still passes the whole environment minus a denylist on win32. Kept today: STRIPE_SECRET_KEY, DJANGO_SECRET_KEY, LITELLM_MASTER_KEY, _KEY, GITHUB_PAT, PGPASSWORD, MYSQL_PWD, DATABASE_URL, REDIS_URL, SENTRY_DSN, SLACK_WEBHOOK_URL, DOCKER_AUTH_CONFIG, NODE_OPTIONS, ELECTRON_RUN_AS_NODE. Use an allowlist: SystemRoot, windir, ComSpec, PATHEXT, PATH, TEMP, TMP, USERPROFILE, APPDATA, LOCALAPPDATA, ProgramData, ProgramFiles, SystemDrive, HOMEDRIVE, HOMEPATH, USERNAME, USERDOMAIN, COMPUTERNAME, OS, PROCESSOR_*, NUMBER_OF_PROCESSORS, PSModulePath. Check that git, node, npm, python still run on windows-latest CI.
- Already-daemonised processes (POSIX). The ppid walk cannot find a process that was reparented to init before Stop (double fork that outlived its parent). Options: tag the run's environment with a unique MUSTER_RUN_ID and sweep
ps ewwfor it on Stop (Linux: /proc/*/environ), or a cgroup/subreaper where available. - A background job that outlives a successful command is never cleaned up (matches the Codex route); decide whether to sweep after each command.
Source: scratchpad/sec320-REVERIFY.md (H2, H3, N2, N7).
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 17h 33m
- Merged PRs (30d)
- 163
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from musterhq/muster-code
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
musterhq/muster-code#866 ·
Maintainers usually reply within 1 day
-
p2 type:feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
musterhq/muster-code#843 · 1 comment ·
Maintainers usually reply within 1 day
-
p1 type:feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
musterhq/muster-code#840 ·
Maintainers usually reply within 1 day
-
p1 type:feature
Difficulty 5/5 Over a week Newbie friendliness 30/100
musterhq/muster-code#829 ·
Maintainers usually reply within 1 day
-
type:bug
Difficulty 3/5 1-2 days Newbie friendliness 70/100
musterhq/muster-code#815 ·
Maintainers usually reply within 1 day
All issues in musterhq/muster-code
Similar issues
-
[analytics-core] getQueryParams does not decode `+` as space and truncates values containing `=`Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
amplitude/Amplitude-TypeScript#2179 · 1 comment ·
Maintainers usually reply within 2 days
-
ci good first issue severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
TMHSDigital/GH-Arcade#111 ·
-
AsnIntegerConverter.toASN coerces strings with +value, rounding integers outside safe-integer rangeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PeculiarVentures/asn1-schema#189 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100