🚀
Easy to Use
Simple and intuitive API for fetching and working with CWE data from the official MITRE API.
A comprehensive Go library for working with CWE data, featuring API clients, rate limiting, and tree operations
Install the library:
go get github.com/scagogogo/cwe
Basic usage:
package main
import (
"fmt"
"log"
"github.com/scagogogo/cwe"
)
func main() {
// Create a new API client
client := cwe.NewAPIClient()
// Get CWE version information
version, err := client.GetVersion()
if err != nil {
log.Fatalf("Failed to get CWE version: %v", err)
}
fmt.Printf("Current CWE version: %s, Release date: %s\n",
version.Version, version.ReleaseDate)
// Fetch a specific weakness
weakness, err := client.GetWeakness("79")
if err != nil {
log.Fatalf("Failed to get weakness: %v", err)
}
fmt.Printf("CWE-79: %s\n", weakness.Name)
}
This project is licensed under the MIT License.