openscap

package
v0.0.0-...-85855aa Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPolkitCompliance

func CheckPolkitCompliance() ([]string, error)

Types

type Report

type Report struct {
	XMLName    xml.Name `xml:"xccdf-results"`
	Platform   string   `xml:"platform,attr"`
	TestSystem string   `xml:"test-system"`
	Version    string   `xml:"version"`
	Stats      Stats    `xml:"statistics"`
	Rules      []Rule   `xml:"rule-result"`
}

func GenerateReport

func GenerateReport(results []string) Report

type Rule

type Rule struct {
	ID       string `xml:"idref"`
	Time     string `xml:"time"`
	Result   string `xml:"result"`
	Severity string `xml:"severity,omitempty"`
	Message  string `xml:"message,omitempty"`
	Detail   string `xml:"detail,omitempty"`
}

type RuleResult

type RuleResult struct {
	RuleID   string `xml:"idref"`
	Result   string `xml:"result"`
	Severity string `xml:"severity,omitempty"`
	Message  string `xml:"message,omitempty"`
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner() (*Runner, error)

func (*Runner) ExportPolkitXCCDF

func (r *Runner) ExportPolkitXCCDF(outputPath string) error

func (*Runner) GetPolkitFindings

func (r *Runner) GetPolkitFindings() []string

func (*Runner) Scan

func (r *Runner) Scan() (*ScanResult, error)

type ScanResult

type ScanResult struct {
	XMLName    xml.Name   `xml:"xccdf-results"`
	TestResult TestResult `xml:"test-result"`
}

type Stats

type Stats struct {
	Pass          int `xml:"pass"`
	Fail          int `xml:"fail"`
	Error         int `xml:"error"`
	NotApplicable int `xml:"not-applicable"`
	NotChecked    int `xml:"not-checked"`
	Fixed         int `xml:"fixed"`
}

type TestResult

type TestResult struct {
	RuleResults []RuleResult `xml:"rule-result"`
}

Jump to

Keyboard shortcuts

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