Skip to content

Commit

Permalink
fix(report): set created_at and updated_at of wpscan.com to json (#1161)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed Feb 3, 2021
1 parent d4af341 commit adb686b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions wordpress/wordpress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit adb686b

Please sign in to comment.