cw-datadog 2.23.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (944) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5142 -0
  3. data/LICENSE +6 -0
  4. data/LICENSE-3rdparty.csv +7 -0
  5. data/LICENSE.Apache +200 -0
  6. data/LICENSE.BSD3 +24 -0
  7. data/NOTICE +4 -0
  8. data/README.md +24 -0
  9. data/bin/ddprofrb +15 -0
  10. data/ext/LIBDATADOG_DEVELOPMENT.md +3 -0
  11. data/ext/datadog_profiling_native_extension/NativeExtensionDesign.md +156 -0
  12. data/ext/datadog_profiling_native_extension/clock_id.h +23 -0
  13. data/ext/datadog_profiling_native_extension/clock_id_from_pthread.c +55 -0
  14. data/ext/datadog_profiling_native_extension/clock_id_noop.c +21 -0
  15. data/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +1423 -0
  16. data/ext/datadog_profiling_native_extension/collectors_discrete_dynamic_sampler.c +447 -0
  17. data/ext/datadog_profiling_native_extension/collectors_discrete_dynamic_sampler.h +131 -0
  18. data/ext/datadog_profiling_native_extension/collectors_dynamic_sampling_rate.c +150 -0
  19. data/ext/datadog_profiling_native_extension/collectors_dynamic_sampling_rate.h +18 -0
  20. data/ext/datadog_profiling_native_extension/collectors_gc_profiling_helper.c +156 -0
  21. data/ext/datadog_profiling_native_extension/collectors_gc_profiling_helper.h +5 -0
  22. data/ext/datadog_profiling_native_extension/collectors_idle_sampling_helper.c +248 -0
  23. data/ext/datadog_profiling_native_extension/collectors_idle_sampling_helper.h +3 -0
  24. data/ext/datadog_profiling_native_extension/collectors_stack.c +659 -0
  25. data/ext/datadog_profiling_native_extension/collectors_stack.h +44 -0
  26. data/ext/datadog_profiling_native_extension/collectors_thread_context.c +2221 -0
  27. data/ext/datadog_profiling_native_extension/collectors_thread_context.h +31 -0
  28. data/ext/datadog_profiling_native_extension/datadog_ruby_common.c +80 -0
  29. data/ext/datadog_profiling_native_extension/datadog_ruby_common.h +63 -0
  30. data/ext/datadog_profiling_native_extension/encoded_profile.c +79 -0
  31. data/ext/datadog_profiling_native_extension/encoded_profile.h +8 -0
  32. data/ext/datadog_profiling_native_extension/extconf.rb +321 -0
  33. data/ext/datadog_profiling_native_extension/gvl_profiling_helper.c +52 -0
  34. data/ext/datadog_profiling_native_extension/gvl_profiling_helper.h +67 -0
  35. data/ext/datadog_profiling_native_extension/heap_recorder.c +998 -0
  36. data/ext/datadog_profiling_native_extension/heap_recorder.h +177 -0
  37. data/ext/datadog_profiling_native_extension/helpers.h +12 -0
  38. data/ext/datadog_profiling_native_extension/http_transport.c +280 -0
  39. data/ext/datadog_profiling_native_extension/libdatadog_helpers.c +84 -0
  40. data/ext/datadog_profiling_native_extension/libdatadog_helpers.h +28 -0
  41. data/ext/datadog_profiling_native_extension/native_extension_helpers.rb +244 -0
  42. data/ext/datadog_profiling_native_extension/private_vm_api_access.c +881 -0
  43. data/ext/datadog_profiling_native_extension/private_vm_api_access.h +81 -0
  44. data/ext/datadog_profiling_native_extension/profiling.c +284 -0
  45. data/ext/datadog_profiling_native_extension/ruby_helpers.c +235 -0
  46. data/ext/datadog_profiling_native_extension/ruby_helpers.h +88 -0
  47. data/ext/datadog_profiling_native_extension/setup_signal_handler.c +115 -0
  48. data/ext/datadog_profiling_native_extension/setup_signal_handler.h +12 -0
  49. data/ext/datadog_profiling_native_extension/stack_recorder.c +1145 -0
  50. data/ext/datadog_profiling_native_extension/stack_recorder.h +31 -0
  51. data/ext/datadog_profiling_native_extension/time_helpers.c +38 -0
  52. data/ext/datadog_profiling_native_extension/time_helpers.h +56 -0
  53. data/ext/datadog_profiling_native_extension/unsafe_api_calls_check.c +47 -0
  54. data/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h +31 -0
  55. data/ext/libdatadog_api/crashtracker.c +125 -0
  56. data/ext/libdatadog_api/crashtracker.h +5 -0
  57. data/ext/libdatadog_api/datadog_ruby_common.c +80 -0
  58. data/ext/libdatadog_api/datadog_ruby_common.h +63 -0
  59. data/ext/libdatadog_api/ddsketch.c +106 -0
  60. data/ext/libdatadog_api/extconf.rb +110 -0
  61. data/ext/libdatadog_api/init.c +18 -0
  62. data/ext/libdatadog_api/library_config.c +172 -0
  63. data/ext/libdatadog_api/library_config.h +25 -0
  64. data/ext/libdatadog_api/process_discovery.c +118 -0
  65. data/ext/libdatadog_api/process_discovery.h +5 -0
  66. data/ext/libdatadog_extconf_helpers.rb +140 -0
  67. data/lib/datadog/appsec/actions_handler/serializable_backtrace.rb +89 -0
  68. data/lib/datadog/appsec/actions_handler.rb +49 -0
  69. data/lib/datadog/appsec/anonymizer.rb +16 -0
  70. data/lib/datadog/appsec/api_security/endpoint_collection/grape_route_serializer.rb +26 -0
  71. data/lib/datadog/appsec/api_security/endpoint_collection/rails_collector.rb +59 -0
  72. data/lib/datadog/appsec/api_security/endpoint_collection/rails_route_serializer.rb +29 -0
  73. data/lib/datadog/appsec/api_security/endpoint_collection/sinatra_route_serializer.rb +26 -0
  74. data/lib/datadog/appsec/api_security/endpoint_collection.rb +10 -0
  75. data/lib/datadog/appsec/api_security/route_extractor.rb +77 -0
  76. data/lib/datadog/appsec/api_security/sampler.rb +60 -0
  77. data/lib/datadog/appsec/api_security.rb +23 -0
  78. data/lib/datadog/appsec/assets/blocked.html +99 -0
  79. data/lib/datadog/appsec/assets/blocked.json +1 -0
  80. data/lib/datadog/appsec/assets/blocked.text +5 -0
  81. data/lib/datadog/appsec/assets/waf_rules/README.md +46 -0
  82. data/lib/datadog/appsec/assets/waf_rules/recommended.json +10504 -0
  83. data/lib/datadog/appsec/assets/waf_rules/strict.json +3066 -0
  84. data/lib/datadog/appsec/assets.rb +46 -0
  85. data/lib/datadog/appsec/autoload.rb +13 -0
  86. data/lib/datadog/appsec/component.rb +89 -0
  87. data/lib/datadog/appsec/compressed_json.rb +40 -0
  88. data/lib/datadog/appsec/configuration/settings.rb +409 -0
  89. data/lib/datadog/appsec/configuration.rb +11 -0
  90. data/lib/datadog/appsec/context.rb +97 -0
  91. data/lib/datadog/appsec/contrib/active_record/instrumentation.rb +94 -0
  92. data/lib/datadog/appsec/contrib/active_record/integration.rb +41 -0
  93. data/lib/datadog/appsec/contrib/active_record/patcher.rb +101 -0
  94. data/lib/datadog/appsec/contrib/auto_instrument.rb +25 -0
  95. data/lib/datadog/appsec/contrib/devise/configuration.rb +52 -0
  96. data/lib/datadog/appsec/contrib/devise/data_extractor.rb +78 -0
  97. data/lib/datadog/appsec/contrib/devise/ext.rb +35 -0
  98. data/lib/datadog/appsec/contrib/devise/integration.rb +41 -0
  99. data/lib/datadog/appsec/contrib/devise/patcher.rb +63 -0
  100. data/lib/datadog/appsec/contrib/devise/patches/signin_tracking_patch.rb +103 -0
  101. data/lib/datadog/appsec/contrib/devise/patches/signup_tracking_patch.rb +70 -0
  102. data/lib/datadog/appsec/contrib/devise/patches/skip_signin_tracking_patch.rb +21 -0
  103. data/lib/datadog/appsec/contrib/devise/tracking_middleware.rb +106 -0
  104. data/lib/datadog/appsec/contrib/excon/integration.rb +41 -0
  105. data/lib/datadog/appsec/contrib/excon/patcher.rb +28 -0
  106. data/lib/datadog/appsec/contrib/excon/ssrf_detection_middleware.rb +42 -0
  107. data/lib/datadog/appsec/contrib/faraday/connection_patch.rb +22 -0
  108. data/lib/datadog/appsec/contrib/faraday/integration.rb +42 -0
  109. data/lib/datadog/appsec/contrib/faraday/patcher.rb +53 -0
  110. data/lib/datadog/appsec/contrib/faraday/rack_builder_patch.rb +22 -0
  111. data/lib/datadog/appsec/contrib/faraday/ssrf_detection_middleware.rb +42 -0
  112. data/lib/datadog/appsec/contrib/graphql/appsec_trace.rb +29 -0
  113. data/lib/datadog/appsec/contrib/graphql/gateway/multiplex.rb +109 -0
  114. data/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb +56 -0
  115. data/lib/datadog/appsec/contrib/graphql/integration.rb +54 -0
  116. data/lib/datadog/appsec/contrib/graphql/patcher.rb +34 -0
  117. data/lib/datadog/appsec/contrib/integration.rb +37 -0
  118. data/lib/datadog/appsec/contrib/rack/ext.rb +47 -0
  119. data/lib/datadog/appsec/contrib/rack/gateway/request.rb +101 -0
  120. data/lib/datadog/appsec/contrib/rack/gateway/response.rb +30 -0
  121. data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +141 -0
  122. data/lib/datadog/appsec/contrib/rack/integration.rb +44 -0
  123. data/lib/datadog/appsec/contrib/rack/patcher.rb +31 -0
  124. data/lib/datadog/appsec/contrib/rack/request_body_middleware.rb +43 -0
  125. data/lib/datadog/appsec/contrib/rack/request_middleware.rb +218 -0
  126. data/lib/datadog/appsec/contrib/rails/ext.rb +13 -0
  127. data/lib/datadog/appsec/contrib/rails/framework.rb +16 -0
  128. data/lib/datadog/appsec/contrib/rails/gateway/request.rb +67 -0
  129. data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +78 -0
  130. data/lib/datadog/appsec/contrib/rails/integration.rb +43 -0
  131. data/lib/datadog/appsec/contrib/rails/patcher.rb +171 -0
  132. data/lib/datadog/appsec/contrib/rails/patches/process_action_patch.rb +27 -0
  133. data/lib/datadog/appsec/contrib/rails/patches/render_to_body_patch.rb +33 -0
  134. data/lib/datadog/appsec/contrib/rails/request.rb +36 -0
  135. data/lib/datadog/appsec/contrib/rails/request_middleware.rb +20 -0
  136. data/lib/datadog/appsec/contrib/rest_client/integration.rb +45 -0
  137. data/lib/datadog/appsec/contrib/rest_client/patcher.rb +28 -0
  138. data/lib/datadog/appsec/contrib/rest_client/request_ssrf_detection_patch.rb +39 -0
  139. data/lib/datadog/appsec/contrib/sinatra/framework.rb +20 -0
  140. data/lib/datadog/appsec/contrib/sinatra/gateway/request.rb +17 -0
  141. data/lib/datadog/appsec/contrib/sinatra/gateway/route_params.rb +23 -0
  142. data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +105 -0
  143. data/lib/datadog/appsec/contrib/sinatra/integration.rb +43 -0
  144. data/lib/datadog/appsec/contrib/sinatra/patcher.rb +132 -0
  145. data/lib/datadog/appsec/contrib/sinatra/patches/json_patch.rb +31 -0
  146. data/lib/datadog/appsec/contrib/sinatra/request_middleware.rb +20 -0
  147. data/lib/datadog/appsec/event.rb +139 -0
  148. data/lib/datadog/appsec/ext.rb +23 -0
  149. data/lib/datadog/appsec/extensions.rb +16 -0
  150. data/lib/datadog/appsec/instrumentation/gateway/argument.rb +43 -0
  151. data/lib/datadog/appsec/instrumentation/gateway/middleware.rb +24 -0
  152. data/lib/datadog/appsec/instrumentation/gateway.rb +59 -0
  153. data/lib/datadog/appsec/instrumentation.rb +9 -0
  154. data/lib/datadog/appsec/metrics/collector.rb +58 -0
  155. data/lib/datadog/appsec/metrics/exporter.rb +35 -0
  156. data/lib/datadog/appsec/metrics/telemetry.rb +23 -0
  157. data/lib/datadog/appsec/metrics/telemetry_exporter.rb +29 -0
  158. data/lib/datadog/appsec/metrics.rb +14 -0
  159. data/lib/datadog/appsec/monitor/gateway/watcher.rb +85 -0
  160. data/lib/datadog/appsec/monitor.rb +11 -0
  161. data/lib/datadog/appsec/processor/rule_loader.rb +119 -0
  162. data/lib/datadog/appsec/rate_limiter.rb +45 -0
  163. data/lib/datadog/appsec/remote.rb +119 -0
  164. data/lib/datadog/appsec/response.rb +99 -0
  165. data/lib/datadog/appsec/sample_rate.rb +21 -0
  166. data/lib/datadog/appsec/security_engine/engine.rb +176 -0
  167. data/lib/datadog/appsec/security_engine/result.rb +102 -0
  168. data/lib/datadog/appsec/security_engine/runner.rb +111 -0
  169. data/lib/datadog/appsec/security_engine.rb +9 -0
  170. data/lib/datadog/appsec/security_event.rb +37 -0
  171. data/lib/datadog/appsec/thread_safe_ref.rb +61 -0
  172. data/lib/datadog/appsec/trace_keeper.rb +24 -0
  173. data/lib/datadog/appsec/utils/hash_coercion.rb +23 -0
  174. data/lib/datadog/appsec/utils/http/media_range.rb +201 -0
  175. data/lib/datadog/appsec/utils/http/media_type.rb +87 -0
  176. data/lib/datadog/appsec/utils/http.rb +11 -0
  177. data/lib/datadog/appsec/utils.rb +9 -0
  178. data/lib/datadog/appsec.rb +65 -0
  179. data/lib/datadog/auto_instrument.rb +19 -0
  180. data/lib/datadog/auto_instrument_base.rb +9 -0
  181. data/lib/datadog/core/buffer/cruby.rb +55 -0
  182. data/lib/datadog/core/buffer/random.rb +150 -0
  183. data/lib/datadog/core/buffer/thread_safe.rb +58 -0
  184. data/lib/datadog/core/chunker.rb +35 -0
  185. data/lib/datadog/core/cloudwise/IMPLEMENTATION_V2.md +517 -0
  186. data/lib/datadog/core/cloudwise/QUICKSTART.md +398 -0
  187. data/lib/datadog/core/cloudwise/README.md +722 -0
  188. data/lib/datadog/core/cloudwise/app_registration_worker.rb +90 -0
  189. data/lib/datadog/core/cloudwise/client.rb +490 -0
  190. data/lib/datadog/core/cloudwise/component.rb +351 -0
  191. data/lib/datadog/core/cloudwise/heartbeat_worker.rb +137 -0
  192. data/lib/datadog/core/cloudwise/host_id_worker.rb +85 -0
  193. data/lib/datadog/core/cloudwise/license_worker.rb +108 -0
  194. data/lib/datadog/core/cloudwise/probe_state.rb +160 -0
  195. data/lib/datadog/core/configuration/agent_settings.rb +52 -0
  196. data/lib/datadog/core/configuration/agent_settings_resolver.rb +339 -0
  197. data/lib/datadog/core/configuration/agentless_settings_resolver.rb +176 -0
  198. data/lib/datadog/core/configuration/base.rb +91 -0
  199. data/lib/datadog/core/configuration/components.rb +386 -0
  200. data/lib/datadog/core/configuration/components_state.rb +23 -0
  201. data/lib/datadog/core/configuration/config_helper.rb +100 -0
  202. data/lib/datadog/core/configuration/deprecations.rb +36 -0
  203. data/lib/datadog/core/configuration/ext.rb +49 -0
  204. data/lib/datadog/core/configuration/option.rb +368 -0
  205. data/lib/datadog/core/configuration/option_definition.rb +158 -0
  206. data/lib/datadog/core/configuration/options.rb +134 -0
  207. data/lib/datadog/core/configuration/settings.rb +1087 -0
  208. data/lib/datadog/core/configuration/stable_config.rb +32 -0
  209. data/lib/datadog/core/configuration/supported_configurations.rb +347 -0
  210. data/lib/datadog/core/configuration.rb +328 -0
  211. data/lib/datadog/core/contrib/rails/utils.rb +24 -0
  212. data/lib/datadog/core/crashtracking/component.rb +105 -0
  213. data/lib/datadog/core/crashtracking/tag_builder.rb +21 -0
  214. data/lib/datadog/core/ddsketch.rb +19 -0
  215. data/lib/datadog/core/deprecations.rb +58 -0
  216. data/lib/datadog/core/diagnostics/environment_logger.rb +170 -0
  217. data/lib/datadog/core/diagnostics/health.rb +19 -0
  218. data/lib/datadog/core/encoding.rb +90 -0
  219. data/lib/datadog/core/environment/agent_info.rb +78 -0
  220. data/lib/datadog/core/environment/cgroup.rb +51 -0
  221. data/lib/datadog/core/environment/class_count.rb +21 -0
  222. data/lib/datadog/core/environment/container.rb +89 -0
  223. data/lib/datadog/core/environment/execution.rb +103 -0
  224. data/lib/datadog/core/environment/ext.rb +45 -0
  225. data/lib/datadog/core/environment/gc.rb +20 -0
  226. data/lib/datadog/core/environment/git.rb +26 -0
  227. data/lib/datadog/core/environment/identity.rb +84 -0
  228. data/lib/datadog/core/environment/platform.rb +46 -0
  229. data/lib/datadog/core/environment/socket.rb +24 -0
  230. data/lib/datadog/core/environment/thread_count.rb +20 -0
  231. data/lib/datadog/core/environment/variable_helpers.rb +53 -0
  232. data/lib/datadog/core/environment/vm_cache.rb +64 -0
  233. data/lib/datadog/core/environment/yjit.rb +69 -0
  234. data/lib/datadog/core/error.rb +102 -0
  235. data/lib/datadog/core/extensions.rb +16 -0
  236. data/lib/datadog/core/git/ext.rb +16 -0
  237. data/lib/datadog/core/header_collection.rb +43 -0
  238. data/lib/datadog/core/logger.rb +45 -0
  239. data/lib/datadog/core/logging/ext.rb +13 -0
  240. data/lib/datadog/core/metrics/client.rb +206 -0
  241. data/lib/datadog/core/metrics/ext.rb +18 -0
  242. data/lib/datadog/core/metrics/helpers.rb +25 -0
  243. data/lib/datadog/core/metrics/logging.rb +44 -0
  244. data/lib/datadog/core/metrics/metric.rb +14 -0
  245. data/lib/datadog/core/metrics/options.rb +52 -0
  246. data/lib/datadog/core/pin.rb +71 -0
  247. data/lib/datadog/core/process_discovery/tracer_memfd.rb +13 -0
  248. data/lib/datadog/core/process_discovery.rb +61 -0
  249. data/lib/datadog/core/rate_limiter.rb +185 -0
  250. data/lib/datadog/core/remote/client/capabilities.rb +70 -0
  251. data/lib/datadog/core/remote/client.rb +245 -0
  252. data/lib/datadog/core/remote/component.rb +161 -0
  253. data/lib/datadog/core/remote/configuration/content.rb +111 -0
  254. data/lib/datadog/core/remote/configuration/digest.rb +62 -0
  255. data/lib/datadog/core/remote/configuration/path.rb +90 -0
  256. data/lib/datadog/core/remote/configuration/repository.rb +307 -0
  257. data/lib/datadog/core/remote/configuration/target.rb +74 -0
  258. data/lib/datadog/core/remote/configuration.rb +18 -0
  259. data/lib/datadog/core/remote/dispatcher.rb +59 -0
  260. data/lib/datadog/core/remote/ext.rb +13 -0
  261. data/lib/datadog/core/remote/negotiation.rb +70 -0
  262. data/lib/datadog/core/remote/tie/tracing.rb +39 -0
  263. data/lib/datadog/core/remote/tie.rb +29 -0
  264. data/lib/datadog/core/remote/transport/config.rb +61 -0
  265. data/lib/datadog/core/remote/transport/http/api.rb +53 -0
  266. data/lib/datadog/core/remote/transport/http/client.rb +49 -0
  267. data/lib/datadog/core/remote/transport/http/config.rb +252 -0
  268. data/lib/datadog/core/remote/transport/http/negotiation.rb +103 -0
  269. data/lib/datadog/core/remote/transport/http.rb +83 -0
  270. data/lib/datadog/core/remote/transport/negotiation.rb +75 -0
  271. data/lib/datadog/core/remote/worker.rb +105 -0
  272. data/lib/datadog/core/remote.rb +24 -0
  273. data/lib/datadog/core/runtime/ext.rb +40 -0
  274. data/lib/datadog/core/runtime/metrics.rb +202 -0
  275. data/lib/datadog/core/semaphore.rb +35 -0
  276. data/lib/datadog/core/tag_builder.rb +52 -0
  277. data/lib/datadog/core/telemetry/component.rb +206 -0
  278. data/lib/datadog/core/telemetry/emitter.rb +56 -0
  279. data/lib/datadog/core/telemetry/event/app_client_configuration_change.rb +66 -0
  280. data/lib/datadog/core/telemetry/event/app_closing.rb +18 -0
  281. data/lib/datadog/core/telemetry/event/app_dependencies_loaded.rb +33 -0
  282. data/lib/datadog/core/telemetry/event/app_endpoints_loaded.rb +30 -0
  283. data/lib/datadog/core/telemetry/event/app_heartbeat.rb +18 -0
  284. data/lib/datadog/core/telemetry/event/app_integrations_change.rb +58 -0
  285. data/lib/datadog/core/telemetry/event/app_started.rb +287 -0
  286. data/lib/datadog/core/telemetry/event/base.rb +40 -0
  287. data/lib/datadog/core/telemetry/event/distributions.rb +18 -0
  288. data/lib/datadog/core/telemetry/event/generate_metrics.rb +43 -0
  289. data/lib/datadog/core/telemetry/event/log.rb +76 -0
  290. data/lib/datadog/core/telemetry/event/message_batch.rb +42 -0
  291. data/lib/datadog/core/telemetry/event/synth_app_client_configuration_change.rb +43 -0
  292. data/lib/datadog/core/telemetry/event.rb +37 -0
  293. data/lib/datadog/core/telemetry/ext.rb +20 -0
  294. data/lib/datadog/core/telemetry/http/adapters/net.rb +26 -0
  295. data/lib/datadog/core/telemetry/logger.rb +52 -0
  296. data/lib/datadog/core/telemetry/logging.rb +71 -0
  297. data/lib/datadog/core/telemetry/metric.rb +189 -0
  298. data/lib/datadog/core/telemetry/metrics_collection.rb +81 -0
  299. data/lib/datadog/core/telemetry/metrics_manager.rb +81 -0
  300. data/lib/datadog/core/telemetry/request.rb +71 -0
  301. data/lib/datadog/core/telemetry/transport/http/api.rb +43 -0
  302. data/lib/datadog/core/telemetry/transport/http/client.rb +49 -0
  303. data/lib/datadog/core/telemetry/transport/http/telemetry.rb +92 -0
  304. data/lib/datadog/core/telemetry/transport/http.rb +63 -0
  305. data/lib/datadog/core/telemetry/transport/telemetry.rb +51 -0
  306. data/lib/datadog/core/telemetry/worker.rb +276 -0
  307. data/lib/datadog/core/transport/ext.rb +44 -0
  308. data/lib/datadog/core/transport/http/adapters/net.rb +175 -0
  309. data/lib/datadog/core/transport/http/adapters/registry.rb +29 -0
  310. data/lib/datadog/core/transport/http/adapters/test.rb +90 -0
  311. data/lib/datadog/core/transport/http/adapters/unix_socket.rb +83 -0
  312. data/lib/datadog/core/transport/http/api/endpoint.rb +31 -0
  313. data/lib/datadog/core/transport/http/api/fallbacks.rb +26 -0
  314. data/lib/datadog/core/transport/http/api/instance.rb +54 -0
  315. data/lib/datadog/core/transport/http/api/map.rb +18 -0
  316. data/lib/datadog/core/transport/http/api/spec.rb +36 -0
  317. data/lib/datadog/core/transport/http/builder.rb +184 -0
  318. data/lib/datadog/core/transport/http/env.rb +70 -0
  319. data/lib/datadog/core/transport/http/response.rb +60 -0
  320. data/lib/datadog/core/transport/http.rb +75 -0
  321. data/lib/datadog/core/transport/parcel.rb +22 -0
  322. data/lib/datadog/core/transport/request.rb +17 -0
  323. data/lib/datadog/core/transport/response.rb +71 -0
  324. data/lib/datadog/core/utils/at_fork_monkey_patch.rb +102 -0
  325. data/lib/datadog/core/utils/base64.rb +22 -0
  326. data/lib/datadog/core/utils/duration.rb +52 -0
  327. data/lib/datadog/core/utils/forking.rb +63 -0
  328. data/lib/datadog/core/utils/hash.rb +79 -0
  329. data/lib/datadog/core/utils/lru_cache.rb +45 -0
  330. data/lib/datadog/core/utils/network.rb +142 -0
  331. data/lib/datadog/core/utils/only_once.rb +42 -0
  332. data/lib/datadog/core/utils/only_once_successful.rb +87 -0
  333. data/lib/datadog/core/utils/safe_dup.rb +40 -0
  334. data/lib/datadog/core/utils/sequence.rb +26 -0
  335. data/lib/datadog/core/utils/time.rb +84 -0
  336. data/lib/datadog/core/utils/truncation.rb +21 -0
  337. data/lib/datadog/core/utils/url.rb +25 -0
  338. data/lib/datadog/core/utils.rb +101 -0
  339. data/lib/datadog/core/vendor/multipart-post/LICENSE +11 -0
  340. data/lib/datadog/core/vendor/multipart-post/multipart/post/composite_read_io.rb +118 -0
  341. data/lib/datadog/core/vendor/multipart-post/multipart/post/multipartable.rb +59 -0
  342. data/lib/datadog/core/vendor/multipart-post/multipart/post/parts.rb +137 -0
  343. data/lib/datadog/core/vendor/multipart-post/multipart/post/version.rb +11 -0
  344. data/lib/datadog/core/vendor/multipart-post/multipart/post.rb +10 -0
  345. data/lib/datadog/core/vendor/multipart-post/multipart.rb +14 -0
  346. data/lib/datadog/core/vendor/multipart-post/net/http/post/multipart.rb +34 -0
  347. data/lib/datadog/core/worker.rb +24 -0
  348. data/lib/datadog/core/workers/async.rb +202 -0
  349. data/lib/datadog/core/workers/interval_loop.rb +134 -0
  350. data/lib/datadog/core/workers/polling.rb +59 -0
  351. data/lib/datadog/core/workers/queue.rb +44 -0
  352. data/lib/datadog/core/workers/runtime_metrics.rb +62 -0
  353. data/lib/datadog/core.rb +38 -0
  354. data/lib/datadog/data_streams/configuration/settings.rb +49 -0
  355. data/lib/datadog/data_streams/configuration.rb +11 -0
  356. data/lib/datadog/data_streams/ext.rb +11 -0
  357. data/lib/datadog/data_streams/extensions.rb +16 -0
  358. data/lib/datadog/data_streams/pathway_context.rb +169 -0
  359. data/lib/datadog/data_streams/processor.rb +509 -0
  360. data/lib/datadog/data_streams/transport/http/api.rb +33 -0
  361. data/lib/datadog/data_streams/transport/http/client.rb +49 -0
  362. data/lib/datadog/data_streams/transport/http/stats.rb +87 -0
  363. data/lib/datadog/data_streams/transport/http.rb +41 -0
  364. data/lib/datadog/data_streams/transport/stats.rb +60 -0
  365. data/lib/datadog/data_streams.rb +100 -0
  366. data/lib/datadog/di/base.rb +115 -0
  367. data/lib/datadog/di/boot.rb +43 -0
  368. data/lib/datadog/di/code_tracker.rb +204 -0
  369. data/lib/datadog/di/component.rb +122 -0
  370. data/lib/datadog/di/configuration/settings.rb +212 -0
  371. data/lib/datadog/di/configuration.rb +11 -0
  372. data/lib/datadog/di/context.rb +70 -0
  373. data/lib/datadog/di/contrib/active_record.rb +12 -0
  374. data/lib/datadog/di/contrib/railtie.rb +15 -0
  375. data/lib/datadog/di/contrib.rb +28 -0
  376. data/lib/datadog/di/el/compiler.rb +164 -0
  377. data/lib/datadog/di/el/evaluator.rb +159 -0
  378. data/lib/datadog/di/el/expression.rb +42 -0
  379. data/lib/datadog/di/el.rb +5 -0
  380. data/lib/datadog/di/error.rb +82 -0
  381. data/lib/datadog/di/extensions.rb +16 -0
  382. data/lib/datadog/di/instrumenter.rb +566 -0
  383. data/lib/datadog/di/logger.rb +30 -0
  384. data/lib/datadog/di/preload.rb +18 -0
  385. data/lib/datadog/di/probe.rb +231 -0
  386. data/lib/datadog/di/probe_builder.rb +86 -0
  387. data/lib/datadog/di/probe_file_loader/railtie.rb +15 -0
  388. data/lib/datadog/di/probe_file_loader.rb +82 -0
  389. data/lib/datadog/di/probe_manager.rb +261 -0
  390. data/lib/datadog/di/probe_notification_builder.rb +236 -0
  391. data/lib/datadog/di/probe_notifier_worker.rb +305 -0
  392. data/lib/datadog/di/proc_responder.rb +32 -0
  393. data/lib/datadog/di/redactor.rb +187 -0
  394. data/lib/datadog/di/remote.rb +145 -0
  395. data/lib/datadog/di/serializer.rb +422 -0
  396. data/lib/datadog/di/transport/diagnostics.rb +62 -0
  397. data/lib/datadog/di/transport/http/api.rb +42 -0
  398. data/lib/datadog/di/transport/http/client.rb +47 -0
  399. data/lib/datadog/di/transport/http/diagnostics.rb +65 -0
  400. data/lib/datadog/di/transport/http/input.rb +77 -0
  401. data/lib/datadog/di/transport/http.rb +57 -0
  402. data/lib/datadog/di/transport/input.rb +70 -0
  403. data/lib/datadog/di/utils.rb +142 -0
  404. data/lib/datadog/di.rb +36 -0
  405. data/lib/datadog/error_tracking/collector.rb +87 -0
  406. data/lib/datadog/error_tracking/component.rb +167 -0
  407. data/lib/datadog/error_tracking/configuration/settings.rb +63 -0
  408. data/lib/datadog/error_tracking/configuration.rb +11 -0
  409. data/lib/datadog/error_tracking/ext.rb +18 -0
  410. data/lib/datadog/error_tracking/extensions.rb +16 -0
  411. data/lib/datadog/error_tracking/filters.rb +77 -0
  412. data/lib/datadog/error_tracking.rb +18 -0
  413. data/lib/datadog/kit/appsec/events/v2.rb +196 -0
  414. data/lib/datadog/kit/appsec/events.rb +180 -0
  415. data/lib/datadog/kit/enable_core_dumps.rb +49 -0
  416. data/lib/datadog/kit/identity.rb +114 -0
  417. data/lib/datadog/kit.rb +11 -0
  418. data/lib/datadog/opentelemetry/api/baggage.rb +90 -0
  419. data/lib/datadog/opentelemetry/api/baggage.rbs +26 -0
  420. data/lib/datadog/opentelemetry/api/context.rb +208 -0
  421. data/lib/datadog/opentelemetry/api/trace/span.rb +14 -0
  422. data/lib/datadog/opentelemetry/sdk/configurator.rb +37 -0
  423. data/lib/datadog/opentelemetry/sdk/id_generator.rb +26 -0
  424. data/lib/datadog/opentelemetry/sdk/propagator.rb +89 -0
  425. data/lib/datadog/opentelemetry/sdk/span_processor.rb +169 -0
  426. data/lib/datadog/opentelemetry/sdk/trace/span.rb +182 -0
  427. data/lib/datadog/opentelemetry/trace.rb +59 -0
  428. data/lib/datadog/opentelemetry.rb +52 -0
  429. data/lib/datadog/profiling/collectors/code_provenance.rb +150 -0
  430. data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +147 -0
  431. data/lib/datadog/profiling/collectors/dynamic_sampling_rate.rb +14 -0
  432. data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +69 -0
  433. data/lib/datadog/profiling/collectors/info.rb +156 -0
  434. data/lib/datadog/profiling/collectors/stack.rb +13 -0
  435. data/lib/datadog/profiling/collectors/thread_context.rb +102 -0
  436. data/lib/datadog/profiling/component.rb +445 -0
  437. data/lib/datadog/profiling/encoded_profile.rb +11 -0
  438. data/lib/datadog/profiling/exporter.rb +111 -0
  439. data/lib/datadog/profiling/ext/dir_monkey_patches.rb +410 -0
  440. data/lib/datadog/profiling/ext.rb +22 -0
  441. data/lib/datadog/profiling/flush.rb +40 -0
  442. data/lib/datadog/profiling/http_transport.rb +67 -0
  443. data/lib/datadog/profiling/load_native_extension.rb +9 -0
  444. data/lib/datadog/profiling/native_extension.rb +20 -0
  445. data/lib/datadog/profiling/preload.rb +5 -0
  446. data/lib/datadog/profiling/profiler.rb +70 -0
  447. data/lib/datadog/profiling/scheduler.rb +153 -0
  448. data/lib/datadog/profiling/sequence_tracker.rb +44 -0
  449. data/lib/datadog/profiling/stack_recorder.rb +104 -0
  450. data/lib/datadog/profiling/tag_builder.rb +59 -0
  451. data/lib/datadog/profiling/tasks/exec.rb +50 -0
  452. data/lib/datadog/profiling/tasks/help.rb +18 -0
  453. data/lib/datadog/profiling/tasks/setup.rb +43 -0
  454. data/lib/datadog/profiling.rb +167 -0
  455. data/lib/datadog/single_step_instrument.rb +21 -0
  456. data/lib/datadog/tracing/analytics.rb +25 -0
  457. data/lib/datadog/tracing/buffer.rb +129 -0
  458. data/lib/datadog/tracing/client_ip.rb +61 -0
  459. data/lib/datadog/tracing/component.rb +216 -0
  460. data/lib/datadog/tracing/configuration/dynamic/option.rb +71 -0
  461. data/lib/datadog/tracing/configuration/dynamic.rb +100 -0
  462. data/lib/datadog/tracing/configuration/ext.rb +118 -0
  463. data/lib/datadog/tracing/configuration/http.rb +74 -0
  464. data/lib/datadog/tracing/configuration/settings.rb +579 -0
  465. data/lib/datadog/tracing/context.rb +68 -0
  466. data/lib/datadog/tracing/context_provider.rb +82 -0
  467. data/lib/datadog/tracing/contrib/action_cable/configuration/settings.rb +39 -0
  468. data/lib/datadog/tracing/contrib/action_cable/event.rb +71 -0
  469. data/lib/datadog/tracing/contrib/action_cable/events/broadcast.rb +58 -0
  470. data/lib/datadog/tracing/contrib/action_cable/events/perform_action.rb +63 -0
  471. data/lib/datadog/tracing/contrib/action_cable/events/transmit.rb +59 -0
  472. data/lib/datadog/tracing/contrib/action_cable/events.rb +37 -0
  473. data/lib/datadog/tracing/contrib/action_cable/ext.rb +33 -0
  474. data/lib/datadog/tracing/contrib/action_cable/instrumentation.rb +86 -0
  475. data/lib/datadog/tracing/contrib/action_cable/integration.rb +53 -0
  476. data/lib/datadog/tracing/contrib/action_cable/patcher.rb +31 -0
  477. data/lib/datadog/tracing/contrib/action_mailer/configuration/settings.rb +43 -0
  478. data/lib/datadog/tracing/contrib/action_mailer/event.rb +50 -0
  479. data/lib/datadog/tracing/contrib/action_mailer/events/deliver.rb +65 -0
  480. data/lib/datadog/tracing/contrib/action_mailer/events/process.rb +48 -0
  481. data/lib/datadog/tracing/contrib/action_mailer/events.rb +34 -0
  482. data/lib/datadog/tracing/contrib/action_mailer/ext.rb +34 -0
  483. data/lib/datadog/tracing/contrib/action_mailer/integration.rb +54 -0
  484. data/lib/datadog/tracing/contrib/action_mailer/patcher.rb +29 -0
  485. data/lib/datadog/tracing/contrib/action_pack/action_controller/instrumentation.rb +158 -0
  486. data/lib/datadog/tracing/contrib/action_pack/action_controller/patcher.rb +29 -0
  487. data/lib/datadog/tracing/contrib/action_pack/action_dispatch/instrumentation.rb +85 -0
  488. data/lib/datadog/tracing/contrib/action_pack/action_dispatch/patcher.rb +33 -0
  489. data/lib/datadog/tracing/contrib/action_pack/configuration/settings.rb +40 -0
  490. data/lib/datadog/tracing/contrib/action_pack/ext.rb +25 -0
  491. data/lib/datadog/tracing/contrib/action_pack/integration.rb +54 -0
  492. data/lib/datadog/tracing/contrib/action_pack/patcher.rb +29 -0
  493. data/lib/datadog/tracing/contrib/action_pack/utils.rb +39 -0
  494. data/lib/datadog/tracing/contrib/action_view/configuration/settings.rb +43 -0
  495. data/lib/datadog/tracing/contrib/action_view/event.rb +35 -0
  496. data/lib/datadog/tracing/contrib/action_view/events/render_partial.rb +50 -0
  497. data/lib/datadog/tracing/contrib/action_view/events/render_template.rb +57 -0
  498. data/lib/datadog/tracing/contrib/action_view/events.rb +34 -0
  499. data/lib/datadog/tracing/contrib/action_view/ext.rb +25 -0
  500. data/lib/datadog/tracing/contrib/action_view/integration.rb +61 -0
  501. data/lib/datadog/tracing/contrib/action_view/patcher.rb +34 -0
  502. data/lib/datadog/tracing/contrib/action_view/utils.rb +36 -0
  503. data/lib/datadog/tracing/contrib/active_job/configuration/settings.rb +39 -0
  504. data/lib/datadog/tracing/contrib/active_job/event.rb +58 -0
  505. data/lib/datadog/tracing/contrib/active_job/events/discard.rb +50 -0
  506. data/lib/datadog/tracing/contrib/active_job/events/enqueue.rb +49 -0
  507. data/lib/datadog/tracing/contrib/active_job/events/enqueue_at.rb +49 -0
  508. data/lib/datadog/tracing/contrib/active_job/events/enqueue_retry.rb +51 -0
  509. data/lib/datadog/tracing/contrib/active_job/events/perform.rb +49 -0
  510. data/lib/datadog/tracing/contrib/active_job/events/retry_stopped.rb +50 -0
  511. data/lib/datadog/tracing/contrib/active_job/events.rb +42 -0
  512. data/lib/datadog/tracing/contrib/active_job/ext.rb +40 -0
  513. data/lib/datadog/tracing/contrib/active_job/integration.rb +53 -0
  514. data/lib/datadog/tracing/contrib/active_job/log_injection.rb +38 -0
  515. data/lib/datadog/tracing/contrib/active_job/patcher.rb +40 -0
  516. data/lib/datadog/tracing/contrib/active_model_serializers/configuration/settings.rb +37 -0
  517. data/lib/datadog/tracing/contrib/active_model_serializers/event.rb +68 -0
  518. data/lib/datadog/tracing/contrib/active_model_serializers/events/render.rb +45 -0
  519. data/lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb +47 -0
  520. data/lib/datadog/tracing/contrib/active_model_serializers/events.rb +34 -0
  521. data/lib/datadog/tracing/contrib/active_model_serializers/ext.rb +25 -0
  522. data/lib/datadog/tracing/contrib/active_model_serializers/integration.rb +44 -0
  523. data/lib/datadog/tracing/contrib/active_model_serializers/patcher.rb +32 -0
  524. data/lib/datadog/tracing/contrib/active_record/configuration/makara_resolver.rb +36 -0
  525. data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +152 -0
  526. data/lib/datadog/tracing/contrib/active_record/configuration/settings.rb +48 -0
  527. data/lib/datadog/tracing/contrib/active_record/event.rb +30 -0
  528. data/lib/datadog/tracing/contrib/active_record/events/instantiation.rb +60 -0
  529. data/lib/datadog/tracing/contrib/active_record/events/sql.rb +80 -0
  530. data/lib/datadog/tracing/contrib/active_record/events.rb +34 -0
  531. data/lib/datadog/tracing/contrib/active_record/ext.rb +30 -0
  532. data/lib/datadog/tracing/contrib/active_record/integration.rb +71 -0
  533. data/lib/datadog/tracing/contrib/active_record/patcher.rb +27 -0
  534. data/lib/datadog/tracing/contrib/active_record/utils.rb +128 -0
  535. data/lib/datadog/tracing/contrib/active_support/cache/event.rb +32 -0
  536. data/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb +171 -0
  537. data/lib/datadog/tracing/contrib/active_support/cache/events.rb +34 -0
  538. data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +225 -0
  539. data/lib/datadog/tracing/contrib/active_support/cache/patcher.rb +57 -0
  540. data/lib/datadog/tracing/contrib/active_support/cache/redis.rb +60 -0
  541. data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +70 -0
  542. data/lib/datadog/tracing/contrib/active_support/ext.rb +32 -0
  543. data/lib/datadog/tracing/contrib/active_support/integration.rb +55 -0
  544. data/lib/datadog/tracing/contrib/active_support/notifications/event.rb +95 -0
  545. data/lib/datadog/tracing/contrib/active_support/notifications/subscriber.rb +83 -0
  546. data/lib/datadog/tracing/contrib/active_support/notifications/subscription.rb +166 -0
  547. data/lib/datadog/tracing/contrib/active_support/patcher.rb +27 -0
  548. data/lib/datadog/tracing/contrib/analytics.rb +33 -0
  549. data/lib/datadog/tracing/contrib/auto_instrument.rb +53 -0
  550. data/lib/datadog/tracing/contrib/aws/configuration/settings.rb +53 -0
  551. data/lib/datadog/tracing/contrib/aws/ext.rb +50 -0
  552. data/lib/datadog/tracing/contrib/aws/instrumentation.rb +136 -0
  553. data/lib/datadog/tracing/contrib/aws/integration.rb +50 -0
  554. data/lib/datadog/tracing/contrib/aws/parsed_context.rb +70 -0
  555. data/lib/datadog/tracing/contrib/aws/patcher.rb +61 -0
  556. data/lib/datadog/tracing/contrib/aws/service/base.rb +17 -0
  557. data/lib/datadog/tracing/contrib/aws/service/dynamodb.rb +22 -0
  558. data/lib/datadog/tracing/contrib/aws/service/eventbridge.rb +22 -0
  559. data/lib/datadog/tracing/contrib/aws/service/kinesis.rb +32 -0
  560. data/lib/datadog/tracing/contrib/aws/service/s3.rb +22 -0
  561. data/lib/datadog/tracing/contrib/aws/service/sns.rb +30 -0
  562. data/lib/datadog/tracing/contrib/aws/service/sqs.rb +27 -0
  563. data/lib/datadog/tracing/contrib/aws/service/states.rb +40 -0
  564. data/lib/datadog/tracing/contrib/aws/services.rb +139 -0
  565. data/lib/datadog/tracing/contrib/cloudwise/propagation.rb +315 -0
  566. data/lib/datadog/tracing/contrib/component.rb +41 -0
  567. data/lib/datadog/tracing/contrib/concurrent_ruby/async_patch.rb +20 -0
  568. data/lib/datadog/tracing/contrib/concurrent_ruby/configuration/settings.rb +24 -0
  569. data/lib/datadog/tracing/contrib/concurrent_ruby/context_composite_executor_service.rb +53 -0
  570. data/lib/datadog/tracing/contrib/concurrent_ruby/ext.rb +16 -0
  571. data/lib/datadog/tracing/contrib/concurrent_ruby/future_patch.rb +20 -0
  572. data/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb +47 -0
  573. data/lib/datadog/tracing/contrib/concurrent_ruby/patcher.rb +49 -0
  574. data/lib/datadog/tracing/contrib/concurrent_ruby/promises_future_patch.rb +22 -0
  575. data/lib/datadog/tracing/contrib/configurable.rb +102 -0
  576. data/lib/datadog/tracing/contrib/configuration/resolver.rb +128 -0
  577. data/lib/datadog/tracing/contrib/configuration/resolvers/pattern_resolver.rb +43 -0
  578. data/lib/datadog/tracing/contrib/configuration/settings.rb +43 -0
  579. data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +58 -0
  580. data/lib/datadog/tracing/contrib/dalli/ext.rb +41 -0
  581. data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +75 -0
  582. data/lib/datadog/tracing/contrib/dalli/integration.rb +52 -0
  583. data/lib/datadog/tracing/contrib/dalli/patcher.rb +28 -0
  584. data/lib/datadog/tracing/contrib/dalli/quantize.rb +26 -0
  585. data/lib/datadog/tracing/contrib/delayed_job/configuration/settings.rb +49 -0
  586. data/lib/datadog/tracing/contrib/delayed_job/ext.rb +29 -0
  587. data/lib/datadog/tracing/contrib/delayed_job/integration.rb +43 -0
  588. data/lib/datadog/tracing/contrib/delayed_job/patcher.rb +37 -0
  589. data/lib/datadog/tracing/contrib/delayed_job/plugin.rb +108 -0
  590. data/lib/datadog/tracing/contrib/delayed_job/server_internal_tracer/worker.rb +34 -0
  591. data/lib/datadog/tracing/contrib/elasticsearch/configuration/settings.rb +61 -0
  592. data/lib/datadog/tracing/contrib/elasticsearch/ext.rb +35 -0
  593. data/lib/datadog/tracing/contrib/elasticsearch/integration.rb +50 -0
  594. data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +172 -0
  595. data/lib/datadog/tracing/contrib/elasticsearch/quantize.rb +87 -0
  596. data/lib/datadog/tracing/contrib/ethon/configuration/settings.rb +56 -0
  597. data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +229 -0
  598. data/lib/datadog/tracing/contrib/ethon/ext.rb +33 -0
  599. data/lib/datadog/tracing/contrib/ethon/integration.rb +48 -0
  600. data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +102 -0
  601. data/lib/datadog/tracing/contrib/ethon/patcher.rb +30 -0
  602. data/lib/datadog/tracing/contrib/excon/configuration/settings.rb +82 -0
  603. data/lib/datadog/tracing/contrib/excon/ext.rb +31 -0
  604. data/lib/datadog/tracing/contrib/excon/integration.rb +48 -0
  605. data/lib/datadog/tracing/contrib/excon/middleware.rb +201 -0
  606. data/lib/datadog/tracing/contrib/excon/patcher.rb +31 -0
  607. data/lib/datadog/tracing/contrib/ext.rb +70 -0
  608. data/lib/datadog/tracing/contrib/extensions.rb +255 -0
  609. data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +81 -0
  610. data/lib/datadog/tracing/contrib/faraday/connection.rb +22 -0
  611. data/lib/datadog/tracing/contrib/faraday/ext.rb +31 -0
  612. data/lib/datadog/tracing/contrib/faraday/integration.rb +48 -0
  613. data/lib/datadog/tracing/contrib/faraday/middleware.rb +128 -0
  614. data/lib/datadog/tracing/contrib/faraday/patcher.rb +56 -0
  615. data/lib/datadog/tracing/contrib/faraday/rack_builder.rb +22 -0
  616. data/lib/datadog/tracing/contrib/grape/configuration/settings.rb +59 -0
  617. data/lib/datadog/tracing/contrib/grape/endpoint.rb +316 -0
  618. data/lib/datadog/tracing/contrib/grape/ext.rb +30 -0
  619. data/lib/datadog/tracing/contrib/grape/instrumentation.rb +37 -0
  620. data/lib/datadog/tracing/contrib/grape/integration.rb +44 -0
  621. data/lib/datadog/tracing/contrib/grape/patcher.rb +33 -0
  622. data/lib/datadog/tracing/contrib/graphql/configuration/error_extension_env_parser.rb +21 -0
  623. data/lib/datadog/tracing/contrib/graphql/configuration/settings.rb +73 -0
  624. data/lib/datadog/tracing/contrib/graphql/ext.rb +26 -0
  625. data/lib/datadog/tracing/contrib/graphql/integration.rb +56 -0
  626. data/lib/datadog/tracing/contrib/graphql/patcher.rb +58 -0
  627. data/lib/datadog/tracing/contrib/graphql/trace_patcher.rb +24 -0
  628. data/lib/datadog/tracing/contrib/graphql/tracing_patcher.rb +28 -0
  629. data/lib/datadog/tracing/contrib/graphql/unified_trace.rb +297 -0
  630. data/lib/datadog/tracing/contrib/graphql/unified_trace_patcher.rb +31 -0
  631. data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +58 -0
  632. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +123 -0
  633. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +96 -0
  634. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb +107 -0
  635. data/lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb +26 -0
  636. data/lib/datadog/tracing/contrib/grpc/distributed/propagation.rb +49 -0
  637. data/lib/datadog/tracing/contrib/grpc/ext.rb +29 -0
  638. data/lib/datadog/tracing/contrib/grpc/formatting.rb +127 -0
  639. data/lib/datadog/tracing/contrib/grpc/integration.rb +50 -0
  640. data/lib/datadog/tracing/contrib/grpc/intercept_with_datadog.rb +53 -0
  641. data/lib/datadog/tracing/contrib/grpc/patcher.rb +34 -0
  642. data/lib/datadog/tracing/contrib/grpc.rb +45 -0
  643. data/lib/datadog/tracing/contrib/hanami/action_tracer.rb +47 -0
  644. data/lib/datadog/tracing/contrib/hanami/configuration/settings.rb +23 -0
  645. data/lib/datadog/tracing/contrib/hanami/ext.rb +24 -0
  646. data/lib/datadog/tracing/contrib/hanami/integration.rb +44 -0
  647. data/lib/datadog/tracing/contrib/hanami/patcher.rb +33 -0
  648. data/lib/datadog/tracing/contrib/hanami/plugin.rb +23 -0
  649. data/lib/datadog/tracing/contrib/hanami/renderer_policy_tracing.rb +41 -0
  650. data/lib/datadog/tracing/contrib/hanami/router_tracing.rb +42 -0
  651. data/lib/datadog/tracing/contrib/http/circuit_breaker.rb +34 -0
  652. data/lib/datadog/tracing/contrib/http/configuration/settings.rb +77 -0
  653. data/lib/datadog/tracing/contrib/http/distributed/fetcher.rb +38 -0
  654. data/lib/datadog/tracing/contrib/http/distributed/propagation.rb +48 -0
  655. data/lib/datadog/tracing/contrib/http/ext.rb +30 -0
  656. data/lib/datadog/tracing/contrib/http/instrumentation.rb +152 -0
  657. data/lib/datadog/tracing/contrib/http/integration.rb +52 -0
  658. data/lib/datadog/tracing/contrib/http/patcher.rb +30 -0
  659. data/lib/datadog/tracing/contrib/http.rb +45 -0
  660. data/lib/datadog/tracing/contrib/http_annotation_helper.rb +17 -0
  661. data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +76 -0
  662. data/lib/datadog/tracing/contrib/httpclient/ext.rb +31 -0
  663. data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +132 -0
  664. data/lib/datadog/tracing/contrib/httpclient/integration.rb +48 -0
  665. data/lib/datadog/tracing/contrib/httpclient/patcher.rb +29 -0
  666. data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +76 -0
  667. data/lib/datadog/tracing/contrib/httprb/ext.rb +30 -0
  668. data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +146 -0
  669. data/lib/datadog/tracing/contrib/httprb/integration.rb +51 -0
  670. data/lib/datadog/tracing/contrib/httprb/patcher.rb +29 -0
  671. data/lib/datadog/tracing/contrib/integration.rb +78 -0
  672. data/lib/datadog/tracing/contrib/kafka/configuration/settings.rb +39 -0
  673. data/lib/datadog/tracing/contrib/kafka/consumer_event.rb +19 -0
  674. data/lib/datadog/tracing/contrib/kafka/consumer_group_event.rb +18 -0
  675. data/lib/datadog/tracing/contrib/kafka/event.rb +53 -0
  676. data/lib/datadog/tracing/contrib/kafka/events/connection/request.rb +42 -0
  677. data/lib/datadog/tracing/contrib/kafka/events/consumer/process_batch.rb +49 -0
  678. data/lib/datadog/tracing/contrib/kafka/events/consumer/process_message.rb +47 -0
  679. data/lib/datadog/tracing/contrib/kafka/events/consumer_group/heartbeat.rb +47 -0
  680. data/lib/datadog/tracing/contrib/kafka/events/consumer_group/join_group.rb +37 -0
  681. data/lib/datadog/tracing/contrib/kafka/events/consumer_group/leave_group.rb +37 -0
  682. data/lib/datadog/tracing/contrib/kafka/events/consumer_group/sync_group.rb +37 -0
  683. data/lib/datadog/tracing/contrib/kafka/events/produce_operation/send_messages.rb +41 -0
  684. data/lib/datadog/tracing/contrib/kafka/events/producer/deliver_messages.rb +44 -0
  685. data/lib/datadog/tracing/contrib/kafka/events.rb +48 -0
  686. data/lib/datadog/tracing/contrib/kafka/ext.rb +55 -0
  687. data/lib/datadog/tracing/contrib/kafka/instrumentation/consumer.rb +66 -0
  688. data/lib/datadog/tracing/contrib/kafka/instrumentation/producer.rb +66 -0
  689. data/lib/datadog/tracing/contrib/kafka/integration.rb +47 -0
  690. data/lib/datadog/tracing/contrib/kafka/patcher.rb +43 -0
  691. data/lib/datadog/tracing/contrib/karafka/configuration/settings.rb +27 -0
  692. data/lib/datadog/tracing/contrib/karafka/distributed/propagation.rb +48 -0
  693. data/lib/datadog/tracing/contrib/karafka/ext.rb +27 -0
  694. data/lib/datadog/tracing/contrib/karafka/integration.rb +45 -0
  695. data/lib/datadog/tracing/contrib/karafka/monitor.rb +77 -0
  696. data/lib/datadog/tracing/contrib/karafka/patcher.rb +89 -0
  697. data/lib/datadog/tracing/contrib/karafka.rb +37 -0
  698. data/lib/datadog/tracing/contrib/lograge/configuration/settings.rb +24 -0
  699. data/lib/datadog/tracing/contrib/lograge/ext.rb +15 -0
  700. data/lib/datadog/tracing/contrib/lograge/instrumentation.rb +31 -0
  701. data/lib/datadog/tracing/contrib/lograge/integration.rb +50 -0
  702. data/lib/datadog/tracing/contrib/lograge/patcher.rb +46 -0
  703. data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +64 -0
  704. data/lib/datadog/tracing/contrib/mongodb/ext.rb +39 -0
  705. data/lib/datadog/tracing/contrib/mongodb/instrumentation.rb +47 -0
  706. data/lib/datadog/tracing/contrib/mongodb/integration.rb +51 -0
  707. data/lib/datadog/tracing/contrib/mongodb/parsers.rb +49 -0
  708. data/lib/datadog/tracing/contrib/mongodb/patcher.rb +34 -0
  709. data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +160 -0
  710. data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +69 -0
  711. data/lib/datadog/tracing/contrib/mysql2/ext.rb +28 -0
  712. data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +109 -0
  713. data/lib/datadog/tracing/contrib/mysql2/integration.rb +43 -0
  714. data/lib/datadog/tracing/contrib/mysql2/patcher.rb +31 -0
  715. data/lib/datadog/tracing/contrib/opensearch/configuration/settings.rb +71 -0
  716. data/lib/datadog/tracing/contrib/opensearch/ext.rb +48 -0
  717. data/lib/datadog/tracing/contrib/opensearch/integration.rb +46 -0
  718. data/lib/datadog/tracing/contrib/opensearch/patcher.rb +144 -0
  719. data/lib/datadog/tracing/contrib/opensearch/quantize.rb +81 -0
  720. data/lib/datadog/tracing/contrib/patchable.rb +109 -0
  721. data/lib/datadog/tracing/contrib/patcher.rb +87 -0
  722. data/lib/datadog/tracing/contrib/pg/configuration/settings.rb +69 -0
  723. data/lib/datadog/tracing/contrib/pg/ext.rb +35 -0
  724. data/lib/datadog/tracing/contrib/pg/instrumentation.rb +214 -0
  725. data/lib/datadog/tracing/contrib/pg/integration.rb +43 -0
  726. data/lib/datadog/tracing/contrib/pg/patcher.rb +31 -0
  727. data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +52 -0
  728. data/lib/datadog/tracing/contrib/presto/ext.rb +38 -0
  729. data/lib/datadog/tracing/contrib/presto/instrumentation.rb +138 -0
  730. data/lib/datadog/tracing/contrib/presto/integration.rb +46 -0
  731. data/lib/datadog/tracing/contrib/presto/patcher.rb +25 -0
  732. data/lib/datadog/tracing/contrib/propagation/sql_comment/comment.rb +41 -0
  733. data/lib/datadog/tracing/contrib/propagation/sql_comment/ext.rb +61 -0
  734. data/lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb +32 -0
  735. data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +67 -0
  736. data/lib/datadog/tracing/contrib/que/configuration/settings.rb +55 -0
  737. data/lib/datadog/tracing/contrib/que/ext.rb +33 -0
  738. data/lib/datadog/tracing/contrib/que/integration.rb +44 -0
  739. data/lib/datadog/tracing/contrib/que/patcher.rb +26 -0
  740. data/lib/datadog/tracing/contrib/que/tracer.rb +63 -0
  741. data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +47 -0
  742. data/lib/datadog/tracing/contrib/racecar/event.rb +81 -0
  743. data/lib/datadog/tracing/contrib/racecar/events/batch.rb +38 -0
  744. data/lib/datadog/tracing/contrib/racecar/events/consume.rb +35 -0
  745. data/lib/datadog/tracing/contrib/racecar/events/message.rb +38 -0
  746. data/lib/datadog/tracing/contrib/racecar/events.rb +36 -0
  747. data/lib/datadog/tracing/contrib/racecar/ext.rb +33 -0
  748. data/lib/datadog/tracing/contrib/racecar/integration.rb +44 -0
  749. data/lib/datadog/tracing/contrib/racecar/patcher.rb +29 -0
  750. data/lib/datadog/tracing/contrib/rack/configuration/settings.rb +59 -0
  751. data/lib/datadog/tracing/contrib/rack/ext.rb +30 -0
  752. data/lib/datadog/tracing/contrib/rack/header_collection.rb +50 -0
  753. data/lib/datadog/tracing/contrib/rack/header_tagging.rb +63 -0
  754. data/lib/datadog/tracing/contrib/rack/integration.rb +50 -0
  755. data/lib/datadog/tracing/contrib/rack/middlewares.rb +475 -0
  756. data/lib/datadog/tracing/contrib/rack/patcher.rb +119 -0
  757. data/lib/datadog/tracing/contrib/rack/request_queue.rb +49 -0
  758. data/lib/datadog/tracing/contrib/rack/route_inference.rb +53 -0
  759. data/lib/datadog/tracing/contrib/rack/trace_proxy_middleware.rb +58 -0
  760. data/lib/datadog/tracing/contrib/rails/auto_instrument_railtie.rb +10 -0
  761. data/lib/datadog/tracing/contrib/rails/configuration/settings.rb +76 -0
  762. data/lib/datadog/tracing/contrib/rails/ext.rb +33 -0
  763. data/lib/datadog/tracing/contrib/rails/framework.rb +148 -0
  764. data/lib/datadog/tracing/contrib/rails/integration.rb +52 -0
  765. data/lib/datadog/tracing/contrib/rails/log_injection.rb +29 -0
  766. data/lib/datadog/tracing/contrib/rails/middlewares.rb +46 -0
  767. data/lib/datadog/tracing/contrib/rails/patcher.rb +98 -0
  768. data/lib/datadog/tracing/contrib/rails/railtie.rb +19 -0
  769. data/lib/datadog/tracing/contrib/rails/runner.rb +117 -0
  770. data/lib/datadog/tracing/contrib/rake/configuration/settings.rb +55 -0
  771. data/lib/datadog/tracing/contrib/rake/ext.rb +27 -0
  772. data/lib/datadog/tracing/contrib/rake/instrumentation.rb +103 -0
  773. data/lib/datadog/tracing/contrib/rake/integration.rb +43 -0
  774. data/lib/datadog/tracing/contrib/rake/patcher.rb +33 -0
  775. data/lib/datadog/tracing/contrib/redis/configuration/resolver.rb +49 -0
  776. data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +57 -0
  777. data/lib/datadog/tracing/contrib/redis/ext.rb +36 -0
  778. data/lib/datadog/tracing/contrib/redis/instrumentation.rb +53 -0
  779. data/lib/datadog/tracing/contrib/redis/integration.rb +80 -0
  780. data/lib/datadog/tracing/contrib/redis/patcher.rb +92 -0
  781. data/lib/datadog/tracing/contrib/redis/quantize.rb +80 -0
  782. data/lib/datadog/tracing/contrib/redis/tags.rb +72 -0
  783. data/lib/datadog/tracing/contrib/redis/trace_middleware.rb +85 -0
  784. data/lib/datadog/tracing/contrib/redis/vendor/LICENSE +20 -0
  785. data/lib/datadog/tracing/contrib/redis/vendor/resolver.rb +160 -0
  786. data/lib/datadog/tracing/contrib/registerable.rb +50 -0
  787. data/lib/datadog/tracing/contrib/registry.rb +52 -0
  788. data/lib/datadog/tracing/contrib/resque/configuration/settings.rb +42 -0
  789. data/lib/datadog/tracing/contrib/resque/ext.rb +22 -0
  790. data/lib/datadog/tracing/contrib/resque/integration.rb +48 -0
  791. data/lib/datadog/tracing/contrib/resque/patcher.rb +29 -0
  792. data/lib/datadog/tracing/contrib/resque/resque_job.rb +106 -0
  793. data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +55 -0
  794. data/lib/datadog/tracing/contrib/rest_client/ext.rb +29 -0
  795. data/lib/datadog/tracing/contrib/rest_client/integration.rb +46 -0
  796. data/lib/datadog/tracing/contrib/rest_client/patcher.rb +28 -0
  797. data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +137 -0
  798. data/lib/datadog/tracing/contrib/roda/configuration/settings.rb +38 -0
  799. data/lib/datadog/tracing/contrib/roda/ext.rb +19 -0
  800. data/lib/datadog/tracing/contrib/roda/instrumentation.rb +78 -0
  801. data/lib/datadog/tracing/contrib/roda/integration.rb +45 -0
  802. data/lib/datadog/tracing/contrib/roda/patcher.rb +30 -0
  803. data/lib/datadog/tracing/contrib/semantic_logger/configuration/settings.rb +24 -0
  804. data/lib/datadog/tracing/contrib/semantic_logger/ext.rb +15 -0
  805. data/lib/datadog/tracing/contrib/semantic_logger/instrumentation.rb +35 -0
  806. data/lib/datadog/tracing/contrib/semantic_logger/integration.rb +52 -0
  807. data/lib/datadog/tracing/contrib/semantic_logger/patcher.rb +29 -0
  808. data/lib/datadog/tracing/contrib/sequel/configuration/settings.rb +37 -0
  809. data/lib/datadog/tracing/contrib/sequel/database.rb +62 -0
  810. data/lib/datadog/tracing/contrib/sequel/dataset.rb +67 -0
  811. data/lib/datadog/tracing/contrib/sequel/ext.rb +23 -0
  812. data/lib/datadog/tracing/contrib/sequel/integration.rb +43 -0
  813. data/lib/datadog/tracing/contrib/sequel/patcher.rb +37 -0
  814. data/lib/datadog/tracing/contrib/sequel/utils.rb +90 -0
  815. data/lib/datadog/tracing/contrib/shoryuken/configuration/settings.rb +43 -0
  816. data/lib/datadog/tracing/contrib/shoryuken/ext.rb +27 -0
  817. data/lib/datadog/tracing/contrib/shoryuken/integration.rb +44 -0
  818. data/lib/datadog/tracing/contrib/shoryuken/patcher.rb +28 -0
  819. data/lib/datadog/tracing/contrib/shoryuken/tracer.rb +65 -0
  820. data/lib/datadog/tracing/contrib/sidekiq/client_tracer.rb +67 -0
  821. data/lib/datadog/tracing/contrib/sidekiq/configuration/settings.rb +47 -0
  822. data/lib/datadog/tracing/contrib/sidekiq/distributed/propagation.rb +49 -0
  823. data/lib/datadog/tracing/contrib/sidekiq/ext.rb +45 -0
  824. data/lib/datadog/tracing/contrib/sidekiq/integration.rb +61 -0
  825. data/lib/datadog/tracing/contrib/sidekiq/patcher.rb +90 -0
  826. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/heartbeat.rb +61 -0
  827. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch.rb +36 -0
  828. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/redis_info.rb +34 -0
  829. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_poller.rb +57 -0
  830. data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/stop.rb +34 -0
  831. data/lib/datadog/tracing/contrib/sidekiq/server_tracer.rb +91 -0
  832. data/lib/datadog/tracing/contrib/sidekiq/utils.rb +44 -0
  833. data/lib/datadog/tracing/contrib/sidekiq.rb +37 -0
  834. data/lib/datadog/tracing/contrib/sinatra/configuration/settings.rb +46 -0
  835. data/lib/datadog/tracing/contrib/sinatra/env.rb +38 -0
  836. data/lib/datadog/tracing/contrib/sinatra/ext.rb +31 -0
  837. data/lib/datadog/tracing/contrib/sinatra/framework.rb +116 -0
  838. data/lib/datadog/tracing/contrib/sinatra/integration.rb +43 -0
  839. data/lib/datadog/tracing/contrib/sinatra/patcher.rb +75 -0
  840. data/lib/datadog/tracing/contrib/sinatra/tracer.rb +90 -0
  841. data/lib/datadog/tracing/contrib/sinatra/tracer_middleware.rb +109 -0
  842. data/lib/datadog/tracing/contrib/sneakers/configuration/settings.rb +43 -0
  843. data/lib/datadog/tracing/contrib/sneakers/ext.rb +27 -0
  844. data/lib/datadog/tracing/contrib/sneakers/integration.rb +44 -0
  845. data/lib/datadog/tracing/contrib/sneakers/patcher.rb +27 -0
  846. data/lib/datadog/tracing/contrib/sneakers/tracer.rb +60 -0
  847. data/lib/datadog/tracing/contrib/span_attribute_schema.rb +97 -0
  848. data/lib/datadog/tracing/contrib/status_range_env_parser.rb +33 -0
  849. data/lib/datadog/tracing/contrib/status_range_matcher.rb +32 -0
  850. data/lib/datadog/tracing/contrib/stripe/configuration/settings.rb +37 -0
  851. data/lib/datadog/tracing/contrib/stripe/ext.rb +27 -0
  852. data/lib/datadog/tracing/contrib/stripe/integration.rb +43 -0
  853. data/lib/datadog/tracing/contrib/stripe/patcher.rb +28 -0
  854. data/lib/datadog/tracing/contrib/stripe/request.rb +68 -0
  855. data/lib/datadog/tracing/contrib/sucker_punch/configuration/settings.rb +39 -0
  856. data/lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb +28 -0
  857. data/lib/datadog/tracing/contrib/sucker_punch/ext.rb +28 -0
  858. data/lib/datadog/tracing/contrib/sucker_punch/instrumentation.rb +104 -0
  859. data/lib/datadog/tracing/contrib/sucker_punch/integration.rb +43 -0
  860. data/lib/datadog/tracing/contrib/sucker_punch/patcher.rb +35 -0
  861. data/lib/datadog/tracing/contrib/support.rb +28 -0
  862. data/lib/datadog/tracing/contrib/trilogy/configuration/settings.rb +63 -0
  863. data/lib/datadog/tracing/contrib/trilogy/ext.rb +27 -0
  864. data/lib/datadog/tracing/contrib/trilogy/instrumentation.rb +97 -0
  865. data/lib/datadog/tracing/contrib/trilogy/integration.rb +43 -0
  866. data/lib/datadog/tracing/contrib/trilogy/patcher.rb +31 -0
  867. data/lib/datadog/tracing/contrib/utils/database.rb +31 -0
  868. data/lib/datadog/tracing/contrib/utils/quantization/hash.rb +111 -0
  869. data/lib/datadog/tracing/contrib/utils/quantization/http.rb +179 -0
  870. data/lib/datadog/tracing/contrib.rb +82 -0
  871. data/lib/datadog/tracing/correlation.rb +113 -0
  872. data/lib/datadog/tracing/diagnostics/environment_logger.rb +163 -0
  873. data/lib/datadog/tracing/diagnostics/ext.rb +36 -0
  874. data/lib/datadog/tracing/diagnostics/health.rb +40 -0
  875. data/lib/datadog/tracing/distributed/b3_multi.rb +73 -0
  876. data/lib/datadog/tracing/distributed/b3_single.rb +71 -0
  877. data/lib/datadog/tracing/distributed/baggage.rb +196 -0
  878. data/lib/datadog/tracing/distributed/datadog.rb +201 -0
  879. data/lib/datadog/tracing/distributed/datadog_tags_codec.rb +82 -0
  880. data/lib/datadog/tracing/distributed/fetcher.rb +21 -0
  881. data/lib/datadog/tracing/distributed/helpers.rb +65 -0
  882. data/lib/datadog/tracing/distributed/none.rb +20 -0
  883. data/lib/datadog/tracing/distributed/propagation.rb +187 -0
  884. data/lib/datadog/tracing/distributed/propagation_policy.rb +42 -0
  885. data/lib/datadog/tracing/distributed/trace_context.rb +444 -0
  886. data/lib/datadog/tracing/event.rb +74 -0
  887. data/lib/datadog/tracing/flush.rb +96 -0
  888. data/lib/datadog/tracing/metadata/analytics.rb +26 -0
  889. data/lib/datadog/tracing/metadata/errors.rb +32 -0
  890. data/lib/datadog/tracing/metadata/ext.rb +213 -0
  891. data/lib/datadog/tracing/metadata/metastruct.rb +36 -0
  892. data/lib/datadog/tracing/metadata/metastruct_tagging.rb +42 -0
  893. data/lib/datadog/tracing/metadata/tagging.rb +131 -0
  894. data/lib/datadog/tracing/metadata.rb +22 -0
  895. data/lib/datadog/tracing/pipeline/span_filter.rb +48 -0
  896. data/lib/datadog/tracing/pipeline/span_processor.rb +41 -0
  897. data/lib/datadog/tracing/pipeline.rb +63 -0
  898. data/lib/datadog/tracing/remote.rb +85 -0
  899. data/lib/datadog/tracing/runtime/metrics.rb +17 -0
  900. data/lib/datadog/tracing/sampling/all_sampler.rb +24 -0
  901. data/lib/datadog/tracing/sampling/ext.rb +58 -0
  902. data/lib/datadog/tracing/sampling/matcher.rb +119 -0
  903. data/lib/datadog/tracing/sampling/priority_sampler.rb +160 -0
  904. data/lib/datadog/tracing/sampling/rate_by_key_sampler.rb +87 -0
  905. data/lib/datadog/tracing/sampling/rate_by_service_sampler.rb +63 -0
  906. data/lib/datadog/tracing/sampling/rate_sampler.rb +59 -0
  907. data/lib/datadog/tracing/sampling/rule.rb +86 -0
  908. data/lib/datadog/tracing/sampling/rule_sampler.rb +172 -0
  909. data/lib/datadog/tracing/sampling/sampler.rb +32 -0
  910. data/lib/datadog/tracing/sampling/span/ext.rb +25 -0
  911. data/lib/datadog/tracing/sampling/span/matcher.rb +61 -0
  912. data/lib/datadog/tracing/sampling/span/rule.rb +77 -0
  913. data/lib/datadog/tracing/sampling/span/rule_parser.rb +104 -0
  914. data/lib/datadog/tracing/sampling/span/sampler.rb +70 -0
  915. data/lib/datadog/tracing/span.rb +236 -0
  916. data/lib/datadog/tracing/span_event.rb +161 -0
  917. data/lib/datadog/tracing/span_link.rb +92 -0
  918. data/lib/datadog/tracing/span_operation.rb +561 -0
  919. data/lib/datadog/tracing/sync_writer.rb +71 -0
  920. data/lib/datadog/tracing/trace_digest.rb +190 -0
  921. data/lib/datadog/tracing/trace_operation.rb +556 -0
  922. data/lib/datadog/tracing/trace_segment.rb +227 -0
  923. data/lib/datadog/tracing/tracer.rb +644 -0
  924. data/lib/datadog/tracing/transport/http/api.rb +44 -0
  925. data/lib/datadog/tracing/transport/http/client.rb +59 -0
  926. data/lib/datadog/tracing/transport/http/statistics.rb +47 -0
  927. data/lib/datadog/tracing/transport/http/traces.rb +155 -0
  928. data/lib/datadog/tracing/transport/http.rb +44 -0
  929. data/lib/datadog/tracing/transport/io/client.rb +90 -0
  930. data/lib/datadog/tracing/transport/io/response.rb +27 -0
  931. data/lib/datadog/tracing/transport/io/traces.rb +101 -0
  932. data/lib/datadog/tracing/transport/io.rb +30 -0
  933. data/lib/datadog/tracing/transport/serializable_trace.rb +155 -0
  934. data/lib/datadog/tracing/transport/statistics.rb +77 -0
  935. data/lib/datadog/tracing/transport/trace_formatter.rb +276 -0
  936. data/lib/datadog/tracing/transport/traces.rb +258 -0
  937. data/lib/datadog/tracing/utils.rb +99 -0
  938. data/lib/datadog/tracing/workers/trace_writer.rb +199 -0
  939. data/lib/datadog/tracing/workers.rb +126 -0
  940. data/lib/datadog/tracing/writer.rb +190 -0
  941. data/lib/datadog/tracing.rb +214 -0
  942. data/lib/datadog/version.rb +27 -0
  943. data/lib/datadog.rb +20 -0
  944. metadata +1074 -0
