Bring the VulnCheck API to your Go applications.
go get github.com/vulncheck-oss/sdk-go
package main
import (
"fmt"
"github.com/vulncheck-oss/sdk-go"
)
func main() {
client := sdk.Connect("https://api.vulncheck.com", "vulncheck_token")
fmt.Println(client.GetUrl())
}
response, err := client.GetPurl("pkg:hex/[email protected]")
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
response, err := client.GetCpe("cpe:/a:microsoft:internet_explorer:8.0.6001:beta")
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
response, err := client.GetIndexBackup("initial-access")
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
response, err := client.GetIndices()
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
queryParams := sdk.IndexQueryParameters{}
response, err := client.GetIndex("a10", queryParams)
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
response, err := client.GetIndexVulncheckNvd2(
sdk.IndexQueryParameters{
Cve: "CVE-2019-19781",
}
)
if err != nil {
return err
}
description := (*response.Data[0].Descriptions)[0].Value
cvssBaseScore := (*response.Data[0].Metrics.CvssMetricV31)[0].CvssData.BaseScore
queryParams := sdk.IndexQueryParameters{}
response, err := client.GetCursorIndex("vulncheck-nvd2", "cursor_string", queryParams)
if err != nil {
panic(err)
}
fmt.Println(response.GetData())
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please use issue tracker.
Development of this package is sponsored by VulnCheck learn more about us!
Apache License 2.0. Please see License File for more information.