models

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeverityCritical = "CRITICAL"
	SeverityHigh     = "HIGH"
	SeverityMedium   = "MEDIUM"
	SeverityLow      = "LOW"
	SeverityUnknown  = "UNKNOWN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	SeverityThreshold string                  `yaml:"severity_threshold,omitempty"`
	IgnoreDirs        []string                `yaml:"ignore_dirs,omitempty"`
	IgnorePaths       []string                `yaml:"ignore_paths,omitempty"`
	SecretsWhitelist  []string                `yaml:"secrets_whitelist,omitempty"` // TODO deprecate
	SecretsAllowlist  []string                `yaml:"secrets_allowlist,omitempty"`
	Notifications     map[string]Notification `yaml:"notifications,omitempty"`
}

type Notification added in v1.9.0

type Notification struct {
	Events  NotificationEvents  `yaml:"events,omitempty"`
	Targets NotificationTargets `yaml:"targets,omitempty"`
}

type NotificationEventAll added in v1.9.0

type NotificationEventAll struct {
	MinimumSeverity string   `yaml:"minimum_severity,omitempty"`
	MinimumPriority int      `yaml:"minimum_priority,omitempty"`
	CWEs            []int    `yaml:"cwes,omitempty"`
	CVEs            []string `yaml:"cves,omitempty"`
	SecretTypes     []string `yaml:"secret_types,omitempty"`
}

type NotificationEventNewAPIFindings added in v1.9.0

type NotificationEventNewAPIFindings struct {
	MinimumSeverity string `yaml:"minimum_severity,omitempty"`
	MinimumPriority int    `yaml:"minimum_priority,omitempty"`
	CWEs            []int  `yaml:"cwes,omitempty"`
}

type NotificationEventNewCodeFindings added in v1.9.0

type NotificationEventNewCodeFindings struct {
	MinimumSeverity string `yaml:"minimum_severity,omitempty"`
	MinimumPriority int    `yaml:"minimum_priority,omitempty"`
	CWEs            []int  `yaml:"cwes,omitempty"`
}

type NotificationEventNewDependencyFindings added in v1.9.0

type NotificationEventNewDependencyFindings struct {
	MinimumSeverity string   `yaml:"minimum_severity,omitempty"`
	MinimumPriority int      `yaml:"minimum_priority,omitempty"`
	CWEs            []int    `yaml:"cwes,omitempty"`
	CVEs            []string `yaml:"cves,omitempty"`
}

type NotificationEventNewSecretFindings added in v1.9.0

type NotificationEventNewSecretFindings struct {
	Types []string `yaml:"types,omitempty"`
}

type NotificationEvents added in v1.9.0

type NotificationEvents struct {
	All                   NotificationEventAll                   `yaml:"all,omitempty"`
	NewAPIFindings        NotificationEventNewAPIFindings        `yaml:"new_api_findings,omitempty"`
	NewCodeFindings       NotificationEventNewCodeFindings       `yaml:"new_code_findings,omitempty"`
	NewDependencyFindings NotificationEventNewDependencyFindings `yaml:"new_dependency_findings,omitempty"`
	NewSecretFindings     NotificationEventNewSecretFindings     `yaml:"new_secret_findings,omitempty"`
}

type NotificationTargetEmail added in v1.9.0

type NotificationTargetEmail struct {
	Email  string   `yaml:"email,omitempty"`
	Emails []string `yaml:"emails,omitempty"`
}

type NotificationTargetSlack added in v1.9.0

type NotificationTargetSlack struct {
	Channel  string   `yaml:"channel,omitempty"`
	Channels []string `yaml:"channels,omitempty"`
}

type NotificationTargetWebhook added in v1.9.0

type NotificationTargetWebhook struct {
	URLs []string `yaml:"urls,omitempty"`
	URL  string   `yaml:"url,omitempty"`
}

type NotificationTargets added in v1.9.0

type NotificationTargets struct {
	NotificationTargetWebhook NotificationTargetWebhook `yaml:"webhook,omitempty"`
	NotificationTargetEmail   NotificationTargetEmail   `yaml:"email,omitempty"`
	NotificationTargetSlack   NotificationTargetSlack   `yaml:"slack,omitempty"`
}

Jump to

Keyboard shortcuts

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