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

feat(fetcher/redhat): fetch extras, supplementary, els advisories #380

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Apr 3, 2024

What did you implement:

fetch extras, supplementary, els advisories.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

before

$ goval-dictionary fetch redhat 6
$ goval-dictionary.master select --by-cveid redhat 6 CVE-2023-46847
------------------
[]models.Definition{}

after

$ goval-dictionary fetch redhat 6
$ goval-dictionary.pr select --by-cveid redhat 6 CVE-2023-46847
RHSA-2023:6882: squid34 security update (Critical)
[{10917 1839 CVE-2023-46847  8.6/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H CWE-120 critical https://access.redhat.com/security/cve/CVE-2023-46847 20231019}]
RHSA-2023:6884: squid security update (Critical)
[{17170 2889 CVE-2023-46847  8.6/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H CWE-120 critical https://access.redhat.com/security/cve/CVE-2023-46847 20231019}]
------------------
[]models.Definition{
  models.Definition{
    ID:           0x72f,
    RootID:       0x2,
    DefinitionID: "oval:com.redhat.rhsa:def:20236882",
    Title:        "RHSA-2023:6882: squid34 security update (Critical)",
    Description:  "The \"squid34\" packages provide version 3.4 of Squid, a high-performance proxy caching server for web clients, supporting FTP, Gopher, and HTTP data objects. Note that apart from \"squid34\", this version of Red Hat Enterprise Linux also includes the \"squid\" packages which provide Squid version 3.1.\n\nSecurity Fix(es):\n\n* squid: Denial of Service in HTTP Digest Authentication (CVE-2023-46847)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.",
    Advisory:     models.Advisory{
      ID:           0x72f,
      DefinitionID: 0x72f,
      Severity:     "Critical",
      Cves:         []models.Cve{
        models.Cve{
          ID:         0x2aa5,
          AdvisoryID: 0x72f,
          CveID:      "CVE-2023-46847",
          Cvss2:      "",
          Cvss3:      "8.6/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
          Cwe:        "CWE-120",
          Impact:     "critical",
          Href:       "https://access.redhat.com/security/cve/CVE-2023-46847",
          Public:     "20231019",
        },
      },
      Bugzillas: []models.Bugzilla{
        models.Bugzilla{
          ID:         0x252a,
          AdvisoryID: 0x72f,
          BugzillaID: "2245916",
          URL:        "https://bugzilla.redhat.com/2245916",
          Title:      "squid: Denial of Service in HTTP Digest Authentication",
        },
      },
      AffectedCPEList: []models.Cpe{
        models.Cpe{
          ID:         0x44de,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras:6",
        },
        models.Cpe{
          ID:         0x44df,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_hpn:6",
        },
        models.Cpe{
          ID:         0x44e0,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_oracle_java:6",
        },
        models.Cpe{
          ID:         0x44e1,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap:6",
        },
        models.Cpe{
          ID:         0x44e2,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_els:6",
        },
        models.Cpe{
          ID:         0x44e3,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_hana:6",
        },
        models.Cpe{
          ID:         0x44e4,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_hana_els:6",
        },
        models.Cpe{
          ID:         0x44e5,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6",
        },
        models.Cpe{
          ID:         0x44e6,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::client",
        },
        models.Cpe{
          ID:         0x44e7,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::computenode",
        },
        models.Cpe{
          ID:         0x44e8,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::server",
        },
        models.Cpe{
          ID:         0x44e9,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::workstation",
        },
        models.Cpe{
          ID:         0x44ea,
          AdvisoryID: 0x72f,
          Cpe:        "cpe:/o:redhat:rhel_els:6",
        },
      },
      AffectedRepository: "",
      Issued:             2023-11-13 00:00:00 UTC,
      Updated:            2023-11-13 00:00:00 UTC,
    },
    Debian:        (*models.Debian)(nil),
    AffectedPacks: []models.Package{
      models.Package{
        ID:              0x29f1,
        DefinitionID:    0x72f,
        Name:            "squid34",
        Version:         "7:3.4.14-15.el6_10.1",
        Arch:            "",
        NotFixedYet:     false,
        ModularityLabel: "",
      },
    },
    References: []models.Reference{
      models.Reference{
        ID:           0x31d3,
        DefinitionID: 0x72f,
        Source:       "RHSA",
        RefID:        "RHSA-2023:6882",
        RefURL:       "https://access.redhat.com/errata/RHSA-2023:6882",
      },
      models.Reference{
        ID:           0x31d4,
        DefinitionID: 0x72f,
        Source:       "CVE",
        RefID:        "CVE-2023-46847",
        RefURL:       "https://access.redhat.com/security/cve/CVE-2023-46847",
      },
    },
  },
  models.Definition{
    ID:           0xb49,
    RootID:       0x2,
    DefinitionID: "oval:com.redhat.rhsa:def:20236884",
    Title:        "RHSA-2023:6884: squid security update (Critical)",
    Description:  "Squid is a high-performance proxy caching server for web clients, supporting FTP, Gopher, and HTTP data objects.\n\nSecurity Fix(es):\n\n* squid: Denial of Service in HTTP Digest Authentication (CVE-2023-46847)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.",
    Advisory:     models.Advisory{
      ID:           0xb49,
      DefinitionID: 0xb49,
      Severity:     "Critical",
      Cves:         []models.Cve{
        models.Cve{
          ID:         0x4312,
          AdvisoryID: 0xb49,
          CveID:      "CVE-2023-46847",
          Cvss2:      "",
          Cvss3:      "8.6/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
          Cwe:        "CWE-120",
          Impact:     "critical",
          Href:       "https://access.redhat.com/security/cve/CVE-2023-46847",
          Public:     "20231019",
        },
      },
      Bugzillas: []models.Bugzilla{
        models.Bugzilla{
          ID:         0x3a40,
          AdvisoryID: 0xb49,
          BugzillaID: "2245916",
          URL:        "https://bugzilla.redhat.com/2245916",
          Title:      "squid: Denial of Service in HTTP Digest Authentication",
        },
      },
      AffectedCPEList: []models.Cpe{
        models.Cpe{
          ID:         0x6d15,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras:6",
        },
        models.Cpe{
          ID:         0x6d16,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_hpn:6",
        },
        models.Cpe{
          ID:         0x6d17,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_oracle_java:6",
        },
        models.Cpe{
          ID:         0x6d18,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap:6",
        },
        models.Cpe{
          ID:         0x6d19,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_els:6",
        },
        models.Cpe{
          ID:         0x6d1a,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_hana:6",
        },
        models.Cpe{
          ID:         0x6d1b,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/a:redhat:rhel_extras_sap_hana_els:6",
        },
        models.Cpe{
          ID:         0x6d1c,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6",
        },
        models.Cpe{
          ID:         0x6d1d,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::client",
        },
        models.Cpe{
          ID:         0x6d1e,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::computenode",
        },
        models.Cpe{
          ID:         0x6d1f,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::server",
        },
        models.Cpe{
          ID:         0x6d20,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:enterprise_linux:6::workstation",
        },
        models.Cpe{
          ID:         0x6d21,
          AdvisoryID: 0xb49,
          Cpe:        "cpe:/o:redhat:rhel_els:6",
        },
      },
      AffectedRepository: "",
      Issued:             2023-11-13 00:00:00 UTC,
      Updated:            2023-11-13 00:00:00 UTC,
    },
    Debian:        (*models.Debian)(nil),
    AffectedPacks: []models.Package{
      models.Package{
        ID:              0x41d3,
        DefinitionID:    0xb49,
        Name:            "squid",
        Version:         "7:3.1.23-24.el6_10.1",
        Arch:            "",
        NotFixedYet:     false,
        ModularityLabel: "",
      },
    },
    References: []models.Reference{
      models.Reference{
        ID:           0x4e5a,
        DefinitionID: 0xb49,
        Source:       "RHSA",
        RefID:        "RHSA-2023:6884",
        RefURL:       "https://access.redhat.com/errata/RHSA-2023:6884",
      },
      models.Reference{
        ID:           0x4e5b,
        DefinitionID: 0xb49,
        Source:       "CVE",
        RefID:        "CVE-2023-46847",
        RefURL:       "https://access.redhat.com/security/cve/CVE-2023-46847",
      },
    },
  },
}

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 Apr 3, 2024
@MaineK00n MaineK00n requested a review from shino April 3, 2024 06:03
Copy link
Contributor

@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 work! 🎊

@MaineK00n MaineK00n merged commit 778ef23 into master Apr 4, 2024
13 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/redhat branch April 4, 2024 03:24
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