convert

package
v5.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(reader io.Reader, _ string, rulesetConfig *ruleset.Config) (*report.Report, error)

Convert reads multiple native reports from the tool (kubesec) and transforms them into issues (vulnerabilities), as defined in the common module

Types

type KubesecOutput

type KubesecOutput struct {
	Filepath string `json:"filepath"`
	Findings []byte `json:"findings"`
	Error    error  `json:"-"`
}

KubesecOutput maps to the report output of the kubesec tool

type KubesecReport

type KubesecReport struct {
	Filepath string          `json:"filepath"`
	Findings []KubesecResult `json:"findings"`
}

KubesecReport maps to a single analysis of a manifest file

type KubesecResult

type KubesecResult struct {
	Object  string         `json:"object"`
	Message string         `json:"message"`
	Scoring KubesecScoring `json:"scoring"`
}

KubesecResult maps to a decoded finding from the kubesec report

type KubesecScoring

type KubesecScoring struct {
	CriticalSeverity []KubesecVulnerability `json:"critical"`
	InfoSeverity     []KubesecVulnerability `json:"advise"`
}

KubesecScoring maps to the individual findings grouped by severity

type KubesecVulnerability

type KubesecVulnerability struct {
	ID         string
	Object     string
	Selector   string
	Reason     string
	Confidence report.ConfidenceLevel
	Severity   report.SeverityLevel
	Filepath   string
}

KubesecVulnerability maps to the findings returned from a KubesecReport

Jump to

Keyboard shortcuts

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