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:
17
cwe/types.go
Normal file
17
cwe/types.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user