report

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 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 (
	ExitCodeCritical ExitCode = 104
	ExitCodeHigh     ExitCode = 103
	ExitCodeMedium   ExitCode = 102
	ExitCodeLow      ExitCode = 101
	ExitCodeInfo     ExitCode = 100
)

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