add alert data to result json (#747)

* add alert data to result json

* delete omitempty from AlertDict
This commit is contained in:
Tomoya Amachi
2018-12-05 15:38:23 +09:00
committed by Kota Kanbe
parent 9147ec148d
commit a5a800fa0a
3 changed files with 7 additions and 10 deletions

View File

@@ -170,7 +170,7 @@ type VulnInfo struct {
CpeURIs []string `json:"cpeURIs,omitempty"` // CpeURIs related to this CVE defined in config.toml
CveContents CveContents `json:"cveContents"`
Exploits []Exploit `json:"exploits"`
AlertDict AlertDict `json:"alertDict,omitempty"`
AlertDict AlertDict `json:"alertDict"`
}
// Titles returns tilte (TUI)
@@ -691,8 +691,8 @@ type Exploit struct {
// AlertDict has target cve's JPCERT and USCERT alert data
type AlertDict struct {
Ja []alert.Alert
En []alert.Alert
Ja []alert.Alert `json:"ja"`
En []alert.Alert `json:"en"`
}
// HasAlert returns whether or not it has En or Ja entries.