質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

0回答

565閲覧

npm audit (脆弱性の警告)を解消したい

pecchan

総合スコア587

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

0クリップ

投稿2021/01/08 04:50

前提・実現したいこと

初めてUbuntuに「Fractal」をインストールしたく

npm install --save @frctl/fractal

したところ「脆弱性の警告」というものが出ました。

これを解消したいのですが、具体的な方法が分かりません。

色々調べたのですが手動で「package.json」というのを編集したら良いのでしょうか?

node.jsで脆弱性のあるパッケージを手動で更新した

別なページにはlockの方を編集するとありました。
npm audit fixでエラーを修正できない人のための解決策

node_modulesフォルダと同じ階層に、
「package.json」と「package-lock.json」
という2つのファイルがありました。

package.json

json

1{ 2 "name": "frac", 3 "version": "1.0.0", 4 "description": "", 5 "main": "index.js", 6 "scripts": { 7 "test": "echo \"Error: no test specified\" && exit 1" 8 }, 9 "author": "", 10 "license": "ISC", 11 "dependencies": { 12 "@frctl/fractal": "^1.5.2", 13 "axios": "^0.21.1", 14 "lodash": "^4.17.20" 15 } 16} 17

発生している問題・エラーメッセージ

=== npm audit security report === ┌──────────────────────────────────────────────────────────────────────────────┐ │ Manual Review │ │ Some vulnerabilities require your attention to resolve │ │ │ │ Visit https://go.npm.me/audit-guide for additional guidance │ └──────────────────────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=4.17.5 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > vorpal > inquirer > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/577 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=4.17.11 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > vorpal > inquirer > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/782 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=4.17.12 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > vorpal > inquirer > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1065 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=4.17.19 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > vorpal > inquirer > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1523 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Server-Side Request Forgery │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ axios │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=0.21.1 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > @frctl/mandelbrot > @frctl/web > │ │ │ browser-sync > localtunnel > axios │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1594 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Server-Side Request Forgery │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ axios │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=0.21.1 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ @frctl/fractal │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ @frctl/fractal > @frctl/web > browser-sync > localtunnel > │ │ │ axios │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1594 │ └───────────────┴──────────────────────────────────────────────────────────────┘ found 6 vulnerabilities (2 low, 4 high) in 633 scanned packages 6 vulnerabilities require manual review. See the full report for details.

package.jsonの以下2行のバージョンを変えてnpm installしたら良いのでしょうか?
"axios": "^0.21.1",
"lodash": "^4.17.20"

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問