Remove commented out code
This commit is contained in:
@@ -237,91 +237,6 @@ func formatFullPlainText(r models.ScanResult) string {
|
||||
return fmt.Sprintf("%s\n%s", header, table)
|
||||
}
|
||||
|
||||
// type distroLink struct {
|
||||
// title string
|
||||
// url string
|
||||
// }
|
||||
|
||||
// distroLinks add Vendor URL of the CVE to table
|
||||
// func distroLinks(cveInfo models.CveInfo, osFamily string) []distroLink {
|
||||
// cveID := cveInfo.VulnInfo.CveID
|
||||
// switch osFamily {
|
||||
// case "rhel", "centos":
|
||||
// links := []distroLink{
|
||||
// {
|
||||
// "RHEL-CVE",
|
||||
// fmt.Sprintf("%s/%s", redhatSecurityBaseURL, cveID),
|
||||
// },
|
||||
// }
|
||||
// for _, advisory := range cveInfo.DistroAdvisories {
|
||||
// aidURL := strings.Replace(advisory.AdvisoryID, ":", "-", -1)
|
||||
// links = append(links, distroLink{
|
||||
// // "RHEL-errata",
|
||||
// advisory.AdvisoryID,
|
||||
// fmt.Sprintf(redhatRHSABaseBaseURL, aidURL),
|
||||
// })
|
||||
// }
|
||||
// return links
|
||||
// case "oraclelinux":
|
||||
// links := []distroLink{
|
||||
// {
|
||||
// "Oracle-CVE",
|
||||
// fmt.Sprintf(oracleSecurityBaseURL, cveID),
|
||||
// },
|
||||
// }
|
||||
// for _, advisory := range cveInfo.DistroAdvisories {
|
||||
// links = append(links, distroLink{
|
||||
// // "Oracle-ELSA"
|
||||
// advisory.AdvisoryID,
|
||||
// fmt.Sprintf(oracleELSABaseBaseURL, advisory.AdvisoryID),
|
||||
// })
|
||||
// }
|
||||
// return links
|
||||
// case "amazon":
|
||||
// links := []distroLink{
|
||||
// {
|
||||
// "RHEL-CVE",
|
||||
// fmt.Sprintf("%s/%s", redhatSecurityBaseURL, cveID),
|
||||
// },
|
||||
// }
|
||||
// for _, advisory := range cveInfo.DistroAdvisories {
|
||||
// links = append(links, distroLink{
|
||||
// // "Amazon-ALAS",
|
||||
// advisory.AdvisoryID,
|
||||
// fmt.Sprintf(amazonSecurityBaseURL, advisory.AdvisoryID),
|
||||
// })
|
||||
// }
|
||||
// return links
|
||||
// case "ubuntu":
|
||||
// return []distroLink{
|
||||
// {
|
||||
// "Ubuntu-CVE",
|
||||
// fmt.Sprintf("%s/%s", ubuntuSecurityBaseURL, cveID),
|
||||
// },
|
||||
// //TODO Ubuntu USN
|
||||
// }
|
||||
// case "debian":
|
||||
// return []distroLink{
|
||||
// {
|
||||
// "Debian-CVE",
|
||||
// fmt.Sprintf("%s/%s", debianTrackerBaseURL, cveID),
|
||||
// },
|
||||
// // TODO Debian dsa
|
||||
// }
|
||||
// case "FreeBSD":
|
||||
// links := []distroLink{}
|
||||
// for _, advisory := range cveInfo.DistroAdvisories {
|
||||
// links = append(links, distroLink{
|
||||
// "FreeBSD-VuXML",
|
||||
// fmt.Sprintf(freeBSDVuXMLBaseURL, advisory.AdvisoryID),
|
||||
// })
|
||||
// }
|
||||
// return links
|
||||
// default:
|
||||
// return []distroLink{}
|
||||
// }
|
||||
// }
|
||||
|
||||
func cweURL(cweID string) string {
|
||||
return fmt.Sprintf("https://cwe.mitre.org/data/definitions/%s.html",
|
||||
strings.TrimPrefix(cweID, "CWE-"))
|
||||
|
||||
Reference in New Issue
Block a user