probe

package
v4.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct {
	ID             string
	Short          string
	Motivation     string
	Implementation string
	Remediation    *Remediation
}

nolint: govet

func FromBytes

func FromBytes(content []byte, probeID string) (*Probe, error)

FromBytes creates a probe from a file.

func New

func New(loc embed.FS, probeID string) (*Probe, error)

New create a new probe.

type Remediation

type Remediation struct {
	// Patch for machines.
	Patch *string `json:"patch,omitempty"`
	// Text for humans.
	Text string `json:"text"`
	// Text in markdown format for humans.
	Markdown string `json:"markdown"`
	// Effort to remediate.
	Effort RemediationEffort `json:"effort"`
}

Remediation represents the remediation for a finding.

type RemediationEffort

type RemediationEffort int

RemediationEffort indicates the estimated effort necessary to remediate a finding.

const (
	// RemediationEffortNone indicates a no remediation effort.
	RemediationEffortNone RemediationEffort = iota
	// RemediationEffortLow indicates a low remediation effort.
	RemediationEffortLow
	// RemediationEffortMedium indicates a medium remediation effort.
	RemediationEffortMedium
	// RemediationEffortHigh indicates a high remediation effort.
	RemediationEffortHigh
)

func (*RemediationEffort) String

func (r *RemediationEffort) String() string

String stringifies the enum.

func (*RemediationEffort) UnmarshalYAML

func (r *RemediationEffort) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML is a custom unmarshalling function to transform the string into an enum.

Jump to

Keyboard shortcuts

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