Skip to content

DeprecationWarning: Passing args to a child process with shell option true in Angular CLI package-manager.js #30821

Closed

Description

@nunopduartes

Command

add

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19

Description

When running ng add @hidden-path/hidden-package, the following deprecation warning appears:
[DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. at normalizeSpawnArguments (node:child_process:617:15) at spawn (node:child_process:756:13) at /node_modules/@angular/cli/src/utilities/package-manager.js:174:69 ...

This warning is triggered by the Angular CLI’s internal usage of child_process.spawn with shell: true and concatenated arguments in package-manager.js. According to Node.js documentation, this pattern is deprecated and can lead to security vulnerabilities.

Minimal Reproduction

ng new repro-app cd repro-app

node --trace-deprecation $(which ng) add @hidden-path/hidden-package

Exception or Error


Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 20.0.0
Node: 24.1.0
Package Manager: npm 11.3.0
OS: darwin arm64

Angular: undefined
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.0 (cli-only)
@angular-devkit/core         19.2.7
@angular-devkit/schematics   19.2.7
@angular/cdk                 19.2.9
@schematics/angular          19.2.7
typescript                   5.6.3

Anything else relevant?

No response

Activity

  1. added
    needs: investigation
    on Aug 10, 2025
  2. added 2 commits that reference this issue on Aug 15, 2025
    744b057
    dfa2aec
  3. added 5 commits that reference this issue on Aug 15, 2025
    dd90a81
    e19eee6
    c43504d
    1a994fa
    0ecf2dc
  4. added a commit that references this issue on Aug 15, 2025
    1a01e18
  5. angular-automatic-lock-bot commented on Sep 15, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular/clineeds: investigation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions