【问题标题】:npm audit fix: 1 high severity vulnerability: Arbitrary File Overwritenpm 审计修复:1 个高严重性漏洞:任意文件覆盖
【发布时间】:2019-09-02 09:38:52
【问题描述】:
   === 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       │ tar                                               │
├───────────────┼───────────────────────────────────────────────────┤
│ Patched in    │ >=4.4.2                                           │
├───────────────┼───────────────────────────────────────────────────┤
│ Dependency of │ gulp-sass                                         │
├───────────────┼───────────────────────────────────────────────────┤
│ Path          │ gulp-sass > node-sass > node-gyp > tar            │
├───────────────┼───────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/803            │
└───────────────┴───────────────────────────────────────────────────┘
found 1 high severity vulnerability in 7659 scanned packages
  1 vulnerability requires manual review. See the full report for details.

【问题讨论】:

标签: security npm gulp npm-install node-modules


【解决方案1】:

我的建议是尝试升级,但它们看起来确实依赖于 3rd 方包。

对于 regexDOS,如果输入正确,它可能会停止工作。不同于第二个漏洞。你应该先升级这个,或者如果你不能完全删除它。

但是 js-yaml 可能会使某些连接停留的时间比应有的时间长,如果在不太可能的情况下您无法升级,那么您可以使用一些软件包来监控和关闭剩余的 http 连接并廉价地保持- 关闭一个小的dos攻击。 Fail2ban * Splunk 用于监控 linux 的春天 :)

【讨论】:

  • "resolutions": { "braces": "^2.3.2", } 我尝试将此代码添加到 package.json 但它不起作用
  • 终端中将大括号更新到更高版本的命令是什么?
  • 谢谢大卫,更新后我得到了 +braces@2.3.2,但是当我再次尝试运行 npm audit fix 或 npm audit 时,大括号问题仍然存在
  • 嗨大卫,我想我解决了这个问题。我注意到我的主题中缺少 gitignore 文件,我尝试添加它添加忽略包行主题/主题名/节点模块/,然后再次运行 gulp 它工作。谢谢!
  • 这个答案不清楚。大括号跟什么有什么关系?
【解决方案2】:

安全审计是对包依赖项的安全漏洞评估。安全审计使您能够发现并修复依赖项中可能导致数据丢失、服务中断、未经授权访问敏感信息或其他问题的已知漏洞,从而帮助您保护包的用户。

npm install npm@latest -g

对我有用

【讨论】:

    猜你喜欢
    • 2019-02-07
    • 2021-05-03
    • 2021-08-27
    • 2021-04-14
    • 2019-09-02
    • 2019-01-08
    • 2018-12-30
    • 1970-01-01
    • 2022-01-16
    相关资源
    最近更新 更多