@@ -0,0 +1,3066 @@
1
+ {
2
+ "version": "2.2",
3
+ "metadata": {
4
+ "rules_version": "1.15.1"
5
+ },
6
+ "rules": [
7
+ {
8
+ "id": "crs-913-100",
9
+ "name": "Found User-Agent associated with security scanner",
10
+ "tags": {
11
+ "type": "security_scanner",
12
+ "crs_id": "913100",
13
+ "category": "attack_attempt",
14
+ "module": "waf"
15
+ },
16
+ "conditions": [
17
+ {
18
+ "parameters": {
19
+ "inputs": [
20
+ {
21
+ "address": "server.request.headers.no_cookies",
22
+ "key_path": [
23
+ "user-agent"
24
+ ]
25
+ }
26
+ ],
27
+ "list": [
28
+ "(hydra)",
29
+ "absinthe",
30
+ "autogetcontent",
31
+ "bilbo",
32
+ "bfac",
33
+ "cisco-torch",
34
+ "core-project/1.0",
35
+ "crimscanner/",
36
+ "datacha0s",
37
+ "domino hunter",
38
+ "dotdotpwn",
39
+ "email extractor",
40
+ "fhscan core 1.",
41
+ "floodgate",
42
+ "f-secure radar",
43
+ "get-minimal",
44
+ "gootkit auto-rooter scanner",
45
+ "grabber",
46
+ "grendel-scan",
47
+ "inspath",
48
+ "internet ninja",
49
+ "masscan",
50
+ "morfeus fucking scanner",
51
+ "mysqloit",
52
+ "prog.customcrawler",
53
+ "qqgamehall",
54
+ "s.t.a.l.k.e.r.",
55
+ "springenwerk",
56
+ "sql power injector",
57
+ "struts-pwn",
58
+ "sysscan",
59
+ "tbi-webscanner",
60
+ "teh forest lobster",
61
+ "toata dragostea",
62
+ "uil2pn",
63
+ "user-agent:",
64
+ "vega/",
65
+ "voideye",
66
+ "webbandit",
67
+ "webshag",
68
+ "webvulnscan",
69
+ "whatweb",
70
+ "whcc/",
71
+ "wordpress hash grabber",
72
+ "xmlrpc exploit"
73
+ ]
74
+ },
75
+ "operator": "phrase_match"
76
+ }
77
+ ],
78
+ "transformers": [
79
+ "lowercase"
80
+ ]
81
+ },
82
+ {
83
+ "id": "crs-921-120",
84
+ "name": "HTTP Response Splitting Attack",
85
+ "tags": {
86
+ "type": "http_protocol_violation",
87
+ "crs_id": "921120",
88
+ "category": "attack_attempt",
89
+ "module": "waf"
90
+ },
91
+ "conditions": [
92
+ {
93
+ "parameters": {
94
+ "inputs": [
95
+ {
96
+ "address": "server.request.query"
97
+ },
98
+ {
99
+ "address": "server.request.body"
100
+ },
101
+ {
102
+ "address": "server.request.path_params"
103
+ },
104
+ {
105
+ "address": "graphql.server.all_resolvers"
106
+ },
107
+ {
108
+ "address": "graphql.server.resolver"
109
+ }
110
+ ],
111
+ "regex": "[\\r\\n]\\W*?(?:content-(?:type|length)|set-cookie|location):\\s*\\w",
112
+ "options": {
113
+ "case_sensitive": true,
114
+ "min_length": 11
115
+ }
116
+ },
117
+ "operator": "match_regex"
118
+ }
119
+ ],
120
+ "transformers": [
121
+ "lowercase"
122
+ ]
123
+ },
124
+ {
125
+ "id": "crs-921-140",
126
+ "name": "HTTP Header Injection Attack via headers",
127
+ "tags": {
128
+ "type": "http_protocol_violation",
129
+ "crs_id": "921140",
130
+ "category": "attack_attempt",
131
+ "capec": "1000/210/272/220/273",
132
+ "cwe": "113",
133
+ "module": "waf"
134
+ },
135
+ "conditions": [
136
+ {
137
+ "parameters": {
138
+ "inputs": [
139
+ {
140
+ "address": "server.request.headers.no_cookies"
141
+ }
142
+ ],
143
+ "regex": "[\\n\\r]",
144
+ "options": {
145
+ "case_sensitive": true,
146
+ "min_length": 1
147
+ }
148
+ },
149
+ "operator": "match_regex"
150
+ }
151
+ ],
152
+ "transformers": []
153
+ },
154
+ {
155
+ "id": "crs-932-100",
156
+ "name": "Remote Command Execution: Unix Command Injection",
157
+ "tags": {
158
+ "type": "command_injection",
159
+ "crs_id": "932100",
160
+ "category": "attack_attempt",
161
+ "module": "waf"
162
+ },
163
+ "conditions": [
164
+ {
165
+ "parameters": {
166
+ "inputs": [
167
+ {
168
+ "address": "server.request.query"
169
+ },
170
+ {
171
+ "address": "server.request.body"
172
+ },
173
+ {
174
+ "address": "server.request.path_params"
175
+ },
176
+ {
177
+ "address": "graphql.server.all_resolvers"
178
+ },
179
+ {
180
+ "address": "graphql.server.resolver"
181
+ }
182
+ ],
183
+ "regex": "(?:[;\\n\\r`]|\\$(?:\\(?\\(|{)|(?:\\|)?\\||\\(\\s*\\)|[<>]\\(|&?&|\\{)\\s*(?:(?:\\w+=(?:[^\\s]*|\\$.*|\\$.*|<.*|>.*|\\'.*\\'|\\\".*\\\")\\s+|(?:\\s*\\(|!)\\s*|\\{|\\$))*\\s*(?:['\\\"])*(?:[\\?\\*\\[\\]\\(\\)\\-\\|+\\w'\\\"\\./\\x5c]+/)?[\\x5c'\\\"]*(?:l[\\x5c'\\\"]*(?:w[\\x5c'\\\"]*p[\\x5c'\\\"]*-[\\x5c'\\\"]*(?:d[\\x5c'\\\"]*(?:o[\\x5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\s|<|>).*)|a[\\x5c'\\\"]*v[\\x5c'\\\"]*a[\\x5c'\\\"]*(?:\\s|<|>).*|e[\\x5c'\\\"]*x[\\x5c'\\\"]*e[\\x5c'\\\"]*c)|k[\\x5c'\\\"]*(?:i[\\x5c'\\\"]*l[\\x5c'\\\"]*l[\\x5c'\\\"]*(?:a[\\x5c'\\\"]*l[\\x5c'\\\"]*l|(?:\\s|<|>).*)|s[\\x5c'\\\"]*h)|G[\\x5c'\\\"]*E[\\x5c'\\\"]*T[\\x5c'\\\"]*(?:\\s|<|>).*|7[\\x5c'\\\"]*z(?:[\\x5c'\\\"]*[ar])?)\\b",
184
+ "options": {
185
+ "case_sensitive": true,
186
+ "min_length": 3
187
+ }
188
+ },
189
+ "operator": "match_regex"
190
+ }
191
+ ],
192
+ "transformers": []
193
+ },
194
+ {
195
+ "id": "crs-932-115",
196
+ "name": "Remote Command Execution: Windows Command Injection",
197
+ "tags": {
198
+ "type": "command_injection",
199
+ "crs_id": "932115",
200
+ "category": "attack_attempt",
201
+ "module": "waf"
202
+ },
203
+ "conditions": [
204
+ {
205
+ "parameters": {
206
+ "inputs": [
207
+ {
208
+ "address": "server.request.query"
209
+ },
210
+ {
211
+ "address": "server.request.body"
212
+ },
213
+ {
214
+ "address": "server.request.path_params"
215
+ },
216
+ {
217
+ "address": "graphql.server.all_resolvers"
218
+ },
219
+ {
220
+ "address": "graphql.server.resolver"
221
+ }
222
+ ],
223
+ "regex": "(?:[;\\n\\r`]|(?:$\\(|<)\\(|(?:\\|)?\\||\\(\\s*\\)|\\$[(?:{]|&?&|>\\|\\{)\\s*(?:(?:\\w+=(?:[^\\s]*|\\$.*|\\$.*|<.*|>.*|\\'.*\\'|\\\".*\\\")\\s+|(?:\\s*\\(|!)\\s*|\\{|\\$))*\\s*(?:['\\\"])*(?:[\\?\\*\\[\\]\\(\\)\\-\\|+\\w'\\\"\\./\\x5c]+/)?[\\x5c'\\\"]*(?:s[\\\"\\^]*(?:y[\\\"\\^]*s[\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"\\^]*s[\\\"\\^]*s|w[\\\"\\^]*i[\\\"\\^]*n[\\\"\\^]*s[\\\"\\^]*t[\\\"\\^]*a|g[\\\"\\^]*r[\\\"\\^]*e[\\\"\\^]*p)|o[\\\"\\^]*(?:d[\\\"\\^]*b[\\\"\\^]*c[\\\"\\^]*(?:a[\\\"\\^]*d[\\\"\\^]*3[\\\"\\^]*2|c[\\\"\\^]*o[\\\"\\^]*n[\\\"\\^]*f)|p[\\\"\\^]*e[\\\"\\^]*n[\\\"\\^]*f[\\\"\\^]*i[\\\"\\^]*l[\\\"\\^]*e[\\\"\\^]*s)|v[\\\"\\^]*(?:o[\\\"\\^]*l[\\\"\\^]*(?:[\\s,;]|\\.|/|<|>).*|e[\\\"\\^]*r[\\\"\\^]*i[\\\"\\^]*f[\\\"\\^]*y)|x[\\\"\\^]*c[\\\"\\^]*(?:a[\\\"\\^]*c[\\\"\\^]*l[\\\"\\^]*s|o[\\\"\\^]*p[\\\"\\^]*y)|z[\\\"\\^]*i[\\\"\\^]*p[\\\"\\^]*(?:[\\s,;]|\\.|/|<|>).*)",
224
+ "options": {
225
+ "min_length": 4
226
+ }
227
+ },
228
+ "operator": "match_regex"
229
+ }
230
+ ],
231
+ "transformers": []
232
+ },
233
+ {
234
+ "id": "crs-932-120",
235
+ "name": "Remote Command Execution: Windows PowerShell Command Found",
236
+ "tags": {
237
+ "type": "command_injection",
238
+ "crs_id": "932120",
239
+ "category": "attack_attempt"
240
+ },
241
+ "conditions": [
242
+ {
243
+ "parameters": {
244
+ "inputs": [
245
+ {
246
+ "address": "server.request.query"
247
+ },
248
+ {
249
+ "address": "server.request.body"
250
+ },
251
+ {
252
+ "address": "server.request.path_params"
253
+ },
254
+ {
255
+ "address": "graphql.server.all_resolvers"
256
+ },
257
+ {
258
+ "address": "graphql.server.resolver"
259
+ }
260
+ ],
261
+ "options": {
262
+ "enforce_word_boundary": true
263
+ },
264
+ "list": [
265
+ "powershell",
266
+ "add-computer",
267
+ "add-content",
268
+ "add-history",
269
+ "add-jobtrigger",
270
+ "add-localgroupmember",
271
+ "add-member",
272
+ "add-pssnapin",
273
+ "add-type",
274
+ "checkpoint-computer",
275
+ "clear-content",
276
+ "clear-eventlog",
277
+ "clear-history",
278
+ "clear-host",
279
+ "clear-item",
280
+ "clear-itemproperty",
281
+ "clear-recyclebin",
282
+ "clear-variable",
283
+ "compare-object",
284
+ "complete-transaction",
285
+ "compress-archive",
286
+ "connect-pssession",
287
+ "connect-wsman",
288
+ "convert-path",
289
+ "convert-string",
290
+ "convertfrom-csv",
291
+ "convertfrom-json",
292
+ "convertfrom-markdown",
293
+ "convertfrom-sddlstring",
294
+ "convertfrom-securestring",
295
+ "convertfrom-string",
296
+ "convertfrom-stringdata",
297
+ "convertto-csv",
298
+ "convertto-html",
299
+ "convertto-json",
300
+ "convertto-securestring",
301
+ "convertto-xml",
302
+ "copy-item",
303
+ "copy-itemproperty",
304
+ "debug-job",
305
+ "debug-process",
306
+ "debug-runspace",
307
+ "disable-computerrestore",
308
+ "disable-experimentalfeature",
309
+ "disable-jobtrigger",
310
+ "disable-localuser",
311
+ "disable-psbreakpoint",
312
+ "disable-psremoting",
313
+ "disable-pssessionconfiguration",
314
+ "disable-pstrace",
315
+ "disable-pswsmancombinedtrace",
316
+ "disable-runspacedebug",
317
+ "disable-scheduledjob",
318
+ "disable-wsmancredssp",
319
+ "disable-wsmantrace",
320
+ "disconnect-pssession",
321
+ "disconnect-wsman",
322
+ "enable-computerrestore",
323
+ "enable-experimentalfeature",
324
+ "enable-jobtrigger",
325
+ "enable-localuser",
326
+ "enable-psbreakpoint",
327
+ "enable-psremoting",
328
+ "enable-pssessionconfiguration",
329
+ "enable-pstrace",
330
+ "enable-pswsmancombinedtrace",
331
+ "enable-runspacedebug",
332
+ "enable-scheduledjob",
333
+ "enable-wsmancredssp",
334
+ "enable-wsmantrace",
335
+ "enter-pshostprocess",
336
+ "enter-pssession",
337
+ "exit-pshostprocess",
338
+ "exit-pssession",
339
+ "expand-archive",
340
+ "export-alias",
341
+ "export-binarymilog",
342
+ "export-clixml",
343
+ "export-console",
344
+ "export-counter",
345
+ "export-csv",
346
+ "export-formatdata",
347
+ "export-modulemember",
348
+ "export-odataendpointproxy",
349
+ "export-pssession",
350
+ "find-command",
351
+ "find-dscresource",
352
+ "find-module",
353
+ "find-package",
354
+ "find-packageprovider",
355
+ "find-rolecapability",
356
+ "find-script",
357
+ "foreach-object",
358
+ "format-custom",
359
+ "format-hex",
360
+ "format-list",
361
+ "format-table",
362
+ "format-wide",
363
+ "get-acl",
364
+ "get-alias",
365
+ "get-authenticodesignature",
366
+ "get-childitem",
367
+ "get-cimassociatedinstance",
368
+ "get-cimclass",
369
+ "get-ciminstance",
370
+ "get-cimsession",
371
+ "get-clipboard",
372
+ "get-cmsmessage",
373
+ "get-command",
374
+ "get-computerinfo",
375
+ "get-computerrestorepoint",
376
+ "get-content",
377
+ "get-controlpanelitem",
378
+ "get-counter",
379
+ "get-credential",
380
+ "get-date",
381
+ "get-error",
382
+ "get-event",
383
+ "get-eventlog",
384
+ "get-eventsubscriber",
385
+ "get-executionpolicy",
386
+ "get-experimentalfeature",
387
+ "get-filehash",
388
+ "get-formatdata",
389
+ "get-help",
390
+ "get-history",
391
+ "get-host",
392
+ "get-hotfix",
393
+ "get-installedmodule",
394
+ "get-installedscript",
395
+ "get-isesnippet",
396
+ "get-item",
397
+ "get-itemproperty",
398
+ "get-itempropertyvalue",
399
+ "get-job",
400
+ "get-jobtrigger",
401
+ "get-localgroup",
402
+ "get-localgroupmember",
403
+ "get-localuser",
404
+ "get-location",
405
+ "get-logproperties",
406
+ "get-markdownoption",
407
+ "get-module",
408
+ "get-operationvalidation",
409
+ "get-psbreakpoint",
410
+ "get-pscallstack",
411
+ "get-psdrive",
412
+ "get-pshostprocessinfo",
413
+ "get-psprovider",
414
+ "get-psreadlinekeyhandler",
415
+ "get-psreadlineoption",
416
+ "get-psrepository",
417
+ "get-pssession",
418
+ "get-pssessioncapability",
419
+ "get-pssessionconfiguration",
420
+ "get-pssnapin",
421
+ "get-pssubsystem",
422
+ "get-package",
423
+ "get-packageprovider",
424
+ "get-packagesource",
425
+ "get-pfxcertificate",
426
+ "get-process",
427
+ "get-random",
428
+ "get-runspace",
429
+ "get-runspacedebug",
430
+ "get-scheduledjob",
431
+ "get-scheduledjoboption",
432
+ "get-service",
433
+ "get-timezone",
434
+ "get-tracesource",
435
+ "get-transaction",
436
+ "get-typedata",
437
+ "get-uiculture",
438
+ "get-unique",
439
+ "get-uptime",
440
+ "get-variable",
441
+ "get-verb",
442
+ "get-wsmancredssp",
443
+ "get-wsmaninstance",
444
+ "get-winevent",
445
+ "get-wmiobject",
446
+ "group-object",
447
+ "import-alias",
448
+ "import-binarymilog",
449
+ "import-clixml",
450
+ "import-counter",
451
+ "import-csv",
452
+ "import-isesnippet",
453
+ "import-localizeddata",
454
+ "import-module",
455
+ "import-pssession",
456
+ "import-packageprovider",
457
+ "import-powershelldatafile",
458
+ "install-module",
459
+ "install-package",
460
+ "install-packageprovider",
461
+ "install-script",
462
+ "invoke-asworkflow",
463
+ "invoke-cimmethod",
464
+ "invoke-command",
465
+ "invoke-expression",
466
+ "invoke-history",
467
+ "invoke-item",
468
+ "invoke-operationvalidation",
469
+ "invoke-restmethod",
470
+ "invoke-wsmanaction",
471
+ "invoke-webrequest",
472
+ "invoke-wmimethod",
473
+ "join-path",
474
+ "join-string",
475
+ "limit-eventlog",
476
+ "measure-command",
477
+ "measure-object",
478
+ "move-item",
479
+ "move-itemproperty",
480
+ "new-alias",
481
+ "new-ciminstance",
482
+ "new-cimsession",
483
+ "new-cimsessionoption",
484
+ "new-event",
485
+ "new-eventlog",
486
+ "new-filecatalog",
487
+ "new-guid",
488
+ "new-isesnippet",
489
+ "new-item",
490
+ "new-itemproperty",
491
+ "new-jobtrigger",
492
+ "new-localgroup",
493
+ "new-localuser",
494
+ "new-module",
495
+ "new-modulemanifest",
496
+ "new-object",
497
+ "new-psdrive",
498
+ "new-psrolecapabilityfile",
499
+ "new-pssession",
500
+ "new-pssessionconfigurationfile",
501
+ "new-pssessionoption",
502
+ "new-pstransportoption",
503
+ "new-psworkflowexecutionoption",
504
+ "new-psworkflowsession",
505
+ "new-scheduledjoboption",
506
+ "new-scriptfileinfo",
507
+ "new-service",
508
+ "new-temporaryfile",
509
+ "new-timespan",
510
+ "new-variable",
511
+ "new-wsmaninstance",
512
+ "new-wsmansessionoption",
513
+ "new-webserviceproxy",
514
+ "new-winevent",
515
+ "out-default",
516
+ "out-file",
517
+ "out-gridview",
518
+ "out-host",
519
+ "out-null",
520
+ "out-printer",
521
+ "out-string",
522
+ "pop-location",
523
+ "protect-cmsmessage",
524
+ "publish-module",
525
+ "publish-script",
526
+ "push-location",
527
+ "read-host",
528
+ "receive-job",
529
+ "receive-pssession",
530
+ "register-argumentcompleter",
531
+ "register-cimindicationevent",
532
+ "register-engineevent",
533
+ "register-objectevent",
534
+ "register-psrepository",
535
+ "register-pssessionconfiguration",
536
+ "register-packagesource",
537
+ "register-scheduledjob",
538
+ "register-wmievent",
539
+ "remove-alias",
540
+ "remove-ciminstance",
541
+ "remove-cimsession",
542
+ "remove-computer",
543
+ "remove-event",
544
+ "remove-eventlog",
545
+ "remove-item",
546
+ "remove-itemproperty",
547
+ "remove-job",
548
+ "remove-jobtrigger",
549
+ "remove-localgroup",
550
+ "remove-localgroupmember",
551
+ "remove-localuser",
552
+ "remove-module",
553
+ "remove-psbreakpoint",
554
+ "remove-psdrive",
555
+ "remove-psreadlinekeyhandler",
556
+ "remove-pssession",
557
+ "remove-pssnapin",
558
+ "remove-service",
559
+ "remove-typedata",
560
+ "remove-variable",
561
+ "remove-wsmaninstance",
562
+ "remove-wmiobject",
563
+ "rename-computer",
564
+ "rename-item",
565
+ "rename-itemproperty",
566
+ "rename-localgroup",
567
+ "rename-localuser",
568
+ "reset-computermachinepassword",
569
+ "resolve-path",
570
+ "restart-computer",
571
+ "restart-service",
572
+ "restore-computer",
573
+ "resume-job",
574
+ "resume-service",
575
+ "save-help",
576
+ "save-module",
577
+ "save-package",
578
+ "save-script",
579
+ "select-object",
580
+ "select-string",
581
+ "select-xml",
582
+ "send-mailmessage",
583
+ "set-acl",
584
+ "set-alias",
585
+ "set-authenticodesignature",
586
+ "set-ciminstance",
587
+ "set-clipboard",
588
+ "set-content",
589
+ "set-date",
590
+ "set-executionpolicy",
591
+ "set-item",
592
+ "set-itemproperty",
593
+ "set-jobtrigger",
594
+ "set-localgroup",
595
+ "set-localuser",
596
+ "set-location",
597
+ "set-logproperties",
598
+ "set-markdownoption",
599
+ "set-psbreakpoint",
600
+ "set-psdebug",
601
+ "set-psreadlinekeyhandler",
602
+ "set-psreadlineoption",
603
+ "set-psrepository",
604
+ "set-pssessionconfiguration",
605
+ "set-packagesource",
606
+ "set-scheduledjob",
607
+ "set-scheduledjoboption",
608
+ "set-service",
609
+ "set-strictmode",
610
+ "set-timezone",
611
+ "set-tracesource",
612
+ "set-variable",
613
+ "set-wsmaninstance",
614
+ "set-wsmanquickconfig",
615
+ "set-wmiinstance",
616
+ "show-command",
617
+ "show-controlpanelitem",
618
+ "show-eventlog",
619
+ "show-markdown",
620
+ "sort-object",
621
+ "split-path",
622
+ "start-job",
623
+ "start-process",
624
+ "start-service",
625
+ "start-sleep",
626
+ "start-threadjob",
627
+ "start-trace",
628
+ "start-transaction",
629
+ "stop-computer",
630
+ "stop-job",
631
+ "stop-process",
632
+ "stop-service",
633
+ "stop-trace",
634
+ "stop-transcript",
635
+ "suspend-job",
636
+ "suspend-service",
637
+ "switch-process",
638
+ "tee-object",
639
+ "test-computersecurechannel",
640
+ "test-connection",
641
+ "test-filecatalog",
642
+ "test-json",
643
+ "test-modulemanifest",
644
+ "test-pssessionconfigurationfile",
645
+ "test-path",
646
+ "test-scriptfileinfo",
647
+ "test-wsman",
648
+ "trace-command",
649
+ "unblock-file",
650
+ "undo-transaction",
651
+ "uninstall-module",
652
+ "uninstall-package",
653
+ "uninstall-script",
654
+ "unprotect-cmsmessage",
655
+ "unregister-event",
656
+ "unregister-psrepository",
657
+ "unregister-pssessionconfiguration",
658
+ "unregister-packagesource",
659
+ "unregister-scheduledjob",
660
+ "update-formatdata",
661
+ "update-help",
662
+ "update-list",
663
+ "update-module",
664
+ "update-modulemanifest",
665
+ "update-script",
666
+ "update-scriptfileinfo",
667
+ "update-typedata",
668
+ "use-transaction",
669
+ "wait-debugger",
670
+ "wait-event",
671
+ "wait-job",
672
+ "wait-process",
673
+ "where-object",
674
+ "write-debug",
675
+ "write-error",
676
+ "write-eventlog",
677
+ "write-host",
678
+ "write-information",
679
+ "write-output",
680
+ "write-progress",
681
+ "write-verbose",
682
+ "write-warning"
683
+ ]
684
+ },
685
+ "operator": "phrase_match"
686
+ }
687
+ ],
688
+ "transformers": [
689
+ "lowercase"
690
+ ]
691
+ },
692
+ {
693
+ "id": "crs-932-130",
694
+ "name": "Remote Command Execution: Unix Shell Expression Found",
695
+ "tags": {
696
+ "type": "command_injection",
697
+ "crs_id": "932130",
698
+ "category": "attack_attempt",
699
+ "module": "waf"
700
+ },
701
+ "conditions": [
702
+ {
703
+ "parameters": {
704
+ "inputs": [
705
+ {
706
+ "address": "server.request.query"
707
+ },
708
+ {
709
+ "address": "server.request.body"
710
+ },
711
+ {
712
+ "address": "server.request.path_params"
713
+ },
714
+ {
715
+ "address": "graphql.server.all_resolvers"
716
+ },
717
+ {
718
+ "address": "graphql.server.resolver"
719
+ }
720
+ ],
721
+ "regex": "(?:\\$(?:\\((?:\\(.*\\)|.*)\\)|\\{.*})|\\/\\w*\\[!?.+\\]|[<>]\\(.*\\))",
722
+ "options": {
723
+ "case_sensitive": true,
724
+ "min_length": 3
725
+ }
726
+ },
727
+ "operator": "match_regex"
728
+ }
729
+ ],
730
+ "transformers": []
731
+ },
732
+ {
733
+ "id": "crs-932-150",
734
+ "name": "Remote Command Execution: Direct Unix Command Execution",
735
+ "tags": {
736
+ "type": "command_injection",
737
+ "crs_id": "932150",
738
+ "category": "attack_attempt",
739
+ "module": "waf"
740
+ },
741
+ "conditions": [
742
+ {
743
+ "parameters": {
744
+ "inputs": [
745
+ {
746
+ "address": "server.request.query"
747
+ },
748
+ {
749
+ "address": "server.request.body"
750
+ },
751
+ {
752
+ "address": "server.request.path_params"
753
+ },
754
+ {
755
+ "address": "graphql.server.all_resolvers"
756
+ },
757
+ {
758
+ "address": "graphql.server.resolver"
759
+ }
760
+ ],
761
+ "regex": "(?:(?:^|=)\\s*(?:(?:\\w+=(?:[^\\s]*|\\$.*|\\$.*|<.*|>.*|\\'.*\\'|\\\".*\\\")\\s+|(?:\\s*\\(|!)\\s*|\\{|\\$))*\\s*(?:[\\\"'])*(?:[\\?\\*\\[\\]\\(\\)\\-\\|+\\w'\\\"\\./\\x5c]+/)?[\\x5c'\\\"]*(?:l[\\x5c'\\\"]*(?:z(?:[\\x5c'\\\"]*(?:m[\\x5c'\\\"]*(?:a(?:[\\x5c'\\\"]*(?:i[\\x5c'\\\"]*n[\\x5c'\\\"]*f[\\x5c'\\\"]*o|d[\\x5c'\\\"]*e[\\x5c'\\\"]*c))?|o[\\x5c'\\\"]*r[\\x5c'\\\"]*e)|(?:[ef][\\x5c'\\\"]*)?g[\\x5c'\\\"]*r[\\x5c'\\\"]*e[\\x5c'\\\"]*p|4(?:[\\x5c'\\\"]*c(?:[\\x5c'\\\"]*a[\\x5c'\\\"]*t)?)?|c[\\x5c'\\\"]*(?:a[\\x5c'\\\"]*t|m[\\x5c'\\\"]*p)|d[\\x5c'\\\"]*i[\\x5c'\\\"]*f[\\x5c'\\\"]*f|l[\\x5c'\\\"]*e[\\x5c'\\\"]*s[\\x5c'\\\"]*s))?|s(?:[\\x5c'\\\"]*(?:b[\\x5c'\\\"]*_[\\x5c'\\\"]*r[\\x5c'\\\"]*e[\\x5c'\\\"]*l[\\x5c'\\\"]*e[\\x5c'\\\"]*a[\\x5c'\\\"]*s[\\x5c'\\\"]*e|c[\\x5c'\\\"]*p[\\x5c'\\\"]*u|m[\\x5c'\\\"]*o[\\x5c'\\\"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|o[\\x5c'\\\"]*a[\\x5c'\\\"]*s)|j[\\x5c'\\\"]*(?:o[\\x5c'\\\"]*b[\\x5c'\\\"]*s[\\x5c'\\\"]*\\s+[\\x5c'\\\"]*-[\\x5c'\\\"]*x|a[\\x5c'\\\"]*v[\\x5c'\\\"]*a)|w[\\x5c'\\\"]*(?:h[\\x5c'\\\"]*o[\\x5c'\\\"]*a[\\x5c'\\\"]*m[\\x5c'\\\"]*i|g[\\x5c'\\\"]*e[\\x5c'\\\"]*t|3[\\x5c'\\\"]*m)|i[\\x5c'\\\"]*r[\\x5c'\\\"]*b(?:[\\x5c'\\\"]*(?:1(?:[\\x5c'\\\"]*[89])?|2[\\x5c'\\\"]*[012]))?|o[\\x5c'\\\"]*n[\\x5c'\\\"]*i[\\x5c'\\\"]*n[\\x5c'\\\"]*t[\\x5c'\\\"]*r|h[\\x5c'\\\"]*(?:e[\\x5c'\\\"]*a[\\x5c'\\\"]*d|u[\\x5c'\\\"]*p)|v[\\x5c'\\\"]*i[\\x5c'\\\"]*(?:g[\\x5c'\\\"]*r|p[\\x5c'\\\"]*w)|7[\\x5c'\\\"]*z(?:[\\x5c'\\\"]*[ar])?|G[\\x5c'\\\"]*E[\\x5c'\\\"]*T|k[\\x5c'\\\"]*s[\\x5c'\\\"]*h)|\\$[\\x5c'\\\"]*(?:\\{[\\x5c'\\\"]*S[\\x5c'\\\"]*H[\\x5c'\\\"]*E[\\x5c'\\\"]*L[\\x5c'\\\"]*L[\\x5c'\\\"]*}|S[\\x5c'\\\"]*H[\\x5c'\\\"]*E[\\x5c'\\\"]*L[\\x5c'\\\"]*L))[\\x5c'\\\"]*(?:\\s|;|\\||&|<|>)",
762
+ "options": {
763
+ "case_sensitive": true,
764
+ "min_length": 3
765
+ }
766
+ },
767
+ "operator": "match_regex"
768
+ }
769
+ ],
770
+ "transformers": []
771
+ },
772
+ {
773
+ "id": "crs-933-110",
774
+ "name": "PHP Injection Attack: PHP Script File Upload Found",
775
+ "tags": {
776
+ "type": "php_code_injection",
777
+ "crs_id": "933110",
778
+ "category": "attack_attempt",
779
+ "module": "waf"
780
+ },
781
+ "conditions": [
782
+ {
783
+ "parameters": {
784
+ "inputs": [
785
+ {
786
+ "address": "server.request.headers.no_cookies",
787
+ "key_path": [
788
+ "x-filename"
789
+ ]
790
+ },
791
+ {
792
+ "address": "server.request.headers.no_cookies",
793
+ "key_path": [
794
+ "x_filename"
795
+ ]
796
+ },
797
+ {
798
+ "address": "server.request.headers.no_cookies",
799
+ "key_path": [
800
+ "x.filename"
801
+ ]
802
+ },
803
+ {
804
+ "address": "server.request.headers.no_cookies",
805
+ "key_path": [
806
+ "x-file-name"
807
+ ]
808
+ }
809
+ ],
810
+ "regex": ".*\\.ph(?:p\\d*|tml|ar|ps|t|pt)\\.*$",
811
+ "options": {
812
+ "case_sensitive": true,
813
+ "min_length": 4
814
+ }
815
+ },
816
+ "operator": "match_regex"
817
+ }
818
+ ],
819
+ "transformers": [
820
+ "lowercase"
821
+ ]
822
+ },
823
+ {
824
+ "id": "crs-933-180",
825
+ "name": "PHP Injection Attack: Variable Function Call Found",
826
+ "tags": {
827
+ "type": "php_code_injection",
828
+ "crs_id": "933180",
829
+ "category": "attack_attempt",
830
+ "module": "waf"
831
+ },
832
+ "conditions": [
833
+ {
834
+ "parameters": {
835
+ "inputs": [
836
+ {
837
+ "address": "server.request.query"
838
+ },
839
+ {
840
+ "address": "server.request.body"
841
+ },
842
+ {
843
+ "address": "server.request.path_params"
844
+ },
845
+ {
846
+ "address": "graphql.server.all_resolvers"
847
+ },
848
+ {
849
+ "address": "graphql.server.resolver"
850
+ }
851
+ ],
852
+ "regex": "\\$+(?:[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*|\\s*{.+})(?:\\s|\\[.+\\]|{.+}|/\\*.*\\*/|//.*|#.*)*\\(.*\\)",
853
+ "options": {
854
+ "case_sensitive": true,
855
+ "min_length": 4
856
+ }
857
+ },
858
+ "operator": "match_regex"
859
+ }
860
+ ],
861
+ "transformers": []
862
+ },
863
+ {
864
+ "id": "crs-933-210",
865
+ "name": "PHP Injection Attack: Variable Function Call Found",
866
+ "tags": {
867
+ "type": "php_code_injection",
868
+ "crs_id": "933210",
869
+ "category": "attack_attempt",
870
+ "module": "waf"
871
+ },
872
+ "conditions": [
873
+ {
874
+ "parameters": {
875
+ "inputs": [
876
+ {
877
+ "address": "server.request.query"
878
+ },
879
+ {
880
+ "address": "server.request.body"
881
+ },
882
+ {
883
+ "address": "server.request.path_params"
884
+ },
885
+ {
886
+ "address": "graphql.server.all_resolvers"
887
+ },
888
+ {
889
+ "address": "graphql.server.resolver"
890
+ }
891
+ ],
892
+ "regex": "(?:\\(.+\\)\\(.+\\)|\\(.+\\)['\\\"][a-zA-Z-_0-9]+['\\\"]\\(.+\\)|\\[\\d+\\]\\(.+\\)|\\{\\d+\\}\\(.+\\)|\\$[^(?:\\),.;\\x5c/]+\\(.+\\)|[\\\"'][a-zA-Z0-9-_\\x5c]+[\\\"']\\(.+\\)|\\([^\\)]*string[^\\)]*\\)[a-zA-Z-_0-9\\\"'.{}\\[\\]\\s]+\\([^\\)]*\\));",
893
+ "options": {
894
+ "case_sensitive": true,
895
+ "min_length": 6
896
+ }
897
+ },
898
+ "operator": "match_regex"
899
+ }
900
+ ],
901
+ "transformers": []
902
+ },
903
+ {
904
+ "id": "crs-941-100",
905
+ "name": "XSS Attack Detected via libinjection",
906
+ "tags": {
907
+ "type": "xss",
908
+ "crs_id": "941100",
909
+ "category": "attack_attempt",
910
+ "cwe": "79",
911
+ "module": "waf"
912
+ },
913
+ "conditions": [
914
+ {
915
+ "parameters": {
916
+ "inputs": [
917
+ {
918
+ "address": "server.request.headers.no_cookies",
919
+ "key_path": [
920
+ "user-agent"
921
+ ]
922
+ },
923
+ {
924
+ "address": "server.request.headers.no_cookies",
925
+ "key_path": [
926
+ "referer"
927
+ ]
928
+ },
929
+ {
930
+ "address": "server.request.query"
931
+ },
932
+ {
933
+ "address": "server.request.body"
934
+ },
935
+ {
936
+ "address": "server.request.path_params"
937
+ },
938
+ {
939
+ "address": "grpc.server.request.message"
940
+ },
941
+ {
942
+ "address": "graphql.server.all_resolvers"
943
+ },
944
+ {
945
+ "address": "graphql.server.resolver"
946
+ }
947
+ ]
948
+ },
949
+ "operator": "is_xss"
950
+ }
951
+ ],
952
+ "transformers": [
953
+ "removeNulls"
954
+ ]
955
+ },
956
+ {
957
+ "id": "crs-941-130",
958
+ "name": "XSS Filter - Category 3: Attribute Vector",
959
+ "tags": {
960
+ "type": "xss",
961
+ "crs_id": "941130",
962
+ "category": "attack_attempt",
963
+ "module": "waf"
964
+ },
965
+ "conditions": [
966
+ {
967
+ "parameters": {
968
+ "inputs": [
969
+ {
970
+ "address": "server.request.headers.no_cookies",
971
+ "key_path": [
972
+ "user-agent"
973
+ ]
974
+ },
975
+ {
976
+ "address": "server.request.query"
977
+ },
978
+ {
979
+ "address": "server.request.body"
980
+ },
981
+ {
982
+ "address": "server.request.path_params"
983
+ },
984
+ {
985
+ "address": "graphql.server.all_resolvers"
986
+ },
987
+ {
988
+ "address": "graphql.server.resolver"
989
+ }
990
+ ],
991
+ "regex": "[\\s\\S](?:\\b(?:x(?:link:href|html|mlns)|data:text\\/html|pattern\\b.*?=|formaction)|!ENTITY\\s+(?:\\S+|%\\s+\\S+)\\s+(?:PUBLIC|SYSTEM)|;base64|@import)\\b",
992
+ "options": {
993
+ "min_length": 6
994
+ }
995
+ },
996
+ "operator": "match_regex"
997
+ }
998
+ ],
999
+ "transformers": [
1000
+ "removeNulls"
1001
+ ]
1002
+ },
1003
+ {
1004
+ "id": "crs-941-150",
1005
+ "name": "XSS Filter - Category 5: Disallowed HTML Attributes",
1006
+ "tags": {
1007
+ "type": "xss",
1008
+ "crs_id": "941150",
1009
+ "category": "attack_attempt",
1010
+ "module": "waf"
1011
+ },
1012
+ "conditions": [
1013
+ {
1014
+ "parameters": {
1015
+ "inputs": [
1016
+ {
1017
+ "address": "server.request.headers.no_cookies",
1018
+ "key_path": [
1019
+ "user-agent"
1020
+ ]
1021
+ },
1022
+ {
1023
+ "address": "server.request.query"
1024
+ },
1025
+ {
1026
+ "address": "server.request.body"
1027
+ },
1028
+ {
1029
+ "address": "server.request.path_params"
1030
+ },
1031
+ {
1032
+ "address": "graphql.server.all_resolvers"
1033
+ },
1034
+ {
1035
+ "address": "graphql.server.resolver"
1036
+ }
1037
+ ],
1038
+ "regex": "\\b(?:s(?:tyle|rc)|href)\\b\\s*?=",
1039
+ "options": {
1040
+ "case_sensitive": true,
1041
+ "min_length": 4
1042
+ }
1043
+ },
1044
+ "operator": "match_regex"
1045
+ }
1046
+ ],
1047
+ "transformers": [
1048
+ "removeNulls"
1049
+ ]
1050
+ },
1051
+ {
1052
+ "id": "crs-941-160",
1053
+ "name": "NoScript XSS InjectionChecker: HTML Injection",
1054
+ "tags": {
1055
+ "type": "xss",
1056
+ "crs_id": "941160",
1057
+ "category": "attack_attempt",
1058
+ "module": "waf"
1059
+ },
1060
+ "conditions": [
1061
+ {
1062
+ "parameters": {
1063
+ "inputs": [
1064
+ {
1065
+ "address": "server.request.headers.no_cookies",
1066
+ "key_path": [
1067
+ "user-agent"
1068
+ ]
1069
+ },
1070
+ {
1071
+ "address": "server.request.headers.no_cookies",
1072
+ "key_path": [
1073
+ "referer"
1074
+ ]
1075
+ },
1076
+ {
1077
+ "address": "server.request.query"
1078
+ },
1079
+ {
1080
+ "address": "server.request.body"
1081
+ },
1082
+ {
1083
+ "address": "server.request.path_params"
1084
+ },
1085
+ {
1086
+ "address": "graphql.server.all_resolvers"
1087
+ },
1088
+ {
1089
+ "address": "graphql.server.resolver"
1090
+ }
1091
+ ],
1092
+ "regex": "(?:(?:<\\w[\\s\\S]*[\\s/]|['\\\"](?:[\\s\\S]*[\\s/])?)(?:on(?:d(?:e(?:vice(?:(?:orienta|mo)tion|proximity|found|light)|livery(?:success|error)|activate)|r(?:ag(?:e(?:n(?:ter|d)|xit)|(?:gestur|leav)e|start|drop|over)|op)|i(?:s(?:c(?:hargingtimechange|onnect(?:ing|ed))|abled)|aling)|ata(?:setc(?:omplete|hanged)|(?:availabl|chang)e|error)|urationchange|ownloading|blclick)|Moz(?:M(?:agnifyGesture(?:Update|Start)?|ouse(?:PixelScroll|Hittest))|S(?:wipeGesture(?:Update|Start|End)?|crolledAreaChanged)|(?:(?:Press)?TapGestur|BeforeResiz)e|EdgeUI(?:C(?:omplet|ancel)|Start)ed|RotateGesture(?:Update|Start)?|A(?:udioAvailable|fterPaint))|c(?:o(?:m(?:p(?:osition(?:update|start|end)|lete)|mand(?:update)?)|n(?:t(?:rolselect|extmenu)|nect(?:ing|ed))|py)|a(?:(?:llschang|ch)ed|nplay(?:through)?|rdstatechange)|h(?:(?:arging(?:time)?ch)?ange|ecking)|(?:fstate|ell)change|u(?:echange|t)|l(?:ick|ose))|s(?:t(?:a(?:t(?:uschanged|echange)|lled|rt)|k(?:sessione|comma)nd|op)|e(?:ek(?:complete|ing|ed)|(?:lec(?:tstar)?)?t|n(?:ding|t))|(?:peech|ound)(?:start|end)|u(?:ccess|spend|bmit)|croll|how)|m(?:o(?:z(?:(?:pointerlock|fullscreen)(?:change|error)|(?:orientation|time)change|network(?:down|up)load)|use(?:(?:lea|mo)ve|o(?:ver|ut)|enter|wheel|down|up)|ve(?:start|end)?)|essage|ark)|a(?:n(?:imation(?:iteration|start|end)|tennastatechange)|fter(?:(?:scriptexecu|upda)te|print)|udio(?:process|start|end)|d(?:apteradded|dtrack)|ctivate|lerting|bort)|b(?:e(?:fore(?:(?:(?:de)?activa|scriptexecu)te|u(?:nload|pdate)|p(?:aste|rint)|c(?:opy|ut)|editfocus)|gin(?:Event)?)|oun(?:dary|ce)|l(?:ocked|ur)|roadcast|usy)|DOM(?:Node(?:Inserted(?:IntoDocument)?|Removed(?:FromDocument)?)|(?:CharacterData|Subtree)Modified|A(?:ttrModified|ctivate)|Focus(?:Out|In)|MouseScroll)|r(?:e(?:s(?:u(?:m(?:ing|e)|lt)|ize|et)|adystatechange|pea(?:tEven)?t|movetrack|trieving|ceived)|ow(?:s(?:inserted|delete)|e(?:nter|xit))|atechange)|p(?:op(?:up(?:hid(?:den|ing)|show(?:ing|n))|state)|a(?:ge(?:hide|show)|(?:st|us)e|int)|ro(?:pertychange|gress)|lay(?:ing)?)|t(?:ouch(?:(?:lea|mo)ve|en(?:ter|d)|cancel|start)|ransition(?:cancel|end|run)|ime(?:update|out)|ext)|u(?:s(?:erproximity|sdreceived)|p(?:gradeneeded|dateready)|n(?:derflow|load))|f(?:o(?:rm(?:change|input)|cus(?:out|in)?)|i(?:lterchange|nish)|ailed)|l(?:o(?:ad(?:e(?:d(?:meta)?data|nd)|start)|secapture)|evelchange|y)|g(?:amepad(?:(?:dis)?connected|button(?:down|up)|axismove)|et)|e(?:n(?:d(?:Event|ed)?|abled|ter)|rror(?:update)?|mptied|xit)|i(?:cc(?:cardlockerror|infochange)|n(?:coming|valid|put))|o(?:(?:(?:ff|n)lin|bsolet)e|verflow(?:changed)?|pen)|SVG(?:(?:Unl|L)oad|Resize|Scroll|Abort|Error|Zoom)|h(?:e(?:adphoneschange|l[dp])|ashchange|olding)|v(?:o(?:lum|ic)e|ersion)change|w(?:a(?:it|rn)ing|heel)|key(?:press|down|up)|(?:AppComman|Loa)d|no(?:update|match)|Request|zoom)|s(?:tyle|rc)|background|formaction|lowsrc|ping)[\\s\\x08]*?=|<[^\\w<>]*(?:[^<>\\\"'\\s]*:)?[^\\w<>]*\\W*?(?:(?:a\\W*?(?:n\\W*?i\\W*?m\\W*?a\\W*?t\\W*?e|p\\W*?p\\W*?l\\W*?e\\W*?t|u\\W*?d\\W*?i\\W*?o)|b\\W*?(?:i\\W*?n\\W*?d\\W*?i\\W*?n\\W*?g\\W*?s|a\\W*?s\\W*?e|o\\W*?d\\W*?y)|i?\\W*?f\\W*?r\\W*?a\\W*?m\\W*?e|o\\W*?b\\W*?j\\W*?e\\W*?c\\W*?t|i\\W*?m\\W*?a?\\W*?g\\W*?e?|e\\W*?m\\W*?b\\W*?e\\W*?d|p\\W*?a\\W*?r\\W*?a\\W*?m|v\\W*?i\\W*?d\\W*?e\\W*?o|l\\W*?i\\W*?n\\W*?k)[^>\\w]|s\\W*?(?:c\\W*?r\\W*?i\\W*?p\\W*?t|t\\W*?y\\W*?l\\W*?e|e\\W*?t[^>\\w]|v\\W*?g)|m\\W*?(?:a\\W*?r\\W*?q\\W*?u\\W*?e\\W*?e|e\\W*?t\\W*?a[^>\\w])|f\\W*?o\\W*?r\\W*?m))",
1093
+ "options": {
1094
+ "min_length": 4
1095
+ }
1096
+ },
1097
+ "operator": "match_regex"
1098
+ }
1099
+ ],
1100
+ "transformers": [
1101
+ "removeNulls"
1102
+ ]
1103
+ },
1104
+ {
1105
+ "id": "crs-941-190",
1106
+ "name": "IE XSS Filters - Attack Detected",
1107
+ "tags": {
1108
+ "type": "xss",
1109
+ "crs_id": "941190",
1110
+ "category": "attack_attempt",
1111
+ "module": "waf"
1112
+ },
1113
+ "conditions": [
1114
+ {
1115
+ "parameters": {
1116
+ "inputs": [
1117
+ {
1118
+ "address": "server.request.query"
1119
+ },
1120
+ {
1121
+ "address": "server.request.body"
1122
+ },
1123
+ {
1124
+ "address": "server.request.path_params"
1125
+ },
1126
+ {
1127
+ "address": "graphql.server.all_resolvers"
1128
+ },
1129
+ {
1130
+ "address": "graphql.server.resolver"
1131
+ }
1132
+ ],
1133
+ "regex": "(?i:<style.*?>.*?(?:@[i\\x5c]|(?:[:=]|&#x?0*(?:58|3A|61|3D);?).*?(?:[(?:\\x5c]|&#x?0*(?:40|28|92|5C);?)))",
1134
+ "options": {
1135
+ "case_sensitive": true,
1136
+ "min_length": 9
1137
+ }
1138
+ },
1139
+ "operator": "match_regex"
1140
+ }
1141
+ ],
1142
+ "transformers": [
1143
+ "removeNulls"
1144
+ ]
1145
+ },
1146
+ {
1147
+ "id": "crs-941-250",
1148
+ "name": "IE XSS Filters - Attack Detected",
1149
+ "tags": {
1150
+ "type": "xss",
1151
+ "crs_id": "941250",
1152
+ "category": "attack_attempt",
1153
+ "module": "waf"
1154
+ },
1155
+ "conditions": [
1156
+ {
1157
+ "parameters": {
1158
+ "inputs": [
1159
+ {
1160
+ "address": "server.request.query"
1161
+ },
1162
+ {
1163
+ "address": "server.request.body"
1164
+ },
1165
+ {
1166
+ "address": "server.request.path_params"
1167
+ },
1168
+ {
1169
+ "address": "graphql.server.all_resolvers"
1170
+ },
1171
+ {
1172
+ "address": "graphql.server.resolver"
1173
+ }
1174
+ ],
1175
+ "regex": "(?i:<META[\\s/+].*?http-equiv[\\s/+]*=[\\s/+]*[\\\"'`]?(?:(?:c|&#x?0*(?:67|43|99|63);?)|(?:r|&#x?0*(?:82|52|114|72);?)|(?:s|&#x?0*(?:83|53|115|73);?)))",
1176
+ "options": {
1177
+ "case_sensitive": true,
1178
+ "min_length": 18
1179
+ }
1180
+ },
1181
+ "operator": "match_regex"
1182
+ }
1183
+ ],
1184
+ "transformers": [
1185
+ "removeNulls"
1186
+ ]
1187
+ },
1188
+ {
1189
+ "id": "crs-941-260",
1190
+ "name": "IE XSS Filters - Attack Detected",
1191
+ "tags": {
1192
+ "type": "xss",
1193
+ "crs_id": "941260",
1194
+ "category": "attack_attempt",
1195
+ "module": "waf"
1196
+ },
1197
+ "conditions": [
1198
+ {
1199
+ "parameters": {
1200
+ "inputs": [
1201
+ {
1202
+ "address": "server.request.query"
1203
+ },
1204
+ {
1205
+ "address": "server.request.body"
1206
+ },
1207
+ {
1208
+ "address": "server.request.path_params"
1209
+ },
1210
+ {
1211
+ "address": "graphql.server.all_resolvers"
1212
+ },
1213
+ {
1214
+ "address": "graphql.server.resolver"
1215
+ }
1216
+ ],
1217
+ "regex": "(?i:<META[\\s/+].*?charset[\\s/+]*=)",
1218
+ "options": {
1219
+ "case_sensitive": true,
1220
+ "min_length": 14
1221
+ }
1222
+ },
1223
+ "operator": "match_regex"
1224
+ }
1225
+ ],
1226
+ "transformers": [
1227
+ "removeNulls"
1228
+ ]
1229
+ },
1230
+ {
1231
+ "id": "crs-941-370",
1232
+ "name": "JavaScript global variable found",
1233
+ "tags": {
1234
+ "type": "xss",
1235
+ "crs_id": "941370",
1236
+ "category": "attack_attempt",
1237
+ "module": "waf"
1238
+ },
1239
+ "conditions": [
1240
+ {
1241
+ "parameters": {
1242
+ "inputs": [
1243
+ {
1244
+ "address": "server.request.query"
1245
+ },
1246
+ {
1247
+ "address": "server.request.body"
1248
+ },
1249
+ {
1250
+ "address": "server.request.path_params"
1251
+ },
1252
+ {
1253
+ "address": "graphql.server.all_resolvers"
1254
+ },
1255
+ {
1256
+ "address": "graphql.server.resolver"
1257
+ }
1258
+ ],
1259
+ "regex": "(?:self|document|this|top|window)\\s*(?:/\\*|[\\[)]).+?(?:\\]|\\*/)",
1260
+ "options": {
1261
+ "case_sensitive": true,
1262
+ "min_length": 6
1263
+ }
1264
+ },
1265
+ "operator": "match_regex"
1266
+ }
1267
+ ],
1268
+ "transformers": []
1269
+ },
1270
+ {
1271
+ "id": "crs-941-380",
1272
+ "name": "AngularJS client side template injection detected",
1273
+ "tags": {
1274
+ "type": "js_code_injection",
1275
+ "crs_id": "941380",
1276
+ "category": "attack_attempt",
1277
+ "module": "waf"
1278
+ },
1279
+ "conditions": [
1280
+ {
1281
+ "parameters": {
1282
+ "inputs": [
1283
+ {
1284
+ "address": "server.request.query"
1285
+ },
1286
+ {
1287
+ "address": "server.request.body"
1288
+ },
1289
+ {
1290
+ "address": "server.request.path_params"
1291
+ },
1292
+ {
1293
+ "address": "graphql.server.all_resolvers"
1294
+ },
1295
+ {
1296
+ "address": "graphql.server.resolver"
1297
+ }
1298
+ ],
1299
+ "regex": "^{{[\\w\\s\\.]*[^\\w\\.\\s}][^}]*}}$",
1300
+ "options": {
1301
+ "case_sensitive": true,
1302
+ "min_length": 5
1303
+ }
1304
+ },
1305
+ "operator": "match_regex"
1306
+ }
1307
+ ],
1308
+ "transformers": []
1309
+ },
1310
+ {
1311
+ "id": "crs-942-151",
1312
+ "name": "SQL function injection Attack",
1313
+ "tags": {
1314
+ "type": "sql_injection",
1315
+ "crs_id": "942151",
1316
+ "category": "attack_attempt",
1317
+ "module": "waf"
1318
+ },
1319
+ "conditions": [
1320
+ {
1321
+ "parameters": {
1322
+ "inputs": [
1323
+ {
1324
+ "address": "server.request.query"
1325
+ },
1326
+ {
1327
+ "address": "server.request.body"
1328
+ },
1329
+ {
1330
+ "address": "server.request.path_params"
1331
+ },
1332
+ {
1333
+ "address": "graphql.server.all_resolvers"
1334
+ },
1335
+ {
1336
+ "address": "graphql.server.resolver"
1337
+ }
1338
+ ],
1339
+ "regex": "\\b(?:s(?:q(?:lite_(?:compileoption_(?:used|get)|source_id)|rt)|t(?:d(?:dev_(?:sam|po)p)?|r(?:_to_date|cmp))|ub(?:str(?:ing(?:_index)?)?|(?:dat|tim)e)|e(?:ssion_user|c_to_time)|ys(?:tem_user|date)|ha[12]?|oundex|chema|pace|in)|c(?:o(?:n(?:v(?:ert(?:_tz)?)?|cat(?:_ws)?|nection_id)|(?:mpres)?s|ercibility|llation|alesce|t)|ur(?:rent_(?:time(?:stamp)?|date|user)|(?:dat|tim)e)|ha(?:racte)?r_length|iel(?:ing)?|r32)|i(?:s(?:_(?:ipv(?:4(?:_(?:compat|mapped))?|6)|n(?:ot(?:_null)?|ull)|(?:free|used)_lock)|null)|n(?:et(?:6_(?:aton|ntoa)|_(?:aton|ntoa))|s(?:ert|tr)|terval)|fnull)|l(?:o(?:ca(?:ltimestamp|te)|g(?:10|2)|ad_file|wer)|i(?:kel(?:ihood|y)|nestring)|ast_(?:inser_id|day)|e(?:as|f)t|case|trim|pad)|d(?:a(?:t(?:e(?:_(?:format|add|sub)|diff)|abase)|y(?:of(?:month|week|year)|name))|e(?:s_(?:de|en)crypt|grees|code)|count|ump)|u(?:n(?:compress(?:ed_length)?|ix_timestamp|likely|hex)|tc_(?:time(?:stamp)?|date)|uid(?:_short)?|pdatexml|case)|t(?:ime(?:_(?:format|to_sec)|stamp(?:diff|add)?|diff)|o(?:(?:second|day)s|_base64|n?char)|r(?:uncate|im))|m(?:a(?:ke(?:_set|date)|ster_pos_wait)|ulti(?:po(?:lygon|int)|linestring)|i(?:crosecon)?d|onthname|d5)|g(?:e(?:t_(?:format|lock)|ometrycollection)|(?:r(?:oup_conca|eates)|tid_subse)t)|p(?:o(?:(?:siti|lyg)on|w)|eriod_(?:diff|add)|rocedure_analyse|g_sleep)|a(?:s(?:cii(?:str)?|in)|es_(?:de|en)crypt|dd(?:dat|tim)e|tan2?)|f(?:rom_(?:unixtime|base64|days)|i(?:el|n)d_in_set|ound_rows)|e(?:x(?:tract(?:value)?|p(?:ort_set)?)|nc(?:rypt|ode)|lt)|b(?:i(?:t_(?:length|count|x?or|and)|n_to_num)|enchmark)|r(?:a(?:wtohex|dians|nd)|elease_lock|ow_count|trim|pad)|o(?:(?:ld_passwo)?rd|ct(?:et_length)?)|we(?:ek(?:ofyear|day)|ight_string)|json(?:_(?:object|array))?|n(?:ame_const|ot_in|ullif)|var(?:_(?:sam|po)p|iance)|qu(?:arter|ote)|hex(?:toraw)?|yearweek|xmltype)\\W*\\(",
1340
+ "options": {
1341
+ "case_sensitive": false,
1342
+ "min_length": 4
1343
+ }
1344
+ },
1345
+ "operator": "match_regex"
1346
+ }
1347
+ ],
1348
+ "transformers": []
1349
+ },
1350
+ {
1351
+ "id": "crs-942-170",
1352
+ "name": "Detects SQL benchmark and sleep injection attempts including conditional queries",
1353
+ "tags": {
1354
+ "type": "sql_injection",
1355
+ "crs_id": "942170",
1356
+ "category": "attack_attempt",
1357
+ "module": "waf"
1358
+ },
1359
+ "conditions": [
1360
+ {
1361
+ "parameters": {
1362
+ "inputs": [
1363
+ {
1364
+ "address": "server.request.query"
1365
+ },
1366
+ {
1367
+ "address": "server.request.body"
1368
+ },
1369
+ {
1370
+ "address": "server.request.path_params"
1371
+ },
1372
+ {
1373
+ "address": "graphql.server.all_resolvers"
1374
+ },
1375
+ {
1376
+ "address": "graphql.server.resolver"
1377
+ }
1378
+ ],
1379
+ "regex": "(?:select|;)\\s+(?:benchmark|sleep|if)\\s*?\\(\\s*?\\(?\\s*?\\w+",
1380
+ "options": {
1381
+ "min_length": 6
1382
+ }
1383
+ },
1384
+ "operator": "match_regex"
1385
+ }
1386
+ ],
1387
+ "transformers": []
1388
+ },
1389
+ {
1390
+ "id": "crs-942-190",
1391
+ "name": "Detects MSSQL code execution and information gathering attempts",
1392
+ "tags": {
1393
+ "type": "sql_injection",
1394
+ "crs_id": "942190",
1395
+ "category": "attack_attempt",
1396
+ "cwe": "89",
1397
+ "module": "waf"
1398
+ },
1399
+ "conditions": [
1400
+ {
1401
+ "parameters": {
1402
+ "inputs": [
1403
+ {
1404
+ "address": "server.request.query"
1405
+ },
1406
+ {
1407
+ "address": "server.request.body"
1408
+ },
1409
+ {
1410
+ "address": "server.request.path_params"
1411
+ },
1412
+ {
1413
+ "address": "grpc.server.request.message"
1414
+ },
1415
+ {
1416
+ "address": "graphql.server.all_resolvers"
1417
+ },
1418
+ {
1419
+ "address": "graphql.server.resolver"
1420
+ }
1421
+ ],
1422
+ "regex": "(?:\\b(?:u(?:nion(?:[\\w(?:\\s]*?select|\\sselect\\s@)|ser\\s*?\\([^\\)]*?)|(?:c(?:onnection_id|urrent_user)|database)\\s*?\\([^\\)]*?|s(?:chema\\s*?\\([^\\)]*?|elect.*?\\w?user\\()|into[\\s+]+(?:dump|out)file\\s*?[\\\"'`]|from\\W+information_schema\\W|exec(?:ute)?\\s+master\\.)|[\\\"'`](?:;?\\s*?(?:union\\b\\s*?(?:(?:distin|sele)ct|all)|having|select)\\b\\s*?[^\\s]|\\s*?!\\s*?[\\\"'`\\w])|\\s*?exec(?:ute)?.*?\\Wxp_cmdshell|\\Wiif\\s*?\\()",
1423
+ "options": {
1424
+ "min_length": 3
1425
+ }
1426
+ },
1427
+ "operator": "match_regex"
1428
+ }
1429
+ ],
1430
+ "transformers": []
1431
+ },
1432
+ {
1433
+ "id": "crs-942-230",
1434
+ "name": "Detects conditional SQL injection attempts",
1435
+ "tags": {
1436
+ "type": "sql_injection",
1437
+ "crs_id": "942230",
1438
+ "category": "attack_attempt",
1439
+ "module": "waf"
1440
+ },
1441
+ "conditions": [
1442
+ {
1443
+ "parameters": {
1444
+ "inputs": [
1445
+ {
1446
+ "address": "server.request.query"
1447
+ },
1448
+ {
1449
+ "address": "server.request.body"
1450
+ },
1451
+ {
1452
+ "address": "server.request.path_params"
1453
+ },
1454
+ {
1455
+ "address": "graphql.server.all_resolvers"
1456
+ },
1457
+ {
1458
+ "address": "graphql.server.resolver"
1459
+ }
1460
+ ],
1461
+ "regex": "(?:select.*?having\\s*?[^\\s]+\\s*?[^\\w\\s]|[\\s(?:)]case\\s+when.*?then|\\)\\s*?like\\s*?\\()",
1462
+ "options": {
1463
+ "case_sensitive": false,
1464
+ "min_length": 5
1465
+ }
1466
+ },
1467
+ "operator": "match_regex"
1468
+ }
1469
+ ],
1470
+ "transformers": []
1471
+ },
1472
+ {
1473
+ "id": "crs-942-320",
1474
+ "name": "Detects MySQL and PostgreSQL stored procedure/function injections",
1475
+ "tags": {
1476
+ "type": "sql_injection",
1477
+ "crs_id": "942320",
1478
+ "category": "attack_attempt",
1479
+ "module": "waf"
1480
+ },
1481
+ "conditions": [
1482
+ {
1483
+ "parameters": {
1484
+ "inputs": [
1485
+ {
1486
+ "address": "server.request.query"
1487
+ },
1488
+ {
1489
+ "address": "server.request.body"
1490
+ },
1491
+ {
1492
+ "address": "server.request.path_params"
1493
+ },
1494
+ {
1495
+ "address": "graphql.server.all_resolvers"
1496
+ },
1497
+ {
1498
+ "address": "graphql.server.resolver"
1499
+ }
1500
+ ],
1501
+ "regex": "(?:create\\s+(?:procedure|function)\\s*?\\w+\\s*?\\(\\s*?\\)\\s*?-|;\\s*?(?:declare|open)\\s+[\\w-]+|procedure\\s+analyse\\s*?\\(|declare[^\\w]+[@#]\\s*?\\w+|exec\\s*?\\(\\s*?@)",
1502
+ "options": {
1503
+ "min_length": 6
1504
+ }
1505
+ },
1506
+ "operator": "match_regex"
1507
+ }
1508
+ ],
1509
+ "transformers": []
1510
+ },
1511
+ {
1512
+ "id": "crs-942-350",
1513
+ "name": "Detects MySQL UDF injection and other data/structure manipulation attempts",
1514
+ "tags": {
1515
+ "type": "sql_injection",
1516
+ "crs_id": "942350",
1517
+ "category": "attack_attempt",
1518
+ "module": "waf"
1519
+ },
1520
+ "conditions": [
1521
+ {
1522
+ "parameters": {
1523
+ "inputs": [
1524
+ {
1525
+ "address": "server.request.query"
1526
+ },
1527
+ {
1528
+ "address": "server.request.body"
1529
+ },
1530
+ {
1531
+ "address": "server.request.path_params"
1532
+ },
1533
+ {
1534
+ "address": "graphql.server.all_resolvers"
1535
+ },
1536
+ {
1537
+ "address": "graphql.server.resolver"
1538
+ }
1539
+ ],
1540
+ "regex": "(?:;\\s*?(?:(?:(?:trunc|cre|upd)at|renam)e|d(?:e(?:lete|sc)|rop)|(?:inser|selec)t|alter|load)\\b\\s*?[\\[(?:]?\\w{2,}|create\\s+function\\s.+\\sreturns)",
1541
+ "options": {
1542
+ "min_length": 7
1543
+ }
1544
+ },
1545
+ "operator": "match_regex"
1546
+ }
1547
+ ],
1548
+ "transformers": []
1549
+ },
1550
+ {
1551
+ "id": "crs-944-240",
1552
+ "name": "Remote Command Execution: Java serialization (CVE-2015-4852)",
1553
+ "tags": {
1554
+ "type": "java_code_injection",
1555
+ "crs_id": "944240",
1556
+ "category": "attack_attempt",
1557
+ "module": "waf"
1558
+ },
1559
+ "conditions": [
1560
+ {
1561
+ "parameters": {
1562
+ "inputs": [
1563
+ {
1564
+ "address": "server.request.query"
1565
+ },
1566
+ {
1567
+ "address": "server.request.body"
1568
+ },
1569
+ {
1570
+ "address": "server.request.path_params"
1571
+ },
1572
+ {
1573
+ "address": "graphql.server.all_resolvers"
1574
+ },
1575
+ {
1576
+ "address": "graphql.server.resolver"
1577
+ },
1578
+ {
1579
+ "address": "server.request.headers.no_cookies"
1580
+ }
1581
+ ],
1582
+ "regex": "(?:clonetransformer|forclosure|instantiatefactory|instantiatetransformer|invokertransformer|prototypeclonefactory|prototypeserializationfactory|whileclosure|getproperty|filewriter|xmldecoder)",
1583
+ "options": {
1584
+ "case_sensitive": true,
1585
+ "min_length": 10
1586
+ }
1587
+ },
1588
+ "operator": "match_regex"
1589
+ }
1590
+ ],
1591
+ "transformers": [
1592
+ "lowercase"
1593
+ ]
1594
+ },
1595
+ {
1596
+ "id": "sqr-000-003",
1597
+ "name": "Obfuscated Path Traversal Attack (/../) on any parameter",
1598
+ "tags": {
1599
+ "type": "lfi",
1600
+ "category": "attack_attempt",
1601
+ "cwe": "22",
1602
+ "capec": "1000/255/153/126",
1603
+ "module": "waf"
1604
+ },
1605
+ "conditions": [
1606
+ {
1607
+ "parameters": {
1608
+ "inputs": [
1609
+ {
1610
+ "address": "server.request.query"
1611
+ },
1612
+ {
1613
+ "address": "server.request.body"
1614
+ },
1615
+ {
1616
+ "address": "server.request.path_params"
1617
+ },
1618
+ {
1619
+ "address": "graphql.server.all_resolvers"
1620
+ },
1621
+ {
1622
+ "address": "graphql.server.resolver"
1623
+ }
1624
+ ],
1625
+ "regex": "(?:%(?:c(?:0%(?:[2aq]f|5c|9v)|1%(?:[19p]c|8s|af))|2(?:5(?:c(?:0%25af|1%259c)|2f|5c)|%46|f)|(?:(?:f(?:8%8)?0%8|e)0%80%a|bg%q)f|%3(?:2(?:%(?:%6|4)6|F)|5%%63)|u(?:221[56]|002f|EFC8|F025)|1u|5c)|0x(?:2f|5c)|\\/|\\x5c)(?:%(?:(?:f(?:(?:c%80|8)%8)?0%8|e)0%80%ae|2(?:(?:5(?:c0%25a|2))?e|%45)|u(?:(?:002|ff0)e|2024)|%32(?:%(?:%6|4)5|E)|c0(?:%[256aef]e|\\.))|\\.(?:%0[01]|\\?)?|\\?\\.?|0x2e){2,3}(?:%(?:c(?:0%(?:[2aq]f|5c|9v)|1%(?:[19p]c|8s|af))|2(?:5(?:c(?:0%25af|1%259c)|2f|5c)|%46|f)|(?:(?:f(?:8%8)?0%8|e)0%80%a|bg%q)f|%3(?:2(?:%(?:%6|4)6|F)|5%%63)|u(?:221[56]|002f|EFC8|F025)|1u|5c)|0x(?:2f|5c)|\\/|\\x5c)",
1626
+ "options": {
1627
+ "min_length": 4
1628
+ }
1629
+ },
1630
+ "operator": "match_regex"
1631
+ }
1632
+ ],
1633
+ "transformers": []
1634
+ },
1635
+ {
1636
+ "id": "sqr-000-004",
1637
+ "name": "Obfuscated Path Traversal Attack (/../) on any parameter",
1638
+ "tags": {
1639
+ "type": "lfi",
1640
+ "category": "attack_attempt",
1641
+ "cwe": "22",
1642
+ "capec": "1000/255/153/126",
1643
+ "module": "waf"
1644
+ },
1645
+ "conditions": [
1646
+ {
1647
+ "parameters": {
1648
+ "inputs": [
1649
+ {
1650
+ "address": "server.request.query"
1651
+ },
1652
+ {
1653
+ "address": "server.request.body"
1654
+ },
1655
+ {
1656
+ "address": "server.request.path_params"
1657
+ },
1658
+ {
1659
+ "address": "graphql.server.all_resolvers"
1660
+ },
1661
+ {
1662
+ "address": "graphql.server.resolver"
1663
+ }
1664
+ ],
1665
+ "regex": "(?:(?:^|[\\x5c/])\\.{2,3}[\\x5c/]|[\\x5c/]\\.{2,3}(?:[\\x5c/]|$))",
1666
+ "options": {
1667
+ "case_sensitive": true,
1668
+ "min_length": 3
1669
+ }
1670
+ },
1671
+ "operator": "match_regex"
1672
+ }
1673
+ ],
1674
+ "transformers": [
1675
+ "removeNulls"
1676
+ ]
1677
+ },
1678
+ {
1679
+ "id": "sqr-000-007",
1680
+ "name": "NoSQL: Detect common exploitation strategy",
1681
+ "tags": {
1682
+ "type": "nosql_injection",
1683
+ "category": "attack_attempt",
1684
+ "cwe": "943",
1685
+ "module": "waf"
1686
+ },
1687
+ "conditions": [
1688
+ {
1689
+ "parameters": {
1690
+ "inputs": [
1691
+ {
1692
+ "address": "server.request.query"
1693
+ },
1694
+ {
1695
+ "address": "server.request.body"
1696
+ },
1697
+ {
1698
+ "address": "server.request.path_params"
1699
+ },
1700
+ {
1701
+ "address": "graphql.server.all_resolvers"
1702
+ },
1703
+ {
1704
+ "address": "graphql.server.resolver"
1705
+ }
1706
+ ],
1707
+ "regex": "^\\$(eq|ne|(l|g)te?|n?in|not|(n|x|)or|and|regex|where|expr|exists)$"
1708
+ },
1709
+ "operator": "match_regex"
1710
+ }
1711
+ ],
1712
+ "transformers": [
1713
+ "keys_only"
1714
+ ]
1715
+ },
1716
+ {
1717
+ "id": "sqr-000-011",
1718
+ "name": "Node.js: Prototype pollution",
1719
+ "tags": {
1720
+ "type": "js_code_injection",
1721
+ "category": "attack_attempt",
1722
+ "module": "waf"
1723
+ },
1724
+ "conditions": [
1725
+ {
1726
+ "parameters": {
1727
+ "inputs": [
1728
+ {
1729
+ "address": "server.request.query"
1730
+ },
1731
+ {
1732
+ "address": "server.request.body"
1733
+ },
1734
+ {
1735
+ "address": "server.request.path_params"
1736
+ },
1737
+ {
1738
+ "address": "server.request.headers.no_cookies"
1739
+ }
1740
+ ],
1741
+ "regex": "__proto__[\\.\\[]"
1742
+ },
1743
+ "operator": "match_regex"
1744
+ }
1745
+ ],
1746
+ "transformers": []
1747
+ }
1748
+ ],
1749
+ "rules_compat": [],
1750
+ "processors": [
1751
+ {
1752
+ "id": "http-endpoint-fingerprint",
1753
+ "generator": "http_endpoint_fingerprint",
1754
+ "conditions": [],
1755
+ "parameters": {
1756
+ "mappings": [
1757
+ {
1758
+ "method": [
1759
+ {
1760
+ "address": "server.request.method"
1761
+ }
1762
+ ],
1763
+ "uri_raw": [
1764
+ {
1765
+ "address": "server.request.uri.raw"
1766
+ }
1767
+ ],
1768
+ "body": [
1769
+ {
1770
+ "address": "server.request.body"
1771
+ }
1772
+ ],
1773
+ "query": [
1774
+ {
1775
+ "address": "server.request.query"
1776
+ }
1777
+ ],
1778
+ "output": "_dd.appsec.fp.http.endpoint"
1779
+ }
1780
+ ]
1781
+ },
1782
+ "evaluate": true,
1783
+ "output": true
1784
+ },
1785
+ {
1786
+ "id": "extract-content",
1787
+ "generator": "extract_schema",
1788
+ "conditions": [
1789
+ {
1790
+ "operator": "equals",
1791
+ "parameters": {
1792
+ "inputs": [
1793
+ {
1794
+ "address": "waf.context.processor",
1795
+ "key_path": [
1796
+ "extract-schema"
1797
+ ]
1798
+ }
1799
+ ],
1800
+ "type": "boolean",
1801
+ "value": true
1802
+ }
1803
+ }
1804
+ ],
1805
+ "parameters": {
1806
+ "mappings": [
1807
+ {
1808
+ "inputs": [
1809
+ {
1810
+ "address": "server.request.body"
1811
+ }
1812
+ ],
1813
+ "output": "_dd.appsec.s.req.body"
1814
+ },
1815
+ {
1816
+ "inputs": [
1817
+ {
1818
+ "address": "server.request.cookies"
1819
+ }
1820
+ ],
1821
+ "output": "_dd.appsec.s.req.cookies"
1822
+ },
1823
+ {
1824
+ "inputs": [
1825
+ {
1826
+ "address": "server.request.query"
1827
+ }
1828
+ ],
1829
+ "output": "_dd.appsec.s.req.query"
1830
+ },
1831
+ {
1832
+ "inputs": [
1833
+ {
1834
+ "address": "server.request.path_params"
1835
+ }
1836
+ ],
1837
+ "output": "_dd.appsec.s.req.params"
1838
+ },
1839
+ {
1840
+ "inputs": [
1841
+ {
1842
+ "address": "server.response.body"
1843
+ }
1844
+ ],
1845
+ "output": "_dd.appsec.s.res.body"
1846
+ },
1847
+ {
1848
+ "inputs": [
1849
+ {
1850
+ "address": "graphql.server.all_resolvers"
1851
+ }
1852
+ ],
1853
+ "output": "_dd.appsec.s.graphql.all_resolvers"
1854
+ },
1855
+ {
1856
+ "inputs": [
1857
+ {
1858
+ "address": "graphql.server.resolver"
1859
+ }
1860
+ ],
1861
+ "output": "_dd.appsec.s.graphql.resolver"
1862
+ }
1863
+ ],
1864
+ "scanners": [
1865
+ {
1866
+ "tags": {
1867
+ "category": "payment"
1868
+ }
1869
+ },
1870
+ {
1871
+ "tags": {
1872
+ "category": "pii"
1873
+ }
1874
+ }
1875
+ ]
1876
+ },
1877
+ "evaluate": false,
1878
+ "output": true
1879
+ },
1880
+ {
1881
+ "id": "extract-headers",
1882
+ "generator": "extract_schema",
1883
+ "conditions": [
1884
+ {
1885
+ "operator": "equals",
1886
+ "parameters": {
1887
+ "inputs": [
1888
+ {
1889
+ "address": "waf.context.processor",
1890
+ "key_path": [
1891
+ "extract-schema"
1892
+ ]
1893
+ }
1894
+ ],
1895
+ "type": "boolean",
1896
+ "value": true
1897
+ }
1898
+ }
1899
+ ],
1900
+ "parameters": {
1901
+ "mappings": [
1902
+ {
1903
+ "inputs": [
1904
+ {
1905
+ "address": "server.request.headers.no_cookies"
1906
+ }
1907
+ ],
1908
+ "output": "_dd.appsec.s.req.headers"
1909
+ },
1910
+ {
1911
+ "inputs": [
1912
+ {
1913
+ "address": "server.response.headers.no_cookies"
1914
+ }
1915
+ ],
1916
+ "output": "_dd.appsec.s.res.headers"
1917
+ }
1918
+ ],
1919
+ "scanners": [
1920
+ {
1921
+ "tags": {
1922
+ "category": "credentials"
1923
+ }
1924
+ },
1925
+ {
1926
+ "tags": {
1927
+ "category": "pii"
1928
+ }
1929
+ }
1930
+ ]
1931
+ },
1932
+ "evaluate": false,
1933
+ "output": true
1934
+ },
1935
+ {
1936
+ "id": "http-header-fingerprint",
1937
+ "generator": "http_header_fingerprint",
1938
+ "conditions": [],
1939
+ "parameters": {
1940
+ "mappings": [
1941
+ {
1942
+ "headers": [
1943
+ {
1944
+ "address": "server.request.headers.no_cookies"
1945
+ }
1946
+ ],
1947
+ "output": "_dd.appsec.fp.http.header"
1948
+ }
1949
+ ]
1950
+ },
1951
+ "evaluate": true,
1952
+ "output": true
1953
+ },
1954
+ {
1955
+ "id": "decode-auth-jwt",
1956
+ "generator": "jwt_decode",
1957
+ "min_version": "1.25.0",
1958
+ "parameters": {
1959
+ "mappings": [
1960
+ {
1961
+ "inputs": [
1962
+ {
1963
+ "address": "server.request.headers.no_cookies",
1964
+ "key_path": [
1965
+ "authorization"
1966
+ ]
1967
+ }
1968
+ ],
1969
+ "output": "server.request.jwt"
1970
+ }
1971
+ ]
1972
+ },
1973
+ "evaluate": true,
1974
+ "output": false
1975
+ },
1976
+ {
1977
+ "id": "http-network-fingerprint",
1978
+ "generator": "http_network_fingerprint",
1979
+ "conditions": [],
1980
+ "parameters": {
1981
+ "mappings": [
1982
+ {
1983
+ "headers": [
1984
+ {
1985
+ "address": "server.request.headers.no_cookies"
1986
+ }
1987
+ ],
1988
+ "output": "_dd.appsec.fp.http.network"
1989
+ }
1990
+ ]
1991
+ },
1992
+ "evaluate": true,
1993
+ "output": true
1994
+ },
1995
+ {
1996
+ "id": "session-fingerprint",
1997
+ "generator": "session_fingerprint",
1998
+ "conditions": [],
1999
+ "parameters": {
2000
+ "mappings": [
2001
+ {
2002
+ "cookies": [
2003
+ {
2004
+ "address": "server.request.cookies"
2005
+ }
2006
+ ],
2007
+ "session_id": [
2008
+ {
2009
+ "address": "usr.session_id"
2010
+ }
2011
+ ],
2012
+ "user_id": [
2013
+ {
2014
+ "address": "usr.id"
2015
+ }
2016
+ ],
2017
+ "output": "_dd.appsec.fp.session"
2018
+ }
2019
+ ]
2020
+ },
2021
+ "evaluate": true,
2022
+ "output": true
2023
+ }
2024
+ ],
2025
+ "scanners": [
2026
+ {
2027
+ "id": "406f8606-52c4-4663-8db9-df70f9e8766c",
2028
+ "name": "ZIP Code",
2029
+ "key": {
2030
+ "operator": "match_regex",
2031
+ "parameters": {
2032
+ "regex": "\\b(?:zip|postal)\\b",
2033
+ "options": {
2034
+ "case_sensitive": false,
2035
+ "min_length": 3
2036
+ }
2037
+ }
2038
+ },
2039
+ "value": {
2040
+ "operator": "match_regex",
2041
+ "parameters": {
2042
+ "regex": "^[0-9]{5}(?:-[0-9]{4})?$",
2043
+ "options": {
2044
+ "case_sensitive": true,
2045
+ "min_length": 5
2046
+ }
2047
+ }
2048
+ },
2049
+ "tags": {
2050
+ "type": "zipcode",
2051
+ "category": "address"
2052
+ }
2053
+ },
2054
+ {
2055
+ "id": "JU1sRk3mSzqSUJn6GrVn7g",
2056
+ "name": "American Express Card Scanner (4+4+4+3 digits)",
2057
+ "key": {
2058
+ "operator": "match_regex",
2059
+ "parameters": {
2060
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2061
+ "options": {
2062
+ "case_sensitive": false,
2063
+ "min_length": 3
2064
+ }
2065
+ }
2066
+ },
2067
+ "value": {
2068
+ "operator": "match_regex",
2069
+ "parameters": {
2070
+ "regex": "\\b3[47]\\d{2}(?:(?:\\s\\d{4}\\s\\d{4}\\s\\d{3})|(?:\\,\\d{4}\\,\\d{4}\\,\\d{3})|(?:-\\d{4}-\\d{4}-\\d{3})|(?:\\.\\d{4}\\.\\d{4}\\.\\d{3}))\\b",
2071
+ "options": {
2072
+ "case_sensitive": false,
2073
+ "min_length": 16
2074
+ }
2075
+ }
2076
+ },
2077
+ "tags": {
2078
+ "type": "card",
2079
+ "card_type": "amex",
2080
+ "category": "payment"
2081
+ }
2082
+ },
2083
+ {
2084
+ "id": "edmH513UTQWcRiQ9UnzHlw-mod",
2085
+ "name": "American Express Card Scanner (4+6|5+5|6 digits)",
2086
+ "key": {
2087
+ "operator": "match_regex",
2088
+ "parameters": {
2089
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2090
+ "options": {
2091
+ "case_sensitive": false,
2092
+ "min_length": 3
2093
+ }
2094
+ }
2095
+ },
2096
+ "value": {
2097
+ "operator": "match_regex",
2098
+ "parameters": {
2099
+ "regex": "\\b3[47]\\d{2}(?:(?:\\s\\d{5,6}\\s\\d{5,6})|(?:\\.\\d{5,6}\\.\\d{5,6})|(?:-\\d{5,6}-\\d{5,6})|(?:,\\d{5,6},\\d{5,6}))\\b",
2100
+ "options": {
2101
+ "case_sensitive": false,
2102
+ "min_length": 17
2103
+ }
2104
+ }
2105
+ },
2106
+ "tags": {
2107
+ "type": "card",
2108
+ "card_type": "amex",
2109
+ "category": "payment"
2110
+ }
2111
+ },
2112
+ {
2113
+ "id": "e6K4h_7qTLaMiAbaNXoSZA",
2114
+ "name": "American Express Card Scanner (8+7 digits)",
2115
+ "key": {
2116
+ "operator": "match_regex",
2117
+ "parameters": {
2118
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2119
+ "options": {
2120
+ "case_sensitive": false,
2121
+ "min_length": 3
2122
+ }
2123
+ }
2124
+ },
2125
+ "value": {
2126
+ "operator": "match_regex",
2127
+ "parameters": {
2128
+ "regex": "\\b3[47]\\d{6}(?:(?:\\s\\d{7})|(?:\\,\\d{7})|(?:-\\d{7})|(?:\\.\\d{7}))\\b",
2129
+ "options": {
2130
+ "case_sensitive": false,
2131
+ "min_length": 16
2132
+ }
2133
+ }
2134
+ },
2135
+ "tags": {
2136
+ "type": "card",
2137
+ "card_type": "amex",
2138
+ "category": "payment"
2139
+ }
2140
+ },
2141
+ {
2142
+ "id": "K2rZflWzRhGM9HiTc6whyQ",
2143
+ "name": "American Express Card Scanner (1x15 digits)",
2144
+ "key": {
2145
+ "operator": "match_regex",
2146
+ "parameters": {
2147
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2148
+ "options": {
2149
+ "case_sensitive": false,
2150
+ "min_length": 3
2151
+ }
2152
+ }
2153
+ },
2154
+ "value": {
2155
+ "operator": "match_regex",
2156
+ "parameters": {
2157
+ "regex": "\\b3[47]\\d{13}\\b",
2158
+ "options": {
2159
+ "case_sensitive": false,
2160
+ "min_length": 15
2161
+ }
2162
+ }
2163
+ },
2164
+ "tags": {
2165
+ "type": "card",
2166
+ "card_type": "amex",
2167
+ "category": "payment"
2168
+ }
2169
+ },
2170
+ {
2171
+ "id": "9d7756e343cefa22a5c098e1092590f806eb5446",
2172
+ "name": "Basic Authentication Scanner",
2173
+ "key": {
2174
+ "operator": "match_regex",
2175
+ "parameters": {
2176
+ "regex": "\\bauthorization\\b",
2177
+ "options": {
2178
+ "case_sensitive": false,
2179
+ "min_length": 13
2180
+ }
2181
+ }
2182
+ },
2183
+ "value": {
2184
+ "operator": "match_regex",
2185
+ "parameters": {
2186
+ "regex": "^basic\\s+[A-Za-z0-9+/=]+",
2187
+ "options": {
2188
+ "case_sensitive": false,
2189
+ "min_length": 7
2190
+ }
2191
+ }
2192
+ },
2193
+ "tags": {
2194
+ "type": "basic_auth",
2195
+ "category": "credentials"
2196
+ }
2197
+ },
2198
+ {
2199
+ "id": "mZy8XjZLReC9smpERXWnnw",
2200
+ "name": "Bearer Authentication Scanner",
2201
+ "key": {
2202
+ "operator": "match_regex",
2203
+ "parameters": {
2204
+ "regex": "\\bauthorization\\b",
2205
+ "options": {
2206
+ "case_sensitive": false,
2207
+ "min_length": 13
2208
+ }
2209
+ }
2210
+ },
2211
+ "value": {
2212
+ "operator": "match_regex",
2213
+ "parameters": {
2214
+ "regex": "^bearer\\s+[-a-z0-9._~+/]{4,}",
2215
+ "options": {
2216
+ "case_sensitive": false,
2217
+ "min_length": 11
2218
+ }
2219
+ }
2220
+ },
2221
+ "tags": {
2222
+ "type": "bearer_token",
2223
+ "category": "credentials"
2224
+ }
2225
+ },
2226
+ {
2227
+ "id": "450239afc250a19799b6c03dc0e16fd6a4b2a1af",
2228
+ "name": "Canadian Social Insurance Number Scanner",
2229
+ "key": {
2230
+ "operator": "match_regex",
2231
+ "parameters": {
2232
+ "regex": "\\b(?:social[\\s_]?(?:insurance(?:\\s+number)?)?|SIN|Canadian[\\s_]?(?:social[\\s_]?(?:insurance)?|insurance[\\s_]?number)?)\\b",
2233
+ "options": {
2234
+ "case_sensitive": false,
2235
+ "min_length": 3
2236
+ }
2237
+ }
2238
+ },
2239
+ "value": {
2240
+ "operator": "match_regex",
2241
+ "parameters": {
2242
+ "regex": "\\b\\d{3}-\\d{3}-\\d{3}\\b",
2243
+ "options": {
2244
+ "case_sensitive": false,
2245
+ "min_length": 11
2246
+ }
2247
+ }
2248
+ },
2249
+ "tags": {
2250
+ "type": "canadian_sin",
2251
+ "category": "pii"
2252
+ }
2253
+ },
2254
+ {
2255
+ "id": "87a879ff33693b46c8a614d8211f5a2c289beca0",
2256
+ "name": "Digest Authentication Scanner",
2257
+ "key": {
2258
+ "operator": "match_regex",
2259
+ "parameters": {
2260
+ "regex": "\\bauthorization\\b",
2261
+ "options": {
2262
+ "case_sensitive": false,
2263
+ "min_length": 13
2264
+ }
2265
+ }
2266
+ },
2267
+ "value": {
2268
+ "operator": "match_regex",
2269
+ "parameters": {
2270
+ "regex": "^digest\\s+",
2271
+ "options": {
2272
+ "case_sensitive": false,
2273
+ "min_length": 7
2274
+ }
2275
+ }
2276
+ },
2277
+ "tags": {
2278
+ "type": "digest_auth",
2279
+ "category": "credentials"
2280
+ }
2281
+ },
2282
+ {
2283
+ "id": "qWumeP1GQUa_E4ffAnT-Yg",
2284
+ "name": "American Express Card Scanner (1x14 digits)",
2285
+ "key": {
2286
+ "operator": "match_regex",
2287
+ "parameters": {
2288
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2289
+ "options": {
2290
+ "case_sensitive": false,
2291
+ "min_length": 3
2292
+ }
2293
+ }
2294
+ },
2295
+ "value": {
2296
+ "operator": "match_regex",
2297
+ "parameters": {
2298
+ "regex": "(?:30[0-59]\\d|3[689]\\d{2})(?:\\d{10})",
2299
+ "options": {
2300
+ "case_sensitive": false,
2301
+ "min_length": 14
2302
+ }
2303
+ }
2304
+ },
2305
+ "tags": {
2306
+ "type": "card",
2307
+ "card_type": "diners",
2308
+ "category": "payment"
2309
+ }
2310
+ },
2311
+ {
2312
+ "id": "NlTWWM5LS6W0GSqBLuvtRw",
2313
+ "name": "Diners Card Scanner (4+4+4+2 digits)",
2314
+ "key": {
2315
+ "operator": "match_regex",
2316
+ "parameters": {
2317
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2318
+ "options": {
2319
+ "case_sensitive": false,
2320
+ "min_length": 3
2321
+ }
2322
+ }
2323
+ },
2324
+ "value": {
2325
+ "operator": "match_regex",
2326
+ "parameters": {
2327
+ "regex": "\\b(?:30[0-59]\\d|3[689]\\d{2})(?:(?:\\s\\d{4}\\s\\d{4}\\s\\d{2})|(?:\\,\\d{4}\\,\\d{4}\\,\\d{2})|(?:-\\d{4}-\\d{4}-\\d{2})|(?:\\.\\d{4}\\.\\d{4}\\.\\d{2}))\\b",
2328
+ "options": {
2329
+ "case_sensitive": false,
2330
+ "min_length": 17
2331
+ }
2332
+ }
2333
+ },
2334
+ "tags": {
2335
+ "type": "card",
2336
+ "card_type": "diners",
2337
+ "category": "payment"
2338
+ }
2339
+ },
2340
+ {
2341
+ "id": "Xr5VdbQSTXitYGGiTfxBpw",
2342
+ "name": "Diners Card Scanner (4+6+4 digits)",
2343
+ "key": {
2344
+ "operator": "match_regex",
2345
+ "parameters": {
2346
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2347
+ "options": {
2348
+ "case_sensitive": false,
2349
+ "min_length": 3
2350
+ }
2351
+ }
2352
+ },
2353
+ "value": {
2354
+ "operator": "match_regex",
2355
+ "parameters": {
2356
+ "regex": "\\b(?:30[0-59]\\d|3[689]\\d{2})(?:(?:\\s\\d{6}\\s\\d{4})|(?:\\.\\d{6}\\.\\d{4})|(?:-\\d{6}-\\d{4})|(?:,\\d{6},\\d{4}))\\b",
2357
+ "options": {
2358
+ "case_sensitive": false,
2359
+ "min_length": 16
2360
+ }
2361
+ }
2362
+ },
2363
+ "tags": {
2364
+ "type": "card",
2365
+ "card_type": "diners",
2366
+ "category": "payment"
2367
+ }
2368
+ },
2369
+ {
2370
+ "id": "gAbunN_WQNytxu54DjcbAA-mod",
2371
+ "name": "Diners Card Scanner (8+6 digits)",
2372
+ "key": {
2373
+ "operator": "match_regex",
2374
+ "parameters": {
2375
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2376
+ "options": {
2377
+ "case_sensitive": false,
2378
+ "min_length": 3
2379
+ }
2380
+ }
2381
+ },
2382
+ "value": {
2383
+ "operator": "match_regex",
2384
+ "parameters": {
2385
+ "regex": "\\b(?:30[0-59]\\d{5}|3[689]\\d{6})\\s?(?:(?:\\s\\d{6})|(?:\\,\\d{6})|(?:-\\d{6})|(?:\\.\\d{6}))\\b",
2386
+ "options": {
2387
+ "case_sensitive": false,
2388
+ "min_length": 14
2389
+ }
2390
+ }
2391
+ },
2392
+ "tags": {
2393
+ "type": "card",
2394
+ "card_type": "diners",
2395
+ "category": "payment"
2396
+ }
2397
+ },
2398
+ {
2399
+ "id": "9cs4qCfEQBeX17U7AepOvQ",
2400
+ "name": "MasterCard Scanner (2x8 digits)",
2401
+ "key": {
2402
+ "operator": "match_regex",
2403
+ "parameters": {
2404
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2405
+ "options": {
2406
+ "case_sensitive": false,
2407
+ "min_length": 3
2408
+ }
2409
+ }
2410
+ },
2411
+ "value": {
2412
+ "operator": "match_regex",
2413
+ "parameters": {
2414
+ "regex": "\\b(?:6221(?:2[6-9]|[3-9][0-9])\\d{2}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8})|6229(?:[01][0-9]|2[0-5])\\d{2}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8})|(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])\\d{4}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8}))\\b",
2415
+ "options": {
2416
+ "case_sensitive": false,
2417
+ "min_length": 16
2418
+ }
2419
+ }
2420
+ },
2421
+ "tags": {
2422
+ "type": "card",
2423
+ "card_type": "discover",
2424
+ "category": "payment"
2425
+ }
2426
+ },
2427
+ {
2428
+ "id": "YBIDWJIvQWW_TFOyU0CGJg",
2429
+ "name": "Discover Card Scanner (4x4 digits)",
2430
+ "key": {
2431
+ "operator": "match_regex",
2432
+ "parameters": {
2433
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2434
+ "options": {
2435
+ "case_sensitive": false,
2436
+ "min_length": 3
2437
+ }
2438
+ }
2439
+ },
2440
+ "value": {
2441
+ "operator": "match_regex",
2442
+ "parameters": {
2443
+ "regex": "\\b(?:(?:(?:6221(?:2[6-9]|[3-9][0-9])\\d{2}(?:,\\d{4}){2})|(?:6221\\s(?:2[6-9]|[3-9][0-9])\\d{2}(?:\\s\\d{4}){2})|(?:6221\\.(?:2[6-9]|[3-9][0-9])\\d{2}(?:\\.\\d{4}){2})|(?:6221-(?:2[6-9]|[3-9][0-9])\\d{2}(?:-\\d{4}){2}))|(?:(?:6229(?:[01][0-9]|2[0-5])\\d{2}(?:,\\d{4}){2})|(?:6229\\s(?:[01][0-9]|2[0-5])\\d{2}(?:\\s\\d{4}){2})|(?:6229\\.(?:[01][0-9]|2[0-5])\\d{2}(?:\\.\\d{4}){2})|(?:6229-(?:[01][0-9]|2[0-5])\\d{2}(?:-\\d{4}){2}))|(?:(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})))\\b",
2444
+ "options": {
2445
+ "case_sensitive": false,
2446
+ "min_length": 16
2447
+ }
2448
+ }
2449
+ },
2450
+ "tags": {
2451
+ "type": "card",
2452
+ "card_type": "discover",
2453
+ "category": "payment"
2454
+ }
2455
+ },
2456
+ {
2457
+ "id": "12cpbjtVTMaMutFhh9sojQ",
2458
+ "name": "Discover Card Scanner (1x16 digits)",
2459
+ "key": {
2460
+ "operator": "match_regex",
2461
+ "parameters": {
2462
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2463
+ "options": {
2464
+ "case_sensitive": false,
2465
+ "min_length": 3
2466
+ }
2467
+ }
2468
+ },
2469
+ "value": {
2470
+ "operator": "match_regex",
2471
+ "parameters": {
2472
+ "regex": "\\b(?:6221(?:2[6-9]|[3-9][0-9])\\d{10}|6229(?:[01][0-9]|2[0-5])\\d{10}|(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])\\d{12})\\b",
2473
+ "options": {
2474
+ "case_sensitive": false,
2475
+ "min_length": 16
2476
+ }
2477
+ }
2478
+ },
2479
+ "tags": {
2480
+ "type": "card",
2481
+ "card_type": "discover",
2482
+ "category": "payment"
2483
+ }
2484
+ },
2485
+ {
2486
+ "id": "PuXiVTCkTHOtj0Yad1ppsw",
2487
+ "name": "Standard E-mail Address",
2488
+ "key": {
2489
+ "operator": "match_regex",
2490
+ "parameters": {
2491
+ "regex": "\\b(?:(?:e[-\\s]?)?mail|address|sender|\\bto\\b|from|recipient)\\b",
2492
+ "options": {
2493
+ "case_sensitive": false,
2494
+ "min_length": 2
2495
+ }
2496
+ }
2497
+ },
2498
+ "value": {
2499
+ "operator": "match_regex",
2500
+ "parameters": {
2501
+ "regex": "\\b[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*(%40|@)(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}\\b",
2502
+ "options": {
2503
+ "case_sensitive": false,
2504
+ "min_length": 5
2505
+ }
2506
+ }
2507
+ },
2508
+ "tags": {
2509
+ "type": "email",
2510
+ "category": "pii"
2511
+ }
2512
+ },
2513
+ {
2514
+ "id": "8VS2RKxzR8a_95L5fuwaXQ",
2515
+ "name": "IBAN",
2516
+ "key": {
2517
+ "operator": "match_regex",
2518
+ "parameters": {
2519
+ "regex": "\\b(?:iban|account|sender|receiver)\\b",
2520
+ "options": {
2521
+ "case_sensitive": false,
2522
+ "min_length": 3
2523
+ }
2524
+ }
2525
+ },
2526
+ "value": {
2527
+ "operator": "match_regex",
2528
+ "parameters": {
2529
+ "regex": "\\b(?:NO\\d{2}(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}){4}|(?:HU|PL)\\d{2}(?:[ \\-]?\\d{4}){6}|QA\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?[A-Z0-9]{4}){5}[ \\-]?[A-Z0-9]|PS\\d{2}[ \\-]?[A-Z0-9]{4}(?:[ \\-]?\\d{4}){5}[ \\-]?\\d|UA\\d{2}[ \\-]?\\d{4}[ \\-]?\\d{2}[A-Z0-9]{2}(?:[ \\-]?[A-Z0-9]{4}){4}[ \\-]?[A-Z0-9]|BR\\d{2}(?:[ \\-]?\\d{4}){5}[ \\-]?\\d{3}[A-Z0-9][ \\-]?[A-Z0-9]|EG\\d{2}(?:[ \\-]?\\d{4}){6}\\d|MU\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?\\d{4}){4}\\d{3}[A-Z][ \\-]?[A-Z]{2}|(?:KW|JO)\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?[A-Z0-9]{4}){5}[ \\-]?[A-Z0-9]{2}|MT\\d{2}[ \\-]?[A-Z]{4}[ \\-]?\\d{4}[ \\-]?\\d[A-Z0-9]{3}(?:[ \\-]?[A-Z0-9]{3}){4}[ \\-]?[A-Z0-9]{3}|SC\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?\\d{4}){5}[ \\-]?[A-Z]{3}|LC\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?[A-Z0-9]{4}){6})\\b",
2530
+ "options": {
2531
+ "case_sensitive": false,
2532
+ "min_length": 15
2533
+ }
2534
+ }
2535
+ },
2536
+ "tags": {
2537
+ "type": "iban",
2538
+ "category": "payment"
2539
+ }
2540
+ },
2541
+ {
2542
+ "id": "h6WJcecQTwqvN9KeEtwDvg",
2543
+ "name": "JCB Card Scanner (1x16 digits)",
2544
+ "key": {
2545
+ "operator": "match_regex",
2546
+ "parameters": {
2547
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2548
+ "options": {
2549
+ "case_sensitive": false,
2550
+ "min_length": 3
2551
+ }
2552
+ }
2553
+ },
2554
+ "value": {
2555
+ "operator": "match_regex",
2556
+ "parameters": {
2557
+ "regex": "\\b35(?:2[89]|[3-9][0-9])(?:\\d{12})\\b",
2558
+ "options": {
2559
+ "case_sensitive": false,
2560
+ "min_length": 16
2561
+ }
2562
+ }
2563
+ },
2564
+ "tags": {
2565
+ "type": "card",
2566
+ "card_type": "jcb",
2567
+ "category": "payment"
2568
+ }
2569
+ },
2570
+ {
2571
+ "id": "gcEaMu_VSJ2-bGCEkgyC0w",
2572
+ "name": "JCB Card Scanner (2x8 digits)",
2573
+ "key": {
2574
+ "operator": "match_regex",
2575
+ "parameters": {
2576
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2577
+ "options": {
2578
+ "case_sensitive": false,
2579
+ "min_length": 3
2580
+ }
2581
+ }
2582
+ },
2583
+ "value": {
2584
+ "operator": "match_regex",
2585
+ "parameters": {
2586
+ "regex": "\\b35(?:2[89]|[3-9][0-9])\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))\\b",
2587
+ "options": {
2588
+ "case_sensitive": false,
2589
+ "min_length": 17
2590
+ }
2591
+ }
2592
+ },
2593
+ "tags": {
2594
+ "type": "card",
2595
+ "card_type": "jcb",
2596
+ "category": "payment"
2597
+ }
2598
+ },
2599
+ {
2600
+ "id": "imTliuhXT5GAeRNhqChXQQ",
2601
+ "name": "JCB Card Scanner (4x4 digits)",
2602
+ "key": {
2603
+ "operator": "match_regex",
2604
+ "parameters": {
2605
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2606
+ "options": {
2607
+ "case_sensitive": false,
2608
+ "min_length": 3
2609
+ }
2610
+ }
2611
+ },
2612
+ "value": {
2613
+ "operator": "match_regex",
2614
+ "parameters": {
2615
+ "regex": "\\b35(?:2[89]|[3-9][0-9])(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b",
2616
+ "options": {
2617
+ "case_sensitive": false,
2618
+ "min_length": 16
2619
+ }
2620
+ }
2621
+ },
2622
+ "tags": {
2623
+ "type": "card",
2624
+ "card_type": "jcb",
2625
+ "category": "payment"
2626
+ }
2627
+ },
2628
+ {
2629
+ "id": "9osY3xc9Q7ONAV0zw9Uz4A",
2630
+ "name": "JSON Web Token",
2631
+ "value": {
2632
+ "operator": "match_regex",
2633
+ "parameters": {
2634
+ "regex": "\\bey[I-L][\\w=-]+\\.ey[I-L][\\w=-]+(\\.[\\w.+\\/=-]+)?\\b",
2635
+ "options": {
2636
+ "case_sensitive": false,
2637
+ "min_length": 20
2638
+ }
2639
+ }
2640
+ },
2641
+ "tags": {
2642
+ "type": "json_web_token",
2643
+ "category": "credentials"
2644
+ }
2645
+ },
2646
+ {
2647
+ "id": "d1Q9D3YMRxuVKf6CZInJPw",
2648
+ "name": "Maestro Card Scanner (1x16 digits)",
2649
+ "key": {
2650
+ "operator": "match_regex",
2651
+ "parameters": {
2652
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2653
+ "options": {
2654
+ "case_sensitive": false,
2655
+ "min_length": 3
2656
+ }
2657
+ }
2658
+ },
2659
+ "value": {
2660
+ "operator": "match_regex",
2661
+ "parameters": {
2662
+ "regex": "\\b(?:5[06-9]\\d{2}|6\\d{3})(?:\\d{12})\\b",
2663
+ "options": {
2664
+ "case_sensitive": false,
2665
+ "min_length": 16
2666
+ }
2667
+ }
2668
+ },
2669
+ "tags": {
2670
+ "type": "card",
2671
+ "card_type": "maestro",
2672
+ "category": "payment"
2673
+ }
2674
+ },
2675
+ {
2676
+ "id": "M3YIQKKjRVmoeQuM3pjzrw",
2677
+ "name": "Maestro Card Scanner (2x8 digits)",
2678
+ "key": {
2679
+ "operator": "match_regex",
2680
+ "parameters": {
2681
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2682
+ "options": {
2683
+ "case_sensitive": false,
2684
+ "min_length": 3
2685
+ }
2686
+ }
2687
+ },
2688
+ "value": {
2689
+ "operator": "match_regex",
2690
+ "parameters": {
2691
+ "regex": "\\b(?:5[06-9]\\d{6}|6\\d{7})(?:\\s\\d{8}|\\.\\d{8}|-\\d{8}|,\\d{8})\\b",
2692
+ "options": {
2693
+ "case_sensitive": false,
2694
+ "min_length": 17
2695
+ }
2696
+ }
2697
+ },
2698
+ "tags": {
2699
+ "type": "card",
2700
+ "card_type": "maestro",
2701
+ "category": "payment"
2702
+ }
2703
+ },
2704
+ {
2705
+ "id": "hRxiQBlSSVKcjh5U7LZYLA",
2706
+ "name": "Maestro Card Scanner (4x4 digits)",
2707
+ "key": {
2708
+ "operator": "match_regex",
2709
+ "parameters": {
2710
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2711
+ "options": {
2712
+ "case_sensitive": false,
2713
+ "min_length": 3
2714
+ }
2715
+ }
2716
+ },
2717
+ "value": {
2718
+ "operator": "match_regex",
2719
+ "parameters": {
2720
+ "regex": "\\b(?:5[06-9]\\d{2}|6\\d{3})(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b",
2721
+ "options": {
2722
+ "case_sensitive": false,
2723
+ "min_length": 16
2724
+ }
2725
+ }
2726
+ },
2727
+ "tags": {
2728
+ "type": "card",
2729
+ "card_type": "maestro",
2730
+ "category": "payment"
2731
+ }
2732
+ },
2733
+ {
2734
+ "id": "NwhIYNS4STqZys37WlaIKA",
2735
+ "name": "MasterCard Scanner (2x8 digits)",
2736
+ "key": {
2737
+ "operator": "match_regex",
2738
+ "parameters": {
2739
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2740
+ "options": {
2741
+ "case_sensitive": false,
2742
+ "min_length": 3
2743
+ }
2744
+ }
2745
+ },
2746
+ "value": {
2747
+ "operator": "match_regex",
2748
+ "parameters": {
2749
+ "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:(?:\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))))\\b",
2750
+ "options": {
2751
+ "case_sensitive": false,
2752
+ "min_length": 16
2753
+ }
2754
+ }
2755
+ },
2756
+ "tags": {
2757
+ "type": "card",
2758
+ "card_type": "mastercard",
2759
+ "category": "payment"
2760
+ }
2761
+ },
2762
+ {
2763
+ "id": "axxJkyjhRTOuhjwlsA35Vw",
2764
+ "name": "MasterCard Scanner (4x4 digits)",
2765
+ "key": {
2766
+ "operator": "match_regex",
2767
+ "parameters": {
2768
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2769
+ "options": {
2770
+ "case_sensitive": false,
2771
+ "min_length": 3
2772
+ }
2773
+ }
2774
+ },
2775
+ "value": {
2776
+ "operator": "match_regex",
2777
+ "parameters": {
2778
+ "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b",
2779
+ "options": {
2780
+ "case_sensitive": false,
2781
+ "min_length": 16
2782
+ }
2783
+ }
2784
+ },
2785
+ "tags": {
2786
+ "type": "card",
2787
+ "card_type": "mastercard",
2788
+ "category": "payment"
2789
+ }
2790
+ },
2791
+ {
2792
+ "id": "76EhmoK3TPqJcpM-fK0pLw",
2793
+ "name": "MasterCard Scanner (1x16 digits)",
2794
+ "key": {
2795
+ "operator": "match_regex",
2796
+ "parameters": {
2797
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2798
+ "options": {
2799
+ "case_sensitive": false,
2800
+ "min_length": 3
2801
+ }
2802
+ }
2803
+ },
2804
+ "value": {
2805
+ "operator": "match_regex",
2806
+ "parameters": {
2807
+ "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:\\d{12})\\b",
2808
+ "options": {
2809
+ "case_sensitive": false,
2810
+ "min_length": 16
2811
+ }
2812
+ }
2813
+ },
2814
+ "tags": {
2815
+ "type": "card",
2816
+ "card_type": "mastercard",
2817
+ "category": "payment"
2818
+ }
2819
+ },
2820
+ {
2821
+ "id": "c542c147-3883-43d6-a067-178e4a7bd65d",
2822
+ "name": "Password",
2823
+ "key": {
2824
+ "operator": "match_regex",
2825
+ "parameters": {
2826
+ "regex": "\\bpass(?:[_-]?word|wd)?\\b|\\bpwd\\b",
2827
+ "options": {
2828
+ "case_sensitive": false,
2829
+ "min_length": 3
2830
+ }
2831
+ }
2832
+ },
2833
+ "tags": {
2834
+ "type": "password",
2835
+ "category": "credentials"
2836
+ }
2837
+ },
2838
+ {
2839
+ "id": "18b608bd7a764bff5b2344c0",
2840
+ "name": "Phone number",
2841
+ "key": {
2842
+ "operator": "match_regex",
2843
+ "parameters": {
2844
+ "regex": "\\bphone|number|mobile\\b",
2845
+ "options": {
2846
+ "case_sensitive": false,
2847
+ "min_length": 3
2848
+ }
2849
+ }
2850
+ },
2851
+ "value": {
2852
+ "operator": "match_regex",
2853
+ "parameters": {
2854
+ "regex": "^(?:\\(\\+\\d{1,3}\\)|\\+\\d{1,3}|00\\d{1,3})?[-\\s\\.]?(?:\\(\\d{3}\\)[-\\s\\.]?)?(?:\\d[-\\s\\.]?){6,10}$",
2855
+ "options": {
2856
+ "case_sensitive": false,
2857
+ "min_length": 6
2858
+ }
2859
+ }
2860
+ },
2861
+ "tags": {
2862
+ "type": "phone",
2863
+ "category": "pii"
2864
+ }
2865
+ },
2866
+ {
2867
+ "id": "de0899e0cbaaa812bb624cf04c912071012f616d-mod",
2868
+ "name": "UK National Insurance Number Scanner",
2869
+ "key": {
2870
+ "operator": "match_regex",
2871
+ "parameters": {
2872
+ "regex": "^nin$|\\binsurance\\b",
2873
+ "options": {
2874
+ "case_sensitive": false,
2875
+ "min_length": 3
2876
+ }
2877
+ }
2878
+ },
2879
+ "value": {
2880
+ "operator": "match_regex",
2881
+ "parameters": {
2882
+ "regex": "\\b[A-Z]{2}[\\s-]?\\d{6}[\\s-]?[A-Z]?\\b",
2883
+ "options": {
2884
+ "case_sensitive": false,
2885
+ "min_length": 8
2886
+ }
2887
+ }
2888
+ },
2889
+ "tags": {
2890
+ "type": "uk_nin",
2891
+ "category": "pii"
2892
+ }
2893
+ },
2894
+ {
2895
+ "id": "d962f7ddb3f55041e39195a60ff79d4814a7c331",
2896
+ "name": "US Passport Scanner",
2897
+ "key": {
2898
+ "operator": "match_regex",
2899
+ "parameters": {
2900
+ "regex": "\\bpassport\\b",
2901
+ "options": {
2902
+ "case_sensitive": false,
2903
+ "min_length": 8
2904
+ }
2905
+ }
2906
+ },
2907
+ "value": {
2908
+ "operator": "match_regex",
2909
+ "parameters": {
2910
+ "regex": "\\b[0-9A-Z]{9}\\b|\\b[0-9]{6}[A-Z][0-9]{2}\\b",
2911
+ "options": {
2912
+ "case_sensitive": false,
2913
+ "min_length": 8
2914
+ }
2915
+ }
2916
+ },
2917
+ "tags": {
2918
+ "type": "passport_number",
2919
+ "category": "pii"
2920
+ }
2921
+ },
2922
+ {
2923
+ "id": "7771fc3b-b205-4b93-bcef-28608c5c1b54",
2924
+ "name": "United States Social Security Number Scanner",
2925
+ "key": {
2926
+ "operator": "match_regex",
2927
+ "parameters": {
2928
+ "regex": "\\b(?:SSN|(?:(?:social)?[\\s_]?(?:security)?[\\s_]?(?:number)?)?)\\b",
2929
+ "options": {
2930
+ "case_sensitive": false,
2931
+ "min_length": 3
2932
+ }
2933
+ }
2934
+ },
2935
+ "value": {
2936
+ "operator": "match_regex",
2937
+ "parameters": {
2938
+ "regex": "\\b\\d{3}[-\\s\\.]{1}\\d{2}[-\\s\\.]{1}\\d{4}\\b",
2939
+ "options": {
2940
+ "case_sensitive": false,
2941
+ "min_length": 11
2942
+ }
2943
+ }
2944
+ },
2945
+ "tags": {
2946
+ "type": "us_ssn",
2947
+ "category": "pii"
2948
+ }
2949
+ },
2950
+ {
2951
+ "id": "ac6d683cbac77f6e399a14990793dd8fd0fca333",
2952
+ "name": "US Vehicle Identification Number Scanner",
2953
+ "key": {
2954
+ "operator": "match_regex",
2955
+ "parameters": {
2956
+ "regex": "\\b(?:vehicle[_\\s-]*identification[_\\s-]*number|vin)\\b",
2957
+ "options": {
2958
+ "case_sensitive": false,
2959
+ "min_length": 3
2960
+ }
2961
+ }
2962
+ },
2963
+ "value": {
2964
+ "operator": "match_regex",
2965
+ "parameters": {
2966
+ "regex": "\\b[A-HJ-NPR-Z0-9]{17}\\b",
2967
+ "options": {
2968
+ "case_sensitive": false,
2969
+ "min_length": 17
2970
+ }
2971
+ }
2972
+ },
2973
+ "tags": {
2974
+ "type": "vin",
2975
+ "category": "pii"
2976
+ }
2977
+ },
2978
+ {
2979
+ "id": "wJIgOygRQhKkR69b_9XbRQ",
2980
+ "name": "Visa Card Scanner (2x8 digits)",
2981
+ "key": {
2982
+ "operator": "match_regex",
2983
+ "parameters": {
2984
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
2985
+ "options": {
2986
+ "case_sensitive": false,
2987
+ "min_length": 3
2988
+ }
2989
+ }
2990
+ },
2991
+ "value": {
2992
+ "operator": "match_regex",
2993
+ "parameters": {
2994
+ "regex": "\\b4\\d{3}(?:(?:\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))))\\b",
2995
+ "options": {
2996
+ "case_sensitive": false,
2997
+ "min_length": 16
2998
+ }
2999
+ }
3000
+ },
3001
+ "tags": {
3002
+ "type": "card",
3003
+ "card_type": "visa",
3004
+ "category": "payment"
3005
+ }
3006
+ },
3007
+ {
3008
+ "id": "0o71SJxXQNK7Q6gMbBesFQ",
3009
+ "name": "Visa Card Scanner (4x4 digits)",
3010
+ "key": {
3011
+ "operator": "match_regex",
3012
+ "parameters": {
3013
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
3014
+ "options": {
3015
+ "case_sensitive": false,
3016
+ "min_length": 3
3017
+ }
3018
+ }
3019
+ },
3020
+ "value": {
3021
+ "operator": "match_regex",
3022
+ "parameters": {
3023
+ "regex": "\\b4\\d{3}(?:(?:,\\d{4}){3}|(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3})\\b",
3024
+ "options": {
3025
+ "case_sensitive": false,
3026
+ "min_length": 16
3027
+ }
3028
+ }
3029
+ },
3030
+ "tags": {
3031
+ "type": "card",
3032
+ "card_type": "visa",
3033
+ "category": "payment"
3034
+ }
3035
+ },
3036
+ {
3037
+ "id": "QrHD6AfgQm6z-j0wStxTvA",
3038
+ "name": "Visa Card Scanner (1x15 & 1x16 & 1x19 digits)",
3039
+ "key": {
3040
+ "operator": "match_regex",
3041
+ "parameters": {
3042
+ "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b",
3043
+ "options": {
3044
+ "case_sensitive": false,
3045
+ "min_length": 3
3046
+ }
3047
+ }
3048
+ },
3049
+ "value": {
3050
+ "operator": "match_regex",
3051
+ "parameters": {
3052
+ "regex": "4[0-9]{12}(?:[0-9]{3})?",
3053
+ "options": {
3054
+ "case_sensitive": false,
3055
+ "min_length": 13
3056
+ }
3057
+ }
3058
+ },
3059
+ "tags": {
3060
+ "type": "card",
3061
+ "card_type": "visa",
3062
+ "category": "payment"
3063
+ }
3064
+ }
3065
+ ]
3066
+ }