actions

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubernetesLabelKey      = "labels"
	KubernetesAnnotationKey = "annotations"
)
View Source
const (
	ApplicationScopeOwner = "<%application_scope_owner%>"
)
View Source
const (
	NotConfiguredSprintId = -1
)

Variables

This section is empty.

Functions

func InitIssue

func InitIssue(c *jira.Client, metaProject *jira.MetaProject, metaIssuetype *jira.MetaIssueType, fieldsConfig map[string]string, useSrvApi bool) (*jira.Issue, error)

func IsK8s

func IsK8s() bool

Types

type AWSSecurityHubClient added in v2.8.0

type AWSSecurityHubClient struct {
	Name string
	// contains filtered or unexported fields
}

func (AWSSecurityHubClient) GetLayoutProvider added in v2.8.0

func (sh AWSSecurityHubClient) GetLayoutProvider() layout.LayoutProvider

func (AWSSecurityHubClient) GetName added in v2.8.0

func (sh AWSSecurityHubClient) GetName() string

func (*AWSSecurityHubClient) Init added in v2.8.0

func (sh *AWSSecurityHubClient) Init() error

func (AWSSecurityHubClient) Send added in v2.8.0

func (sh AWSSecurityHubClient) Send(m map[string]string) error

func (AWSSecurityHubClient) Terminate added in v2.8.0

func (sh AWSSecurityHubClient) Terminate() error

type Action

type Action interface {
	GetName() string
	Init() error
	Send(map[string]string) error
	Terminate() error
	GetLayoutProvider() layout.LayoutProvider
}

type Clock added in v2.9.0

type Clock interface {
	Now() time.Time
}

type DependencyTrackAction added in v2.14.0

type DependencyTrackAction struct {
	Name   string
	Url    string
	APIKey string
}

func (*DependencyTrackAction) GetLayoutProvider added in v2.14.0

func (dta *DependencyTrackAction) GetLayoutProvider() layout.LayoutProvider

func (*DependencyTrackAction) GetName added in v2.14.0

func (dta *DependencyTrackAction) GetName() string

func (*DependencyTrackAction) Init added in v2.14.0

func (dta *DependencyTrackAction) Init() error

func (*DependencyTrackAction) Send added in v2.14.0

func (dta *DependencyTrackAction) Send(content map[string]string) error

func (*DependencyTrackAction) Terminate added in v2.14.0

func (dta *DependencyTrackAction) Terminate() error

type DockerClient

type DockerClient struct {
	Name      string
	ImageName string
	Cmd       []string
	Volumes   map[string]string
	Network   string
	Env       []string
	// contains filtered or unexported fields
}

func (DockerClient) GetLayoutProvider

func (d DockerClient) GetLayoutProvider() layout.LayoutProvider

func (DockerClient) GetName

func (d DockerClient) GetName() string

func (*DockerClient) Init

func (d *DockerClient) Init() error

func (DockerClient) Send

func (d DockerClient) Send(m map[string]string) error

func (DockerClient) Terminate

func (d DockerClient) Terminate() error

type EmailAction

type EmailAction struct {
	Name       string
	User       string
	Password   string
	Host       string
	Port       int
	Sender     string
	Recipients []string
	UseMX      bool
	// contains filtered or unexported fields
}

func (*EmailAction) GetLayoutProvider

func (email *EmailAction) GetLayoutProvider() layout.LayoutProvider

func (*EmailAction) GetName

func (email *EmailAction) GetName() string

func (*EmailAction) Init

func (email *EmailAction) Init() error

func (*EmailAction) Send

func (email *EmailAction) Send(content map[string]string) error

func (*EmailAction) Terminate

func (email *EmailAction) Terminate() error

type ExecClient

type ExecClient struct {
	ExecCmd    execCmd
	Name       string
	Env        []string
	InputFile  string
	ExecScript string
	Action     []byte
}

func (*ExecClient) GetLayoutProvider

func (e *ExecClient) GetLayoutProvider() layout.LayoutProvider

func (*ExecClient) GetName

func (e *ExecClient) GetName() string

func (*ExecClient) Init

func (e *ExecClient) Init() error

func (*ExecClient) Send

func (e *ExecClient) Send(m map[string]string) error

func (*ExecClient) Terminate

func (e *ExecClient) Terminate() error

type Finding added in v2.8.0

type Finding struct {
	SchemaVersion string   `json:"SchemaVersion,omitempty"`
	ID            string   `json:"Id,omitempty"`
	ProductArn    string   `json:"ProductArn,omitempty"`
	GeneratorID   string   `json:"GeneratorId,omitempty"`
	AwsAccountID  string   `json:"AwsAccountId,omitempty"`
	Types         []string `json:"Types,omitempty"`
	CreatedAt     string   `json:"CreatedAt,omitempty"`
	UpdatedAt     string   `json:"UpdatedAt,omitempty"`
	Severity      struct {
		Label string `json:"Label,omitempty"`
	} `json:"Severity,omitempty"`
	Title       string `json:"Title,omitempty"`
	Description string `json:"Description,omitempty"`
	Remediation struct {
		Recommendation struct {
			Text string `json:"Text,omitempty"`
			URL  string `json:"Url,omitempty"`
		} `json:"Recommendation,omitempty"`
	} `json:"Remediation,omitempty"`
	ProductFields struct {
		ProductName string `json:"Product Name,omitempty"`
	} `json:"ProductFields,omitempty"`
	Resources []struct {
		Type      string `json:"Type,omitempty"`
		ID        string `json:"Id,omitempty"`
		Partition string `json:"Partition,omitempty"`
		Region    string `json:"Region,omitempty"`
		Details   struct {
			Container struct {
				ImageName string `json:"ImageName,omitempty"`
			} `json:"Container,omitempty"`
			Other struct {
				CVEID            string `json:"CVE ID,omitempty"`
				CVETitle         string `json:"CVE Title,omitempty"`
				PkgName          string `json:"PkgName,omitempty"`
				InstalledPackage string `json:"Installed Package,omitempty"`
				PatchedPackage   string `json:"Patched Package,omitempty"`
				NvdCvssScoreV3   string `json:"NvdCvssScoreV3,omitempty"`
				NvdCvssVectorV3  string `json:"NvdCvssVectorV3,omitempty"`
				NvdCvssScoreV2   string `json:"NvdCvssScoreV2,omitempty"`
				NvdCvssVectorV2  string `json:"NvdCvssVectorV2,omitempty"`
			} `json:"Other,omitempty"`
		} `json:"Details,omitempty"`
	} `json:"Resources,omitempty"`
	RecordState string `json:"RecordState,omitempty"`
}

type HTTPClient

type HTTPClient struct {
	Name        string
	Client      http.Client
	URL         *url.URL
	Method      string
	BodyFile    string
	BodyContent string
	Headers     map[string][]string
}

func (HTTPClient) GetLayoutProvider

func (hc HTTPClient) GetLayoutProvider() layout.LayoutProvider

func (*HTTPClient) GetName

func (hc *HTTPClient) GetName() string

func (*HTTPClient) Init

func (hc *HTTPClient) Init() error

func (HTTPClient) Send

func (hc HTTPClient) Send(m map[string]string) error

func (HTTPClient) Terminate

func (hc HTTPClient) Terminate() error

type JiraAPI

type JiraAPI struct {
	Name            string
	Url             string
	User            string
	Password        string
	Token           string
	TlsVerify       bool
	Issuetype       string
	ProjectKey      string
	Priority        string
	Assignee        []string
	Description     string
	Summary         string
	SprintName      string
	SprintId        int
	FixVersions     []string
	AffectsVersions []string
	Labels          []string
	Unknowns        map[string]string
	BoardName       string
	// contains filtered or unexported fields
}

func (*JiraAPI) GetLayoutProvider

func (jira *JiraAPI) GetLayoutProvider() layout.LayoutProvider

func (*JiraAPI) GetName

func (ctx *JiraAPI) GetName() string

func (*JiraAPI) Init

func (ctx *JiraAPI) Init() error

func (*JiraAPI) Send

func (ctx *JiraAPI) Send(content map[string]string) error

func (*JiraAPI) Terminate

func (ctx *JiraAPI) Terminate() error

type KubernetesClient

type KubernetesClient struct {
	Name              string
	KubeNamespace     string
	KubeConfigFile    string
	KubeLabelSelector string
	KubeActions       map[string]map[string]string
	// contains filtered or unexported fields
}

func (KubernetesClient) GetLayoutProvider

func (k KubernetesClient) GetLayoutProvider() layout.LayoutProvider

func (KubernetesClient) GetName

func (k KubernetesClient) GetName() string

func (*KubernetesClient) Init

func (k *KubernetesClient) Init() error

func (KubernetesClient) Send

func (k KubernetesClient) Send(m map[string]string) error

func (KubernetesClient) Terminate

func (k KubernetesClient) Terminate() error

type NexusIqAction

type NexusIqAction struct {
	Name           string
	Url            string
	User           string
	Password       string
	OrganizationId string
}

func (*NexusIqAction) GetLayoutProvider

func (nexus *NexusIqAction) GetLayoutProvider() layout.LayoutProvider

func (*NexusIqAction) GetName

func (nexus *NexusIqAction) GetName() string

func (*NexusIqAction) Init

func (nexus *NexusIqAction) Init() error

func (*NexusIqAction) Send

func (nexus *NexusIqAction) Send(content map[string]string) error

func (*NexusIqAction) Terminate

func (nexus *NexusIqAction) Terminate() error

type OpsGenieAction added in v2.6.0

type OpsGenieAction struct {
	Name           string
	User           string
	APIKey         string
	Responders     []string
	VisibleTo      []string
	Tags           []string
	Alias          string
	Entity         string
	PrioritySource string
	// contains filtered or unexported fields
}

func (*OpsGenieAction) GetLayoutProvider added in v2.6.0

func (ops *OpsGenieAction) GetLayoutProvider() layout.LayoutProvider

func (*OpsGenieAction) GetName added in v2.6.0

func (ops *OpsGenieAction) GetName() string

func (*OpsGenieAction) Init added in v2.6.0

func (ops *OpsGenieAction) Init() (err error)

func (*OpsGenieAction) Send added in v2.6.0

func (ops *OpsGenieAction) Send(input map[string]string) error

func (*OpsGenieAction) Terminate added in v2.6.0

func (*OpsGenieAction) Terminate() error

type PagerdutyClient added in v2.9.0

type PagerdutyClient struct {
	Name       string
	AuthToken  string
	RoutingKey string
	// contains filtered or unexported fields
}

func (*PagerdutyClient) GetLayoutProvider added in v2.9.0

func (p *PagerdutyClient) GetLayoutProvider() layout.LayoutProvider

func (*PagerdutyClient) GetName added in v2.9.0

func (p *PagerdutyClient) GetName() string

func (*PagerdutyClient) Init added in v2.9.0

func (p *PagerdutyClient) Init() error

func (*PagerdutyClient) Send added in v2.9.0

func (p *PagerdutyClient) Send(m map[string]string) error

func (*PagerdutyClient) Terminate added in v2.9.0

func (p *PagerdutyClient) Terminate() error

type Report added in v2.8.0

type Report struct {
	Findings []Finding
}

type ServiceNowAction

type ServiceNowAction struct {
	Name     string
	User     string
	Password string
	Instance string
	Table    string
	// contains filtered or unexported fields
}

func (*ServiceNowAction) GetLayoutProvider

func (sn *ServiceNowAction) GetLayoutProvider() layout.LayoutProvider

func (*ServiceNowAction) GetName

func (sn *ServiceNowAction) GetName() string

func (*ServiceNowAction) Init

func (sn *ServiceNowAction) Init() error

func (*ServiceNowAction) Send

func (sn *ServiceNowAction) Send(content map[string]string) error

func (*ServiceNowAction) Terminate

func (sn *ServiceNowAction) Terminate() error

type SlackAction

type SlackAction struct {
	Name       string
	AquaServer string
	Url        string
	// contains filtered or unexported fields
}

func (*SlackAction) GetLayoutProvider

func (slack *SlackAction) GetLayoutProvider() layout.LayoutProvider

func (*SlackAction) GetName

func (slack *SlackAction) GetName() string

func (*SlackAction) Init

func (slack *SlackAction) Init() error

func (*SlackAction) Send

func (slack *SlackAction) Send(input map[string]string) error

func (*SlackAction) Terminate

func (slack *SlackAction) Terminate() error

type SplunkAction

type SplunkAction struct {
	Name       string
	Url        string
	Token      string
	EventLimit int
	TlsVerify  bool
	// contains filtered or unexported fields
}

func (*SplunkAction) GetLayoutProvider

func (splunk *SplunkAction) GetLayoutProvider() layout.LayoutProvider

func (*SplunkAction) GetName

func (splunk *SplunkAction) GetName() string

func (*SplunkAction) Init

func (splunk *SplunkAction) Init() error

func (*SplunkAction) Send

func (splunk *SplunkAction) Send(d map[string]string) error

func (*SplunkAction) Terminate

func (splunk *SplunkAction) Terminate() error

type StdoutAction

type StdoutAction struct {
	Name string
}

func (StdoutAction) GetLayoutProvider

func (stdout StdoutAction) GetLayoutProvider() layout.LayoutProvider

func (StdoutAction) GetName

func (stdout StdoutAction) GetName() string

func (StdoutAction) Init

func (stdout StdoutAction) Init() error

func (StdoutAction) Send

func (stdout StdoutAction) Send(data map[string]string) error

func (StdoutAction) Terminate

func (stdout StdoutAction) Terminate() error

type TeamsAction

type TeamsAction struct {
	Name       string
	AquaServer string

	Webhook string
	// contains filtered or unexported fields
}

func (*TeamsAction) GetLayoutProvider

func (teams *TeamsAction) GetLayoutProvider() layout.LayoutProvider

func (*TeamsAction) GetName

func (teams *TeamsAction) GetName() string

func (*TeamsAction) Init

func (teams *TeamsAction) Init() error

func (*TeamsAction) Send

func (teams *TeamsAction) Send(input map[string]string) error

func (*TeamsAction) Terminate

func (teams *TeamsAction) Terminate() error

type WebhookAction

type WebhookAction struct {
	Name    string
	Url     string
	Timeout string
}

func (*WebhookAction) GetLayoutProvider

func (webhook *WebhookAction) GetLayoutProvider() layout.LayoutProvider

func (*WebhookAction) GetName

func (webhook *WebhookAction) GetName() string

func (*WebhookAction) Init

func (webhook *WebhookAction) Init() error

func (*WebhookAction) Send

func (webhook *WebhookAction) Send(content map[string]string) error

func (*WebhookAction) Terminate

func (webhook *WebhookAction) Terminate() error

Jump to

Keyboard shortcuts

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