5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GitHubから共存関係の脆弱性を指摘されたときの対処法

Last updated at Posted at 2020-06-16

はじめに

GitHubからセキュリティ警告を受けて少し詰まったので備忘録として書いていきます。

GitHubから脆弱性の指摘

スクリーンショット 2020-06-16 15.41.31.png >**We found a potential security vulnerability in one of your dependencies.* Only the owner of this repository can see this message. `依存関係に潜在的なセキュリティ脆弱性が見つかりました。 このリポジトリの所有者だけがこのメッセージを見ることができます。`

右の[ View Dependabot alert ]を押してみると
スクリーンショット 2020-06-16 15.49.27.png
どうやらセキュリティアラートが発生しているので詳細を確認してみます。

スクリーンショット 2020-06-16 15.47.42.png >**Dependabot cannot update to the required version** View details about this error or learn more about Dependabot security updates. `Dpendabotでは必要なバージョンにアップデートできません。 このエラーの詳細を表示するか、Dependabotのセキュリティ更新の詳細を確認してください。`

Remediation
Upgrade websocket-extensions to version 0.1.4 or later. For example:
websocket-extensionsを次のようにバージョン0.1.4以降にアップグレードする

websocket-extensions@^0.1.4:
version "0.1.4"

とあるので、websocket-extensionsのバージョンを0.1.4にしましょう。

websocket-extensionsのバージョンアップ

websocket-extensionsとはソケット通信においてサーバー側が許可する拡張機能のことです。
ディレクトリ内のyarn.lockにあるこのコードを

yarn.lock
websocket-extensions@>=0.1.1:
  version "0.1.3"
  resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" 

次のように書き換えます。

yarn.lock
websocket-extensions@^0.1.4:
  version "0.1.4"
  resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
  integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==

これでコミットしてプッシュすればGitHubからの脆弱性の指摘は無くなります。

5
4
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
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?