GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Harden ATA package name filtering by jakebailey · Pull Request #63368 · microsoft/TypeScript

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Apr 6, 2026

Copy link
Copy Markdown
Member

This URI-based validation is what npm does internally, but we should be stricter about what we allow down to npm as we use child_process with the shell enabled to avoid reimplementing which. Instead, just only allow [\w.-]+.

This prevents the odd scenario where someone manages to query ATA on via a broken specifier. The old URI-based validation allowing something through would maximally cause the ATA request to fail and the feature to not work, nothing further.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jakebailey
Fix ATA package name filtering
6f49108
@jakebailey
Jake Bailey (jakebailey) requested review from Daniel Rosenwasser (DanielRosenwasser), Ryan Cavanaugh (RyanCavanaugh) and Copilot April 6, 2026 22:57
@github-project-automation github-project-automation Bot added this to PR Backlog Apr 6, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Apr 6, 2026
@jakebailey
fmt
baee83a
Copilot started reviewing on behalf of Jake Bailey (jakebailey) April 6, 2026 22:58
View session
Copilot AI reviewed Apr 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tightens the typings installer’s package-name validation to a strict allowlist before constructing npm install command strings (shell-enabled), and updates diagnostics + baselines accordingly.

Changes:

  • Replace URI-encoding-based package name validation with an explicit ^[\w.-]+$ allowlist (plus existing leading ./_ checks and scoped-name splitting).
  • Introduce NameContainsInvalidCharacters (with an enum alias to preserve the old NameContainsNonURISafeCharacters name) and update the rendered failure message.
  • Update unit tests and tsserver baseline logs to match the new validation result/message.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/jsTyping/jsTyping.ts Implements the new allowlist validation, adds/aliases enum member, updates rendered error text.
src/testRunner/unittests/tsserver/typingsInstaller.ts Updates/extends validation tests to expect the new enum result.
tests/baselines/reference/tsserver/typingsInstaller/should-not-initialize-invaalid-package-names.js Baseline update for new error message text.
tests/baselines/reference/tsserver/typingsInstaller/should-handle-node-core-modules.js Baseline update for new error message text.
tests/baselines/reference/tsserver/typingsInstaller/malformed-packagejson.js Baseline update for new error message text.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) approved these changes Apr 7, 2026
View reviewed changes
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Apr 7, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Apr 7, 2026
Merged via the queue into microsoft:main with commit c7a0ae1 Apr 7, 2026
23 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jakebailey
Jake Bailey (jakebailey) deleted the fix-package-sanitization branch April 7, 2026 17:01
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Apr 7, 2026
@jakebailey

Jake Bailey (jakebailey) commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) cherry-pick this to release-6.0

typescript-bot reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-6.0 ✅ Started ✅ Results
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TypeScript Bot (typescript-bot) pushed a commit that referenced this pull request Apr 7, 2026
@jakebailey @typescript-bot
Harden ATA package name filtering (#63368)
e209442
@typescript-bot TypeScript Bot (typescript-bot) mentioned this pull request Apr 7, 2026
🤖 Pick PR #63368 (Harden ATA package name filtering) into release-6.0 #63372
Merged
@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've created #63372 for you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Jake Bailey (jakebailey) added a commit that referenced this pull request Apr 7, 2026
@typescript-bot @jakebailey
🤖 Pick PR #63368 (Harden ATA package name filtering) into release-6.0 (…
ad1c695
…#63372)

Co-authored-by: Jake Bailey <[email protected]>
@jakebailey Jake Bailey (jakebailey) mentioned this pull request Apr 14, 2026
Also check package name validity in InstallPackageRequest #63401
Merged
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) added this to the TypeScript 6.0.3 milestone Apr 17, 2026
@typescript-bot TypeScript Bot (typescript-bot) assigned Jake Bailey (jakebailey) Apr 17, 2026
@rennerdo30 rennerdo30 (rennerdo30) mentioned this pull request Oct 21, 2026
[Historical PR] deps(npm-dev): bump typescript from 5.9.3 to 6.0.3 in /frontend rennerdo30/watch-together#75
Closed
@shinagawa-web Kazutomo Deguchi (shinagawa-web) mentioned this pull request Nov 4, 2026
chore(deps): TypeScript を、lib と examples で 6.0.3 に揃える nota/typed-api-spec#405
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) RyanCavanaugh approved these changes
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Awaiting requested review from DanielRosenwasser

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@jakebailey Jake Bailey (jakebailey)

Labels

None yet

Projects

PR Backlog
Status: Done

Milestone

TypeScript 6.0.3

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@jakebailey @typescript-bot @RyanCavanaugh @DanielRosenwasser
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.