Go SDK to access the vulnerability database
go get github.com/vulndb/vulndb-go
Load vulndb data from binary data and link to package
package main
import (
"github.com/vulndb/vulndb-go/bindata"
"log"
"fmt"
)
func main() {
vulns, err := bindata.LoadFromBin()
if err != nil {
log.Fatal(err)
}
for _, vuln := range vulns.FilterBySeverity("high") {
fmt.Printf("%2d. %-52.50s [%s]\n", vuln.Id, vuln.Title, vuln.Severity)
}
}
Send your pull requests
with improvements and bug fixes, making sure that all tests PASS
:
$ cd vulndb-go
$ make tools # update required tools
$ make
Test packages
PASS
ok github.com/vulndb/vulndb-go/bindata 0.026s
Run vet
Check formats
This package embeds the vulnerability database
in the bindata
directory. To update the database with new information
follow these steps:
# Update the database
make update-db