report

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package report renders Lava reports in different formats using the results returned by the Vulcan checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExitCode

type ExitCode int

ExitCode represents an exit code depending on the vulnerabilities found.

const (
	ExitCodeCheckError ExitCode = 3
	ExitCodeInfo       ExitCode = 100
	ExitCodeLow        ExitCode = 101
	ExitCodeMedium     ExitCode = 102
	ExitCodeHigh       ExitCode = 103
	ExitCodeCritical   ExitCode = 104
)

Exit codes depending on the maximum severity found.

type Writer

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

Writer represents a Lava report writer.

func NewWriter

func NewWriter(cfg config.ReportConfig) (Writer, error)

NewWriter creates a new instance of a report writer.

func (Writer) Close

func (writer Writer) Close() error

Close closes the Writer.

func (Writer) Write

func (writer Writer) Write(er engine.Report) (ExitCode, error)

Write renders the provided engine.Report. The returned exit code is calculated by evaluating the report with the config.ReportConfig passed to NewWriter. If the returned error is not nil, the exit code will be zero and should be ignored.

Jump to

Keyboard shortcuts

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