cws

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 7 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/default.policy"
)

Variables

This section is empty.

Functions

func WaitAppLogs

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

WaitAppLogs waits for the app log corresponding to the query

func WaitAppSignal

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

WaitAppSignal waits for the signal corresponding to the query

Types

type MyAPIClient

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

MyAPIClient represents the datadog API context

func NewAPIClient

func NewAPIClient() MyAPIClient

NewAPIClient initialise a client with the API and APP keys

func (MyAPIClient) CreateCWSAgentRule

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

CreateCWSAgentRule creates a cws agent rule

func (MyAPIClient) CreateCwsSignalRule

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

CreateCwsSignalRule creates a cws signal rule

func (MyAPIClient) DeleteAgentRule

func (c MyAPIClient) DeleteAgentRule(ruleID string) error

DeleteAgentRule deletes an agent rule

func (MyAPIClient) DeleteSignalRule

func (c MyAPIClient) DeleteSignalRule(ruleID string) error

DeleteSignalRule deletes a signal rule

func (MyAPIClient) GetAppLog

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

GetAppLog returns the logs corresponding to the query

func (MyAPIClient) GetAppSignal

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