scap

package
v0.0.0-...-463c776 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package scap implements some internal parsing of the OpenSCAP analysis results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

Document contains all the returned informations of an openscap evaluation.

func ReadDocument

func ReadDocument(r io.Reader) (*Document, error)

ReadDocument takes an io.Reader and return a Document or error if failed.

type Item

type Item struct {
	ID       string            `json:"id"`
	Messages map[string]string `json:"messages"`
}

Item contains the messages of an OVAL Object's fields.

type Object

type Object struct {
	ID    string `json:"id"`
	Items []Item `json:"items,omitempty"`
}

Object contains the informations of a specific OVAL Object.

type SystemCharacteristics

type SystemCharacteristics struct {
	SystemInfo SystemInfo `json:"system_info"`
	Objects    []Object   `json:"objects,omitempty"`
}

SystemCharacteristics contains the internal charasteristics of an OVAL evaluation.

func SysChar

func SysChar(doc *Document) (*SystemCharacteristics, error)

SysChar returns the refined system characteristics from a Document.

type SystemInfo

type SystemInfo struct {
	OsName          string `json:"os_name"`
	OsVersion       string `json:"os_version"`
	Architecture    string `json:"architecture"`
	PrimaryHostName string `json:"primary_host_name"`
}

SystemInfo is an internal field of SystemCharacteristics contains the global system informations.

Jump to

Keyboard shortcuts

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