Documentation
¶
Index ¶
- Variables
- func GetExistingCVEs(ctx context.Context, osType, existingCVEsURL string) (string, error)
- func GetFixedCVEs(ctx context.Context, osType, fixedCVEsURL string) (string, error)
- func GetLatestOsProfiles(ctx context.Context, profileNames []string, tag string) (map[string][]*OSProfileManifest, error)
- func GetPackageManifest(ctx context.Context, packageManifestURL string) (string, error)
- func ParseSemver(version string) (int, int, int)
- type Affected
- type CVEInfo
- type Definition
- type ExistingCVEs
- type FixedCVEs
- type OSPackage
- type OSProfileManifest
- type OvalDefinitions
- type Reference
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EnvNameRsFilesProxyAddress is the environment variable name for RS files proxy address. EnvNameRsFilesProxyAddress = "RSPROXY_FILES_ADDRESS" // EnvNameRsEnProfileRepo is the environment variable name for RS profile repository. EnvNameRsEnProfileRepo = "RS_EN_PROFILE_REPO" )
Functions ¶
func GetExistingCVEs ¶ added in v0.19.0
GetExistingCVEs retrieves existing CVEs for an OS profile.
func GetFixedCVEs ¶ added in v0.19.0
GetFixedCVEs retrieves fixed CVEs for an OS profile.
func GetLatestOsProfiles ¶
func GetLatestOsProfiles(ctx context.Context, profileNames []string, tag string) (map[string][]*OSProfileManifest, error)
GetLatestOsProfiles retrieves the latest OS profiles.
func GetPackageManifest ¶
GetPackageManifest retrieves the package manifest for an OS profile.
Types ¶
type CVEInfo ¶ added in v0.19.6
type CVEInfo struct {
CVEID string `json:"cve_id"`
Priority string `json:"priority"`
AffectedPackages []string `json:"affected_packages"`
}
CVEInfo represents CVE information.
type Definition ¶ added in v0.19.6
type Definition struct {
ID string `xml:"id,attr"`
Class string `xml:"class,attr"`
Title string `xml:"metadata>title"`
Description string `xml:"metadata>description"`
Reference []Reference `xml:"metadata>reference"`
Affected []Affected `xml:"metadata>affected"`
Advisory struct {
Issued struct {
Date string `xml:"date,attr"`
} `xml:"issued"`
} `xml:"metadata>advisory"`
}
Definition represents an OVAL definition.
type ExistingCVEs ¶ added in v0.19.0
type ExistingCVEs []struct {
CveID *string `json:"cve_id"`
Priority *string `json:"priority"`
AffectedPackages []*string `json:"affected_packages"`
}
ExistingCVEs represents existing CVEs.
type FixedCVEs ¶ added in v0.19.0
type FixedCVEs []struct {
CveID *string `json:"cve_id"`
Priority *string `json:"priority"`
AffectedPackages []*string `json:"affected_packages"`
}
FixedCVEs represents fixed CVEs.
type OSPackage ¶
type OSPackage struct {
Repo []struct {
Name *string `json:"name"`
Version *string `json:"version"`
} `json:"repo"`
}
OSPackage represents an OS package.
type OSProfileManifest ¶
type OSProfileManifest struct {
AppVersion string `yaml:"appVersion"`
Metadata map[string]string `yaml:"metadata"`
Spec struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Provider string `yaml:"provider"`
Architecture string `yaml:"architecture"`
ProfileName string `yaml:"profileName"`
OsImageURL string `yaml:"osImageUrl"`
OsImageSha256 string `yaml:"osImageSha256"`
OsImageVersion string `yaml:"osImageVersion"`
OsPackageManifestURL string `yaml:"osPackageManifestURL"`
OsExistingCvesURL string `yaml:"osExistingCvesURL"`
OsFixedCvesURL string `yaml:"osFixedCvesURL"`
SecurityFeature string `yaml:"securityFeature"`
PlatformBundle map[string]interface{} `yaml:"platformBundle"`
Description string `yaml:"description"`
TLSCaCert string `yaml:"tlsCaCertificate"`
} `yaml:"spec"`
}
OSProfileManifest represents an OS profile manifest.
Maintain consistency with OS profiles
type OvalDefinitions ¶ added in v0.19.6
type OvalDefinitions struct {
XMLName xml.Name `xml:"oval_definitions"` //nolint:tagliatelle // OVAL XML standard
Definitions []Definition `xml:"definitions>definition"`
}
OvalDefinitions represents OVAL definitions.
Define the structure based on the OVAL XML format.
Click to show internal directories.
Click to hide internal directories.