Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fetch/fortinet): collect all CPEs #374

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

MaineK00n
Copy link
Collaborator

What did you implement:

go-cve-dictionary fetch fortinet was not collecting all the CPEs listed in the advisory.
This PR fixes this bug here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

before

$ go-cve-dictionary fetch fortinet
$ sqlite3 cve.sqlite3 "SELECT fortinets.advisory_id, fortinets.cve_id,fortinet_cpes.formatted_string, fortinet_cpes.version_start_excluding,fortinet_cpes.version_start_including,fortinet_cpes.version_end_excluding, fortinet_cpes.version_end_including FROM fortinets JOIN fortinet_cpes ON fortinets.id == fortinet_cpes.fortinet_id WHERE fortinets.advisory_id = 'FG-IR-23-001'" | sort
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-100d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-200c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-200d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-dc-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-lenc-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-3600a:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-ea:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-jp:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-na:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-5001fa2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-5002fb2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-50e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-51e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-52e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-3g4g-vzw:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60dh:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-poe:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-620b:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-621b:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-100c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-90d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-vm01-hyper-v:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-vm01-kvm:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-ea:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-jp:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-na:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-50e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-50E-2r:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-51e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-3g4g-vzw:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2-j:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2-u:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60dh:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-i:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-j:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-poe:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-t:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.0.0||6.0.16
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.2.2:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.2.6||6.2.7
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.2.9||6.2.12
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.10:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.2:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.6:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.8:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:7.0.5:*:*:*:*:*:*:*||||

after

$ go-cve-dictionary fetch fortinet
$ sqlite3 cve.sqlite3 "SELECT fortinets.advisory_id, fortinets.cve_id,fortinet_cpes.formatted_string, fortinet_cpes.version_start_excluding,fortinet_cpes.version_start_including,fortinet_cpes.version_end_excluding, fortinet_cpes.version_end_including FROM fortinets JOIN fortinet_cpes ON fortinets.id == fortinet_cpes.fortinet_id WHERE fortinets.advisory_id = 'FG-IR-23-001'" | sort
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-100d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-200c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-200d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-dc-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-300c-lenc-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-3600a:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-ea:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-jp:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-40f-3g4g-na:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-5001fa2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-5002fb2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-50e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-51e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-52e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-3g4g-vzw:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60dh:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-60d-poe:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-620b:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-621b:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-100c:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigaterugged-90d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-vm01-hyper-v:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortigate-vm01-kvm:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-ea:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-jp:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-40f-3g4g-na:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-50e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-50E-2r:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-51e:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-3g4g-vzw:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2-j:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-gen2-u:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60dh:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-i:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-j:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-poe:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:h:fortinet:fortiwifi-60d-t:-:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||5.0.0||5.6.9
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||6.0.0||6.0.16
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||6.2.0||6.2.12
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||6.4.0||6.4.11
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.0.0||6.0.16
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.2.2:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.2.6||6.2.7
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:*:*:*:*:*:*:*:*||6.2.9||6.2.12
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.10:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.2:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.6:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:6.4.8:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios-6k7k:7.0.5:*:*:*:*:*:*:*||||
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||7.0.0||7.0.9
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*||7.2.0||7.2.3
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiproxy:*:*:*:*:*:*:*:*||1.1.0||1.1.6
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiproxy:*:*:*:*:*:*:*:*||1.2.0||1.2.13
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiproxy:*:*:*:*:*:*:*:*||2.0.0||2.0.12
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiproxy:*:*:*:*:*:*:*:*||7.0.0||7.0.8
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiproxy:*:*:*:*:*:*:*:*||7.2.0||7.2.2
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:*||7.0.0||7.0.1
FG-IR-23-001|CVE-2023-25610|cpe:2.3:o:fortinet:fortiswitchmanager:*:*:*:*:*:*:*:*||7.2.0||7.2.1

Checklist:

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

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@MaineK00n MaineK00n self-assigned this Mar 29, 2024
@MaineK00n MaineK00n requested a review from shino March 29, 2024 02:32
Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!!

@MaineK00n MaineK00n merged commit 13d230a into master Mar 29, 2024
5 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/fix-fetch-fortinet branch March 29, 2024 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants