Repository navigation
fix: harden local agent launcher and credential setup - #43
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.