при установке npm обнаружил 12 уязвимостей высокой серьезности - PullRequest
0 голосов
/ 17 июня 2019

В Angular 8, когда я установил npm, обнаружил 12 уязвимостей с высокой степенью серьезности.

Версия: -

Angular CLI: 8.0.3
Node: 10.16.0
OS: linux x64
Angular: 8.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.3
@angular-devkit/build-angular     0.800.3
@angular-devkit/build-optimizer   0.800.3
@angular-devkit/build-webpack     0.800.3
@angular-devkit/core              8.0.3
@angular-devkit/schematics        8.0.3
@angular/cli                      8.0.3
@angular/fire                     5.2.1
@angular/flex-layout              8.0.0-beta.26
@angular/http                     7.2.15
@ngtools/webpack                  8.0.3
@schematics/angular               8.0.3
@schematics/update                0.800.3
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

Когда я запускаю команду аудита npm, тогда показывают

     === npm audit security report ===                        


                                 Manual Review                                  
             Some vulnerabilities require your attention to resolve             

          Visit https://go.npm.me/audit-guide for additional guidance           


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > libcipm > npm-lifecycle > node-gyp > fstream            

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > libcipm > npm-lifecycle > node-gyp > tar > fstream      

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > libnpm > npm-lifecycle > node-gyp > fstream             

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > libnpm > npm-lifecycle > node-gyp > tar > fstream       

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > node-gyp > fstream                                      

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > node-gyp > tar > fstream                                

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > npm-lifecycle > node-gyp > fstream                      

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         fstream                                                       

  Patched in      >=1.0.12                                                      

  Dependency of   npm                                                           

  Path            npm > npm-lifecycle > node-gyp > tar > fstream                

  More info       https://npmjs.com/advisories/886                              


  High            Arbitrary File Overwrite                                      

  Package         tar                                                           

  Patched in      >=2.2.2 <3.0.0 || >=4.4.2                                     

  Dependency of   npm                                                           

  Path            npm > libcipm > npm-lifecycle > node-gyp > tar                

  More info       https://npmjs.com/advisories/803                              


  High            Arbitrary File Overwrite                                      

  Package         tar                                                           

  Patched in      >=2.2.2 <3.0.0 || >=4.4.2                                     

  Dependency of   npm                                                           

  Path            npm > libnpm > npm-lifecycle > node-gyp > tar                 

  More info       https://npmjs.com/advisories/803                              


  High            Arbitrary File Overwrite                                      

  Package         tar                                                           

  Patched in      >=2.2.2 <3.0.0 || >=4.4.2                                     

  Dependency of   npm                                                           

  Path            npm > node-gyp > tar                                          

  More info       https://npmjs.com/advisories/803                              


  High            Arbitrary File Overwrite                                      

  Package         tar                                                           

  Patched in      >=2.2.2 <3.0.0 || >=4.4.2                                     

  Dependency of   npm                                                           

  Path            npm > npm-lifecycle > node-gyp > tar                          

  More info       https://npmjs.com/advisories/803 

найдено 12 уязвимостей высокой степени опасности в 31845 отсканированных пакетах. 12 уязвимостей требуют проверки вручную.Подробности см. В полном отчете.

Я хочу найти 0 уязвимостей серьезности.

Ответы [ 2 ]

0 голосов
/ 17 июня 2019

Откройте файл package.json и найдите npm, затем удалите строку версии npm (например, «npm»: «^ 6.9.0») из файла package.json

Затем удалите из проекта папку node_modules и файл package-lock.json.

Затем установите npm с помощью команды npm install.

Теперь вы должны увидеть 0 уязвимостей.

0 голосов
/ 17 июня 2019

Это не угловой вопрос. npm сообщает, что некоторые пакеты имеют известные проблемы безопасности.

Вы можете попытаться запустить npm audit fix, чтобы позволить зависимости быть обновленной до известной уязвимой (если есть), в противном случае вам придется подождать, пока сопровождающий пакета исправит эти проблемы.

Имейте в виду, что уязвимости безопасности, хотя и очень важные, сообщаются и для пакетов разработки, которые могут не попасть в вашу производственную систему.

Если обновление зависимостей или (их изменение) не помогло, вы ничего не можете сделать самостоятельно.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...