Delete publisher too, we're using apollo_tree

This commit is contained in:
Mustafa Gezen 2023-02-17 19:38:04 +01:00
parent 032909173e
commit 53d53f03ac
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
42 changed files with 0 additions and 8085 deletions

View File

@ -1,30 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "rherrata",
srcs = [
"api.go",
"compact_errata.go",
"errata.go",
"mock.go",
],
importpath = "peridot.resf.org/apollo/rherrata",
visibility = ["//visibility:public"],
deps = [
"//apollo/proto/v1:pb",
"//vendor/github.com/PuerkitoBio/goquery",
"//vendor/github.com/go-chi/chi",
"//vendor/github.com/gocolly/colly/v2:colly",
],
)
go_test(
name = "rherrata_test",
srcs = ["errata_test.go"],
data = glob(["testdata/**"]),
embed = [":rherrata"],
deps = [
"//apollo/proto/v1:pb",
"//vendor/github.com/stretchr/testify/require",
],
)

View File

@ -1,72 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rherrata
import (
"io"
"net/http"
"time"
)
type APIService interface {
GetErrata(advisory string) (*Errata, error)
GetAdvisories(currentVersion string, after *time.Time) ([]*CompactErrata, error)
}
// API is the APIService implementation. Should not be used directly
type API struct {
client *http.Client
userAgent string
baseURLErrata string
baseURLAPI string
}
func NewClient() *API {
return &API{
client: &http.Client{
Timeout: 30 * time.Second,
},
userAgent: "apollo/rherrata/0.2",
baseURLErrata: "https://access.redhat.com/errata",
baseURLAPI: "https://access.redhat.com/hydra/rest/search/kcs",
}
}
func (a *API) newRequest(method string, url string, body io.Reader) (*http.Request, error) {
req, err := http.NewRequest(method, url, body)
if err != nil {
return nil, err
}
req.Header.Set("User-Agent", a.userAgent)
return req, nil
}

View File

@ -1,98 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rherrata
import (
"encoding/json"
"fmt"
"net/url"
"strings"
"time"
)
var internalAfterDates = map[string]string{
"8.4": "2021-04-29T00:00:00Z",
"9.0": "2022-05-17T00:00:00Z",
}
type CompactErrata struct {
Name string `json:"id"`
Description string `json:"portal_description"`
Synopsis string `json:"portal_synopsis"`
Severity string `json:"portal_severity"`
Type string `json:"portal_advisory_type"`
AffectedPackages []string `json:"portal_package"`
CVEs []string `json:"portal_CVE"`
Fixes []string `json:"portal_BZ"`
PublicationDate string `json:"portal_publication_date"`
}
type internalAdvisoriesInnerResponse struct {
Docs []*CompactErrata `json:"docs"`
}
type internalAdvisoriesResponse struct {
Response *internalAdvisoriesInnerResponse `json:"response"`
}
func (a *API) GetAdvisories(currentVersion string, after *time.Time) ([]*CompactErrata, error) {
req, err := a.newRequest("GET", a.baseURLAPI, nil)
if err != nil {
return nil, err
}
fq1 := "documentKind:(%22Errata%22)"
usableVersion := strings.Replace(currentVersion, ".", "%5C.", -1)
fq2 := fmt.Sprintf("portal_product_filter:Red%%5C+Hat%%5C+Enterprise%%5C+Linux%%7C*%%7C%s%%7C*", usableVersion)
var fq3 string
if after != nil {
fq3 = "&fq=" + url.QueryEscape(fmt.Sprintf("portal_publication_date:[%s TO NOW]", after.Format(time.RFC3339)))
} else if afterDate := internalAfterDates[currentVersion]; afterDate != "" {
fq3 = "&fq=" + url.QueryEscape(fmt.Sprintf("portal_publication_date:[%s TO NOW]", afterDate))
}
req.URL.RawQuery = fmt.Sprintf("fq=%s&fq=%s%s&q=*:*&rows=10000&sort=portal_publication_date+desc&start=0", fq1, fq2, fq3)
req.Header.Set("Accept", "application/json")
res, err := a.client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
var marshalBody internalAdvisoriesResponse
err = json.NewDecoder(res.Body).Decode(&marshalBody)
if err != nil {
return nil, err
}
return marshalBody.Response.Docs, nil
}

View File

@ -1,236 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rherrata
import (
"errors"
"fmt"
"github.com/PuerkitoBio/goquery"
"github.com/gocolly/colly/v2"
apollopb "peridot.resf.org/apollo/pb"
"strings"
"time"
)
type Architecture string
const (
ArchX8664 Architecture = "x86_64"
ArchAArch64 Architecture = "aarch64"
ArchPPC64 Architecture = "ppc64le"
ArchS390X Architecture = "s390x"
ArchNoArch Architecture = "noarch"
)
type Fix struct {
BugzillaID string
Description string
}
type UpdatedPackages struct {
SRPMs []string
Packages map[Architecture][]string
}
type Errata struct {
Synopsis string
Type apollopb.Advisory_Type
Severity apollopb.Advisory_Severity
Topic []string
Description []string
Solution []string
AffectedProducts map[string]*UpdatedPackages
Fixes []*Fix
CVEs []string
References []string
IssuedAt time.Time
}
func (a *API) GetErrata(advisory string) (*Errata, error) {
var err error
var errata Errata
c := colly.NewCollector(colly.UserAgent(a.userAgent))
// Do not fix this typo. It is like this on Red Hat's website
c.OnHTML("div#synpopsis", func(element *colly.HTMLElement) {
errata.Synopsis = element.DOM.Find("p").Text()
})
c.OnHTML("div#topic > p", func(element *colly.HTMLElement) {
errata.Topic = append(errata.Topic, element.Text)
})
c.OnHTML("div#solution > p", func(element *colly.HTMLElement) {
errata.Solution = append(errata.Solution, element.Text)
})
c.OnHTML("div#fixes > ul > li", func(element *colly.HTMLElement) {
fixComponents := strings.SplitN(element.Text, "-", 3)
if len(fixComponents) != 3 {
return
}
for i, comp := range fixComponents {
fixComponents[i] = strings.TrimSpace(comp)
}
fix := &Fix{
BugzillaID: fixComponents[1],
Description: fixComponents[2],
}
errata.Fixes = append(errata.Fixes, fix)
})
c.OnHTML("div#cves > ul > li", func(element *colly.HTMLElement) {
errata.CVEs = append(errata.CVEs, strings.TrimSpace(element.Text))
})
c.OnHTML("div#references > ul > li", func(element *colly.HTMLElement) {
errata.References = append(errata.References, strings.TrimSpace(element.Text))
})
c.OnHTML("dl.details", func(element *colly.HTMLElement) {
issuedAt, err := time.Parse("2006-01-02", element.DOM.Find("dd").First().Text())
if err == nil {
errata.IssuedAt = issuedAt
}
})
c.OnHTML("div#packages", func(element *colly.HTMLElement) {
productIndex := map[int]string{}
products := map[string]*UpdatedPackages{}
element.DOM.Find("h2").Each(func(i int, selection *goquery.Selection) {
productIndex[i] = selection.Text()
products[selection.Text()] = &UpdatedPackages{}
})
element.DOM.Find("table.files").Each(func(i int, selection *goquery.Selection) {
productUpdate := products[productIndex[i]]
if productUpdate.Packages == nil {
productUpdate.Packages = map[Architecture][]string{}
}
selection.Find("td.name").Each(func(_ int, selection *goquery.Selection) {
name := strings.TrimSpace(selection.Text())
isRpm := strings.HasSuffix(name, ".rpm")
isSrcRpm := strings.HasSuffix(name, ".src.rpm")
if isRpm {
if isSrcRpm {
productUpdate.SRPMs = append(productUpdate.SRPMs, name)
} else {
var arch Architecture
if strings.Contains(name, ".x86_64") || strings.Contains(name, ".i686") {
arch = ArchX8664
} else if strings.Contains(name, ".aarch64") {
arch = ArchAArch64
} else if strings.Contains(name, ".ppc64le") {
arch = ArchPPC64
} else if strings.Contains(name, ".s390x") {
arch = ArchS390X
} else if strings.Contains(name, ".noarch") {
arch = ArchNoArch
}
if productUpdate.Packages[arch] == nil {
productUpdate.Packages[arch] = []string{}
}
productUpdate.Packages[arch] = append(productUpdate.Packages[arch], name)
}
}
})
errata.AffectedProducts = products
})
})
c.OnHTML("div#description > p", func(element *colly.HTMLElement) {
htmlText, err := element.DOM.Html()
if err != nil {
return
}
htmlText = strings.TrimSuffix(htmlText, "<br/>")
if element.Text == "Security Fix(es):" || element.Text == "Bug Fix(es) and Enhancement(s):" || element.Text == "Bug Fix(es):" || element.Text == "Enhancement(s):" {
return
}
errata.Description = append(errata.Description, strings.Split(htmlText, "<br/>")...)
})
c.OnHTML("div#type-severity", func(element *colly.HTMLElement) {
typeSeverity := strings.Split(element.DOM.Find("p").Text(), ":")
if typeSeverity[0] == "Product Enhancement Advisory" {
errata.Type = apollopb.Advisory_TYPE_ENHANCEMENT
} else if typeSeverity[0] == "Bug Fix Advisory" {
errata.Type = apollopb.Advisory_TYPE_BUGFIX
} else {
if len(typeSeverity) != 2 {
err = errors.New("invalid type/severity")
return
}
typeSplit := strings.Split(typeSeverity[0], " ")
if len(typeSplit) != 2 {
err = errors.New("invalid type")
return
}
switch strings.TrimSpace(typeSplit[0]) {
case "Security":
errata.Type = apollopb.Advisory_TYPE_SECURITY
break
case "BugFix":
errata.Type = apollopb.Advisory_TYPE_BUGFIX
break
case "Enhancement":
errata.Type = apollopb.Advisory_TYPE_ENHANCEMENT
break
}
switch strings.TrimSpace(typeSeverity[1]) {
case "Low":
errata.Severity = apollopb.Advisory_SEVERITY_LOW
break
case "Moderate":
errata.Severity = apollopb.Advisory_SEVERITY_MODERATE
break
case "Important":
errata.Severity = apollopb.Advisory_SEVERITY_IMPORTANT
break
case "Critical":
errata.Severity = apollopb.Advisory_SEVERITY_CRITICAL
break
}
}
})
errC := c.Visit(fmt.Sprintf("%s/%s", a.baseURLErrata, advisory))
if errC != nil {
return nil, errC
}
c.Wait()
if err != nil {
return nil, err
}
return &errata, nil
}

View File

@ -1,141 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rherrata
import (
"github.com/stretchr/testify/require"
"io/ioutil"
apollopb "peridot.resf.org/apollo/pb"
"testing"
)
func newInstance() *MockInstance {
return NewMock()
}
func TestRHBA20212759(t *testing.T) {
mock := newInstance()
htmlFile, err := ioutil.ReadFile("testdata/RHBA-2021-2759.html")
require.Nil(t, err)
mock.HTMLResponses["RHBA-2021:2759"] = string(htmlFile[:])
errata, err := mock.API.GetErrata("RHBA-2021:2759")
require.Nil(t, err)
require.Equal(t, "firefox bugfix update", errata.Synopsis)
require.Equal(t, apollopb.Advisory_TYPE_BUGFIX, errata.Type)
require.Len(t, errata.Topic, 1)
require.Equal(t, "An update for firefox is now available for Red Hat Enterprise Linux 8.", errata.Topic[0])
require.Len(t, errata.Description, 3)
require.Equal(t, "Mozilla Firefox is an open-source web browser, designed for standards", errata.Description[0])
require.Equal(t, "compliance, performance, and portability.", errata.Description[1])
require.Equal(t, "This update upgrades Firefox to version 78.12.0 ESR.", errata.Description[2])
require.Len(t, errata.AffectedProducts, 12)
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - AUS 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for IBM z Systems 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for Power, little endian 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - TUS 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for ARM 64 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4"])
x86 := errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 8"]
require.Len(t, x86.SRPMs, 1)
require.Equal(t, "firefox-78.12.0-2.el8_4.src.rpm", x86.SRPMs[0])
require.Len(t, x86.Packages[ArchX8664], 3)
require.Equal(t, "firefox-78.12.0-2.el8_4.x86_64.rpm", x86.Packages[ArchX8664][0])
require.Equal(t, "firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm", x86.Packages[ArchX8664][1])
require.Equal(t, "firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm", x86.Packages[ArchX8664][2])
}
func TestRHBA20212743(t *testing.T) {
mock := newInstance()
htmlFile, err := ioutil.ReadFile("testdata/RHSA-2021-2743.html")
require.Nil(t, err)
mock.HTMLResponses["RHSA-2021:2743"] = string(htmlFile[:])
errata, err := mock.API.GetErrata("RHSA-2021:2743")
require.Nil(t, err)
require.Equal(t, "Important: firefox security update", errata.Synopsis)
require.Equal(t, apollopb.Advisory_TYPE_SECURITY, errata.Type)
require.Equal(t, apollopb.Advisory_SEVERITY_IMPORTANT, errata.Severity)
require.Len(t, errata.Topic, 2)
require.Equal(t, "An update for firefox is now available for Red Hat Enterprise Linux 8.", errata.Topic[0])
require.Equal(t, "Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.", errata.Topic[1])
require.Len(t, errata.Description, 3)
require.Equal(t, "Mozilla Firefox is an open-source web browser, designed for standards compliance, performance, and portability.", errata.Description[0])
require.Equal(t, "This update upgrades Firefox to version 78.12.0 ESR.", errata.Description[1])
require.Equal(t, "For 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.", errata.Description[2])
require.Len(t, errata.AffectedProducts, 12)
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - AUS 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for IBM z Systems 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for Power, little endian 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - TUS 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for ARM 64 8"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4"])
require.NotNil(t, errata.AffectedProducts["Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4"])
require.Len(t, errata.Fixes, 3)
require.Equal(t, "1970109", errata.Fixes[0].BugzillaID)
require.Equal(t, "CVE-2021-30547 chromium-browser: Out of bounds write in ANGLE", errata.Fixes[0].Description)
require.Equal(t, "1982013", errata.Fixes[1].BugzillaID)
require.Equal(t, "CVE-2021-29970 Mozilla: Use-after-free in accessibility features of a document", errata.Fixes[1].Description)
require.Equal(t, "1982014", errata.Fixes[2].BugzillaID)
require.Equal(t, "CVE-2021-29976 Mozilla: Memory safety bugs fixed in Firefox 90 and Firefox ESR 78.12", errata.Fixes[2].Description)
require.Len(t, errata.CVEs, 3)
require.Equal(t, "CVE-2021-29970", errata.CVEs[0])
require.Equal(t, "CVE-2021-29976", errata.CVEs[1])
require.Equal(t, "CVE-2021-30547", errata.CVEs[2])
require.Len(t, errata.References, 1)
require.Equal(t, "https://access.redhat.com/security/updates/classification/#important", errata.References[0])
x86 := errata.AffectedProducts["Red Hat Enterprise Linux for x86_64 8"]
require.Len(t, x86.SRPMs, 1)
require.Equal(t, "firefox-78.12.0-1.el8_4.src.rpm", x86.SRPMs[0])
require.Len(t, x86.Packages[ArchX8664], 3)
require.Equal(t, "firefox-78.12.0-1.el8_4.x86_64.rpm", x86.Packages[ArchX8664][0])
require.Equal(t, "firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm", x86.Packages[ArchX8664][1])
require.Equal(t, "firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm", x86.Packages[ArchX8664][2])
}

View File

@ -1,88 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rherrata
import (
"encoding/json"
"github.com/go-chi/chi"
"net/http"
"net/http/httptest"
)
type MockInstance struct {
API *API
// Mapped to advisory id/name
HTMLResponses map[string]string
Advisories *internalAdvisoriesResponse
TestServerErrata *httptest.Server
TestServerMock *httptest.Server
}
func NewMock() *MockInstance {
mockInstance := &MockInstance{
HTMLResponses: map[string]string{},
Advisories: &internalAdvisoriesResponse{
Response: &internalAdvisoriesInnerResponse{
Docs: []*CompactErrata{},
},
},
}
muxErrata := chi.NewMux()
muxErrata.Get("/{advisory}", func(w http.ResponseWriter, r *http.Request) {
advisory := chi.URLParam(r, "advisory")
if response := mockInstance.HTMLResponses[advisory]; response != "" {
w.Header().Set("Content-Type", "text/html")
_, _ = w.Write([]byte(response))
} else {
w.WriteHeader(http.StatusNotFound)
}
})
muxAPI := chi.NewMux()
muxAPI.Get("/*", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(mockInstance.Advisories)
})
api := NewClient()
tsErrata := httptest.NewServer(muxErrata)
tsAPI := httptest.NewServer(muxAPI)
api.baseURLErrata = tsErrata.URL
api.baseURLAPI = tsAPI.URL
mockInstance.API = api
mockInstance.TestServerErrata = tsErrata
return mockInstance
}

View File

