blob: 80c95ef45019c9d3e4d7a6dbc3e32141f0bfbecc [file] [log] [blame]
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package idstr
import "regexp"
var (
NISTLink = regexp.MustCompile(`^https://nvd.nist.gov/vuln/detail/(` + cveStr + `)$`)
GHSALink = regexp.MustCompile(`^https://github.com/.*/(` + ghsaStr + `)$`)
MITRELink = regexp.MustCompile(`^https://cve.mitre.org/.*(` + cveStr + `)$`)
goAdvisoryLink = regexp.MustCompile(`^https://pkg.go.dev/vuln/(` + goIDStr + `)$`)
)
func IsGoAdvisory(u string) bool {
return goAdvisoryLink.MatchString(u)
}