LoginSignup
2
1

More than 5 years have passed since last update.

脆弱性検知ツールvulsインストール時にgo-cve-dictionaryインストールでエラーになった場合の対処方法

Last updated at Posted at 2016-12-04

2016年12月10日追記

vulsのREADMEではgo-cve-dictionaryのインストールにmake installを使っており、
その場合、エラーは発生しないためこの手順は不要です。
最新情報はhttps://github.com/future-architect/vuls
を参照するのが確実です。
kotakanbeさんご指摘ありがとございます。

はじめに

脆弱性検知のためにvulsの動作確認をしていて、新しいサーバでも使えるようにしようと思ったら、go-cve-dictionaryのインストールでこけたので、それを回避する手順を書き記す。

確認環境

OS CentoS6.5
go 1.7.3

エラー内容

あなたのサーバは本当に安全ですか?今もっともイケてる脆弱性検知ツールVulsを使ってみた
この手順に沿ってインストールしようとすると、go get github.com/kotakanbe/go-cve-dictionaryが以下のようなエラーでこける。

[root@localhost ~]# go get github.com/kotakanbe/go-cve-dictionary
package github.com/labstack/echo/engine/standard: cannot find package "github.com/labstack/echo/engine/standard" in any of:
    /usr/lib/golang/src/github.com/labstack/echo/engine/standard (from $GOROOT)
    /root/.go/src/github.com/labstack/echo/engine/standard (from $GOPATH)
[root@localhost ~]# 

go-cve-dictionaryインストールエラーの原因

go-cve-dictionaryの中で"github.com/labstack/echo/engine/standard"をインポートしてるが、最新のlabstack/echoのmasterにはなく、v2.2.0以前にしか残っていない。

go-cve-dictionaryインストール

事前にlabstack/echoのv2.2.0を$GOPATH/src/github.com以下にクローンをして、go get github.com/kotakanbe/go-cve-dictionaryを実行すれば良い。

$ mkdir -p $GOPATH/src/github.com/labstack 
$ cd $GOPATH/src/github.com/labstack
$ git clone https://github.com/labstack/echo
$ cd echo
$ git checkout 54a4d3140722793aa1cc430bd8a4a73aedff2783
$ go get github.com/kotakanbe/go-cve-dictionary

vulsインストール

vulsインストール以降は、あなたのサーバは本当に安全ですか?今もっともイケてる脆弱性検知ツールVulsを使ってみたと同じ手順でOK。

$ sudo mkdir /var/log/vuls
$ sudo chown USER_NAME /var/log/vuls
$ sudo chmod 700 /var/log/vuls
$ go get github.com/future-architect/vuls

GOのimportの時にバージョン指定ができるといいんだけど、できないみたいなのでこの手順で回避した。

2
1
2

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
1