Skip to content

Passing args to node:child_process or execFile/spawn with shell option true is deprecated #3064

@onurravli

Description

@onurravli

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

In actions/start.action.ts and some of other files, we are calling node:child_process.spawn with { shell: true } option. And this can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.

Please refer this link.

Minimum reproduction code

https://github.com/nestjs/nest-cli

Steps to reproduce

No response

Expected behavior

Code should be refactored.

Package version

11.0.7

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions