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(fetcher/redhat): use redhat oval v2 #308

Merged
merged 1 commit into from
May 9, 2023

Conversation

wagde-orca
Copy link
Contributor

@wagde-orca wagde-orca commented May 8, 2023

OVALv1 data is no longer updated as of April 5, 2023, so OVALv2 is used.

$ curl -s https://access.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2 | bunzip2 --stdout | grep "timestamp"
<oval:timestamp>2023-04-05T15:46:46</oval:timestamp>

However, there seems to be some vulnerability information that is in OVALv1 but not in OVALv2, so OVALv1 is used to supplement the information.

Type of change

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

How Has This Been Tested?

verified that we see the CVE in the new DB

before

$ goval-dictictionary fetch redhat 5 6 7 8 9
INFO[05-09|09:46:58] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL5.xml.bz2
INFO[05-09|09:46:58] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2
INFO[05-09|09:46:58] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2
INFO[05-09|09:46:58] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml.bz2
INFO[05-09|09:46:58] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2
INFO[05-09|09:46:59] Fetched                                  File=com.redhat.rhsa-RHEL9.xml.bz2 Count=222 Timestamp=2023-04-05T15:46:46
WARN[05-09|09:46:59] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2 Timestamp=2023-04-05T15:46:46
INFO[05-09|09:46:59] Refreshing...                            Family=redhat Version=9
INFO[05-09|09:46:59] Inserting new Definitions... 
222 / 222 [------------------------------------------------------] 100.00% ? p/s
INFO[05-09|09:46:59] Finish                                   Updated=222
INFO[05-09|09:46:59] Fetched                                  File=com.redhat.rhsa-RHEL5.xml.bz2 Count=1172 Timestamp=2023-04-05T15:46:45
WARN[05-09|09:46:59] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL5.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|09:46:59] Refreshing...                            Family=redhat Version=5
INFO[05-09|09:46:59] Inserting new Definitions... 
1172 / 1172 [----------------------------------------------------] 100.00% ? p/s
INFO[05-09|09:46:59] Finish                                   Updated=1172
INFO[05-09|09:47:00] Fetched                                  File=com.redhat.rhsa-RHEL8.xml.bz2 Count=1156 Timestamp=2023-04-05T15:46:46
WARN[05-09|09:47:00] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml.bz2 Timestamp=2023-04-05T15:46:46
INFO[05-09|09:47:00] Refreshing...                            Family=redhat Version=8
INFO[05-09|09:47:00] Inserting new Definitions... 
1156 / 1156 [------------------------------------------------] 100.00% 87570 p/s
INFO[05-09|09:47:00] Finish                                   Updated=1156
INFO[05-09|09:47:00] Fetched                                  File=com.redhat.rhsa-RHEL6.xml.bz2 Count=1293 Timestamp=2023-04-05T15:46:45
WARN[05-09|09:47:00] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|09:47:00] Refreshing...                            Family=redhat Version=6
INFO[05-09|09:47:00] Inserting new Definitions... 
1293 / 1293 [------------------------------------------------] 100.00% 71629 p/s
INFO[05-09|09:47:00] Finish                                   Updated=1293
INFO[05-09|09:47:01] Fetched                                  File=com.redhat.rhsa-RHEL7.xml.bz2 Count=1478 Timestamp=2023-04-05T15:46:45
WARN[05-09|09:47:01] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|09:47:01] Refreshing...                            Family=redhat Version=7
INFO[05-09|09:47:01] Inserting new Definitions... 
1478 / 1478 [------------------------------------------------] 100.00% 22134 p/s
INFO[05-09|09:47:01] Finish                                   Updated=1478

after

