LoginSignup
2
0

More than 3 years have passed since last update.

Golangで依存パッケージの脆弱性を調査するならNancyがおすすめ

Posted at

概要

  • Goで使用する外部パッケージが安全かどうかを調べる時にオススメなのが、nancyです。
  • ちなみにnancyとは、Sonatype OSS Indexを利用して、Golangの依存関係の脆弱性をチェックするツールです。
  • nancyではdepまたはgo modの依存関係を調査してくれます。

nancy.png

導入方法

  • install方法

> brew tap sonatype-nexus-community/tap
> brew install nancy

試す

  • helpを見てみる
  • 見てみると、引数にGopkg.lockまたは、go.sumのpathを指定してあげるようです。
❯ nancy --help
Usage:
nancy [options] </path/to/Gopkg.lock>
nancy [options] </path/to/go.sum>

Options:
  -noColor
        indicate output should not be colorized
  -version
        prints current nancy version
❯ go list -m all | nancy go.sum
[1/3] golang/golang.org/x/mod@0.3.0    No known vulnerabilities against package/version...
[2/3] golang/golang.org/x/tools@0.0.0-20210112183307-1e6ecd4bf1b0    No known vulnerabilities against package/version...
[3/3] golang/golang.org/x/xerrors@0.0.0-20200804184101-5ec99f83aff1    No known vulnerabilities against package/version...

Audited dependencies: 3, Vulnerable: 0
2
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
2
0