mirror of
https://github.com/securego/gosec.git
synced 2025-11-27 22:28:20 +02:00
Fix lint and fail on error in the ci build
This commit is contained in:
10
cwe/types.go
10
cwe/types.go
@@ -12,17 +12,17 @@ type Weakness struct {
|
||||
Description string
|
||||
}
|
||||
|
||||
//SprintURL format the CWE URL
|
||||
// SprintURL format the CWE URL
|
||||
func (w *Weakness) SprintURL() string {
|
||||
return fmt.Sprintf("https://cwe.mitre.org/data/definitions/%s.html", w.ID)
|
||||
}
|
||||
|
||||
//SprintID format the CWE ID
|
||||
// SprintID format the CWE ID
|
||||
func (w *Weakness) SprintID() string {
|
||||
return fmt.Sprintf("%s-%s", Acronym, w.ID)
|
||||
}
|
||||
|
||||
//MarshalJSON print only id and URL
|
||||
// MarshalJSON print only id and URL
|
||||
func (w *Weakness) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(&struct {
|
||||
ID string `json:"id"`
|
||||
@@ -33,12 +33,12 @@ func (w *Weakness) MarshalJSON() ([]byte, error) {
|
||||
})
|
||||
}
|
||||
|
||||
//InformationURI link to the published CWE PDF
|
||||
// InformationURI link to the published CWE PDF
|
||||
func InformationURI() string {
|
||||
return fmt.Sprintf("https://cwe.mitre.org/data/published/cwe_v%s.pdf/", Version)
|
||||
}
|
||||
|
||||
//DownloadURI link to the zipped XML of the CWE list
|
||||
// DownloadURI link to the zipped XML of the CWE list
|
||||
func DownloadURI() string {
|
||||
return fmt.Sprintf("https://cwe.mitre.org/data/xml/cwec_v%s.xml.zip", Version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user