Documentation ¶
Index ¶
- Constants
- func GetDescriptionFromXMLString(raw string) (string, error)
- func GetManualRules(tp *cmpv1alpha1.TailoredProfile) []string
- func GetProfileNameFromID(id string) string
- func GetRationaleFromXMLString(raw string) (string, error)
- func GetRuleNameFromID(id string) string
- func GetVariableNameFromID(id string) string
- func GetWarningFromXMLString(raw string) (string, error)
- func GetXCCDFProfileID(tp *cmpv1alpha1.TailoredProfile) string
- func IsManualRule(ruleName string, manualRules []string) bool
- func TailoredProfileToXML(tp *cmpv1alpha1.TailoredProfile, p *cmpv1alpha1.Profile, ...) (string, error)
- type BenchmarkElement
- type ProfileElement
- type SelectElement
- type SetValueElement
- type TailoringElement
- type TitleOrDescriptionElement
- type VersionElement
Constants ¶
View Source
const ( // XMLHeader is the header for the XML doc XMLHeader string = `<?xml version="1.0" encoding="UTF-8"?>` // XCCDFNamespace is the XCCDF namespace of this project. Per the XCCDF // specification, this assiciates the content with the author XCCDFNamespace string = "compliance.openshift.io" XCCDFURI string = "http://checklists.nist.gov/xccdf/1.2" )
Variables ¶
This section is empty.
Functions ¶
func GetDescriptionFromXMLString ¶
GetDescriptionFromXMLString gets a description from the given XML string
func GetManualRules ¶
func GetManualRules(tp *cmpv1alpha1.TailoredProfile) []string
func GetProfileNameFromID ¶
GetProfileNameFromID gets a profile name from the xccdf ID
func GetRationaleFromXMLString ¶
GetRationaleFromXMLString gets the rationale from the given XML string
func GetRuleNameFromID ¶
GetRuleNameFromID gets a rule name from the xccdf ID
func GetVariableNameFromID ¶
func GetWarningFromXMLString ¶
GetWarningFromXMLString gets a warning from the given XML string
func GetXCCDFProfileID ¶
func GetXCCDFProfileID(tp *cmpv1alpha1.TailoredProfile) string
GetXCCDFProfileID gets a profile xccdf ID from the TailoredProfile object
func IsManualRule ¶
func TailoredProfileToXML ¶
func TailoredProfileToXML(tp *cmpv1alpha1.TailoredProfile, p *cmpv1alpha1.Profile, pb *cmpv1alpha1.ProfileBundle, rules map[string]*cmpv1alpha1.Rule, variables []*cmpv1alpha1.Variable) (string, error)
TailoredProfileToXML gets an XML string from a TailoredProfile and the corresponding Profile
Types ¶
type BenchmarkElement ¶
type ProfileElement ¶
type ProfileElement struct { XMLName xml.Name `xml:"xccdf-1.2:Profile"` ID string `xml:"id,attr"` Extends string `xml:"extends,attr,omitempty"` Title *TitleOrDescriptionElement `xml:"xccdf-1.2:title"` Description *TitleOrDescriptionElement `xml:"xccdf-1.2:description"` Selections []SelectElement Values []SetValueElement }
type SelectElement ¶
type SetValueElement ¶
type TailoringElement ¶
type TailoringElement struct { XMLName xml.Name `xml:"xccdf-1.2:Tailoring"` XMLNamespaceURI string `xml:"xmlns:xccdf-1.2,attr"` ID string `xml:"id,attr"` Benchmark BenchmarkElement Version VersionElement Profile ProfileElement }
type VersionElement ¶
Click to show internal directories.
Click to hide internal directories.