@ -1,697 +0,0 @@
<!--
~ Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
~ Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
~ Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ 1. Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~
~ 2. Redistributions in binary form must reproduce the above copyright notice,
~ this list of conditions and the following disclaimer in the documentation
~ and/or other materials provided with the distribution.
~
~ 3. Neither the name of the copyright holder nor the names of its contributors
~ may be used to endorse or promote products derived from this software without
~ specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
~ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
~ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
~ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
~ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
~ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
~ POSSIBILITY OF SUCH DAMAGE.
-->
<div class='print-single'>
<dl class='details'>
<dt>Issued:</dt>
<dd>2021-07-16</dd>
<dt>Updated:</dt>
<dd>2021-07-16</dd>
</dl>
<h1>RHBA-2021:2759 - Bug Fix Advisory</h1>
<div id='tabs'>
<ul class='nav nav-tabs'>
<li><a role="tab" data-taggle="tab" href="#overview">Overview</a></li>
<li><a role="tab" data-toggle="tab" href="#packages">Updated Packages</a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane' id='overview'>
<div class='cp-grid' data-cp-grid='xs-1-cols md-2-cols lg-2-cols'>
<div class='cp-grid-item'>
<div class='push-bottom' id='synpopsis'>
<h2>Synopsis</h2>
<p>firefox bugfix update</p>
</div>
<div id='type-severity'>
<h2>Type/Severity</h2>
<p>Bug Fix Advisory</p>
</div>
</div>
<div class='cp-grid-item'>
<div class='panel panel-info'>
<div class='panel-heading'>
<h2 class='panel-title'>Red Hat Insights patch analysis</h2>
</div>
<div class='panel-body'>
<p>Identify and remediate systems affected by this advisory.</p>
<p>
<a target="_blank" href="https://cloud.redhat.com/insights/patch/advisories/RHBA-2021:2759">View affected systems</a>
</p>
</div>
</div>
</div>
</div>
<div id='topic'>
<h2>Topic</h2>
<p>An update for firefox is now available for Red Hat Enterprise Linux 8.</p>
</div>
<div id='description'>
<h2>Description</h2>
<p>Mozilla Firefox is an open-source web browser, designed for standards<br />compliance, performance, and portability.<br /></p><p>This update upgrades Firefox to version 78.12.0 ESR.<br /></p><p>Bug Fix(es) and Enhancement(s):<br /></p><ul><li> Cannot reach websites after update from 78.11.0-3 to 78.12.0-1 (BZ#1983018)</li></ul>
</div>
<div id='solution'>
<h2>Solution</h2>
<p>Before applying this update, make sure all previously released errata<br />relevant to your system have been applied.<br /></p><p>For details on how to apply this update, refer to:<br /></p><p><a href="https://access.redhat.com/articles/11258" target="_blank">https://access.redhat.com/articles/11258</a></p>
</div>
<div id='affected_products'>
<h2>Affected Products</h2>
<ul>
<li>
Red Hat Enterprise Linux for x86_64 8 x86_64
</li>
<li>
Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux Server - AUS 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux for IBM z Systems 8 s390x
</li>
<li>
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4 s390x
</li>
<li>
Red Hat Enterprise Linux for Power, little endian 8 ppc64le
</li>
<li>
Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4 ppc64le
</li>
<li>
Red Hat Enterprise Linux Server - TUS 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux for ARM 64 8 aarch64
</li>
<li>
Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4 aarch64
</li>
<li>
Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4 ppc64le
</li>
<li>
Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4 x86_64
</li>
</ul>
</div>
<div id='fixes'>
<h2>Fixes</h2>
<ul>
<li>
<a target="_blank" href="https://bugzilla.redhat.com/show_bug.cgi?id=1983018">BZ - 1983018</a>
- Cannot reach websites after update from 78.11.0-3 to 78.12.0-1 [rhel-8.4.0.z]
</li>
</ul>
</div>
<div id='cves'>
<h2>CVEs</h2>
<p>
<span class='no-details'>(none)</span>
</p>
</div>
<div id='references'>
<h2>References</h2>
<p>
<span class='no-details'>(none)</span>
</p>
</div>
</div>
<div class='tab-pane' id='packages'>
<div class="push-top alert alert-info" role="alert">
<strong>
Note:
</strong>
More recent versions of these packages may be available.
Click a package name for more details.
</div>
<h2>Red Hat Enterprise Linux for x86_64 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 34bda31ae3c35bc48cbd616659f8c23587436e090520054e0b626182cfcf5ad5</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 9254fa5e0593d0a2c1a3d22b1c7976b23631e216f0b8b9176af0e71507a26c0f</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 486cd967c1e7a70a2c9585b2e24553119640f6ac36b39de47b9d687264e91537</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 34bda31ae3c35bc48cbd616659f8c23587436e090520054e0b626182cfcf5ad5</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 9254fa5e0593d0a2c1a3d22b1c7976b23631e216f0b8b9176af0e71507a26c0f</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 486cd967c1e7a70a2c9585b2e24553119640f6ac36b39de47b9d687264e91537</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - AUS 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 34bda31ae3c35bc48cbd616659f8c23587436e090520054e0b626182cfcf5ad5</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 9254fa5e0593d0a2c1a3d22b1c7976b23631e216f0b8b9176af0e71507a26c0f</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 486cd967c1e7a70a2c9585b2e24553119640f6ac36b39de47b9d687264e91537</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for IBM z Systems 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">s390x</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 40697d7bacf45b06063b60f8b5bd1f640e8b9aa6653151b69fe290f3b1dac77e</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 4963ee8c61103f4072634f7e4c89e70ef4540300e41db28eb81c7d9f31f20868</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 8079617c093dbd76c45e9f09cf7bd19f170d9d2adbe45c913e4e0c5ea03c4932</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">s390x</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 40697d7bacf45b06063b60f8b5bd1f640e8b9aa6653151b69fe290f3b1dac77e</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 4963ee8c61103f4072634f7e4c89e70ef4540300e41db28eb81c7d9f31f20868</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 8079617c093dbd76c45e9f09cf7bd19f170d9d2adbe45c913e4e0c5ea03c4932</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for Power, little endian 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: d98a5004873909d9ab659d0090580367e1a89e67dbc6a1344aa62ea410a3735b</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 5239bad414f02fe5ea3402a0de2f3c10d3f47feec74590e4bbecaa390a43ac7c</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: fd1122a830c1e0e853a90a30779f015e3ae91ac64d082791492942ebc3619408</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: d98a5004873909d9ab659d0090580367e1a89e67dbc6a1344aa62ea410a3735b</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 5239bad414f02fe5ea3402a0de2f3c10d3f47feec74590e4bbecaa390a43ac7c</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: fd1122a830c1e0e853a90a30779f015e3ae91ac64d082791492942ebc3619408</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - TUS 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 34bda31ae3c35bc48cbd616659f8c23587436e090520054e0b626182cfcf5ad5</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 9254fa5e0593d0a2c1a3d22b1c7976b23631e216f0b8b9176af0e71507a26c0f</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 486cd967c1e7a70a2c9585b2e24553119640f6ac36b39de47b9d687264e91537</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for ARM 64 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">aarch64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: 4a884d2cf1f2d2da10bfe3010e6323a698ac137270ff2bf4f6f5f3bfd74389ae</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: ff8b84361bc20665fec33e85391cef9240aadaf15088cd6655357ccbb94f2665</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: fb9986dd21e71ffc2bbafedc6b8519ba10fb677184061fb6a94c84087a737a2d</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">aarch64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: 4a884d2cf1f2d2da10bfe3010e6323a698ac137270ff2bf4f6f5f3bfd74389ae</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: ff8b84361bc20665fec33e85391cef9240aadaf15088cd6655357ccbb94f2665</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: fb9986dd21e71ffc2bbafedc6b8519ba10fb677184061fb6a94c84087a737a2d</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: d98a5004873909d9ab659d0090580367e1a89e67dbc6a1344aa62ea410a3735b</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 5239bad414f02fe5ea3402a0de2f3c10d3f47feec74590e4bbecaa390a43ac7c</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: fd1122a830c1e0e853a90a30779f015e3ae91ac64d082791492942ebc3619408</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 699f6e268abc89b28e1131d049599288b302d8b24a71b1e64a3a343fdd6c5742</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 34bda31ae3c35bc48cbd616659f8c23587436e090520054e0b626182cfcf5ad5</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 9254fa5e0593d0a2c1a3d22b1c7976b23631e216f0b8b9176af0e71507a26c0f</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-2.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 486cd967c1e7a70a2c9585b2e24553119640f6ac36b39de47b9d687264e91537</td>
</tr>
</table>
</div>
</div>
</div>
<p class='contact'>
The Red Hat security contact is <a href="mailto:secalert@redhat.com">secalert@redhat.com</a>.
More contact details at <a href="https://access.redhat.com/security/team/contact/">https://access.redhat.com/security/team/contact/</a>.
</p>
</div>
</div>
</div>
<!-- CP_PRIMER_FOOTER -->
</div>
</main>
</div>
<!--googleoff: all-->
<div id="to-top"><a class="btn_slideto" href="#masthead" aria-label="Back to Top"><span class="web-icon-upload"></span></a></div>
<footer class="footer-main">
<div class="footer-top">
<div class="container">
<div class="brand">
<a href="https://redhat.com">
<svg class="rh-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 613 145">
<defs>
<style>
.rh-logo-hat {
fill: #e00;
}
.rh-logo-type {
fill: #fff;
}
</style>
</defs>
<title>Red Hat</title>
<path
class="rh-logo-hat"
d="M127.47,83.49c12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42l-7.45-32.36c-1.72-7.12-3.23-10.35-15.73-16.6C124.89,8.69,103.76.5,97.51.5,91.69.5,90,8,83.06,8c-6.68,0-11.64-5.6-17.89-5.6-6,0-9.91,4.09-12.93,12.5,0,0-8.41,23.72-9.49,27.16A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33C22.27,52,.5,55,.5,74.22c0,31.48,74.59,70.28,133.65,70.28,45.28,0,56.7-20.48,56.7-36.65,0-12.72-11-27.16-30.83-35.78"/>
<path class="rh-logo-band"
d="M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33l3.66-9.06A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45,12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42Z"/>
<path
class="rh-logo-type"
d="M579.74,92.8c0,11.89,7.15,17.67,20.19,17.67a52.11,52.11,0,0,0,11.89-1.68V95a24.84,24.84,0,0,1-7.68,1.16c-5.37,0-7.36-1.68-7.36-6.73V68.3h15.56V54.1H596.78v-18l-17,3.68V54.1H568.49V68.3h11.25Zm-53,.32c0-3.68,3.69-5.47,9.26-5.47a43.12,43.12,0,0,1,10.1,1.26v7.15a21.51,21.51,0,0,1-10.63,2.63c-5.46,0-8.73-2.1-8.73-5.57m5.2,17.56c6,0,10.84-1.26,15.36-4.31v3.37h16.82V74.08c0-13.56-9.14-21-24.39-21-8.52,0-16.94,2-26,6.1l6.1,12.52c6.52-2.74,12-4.42,16.83-4.42,7,0,10.62,2.73,10.62,8.31v2.73a49.53,49.53,0,0,0-12.62-1.58c-14.31,0-22.93,6-22.93,16.73,0,9.78,7.78,17.24,20.19,17.24m-92.44-.94h18.09V80.92h30.29v28.82H506V36.12H487.93V64.41H457.64V36.12H439.55ZM370.62,81.87c0-8,6.31-14.1,14.62-14.1A17.22,17.22,0,0,1,397,72.09V91.54A16.36,16.36,0,0,1,385.24,96c-8.2,0-14.62-6.1-14.62-14.09m26.61,27.87h16.83V32.44l-17,3.68V57.05a28.3,28.3,0,0,0-14.2-3.68c-16.19,0-28.92,12.51-28.92,28.5a28.25,28.25,0,0,0,28.4,28.6,25.12,25.12,0,0,0,14.93-4.83ZM320,67c5.36,0,9.88,3.47,11.67,8.83H308.47C310.15,70.3,314.36,67,320,67M291.33,82c0,16.2,13.25,28.82,30.28,28.82,9.36,0,16.2-2.53,23.25-8.42l-11.26-10c-2.63,2.74-6.52,4.21-11.14,4.21a14.39,14.39,0,0,1-13.68-8.83h39.65V83.55c0-17.67-11.88-30.39-28.08-30.39a28.57,28.57,0,0,0-29,28.81M262,51.58c6,0,9.36,3.78,9.36,8.31S268,68.2,262,68.2H244.11V51.58Zm-36,58.16h18.09V82.92h13.77l13.89,26.82H292l-16.2-29.45a22.27,22.27,0,0,0,13.88-20.72c0-13.25-10.41-23.45-26-23.45H226Z"/>
</svg>
</a>
</div>
<div role="navigation">
<h3>Quick Links</h3>
<ul>
<li><a class="download-software" href="https://access.redhat.com/downloads/">Downloads</a></li>
<li><a class="manage-subscriptions" href="https://access.redhat.com/management">Subscriptions</a></li>
<li><a class="support-cases" href="https://access.redhat.com/support">Support Cases</a></li>
<li><a class="customer-service" href="https://access.redhat.com/support/customer-service">Customer Service</a></li>
<li><a class="quick-docs" href="https://access.redhat.com/documentation">Product Documentation</a></li>
</ul>
</div>
<div role="navigation">
<h3>Help</h3>
<ul>
<li><a class="contact-us" href="https://access.redhat.com/support/contact/">Contact Us</a></li>
<li><a class="cp-faqs" href="https://access.redhat.com/articles/33844">Customer Portal FAQ</a></li>
<li><a class="login-problems" href="https://access.redhat.com/help/login_assistance">Log-in Assistance</a></li>
</ul>
</div>
<div role="navigation">
<h3>Site Info</h3>
<ul>
<li><a class="trust-red-hat" href="https://www.redhat.com/en/trust">Trust Red Hat</a></li>
<li><a class="browser-support-policy" href="https://access.redhat.com/help/browsers/">Browser Support Policy</a></li>
<li><a class="accessibility" href="https://access.redhat.com/help/accessibility/">Accessibility</a></li>
<li><a class="recognition" href="https://access.redhat.com/recognition/">Awards and Recognition</a></li>
<li><a class="colophon" href="https://access.redhat.com/help/colophon/">Colophon</a></li>
</ul>
</div>
<div role="navigation">
<h3>Related Sites</h3>
<ul>
<li><a href="https://www.redhat.com/" class="red-hat-com">redhat.com</a></li>
<li><a href="https://www.openshift.com" class="openshift-com">openshift.com</a></li>
<li><a href="http://developers.redhat.com/" class="red-hat-developers">developers.redhat.com</a></li>
<li><a href="https://connect.redhat.com/" class="partner-connect">connect.redhat.com</a></li>
<li><a href="https://cloud.redhat.com/" class="cloud-com">cloud.redhat.com</a></li>
</ul>
</div>
<div role="navigation">
<h3>About</h3>
<ul>
<li><a href="https://access.redhat.com/subscription-value" class="subscription-value">Red Hat Subscription Value</a></li>
<li><a href="https://www.redhat.com/about/" class="about-red-hat">About Red Hat</a></li>
<li><a href="http://jobs.redhat.com" class="about-jobs">Red Hat Jobs</a></li>
</ul>
</div>
</div>
</div>
<div class="anchor">
<div class="container">
<div class="status-legal">
<a hidden href="https://status.redhat.com" class="status-page-widget">
<span class="status-description"></span>
<span class="status-dot shape-circle"></span>
</a>
<div class="legal-copyright">
<div class="copyright">Copyright © 2021 Red Hat, Inc.</div>
<div role="navigation" class="legal">
<ul>
<li><a href="http://www.redhat.com/en/about/privacy-policy" class="privacy-policy">Privacy Statement</a></li>
<li><a href="https://access.redhat.com/help/terms/" class="terms-of-use">Customer Portal Terms of Use</a></li>
<li><a href="http://www.redhat.com/en/about/all-policies-guidelines" class="all-policies">All Policies and Guidelines</a></li>
<li><a id="teconsent"></a></li>
</ul>
</div>
</div>
</div>
<div class="social">
<a href="http://www.redhat.com/summit/" class="summit">
<img src="https://access.redhat.com/chrome_themes/nimbus/img/rh-summit-red-a.svg" alt="Red Hat Summit" />
</a>
<div class="social-media">
<a href="https://twitter.com/RedHatSupport" class="sm-icon twitter"><span class="nicon-twitter"></span><span class="offscreen">Twitter</span></a>
<a href="https://www.facebook.com/RedHatSupport" class="sm-icon facebook"><span class="nicon-facebook"></span><span class="offscreen">Facebook</span></a>
</div>
</div>
</div>
</div>
</footer>
<!-- TrustArc -->
<div id="consent_blackbar"></div>
<!--googleon: all-->
</div>
<!-- /CP_PRIMER_FOOTER -->
</body>
</html>

View File

@ -1,710 +0,0 @@
<!--
~ Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
~ Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
~ Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ 1. Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~
~ 2. Redistributions in binary form must reproduce the above copyright notice,
~ this list of conditions and the following disclaimer in the documentation
~ and/or other materials provided with the distribution.
~
~ 3. Neither the name of the copyright holder nor the names of its contributors
~ may be used to endorse or promote products derived from this software without
~ specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
~ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
~ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
~ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
~ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
~ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
~ POSSIBILITY OF SUCH DAMAGE.
-->
<div class='print-single'>
<dl class='details'>
<dt>Issued:</dt>
<dd>2021-07-15</dd>
<dt>Updated:</dt>
<dd>2021-07-15</dd>
</dl>
<h1>RHSA-2021:2743 - Security Advisory</h1>
<div id='tabs'>
<ul class='nav nav-tabs'>
<li><a role="tab" data-taggle="tab" href="#overview">Overview</a></li>
<li><a role="tab" data-toggle="tab" href="#packages">Updated Packages</a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane' id='overview'>
<div class='cp-grid' data-cp-grid='xs-1-cols md-2-cols lg-2-cols'>
<div class='cp-grid-item'>
<div class='push-bottom' id='synpopsis'>
<h2>Synopsis</h2>
<p>Important: firefox security update</p>
</div>
<div id='type-severity'>
<h2>Type/Severity</h2>
<p>Security Advisory: Important</p>
</div>
</div>
<div class='cp-grid-item'>
<div class='panel panel-info'>
<div class='panel-heading'>
<h2 class='panel-title'>Red Hat Insights patch analysis</h2>
</div>
<div class='panel-body'>
<p>Identify and remediate systems affected by this advisory.</p>
<p>
<a target="_blank" href="https://cloud.redhat.com/insights/patch/advisories/RHSA-2021:2743">View affected systems</a>
</p>
</div>
</div>
</div>
</div>
<div id='topic'>
<h2>Topic</h2>
<p>An update for firefox is now available for Red Hat Enterprise Linux 8.<br /></p><p>Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.</p>
</div>
<div id='description'>
<h2>Description</h2>
<p>Mozilla Firefox is an open-source web browser, designed for standards compliance, performance, and portability.<br /></p><p>This update upgrades Firefox to version 78.12.0 ESR.<br /></p><p>Security Fix(es):<br /></p><ul><li> Mozilla: Use-after-free in accessibility features of a document (CVE-2021-29970)</li>
<li> Mozilla: Memory safety bugs fixed in Firefox 90 and Firefox ESR 78.12 (CVE-2021-29976)</li>
<li> chromium-browser: Out of bounds write in ANGLE (CVE-2021-30547)</li>
</ul><p>For 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.</p>
</div>
<div id='solution'>
<h2>Solution</h2>
<p>For details on how to apply this update, which includes the changes described in this advisory, refer to:<br /></p><p><a href="https://access.redhat.com/articles/11258" target="_blank">https://access.redhat.com/articles/11258</a> </p><p>After installing the update, Firefox must be restarted for the changes to take effect.</p>
</div>
<div id='affected_products'>
<h2>Affected Products</h2>
<ul>
<li>
Red Hat Enterprise Linux for x86_64 8 x86_64
</li>
<li>
Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux Server - AUS 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux for IBM z Systems 8 s390x
</li>
<li>
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4 s390x
</li>
<li>
Red Hat Enterprise Linux for Power, little endian 8 ppc64le
</li>
<li>
Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4 ppc64le
</li>
<li>
Red Hat Enterprise Linux Server - TUS 8.4 x86_64
</li>
<li>
Red Hat Enterprise Linux for ARM 64 8 aarch64
</li>
<li>
Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4 aarch64
</li>
<li>
Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4 ppc64le
</li>
<li>
Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4 x86_64
</li>
</ul>
</div>
<div id='fixes'>
<h2>Fixes</h2>
<ul>
<li>
<a target="_blank" href="https://bugzilla.redhat.com/show_bug.cgi?id=1970109">BZ - 1970109</a>
- CVE-2021-30547 chromium-browser: Out of bounds write in ANGLE
</li>
<li>
<a target="_blank" href="https://bugzilla.redhat.com/show_bug.cgi?id=1982013">BZ - 1982013</a>
- CVE-2021-29970 Mozilla: Use-after-free in accessibility features of a document
</li>
<li>
<a target="_blank" href="https://bugzilla.redhat.com/show_bug.cgi?id=1982014">BZ - 1982014</a>
- CVE-2021-29976 Mozilla: Memory safety bugs fixed in Firefox 90 and Firefox ESR 78.12
</li>
</ul>
</div>
<div id='cves'>
<h2>CVEs</h2>
<ul>
<li><a target="_blank" href="https://www.redhat.com/security/data/cve/CVE-2021-29970.html">CVE-2021-29970</a></li>
<li><a target="_blank" href="https://www.redhat.com/security/data/cve/CVE-2021-29976.html">CVE-2021-29976</a></li>
<li><a target="_blank" href="https://www.redhat.com/security/data/cve/CVE-2021-30547.html">CVE-2021-30547</a></li>
</ul>
</div>
<div id='references'>
<h2>References</h2>
<ul>
<li><a target="_blank" href="https://access.redhat.com/security/updates/classification/#important">https://access.redhat.com/security/updates/classification/#important</a></li>
</ul>
</div>
</div>
<div class='tab-pane' id='packages'>
<div class="push-top alert alert-info" role="alert">
<strong>
Note:
</strong>
More recent versions of these packages may be available.
Click a package name for more details.
</div>
<h2>Red Hat Enterprise Linux for x86_64 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: b695560e4d71e756e4f23300b3799dbf9a0501d438a1cfa6cc60e17204ef4b9f</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: cd469dda0b92c02ce97ab7189588e609e366bc27814af793c719324b2ca7de90</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 98cb2bf96336d22a822f0efb612c9ef8bf8e7c39c6b6e90e15f86dfdb8730d68</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for x86_64 - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: b695560e4d71e756e4f23300b3799dbf9a0501d438a1cfa6cc60e17204ef4b9f</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: cd469dda0b92c02ce97ab7189588e609e366bc27814af793c719324b2ca7de90</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 98cb2bf96336d22a822f0efb612c9ef8bf8e7c39c6b6e90e15f86dfdb8730d68</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - AUS 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: b695560e4d71e756e4f23300b3799dbf9a0501d438a1cfa6cc60e17204ef4b9f</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: cd469dda0b92c02ce97ab7189588e609e366bc27814af793c719324b2ca7de90</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 98cb2bf96336d22a822f0efb612c9ef8bf8e7c39c6b6e90e15f86dfdb8730d68</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for IBM z Systems 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">s390x</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: c4d8fd21d5b6fb375a31a5008dee39125468db10fc2578f9184ca709b0649124</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 3e14dbd2ea086ca9bf8999b66e108e15897b7b9fa37b2958098e2f9999c69b5c</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 4d9a3b46a1b4932bb9ad618c6b16389c6ed22a7a50d544c354389521e5cac5ca</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">s390x</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: c4d8fd21d5b6fb375a31a5008dee39125468db10fc2578f9184ca709b0649124</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 3e14dbd2ea086ca9bf8999b66e108e15897b7b9fa37b2958098e2f9999c69b5c</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.s390x.rpm
</td>
<td class="checksum">SHA-256: 4d9a3b46a1b4932bb9ad618c6b16389c6ed22a7a50d544c354389521e5cac5ca</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for Power, little endian 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 53be1f8f91b3e0ff3110f78c3eddabbbc2da618a0a03898dba8a4ed2e1e79c64</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 2bd8c3c8cad9e90485a44fcc6c2aae2d504a30ee8611c45e699cf3b6efcbfe9a</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: bf8399647be6b276ec3db408f11c89ed2e067b78fb7be019a5df85fad68e7efc</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for Power, little endian - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 53be1f8f91b3e0ff3110f78c3eddabbbc2da618a0a03898dba8a4ed2e1e79c64</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 2bd8c3c8cad9e90485a44fcc6c2aae2d504a30ee8611c45e699cf3b6efcbfe9a</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: bf8399647be6b276ec3db408f11c89ed2e067b78fb7be019a5df85fad68e7efc</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - TUS 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: b695560e4d71e756e4f23300b3799dbf9a0501d438a1cfa6cc60e17204ef4b9f</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: cd469dda0b92c02ce97ab7189588e609e366bc27814af793c719324b2ca7de90</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 98cb2bf96336d22a822f0efb612c9ef8bf8e7c39c6b6e90e15f86dfdb8730d68</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for ARM 64 8</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">aarch64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: 9c2212b6759ffc7e929608b93dbea308f805fc41e3a6ef86e18225fe64fad1a2</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: f540717a77978630bbc2e87f6b19b2187455cfcccdcb5e95906cc601e36aceef</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: dffacf744c6ebc840fc71a3876eb09acdafdf94c4b574e3cfc9fa858fe9163d7</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux for ARM 64 - Extended Update Support 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">aarch64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: 9c2212b6759ffc7e929608b93dbea308f805fc41e3a6ef86e18225fe64fad1a2</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: f540717a77978630bbc2e87f6b19b2187455cfcccdcb5e95906cc601e36aceef</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.aarch64.rpm
</td>
<td class="checksum">SHA-256: dffacf744c6ebc840fc71a3876eb09acdafdf94c4b574e3cfc9fa858fe9163d7</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">ppc64le</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 53be1f8f91b3e0ff3110f78c3eddabbbc2da618a0a03898dba8a4ed2e1e79c64</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: 2bd8c3c8cad9e90485a44fcc6c2aae2d504a30ee8611c45e699cf3b6efcbfe9a</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.ppc64le.rpm
</td>
<td class="checksum">SHA-256: bf8399647be6b276ec3db408f11c89ed2e067b78fb7be019a5df85fad68e7efc</td>
</tr>
</table>
<h2>Red Hat Enterprise Linux Server - Update Services for SAP Solutions 8.4</h2>
<table class="files">
<tr>
<th colspan="2">SRPM</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.src.rpm
</td>
<td class="checksum">SHA-256: 2fdab145c121ce9d3775caa1acb3d8e8aefc147e97125a317b5f570855bc7db4</td>
</tr>
<tr>
<th colspan="2">x86_64</th>
</tr>
<tr>
<td class="name">
firefox-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: b695560e4d71e756e4f23300b3799dbf9a0501d438a1cfa6cc60e17204ef4b9f</td>
</tr>
<tr>
<td class="name">
firefox-debuginfo-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: cd469dda0b92c02ce97ab7189588e609e366bc27814af793c719324b2ca7de90</td>
</tr>
<tr>
<td class="name">
firefox-debugsource-78.12.0-1.el8_4.x86_64.rpm
</td>
<td class="checksum">SHA-256: 98cb2bf96336d22a822f0efb612c9ef8bf8e7c39c6b6e90e15f86dfdb8730d68</td>
</tr>
</table>
</div>
</div>
</div>
<p class='contact'>
The Red Hat security contact is <a href="mailto:secalert@redhat.com">secalert@redhat.com</a>.
More contact details at <a href="https://access.redhat.com/security/team/contact/">https://access.redhat.com/security/team/contact/</a>.
</p>
</div>
</div>
</div>
<!-- CP_PRIMER_FOOTER -->
</div>
</main>
</div>
<!--googleoff: all-->
<div id="to-top"><a class="btn_slideto" href="#masthead" aria-label="Back to Top"><span class="web-icon-upload"></span></a></div>
<footer class="footer-main">
<div class="footer-top">
<div class="container">
<div class="brand">
<a href="https://redhat.com">
<svg class="rh-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 613 145">
<defs>
<style>
.rh-logo-hat {
fill: #e00;
}
.rh-logo-type {
fill: #fff;
}
</style>
</defs>
<title>Red Hat</title>
<path
class="rh-logo-hat"
d="M127.47,83.49c12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42l-7.45-32.36c-1.72-7.12-3.23-10.35-15.73-16.6C124.89,8.69,103.76.5,97.51.5,91.69.5,90,8,83.06,8c-6.68,0-11.64-5.6-17.89-5.6-6,0-9.91,4.09-12.93,12.5,0,0-8.41,23.72-9.49,27.16A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33C22.27,52,.5,55,.5,74.22c0,31.48,74.59,70.28,133.65,70.28,45.28,0,56.7-20.48,56.7-36.65,0-12.72-11-27.16-30.83-35.78"/>
<path class="rh-logo-band"
d="M160,72.07c1.73,8.19,1.73,9.05,1.73,10.13,0,14-15.74,21.77-36.43,21.77C78.54,104,37.58,76.6,37.58,58.49a18.45,18.45,0,0,1,1.51-7.33l3.66-9.06A6.43,6.43,0,0,0,42.53,44c0,9.22,36.3,39.45,84.94,39.45,12.51,0,30.61-2.58,30.61-17.46a14,14,0,0,0-.31-3.42Z"/>
<path
class="rh-logo-type"
d="M579.74,92.8c0,11.89,7.15,17.67,20.19,17.67a52.11,52.11,0,0,0,11.89-1.68V95a24.84,24.84,0,0,1-7.68,1.16c-5.37,0-7.36-1.68-7.36-6.73V68.3h15.56V54.1H596.78v-18l-17,3.68V54.1H568.49V68.3h11.25Zm-53,.32c0-3.68,3.69-5.47,9.26-5.47a43.12,43.12,0,0,1,10.1,1.26v7.15a21.51,21.51,0,0,1-10.63,2.63c-5.46,0-8.73-2.1-8.73-5.57m5.2,17.56c6,0,10.84-1.26,15.36-4.31v3.37h16.82V74.08c0-13.56-9.14-21-24.39-21-8.52,0-16.94,2-26,6.1l6.1,12.52c6.52-2.74,12-4.42,16.83-4.42,7,0,10.62,2.73,10.62,8.31v2.73a49.53,49.53,0,0,0-12.62-1.58c-14.31,0-22.93,6-22.93,16.73,0,9.78,7.78,17.24,20.19,17.24m-92.44-.94h18.09V80.92h30.29v28.82H506V36.12H487.93V64.41H457.64V36.12H439.55ZM370.62,81.87c0-8,6.31-14.1,14.62-14.1A17.22,17.22,0,0,1,397,72.09V91.54A16.36,16.36,0,0,1,385.24,96c-8.2,0-14.62-6.1-14.62-14.09m26.61,27.87h16.83V32.44l-17,3.68V57.05a28.3,28.3,0,0,0-14.2-3.68c-16.19,0-28.92,12.51-28.92,28.5a28.25,28.25,0,0,0,28.4,28.6,25.12,25.12,0,0,0,14.93-4.83ZM320,67c5.36,0,9.88,3.47,11.67,8.83H308.47C310.15,70.3,314.36,67,320,67M291.33,82c0,16.2,13.25,28.82,30.28,28.82,9.36,0,16.2-2.53,23.25-8.42l-11.26-10c-2.63,2.74-6.52,4.21-11.14,4.21a14.39,14.39,0,0,1-13.68-8.83h39.65V83.55c0-17.67-11.88-30.39-28.08-30.39a28.57,28.57,0,0,0-29,28.81M262,51.58c6,0,9.36,3.78,9.36,8.31S268,68.2,262,68.2H244.11V51.58Zm-36,58.16h18.09V82.92h13.77l13.89,26.82H292l-16.2-29.45a22.27,22.27,0,0,0,13.88-20.72c0-13.25-10.41-23.45-26-23.45H226Z"/>
</svg>
</a>
</div>
<div role="navigation">
<h3>Quick Links</h3>
<ul>
<li><a class="download-software" href="https://access.redhat.com/downloads/">Downloads</a></li>
<li><a class="manage-subscriptions" href="https://access.redhat.com/management">Subscriptions</a></li>
<li><a class="support-cases" href="https://access.redhat.com/support">Support Cases</a></li>
<li><a class="customer-service" href="https://access.redhat.com/support/customer-service">Customer Service</a></li>
<li><a class="quick-docs" href="https://access.redhat.com/documentation">Product Documentation</a></li>
</ul>
</div>
<div role="navigation">
<h3>Help</h3>
<ul>
<li><a class="contact-us" href="https://access.redhat.com/support/contact/">Contact Us</a></li>
<li><a class="cp-faqs" href="https://access.redhat.com/articles/33844">Customer Portal FAQ</a></li>
<li><a class="login-problems" href="https://access.redhat.com/help/login_assistance">Log-in Assistance</a></li>
</ul>
</div>
<div role="navigation">
<h3>Site Info</h3>
<ul>
<li><a class="trust-red-hat" href="https://www.redhat.com/en/trust">Trust Red Hat</a></li>
<li><a class="browser-support-policy" href="https://access.redhat.com/help/browsers/">Browser Support Policy</a></li>
<li><a class="accessibility" href="https://access.redhat.com/help/accessibility/">Accessibility</a></li>
<li><a class="recognition" href="https://access.redhat.com/recognition/">Awards and Recognition</a></li>
<li><a class="colophon" href="https://access.redhat.com/help/colophon/">Colophon</a></li>
</ul>
</div>
<div role="navigation">
<h3>Related Sites</h3>
<ul>
<li><a href="https://www.redhat.com/" class="red-hat-com">redhat.com</a></li>
<li><a href="https://www.openshift.com" class="openshift-com">openshift.com</a></li>
<li><a href="http://developers.redhat.com/" class="red-hat-developers">developers.redhat.com</a></li>
<li><a href="https://connect.redhat.com/" class="partner-connect">connect.redhat.com</a></li>
<li><a href="https://cloud.redhat.com/" class="cloud-com">cloud.redhat.com</a></li>
</ul>
</div>
<div role="navigation">
<h3>About</h3>
<ul>
<li><a href="https://access.redhat.com/subscription-value" class="subscription-value">Red Hat Subscription Value</a></li>
<li><a href="https://www.redhat.com/about/" class="about-red-hat">About Red Hat</a></li>
<li><a href="http://jobs.redhat.com" class="about-jobs">Red Hat Jobs</a></li>
</ul>
</div>
</div>
</div>
<div class="anchor">
<div class="container">
<div class="status-legal">
<a hidden href="https://status.redhat.com" class="status-page-widget">
<span class="status-description"></span>
<span class="status-dot shape-circle"></span>
</a>
<div class="legal-copyright">
<div class="copyright">Copyright © 2021 Red Hat, Inc.</div>
<div role="navigation" class="legal">
<ul>
<li><a href="http://www.redhat.com/en/about/privacy-policy" class="privacy-policy">Privacy Statement</a></li>
<li><a href="https://access.redhat.com/help/terms/" class="terms-of-use">Customer Portal Terms of Use</a></li>
<li><a href="http://www.redhat.com/en/about/all-policies-guidelines" class="all-policies">All Policies and Guidelines</a></li>
<li><a id="teconsent"></a></li>
</ul>
</div>
</div>
</div>
<div class="social">
<a href="http://www.redhat.com/summit/" class="summit">
<img src="https://access.redhat.com/chrome_themes/nimbus/img/rh-summit-red-a.svg" alt="Red Hat Summit" />
</a>
<div class="social-media">
<a href="https://twitter.com/RedHatSupport" class="sm-icon twitter"><span class="nicon-twitter"></span><span class="offscreen">Twitter</span></a>
<a href="https://www.facebook.com/RedHatSupport" class="sm-icon facebook"><span class="nicon-facebook"></span><span class="offscreen">Facebook</span></a>
</div>
</div>
</div>
</div>
</footer>
<!-- TrustArc -->
<div id="consent_blackbar"></div>
<!--googleon: all-->
</div>
<!-- /CP_PRIMER_FOOTER -->
</body>
</html>

View File

@ -1,22 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "rhsecurity",
srcs = [
"api_default.go",
"client.go",
"configuration.go",
"gen.go",
"model_cve.go",
"model_cve_detailed.go",
"model_cve_detailed_affected_release.go",
"model_cve_detailed_bugzilla.go",
"model_cve_detailed_cvss3.go",
"model_cve_detailed_package_state.go",
"response.go",
"utils.go",
],
importpath = "peridot.resf.org/apollo/rhsecurity",
visibility = ["//visibility:public"],
deps = ["//vendor/golang.org/x/oauth2"],
)

