Skip to content

Conversation

@tgrospic
Copy link
Contributor

What this PR does

  • Fixes the Node.js DEP0190 deprecation warning:

    [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities...
    
  • Replaces the deprecated pattern:

    spawn(tool, ['run', 'vscode:prepublish'], { shell: true, ... });

    with the safe and supported string form:

    spawn(`${tool} run vscode:prepublish`, { shell: true, ... });

Why this matters

Why this is safe

  • The tool value is controlled (npm or yarn), no user input is involved.
  • The command is static and cannot be exploited.
  • This form fully avoids the DEP0190 warning in all supported Node.js versions.

Additional improvements

  • Extracts the command string into a prepublish variable for reuse in both logging and execution.
  • Improves readability without changing behavior.

@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 4, 2025
@benibenj benibenj enabled auto-merge August 5, 2025 08:48
@benibenj benibenj closed this Aug 5, 2025
auto-merge was automatically disabled August 5, 2025 08:48

Pull request was closed

@benibenj benibenj reopened this Aug 5, 2025
@rzhao271 rzhao271 merged commit 6b0b21d into microsoft:main Aug 6, 2025
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.

4 participants