Module: Datadog::AppSec

Defined in:
lib/datadog/appsec.rb,
lib/datadog/appsec/ext.rb,
lib/datadog/appsec/event.rb,
lib/datadog/appsec/scope.rb,
lib/datadog/appsec/utils.rb,
lib/datadog/appsec/assets.rb,
lib/datadog/appsec/remote.rb,
lib/datadog/appsec/monitor.rb,
lib/datadog/appsec/response.rb,
lib/datadog/appsec/component.rb,
lib/datadog/appsec/processor.rb,
lib/datadog/appsec/extensions.rb,
lib/datadog/appsec/utils/http.rb,
lib/datadog/appsec/sample_rate.rb,
lib/datadog/appsec/rate_limiter.rb,
lib/datadog/appsec/configuration.rb,
lib/datadog/appsec/contrib/patcher.rb,
lib/datadog/appsec/instrumentation.rb,
lib/datadog/appsec/reactive/engine.rb,
lib/datadog/appsec/contrib/rack/ext.rb,
lib/datadog/appsec/contrib/rails/ext.rb,
lib/datadog/appsec/processor/actions.rb,
lib/datadog/appsec/processor/context.rb,
lib/datadog/appsec/contrib/devise/ext.rb,
lib/datadog/appsec/reactive/operation.rb,
lib/datadog/appsec/contrib/integration.rb,
lib/datadog/appsec/contrib/sinatra/ext.rb,
lib/datadog/appsec/reactive/subscriber.rb,
lib/datadog/appsec/contrib/devise/event.rb,
lib/datadog/appsec/contrib/rack/patcher.rb,
lib/datadog/appsec/contrib/rails/patcher.rb,
lib/datadog/appsec/contrib/rails/request.rb,
lib/datadog/appsec/processor/rule_loader.rb,
lib/datadog/appsec/processor/rule_merger.rb,
lib/datadog/appsec/reactive/address_hash.rb,
lib/datadog/appsec/utils/http/media_type.rb,
lib/datadog/appsec/utils/trace_operation.rb,
lib/datadog/appsec/configuration/settings.rb,
lib/datadog/appsec/contrib/devise/patcher.rb,
lib/datadog/appsec/utils/http/media_range.rb,
lib/datadog/appsec/contrib/auto_instrument.rb,
lib/datadog/appsec/contrib/devise/resource.rb,
lib/datadog/appsec/contrib/devise/tracking.rb,
lib/datadog/appsec/contrib/graphql/patcher.rb,
lib/datadog/appsec/contrib/rails/framework.rb,
lib/datadog/appsec/contrib/sinatra/patcher.rb,
lib/datadog/appsec/instrumentation/gateway.rb,
lib/datadog/appsec/monitor/gateway/watcher.rb,
lib/datadog/appsec/contrib/rack/integration.rb,
lib/datadog/appsec/contrib/rails/integration.rb,
lib/datadog/appsec/contrib/sinatra/framework.rb,
lib/datadog/appsec/monitor/reactive/set_user.rb,
lib/datadog/appsec/contrib/devise/integration.rb,
lib/datadog/appsec/contrib/graphql/integration.rb,
lib/datadog/appsec/contrib/sinatra/integration.rb,
lib/datadog/appsec/contrib/graphql/appsec_trace.rb,
lib/datadog/appsec/contrib/rack/gateway/request.rb,
lib/datadog/appsec/contrib/rack/gateway/watcher.rb,
lib/datadog/appsec/contrib/rack/gateway/response.rb,
lib/datadog/appsec/contrib/rack/reactive/request.rb,
lib/datadog/appsec/contrib/rails/gateway/request.rb,
lib/datadog/appsec/contrib/rails/gateway/watcher.rb,
lib/datadog/appsec/contrib/rails/reactive/action.rb,
lib/datadog/appsec/contrib/rack/reactive/response.rb,
lib/datadog/appsec/contrib/graphql/gateway/watcher.rb,
lib/datadog/appsec/contrib/rack/request_middleware.rb,
lib/datadog/appsec/contrib/sinatra/gateway/request.rb,
lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb,
lib/datadog/appsec/contrib/sinatra/reactive/routed.rb,
lib/datadog/appsec/contrib/rails/request_middleware.rb,
lib/datadog/appsec/instrumentation/gateway/argument.rb,
lib/datadog/appsec/contrib/graphql/gateway/multiplex.rb,
lib/datadog/appsec/contrib/graphql/reactive/multiplex.rb,
lib/datadog/appsec/contrib/rack/reactive/request_body.rb,
lib/datadog/appsec/contrib/sinatra/request_middleware.rb,
lib/datadog/appsec/contrib/rack/request_body_middleware.rb,
lib/datadog/appsec/contrib/sinatra/gateway/route_params.rb,
lib/datadog/appsec/contrib/devise/patcher/rememberable_patch.rb,
lib/datadog/appsec/contrib/devise/patcher/authenticatable_patch.rb,
lib/datadog/appsec/contrib/devise/patcher/registration_controller_patch.rb

Overview

Namespace for Datadog AppSec instrumentation

Defined Under Namespace

Modules: Assets, Configuration, Contrib, Event, Ext, Extensions, Instrumentation, Monitor, Reactive, Remote, Utils Classes: Component, Processor, RateLimiter, Response, SampleRate, Scope

Class Method Summary collapse

Class Method Details

.active_scopeObject



17
18
19
# File 'lib/datadog/appsec.rb', line 17

def active_scope
  Datadog::AppSec::Scope.active_scope
end

.enabled?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/datadog/appsec.rb', line 13

def enabled?
  Datadog.configuration.appsec.enabled
end

.processorObject



21
22
23
24
25
# File 'lib/datadog/appsec.rb', line 21

def processor
  appsec_component = components.appsec

  appsec_component.processor if appsec_component
end

.reconfigure(ruleset:, actions:, telemetry:) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/datadog/appsec.rb', line 27

def reconfigure(ruleset:, actions:, telemetry:)
  appsec_component = components.appsec

  return unless appsec_component

  appsec_component.reconfigure(ruleset: ruleset, actions: actions, telemetry: telemetry)
end

.reconfigure_lock(&block) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/datadog/appsec.rb', line 35

def reconfigure_lock(&block)
  appsec_component = components.appsec

  return unless appsec_component

  appsec_component.reconfigure_lock(&block)
end