The NVD API is an unofficial Go wrapper around the NVD API.
Supports:
The following shows how to basically use the wrapper to get all the CVEs for a given keyword.
package main
import (
"fmt"
"log"
"net/http"
"github.com/Pandatix/nvdapi"
)
func main() {
// Configure and issue the request
params := nvdapi.GetCVEsParams{
Keyword: str("gitea"),
}
resp, err := nvdapi.GetCVEs(&http.Client{}, params)
if err != nil {
log.Fatal(err)
}
// Make sure there are CVE items
if resp.Result.CVEItems == nil {
return
}
for _, item := range *resp.Result.CVEItems {
fmt.Println(item.CVE.CVEDataMeta.ID)
}
}
func str(str string) *string {
return &str
}
Please read first the code of conduct.
To contribute, please refers to the contribution guide.
To provide feedbacks or submitting an issue, please file and issue. In case it's regarding a security issue, refers to the Security guide.