From adb686b7c92b9d4ff953878f814622ccdd65e64a Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Wed, 3 Feb 2021 16:41:44 +0900 Subject: [PATCH] fix(report): set created_at and updated_at of wpscan.com to json (#1161) --- wordpress/wordpress.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/wordpress/wordpress.go b/wordpress/wordpress.go index fd7be738..8d120c57 100644 --- a/wordpress/wordpress.go +++ b/wordpress/wordpress.go @@ -32,11 +32,10 @@ type WpCveInfos struct { //WpCveInfo is for wpscan json type WpCveInfo struct { - ID string `json:"id"` - Title string `json:"title"` - CreatedAt string `json:"created_at"` - UpdatedAt string `json:"updated_at"` - // PublishedDate string `json:"published_date"` + ID string `json:"id"` + Title string `json:"title"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` VulnType string `json:"vuln_type"` References References `json:"references"` FixedIn string `json:"fixed_in"` @@ -198,10 +197,12 @@ func extractToVulnInfos(pkgName string, cves []WpCveInfo) (vinfos []models.VulnI CveID: cveID, CveContents: models.NewCveContents( models.CveContent{ - Type: models.WpScan, - CveID: cveID, - Title: vulnerability.Title, - References: refs, + Type: models.WpScan, + CveID: cveID, + Title: vulnerability.Title, + References: refs, + Published: vulnerability.CreatedAt, + LastModified: vulnerability.UpdatedAt, }, ), VulnType: vulnerability.VulnType,