Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SeverityNames = util.NewStringSetWithValues([]string{
"info", "low", "medium", "high", "critical",
})
Functions ¶
func RegisterPRIntegration ¶ added in v0.4.34
func RegisterPRIntegration(integ func(ctx context.Context, config *jnode.Node) PRIntegration)
Types ¶
type Assessment ¶
type Assessment struct { ID string `json:"assessmentId"` URL string `json:"appUrl"` Title string `json:"title"` Module string `json:"module"` Category string `json:"category"` Markdown string `json:"markdown,omitempty"` Findings Findings `json:"findings"` Failed bool `json:"failed"` FailedCount int `json:"failedCount"` FailedSeverity string `json:"failedSeverity"` }
func (*Assessment) EvaluateFailures ¶ added in v0.4.34
func (a *Assessment) EvaluateFailures(thresholds map[string]int)
type Assessments ¶
type Assessments []*Assessment
func FindCIEnvAssessments ¶
func FindCIEnvAssessments(client *api.Client) (Assessments, error)
type Finding ¶
type Finding struct { SID string `json:"sid,omitempty"` Severity string `json:"severity,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Markdown string `json:"markdown,omitempty"` FilePath string `json:"filePath,omitempty"` Resource string `json:"resource,omitempty"` Line int `json:"line,omitempty"` Pass bool `json:"pass,omitempty"` GeneratedFile bool `json:"generated_filed,omitempty"` // These fields are filled in by the CLI and sent to the api-server RepoPath string `json:"repoPath,omitempty"` PartialFingerprint string `json:"partialFingerprint,omitempty"` Tool map[string]string `json:"tool,omitempty"` }
func (*Finding) SetAttribute ¶ added in v0.4.36
type Findings ¶ added in v0.4.36
type Findings []*Finding
func (Findings) ComputePartialFingerprints ¶ added in v0.4.36
type PRIntegration ¶ added in v0.4.34
type PRIntegration interface {
Update(ctx context.Context, assessments Assessments)
}
type PRIntegrations ¶ added in v0.4.34
type PRIntegrations []func(context.Context, *jnode.Node) PRIntegration
Click to show internal directories.
Click to hide internal directories.