View File

@ -1,119 +0,0 @@
# Go API client for rhsecurity
Unofficial OpenAPI definitions for Red Hat Security Data API
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
- API version: 1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
## Installation
Install the following dependencies:
```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
```
Put the package under your project folder and add the following in import:
```golang
import sw "./rhsecurity"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
```golang
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```
## Configuration of Server URL
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
### Select Server Configuration
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
```
### Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Note, enum values are always validated and all unused variables are silently ignored.
### URLs Configuration per Operation
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
```
## Documentation for API Endpoints
All URIs are relative to *https://access.redhat.com/hydra/rest/securitydata*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**GetCve**](docs/DefaultApi.md#getcve) | **Get** /cve/{CVE}.json | Get specific CVE
*DefaultApi* | [**GetCves**](docs/DefaultApi.md#getcves) | **Get** /cve.json | Get CVEs
## Documentation For Models
- [CVE](docs/CVE.md)
- [CVEDetailed](docs/CVEDetailed.md)
- [CVEDetailedAffectedRelease](docs/CVEDetailedAffectedRelease.md)
- [CVEDetailedBugzilla](docs/CVEDetailedBugzilla.md)
- [CVEDetailedCvss3](docs/CVEDetailedCvss3.md)
- [CVEDetailedPackageState](docs/CVEDetailedPackageState.md)
## Documentation For Authorization
Endpoints do not require authorization.
## Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:
* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`
## Author
mustafa@ctrliq.com

View File

@ -1,427 +0,0 @@
openapi: 3.0.0
x-stoplight:
id: yjn90w5p8y4ly
info:
title: Red Hat Security Data API
version: '1.0'
description: Unofficial OpenAPI definitions for Red Hat Security Data API
contact:
name: Mustafa Gezen
email: mustafa@ctrliq.com
servers:
- url: 'https://access.redhat.com/hydra/rest/securitydata'
paths:
/cve.json:
get:
summary: Get CVEs
tags: []
operationId: get-cves
parameters:
- schema:
type: string
format: date
in: query
name: before
description: 'CVEs before the query date. [ISO 8601 is the expected format]'
- schema:
type: string
format: date
in: query
name: after
description: 'CVEs after the query date. [ISO 8601 is the expected format]'
- schema:
type: string
in: query
name: ids
description: CVEs for Ids separated by comma
- schema:
type: string
in: query
name: bug
description: CVEs for Bugzilla Ids
- schema:
type: string
in: query
name: advisory
description: CVEs for advisory
- schema:
type: string
in: query
name: severity
description: CVEs for severity
- schema:
type: string
in: query
name: package
description: CVEs which affect the package
- schema:
type: string
in: query
name: product
description: CVEs which affect the product. The parameter supports Perl compatible regular expressions.
- schema:
type: string
in: query
name: cwe
description: CVEs with CWE
- schema:
type: number
in: query
name: cvss_score
description: CVEs with CVSS score greater than or equal to this value
- schema:
type: string
in: query
name: cvss3_score
description: CVEs with CVSSv3 score greater than or equal to this value
- schema:
type: number
in: query
name: page
description: CVEs for page number
- schema:
type: number
in: query
name: per_page
description: Number of CVEs to return per page
- schema:
type: number
in: query
name: created_days_ago
description: Index of CVEs definitions created days ago
description: List all the recent CVEs when no parameter is passed. Returns a convenience object as response with very minimum attributes.
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CVE'
parameters: []
'/cve/{CVE}.json':
parameters:
- schema:
type: string
name: CVE
in: path
required: true
get:
summary: Get specific CVE
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CVEDetailed'
operationId: get-cve
description: Retrieve full CVE details
components:
schemas:
CVE:
description: CVE model used in listing
type: object
x-examples:
example-1:
CVE: CVE-2020-24489
severity: important
public_date: '2021-06-08T17:00:00Z'
advisories:
- 'RHSA-2021:2307'
- 'RHSA-2021:2306'
- 'RHSA-2021:2305'
- 'RHSA-2021:2304'
- 'RHSA-2021:2519'
- 'RHSA-2021:2308'
- 'RHSA-2021:2299'
- 'RHSA-2021:2303'
- 'RHSA-2021:2302'
- 'RHSA-2021:2522'
- 'RHSA-2021:2301'
- 'RHSA-2021:2300'
bugzilla: '1962650'
bugzilla_description: 'CVE-2020-24489 hw: vt-d related privilege escalation'
cvss_score: null
cvss_scoring_vector: null
CWE: CWE-459
affected_packages:
- 'microcode_ctl-4:20191115-4.20210525.1.el8_2'
- 'microcode_ctl-2:2.1-12.37.el7_2'
- 'redhat-virtualization-host-0:4.3.16-20210615.0.el7_9'
- 'microcode_ctl-2:2.1-53.16.el7_7'
- 'microcode_ctl-4:20210216-1.20210525.1.el8_4'
- 'microcode_ctl-2:2.1-16.40.el7_3'
- 'microcode_ctl-2:1.17-33.33.el6_10'
- 'microcode_ctl-4:20190618-1.20210525.1.el8_1'
- 'microcode_ctl-2:2.1-22.39.el7_4'
- 'microcode_ctl-2:2.1-73.9.el7_9'
- 'microcode_ctl-2:2.1-47.21.el7_6'
resource_url: 'https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2020-24489.json'
cvss3_scoring_vector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'
cvss3_score: '8.8'
properties:
CVE:
type: string
minLength: 1
severity:
type: string
minLength: 1
public_date:
type: string
minLength: 1
advisories:
type: array
items:
type: string
bugzilla:
type: string
minLength: 1
bugzilla_description:
type: string
minLength: 1
cvss_score:
type: number
cvss_scoring_vector:
type: string
CWE:
type: string
minLength: 1
affected_packages:
type: array
items:
type: string
resource_url:
type: string
minLength: 1
cvss3_scoring_vector:
type: string
minLength: 1
cvss3_score:
type: string
minLength: 1
required:
- CVE
- severity
- public_date
- advisories
- bugzilla
- bugzilla_description
- CWE
- affected_packages
- resource_url
- cvss3_scoring_vector
- cvss3_score
CVEDetailed:
description: CVE model used when retrieving a specific CVE
type: object
x-examples:
example-1:
threat_severity: Important
public_date: '2021-06-08T17:00:00Z'
bugzilla:
description: 'CVE-2020-24489 hw: vt-d related privilege escalation'
id: '1962650'
url: 'https://bugzilla.redhat.com/show_bug.cgi?id=1962650'
cvss3:
cvss3_base_score: '8.8'
cvss3_scoring_vector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'
status: verified
cwe: CWE-459
details:
- Incomplete cleanup in some Intel(R) VT-d products may allow an authenticated user to potentially enable escalation of privilege via local access.
- A flaw was found in Intel® VT-d products. Entries from the context cache on some types of context cache invalidations may not be properly invalidated which may allow an authenticated user to potentially enable escalation of privilege via local access. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
acknowledgement: Red Hat would like to thank Intel for reporting this issue.
affected_release:
- product_name: Red Hat Enterprise Linux 6 Extended Lifecycle Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2299'
cpe: 'cpe:/o:redhat:rhel_els:6'
package: 'microcode_ctl-2:1.17-33.33.el6_10'
- product_name: Red Hat Enterprise Linux 7
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2305'
cpe: 'cpe:/o:redhat:enterprise_linux:7'
package: 'microcode_ctl-2:2.1-73.9.el7_9'
- product_name: Red Hat Enterprise Linux 7.2 Advanced Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2300'
cpe: 'cpe:/o:redhat:rhel_aus:7.2'
package: 'microcode_ctl-2:2.1-12.37.el7_2'
- product_name: Red Hat Enterprise Linux 7.3 Advanced Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2302'
cpe: 'cpe:/o:redhat:rhel_aus:7.3'
package: 'microcode_ctl-2:2.1-16.40.el7_3'
- product_name: Red Hat Enterprise Linux 7.4 Advanced Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2301'
cpe: 'cpe:/o:redhat:rhel_aus:7.4'
package: 'microcode_ctl-2:2.1-22.39.el7_4'
- product_name: Red Hat Enterprise Linux 7.4 Telco Extended Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2301'
cpe: 'cpe:/o:redhat:rhel_tus:7.4'
package: 'microcode_ctl-2:2.1-22.39.el7_4'
- product_name: Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2301'
cpe: 'cpe:/o:redhat:rhel_e4s:7.4'
package: 'microcode_ctl-2:2.1-22.39.el7_4'
- product_name: Red Hat Enterprise Linux 7.6 Advanced Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2303'
cpe: 'cpe:/o:redhat:rhel_aus:7.6'
package: 'microcode_ctl-2:2.1-47.21.el7_6'
- product_name: Red Hat Enterprise Linux 7.6 Telco Extended Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2303'
cpe: 'cpe:/o:redhat:rhel_tus:7.6'
package: 'microcode_ctl-2:2.1-47.21.el7_6'
- product_name: Red Hat Enterprise Linux 7.6 Update Services for SAP Solutions
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2303'
cpe: 'cpe:/o:redhat:rhel_e4s:7.6'
package: 'microcode_ctl-2:2.1-47.21.el7_6'
- product_name: Red Hat Enterprise Linux 7.7 Extended Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2304'
cpe: 'cpe:/o:redhat:rhel_eus:7.7'
package: 'microcode_ctl-2:2.1-53.16.el7_7'
- product_name: Red Hat Enterprise Linux 8
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2308'
cpe: 'cpe:/o:redhat:enterprise_linux:8'
package: 'microcode_ctl-4:20210216-1.20210525.1.el8_4'
- product_name: Red Hat Enterprise Linux 8.1 Extended Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2306'
cpe: 'cpe:/o:redhat:rhel_eus:8.1'
package: 'microcode_ctl-4:20190618-1.20210525.1.el8_1'
- product_name: Red Hat Enterprise Linux 8.2 Extended Update Support
release_date: '2021-06-09T00:00:00Z'
advisory: 'RHSA-2021:2307'
cpe: 'cpe:/o:redhat:rhel_eus:8.2'
package: 'microcode_ctl-4:20191115-4.20210525.1.el8_2'
- product_name: Red Hat Virtualization 4 for Red Hat Enterprise Linux 7
release_date: '2021-06-22T00:00:00Z'
advisory: 'RHSA-2021:2519'
cpe: 'cpe:/o:redhat:enterprise_linux:7::hypervisor'
package: 'redhat-virtualization-host-0:4.3.16-20210615.0.el7_9'
- product_name: Red Hat Virtualization 4 for Red Hat Enterprise Linux 8
release_date: '2021-06-22T00:00:00Z'
advisory: 'RHSA-2021:2522'
cpe: 'cpe:/o:redhat:enterprise_linux:8::hypervisor'
name: CVE-2020-24489
csaw: false
properties:
threat_severity:
type: string
minLength: 1
public_date:
type: string
minLength: 1
bugzilla:
type: object
required:
- description
- id
- url
properties:
description:
type: string
minLength: 1
id:
type: string
minLength: 1
url:
type: string
minLength: 1
cvss3:
type: object
required:
- cvss3_base_score
- cvss3_scoring_vector
- status
properties:
cvss3_base_score:
type: string
minLength: 1
cvss3_scoring_vector:
type: string
minLength: 1
status:
type: string
minLength: 1
cwe:
type: string
minLength: 1
details:
type: array
items:
type: string
acknowledgement:
type: string
minLength: 1
affected_release:
type: array
uniqueItems: true
minItems: 1
items:
type: object
properties:
product_name:
type: string
minLength: 1
release_date:
type: string
minLength: 1
advisory:
type: string
minLength: 1
cpe:
type: string
minLength: 1
package:
type: string
minLength: 1
required:
- product_name
- release_date
- advisory
- cpe
name:
type: string
minLength: 1
csaw:
type: boolean
package_state:
type: array
items:
type: object
properties:
product_name:
type: string
fix_state:
type: string
package_name:
type: string
cpe:
type: string
required:
- product_name
- fix_state
- package_name
- cpe
required:
- threat_severity
- public_date
- bugzilla
- cvss3
- cwe
- details
- acknowledgement
- name
- csaw

