vulsio / gost

Build a local copy of Security Tracker. Notify via E-mail/Slack if there is an update.
MIT License
133 stars 44 forks source link

fix(models/microsoft): fill default time to PublishDate, LastUpdateDate #275

Closed MaineK00n closed 2 months ago

MaineK00n commented 2 months ago

If this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.

What did you implement:

As shown below, if there are no revisions, the PublishDate and LastUpdateDate will be 0000-00-00.

$ curl -s https://raw.githubusercontent.com/vulsio/windows-vuln-feed/main/dist/vulnerability/vulnerability.json.gz | zcat | jq -r '.[] | select(.CVEID == "CVE-2022-28737")'
{
  "CVEID": "CVE-2022-28737",
  "Tag": "Mariner",
  "CNA": "security@ubuntu.com",
  "ExploitStatus": "DOS:N/A",
  "Products": null,
  "URL": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-28737"
}

If you are using MySQL, this may fail. https://github.com/vulsio/gost/actions/runs/10783604555/job/29905826463

In such cases, change them to use 1000-01-01 instead of 0000-00-00.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

test by Fetch CI

Checklist:

You don't have to satisfy all of the following.

Is this ready for review?: YES

Reference