schematics-utilities icon indicating copy to clipboard operation
schematics-utilities copied to clipboard

Update @schematics/update to remove the vulnerability introduced in schematics-utilities

Open evansrobert opened this issue 3 years ago • 3 comments

Hi, @nitayneeman, I'd like to report a vulnerability introduced by package [email protected]:

Issue Description

I noticed that a vulnerability is introduced in [email protected] _: Vulnerability CVE-2020-7788 (high severity) affects package ini (versions:<1.3.6): https://snyk.io/vuln/SNYK-JS-INI-1048974 The above vulnerable package is referenced by [email protected] via: [email protected] ➔ @schematics/[email protected][email protected]

Since [email protected] (20,943 downloads per week) is referenced by 37 downstream projects (e.g., @datorama/akita 6.2.3 (latest version), @scullyio/init 1.1.4 (latest version), @sentinel-one/mgmt-schematics 2.0.10 (latest version), @flarehr/apollo-benefits 2.2.19 (latest version), @flarehr/cars-calculator 2.2.19 (latest version)), the vulnerability CVE-2020-7788 can be propagated into these downstream projects and expose security threats to them via the following package dependency paths: (1)@datorama/[email protected][email protected] ➔ @schematics/[email protected][email protected] (2)@flarehr/[email protected] ➔ @datorama/[email protected][email protected] ➔ @schematics/[email protected][email protected] ......

If [email protected].* removes the vulnerable package from the above version, then its fixed version can help downstream users decrease their pain.

Given the large number of downstream users, could you help update your package to remove the vulnerability from [email protected] ?

Fixing suggestions

In [email protected], maybe you can kindly try to perform the following upgrade(not crossing major version) : @schematics/update ^0.803.8 ➔ ^0.1100.5;

Note: @schematics/[email protected](>=0.1100.5) directly depends on [email protected] which has fixed the vulnerability CVE-2020-7788. Of course, you are welcome to share other ways to resolve the issue.

Thank you for your attention to this issue.

Best regards, ^_^

evansrobert avatar Aug 11 '21 07:08 evansrobert

Hi, I have same vulnerability problem using @ng-neat/svg-icons. Here is the npm ls ini result for this package. image

Hope you will be able to fix it soon :)

maciejniedzielski avatar Aug 11 '21 10:08 maciejniedzielski

Hey guys,

I've tried to merge a fix with an upgrade but reverted since @schematics/[email protected] brings breaking changes indirectly - it uses under the hood @angular-devkit/core in v11.0.7 containing breaking changes.

Actually there is another open issue: https://github.com/nitayneeman/schematics-utilities/issues/39.

If you have another solution in your mind to bring [email protected] without having breaking changes - you're welcome to suggest or contribute.

nitayneeman avatar Aug 11 '21 19:08 nitayneeman

I only have a minor understanding of schematics so, sorry if the following questions don't make sense.

The @schematics/update package is deprecated, it is only supported on Angular <=11: Screenshot 2022-02-08 at 11 48 12

Is schematics-utilities fully dependent on @schematics/update? Or can it be "refactored" to stop using @schematics/update?

If it can be refactored then I guess the refactoring could be done and then schematics-utilities could release a new major version (v3) with Angular 12+ support only since this refactoring might be a breaking change.

nunoarruda avatar Feb 08 '22 12:02 nunoarruda