helpers

package
v2.1.0-integrations Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomConsoleWriter

func CustomConsoleWriter(fileLogger *zerolog.ConsoleWriter) zerolog.ConsoleWriter

CustomConsoleWriter creates an output to print log in a files

func FileAnalyzer

func FileAnalyzer(path string) (string, error)

FileAnalyzer determines the type of extension in the passed config file by its content

func GenerateReport

func GenerateReport(path, filename string, body interface{}, formats []string, proBarBuilder progress.PbBuilder) error

GenerateReport execute each report function to generate report

func GetDefaultQueryPath

func GetDefaultQueryPath(queriesPath string) (string, error)

GetDefaultQueryPath - returns the default query path

func GetExecutableDirectory

func GetExecutableDirectory() string

GetExecutableDirectory - returns the path to the directory containing KICS executable

func GetFullPath

func GetFullPath(partialPath string) (string, error)

GetFulPath returns the full path of a partial path used for queries or experimental queries json path

func GetNumCPU

func GetNumCPU() float32

GetNumCPU return the number of cpus available

func InitShouldFailArg

func InitShouldFailArg(args []string) error

InitShouldFailArg initializes which kind of vulnerability severity should changes exit code

func InitShouldIgnoreArg

func InitShouldIgnoreArg(arg string) error

InitShouldIgnoreArg initializes what kind of errors should be used on exit codes

func ListReportFormats

func ListReportFormats() []string

ListReportFormats return a slice with all supported report formats

func RemediateExitCode

func RemediateExitCode(selectedRemediationNumber, actualRemediationDoneNumber int) int

RemediateExitCode calculate exit code base on the difference between remediation selected and done

func ResultsExitCode

func ResultsExitCode(summary *model.Summary) int

ResultsExitCode calculate exit code base on severity of results, returns 0 if no results was reported

func ShowError

func ShowError(kind string) bool

ShowError returns true if should show error, otherwise returns false

Types

This section is empty.

Jump to

Keyboard shortcuts

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