koa2第一天 安裝koa2found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details


安裝全局koa2:npm install -g koa2 -generator

創建一個koa2文件夾:koa2 -e koa2

進入koa2文件夾:cd koa2 安裝npm模塊:npm install

  

顯示如下結果,可以看到,英文提示有一個漏洞需要修復


 C:\Users\Administrator\Desktop\koa2-1-1\koa2>npm install

npm WARN deprecated swig@1.4.2: This package is no longer maintained
npm WARN deprecated ejs@2.3.4: Critical security bugs fixed in 2.5.5

> nodemon@1.18.6 postinstall C:\Users\Administrator\Desktop\koa2-1-1\koa2\node_modules\nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 320 packages from 182 contributors and audited 2414 packages in 186.878s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

  

 

按照代碼運行  npm audit fix

顯示

C:\Users\Administrator\Desktop\koa2-1-1\koa2>npm audit fix
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 13.094s
fixed 0 of 1 vulnerability in 2414 scanned packages
  1 package update for 1 vuln involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

  

 

很明顯沒有解決

 

接着運行audit fix

顯示:

Run  npm install koa-onerror@4.1.0  to resolve 1 vulnerabilitySEMVER WARNING: Recommended action is a potentially breaking change

Low Regular Expression Denial of Service

Package uglify-js

Dependency of koa-onerror

Path koa-onerror > swig > uglify-js

More info https://nodesecurity.io/advisories/48

 

found 1 low severity vulnerability in 2414 scanned packages

  運行 

npm install koa-onerror@4.1.0
顯示
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ koa-onerror@4.1.0
added 1 package from 1 contributor, removed 15 packages, updated 1 package and audited 2401 packages in 14.254s
found 0 vulnerabilities

  

ok


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM