assessments

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SeverityNames = util.NewStringSetWithValues([]string{
	"info", "low", "medium", "high", "critical",
})

Functions

func ParseFailThresholds

func ParseFailThresholds(thresholds map[string]string) (map[string]int, error)

func RegisterCIIntegration

func RegisterCIIntegration(integ func(context.Context, *jnode.Node) CIIntegration)

Types

type Assessment

type Assessment struct {
	ID       string `json:"assessmentId"`
	URL      string `json:"appUrl"`
	Title    string
	Module   string
	Category string
	Markdown string
	Findings []Finding
	Failed   bool `json:"-"`
}

func (*Assessment) HasFailures

func (a *Assessment) HasFailures(thresholds map[string]int) (bool, string, int)

type Assessments

type Assessments []Assessment

func FindCIEnvAssessments

func FindCIEnvAssessments(client *api.Client) (Assessments, error)

func (Assessments) UpdateCI

func (a Assessments) UpdateCI(client *api.Client) error

type CIIntegration

type CIIntegration interface {
	Update(ctx context.Context, assessments Assessments)
}

type CIIntegrations

type CIIntegrations []func(context.Context, *jnode.Node) CIIntegration

type Finding

type Finding struct {
	SID         string
	Severity    string
	Title       string
	Description string
	Markdown    string
	FilePath    string `json:"filePath"`
	Line        int
	Pass        bool
}

func (*Finding) GetTitle

func (f *Finding) GetTitle() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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