Documentation ¶
Overview ¶
Package cws holds cws test related functions
Index ¶
- Constants
- func WaitAppLogs(apiClient *APIClient, query string) (*datadog.LogAttributes, error)
- func WaitAppSignal(apiClient *APIClient, query string) (*datadog.SecurityMonitoringSignalAttributes, error)
- type APIClient
- func (c *APIClient) CreateCWSAgentRule(name string, msg string, secl string) (*datadog.CloudWorkloadSecurityAgentRuleResponse, error)
- func (c *APIClient) CreateCwsSignalRule(name string, msg string, agentRuleID string, tags []string) (*datadog.SecurityMonitoringRuleResponse, error)
- func (c *APIClient) DeleteAgentRule(ruleID string) error
- func (c *APIClient) DeleteSignalRule(ruleID string) error
- func (c *APIClient) GetAppLog(query string) (*datadog.LogsListResponse, error)
- func (c *APIClient) GetAppSignal(query string) (*datadog.SecurityMonitoringSignalsListResponse, error)
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
DeleteAgentRule deletes an agent rule
func (*APIClient) DeleteSignalRule ¶ added in v0.51.0
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
func (c *APIClient) GetAppSignal(query string) (*datadog.SecurityMonitoringSignalsListResponse, error)
GetAppSignal returns the signal corresponding to the query
Click to show internal directories.
Click to hide internal directories.