View File

@ -1,380 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"strings"
)
// Linger please
var (
_ _context.Context
)
type DefaultApi interface {
/*
* GetCve Get specific CVE
* Retrieve full CVE details
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param cVE
* @return ApiGetCveRequest
*/
GetCve(ctx _context.Context, cVE string) ApiGetCveRequest
/*
* GetCveExecute executes the request
* @return CVEDetailed
*/
GetCveExecute(r ApiGetCveRequest) (CVEDetailed, *_nethttp.Response, error)
/*
* GetCves Get CVEs
* List all the recent CVEs when no parameter is passed. Returns a convenience object as response with very minimum attributes.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiGetCvesRequest
*/
GetCves(ctx _context.Context) ApiGetCvesRequest
/*
* GetCvesExecute executes the request
* @return []CVE
*/
GetCvesExecute(r ApiGetCvesRequest) ([]CVE, *_nethttp.Response, error)
}
// DefaultApiService DefaultApi service
type DefaultApiService service
type ApiGetCveRequest struct {
ctx _context.Context
ApiService DefaultApi
cVE string
}
func (r ApiGetCveRequest) Execute() (CVEDetailed, *_nethttp.Response, error) {
return r.ApiService.GetCveExecute(r)
}
/*
* GetCve Get specific CVE
* Retrieve full CVE details
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param cVE
* @return ApiGetCveRequest
*/
func (a *DefaultApiService) GetCve(ctx _context.Context, cVE string) ApiGetCveRequest {
return ApiGetCveRequest{
ApiService: a,
ctx: ctx,
cVE: cVE,
}
}
/*
* Execute executes the request
* @return CVEDetailed
*/
func (a *DefaultApiService) GetCveExecute(r ApiGetCveRequest) (CVEDetailed, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue CVEDetailed
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetCve")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/cve/{CVE}.json"
localVarPath = strings.Replace(localVarPath, "{"+"CVE"+"}", _neturl.PathEscape(parameterToString(r.cVE, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetCvesRequest struct {
ctx _context.Context
ApiService DefaultApi
before *string
after *string
ids *string
bug *string
advisory *string
severity *string
package_ *string
product *string
cwe *string
cvssScore *float32
cvss3Score *string
page *float32
perPage *float32
createdDaysAgo *float32
}
func (r ApiGetCvesRequest) Before(before string) ApiGetCvesRequest {
r.before = &before
return r
}
func (r ApiGetCvesRequest) After(after string) ApiGetCvesRequest {
r.after = &after
return r
}
func (r ApiGetCvesRequest) Ids(ids string) ApiGetCvesRequest {
r.ids = &ids
return r
}
func (r ApiGetCvesRequest) Bug(bug string) ApiGetCvesRequest {
r.bug = &bug
return r
}
func (r ApiGetCvesRequest) Advisory(advisory string) ApiGetCvesRequest {
r.advisory = &advisory
return r
}
func (r ApiGetCvesRequest) Severity(severity string) ApiGetCvesRequest {
r.severity = &severity
return r
}
func (r ApiGetCvesRequest) Package_(package_ string) ApiGetCvesRequest {
r.package_ = &package_
return r
}
func (r ApiGetCvesRequest) Product(product string) ApiGetCvesRequest {
r.product = &product
return r
}
func (r ApiGetCvesRequest) Cwe(cwe string) ApiGetCvesRequest {
r.cwe = &cwe
return r
}
func (r ApiGetCvesRequest) CvssScore(cvssScore float32) ApiGetCvesRequest {
r.cvssScore = &cvssScore
return r
}
func (r ApiGetCvesRequest) Cvss3Score(cvss3Score string) ApiGetCvesRequest {
r.cvss3Score = &cvss3Score
return r
}
func (r ApiGetCvesRequest) Page(page float32) ApiGetCvesRequest {
r.page = &page
return r
}
func (r ApiGetCvesRequest) PerPage(perPage float32) ApiGetCvesRequest {
r.perPage = &perPage
return r
}
func (r ApiGetCvesRequest) CreatedDaysAgo(createdDaysAgo float32) ApiGetCvesRequest {
r.createdDaysAgo = &createdDaysAgo
return r
}
func (r ApiGetCvesRequest) Execute() ([]CVE, *_nethttp.Response, error) {
return r.ApiService.GetCvesExecute(r)
}
/*
* GetCves Get CVEs
* List all the recent CVEs when no parameter is passed. Returns a convenience object as response with very minimum attributes.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiGetCvesRequest
*/
func (a *DefaultApiService) GetCves(ctx _context.Context) ApiGetCvesRequest {
return ApiGetCvesRequest{
ApiService: a,
ctx: ctx,
}
}
/*
* Execute executes the request
* @return []CVE
*/
func (a *DefaultApiService) GetCvesExecute(r ApiGetCvesRequest) ([]CVE, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue []CVE
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetCves")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/cve.json"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if r.before != nil {
localVarQueryParams.Add("before", parameterToString(*r.before, ""))
}
if r.after != nil {
localVarQueryParams.Add("after", parameterToString(*r.after, ""))
}
if r.ids != nil {
localVarQueryParams.Add("ids", parameterToString(*r.ids, ""))
}
if r.bug != nil {
localVarQueryParams.Add("bug", parameterToString(*r.bug, ""))
}
if r.advisory != nil {
localVarQueryParams.Add("advisory", parameterToString(*r.advisory, ""))
}
if r.severity != nil {
localVarQueryParams.Add("severity", parameterToString(*r.severity, ""))
}
if r.package_ != nil {
localVarQueryParams.Add("package", parameterToString(*r.package_, ""))
}
if r.product != nil {
localVarQueryParams.Add("product", parameterToString(*r.product, ""))
}
if r.cwe != nil {
localVarQueryParams.Add("cwe", parameterToString(*r.cwe, ""))
}
if r.cvssScore != nil {
localVarQueryParams.Add("cvss_score", parameterToString(*r.cvssScore, ""))
}
if r.cvss3Score != nil {
localVarQueryParams.Add("cvss3_score", parameterToString(*r.cvss3Score, ""))
}
if r.page != nil {
localVarQueryParams.Add("page", parameterToString(*r.page, ""))
}
if r.perPage != nil {
localVarQueryParams.Add("per_page", parameterToString(*r.perPage, ""))
}
if r.createdDaysAgo != nil {
localVarQueryParams.Add("created_days_ago", parameterToString(*r.createdDaysAgo, ""))
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

View File

@ -1,536 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"bytes"
"context"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"unicode/utf8"
"golang.org/x/oauth2"
)
var (
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
)
// APIClient manages communication with the Red Hat Security Data API API v1.0
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
common service // Reuse a single struct instead of allocating one for each service on the heap.
// API Services
DefaultApi DefaultApi
}
type service struct {
client *APIClient
}
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
// optionally a custom http.Client to allow for advanced features such as caching.
func NewAPIClient(cfg *Configuration) *APIClient {
if cfg.HTTPClient == nil {
cfg.HTTPClient = http.DefaultClient
}
c := &APIClient{}
c.cfg = cfg
c.common.client = c
// API Services
c.DefaultApi = (*DefaultApiService)(&c.common)
return c
}
func atoi(in string) (int, error) {
return strconv.Atoi(in)
}
// selectHeaderContentType select a content type from the available list.
func selectHeaderContentType(contentTypes []string) string {
if len(contentTypes) == 0 {
return ""
}
if contains(contentTypes, "application/json") {
return "application/json"
}
return contentTypes[0] // use the first content type specified in 'consumes'
}
// selectHeaderAccept join all accept types and return
func selectHeaderAccept(accepts []string) string {
if len(accepts) == 0 {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}
// contains is a case insenstive match, finding needle in a haystack
func contains(haystack []string, needle string) bool {
for _, a := range haystack {
if strings.ToLower(a) == strings.ToLower(needle) {
return true
}
}
return false
}
// Verify optional parameters are of the correct type.
func typeCheckParameter(obj interface{}, expected string, name string) error {
// Make sure there is an object.
if obj == nil {
return nil
}
// Check the type is as expected.
if reflect.TypeOf(obj).String() != expected {
return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
}
return nil
}
// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
func parameterToString(obj interface{}, collectionFormat string) string {
var delimiter string
switch collectionFormat {
case "pipes":
delimiter = "|"
case "ssv":
delimiter = " "
case "tsv":
delimiter = "\t"
case "csv":
delimiter = ","
}
if reflect.TypeOf(obj).Kind() == reflect.Slice {
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
} else if t, ok := obj.(time.Time); ok {
return t.Format(time.RFC3339)
}
return fmt.Sprintf("%v", obj)
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
if c.cfg.Debug {
dump, err := httputil.DumpRequestOut(request, true)
if err != nil {
return nil, err
}
log.Printf("\n%s\n", string(dump))
}
resp, err := c.cfg.HTTPClient.Do(request)
if err != nil {
return resp, err
}
if c.cfg.Debug {
dump, err := httputil.DumpResponse(resp, true)
if err != nil {
return resp, err
}
log.Printf("\n%s\n", string(dump))
}
return resp, err
}
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
return c.cfg
}
// prepareRequest build the request
func (c *APIClient) prepareRequest(
ctx context.Context,
path string, method string,
postBody interface{},
headerParams map[string]string,
queryParams url.Values,
formParams url.Values,
formFileName string,
fileName string,
fileBytes []byte) (localVarRequest *http.Request, err error) {
var body *bytes.Buffer
// Detect postBody type and post.
if postBody != nil {
contentType := headerParams["Content-Type"]
if contentType == "" {
contentType = detectContentType(postBody)
headerParams["Content-Type"] = contentType
}
body, err = setBody(postBody, contentType)
if err != nil {
return nil, err
}
}
// add form parameters and file if available.
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
if body != nil {
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
}
body = &bytes.Buffer{}
w := multipart.NewWriter(body)
for k, v := range formParams {
for _, iv := range v {
if strings.HasPrefix(k, "@") { // file
err = addFile(w, k[1:], iv)
if err != nil {
return nil, err
}
} else { // form value
w.WriteField(k, iv)
}
}
}
if len(fileBytes) > 0 && fileName != "" {
w.Boundary()
//_, fileNm := filepath.Split(fileName)
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
if err != nil {
return nil, err
}
_, err = part.Write(fileBytes)
if err != nil {
return nil, err
}
}
// Set the Boundary in the Content-Type
headerParams["Content-Type"] = w.FormDataContentType()
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
w.Close()
}
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
if body != nil {
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
}
body = &bytes.Buffer{}
body.WriteString(formParams.Encode())
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
}
// Setup path and query parameters
url, err := url.Parse(path)
if err != nil {
return nil, err
}
// Override request host, if applicable
if c.cfg.Host != "" {
url.Host = c.cfg.Host
}
// Override request scheme, if applicable
if c.cfg.Scheme != "" {
url.Scheme = c.cfg.Scheme
}
// Adding Query Param
query := url.Query()
for k, v := range queryParams {
for _, iv := range v {
query.Add(k, iv)
}
}
// Encode the parameters.
url.RawQuery = query.Encode()
// Generate a new request
if body != nil {
localVarRequest, err = http.NewRequest(method, url.String(), body)
} else {
localVarRequest, err = http.NewRequest(method, url.String(), nil)
}
if err != nil {
return nil, err
}
// add header parameters, if any
if len(headerParams) > 0 {
headers := http.Header{}
for h, v := range headerParams {
headers.Set(h, v)
}
localVarRequest.Header = headers
}
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
if ctx != nil {
// add context to the request
localVarRequest = localVarRequest.WithContext(ctx)
// Walk through any authentication.
// OAuth2 authentication
if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
// We were able to grab an oauth2 token from the context
var latestToken *oauth2.Token
if latestToken, err = tok.Token(); err != nil {
return nil, err
}
latestToken.SetAuthHeader(localVarRequest)
}
// Basic HTTP Authentication
if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
}
// AccessToken Authentication
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
}
}
for header, value := range c.cfg.DefaultHeader {
localVarRequest.Header.Add(header, value)
}
return localVarRequest, nil
}
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
if len(b) == 0 {
return nil
}
if s, ok := v.(*string); ok {
*s = string(b)
return nil
}
if xmlCheck.MatchString(contentType) {
if err = xml.Unmarshal(b, v); err != nil {
return err
}
return nil
}
if jsonCheck.MatchString(contentType) {
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
return err
}
} else {
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err
}
return nil
}
return errors.New("undefined response type")
}
// Add a file to the multipart request
func addFile(w *multipart.Writer, fieldName, path string) error {
file, err := os.Open(path)
if err != nil {
return err
}
defer file.Close()
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
if err != nil {
return err
}
_, err = io.Copy(part, file)
return err
}
// Prevent trying to import "fmt"
func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {
bodyBuf = &bytes.Buffer{}
}
if reader, ok := body.(io.Reader); ok {
_, err = bodyBuf.ReadFrom(reader)
} else if fp, ok := body.(**os.File); ok {
_, err = bodyBuf.ReadFrom(*fp)
} else if b, ok := body.([]byte); ok {
_, err = bodyBuf.Write(b)
} else if s, ok := body.(string); ok {
_, err = bodyBuf.WriteString(s)
} else if s, ok := body.(*string); ok {
_, err = bodyBuf.WriteString(*s)
} else if jsonCheck.MatchString(contentType) {
err = json.NewEncoder(bodyBuf).Encode(body)
} else if xmlCheck.MatchString(contentType) {
err = xml.NewEncoder(bodyBuf).Encode(body)
}
if err != nil {
return nil, err
}
if bodyBuf.Len() == 0 {
err = fmt.Errorf("Invalid body type %s\n", contentType)
return nil, err
}
return bodyBuf, nil
}
// detectContentType method is used to figure out `Request.Body` content type for request header
func detectContentType(body interface{}) string {
contentType := "text/plain; charset=utf-8"
kind := reflect.TypeOf(body).Kind()
switch kind {
case reflect.Struct, reflect.Map, reflect.Ptr:
contentType = "application/json; charset=utf-8"
case reflect.String:
contentType = "text/plain; charset=utf-8"
default:
if b, ok := body.([]byte); ok {
contentType = http.DetectContentType(b)
} else if kind == reflect.Slice {
contentType = "application/json; charset=utf-8"
}
}
return contentType
}
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
type cacheControl map[string]string
func parseCacheControl(headers http.Header) cacheControl {
cc := cacheControl{}
ccHeader := headers.Get("Cache-Control")
for _, part := range strings.Split(ccHeader, ",") {
part = strings.Trim(part, " ")
if part == "" {
continue
}
if strings.ContainsRune(part, '=') {
keyval := strings.Split(part, "=")
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
} else {
cc[part] = ""
}
}
return cc
}
// CacheExpires helper function to determine remaining time before repeating a request.
func CacheExpires(r *http.Response) time.Time {
// Figure out when the cache expires.
var expires time.Time
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
if err != nil {
return time.Now()
}
respCacheControl := parseCacheControl(r.Header)
if maxAge, ok := respCacheControl["max-age"]; ok {
lifetime, err := time.ParseDuration(maxAge + "s")
if err != nil {
expires = now
} else {
expires = now.Add(lifetime)
}
} else {
expiresHeader := r.Header.Get("Expires")
if expiresHeader != "" {
expires, err = time.Parse(time.RFC1123, expiresHeader)
if err != nil {
expires = now
}
}
}
return expires
}
func strlen(s string) int {
return utf8.RuneCountInString(s)
}
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
type GenericOpenAPIError struct {
body []byte
error string
model interface{}
}
// Error returns non-empty string if there was an error.
func (e GenericOpenAPIError) Error() string {
return e.error
}
// Body returns the raw bytes of the response
func (e GenericOpenAPIError) Body() []byte {
return e.body
}
// Model returns the unpacked model of the error
func (e GenericOpenAPIError) Model() interface{} {
return e.model
}

View File

@ -1,230 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"context"
"fmt"
"net/http"
"strings"
)
// contextKeys are used to identify the type of value in the context.
// Since these are string, it is possible to get a short description of the
// context key for logging and debugging using key.String().
type contextKey string
func (c contextKey) String() string {
return "auth " + string(c)
}
var (
// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOAuth2 = contextKey("token")
// ContextBasicAuth takes BasicAuth as authentication for the request.
ContextBasicAuth = contextKey("basic")
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAccessToken = contextKey("accesstoken")
// ContextAPIKeys takes a string apikey as authentication for the request
ContextAPIKeys = contextKey("apiKeys")
// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextHttpSignatureAuth = contextKey("httpsignature")
// ContextServerIndex uses a server configuration from the index.
ContextServerIndex = contextKey("serverIndex")
// ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerIndices = contextKey("serverOperationIndices")
// ContextServerVariables overrides a server configuration variables.
ContextServerVariables = contextKey("serverVariables")
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextOperationServerVariables = contextKey("serverOperationVariables")
)
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIKey struct {
Key string
Prefix string
}
// ServerVariable stores the information about a server variable
type ServerVariable struct {
Description string
DefaultValue string
EnumValues []string
}
// ServerConfiguration stores the information about a server
type ServerConfiguration struct {
URL string
Description string
Variables map[string]ServerVariable
}
// ServerConfigurations stores multiple ServerConfiguration items
type ServerConfigurations []ServerConfiguration
// Configuration stores the configuration of the API client
type Configuration struct {
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
Servers ServerConfigurations
OperationServers map[string]ServerConfigurations
HTTPClient *http.Client
}
// NewConfiguration returns a new Configuration object
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Servers: ServerConfigurations{
{
URL: "https://access.redhat.com/hydra/rest/securitydata",
Description: "No description provided",
},
},
OperationServers: map[string]ServerConfigurations{},
}
return cfg
}
// AddDefaultHeader adds a new HTTP header to the default header in the request
func (c *Configuration) AddDefaultHeader(key string, value string) {
c.DefaultHeader[key] = value
}
// URL formats template on a index using given variables
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
if index < 0 || len(sc) <= index {
return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1)
}
server := sc[index]
url := server.URL
// go through variables and replace placeholders
for name, variable := range server.Variables {
if value, ok := variables[name]; ok {
found := bool(len(variable.EnumValues) == 0)
for _, enumValue := range variable.EnumValues {
if value == enumValue {
found = true
}
}
if !found {
return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
}
url = strings.Replace(url, "{"+name+"}", value, -1)
} else {
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
}
}
return url, nil
}
// ServerURL returns URL based on server settings
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
return c.Servers.URL(index, variables)
}
func getServerIndex(ctx context.Context) (int, error) {
si := ctx.Value(ContextServerIndex)
if si != nil {
if index, ok := si.(int); ok {
return index, nil
}
return 0, reportError("Invalid type %T should be int", si)
}
return 0, nil
}
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
osi := ctx.Value(ContextOperationServerIndices)
if osi != nil {
if operationIndices, ok := osi.(map[string]int); !ok {
return 0, reportError("Invalid type %T should be map[string]int", osi)
} else {
index, ok := operationIndices[endpoint]
if ok {
return index, nil
}
}
}
return getServerIndex(ctx)
}
func getServerVariables(ctx context.Context) (map[string]string, error) {
sv := ctx.Value(ContextServerVariables)
if sv != nil {
if variables, ok := sv.(map[string]string); ok {
return variables, nil
}
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
}
return nil, nil
}
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
osv := ctx.Value(ContextOperationServerVariables)
if osv != nil {
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
} else {
variables, ok := operationVariables[endpoint]
if ok {
return variables, nil
}
}
}
return getServerVariables(ctx)
}
// ServerURLWithContext returns a new server URL given an endpoint
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
sc, ok := c.OperationServers[endpoint]
if !ok {
sc = c.Servers
}
if ctx == nil {
return sc.URL(0, nil)
}
index, err := getServerOperationIndex(ctx, endpoint)
if err != nil {
return "", err
}
variables, err := getServerOperationVariables(ctx, endpoint)
if err != nil {
return "", err
}
return sc.URL(index, variables)
}

View File