$ goval-dictionary fetch redhat 5 6 7 8 9
INFO[05-09|15:08:19] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2
INFO[05-09|15:08:19] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL7/rhel-7.oval.xml.bz2
INFO[05-09|15:08:19] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml.bz2
INFO[05-09|15:08:19] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL8/rhel-8.oval.xml.bz2
INFO[05-09|15:08:21] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2
INFO[05-09|15:08:21] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL9/rhel-9.oval.xml.bz2
INFO[05-09|15:08:21] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL5.xml.bz2
INFO[05-09|15:08:21] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2
INFO[05-09|15:08:21] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL6/rhel-6.oval.xml.bz2
INFO[05-09|15:08:22] Fetched                                  File=com.redhat.rhsa-RHEL5.xml.bz2 Count=1172 Timestamp=2023-04-05T15:46:45
WARN[05-09|15:08:22] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL5.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|15:08:22] Refreshing...                            Family=redhat Version=5
INFO[05-09|15:08:22] Inserting new Definitions... 
1172 / 1172 [------------------------------------------------------------------------------------------] 100.00% ? p/s
INFO[05-09|15:08:22] Finish                                   Updated=1172
INFO[05-09|15:08:22] Fetched                                  File=com.redhat.rhsa-RHEL6.xml.bz2 Count=1293 Timestamp=2023-04-05T15:46:45
WARN[05-09|15:08:22] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|15:08:23] Fetched                                  File=rhel-6.oval.xml.bz2 Count=1555 Timestamp=2023-05-06T10:09:20
INFO[05-09|15:08:23] Refreshing...                            Family=redhat Version=6
INFO[05-09|15:08:23] Inserting new Definitions... 
1645 / 1645 [--------------------------------------------------------------------------------------] 100.00% 15752 p/s
INFO[05-09|15:08:23] Finish                                   Updated=1645
INFO[05-09|15:08:23] Fetched                                  File=rhel-7.oval.xml.bz2 Count=1494 Timestamp=2023-05-06T10:12:25
INFO[05-09|15:08:24] Fetched                                  File=com.redhat.rhsa-RHEL7.xml.bz2 Count=1478 Timestamp=2023-04-05T15:46:45
WARN[05-09|15:08:24] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2 Timestamp=2023-04-05T15:46:45
INFO[05-09|15:08:24] Refreshing...                            Family=redhat Version=7
INFO[05-09|15:08:24] Inserting new Definitions... 
1548 / 1548 [--------------------------------------------------------------------------------------] 100.00% 19910 p/s
INFO[05-09|15:08:24] Finish                                   Updated=1548
INFO[05-09|15:08:25] Fetched                                  File=rhel-8.oval.xml.bz2 Count=1171 Timestamp=2023-05-08T22:57:50
INFO[05-09|15:08:25] Fetched                                  File=com.redhat.rhsa-RHEL8.xml.bz2 Count=1156 Timestamp=2023-04-05T15:46:46
WARN[05-09|15:08:25] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml.bz2 Timestamp=2023-04-05T15:46:46
INFO[05-09|15:08:25] Refreshing...                            Family=redhat Version=8
INFO[05-09|15:08:25] Inserting new Definitions... 
1171 / 1171 [--------------------------------------------------------------------------------------] 100.00% 26091 p/s
INFO[05-09|15:08:25] Finish                                   Updated=1171
INFO[05-09|15:08:25] Fetched                                  File=com.redhat.rhsa-RHEL9.xml.bz2 Count=222 Timestamp=2023-04-05T15:46:46
WARN[05-09|15:08:25] The fetched OVAL has not been updated for 3 days, the OVAL URL may have changed, please register a GitHub issue. GitHub=https://github.com/vulsio/goval-dictionary/issues OVAL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2 Timestamp=2023-04-05T15:46:46
INFO[05-09|15:08:25] Fetched                                  File=rhel-9.oval.xml.bz2 Count=240 Timestamp=2023-05-08T22:56:44
INFO[05-09|15:08:25] Refreshing...                            Family=redhat Version=9
INFO[05-09|15:08:25] Inserting new Definitions... 
240 / 240 [--------------------------------------------------------------------------------------------] 100.00% ? p/s
INFO[05-09|15:08:25] Finish                                   Updated=240

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
Copy link
Collaborator

duplicate
#130

@MaineK00n MaineK00n closed this May 8, 2023
@MaineK00n
Copy link
Collaborator

It looks like it hasn't been updated in a month......

$ curl -s https://access.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml.bz2 | bunzip2 --stdout | grep "timestamp"
<oval:timestamp>2023-04-05T15:46:46</oval:timestamp>

@MaineK00n
Copy link
Collaborator

@wagde-orca
Please wait a little while as we will migrate to OVALv2 with the highest priority.

@MaineK00n MaineK00n reopened this May 9, 2023
@MaineK00n MaineK00n self-requested a review May 9, 2023 00:38
@MaineK00n MaineK00n merged commit 7030ca7 into vulsio:master May 9, 2023
@MaineK00n MaineK00n changed the title use redhat oval v2 fix(fetcher/redhat): use redhat oval v2 May 9, 2023
@MaineK00n
Copy link
Collaborator

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