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): fetch oval v1 #323

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Jul 13, 2023

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

What did you implement:

Fixes #322

Type of change

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

How Has This Been Tested?

before

$ goval-dictionary fetch redhat 5 6 7 8 9
INFO[07-14|03:35:45] Fetching...                              URL=https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2
INFO[07-14|03:35:45] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL6/rhel-6.oval.xml.bz2
Failed to fetch files. err: Failed to fetch. err: [Failed to HTTP GET. url: https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL6.xml.bz2, response: &{Status:404 Not Found StatusCode:404 Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept-Ranges:[bytes] Cache-Control:[max-age=0, no-cache, no-store] Content-Length:[4175] Content-Type:[text/html] Date:[Thu, 13 Jul 2023 18:35:47 GMT] Etag:["ae034f3a82c72cf3e42fbff031eb884e:1605205643.329165"] Expires:[Thu, 13 Jul 2023 18:35:47 GMT] Last-Modified:[Thu, 12 Nov 2020 18:26:58 GMT] Pragma:[no-cache] Server:[AkamaiNetStorage]] Body:{cs:0xc000148900} ContentLength:4175 TransferEncoding:[] Close:false Uncompressed:false Trailer:map[] Request:0xc000140000 TLS:0xc00014c210}]

after

$ goval-dictionary fetch redhat 5 6 7 8 9
INFO[07-14|12:08:53] Fetching...                              URL=https://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz
INFO[07-14|12:08:56] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL6/rhel-6.oval.xml.bz2
INFO[07-14|12:08:56] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL7/rhel-7.oval.xml.bz2
INFO[07-14|12:08:56] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL8/rhel-8.oval.xml.bz2
INFO[07-14|12:08:56] Fetching...                              URL=https://access.redhat.com/security/data/oval/v2/RHEL9/rhel-9.oval.xml.bz2
INFO[07-14|12:08:57] Fetched                                  File=com.redhat.rhsa-RHEL6.xml Count=1293 Timestamp=2023-04-05T15:46:45
WARN[07-14|12:08:57] 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://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz/com.redhat.rhsa-RHEL6.xml Timestamp=2023-04-05T15:46:45
INFO[07-14|12:08:57] Fetched                                  File=rhel-6.oval.xml.bz2 Count=1555 Timestamp=2023-07-08T11:19:14
WARN[07-14|12:08:57] 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://access.redhat.com/security/data/oval/v2/RHEL6/rhel-6.oval.xml.bz2 Timestamp=2023-07-08T11:19:14
INFO[07-14|12:08:57] Refreshing...                            Family=redhat Version=6
INFO[07-14|12:08:57] Inserting new Definitions... 
1645 / 1645 [------------------------------------------------] 100.00% 10280 p/s
INFO[07-14|12:08:58] Finish                                   Updated=1645
INFO[07-14|12:08:58] Fetched                                  File=com.redhat.rhsa-RHEL7.xml Count=1478 Timestamp=2023-04-05T15:46:45
WARN[07-14|12:08:58] 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://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz/com.redhat.rhsa-RHEL7.xml Timestamp=2023-04-05T15:46:45
INFO[07-14|12:08:59] Fetched                                  File=rhel-7.oval.xml.bz2 Count=1508 Timestamp=2023-07-13T15:00:01
INFO[07-14|12:08:59] Refreshing...                            Family=redhat Version=7
INFO[07-14|12:08:59] Inserting new Definitions... 
1562 / 1562 [-------------------------------------------------] 100.00% 9732 p/s
INFO[07-14|12:08:59] Finish                                   Updated=1562
INFO[07-14|12:08:59] Fetched                                  File=com.redhat.rhsa-RHEL8.xml Count=1156 Timestamp=2023-04-05T15:46:46
WARN[07-14|12:08: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://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz/com.redhat.rhsa-RHEL8.xml Timestamp=2023-04-05T15:46:46
INFO[07-14|12:09:00] Fetched                                  File=rhel-8.oval.xml.bz2 Count=1260 Timestamp=2023-07-13T15:01:00
INFO[07-14|12:09:00] Refreshing...                            Family=redhat Version=8
INFO[07-14|12:09:00] Inserting new Definitions... 
1260 / 1260 [-------------------------------------------------] 100.00% 7470 p/s
INFO[07-14|12:09:00] Finish                                   Updated=1260
INFO[07-14|12:09:00] Fetched                                  File=com.redhat.rhsa-RHEL9.xml Count=222 Timestamp=2023-04-05T15:46:46
WARN[07-14|12:09: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://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz/com.redhat.rhsa-RHEL9.xml Timestamp=2023-04-05T15:46:46
INFO[07-14|12:09:00] Fetched                                  File=rhel-9.oval.xml.bz2 Count=335 Timestamp=2023-07-13T15:00:21
INFO[07-14|12:09:00] Refreshing...                            Family=redhat Version=9
INFO[07-14|12:09:00] Inserting new Definitions... 
335 / 335 [------------------------------------------------------] 100.00% ? p/s
INFO[07-14|12:09:00] Finish                                   Updated=335
INFO[07-14|12:09:01] Fetched                                  File=com.redhat.rhsa-RHEL5.xml Count=1172 Timestamp=2023-04-05T15:46:45
WARN[07-14|12:09: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://access.redhat.com/security/data/archive/oval_v1_20230706.tar.gz/com.redhat.rhsa-RHEL5.xml Timestamp=2023-04-05T15:46:45
INFO[07-14|12:09:01] Refreshing...                            Family=redhat Version=5
INFO[07-14|12:09:01] Inserting new Definitions... 
1172 / 1172 [------------------------------------------------] 100.00% 29167 p/s
INFO[07-14|12:09:01] Finish                                   Updated=1172

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 Jul 13, 2023
@MaineK00n MaineK00n force-pushed the MaineK00n/redhat-ovalv1 branch 2 times, most recently from f0a4743 to b2079a2 Compare July 14, 2023 02:55
@MaineK00n MaineK00n force-pushed the MaineK00n/redhat-ovalv1 branch from b2079a2 to e2a5e77 Compare July 14, 2023 03:01
@MaineK00n MaineK00n requested a review from kotakanbe July 14, 2023 03:10
@kotakanbe kotakanbe merged commit 07005b4 into master Jul 14, 2023
@kotakanbe kotakanbe deleted the MaineK00n/redhat-ovalv1 branch July 14, 2023 04:11
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.

RHEL oval v1 archive location was changed.
2 participants