fsclient

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

func GetExistingCVEs(ctx context.Context, osType, existingCVEsURL string) (string, error)

GetExistingCVEs retrieves existing CVEs for an OS profile.

func GetFixedCVEs added in v0.19.0

func GetFixedCVEs(ctx context.Context, osType, fixedCVEsURL string) (string, error)

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

func GetPackageManifest(ctx context.Context, packageManifestURL string) (string, error)

GetPackageManifest retrieves the package manifest for an OS profile.

func ParseSemver added in v0.19.2

func ParseSemver(version string) (int, int, int)

ParseSemver parses a semver version string (e.g., "1.2.3") and returns major, minor, and patch as integers. If any part is missing or invalid, it defaults to 0 for that part.

Types

type Affected added in v0.19.6

type Affected struct {
	Family   string `xml:"family,attr"`
	Platform string `xml:"platform"`
}

Affected represents affected packages.

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.

type Reference added in v0.19.6

type Reference struct {
	Source string `xml:"source,attr"`
	RefID  string `xml:"ref_id,attr"`  //nolint:tagliatelle // OVAL XML standard
	RefURL string `xml:"ref_url,attr"` //nolint:tagliatelle // OVAL XML standard
}

Reference represents an OVAL reference.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL