pkgのバージョンは古いのでソースコンパイル 2021/11
go-cve-dictionary
VulsをFreeBSD Jailに仕込んでみる - Qiita 2017
go-cve-dictionary-0.5.5
$ go-cve-dictionary fetchjvn -years 2021 EROR[11-12|13:44:21] Failed to fetch JVN: [Failed to validate a value: component cannot contain whitespace:: nano 10gx: Parse error]
It's fixed in the latest version of go-cve-dictionary. Update it.
parse error on JVNDB-2021-001894 · Issue #33 · vulsio/vulsctl · GitHub
ソースインストール
# pkg install go git sqlite3 gmake $ vi .profile $ cat .profile export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin $ mkdir -p $GOPATH/src/github.com/vulsio $ cd $GOPATH/src/github.com/vulsio $ git clone https://github.com/vulsio/go-cve-dictionary.git $ cd go-cve-dictionary $ gmake install
nvd jvn を再取得
$ go/bin/go-cve-dictionary version go-cve-dictionary v0.8.1 0a854f8 $ go/bin/go-cve-dictionary fetch jvn EROR[11-12|14:05:25] Failed to NewDB. Since SchemaVersion is incompatible, delete Database and fetch again Failed to NewDB. Since SchemaVersion is incompatible, delete Database and fetch again. $ mv cve.sqlite3 cve.sqlite3.bak $ go/bin/go-cve-dictionary fetch nvd $ go/bin/go-cve-dictionary fetch jvn
breaking-change: change fetch command by MaineK00n · Pull Request #214 · vulsio/go-cve-dictionary · GitHub
年指定などのオプションは無くなった。全取得
vuls
FreeBSD 13(12)はpkg auditの出力フォーマットが変わっている
VulsRepo
https://vuls.io/docs/en/vulsrepo.html
FreeBSDはビルドが必要。depはdeprecatedでgo modに移行している。
https://vuls.io/docs/en/vulsrepo.html#build-vulsrepo-server
$ mkdir -p $GOPATH/src/github.com/ishiDACo/ $ cd $GOPATH/src/github.com/ishiDACo/ $ git clone https://github.com/ishiDACo/vulsrepo.git $ cd vulsrepo/server $ go mod download $ go build -o vulsrepo-server
go mod tidy
参考
https://github.com/ishiDACo/vulsrepo/blob/master/Dockerfile
Issue in constraint.go · Issue #2244 · golang/dep · GitHub