@ -1,313 +0,0 @@
# CVE
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CVE** | **string** | |
**Severity** | **string** | |
**PublicDate** | **string** | |
**Advisories** | **[]string** | |
**Bugzilla** | **string** | |
**BugzillaDescription** | **string** | |
**CvssScore** | Pointer to **float32** | | [optional]
**CvssScoringVector** | Pointer to **string** | | [optional]
**CWE** | **string** | |
**AffectedPackages** | **[]string** | |
**ResourceUrl** | **string** | |
**Cvss3ScoringVector** | **string** | |
**Cvss3Score** | **string** | |
## Methods
### NewCVE
`func NewCVE(cVE string, severity string, publicDate string, advisories []string, bugzilla string, bugzillaDescription string, cWE string, affectedPackages []string, resourceUrl string, cvss3ScoringVector string, cvss3Score string, ) *CVE`
NewCVE instantiates a new CVE object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEWithDefaults
`func NewCVEWithDefaults() *CVE`
NewCVEWithDefaults instantiates a new CVE object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCVE
`func (o *CVE) GetCVE() string`
GetCVE returns the CVE field if non-nil, zero value otherwise.
### GetCVEOk
`func (o *CVE) GetCVEOk() (*string, bool)`
GetCVEOk returns a tuple with the CVE field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCVE
`func (o *CVE) SetCVE(v string)`
SetCVE sets CVE field to given value.
### GetSeverity
`func (o *CVE) GetSeverity() string`
GetSeverity returns the Severity field if non-nil, zero value otherwise.
### GetSeverityOk
`func (o *CVE) GetSeverityOk() (*string, bool)`
GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSeverity
`func (o *CVE) SetSeverity(v string)`
SetSeverity sets Severity field to given value.
### GetPublicDate
`func (o *CVE) GetPublicDate() string`
GetPublicDate returns the PublicDate field if non-nil, zero value otherwise.
### GetPublicDateOk
`func (o *CVE) GetPublicDateOk() (*string, bool)`
GetPublicDateOk returns a tuple with the PublicDate field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPublicDate
`func (o *CVE) SetPublicDate(v string)`
SetPublicDate sets PublicDate field to given value.
### GetAdvisories
`func (o *CVE) GetAdvisories() []string`
GetAdvisories returns the Advisories field if non-nil, zero value otherwise.
### GetAdvisoriesOk
`func (o *CVE) GetAdvisoriesOk() (*[]string, bool)`
GetAdvisoriesOk returns a tuple with the Advisories field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAdvisories
`func (o *CVE) SetAdvisories(v []string)`
SetAdvisories sets Advisories field to given value.
### GetBugzilla
`func (o *CVE) GetBugzilla() string`
GetBugzilla returns the Bugzilla field if non-nil, zero value otherwise.
### GetBugzillaOk
`func (o *CVE) GetBugzillaOk() (*string, bool)`
GetBugzillaOk returns a tuple with the Bugzilla field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBugzilla
`func (o *CVE) SetBugzilla(v string)`
SetBugzilla sets Bugzilla field to given value.
### GetBugzillaDescription
`func (o *CVE) GetBugzillaDescription() string`
GetBugzillaDescription returns the BugzillaDescription field if non-nil, zero value otherwise.
### GetBugzillaDescriptionOk
`func (o *CVE) GetBugzillaDescriptionOk() (*string, bool)`
GetBugzillaDescriptionOk returns a tuple with the BugzillaDescription field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBugzillaDescription
`func (o *CVE) SetBugzillaDescription(v string)`
SetBugzillaDescription sets BugzillaDescription field to given value.
### GetCvssScore
`func (o *CVE) GetCvssScore() float32`
GetCvssScore returns the CvssScore field if non-nil, zero value otherwise.
### GetCvssScoreOk
`func (o *CVE) GetCvssScoreOk() (*float32, bool)`
GetCvssScoreOk returns a tuple with the CvssScore field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvssScore
`func (o *CVE) SetCvssScore(v float32)`
SetCvssScore sets CvssScore field to given value.
### HasCvssScore
`func (o *CVE) HasCvssScore() bool`
HasCvssScore returns a boolean if a field has been set.
### GetCvssScoringVector
`func (o *CVE) GetCvssScoringVector() string`
GetCvssScoringVector returns the CvssScoringVector field if non-nil, zero value otherwise.
### GetCvssScoringVectorOk
`func (o *CVE) GetCvssScoringVectorOk() (*string, bool)`
GetCvssScoringVectorOk returns a tuple with the CvssScoringVector field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvssScoringVector
`func (o *CVE) SetCvssScoringVector(v string)`
SetCvssScoringVector sets CvssScoringVector field to given value.
### HasCvssScoringVector
`func (o *CVE) HasCvssScoringVector() bool`
HasCvssScoringVector returns a boolean if a field has been set.
### GetCWE
`func (o *CVE) GetCWE() string`
GetCWE returns the CWE field if non-nil, zero value otherwise.
### GetCWEOk
`func (o *CVE) GetCWEOk() (*string, bool)`
GetCWEOk returns a tuple with the CWE field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCWE
`func (o *CVE) SetCWE(v string)`
SetCWE sets CWE field to given value.
### GetAffectedPackages
`func (o *CVE) GetAffectedPackages() []string`
GetAffectedPackages returns the AffectedPackages field if non-nil, zero value otherwise.
### GetAffectedPackagesOk
`func (o *CVE) GetAffectedPackagesOk() (*[]string, bool)`
GetAffectedPackagesOk returns a tuple with the AffectedPackages field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAffectedPackages
`func (o *CVE) SetAffectedPackages(v []string)`
SetAffectedPackages sets AffectedPackages field to given value.
### GetResourceUrl
`func (o *CVE) GetResourceUrl() string`
GetResourceUrl returns the ResourceUrl field if non-nil, zero value otherwise.
### GetResourceUrlOk
`func (o *CVE) GetResourceUrlOk() (*string, bool)`
GetResourceUrlOk returns a tuple with the ResourceUrl field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetResourceUrl
`func (o *CVE) SetResourceUrl(v string)`
SetResourceUrl sets ResourceUrl field to given value.
### GetCvss3ScoringVector
`func (o *CVE) GetCvss3ScoringVector() string`
GetCvss3ScoringVector returns the Cvss3ScoringVector field if non-nil, zero value otherwise.
### GetCvss3ScoringVectorOk
`func (o *CVE) GetCvss3ScoringVectorOk() (*string, bool)`
GetCvss3ScoringVectorOk returns a tuple with the Cvss3ScoringVector field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvss3ScoringVector
`func (o *CVE) SetCvss3ScoringVector(v string)`
SetCvss3ScoringVector sets Cvss3ScoringVector field to given value.
### GetCvss3Score
`func (o *CVE) GetCvss3Score() string`
GetCvss3Score returns the Cvss3Score field if non-nil, zero value otherwise.
### GetCvss3ScoreOk
`func (o *CVE) GetCvss3ScoreOk() (*string, bool)`
GetCvss3ScoreOk returns a tuple with the Cvss3Score field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvss3Score
`func (o *CVE) SetCvss3Score(v string)`
SetCvss3Score sets Cvss3Score field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,271 +0,0 @@
# CVEDetailed
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ThreatSeverity** | **string** | |
**PublicDate** | **string** | |
**Bugzilla** | [**CVEDetailedBugzilla**](CVEDetailedBugzilla.md) | |
**Cvss3** | [**CVEDetailedCvss3**](CVEDetailedCvss3.md) | |
**Cwe** | **string** | |
**Details** | **[]string** | |
**Acknowledgement** | **string** | |
**AffectedRelease** | Pointer to [**[]CVEDetailedAffectedRelease**](CVEDetailedAffectedRelease.md) | | [optional]
**Name** | **string** | |
**Csaw** | **bool** | |
**PackageState** | Pointer to [**[]CVEDetailedPackageState**](CVEDetailedPackageState.md) | | [optional]
## Methods
### NewCVEDetailed
`func NewCVEDetailed(threatSeverity string, publicDate string, bugzilla CVEDetailedBugzilla, cvss3 CVEDetailedCvss3, cwe string, details []string, acknowledgement string, name string, csaw bool, ) *CVEDetailed`
NewCVEDetailed instantiates a new CVEDetailed object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEDetailedWithDefaults
`func NewCVEDetailedWithDefaults() *CVEDetailed`
NewCVEDetailedWithDefaults instantiates a new CVEDetailed object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetThreatSeverity
`func (o *CVEDetailed) GetThreatSeverity() string`
GetThreatSeverity returns the ThreatSeverity field if non-nil, zero value otherwise.
### GetThreatSeverityOk
`func (o *CVEDetailed) GetThreatSeverityOk() (*string, bool)`
GetThreatSeverityOk returns a tuple with the ThreatSeverity field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetThreatSeverity
`func (o *CVEDetailed) SetThreatSeverity(v string)`
SetThreatSeverity sets ThreatSeverity field to given value.
### GetPublicDate
`func (o *CVEDetailed) GetPublicDate() string`
GetPublicDate returns the PublicDate field if non-nil, zero value otherwise.
### GetPublicDateOk
`func (o *CVEDetailed) GetPublicDateOk() (*string, bool)`
GetPublicDateOk returns a tuple with the PublicDate field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPublicDate
`func (o *CVEDetailed) SetPublicDate(v string)`
SetPublicDate sets PublicDate field to given value.
### GetBugzilla
`func (o *CVEDetailed) GetBugzilla() CVEDetailedBugzilla`
GetBugzilla returns the Bugzilla field if non-nil, zero value otherwise.
### GetBugzillaOk
`func (o *CVEDetailed) GetBugzillaOk() (*CVEDetailedBugzilla, bool)`
GetBugzillaOk returns a tuple with the Bugzilla field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBugzilla
`func (o *CVEDetailed) SetBugzilla(v CVEDetailedBugzilla)`
SetBugzilla sets Bugzilla field to given value.
### GetCvss3
`func (o *CVEDetailed) GetCvss3() CVEDetailedCvss3`
GetCvss3 returns the Cvss3 field if non-nil, zero value otherwise.
### GetCvss3Ok
`func (o *CVEDetailed) GetCvss3Ok() (*CVEDetailedCvss3, bool)`
GetCvss3Ok returns a tuple with the Cvss3 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvss3
`func (o *CVEDetailed) SetCvss3(v CVEDetailedCvss3)`
SetCvss3 sets Cvss3 field to given value.
### GetCwe
`func (o *CVEDetailed) GetCwe() string`
GetCwe returns the Cwe field if non-nil, zero value otherwise.
### GetCweOk
`func (o *CVEDetailed) GetCweOk() (*string, bool)`
GetCweOk returns a tuple with the Cwe field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCwe
`func (o *CVEDetailed) SetCwe(v string)`
SetCwe sets Cwe field to given value.
### GetDetails
`func (o *CVEDetailed) GetDetails() []string`
GetDetails returns the Details field if non-nil, zero value otherwise.
### GetDetailsOk
`func (o *CVEDetailed) GetDetailsOk() (*[]string, bool)`
GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDetails
`func (o *CVEDetailed) SetDetails(v []string)`
SetDetails sets Details field to given value.
### GetAcknowledgement
`func (o *CVEDetailed) GetAcknowledgement() string`
GetAcknowledgement returns the Acknowledgement field if non-nil, zero value otherwise.
### GetAcknowledgementOk
`func (o *CVEDetailed) GetAcknowledgementOk() (*string, bool)`
GetAcknowledgementOk returns a tuple with the Acknowledgement field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAcknowledgement
`func (o *CVEDetailed) SetAcknowledgement(v string)`
SetAcknowledgement sets Acknowledgement field to given value.
### GetAffectedRelease
`func (o *CVEDetailed) GetAffectedRelease() []CVEDetailedAffectedRelease`
GetAffectedRelease returns the AffectedRelease field if non-nil, zero value otherwise.
### GetAffectedReleaseOk
`func (o *CVEDetailed) GetAffectedReleaseOk() (*[]CVEDetailedAffectedRelease, bool)`
GetAffectedReleaseOk returns a tuple with the AffectedRelease field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAffectedRelease
`func (o *CVEDetailed) SetAffectedRelease(v []CVEDetailedAffectedRelease)`
SetAffectedRelease sets AffectedRelease field to given value.
### HasAffectedRelease
`func (o *CVEDetailed) HasAffectedRelease() bool`
HasAffectedRelease returns a boolean if a field has been set.
### GetName
`func (o *CVEDetailed) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *CVEDetailed) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *CVEDetailed) SetName(v string)`
SetName sets Name field to given value.
### GetCsaw
`func (o *CVEDetailed) GetCsaw() bool`
GetCsaw returns the Csaw field if non-nil, zero value otherwise.
### GetCsawOk
`func (o *CVEDetailed) GetCsawOk() (*bool, bool)`
GetCsawOk returns a tuple with the Csaw field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCsaw
`func (o *CVEDetailed) SetCsaw(v bool)`
SetCsaw sets Csaw field to given value.
### GetPackageState
`func (o *CVEDetailed) GetPackageState() []CVEDetailedPackageState`
GetPackageState returns the PackageState field if non-nil, zero value otherwise.
### GetPackageStateOk
`func (o *CVEDetailed) GetPackageStateOk() (*[]CVEDetailedPackageState, bool)`
GetPackageStateOk returns a tuple with the PackageState field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPackageState
`func (o *CVEDetailed) SetPackageState(v []CVEDetailedPackageState)`
SetPackageState sets PackageState field to given value.
### HasPackageState
`func (o *CVEDetailed) HasPackageState() bool`
HasPackageState returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,140 +0,0 @@
# CVEDetailedAffectedRelease
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ProductName** | **string** | |
**ReleaseDate** | **string** | |
**Advisory** | **string** | |
**Cpe** | **string** | |
**Package** | Pointer to **string** | | [optional]
## Methods
### NewCVEDetailedAffectedRelease
`func NewCVEDetailedAffectedRelease(productName string, releaseDate string, advisory string, cpe string, ) *CVEDetailedAffectedRelease`
NewCVEDetailedAffectedRelease instantiates a new CVEDetailedAffectedRelease object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEDetailedAffectedReleaseWithDefaults
`func NewCVEDetailedAffectedReleaseWithDefaults() *CVEDetailedAffectedRelease`
NewCVEDetailedAffectedReleaseWithDefaults instantiates a new CVEDetailedAffectedRelease object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetProductName
`func (o *CVEDetailedAffectedRelease) GetProductName() string`
GetProductName returns the ProductName field if non-nil, zero value otherwise.
### GetProductNameOk
`func (o *CVEDetailedAffectedRelease) GetProductNameOk() (*string, bool)`
GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetProductName
`func (o *CVEDetailedAffectedRelease) SetProductName(v string)`
SetProductName sets ProductName field to given value.
### GetReleaseDate
`func (o *CVEDetailedAffectedRelease) GetReleaseDate() string`
GetReleaseDate returns the ReleaseDate field if non-nil, zero value otherwise.
### GetReleaseDateOk
`func (o *CVEDetailedAffectedRelease) GetReleaseDateOk() (*string, bool)`
GetReleaseDateOk returns a tuple with the ReleaseDate field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetReleaseDate
`func (o *CVEDetailedAffectedRelease) SetReleaseDate(v string)`
SetReleaseDate sets ReleaseDate field to given value.
### GetAdvisory
`func (o *CVEDetailedAffectedRelease) GetAdvisory() string`
GetAdvisory returns the Advisory field if non-nil, zero value otherwise.
### GetAdvisoryOk
`func (o *CVEDetailedAffectedRelease) GetAdvisoryOk() (*string, bool)`
GetAdvisoryOk returns a tuple with the Advisory field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAdvisory
`func (o *CVEDetailedAffectedRelease) SetAdvisory(v string)`
SetAdvisory sets Advisory field to given value.
### GetCpe
`func (o *CVEDetailedAffectedRelease) GetCpe() string`
GetCpe returns the Cpe field if non-nil, zero value otherwise.
### GetCpeOk
`func (o *CVEDetailedAffectedRelease) GetCpeOk() (*string, bool)`
GetCpeOk returns a tuple with the Cpe field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCpe
`func (o *CVEDetailedAffectedRelease) SetCpe(v string)`
SetCpe sets Cpe field to given value.
### GetPackage
`func (o *CVEDetailedAffectedRelease) GetPackage() string`
GetPackage returns the Package field if non-nil, zero value otherwise.
### GetPackageOk
`func (o *CVEDetailedAffectedRelease) GetPackageOk() (*string, bool)`
GetPackageOk returns a tuple with the Package field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPackage
`func (o *CVEDetailedAffectedRelease) SetPackage(v string)`
SetPackage sets Package field to given value.
### HasPackage
`func (o *CVEDetailedAffectedRelease) HasPackage() bool`
HasPackage returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,93 +0,0 @@
# CVEDetailedBugzilla
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Description** | **string** | |
**Id** | **string** | |
**Url** | **string** | |
## Methods
### NewCVEDetailedBugzilla
`func NewCVEDetailedBugzilla(description string, id string, url string, ) *CVEDetailedBugzilla`
NewCVEDetailedBugzilla instantiates a new CVEDetailedBugzilla object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEDetailedBugzillaWithDefaults
`func NewCVEDetailedBugzillaWithDefaults() *CVEDetailedBugzilla`
NewCVEDetailedBugzillaWithDefaults instantiates a new CVEDetailedBugzilla object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDescription
`func (o *CVEDetailedBugzilla) GetDescription() string`
GetDescription returns the Description field if non-nil, zero value otherwise.
### GetDescriptionOk
`func (o *CVEDetailedBugzilla) GetDescriptionOk() (*string, bool)`
GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDescription
`func (o *CVEDetailedBugzilla) SetDescription(v string)`
SetDescription sets Description field to given value.
### GetId
`func (o *CVEDetailedBugzilla) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *CVEDetailedBugzilla) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *CVEDetailedBugzilla) SetId(v string)`
SetId sets Id field to given value.
### GetUrl
`func (o *CVEDetailedBugzilla) GetUrl() string`
GetUrl returns the Url field if non-nil, zero value otherwise.
### GetUrlOk
`func (o *CVEDetailedBugzilla) GetUrlOk() (*string, bool)`
GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUrl
`func (o *CVEDetailedBugzilla) SetUrl(v string)`
SetUrl sets Url field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,93 +0,0 @@
# CVEDetailedCvss3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cvss3BaseScore** | **string** | |
**Cvss3ScoringVector** | **string** | |
**Status** | **string** | |
## Methods
### NewCVEDetailedCvss3
`func NewCVEDetailedCvss3(cvss3BaseScore string, cvss3ScoringVector string, status string, ) *CVEDetailedCvss3`
NewCVEDetailedCvss3 instantiates a new CVEDetailedCvss3 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEDetailedCvss3WithDefaults
`func NewCVEDetailedCvss3WithDefaults() *CVEDetailedCvss3`
NewCVEDetailedCvss3WithDefaults instantiates a new CVEDetailedCvss3 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCvss3BaseScore
`func (o *CVEDetailedCvss3) GetCvss3BaseScore() string`
GetCvss3BaseScore returns the Cvss3BaseScore field if non-nil, zero value otherwise.
### GetCvss3BaseScoreOk
`func (o *CVEDetailedCvss3) GetCvss3BaseScoreOk() (*string, bool)`
GetCvss3BaseScoreOk returns a tuple with the Cvss3BaseScore field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvss3BaseScore
`func (o *CVEDetailedCvss3) SetCvss3BaseScore(v string)`
SetCvss3BaseScore sets Cvss3BaseScore field to given value.
### GetCvss3ScoringVector
`func (o *CVEDetailedCvss3) GetCvss3ScoringVector() string`
GetCvss3ScoringVector returns the Cvss3ScoringVector field if non-nil, zero value otherwise.
### GetCvss3ScoringVectorOk
`func (o *CVEDetailedCvss3) GetCvss3ScoringVectorOk() (*string, bool)`
GetCvss3ScoringVectorOk returns a tuple with the Cvss3ScoringVector field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCvss3ScoringVector
`func (o *CVEDetailedCvss3) SetCvss3ScoringVector(v string)`
SetCvss3ScoringVector sets Cvss3ScoringVector field to given value.
### GetStatus
`func (o *CVEDetailedCvss3) GetStatus() string`
GetStatus returns the Status field if non-nil, zero value otherwise.
### GetStatusOk
`func (o *CVEDetailedCvss3) GetStatusOk() (*string, bool)`
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetStatus
`func (o *CVEDetailedCvss3) SetStatus(v string)`
SetStatus sets Status field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,114 +0,0 @@
# CVEDetailedPackageState
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ProductName** | **string** | |
**FixState** | **string** | |
**PackageName** | **string** | |
**Cpe** | **string** | |
## Methods
### NewCVEDetailedPackageState
`func NewCVEDetailedPackageState(productName string, fixState string, packageName string, cpe string, ) *CVEDetailedPackageState`
NewCVEDetailedPackageState instantiates a new CVEDetailedPackageState object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCVEDetailedPackageStateWithDefaults
`func NewCVEDetailedPackageStateWithDefaults() *CVEDetailedPackageState`
NewCVEDetailedPackageStateWithDefaults instantiates a new CVEDetailedPackageState object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetProductName
`func (o *CVEDetailedPackageState) GetProductName() string`
GetProductName returns the ProductName field if non-nil, zero value otherwise.
### GetProductNameOk
`func (o *CVEDetailedPackageState) GetProductNameOk() (*string, bool)`
GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetProductName
`func (o *CVEDetailedPackageState) SetProductName(v string)`
SetProductName sets ProductName field to given value.
### GetFixState
`func (o *CVEDetailedPackageState) GetFixState() string`
GetFixState returns the FixState field if non-nil, zero value otherwise.
### GetFixStateOk
`func (o *CVEDetailedPackageState) GetFixStateOk() (*string, bool)`
GetFixStateOk returns a tuple with the FixState field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFixState
`func (o *CVEDetailedPackageState) SetFixState(v string)`
SetFixState sets FixState field to given value.
### GetPackageName
`func (o *CVEDetailedPackageState) GetPackageName() string`
GetPackageName returns the PackageName field if non-nil, zero value otherwise.
### GetPackageNameOk
`func (o *CVEDetailedPackageState) GetPackageNameOk() (*string, bool)`
GetPackageNameOk returns a tuple with the PackageName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPackageName
`func (o *CVEDetailedPackageState) SetPackageName(v string)`
SetPackageName sets PackageName field to given value.
### GetCpe
`func (o *CVEDetailedPackageState) GetCpe() string`
GetCpe returns the Cpe field if non-nil, zero value otherwise.
### GetCpeOk
`func (o *CVEDetailedPackageState) GetCpeOk() (*string, bool)`
GetCpeOk returns a tuple with the Cpe field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCpe
`func (o *CVEDetailedPackageState) SetCpe(v string)`
SetCpe sets Cpe field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,173 +0,0 @@
# \DefaultApi
All URIs are relative to *https://access.redhat.com/hydra/rest/securitydata*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetCve**](DefaultApi.md#GetCve) | **Get** /cve/{CVE}.json | Get specific CVE
[**GetCves**](DefaultApi.md#GetCves) | **Get** /cve.json | Get CVEs
## GetCve
> CVEDetailed GetCve(ctx, cVE).Execute()
Get specific CVE
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cVE := "cVE_example" // string |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.GetCve(context.Background(), cVE).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetCve``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCve`: CVEDetailed
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetCve`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**cVE** | **string** | |
### Other Parameters
Other parameters are passed through a pointer to a apiGetCveRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**CVEDetailed**](CVEDetailed.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetCves
> []CVE GetCves(ctx).Before(before).After(after).Ids(ids).Bug(bug).Advisory(advisory).Severity(severity).Package_(package_).Product(product).Cwe(cwe).CvssScore(cvssScore).Cvss3Score(cvss3Score).Page(page).PerPage(perPage).CreatedDaysAgo(createdDaysAgo).Execute()
Get CVEs
### Example
```go
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
before := time.Now() // string | CVEs before the query date. [ISO 8601 is the expected format] (optional)
after := time.Now() // string | CVEs after the query date. [ISO 8601 is the expected format] (optional)
ids := "ids_example" // string | CVEs for Ids separated by comma (optional)
bug := "bug_example" // string | CVEs for Bugzilla Ids (optional)
advisory := "advisory_example" // string | CVEs for advisory (optional)
severity := "severity_example" // string | CVEs for severity (optional)
package_ := "package__example" // string | CVEs which affect the package (optional)
product := "product_example" // string | CVEs which affect the product. The parameter supports Perl compatible regular expressions. (optional)
cwe := "cwe_example" // string | CVEs with CWE (optional)
cvssScore := float32(8.14) // float32 | CVEs with CVSS score greater than or equal to this value (optional)
cvss3Score := "cvss3Score_example" // string | CVEs with CVSSv3 score greater than or equal to this value (optional)
page := float32(8.14) // float32 | CVEs for page number (optional)
perPage := float32(8.14) // float32 | Number of CVEs to return per page (optional)
createdDaysAgo := float32(8.14) // float32 | Index of CVEs definitions created days ago (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.GetCves(context.Background()).Before(before).After(after).Ids(ids).Bug(bug).Advisory(advisory).Severity(severity).Package_(package_).Product(product).Cwe(cwe).CvssScore(cvssScore).Cvss3Score(cvss3Score).Page(page).PerPage(perPage).CreatedDaysAgo(createdDaysAgo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetCves``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCves`: []CVE
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetCves`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiGetCvesRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**before** | **string** | CVEs before the query date. [ISO 8601 is the expected format] |
**after** | **string** | CVEs after the query date. [ISO 8601 is the expected format] |
**ids** | **string** | CVEs for Ids separated by comma |
**bug** | **string** | CVEs for Bugzilla Ids |
**advisory** | **string** | CVEs for advisory |
**severity** | **string** | CVEs for severity |
**package_** | **string** | CVEs which affect the package |
**product** | **string** | CVEs which affect the product. The parameter supports Perl compatible regular expressions. |
**cwe** | **string** | CVEs with CWE |
**cvssScore** | **float32** | CVEs with CVSS score greater than or equal to this value |
**cvss3Score** | **string** | CVEs with CVSSv3 score greater than or equal to this value |
**page** | **float32** | CVEs for page number |
**perPage** | **float32** | Number of CVEs to return per page |
**createdDaysAgo** | **float32** | Index of CVEs definitions created days ago |
### Return type
[**[]CVE**](CVE.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

View File

@ -1,32 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//go:generate openapi-gen . -g go -i ./Red-Hat-Security-Data-API.yaml --additional-properties=packageName=rhsecurity,generateInterfaces=true
package rhsecurity

View File

@ -1,469 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVE CVE model used in listing
type CVE struct {
CVE string `json:"CVE"`
Severity string `json:"severity"`
PublicDate string `json:"public_date"`
Advisories []string `json:"advisories"`
Bugzilla string `json:"bugzilla"`
BugzillaDescription string `json:"bugzilla_description"`
CvssScore *float32 `json:"cvss_score,omitempty"`
CvssScoringVector *string `json:"cvss_scoring_vector,omitempty"`
CWE string `json:"CWE"`
AffectedPackages []string `json:"affected_packages"`
ResourceUrl string `json:"resource_url"`
Cvss3ScoringVector string `json:"cvss3_scoring_vector"`
Cvss3Score string `json:"cvss3_score"`
}
// NewCVE instantiates a new CVE object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVE(cVE string, severity string, publicDate string, advisories []string, bugzilla string, bugzillaDescription string, cWE string, affectedPackages []string, resourceUrl string, cvss3ScoringVector string, cvss3Score string) *CVE {
this := CVE{}
this.CVE = cVE
this.Severity = severity
this.PublicDate = publicDate
this.Advisories = advisories
this.Bugzilla = bugzilla
this.BugzillaDescription = bugzillaDescription
this.CWE = cWE
this.AffectedPackages = affectedPackages
this.ResourceUrl = resourceUrl
this.Cvss3ScoringVector = cvss3ScoringVector
this.Cvss3Score = cvss3Score
return &this
}
// NewCVEWithDefaults instantiates a new CVE object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEWithDefaults() *CVE {
this := CVE{}
return &this
}
// GetCVE returns the CVE field value
func (o *CVE) GetCVE() string {
if o == nil {
var ret string
return ret
}
return o.CVE
}
// GetCVEOk returns a tuple with the CVE field value
// and a boolean to check if the value has been set.
func (o *CVE) GetCVEOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CVE, true
}
// SetCVE sets field value
func (o *CVE) SetCVE(v string) {
o.CVE = v
}
// GetSeverity returns the Severity field value
func (o *CVE) GetSeverity() string {
if o == nil {
var ret string
return ret
}
return o.Severity
}
// GetSeverityOk returns a tuple with the Severity field value
// and a boolean to check if the value has been set.
func (o *CVE) GetSeverityOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Severity, true
}
// SetSeverity sets field value
func (o *CVE) SetSeverity(v string) {
o.Severity = v
}
// GetPublicDate returns the PublicDate field value
func (o *CVE) GetPublicDate() string {
if o == nil {
var ret string
return ret
}
return o.PublicDate
}
// GetPublicDateOk returns a tuple with the PublicDate field value
// and a boolean to check if the value has been set.
func (o *CVE) GetPublicDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PublicDate, true
}
// SetPublicDate sets field value
func (o *CVE) SetPublicDate(v string) {
o.PublicDate = v
}
// GetAdvisories returns the Advisories field value
func (o *CVE) GetAdvisories() []string {
if o == nil {
var ret []string
return ret
}
return o.Advisories
}
// GetAdvisoriesOk returns a tuple with the Advisories field value
// and a boolean to check if the value has been set.
func (o *CVE) GetAdvisoriesOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return &o.Advisories, true
}
// SetAdvisories sets field value
func (o *CVE) SetAdvisories(v []string) {
o.Advisories = v
}
// GetBugzilla returns the Bugzilla field value
func (o *CVE) GetBugzilla() string {
if o == nil {
var ret string
return ret
}
return o.Bugzilla
}
// GetBugzillaOk returns a tuple with the Bugzilla field value
// and a boolean to check if the value has been set.
func (o *CVE) GetBugzillaOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Bugzilla, true
}
// SetBugzilla sets field value
func (o *CVE) SetBugzilla(v string) {
o.Bugzilla = v
}
// GetBugzillaDescription returns the BugzillaDescription field value
func (o *CVE) GetBugzillaDescription() string {
if o == nil {
var ret string
return ret
}
return o.BugzillaDescription
}
// GetBugzillaDescriptionOk returns a tuple with the BugzillaDescription field value
// and a boolean to check if the value has been set.
func (o *CVE) GetBugzillaDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BugzillaDescription, true
}
// SetBugzillaDescription sets field value
func (o *CVE) SetBugzillaDescription(v string) {
o.BugzillaDescription = v
}
// GetCvssScore returns the CvssScore field value if set, zero value otherwise.
func (o *CVE) GetCvssScore() float32 {
if o == nil || o.CvssScore == nil {
var ret float32
return ret
}
return *o.CvssScore
}
// GetCvssScoreOk returns a tuple with the CvssScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CVE) GetCvssScoreOk() (*float32, bool) {
if o == nil || o.CvssScore == nil {
return nil, false
}
return o.CvssScore, true
}
// HasCvssScore returns a boolean if a field has been set.
func (o *CVE) HasCvssScore() bool {
if o != nil && o.CvssScore != nil {
return true
}
return false
}
// SetCvssScore gets a reference to the given float32 and assigns it to the CvssScore field.
func (o *CVE) SetCvssScore(v float32) {
o.CvssScore = &v
}
// GetCvssScoringVector returns the CvssScoringVector field value if set, zero value otherwise.
func (o *CVE) GetCvssScoringVector() string {
if o == nil || o.CvssScoringVector == nil {
var ret string
return ret
}
return *o.CvssScoringVector
}
// GetCvssScoringVectorOk returns a tuple with the CvssScoringVector field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CVE) GetCvssScoringVectorOk() (*string, bool) {
if o == nil || o.CvssScoringVector == nil {
return nil, false
}
return o.CvssScoringVector, true
}
// HasCvssScoringVector returns a boolean if a field has been set.
func (o *CVE) HasCvssScoringVector() bool {
if o != nil && o.CvssScoringVector != nil {
return true
}
return false
}
// SetCvssScoringVector gets a reference to the given string and assigns it to the CvssScoringVector field.
func (o *CVE) SetCvssScoringVector(v string) {
o.CvssScoringVector = &v
}
// GetCWE returns the CWE field value
func (o *CVE) GetCWE() string {
if o == nil {
var ret string
return ret
}
return o.CWE
}
// GetCWEOk returns a tuple with the CWE field value
// and a boolean to check if the value has been set.
func (o *CVE) GetCWEOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CWE, true
}
// SetCWE sets field value
func (o *CVE) SetCWE(v string) {
o.CWE = v
}
// GetAffectedPackages returns the AffectedPackages field value
func (o *CVE) GetAffectedPackages() []string {
if o == nil {
var ret []string
return ret
}
return o.AffectedPackages
}
// GetAffectedPackagesOk returns a tuple with the AffectedPackages field value
// and a boolean to check if the value has been set.
func (o *CVE) GetAffectedPackagesOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return &o.AffectedPackages, true
}
// SetAffectedPackages sets field value
func (o *CVE) SetAffectedPackages(v []string) {
o.AffectedPackages = v
}
// GetResourceUrl returns the ResourceUrl field value
func (o *CVE) GetResourceUrl() string {
if o == nil {
var ret string
return ret
}
return o.ResourceUrl
}
// GetResourceUrlOk returns a tuple with the ResourceUrl field value
// and a boolean to check if the value has been set.
func (o *CVE) GetResourceUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceUrl, true
}
// SetResourceUrl sets field value
func (o *CVE) SetResourceUrl(v string) {
o.ResourceUrl = v
}
// GetCvss3ScoringVector returns the Cvss3ScoringVector field value
func (o *CVE) GetCvss3ScoringVector() string {
if o == nil {
var ret string
return ret
}
return o.Cvss3ScoringVector
}
// GetCvss3ScoringVectorOk returns a tuple with the Cvss3ScoringVector field value
// and a boolean to check if the value has been set.
func (o *CVE) GetCvss3ScoringVectorOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cvss3ScoringVector, true
}
// SetCvss3ScoringVector sets field value
func (o *CVE) SetCvss3ScoringVector(v string) {
o.Cvss3ScoringVector = v
}
// GetCvss3Score returns the Cvss3Score field value
func (o *CVE) GetCvss3Score() string {
if o == nil {
var ret string
return ret
}
return o.Cvss3Score
}
// GetCvss3ScoreOk returns a tuple with the Cvss3Score field value
// and a boolean to check if the value has been set.
func (o *CVE) GetCvss3ScoreOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cvss3Score, true
}
// SetCvss3Score sets field value
func (o *CVE) SetCvss3Score(v string) {
o.Cvss3Score = v
}
func (o CVE) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["CVE"] = o.CVE
}
if true {
toSerialize["severity"] = o.Severity
}
if true {
toSerialize["public_date"] = o.PublicDate
}
if true {
toSerialize["advisories"] = o.Advisories
}
if true {
toSerialize["bugzilla"] = o.Bugzilla
}
if true {
toSerialize["bugzilla_description"] = o.BugzillaDescription
}
if o.CvssScore != nil {
toSerialize["cvss_score"] = o.CvssScore
}
if o.CvssScoringVector != nil {
toSerialize["cvss_scoring_vector"] = o.CvssScoringVector
}
if true {
toSerialize["CWE"] = o.CWE
}
if true {
toSerialize["affected_packages"] = o.AffectedPackages
}
if true {
toSerialize["resource_url"] = o.ResourceUrl
}
if true {
toSerialize["cvss3_scoring_vector"] = o.Cvss3ScoringVector
}
if true {
toSerialize["cvss3_score"] = o.Cvss3Score
}
return json.Marshal(toSerialize)
}
type NullableCVE struct {
value *CVE
isSet bool
}
func (v NullableCVE) Get() *CVE {
return v.value
}
func (v *NullableCVE) Set(val *CVE) {
v.value = val
v.isSet = true
}
func (v NullableCVE) IsSet() bool {
return v.isSet
}
func (v *NullableCVE) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVE(val *CVE) *NullableCVE {
return &NullableCVE{value: val, isSet: true}
}
func (v NullableCVE) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVE) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,411 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVEDetailed CVE model used when retrieving a specific CVE
type CVEDetailed struct {
ThreatSeverity string `json:"threat_severity"`
PublicDate string `json:"public_date"`
Bugzilla CVEDetailedBugzilla `json:"bugzilla"`
Cvss3 CVEDetailedCvss3 `json:"cvss3"`
Cwe string `json:"cwe"`
Details []string `json:"details"`
Acknowledgement string `json:"acknowledgement"`
AffectedRelease *[]CVEDetailedAffectedRelease `json:"affected_release,omitempty"`
Name string `json:"name"`
Csaw bool `json:"csaw"`
PackageState *[]CVEDetailedPackageState `json:"package_state,omitempty"`
}
// NewCVEDetailed instantiates a new CVEDetailed object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVEDetailed(threatSeverity string, publicDate string, bugzilla CVEDetailedBugzilla, cvss3 CVEDetailedCvss3, cwe string, details []string, acknowledgement string, name string, csaw bool) *CVEDetailed {
this := CVEDetailed{}
this.ThreatSeverity = threatSeverity
this.PublicDate = publicDate
this.Bugzilla = bugzilla
this.Cvss3 = cvss3
this.Cwe = cwe
this.Details = details
this.Acknowledgement = acknowledgement
this.Name = name
this.Csaw = csaw
return &this
}
// NewCVEDetailedWithDefaults instantiates a new CVEDetailed object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEDetailedWithDefaults() *CVEDetailed {
this := CVEDetailed{}
return &this
}
// GetThreatSeverity returns the ThreatSeverity field value
func (o *CVEDetailed) GetThreatSeverity() string {
if o == nil {
var ret string
return ret
}
return o.ThreatSeverity
}
// GetThreatSeverityOk returns a tuple with the ThreatSeverity field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetThreatSeverityOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ThreatSeverity, true
}
// SetThreatSeverity sets field value
func (o *CVEDetailed) SetThreatSeverity(v string) {
o.ThreatSeverity = v
}
// GetPublicDate returns the PublicDate field value
func (o *CVEDetailed) GetPublicDate() string {
if o == nil {
var ret string
return ret
}
return o.PublicDate
}
// GetPublicDateOk returns a tuple with the PublicDate field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetPublicDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PublicDate, true
}
// SetPublicDate sets field value
func (o *CVEDetailed) SetPublicDate(v string) {
o.PublicDate = v
}
// GetBugzilla returns the Bugzilla field value
func (o *CVEDetailed) GetBugzilla() CVEDetailedBugzilla {
if o == nil {
var ret CVEDetailedBugzilla
return ret
}
return o.Bugzilla
}
// GetBugzillaOk returns a tuple with the Bugzilla field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetBugzillaOk() (*CVEDetailedBugzilla, bool) {
if o == nil {
return nil, false
}
return &o.Bugzilla, true
}
// SetBugzilla sets field value
func (o *CVEDetailed) SetBugzilla(v CVEDetailedBugzilla) {
o.Bugzilla = v
}
// GetCvss3 returns the Cvss3 field value
func (o *CVEDetailed) GetCvss3() CVEDetailedCvss3 {
if o == nil {
var ret CVEDetailedCvss3
return ret
}
return o.Cvss3
}
// GetCvss3Ok returns a tuple with the Cvss3 field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetCvss3Ok() (*CVEDetailedCvss3, bool) {
if o == nil {
return nil, false
}
return &o.Cvss3, true
}
// SetCvss3 sets field value
func (o *CVEDetailed) SetCvss3(v CVEDetailedCvss3) {
o.Cvss3 = v
}
// GetCwe returns the Cwe field value
func (o *CVEDetailed) GetCwe() string {
if o == nil {
var ret string
return ret
}
return o.Cwe
}
// GetCweOk returns a tuple with the Cwe field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetCweOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cwe, true
}
// SetCwe sets field value
func (o *CVEDetailed) SetCwe(v string) {
o.Cwe = v
}
// GetDetails returns the Details field value
func (o *CVEDetailed) GetDetails() []string {
if o == nil {
var ret []string
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetDetailsOk() (*[]string, bool) {
if o == nil {
return nil, false
}
return &o.Details, true
}
// SetDetails sets field value
func (o *CVEDetailed) SetDetails(v []string) {
o.Details = v
}
// GetAcknowledgement returns the Acknowledgement field value
func (o *CVEDetailed) GetAcknowledgement() string {
if o == nil {
var ret string
return ret
}
return o.Acknowledgement
}
// GetAcknowledgementOk returns a tuple with the Acknowledgement field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetAcknowledgementOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Acknowledgement, true
}
// SetAcknowledgement sets field value
func (o *CVEDetailed) SetAcknowledgement(v string) {
o.Acknowledgement = v
}
// GetAffectedRelease returns the AffectedRelease field value if set, zero value otherwise.
func (o *CVEDetailed) GetAffectedRelease() []CVEDetailedAffectedRelease {
if o == nil || o.AffectedRelease == nil {
var ret []CVEDetailedAffectedRelease
return ret
}
return *o.AffectedRelease
}
// GetAffectedReleaseOk returns a tuple with the AffectedRelease field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetAffectedReleaseOk() (*[]CVEDetailedAffectedRelease, bool) {
if o == nil || o.AffectedRelease == nil {
return nil, false
}
return o.AffectedRelease, true
}
// HasAffectedRelease returns a boolean if a field has been set.
func (o *CVEDetailed) HasAffectedRelease() bool {
if o != nil && o.AffectedRelease != nil {
return true
}
return false
}
// SetAffectedRelease gets a reference to the given []CVEDetailedAffectedRelease and assigns it to the AffectedRelease field.
func (o *CVEDetailed) SetAffectedRelease(v []CVEDetailedAffectedRelease) {
o.AffectedRelease = &v
}
// GetName returns the Name field value
func (o *CVEDetailed) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *CVEDetailed) SetName(v string) {
o.Name = v
}
// GetCsaw returns the Csaw field value
func (o *CVEDetailed) GetCsaw() bool {
if o == nil {
var ret bool
return ret
}
return o.Csaw
}
// GetCsawOk returns a tuple with the Csaw field value
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetCsawOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Csaw, true
}
// SetCsaw sets field value
func (o *CVEDetailed) SetCsaw(v bool) {
o.Csaw = v
}
// GetPackageState returns the PackageState field value if set, zero value otherwise.
func (o *CVEDetailed) GetPackageState() []CVEDetailedPackageState {
if o == nil || o.PackageState == nil {
var ret []CVEDetailedPackageState
return ret
}
return *o.PackageState
}
// GetPackageStateOk returns a tuple with the PackageState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CVEDetailed) GetPackageStateOk() (*[]CVEDetailedPackageState, bool) {
if o == nil || o.PackageState == nil {
return nil, false
}
return o.PackageState, true
}
// HasPackageState returns a boolean if a field has been set.
func (o *CVEDetailed) HasPackageState() bool {
if o != nil && o.PackageState != nil {
return true
}
return false
}
// SetPackageState gets a reference to the given []CVEDetailedPackageState and assigns it to the PackageState field.
func (o *CVEDetailed) SetPackageState(v []CVEDetailedPackageState) {
o.PackageState = &v
}
func (o CVEDetailed) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["threat_severity"] = o.ThreatSeverity
}
if true {
toSerialize["public_date"] = o.PublicDate
}
if true {
toSerialize["bugzilla"] = o.Bugzilla
}
if true {
toSerialize["cvss3"] = o.Cvss3
}
if true {
toSerialize["cwe"] = o.Cwe
}
if true {
toSerialize["details"] = o.Details
}
if true {
toSerialize["acknowledgement"] = o.Acknowledgement
}
if o.AffectedRelease != nil {
toSerialize["affected_release"] = o.AffectedRelease
}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["csaw"] = o.Csaw
}
if o.PackageState != nil {
toSerialize["package_state"] = o.PackageState
}
return json.Marshal(toSerialize)
}
type NullableCVEDetailed struct {
value *CVEDetailed
isSet bool
}
func (v NullableCVEDetailed) Get() *CVEDetailed {
return v.value
}
func (v *NullableCVEDetailed) Set(val *CVEDetailed) {
v.value = val
v.isSet = true
}
func (v NullableCVEDetailed) IsSet() bool {
return v.isSet
}
func (v *NullableCVEDetailed) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVEDetailed(val *CVEDetailed) *NullableCVEDetailed {
return &NullableCVEDetailed{value: val, isSet: true}
}
func (v NullableCVEDetailed) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVEDetailed) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,230 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVEDetailedAffectedRelease struct for CVEDetailedAffectedRelease
type CVEDetailedAffectedRelease struct {
ProductName string `json:"product_name"`
ReleaseDate string `json:"release_date"`
Advisory string `json:"advisory"`
Cpe string `json:"cpe"`
Package *string `json:"package,omitempty"`
}
// NewCVEDetailedAffectedRelease instantiates a new CVEDetailedAffectedRelease object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVEDetailedAffectedRelease(productName string, releaseDate string, advisory string, cpe string) *CVEDetailedAffectedRelease {
this := CVEDetailedAffectedRelease{}
this.ProductName = productName
this.ReleaseDate = releaseDate
this.Advisory = advisory
this.Cpe = cpe
return &this
}
// NewCVEDetailedAffectedReleaseWithDefaults instantiates a new CVEDetailedAffectedRelease object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEDetailedAffectedReleaseWithDefaults() *CVEDetailedAffectedRelease {
this := CVEDetailedAffectedRelease{}
return &this
}
// GetProductName returns the ProductName field value
func (o *CVEDetailedAffectedRelease) GetProductName() string {
if o == nil {
var ret string
return ret
}
return o.ProductName
}
// GetProductNameOk returns a tuple with the ProductName field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedAffectedRelease) GetProductNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProductName, true
}
// SetProductName sets field value
func (o *CVEDetailedAffectedRelease) SetProductName(v string) {
o.ProductName = v
}
// GetReleaseDate returns the ReleaseDate field value
func (o *CVEDetailedAffectedRelease) GetReleaseDate() string {
if o == nil {
var ret string
return ret
}
return o.ReleaseDate
}
// GetReleaseDateOk returns a tuple with the ReleaseDate field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedAffectedRelease) GetReleaseDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ReleaseDate, true
}
// SetReleaseDate sets field value
func (o *CVEDetailedAffectedRelease) SetReleaseDate(v string) {
o.ReleaseDate = v
}
// GetAdvisory returns the Advisory field value
func (o *CVEDetailedAffectedRelease) GetAdvisory() string {
if o == nil {
var ret string
return ret
}
return o.Advisory
}
// GetAdvisoryOk returns a tuple with the Advisory field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedAffectedRelease) GetAdvisoryOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Advisory, true
}
// SetAdvisory sets field value
func (o *CVEDetailedAffectedRelease) SetAdvisory(v string) {
o.Advisory = v
}
// GetCpe returns the Cpe field value
func (o *CVEDetailedAffectedRelease) GetCpe() string {
if o == nil {
var ret string
return ret
}
return o.Cpe
}
// GetCpeOk returns a tuple with the Cpe field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedAffectedRelease) GetCpeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cpe, true
}
// SetCpe sets field value
func (o *CVEDetailedAffectedRelease) SetCpe(v string) {
o.Cpe = v
}
// GetPackage returns the Package field value if set, zero value otherwise.
func (o *CVEDetailedAffectedRelease) GetPackage() string {
if o == nil || o.Package == nil {
var ret string
return ret
}
return *o.Package
}
// GetPackageOk returns a tuple with the Package field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CVEDetailedAffectedRelease) GetPackageOk() (*string, bool) {
if o == nil || o.Package == nil {
return nil, false
}
return o.Package, true
}
// HasPackage returns a boolean if a field has been set.
func (o *CVEDetailedAffectedRelease) HasPackage() bool {
if o != nil && o.Package != nil {
return true
}
return false
}
// SetPackage gets a reference to the given string and assigns it to the Package field.
func (o *CVEDetailedAffectedRelease) SetPackage(v string) {
o.Package = &v
}
func (o CVEDetailedAffectedRelease) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["product_name"] = o.ProductName
}
if true {
toSerialize["release_date"] = o.ReleaseDate
}
if true {
toSerialize["advisory"] = o.Advisory
}
if true {
toSerialize["cpe"] = o.Cpe
}
if o.Package != nil {
toSerialize["package"] = o.Package
}
return json.Marshal(toSerialize)
}
type NullableCVEDetailedAffectedRelease struct {
value *CVEDetailedAffectedRelease
isSet bool
}
func (v NullableCVEDetailedAffectedRelease) Get() *CVEDetailedAffectedRelease {
return v.value
}
func (v *NullableCVEDetailedAffectedRelease) Set(val *CVEDetailedAffectedRelease) {
v.value = val
v.isSet = true
}
func (v NullableCVEDetailedAffectedRelease) IsSet() bool {
return v.isSet
}
func (v *NullableCVEDetailedAffectedRelease) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVEDetailedAffectedRelease(val *CVEDetailedAffectedRelease) *NullableCVEDetailedAffectedRelease {
return &NullableCVEDetailedAffectedRelease{value: val, isSet: true}
}
func (v NullableCVEDetailedAffectedRelease) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVEDetailedAffectedRelease) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,165 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVEDetailedBugzilla struct for CVEDetailedBugzilla
type CVEDetailedBugzilla struct {
Description string `json:"description"`
Id string `json:"id"`
Url string `json:"url"`
}
// NewCVEDetailedBugzilla instantiates a new CVEDetailedBugzilla object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVEDetailedBugzilla(description string, id string, url string) *CVEDetailedBugzilla {
this := CVEDetailedBugzilla{}
this.Description = description
this.Id = id
this.Url = url
return &this
}
// NewCVEDetailedBugzillaWithDefaults instantiates a new CVEDetailedBugzilla object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEDetailedBugzillaWithDefaults() *CVEDetailedBugzilla {
this := CVEDetailedBugzilla{}
return &this
}
// GetDescription returns the Description field value
func (o *CVEDetailedBugzilla) GetDescription() string {
if o == nil {
var ret string
return ret
}
return o.Description
}
// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedBugzilla) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Description, true
}
// SetDescription sets field value
func (o *CVEDetailedBugzilla) SetDescription(v string) {
o.Description = v
}
// GetId returns the Id field value
func (o *CVEDetailedBugzilla) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedBugzilla) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *CVEDetailedBugzilla) SetId(v string) {
o.Id = v
}
// GetUrl returns the Url field value
func (o *CVEDetailedBugzilla) GetUrl() string {
if o == nil {
var ret string
return ret
}
return o.Url
}
// GetUrlOk returns a tuple with the Url field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedBugzilla) GetUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Url, true
}
// SetUrl sets field value
func (o *CVEDetailedBugzilla) SetUrl(v string) {
o.Url = v
}
func (o CVEDetailedBugzilla) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["description"] = o.Description
}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["url"] = o.Url
}
return json.Marshal(toSerialize)
}
type NullableCVEDetailedBugzilla struct {
value *CVEDetailedBugzilla
isSet bool
}
func (v NullableCVEDetailedBugzilla) Get() *CVEDetailedBugzilla {
return v.value
}
func (v *NullableCVEDetailedBugzilla) Set(val *CVEDetailedBugzilla) {
v.value = val
v.isSet = true
}
func (v NullableCVEDetailedBugzilla) IsSet() bool {
return v.isSet
}
func (v *NullableCVEDetailedBugzilla) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVEDetailedBugzilla(val *CVEDetailedBugzilla) *NullableCVEDetailedBugzilla {
return &NullableCVEDetailedBugzilla{value: val, isSet: true}
}
func (v NullableCVEDetailedBugzilla) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVEDetailedBugzilla) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,165 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVEDetailedCvss3 struct for CVEDetailedCvss3
type CVEDetailedCvss3 struct {
Cvss3BaseScore string `json:"cvss3_base_score"`
Cvss3ScoringVector string `json:"cvss3_scoring_vector"`
Status string `json:"status"`
}
// NewCVEDetailedCvss3 instantiates a new CVEDetailedCvss3 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVEDetailedCvss3(cvss3BaseScore string, cvss3ScoringVector string, status string) *CVEDetailedCvss3 {
this := CVEDetailedCvss3{}
this.Cvss3BaseScore = cvss3BaseScore
this.Cvss3ScoringVector = cvss3ScoringVector
this.Status = status
return &this
}
// NewCVEDetailedCvss3WithDefaults instantiates a new CVEDetailedCvss3 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEDetailedCvss3WithDefaults() *CVEDetailedCvss3 {
this := CVEDetailedCvss3{}
return &this
}
// GetCvss3BaseScore returns the Cvss3BaseScore field value
func (o *CVEDetailedCvss3) GetCvss3BaseScore() string {
if o == nil {
var ret string
return ret
}
return o.Cvss3BaseScore
}
// GetCvss3BaseScoreOk returns a tuple with the Cvss3BaseScore field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedCvss3) GetCvss3BaseScoreOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cvss3BaseScore, true
}
// SetCvss3BaseScore sets field value
func (o *CVEDetailedCvss3) SetCvss3BaseScore(v string) {
o.Cvss3BaseScore = v
}
// GetCvss3ScoringVector returns the Cvss3ScoringVector field value
func (o *CVEDetailedCvss3) GetCvss3ScoringVector() string {
if o == nil {
var ret string
return ret
}
return o.Cvss3ScoringVector
}
// GetCvss3ScoringVectorOk returns a tuple with the Cvss3ScoringVector field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedCvss3) GetCvss3ScoringVectorOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cvss3ScoringVector, true
}
// SetCvss3ScoringVector sets field value
func (o *CVEDetailedCvss3) SetCvss3ScoringVector(v string) {
o.Cvss3ScoringVector = v
}
// GetStatus returns the Status field value
func (o *CVEDetailedCvss3) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedCvss3) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *CVEDetailedCvss3) SetStatus(v string) {
o.Status = v
}
func (o CVEDetailedCvss3) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["cvss3_base_score"] = o.Cvss3BaseScore
}
if true {
toSerialize["cvss3_scoring_vector"] = o.Cvss3ScoringVector
}
if true {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}
type NullableCVEDetailedCvss3 struct {
value *CVEDetailedCvss3
isSet bool
}
func (v NullableCVEDetailedCvss3) Get() *CVEDetailedCvss3 {
return v.value
}
func (v *NullableCVEDetailedCvss3) Set(val *CVEDetailedCvss3) {
v.value = val
v.isSet = true
}
func (v NullableCVEDetailedCvss3) IsSet() bool {
return v.isSet
}
func (v *NullableCVEDetailedCvss3) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVEDetailedCvss3(val *CVEDetailedCvss3) *NullableCVEDetailedCvss3 {
return &NullableCVEDetailedCvss3{value: val, isSet: true}
}
func (v NullableCVEDetailedCvss3) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVEDetailedCvss3) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,194 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
)
// CVEDetailedPackageState struct for CVEDetailedPackageState
type CVEDetailedPackageState struct {
ProductName string `json:"product_name"`
FixState string `json:"fix_state"`
PackageName string `json:"package_name"`
Cpe string `json:"cpe"`
}
// NewCVEDetailedPackageState instantiates a new CVEDetailedPackageState object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCVEDetailedPackageState(productName string, fixState string, packageName string, cpe string) *CVEDetailedPackageState {
this := CVEDetailedPackageState{}
this.ProductName = productName
this.FixState = fixState
this.PackageName = packageName
this.Cpe = cpe
return &this
}
// NewCVEDetailedPackageStateWithDefaults instantiates a new CVEDetailedPackageState object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCVEDetailedPackageStateWithDefaults() *CVEDetailedPackageState {
this := CVEDetailedPackageState{}
return &this
}
// GetProductName returns the ProductName field value
func (o *CVEDetailedPackageState) GetProductName() string {
if o == nil {
var ret string
return ret
}
return o.ProductName
}
// GetProductNameOk returns a tuple with the ProductName field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedPackageState) GetProductNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProductName, true
}
// SetProductName sets field value
func (o *CVEDetailedPackageState) SetProductName(v string) {
o.ProductName = v
}
// GetFixState returns the FixState field value
func (o *CVEDetailedPackageState) GetFixState() string {
if o == nil {
var ret string
return ret
}
return o.FixState
}
// GetFixStateOk returns a tuple with the FixState field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedPackageState) GetFixStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.FixState, true
}
// SetFixState sets field value
func (o *CVEDetailedPackageState) SetFixState(v string) {
o.FixState = v
}
// GetPackageName returns the PackageName field value
func (o *CVEDetailedPackageState) GetPackageName() string {
if o == nil {
var ret string
return ret
}
return o.PackageName
}
// GetPackageNameOk returns a tuple with the PackageName field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedPackageState) GetPackageNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PackageName, true
}
// SetPackageName sets field value
func (o *CVEDetailedPackageState) SetPackageName(v string) {
o.PackageName = v
}
// GetCpe returns the Cpe field value
func (o *CVEDetailedPackageState) GetCpe() string {
if o == nil {
var ret string
return ret
}
return o.Cpe
}
// GetCpeOk returns a tuple with the Cpe field value
// and a boolean to check if the value has been set.
func (o *CVEDetailedPackageState) GetCpeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Cpe, true
}
// SetCpe sets field value
func (o *CVEDetailedPackageState) SetCpe(v string) {
o.Cpe = v
}
func (o CVEDetailedPackageState) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["product_name"] = o.ProductName
}
if true {
toSerialize["fix_state"] = o.FixState
}
if true {
toSerialize["package_name"] = o.PackageName
}
if true {
toSerialize["cpe"] = o.Cpe
}
return json.Marshal(toSerialize)
}
type NullableCVEDetailedPackageState struct {
value *CVEDetailedPackageState
isSet bool
}
func (v NullableCVEDetailedPackageState) Get() *CVEDetailedPackageState {
return v.value
}
func (v *NullableCVEDetailedPackageState) Set(val *CVEDetailedPackageState) {
v.value = val
v.isSet = true
}
func (v NullableCVEDetailedPackageState) IsSet() bool {
return v.isSet
}
func (v *NullableCVEDetailedPackageState) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCVEDetailedPackageState(val *CVEDetailedPackageState) *NullableCVEDetailedPackageState {
return &NullableCVEDetailedPackageState{value: val, isSet: true}
}
func (v NullableCVEDetailedPackageState) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCVEDetailedPackageState) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,48 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"net/http"
)
// APIResponse stores the API response returned by the server.
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
// Operation is the name of the OpenAPI operation.
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
Payload []byte `json:"-"`
}
// NewAPIResponse returns a new APIResonse object.
func NewAPIResponse(r *http.Response) *APIResponse {
response := &APIResponse{Response: r}
return response
}
// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
func NewAPIResponseWithError(errorMessage string) *APIResponse {
response := &APIResponse{Message: errorMessage}
return response
}

View File

@ -1,329 +0,0 @@
/*
* Red Hat Security Data API
*
* Unofficial OpenAPI definitions for Red Hat Security Data API
*
* API version: 1.0
* Contact: mustafa@ctrliq.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package rhsecurity
import (
"encoding/json"
"time"
)
// PtrBool is a helper routine that returns a pointer to given boolean value.
func PtrBool(v bool) *bool { return &v }
// PtrInt is a helper routine that returns a pointer to given integer value.
func PtrInt(v int) *int { return &v }
// PtrInt32 is a helper routine that returns a pointer to given integer value.
func PtrInt32(v int32) *int32 { return &v }
// PtrInt64 is a helper routine that returns a pointer to given integer value.
func PtrInt64(v int64) *int64 { return &v }
// PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat32(v float32) *float32 { return &v }
// PtrFloat64 is a helper routine that returns a pointer to given float value.
func PtrFloat64(v float64) *float64 { return &v }
// PtrString is a helper routine that returns a pointer to given string value.
func PtrString(v string) *string { return &v }
// PtrTime is helper routine that returns a pointer to given Time value.
func PtrTime(v time.Time) *time.Time { return &v }
type NullableBool struct {
value *bool
isSet bool
}
func (v NullableBool) Get() *bool {
return v.value
}
func (v *NullableBool) Set(val *bool) {
v.value = val
v.isSet = true
}
func (v NullableBool) IsSet() bool {
return v.isSet
}
func (v *NullableBool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBool(val *bool) *NullableBool {
return &NullableBool{value: val, isSet: true}
}
func (v NullableBool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt struct {
value *int
isSet bool
}
func (v NullableInt) Get() *int {
return v.value
}
func (v *NullableInt) Set(val *int) {
v.value = val
v.isSet = true
}
func (v NullableInt) IsSet() bool {
return v.isSet
}
func (v *NullableInt) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt(val *int) *NullableInt {
return &NullableInt{value: val, isSet: true}
}
func (v NullableInt) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt32 struct {
value *int32
isSet bool
}
func (v NullableInt32) Get() *int32 {
return v.value
}
func (v *NullableInt32) Set(val *int32) {
v.value = val
v.isSet = true
}
func (v NullableInt32) IsSet() bool {
return v.isSet
}
func (v *NullableInt32) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt32(val *int32) *NullableInt32 {
return &NullableInt32{value: val, isSet: true}
}
func (v NullableInt32) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt32) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableInt64 struct {
value *int64
isSet bool
}
func (v NullableInt64) Get() *int64 {
return v.value
}
func (v *NullableInt64) Set(val *int64) {
v.value = val
v.isSet = true
}
func (v NullableInt64) IsSet() bool {
return v.isSet
}
func (v *NullableInt64) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInt64(val *int64) *NullableInt64 {
return &NullableInt64{value: val, isSet: true}
}
func (v NullableInt64) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInt64) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableFloat32 struct {
value *float32
isSet bool
}
func (v NullableFloat32) Get() *float32 {
return v.value
}
func (v *NullableFloat32) Set(val *float32) {
v.value = val
v.isSet = true
}
func (v NullableFloat32) IsSet() bool {
return v.isSet
}
func (v *NullableFloat32) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFloat32(val *float32) *NullableFloat32 {
return &NullableFloat32{value: val, isSet: true}
}
func (v NullableFloat32) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableFloat64 struct {
value *float64
isSet bool
}
func (v NullableFloat64) Get() *float64 {
return v.value
}
func (v *NullableFloat64) Set(val *float64) {
v.value = val
v.isSet = true
}
func (v NullableFloat64) IsSet() bool {
return v.isSet
}
func (v *NullableFloat64) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFloat64(val *float64) *NullableFloat64 {
return &NullableFloat64{value: val, isSet: true}
}
func (v NullableFloat64) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableString struct {
value *string
isSet bool
}
func (v NullableString) Get() *string {
return v.value
}
func (v *NullableString) Set(val *string) {
v.value = val
v.isSet = true
}
func (v NullableString) IsSet() bool {
return v.isSet
}
func (v *NullableString) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableString(val *string) *NullableString {
return &NullableString{value: val, isSet: true}
}
func (v NullableString) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableString) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NullableTime struct {
value *time.Time
isSet bool
}
func (v NullableTime) Get() *time.Time {
return v.value
}
func (v *NullableTime) Set(val *time.Time) {
v.value = val
v.isSet = true
}
func (v NullableTime) IsSet() bool {
return v.isSet
}
func (v *NullableTime) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTime(val *time.Time) *NullableTime {
return &NullableTime{value: val, isSet: true}
}
func (v NullableTime) MarshalJSON() ([]byte, error) {
return v.value.MarshalJSON()
}
func (v *NullableTime) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -1,12 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "rhsecuritymock",
srcs = ["client.go"],
importpath = "peridot.resf.org/apollo/rhsecuritymock",
visibility = ["//visibility:public"],
deps = [
"//apollo/rhsecurity",
"//utils",
],
)

View File

@ -1,102 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package rhsecuritymock
import (
_context "context"
_nethttp "net/http"
"peridot.resf.org/apollo/rhsecurity"
"peridot.resf.org/utils"
)
type Client struct {
orig rhsecurity.DefaultApi
ActivePage float32
ActiveCVE *rhsecurity.CVEDetailed
Cves map[float32][]*rhsecurity.CVE
}
func New() *Client {
return &Client{
orig: rhsecurity.NewAPIClient(rhsecurity.NewConfiguration()).DefaultApi,
ActivePage: 1,
Cves: map[float32][]*rhsecurity.CVE{},
}
}
/*
* GetCve Get specific CVE
* Retrieve full CVE details
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param cVE
* @return ApiGetCveRequest
*/
func (c *Client) GetCve(ctx _context.Context, cVE string) rhsecurity.ApiGetCveRequest {
return c.orig.GetCve(ctx, cVE)
}
/*
* GetCveExecute executes the request
* @return CVEDetailed
*/
func (c *Client) GetCveExecute(_ rhsecurity.ApiGetCveRequest) (rhsecurity.CVEDetailed, *_nethttp.Response, error) {
if c.ActiveCVE != nil {
return *c.ActiveCVE, &_nethttp.Response{}, nil
}
return rhsecurity.CVEDetailed{}, nil, utils.CouldNotFindObject
}
/*
* GetCves Get CVEs
* List all the recent CVEs when no parameter is passed. Returns a convenience object as response with very minimum attributes.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return ApiGetCvesRequest
*/
func (c *Client) GetCves(ctx _context.Context) rhsecurity.ApiGetCvesRequest {
c.ActivePage = 1
return c.orig.GetCves(ctx)
}
/*
* GetCvesExecute executes the request
* @return []CVE
*/
func (c *Client) GetCvesExecute(_ rhsecurity.ApiGetCvesRequest) ([]rhsecurity.CVE, *_nethttp.Response, error) {
var cves []rhsecurity.CVE
for _, cve := range c.Cves[c.ActivePage] {
cves = append(cves, *cve)
}
c.ActivePage++
return cves, &_nethttp.Response{}, nil
}

View File

View File

@ -1,16 +0,0 @@
# publisher
(Peridot uses yumrepofs, this is for legacy errata/koji errata)
### Legacy errata mode
This mode only populates pungi generated repositories with errata metadata.
It can be deployed like this:
```
STABLE_STAGE=-prod bazel run --platforms @io_bazel_rules_go//go/toolchain:linux_amd64 //publisher/cmd/publisher-legacy-errata:publisher-legacy-errata-tool
```
After an updates compose is finished and merged into the correct point release directory (for example: 8.4-RC2) run:
```
ansible-playbook -i inventories/hosts.ini playbooks/secparse001-publish.yml
```
The ansible playbook is present in https://github.com/rocky-linux/peridot-ansible

View File

View File

@ -1,30 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//rules_resf:defs.bzl", "container")
go_library(
name = "publisher-legacy-errata_lib",
srcs = ["main.go"],
importpath = "peridot.resf.org/publisher/cmd/publisher-legacy-errata",
visibility = ["//visibility:private"],
deps = [
"//apollo/db/connector",
"//publisher/updateinfo/legacy",
"//utils",
"//vendor/github.com/sirupsen/logrus",
"//vendor/github.com/spf13/cobra",
],
)
go_binary(
name = "publisher-legacy-errata",
embed = [":publisher-legacy-errata_lib"],
visibility = ["//visibility:public"],
)
container(
base = "//bases/bazel/go",
files = [
":publisher-legacy-errata",
],
image_name = "publisher-legacy-errata-tool",
)

View File

@ -1,95 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package main
import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"path/filepath"
apolloconnector "peridot.resf.org/apollo/db/connector"
"peridot.resf.org/publisher/updateinfo/legacy"
"peridot.resf.org/utils"
)
var root = &cobra.Command{
Use: "publisher-legacy-errata",
Run: mn,
}
var cnf = utils.NewFlagConfig()
var (
repoDir string
from string
composeName string
productName string
productShort string
productID int64
scanAndStop bool
)
func init() {
dname := "apollo"
cnf.DatabaseName = &dname
cnf.Name = "publisher"
pflags := root.PersistentFlags()
pflags.StringVar(&repoDir, "repo-dir", "/mnt/repos-staging/pub/rocky", "Directory with composes")
pflags.StringVar(&from, "from", "releng@rockylinux.org", "Email address of publisher")
pflags.StringVar(&composeName, "compose-name", "", "Compose to use")
pflags.StringVar(&productName, "product-name", "", "Product name")
pflags.StringVar(&productShort, "product-short", "", "Product name (short)")
pflags.Int64Var(&productID, "product-id", 0, "Product ID")
pflags.BoolVar(&scanAndStop, "scan-and-stop", false, "Scan RPMs and stop, used for debugging purposes")
_ = root.MarkPersistentFlagRequired("compose-name")
_ = root.MarkPersistentFlagRequired("product-name")
_ = root.MarkPersistentFlagRequired("product-short")
_ = root.MarkPersistentFlagRequired("product-id")
utils.AddDBFlagsOnly(pflags, cnf)
utils.BindOnly(pflags, cnf)
}
func mn(_ *cobra.Command, _ []string) {
scanner := &legacy.Scanner{
DB: apolloconnector.MustAuto(),
}
err := scanner.ScanAndPublish(from, filepath.Join(repoDir, composeName), productName, productShort, productID, scanAndStop)
if err != nil {
logrus.Fatalf("could not scan and publish: %v", err)
}
}
func main() {
if err := root.Execute(); err != nil {
logrus.Fatal(err)
}
}

View File

@ -1,11 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "updateinfo",
srcs = [
"repomd.go",
"updateinfo.go",
],
importpath = "peridot.resf.org/publisher/updateinfo",
visibility = ["//visibility:public"],
)

View File

@ -1,17 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "legacy",
srcs = ["legacy.go"],
importpath = "peridot.resf.org/publisher/updateinfo/legacy",
visibility = ["//visibility:public"],
deps = [
"//apollo/db",
"//apollo/proto/v1:pb",
"//apollo/rpmutils",
"//publisher/updateinfo",
"//utils",
"//vendor/github.com/sirupsen/logrus",
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)

View File

@ -1,601 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package legacy
import (
"bytes"
"compress/gzip"
"crypto/sha256"
"database/sql"
"encoding/hex"
"encoding/xml"
"errors"
"fmt"
"github.com/sirupsen/logrus"
"google.golang.org/protobuf/types/known/wrapperspb"
"io"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
apollodb "peridot.resf.org/apollo/db"
apollopb "peridot.resf.org/apollo/pb"
"peridot.resf.org/apollo/rpmutils"
"peridot.resf.org/publisher/updateinfo"
"peridot.resf.org/utils"
"strconv"
"strings"
"sync"
"time"
)
type Scanner struct {
DB apollodb.Access
}
type internalAdvisory struct {
Pb *apollopb.Advisory
Db *apollodb.Advisory
}
type rpm struct {
Name string
Src string
Sha256 string
Epoch string
Repo string
Err error
Advisory *internalAdvisory
}
func (s *Scanner) recursiveRPMScan(rootDir string, cache map[string]string) (<-chan rpm, <-chan error) {
res := make(chan rpm)
errc := make(chan error, 1)
go func() {
var wg sync.WaitGroup
err := filepath.WalkDir(rootDir, func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() {
return nil
}
if !strings.HasSuffix(d.Name(), ".rpm") {
return nil
}
if strings.Contains(path, "kickstart/Packages") {
return nil
}
wg.Add(1)
go func() {
k, err := s.findRepoData(filepath.Join(path, ".."))
if err != nil {
logrus.Errorf("could not find repodata for %s: %s", path, err)
k = filepath.Join(path, "..")
}
k = filepath.Join(k, "..")
var sum string
if s := cache[d.Name()]; s != "" {
sum = s
} else {
f, _ := os.Open(path)
defer f.Close()
hasher := sha256.New()
_, err = io.Copy(hasher, f)
sum = hex.EncodeToString(hasher.Sum(nil))
}
select {
case res <- rpm{
Name: d.Name(),
Sha256: sum,
Repo: k,
Err: err,
}:
}
wg.Done()
}()
select {
default:
return nil
}
})
go func() {
wg.Wait()
close(res)
}()
errc <- err
}()
return res, errc
}
func (s *Scanner) findRepoData(rootDir string) (string, error) {
if rootDir == "." {
return "", errors.New("could not find repodata")
}
repoDataPath := filepath.Join(rootDir, "repodata")
stat, err := os.Stat(repoDataPath)
if err != nil {
if os.IsNotExist(err) {
return s.findRepoData(filepath.Join(rootDir, ".."))
} else {
return "", err
}
}
if stat.IsDir() {
return repoDataPath, nil
} else {
return s.findRepoData(filepath.Join(rootDir, ".."))
}
}
func (s *Scanner) ScanAndPublish(from string, composeName string, productName string, productShort string, productID int64, scanAndStop bool) error {
logrus.Infof("using %s as root directory", composeName)
realPathCompose, err := filepath.EvalSymlinks(composeName)
if err != nil {
return err
}
logrus.Infof("real path is %s", realPathCompose)
_, err = os.Stat(realPathCompose)
if err != nil {
return fmt.Errorf("could not find compose %s: %w", realPathCompose, err)
}
// Read cache file if exists, so we can skip hashing on known artifacts
cacheFile := filepath.Join(realPathCompose, fmt.Sprintf("apollocache_%d", productID))
cache := map[string]string{}
if _, err := os.Stat(cacheFile); err == nil {
cacheBts, err := ioutil.ReadFile(cacheFile)
if err != nil {
return err
}
cacheLines := strings.Split(string(cacheBts), "\n")
for _, line := range cacheLines {
if line == "" {
continue
}
parts := strings.Split(line, " ")
cache[parts[0]] = parts[1]
}
}
rpms := map[string][]*rpm{}
rpmsChan, errChan := s.recursiveRPMScan(realPathCompose, cache)
for r := range rpmsChan {
rpmCopy := r
if rpmCopy.Err != nil {
return rpmCopy.Err
}
if rpms[rpmCopy.Repo] == nil {
rpms[rpmCopy.Repo] = []*rpm{}
}
rpms[rpmCopy.Repo] = append(rpms[rpmCopy.Repo], &rpmCopy)
}
if err := <-errChan; err != nil {
return err
}
if len(rpms) == 0 {
return errors.New("no rpms found")
}
// Cache hashes in {REPO_DIR}/apollocache_{PRODUCT_ID}
var newCacheEntries []string
for _, v := range rpms {
for _, rpm := range v {
entry := fmt.Sprintf("%s %s", rpm.Name, rpm.Sha256)
if !utils.StrContains(entry, newCacheEntries) {
newCacheEntries = append(newCacheEntries, entry)
}
}
}
if err := ioutil.WriteFile(cacheFile, []byte(strings.Join(newCacheEntries, "\n")), 0644); err != nil {
return err
}
if scanAndStop {
for k := range rpms {
logrus.Infof("repo %s", k)
}
return nil
}
published := map[string][]*rpm{}
beginTx, err := s.DB.Begin()
if err != nil {
logrus.Errorf("Could not initiate tx: %v", err)
}
tx := s.DB.UseTransaction(beginTx)
rollback := false
advisories, err := tx.GetAllAdvisories(&apollopb.AdvisoryFilters{
IncludeUnpublished: wrapperspb.Bool(true),
}, 0, -1)
if err != nil {
return err
}
for _, advisory := range advisories {
advisoryPb := apollodb.DTOAdvisoryToPB(advisory)
touchedOnce := false
for _, artifactWithSrpm := range advisory.BuildArtifacts {
artifactSplit := strings.Split(artifactWithSrpm, ":::")
artifact := artifactSplit[0]
artifactSrc := rpmutils.Epoch().ReplaceAllString(artifactSplit[1], "")
for repo, repoRpms := range rpms {
if strings.HasSuffix(repo, "/Packages") {
repo = strings.TrimSuffix(repo, "/Packages")
}
if published[repo] == nil {
published[repo] = []*rpm{}
}
for _, repoRpm := range repoRpms {
if repoRpm.Name == rpmutils.Epoch().ReplaceAllString(artifact, "") {
logrus.Infof("Advisory %s affects %s", advisoryPb.Name, artifact)
err = tx.AddAdvisoryRPM(advisory.ID, artifact, productID)
if err != nil {
logrus.Errorf("Could not add advisory RPM: %v", err)
rollback = true
break
}
touchedOnce = true
repoRpm.Epoch = strings.TrimSuffix(rpmutils.Epoch().FindStringSubmatch(artifact)[0], ":")
repoRpm.Advisory = &internalAdvisory{
Pb: advisoryPb,
Db: advisory,
}
repoRpm.Src = artifactSrc
published[repo] = append(published[repo], repoRpm)
}
}
}
}
if rollback {
break
}
if !touchedOnce {
continue
}
if !advisory.PublishedAt.Valid {
advisory.PublishedAt = sql.NullTime{Valid: true, Time: time.Now()}
_, err = tx.UpdateAdvisory(advisory)
if err != nil {
logrus.Errorf("could not update advisory %s: %v", advisoryPb.Name, err)
rollback = true
break
}
}
}
publishedMappedByAdvisory := map[string]map[string][]*rpm{}
advisoryByName := map[string]*internalAdvisory{}
for repo, publishedRpms := range published {
if publishedMappedByAdvisory[repo] == nil {
publishedMappedByAdvisory[repo] = map[string][]*rpm{}
}
for _, publishedRpm := range publishedRpms {
if publishedMappedByAdvisory[repo][publishedRpm.Advisory.Pb.Name] == nil {
publishedMappedByAdvisory[repo][publishedRpm.Advisory.Pb.Name] = []*rpm{}
}
if advisoryByName[publishedRpm.Advisory.Pb.Name] == nil {
advisoryByName[publishedRpm.Advisory.Pb.Name] = publishedRpm.Advisory
}
publishedMappedByAdvisory[repo][publishedRpm.Advisory.Pb.Name] = append(publishedMappedByAdvisory[repo][publishedRpm.Advisory.Pb.Name], publishedRpm)
}
}
for repo, advisories := range publishedMappedByAdvisory {
repoDataDir, err := s.findRepoData(repo)
if err != nil {
logrus.Error(err)
rollback = true
break
}
repoMdPath := filepath.Join(repoDataDir, "repomd.xml")
f, err := os.Open(repoMdPath)
if err != nil {
logrus.Errorf("Could not open repomd.xml: %v", err)
rollback = true
break
}
var repomd updateinfo.RepoMdRoot
err = xml.NewDecoder(f).Decode(&repomd)
if err != nil {
logrus.Errorf("Could not decode repomd: %v", err)
rollback = true
break
}
_ = f.Close()
var olderUpdateInfo string
for _, e := range repomd.Data {
if e.Type == "updateinfo" {
olderUpdateInfo = e.Location.Href
}
}
updateInfo := &updateinfo.UpdatesRoot{
Updates: []*updateinfo.Update{},
}
for advisoryName, publishedRpms := range advisories {
advisory := advisoryByName[advisoryName]
updateType := "enhancement"
switch advisory.Pb.Type {
case apollopb.Advisory_TYPE_BUGFIX:
updateType = "bugfix"
break
case apollopb.Advisory_TYPE_SECURITY:
updateType = "security"
break
}
severity := advisory.Pb.Severity.String()
if advisory.Pb.Severity == apollopb.Advisory_SEVERITY_UNKNOWN {
severity = "None"
}
update := &updateinfo.Update{
From: from,
Status: "final",
Type: updateType,
Version: "2",
ID: advisory.Pb.Name,
Title: advisory.Pb.Synopsis,
Issued: &updateinfo.UpdateDate{
Date: advisory.Db.PublishedAt.Time.Format(updateinfo.TimeFormat),
},
Updated: &updateinfo.UpdateDate{
Date: advisory.Db.RedHatIssuedAt.Time.Format(updateinfo.TimeFormat),
},
Rights: "Copyright (C) 2022 Rocky Enterprise Software Foundation",
Release: productName,
PushCount: "1",
Severity: severity,
Summary: advisory.Pb.Topic,
Description: advisory.Pb.Description,
References: &updateinfo.UpdateReferenceRoot{
References: []*updateinfo.UpdateReference{},
},
PkgList: &updateinfo.UpdateCollectionRoot{
Collections: []*updateinfo.UpdateCollection{
{
Short: productShort,
Name: productName,
Packages: []*updateinfo.UpdatePackage{},
},
},
},
}
for _, cve := range advisory.Pb.Cves {
sourceBy := cve.SourceBy
sourceLink := cve.SourceLink
id := cve.Name
referenceType := "erratum"
if strings.HasPrefix(id, "CVE") {
referenceType = "cve"
}
reference := &updateinfo.UpdateReference{
Href: sourceLink.Value,
ID: id,
Type: referenceType,
Title: fmt.Sprintf("Update information for %s is retrieved from %s", id, sourceBy.Value),
}
update.References.References = append(update.References.References, reference)
}
for _, publishedRpm := range publishedRpms {
nvr := rpmutils.NVR().FindStringSubmatch(publishedRpm.Name)
updPkg := &updateinfo.UpdatePackage{
Name: nvr[1],
Version: nvr[2],
Release: nvr[3],
Epoch: publishedRpm.Epoch,
Arch: nvr[4],
Src: publishedRpm.Src,
Filename: publishedRpm.Name,
Sum: []*updateinfo.UpdatePackageSum{
{
Type: "sha256",
Value: publishedRpm.Sha256,
},
},
}
if advisory.Db.RebootSuggested {
updPkg.RebootSuggested = "True"
}
update.PkgList.Collections[0].Packages = append(update.PkgList.Collections[0].Packages, updPkg)
}
if rollback {
break
}
updateInfo.Updates = append(updateInfo.Updates, update)
}
if rollback {
break
}
xmlBytes, err := xml.MarshalIndent(updateInfo, "", " ")
if err != nil {
logrus.Errorf("Could not encode updateinfo xml: %v", err)
rollback = true
break
}
hasher := sha256.New()
openSize := len(xmlBytes)
_, err = hasher.Write(xmlBytes)
if err != nil {
logrus.Errorf("Could not hash updateinfo: %v", err)
rollback = true
break
}
openChecksum := hex.EncodeToString(hasher.Sum(nil))
hasher.Reset()
var gzippedBuf bytes.Buffer
w := gzip.NewWriter(&gzippedBuf)
_, err = w.Write(xmlBytes)
if err != nil {
logrus.Errorf("Could not gzip encode: %v", err)
rollback = true
break
}
_ = w.Close()
closedSize := len(gzippedBuf.Bytes())
_, err = hasher.Write(gzippedBuf.Bytes())
if err != nil {
logrus.Errorf("Could not hash gzipped: %v", err)
rollback = true
break
}
closedChecksum := hex.EncodeToString(hasher.Sum(nil))
hasher.Reset()
timestamp := strconv.FormatInt(time.Now().Unix(), 10)
updateInfoPath := filepath.Join(repoDataDir, fmt.Sprintf("%s-updateinfo.xml.gz", closedChecksum))
updateInfoEntry := &updateinfo.RepoMdData{
Type: "updateinfo",
Checksum: &updateinfo.RepoMdDataChecksum{
Type: "sha256",
Value: closedChecksum,
},
OpenChecksum: &updateinfo.RepoMdDataChecksum{
Type: "sha256",
Value: openChecksum,
},
Location: &updateinfo.RepoMdDataLocation{
Href: strings.ReplaceAll(updateInfoPath, repo+"/", ""),
},
Timestamp: timestamp,
Size: strconv.Itoa(closedSize),
OpenSize: strconv.Itoa(openSize),
}
if olderUpdateInfo == "" {
repomd.Data = append(repomd.Data, updateInfoEntry)
} else {
for i, e := range repomd.Data {
if e.Type == "updateinfo" {
repomd.Data[i] = updateInfoEntry
}
}
}
uif, err := os.OpenFile(updateInfoPath, os.O_TRUNC|os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
logrus.Errorf("Could not open updateinfo file %s: %v", updateInfoPath, err)
rollback = true
break
}
_, err = uif.Write(gzippedBuf.Bytes())
if err != nil {
logrus.Errorf("Could not write gzipped updateinfo file: %v", err)
rollback = true
break
}
_ = uif.Close()
if repomd.Rpm != "" && repomd.XmlnsRpm == "" {
repomd.XmlnsRpm = repomd.Rpm
repomd.Rpm = ""
}
updateF, err := os.OpenFile(repoMdPath, os.O_TRUNC|os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
logrus.Errorf("Could not open repomd file for update: %v", err)
rollback = true
break
}
_, _ = updateF.Write([]byte(xml.Header))
enc := xml.NewEncoder(updateF)
enc.Indent("", " ")
err = enc.Encode(&repomd)
if err != nil {
logrus.Errorf("Could not encode updated repomd file: %v", err)
rollback = true
break
}
_ = updateF.Close()
if olderUpdateInfo != "" {
_ = os.Remove(filepath.Join(repo, olderUpdateInfo))
}
}
if rollback {
err := beginTx.Rollback()
if err != nil {
logrus.Errorf("Could not rollback: %v", err)
}
return errors.New("rolled back")
}
err = beginTx.Commit()
if err != nil {
logrus.Errorf("Could not commit transaction: %v", err)
}
return nil
}

View File

@ -1,72 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package updateinfo
import "encoding/xml"
type RepoMdDistro struct {
CpeId string `xml:"cpeid,attr"`
Value string `xml:",chardata"`
}
type RepoMdDistroRoot struct {
Distro []*RepoMdDistro `xml:"distro"`
}
type RepoMdDataChecksum struct {
Type string `xml:"type,attr"`
Value string `xml:",chardata"`
}
type RepoMdDataLocation struct {
Href string `xml:"href,attr"`
}
type RepoMdData struct {
Type string `xml:"type,attr"`
Checksum *RepoMdDataChecksum `xml:"checksum"`
OpenChecksum *RepoMdDataChecksum `xml:"open-checksum"`
Location *RepoMdDataLocation `xml:"location"`
Timestamp string `xml:"timestamp"`
Size string `xml:"size"`
OpenSize string `xml:"open-size"`
}
type RepoMdRoot struct {
XMLName xml.Name `xml:"repomd"`
Xmlns string `xml:"xmlns,attr"`
XmlnsRpm string `xml:"xmlns:rpm,attr"`
Rpm string `xml:"rpm,attr,omitempty"`
Revision string `xml:"revision"`
Tags *RepoMdDistroRoot `xml:"tags"`
Data []*RepoMdData `xml:"data"`
}

View File

@ -1,103 +0,0 @@
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
package updateinfo
import "encoding/xml"
const (
TimeFormat = "2006-01-02 15:04:05"
)
type UpdatesRoot struct {
XMLName xml.Name `xml:"updates"`
Updates []*Update `xml:"update"`
}
type UpdateDate struct {
Date string `xml:"date,attr"`
}
type UpdateReference struct {
Href string `xml:"href,attr"`
ID string `xml:"id,attr"`
Type string `xml:"type,attr"`
Title string `xml:"title,attr"`
}
type UpdateReferenceRoot struct {
References []*UpdateReference `xml:"reference"`
}
type UpdatePackageSum struct {
Type string `xml:"type,attr"`
Value string `xml:",chardata"`
}
type UpdatePackage struct {
Name string `xml:"name,attr"`
Version string `xml:"version,attr"`
Release string `xml:"release,attr"`
Epoch string `xml:"epoch,attr"`
Arch string `xml:"arch,attr"`
Src string `xml:"src,attr"`
Filename string `xml:"filename"`
RebootSuggested string `xml:"reboot_suggested"`
Sum []*UpdatePackageSum `xml:"sum"`
}
type UpdateCollection struct {
Short string `xml:"short,attr"`
Name string `xml:"name"`
Packages []*UpdatePackage `xml:"package"`
}
type UpdateCollectionRoot struct {
Collections []*UpdateCollection `xml:"collection"`
}
type Update struct {
From string `xml:"from,attr"`
Status string `xml:"status,attr"`
Type string `xml:"type,attr"`
Version string `xml:"version,attr"`
ID string `xml:"id"`
Title string `xml:"title"`
Issued *UpdateDate `xml:"issued"`
Updated *UpdateDate `xml:"updated"`
Rights string `xml:"rights"`
Release string `xml:"release"`
PushCount string `xml:"pushcount"`
Severity string `xml:"severity"`
Summary string `xml:"summary"`
Description string `xml:"description"`
References *UpdateReferenceRoot `xml:"references"`
PkgList *UpdateCollectionRoot `xml:"pkglist"`
}