Skip to content

fix: harden local agent launcher and credential setup - #43

Merged
sonpiaz merged 1 commit into
mainfrom
fix/agent-setup-hardening
Oct 18, 2026
Merged

sonpiaz merged 1 commit into
mainfrom
fix/agent-setup-hardening

Conversation

@sonpiaz

@sonpiaz sonpiaz commented Oct 18, 2026

Copy link
Copy Markdown
Member

Harden the project agent installer after the five nonblocking findings on merged CLI#42. On Windows the launcher prevents current-directory executable lookup and explicitly selects the public npm registry. Its child environment now contains only runtime paths/home/temp/locale/terminal settings plus the validated program key and write=0, excluding parent proxy, Node options, npm overrides and unrelated credentials.

Setup stages merged-config temp files under the ignored private backups directory, installing the strict guard first. An abrupt exit before rename leaves the original config intact and the secret-bearing temp ignored even before root rules are written. Plan notes flag machine-specific absolute MCP paths. Doctor detects a tracked project credential with a read-only Git query, including repositories rooted above the project, reports credential_tracked and returns needs_attention. The child ignore guard also protects the login-token filename when project=home.

Validation: build/lint and 209 local tests pass (19 recipes, 170 CLI, 20 MCP; two Windows cases skipped). New regressions reproduce the old failures, exercise actual child env, abrupt process exit, real Git ignore and nested-repository credential tracking without changing its index. Real Windows CI includes a cwd npx.cmd decoy plus a legacy negative control. No network requests or real credentials; no version bump/publication. Project code, PATH, launcher and .npmrc remain trusted local inputs, as documented; this is not a sandbox.

@sonpiaz
sonpiaz merged commit f53dd82 into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant