cws

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cws holds cws test related functions

Index

Constants

View Source
const (
	// SecurityStartLog is the log corresponding to a successful start of the security-agent
	SecurityStartLog = "Successfully connected to the runtime security module"

	// SystemProbeStartLog is the log corresponding to a successful start of the system-probe
	SystemProbeStartLog = "runtime security started"

	// SecurityAgentPath is the path of the security-agent binary
	SecurityAgentPath = "/opt/datadog-agent/embedded/bin/security-agent"

	// PoliciesPath is the path of the default runtime security policies
	PoliciesPath = "/etc/datadog-agent/runtime-security.d/test.policy"
)

Variables

This section is empty.

Functions

func WaitAppLogs

func WaitAppLogs(apiClient *APIClient, query string) (*datadog.LogAttributes, error)

WaitAppLogs waits for the app log corresponding to the query

func WaitAppSignal

func WaitAppSignal(apiClient *APIClient, query string) (*datadog.SecurityMonitoringSignalAttributes, error)

WaitAppSignal waits for the signal corresponding to the query

Types

type APIClient added in v0.51.0

type APIClient struct {
	// contains filtered or unexported fields
}

APIClient represents the datadog API context

func NewAPIClient

func NewAPIClient() *APIClient

NewAPIClient initialise a client with the API and APP keys

func (*APIClient) CreateCWSAgentRule added in v0.51.0

func (c *APIClient) CreateCWSAgentRule(name string, msg string, secl string) (*datadog.CloudWorkloadSecurityAgentRuleResponse, error)

CreateCWSAgentRule creates a cws agent rule

func (*APIClient) CreateCwsSignalRule added in v0.51.0

func (c *APIClient) CreateCwsSignalRule(name string, msg string, agentRuleID string, tags []string) (*datadog.SecurityMonitoringRuleResponse, error)

CreateCwsSignalRule creates a cws signal rule

func (*APIClient) DeleteAgentRule added in v0.51.0

func (c *APIClient) DeleteAgentRule(ruleID string) error

DeleteAgentRule deletes an agent rule

func (*APIClient) DeleteSignalRule added in v0.51.0

func (c *APIClient) DeleteSignalRule(ruleID string) error

DeleteSignalRule deletes a signal rule

func (*APIClient) GetAppLog added in v0.51.0

func (c *APIClient) GetAppLog(query string) (*datadog.LogsListResponse, error)

GetAppLog returns the logs corresponding to the query

func (*APIClient) GetAppSignal added in v0.51.0

GetAppSignal returns the signal corresponding to the query

Jump to

Keyboard shortcuts

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