1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

npm auditする時のメモ

1
Posted at

はじめに

  • なんとなくで対応していてあまり理解していなかった

問題

  • npm auditについて

解決

やること

  • npm audit
    • いらないものはnpm removeする
    • verupで解消されるものはverupする
    • 以下のようにgithubで詳細を見られる
# リンク(https://github.com/advisories/GHSA-vfj7-8cjw-p6xm)をクリックで詳細表示
braces  *
Severity: high
braces vulnerable to stack-exhaustion denial of service through deeply nested 
patterns - https://github.com/advisories/GHSA-vfj7-8cjw-p6xm
fix available via `npm audit fix --force`
Will install firebase-tools@14.23.0, which is a breaking change
node_modules/braces
  chokidar  2.0.0 - 3.6.0
  Depends on vulnerable versions of braces
  node_modules/chokidar

% npm ls braces
gakukiro@0.0.0 /Users/username/Desktop/repo/dir
└─┬ firebase-tools@15.34.0
  └─┬ chokidar@3.6.0
    └── braces@3.0.3

やらないこと

  • 理解せず以下を実行すること(意図しない動作への影響、安全でないバージョンをインストールする可能性)
    • npm audit fix
    • npm audit fix --force

終わりに

  • 依存関係は芋づる式なので丁寧にアセスメントしてから修正を実行する。不要なものを消すのは原則。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?