1
0
mirror of https://github.com/securego/gosec.git synced 2025-06-14 23:45:03 +02:00

Generate the SARIF types, handle taxonomies and separate responsibilities

This commit is contained in:
Matthieu MOREL
2021-05-05 18:54:32 +02:00
committed by GitHub
parent 0fa5d0b2d6
commit cc83d4c922
13 changed files with 2011 additions and 279 deletions

17
cwe/types.go Normal file
View File

@ -0,0 +1,17 @@
package cwe
import (
"fmt"
)
// Weakness defines a CWE weakness based on http://cwe.mitre.org/data/xsd/cwe_schema_v6.4.xsd
type Weakness struct {
ID string
Name string
Description string
}
//URL Expose the CWE URL
func (w *Weakness) URL() string {
return fmt.Sprintf("https://cwe.mitre.org/data/definitions/%s.html", w.ID)
}