Uh oh!
There was an error while loading. Please reload this page.
Also check package name validity in InstallPackageRequest - #63401
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds package-name validation to the typings installer’s installPackage request path (code actions), and introduces a new tsserver baseline + unit test to ensure invalid package names are rejected.
Changes:
- Validate
InstallPackageRequest.packageNameand return a failure response for invalid names. - Add a unit test that sends crafted
applyCodeActionCommandrequests with invalid package names. - Add a new reference baseline capturing the expected rejection behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/baselines/reference/tsserver/codeFix/install-package-rejects-invalid-package-names.js | New baseline verifying invalid package names are rejected during code action application. |
| src/typingsInstallerCore/typingsInstaller.ts | Adds early package-name validation and returns an error response instead of attempting install. |
| src/testRunner/unittests/tsserver/codeFix.ts | Adds a unit test to exercise the new validation via applyCodeActionCommand. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Jake Bailey (jakebailey)
commented
Apr 15, 2026
TypeScript Bot (@typescript-bot) cherry-pick this to release-6.0 |
TypeScript Bot (typescript-bot)
commented
Apr 15, 2026
Hey, Jake Bailey (@jakebailey)! I've created #63407 for you. |
…e-6.0 (#63407) Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Extends #63368 to the code action.
This is still not a security boundary; any client that can send these args can already run commands locally.