mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 12:07:30 -06:00
19 lines
485 B
Go
19 lines
485 B
Go
package common
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func GetCveReferenceURL(cve string) string {
|
|
return fmt.Sprintf("https://cve.mitre.org/cgi-bin/cvename.cgi?name=%s", cve)
|
|
}
|
|
|
|
func GetCweReferenceURL(cwe string) string {
|
|
return fmt.Sprintf("https://cwe.mitre.org/data/definitions/%s.html", strings.TrimPrefix(cwe, "CWE-")) // CWE Require only the number, ie. CWE-123 -> 123
|
|
}
|
|
|
|
func GetGhsaReferenceURL(ghsa string) string {
|
|
return fmt.Sprintf("https://github.com/advisories/%s", ghsa)
|
|
}
|