@oneuptime/common 14.0.94 → 14.0.96

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 (289) hide show
  1. package/Models/AnalyticsModels/ExceptionInstance.d.mts +2 -0
  2. package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
  3. package/Models/AnalyticsModels/ExceptionInstance.js +7 -0
  4. package/Models/AnalyticsModels/Log.d.mts +2 -0
  5. package/Models/AnalyticsModels/Log.d.ts +2 -0
  6. package/Models/AnalyticsModels/Log.js +7 -0
  7. package/Models/AnalyticsModels/SecurityEvent.d.mts +8 -0
  8. package/Models/AnalyticsModels/SecurityEvent.d.ts +8 -0
  9. package/Models/AnalyticsModels/SecurityEvent.js +55 -0
  10. package/Models/AnalyticsModels/Span.d.mts +4 -0
  11. package/Models/AnalyticsModels/Span.d.ts +4 -0
  12. package/Models/AnalyticsModels/Span.js +63 -0
  13. package/Models/DatabaseModels/CustomNotificationChannel.d.mts +16 -0
  14. package/Models/DatabaseModels/CustomNotificationChannel.d.ts +16 -0
  15. package/Models/DatabaseModels/CustomNotificationChannel.js +337 -0
  16. package/Models/DatabaseModels/CustomNotificationChannel.mjs +2 -0
  17. package/Models/DatabaseModels/DashboardPlaylist.d.mts +16 -0
  18. package/Models/DatabaseModels/DashboardPlaylist.d.ts +16 -0
  19. package/Models/DatabaseModels/DashboardPlaylist.js +314 -0
  20. package/Models/DatabaseModels/DashboardPlaylist.mjs +2 -0
  21. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +14 -37
  22. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.mts +1 -0
  23. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.ts +1 -0
  24. package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.js +27 -3
  25. package/Models/DatabaseModels/DetectionRuleException.d.mts +25 -0
  26. package/Models/DatabaseModels/DetectionRuleException.d.ts +25 -0
  27. package/Models/DatabaseModels/DetectionRuleException.js +412 -0
  28. package/Models/DatabaseModels/DetectionRuleException.mjs +2 -0
  29. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  30. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  31. package/Models/DatabaseModels/GlobalConfig.js +107 -0
  32. package/Models/DatabaseModels/Index.js +8 -0
  33. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +2 -0
  34. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +2 -0
  35. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +40 -0
  36. package/Models/DatabaseModels/SecurityTelemetrySource.d.mts +21 -0
  37. package/Models/DatabaseModels/SecurityTelemetrySource.d.ts +21 -0
  38. package/Models/DatabaseModels/SecurityTelemetrySource.js +357 -0
  39. package/Models/DatabaseModels/SecurityTelemetrySource.mjs +2 -0
  40. package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
  41. package/Models/DatabaseModels/TeamPermission.js +5 -7
  42. package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
  43. package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
  44. package/Models/DatabaseModels/UserNotificationRule.js +67 -0
  45. package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
  46. package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
  47. package/Models/DatabaseModels/UserNotificationSetting.js +26 -0
  48. package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
  49. package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
  50. package/Models/DatabaseModels/UserOnCallLogTimeline.js +53 -0
  51. package/Types/AI/AIChatPermissionMode.js +11 -5
  52. package/Types/AI/ResourceCardFacts.d.mts +11 -0
  53. package/Types/AI/ResourceCardFacts.d.ts +11 -0
  54. package/Types/AI/ResourceCardFacts.js +80 -0
  55. package/Types/AI/ResourceCardFacts.mjs +4 -0
  56. package/Types/AnalyticsDatabase/TableColumn.d.mts +4 -0
  57. package/Types/AnalyticsDatabase/TableColumn.d.ts +4 -0
  58. package/Types/AnalyticsDatabase/TableColumn.js +7 -0
  59. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.mts +2 -0
  60. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.ts +2 -0
  61. package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.js +4 -0
  62. package/Types/Backup/BackupDestinationCatalog.d.mts +2 -0
  63. package/Types/Backup/BackupDestinationCatalog.d.ts +2 -0
  64. package/Types/Backup/BackupDestinationCatalog.js +8 -0
  65. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.mts +25 -0
  66. package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.ts +25 -0
  67. package/Types/CallAndSMS/CallAndSmsGatewayPayload.js +86 -0
  68. package/Types/CallAndSMS/CallAndSmsGatewayPayload.mjs +6 -0
  69. package/Types/CallAndSMS/CallAndSmsProvider.d.mts +23 -0
  70. package/Types/CallAndSMS/CallAndSmsProvider.d.ts +23 -0
  71. package/Types/CallAndSMS/CallAndSmsProvider.js +107 -0
  72. package/Types/CallAndSMS/CallAndSmsProvider.mjs +7 -0
  73. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +2 -0
  74. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +2 -0
  75. package/Types/CloudConnection/CloudConnectionCatalog.js +4 -0
  76. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +95 -0
  77. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +95 -0
  78. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +236 -0
  79. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +16 -0
  80. package/Types/Dashboard/DashboardPlaylist.d.mts +21 -0
  81. package/Types/Dashboard/DashboardPlaylist.d.ts +21 -0
  82. package/Types/Dashboard/DashboardPlaylist.js +197 -0
  83. package/Types/Dashboard/DashboardPlaylist.mjs +19 -0
  84. package/Types/Database/TableColumn.d.mts +8 -0
  85. package/Types/Database/TableColumn.d.ts +8 -0
  86. package/Types/Database/TableColumn.js +69 -23
  87. package/Types/Database/TableColumn.mjs +1 -0
  88. package/Types/HeldPermissions.d.mts +2 -0
  89. package/Types/HeldPermissions.d.ts +2 -0
  90. package/Types/HeldPermissions.js +32 -8
  91. package/Types/Icon/IconProp.d.mts +3 -0
  92. package/Types/Icon/IconProp.d.ts +3 -0
  93. package/Types/Icon/IconProp.js +4 -0
  94. package/Types/JSONFunctions.js +16 -1
  95. package/Types/LlmObservability/LlmConnectionCatalog.d.mts +2 -0
  96. package/Types/LlmObservability/LlmConnectionCatalog.d.ts +2 -0
  97. package/Types/LlmObservability/LlmConnectionCatalog.js +8 -0
  98. package/Types/Monitor/MonitorType.js +5 -4
  99. package/Types/Monitor/TelemetryAlertRule.d.mts +111 -0
  100. package/Types/Monitor/TelemetryAlertRule.d.ts +111 -0
  101. package/Types/Monitor/TelemetryAlertRule.js +886 -0
  102. package/Types/Monitor/TelemetryAlertRule.mjs +5 -0
  103. package/Types/Monitor/TelemetryRulePreview.d.mts +57 -0
  104. package/Types/Monitor/TelemetryRulePreview.d.ts +57 -0
  105. package/Types/Monitor/TelemetryRulePreview.js +190 -0
  106. package/Types/Monitor/TelemetryRulePreview.mjs +6 -0
  107. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +23 -0
  108. package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +23 -0
  109. package/Types/OnCallDutyPolicy/EveryNewEventRules.js +105 -0
  110. package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +9 -0
  111. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +3 -0
  112. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +3 -0
  113. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +23 -8
  114. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
  115. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.mts +47 -0
  116. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.ts +47 -0
  117. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.js +122 -0
  118. package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.mjs +12 -0
  119. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.mts +2 -1
  120. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.ts +2 -1
  121. package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.js +10 -1
  122. package/Types/Permission.d.mts +10 -0
  123. package/Types/Permission.d.ts +10 -0
  124. package/Types/Permission.js +83 -19
  125. package/Types/ProviderLogo/ProviderLogo.d.mts +87 -0
  126. package/Types/ProviderLogo/ProviderLogo.d.ts +87 -0
  127. package/Types/ProviderLogo/ProviderLogo.js +215 -0
  128. package/Types/ProviderLogo/ProviderLogo.mjs +6 -0
  129. package/Types/PushNotification/PushNotificationsTurnedOff.d.mts +3 -0
  130. package/Types/PushNotification/PushNotificationsTurnedOff.d.ts +3 -0
  131. package/Types/PushNotification/PushNotificationsTurnedOff.js +32 -0
  132. package/Types/PushNotification/PushNotificationsTurnedOff.mjs +4 -0
  133. package/Types/RollingTime/RollingTimeUtil.js +20 -10
  134. package/Types/Runbook/RunbookTriggerType.d.mts +2 -1
  135. package/Types/Runbook/RunbookTriggerType.d.ts +2 -1
  136. package/Types/Runbook/RunbookTriggerType.js +5 -1
  137. package/Types/SecurityCase/SecurityCaseContext.d.mts +188 -0
  138. package/Types/SecurityCase/SecurityCaseContext.d.ts +188 -0
  139. package/Types/SecurityCase/SecurityCaseContext.js +165 -0
  140. package/Types/SecurityCase/SecurityCaseContext.mjs +30 -0
  141. package/Types/SecurityCase/SecurityEntityRisk.d.mts +11 -0
  142. package/Types/SecurityCase/SecurityEntityRisk.d.ts +11 -0
  143. package/Types/SecurityCase/SecurityEntityRisk.js +9 -1
  144. package/Types/SecurityCase/SecurityEntityRisk.mjs +1 -0
  145. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
  146. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
  147. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +9 -0
  148. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.mts +2 -0
  149. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.ts +2 -0
  150. package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.js +5 -0
  151. package/Types/SecurityEvent/DetectionRetrohunt.d.mts +38 -0
  152. package/Types/SecurityEvent/DetectionRetrohunt.d.ts +38 -0
  153. package/Types/SecurityEvent/DetectionRetrohunt.js +147 -0
  154. package/Types/SecurityEvent/DetectionRetrohunt.mjs +10 -0
  155. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +5 -1
  156. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +5 -1
  157. package/Types/SecurityEvent/DetectionRuleDataKind.js +42 -0
  158. package/Types/SecurityEvent/DetectionRuleException.d.mts +65 -0
  159. package/Types/SecurityEvent/DetectionRuleException.d.ts +65 -0
  160. package/Types/SecurityEvent/DetectionRuleException.js +441 -0
  161. package/Types/SecurityEvent/DetectionRuleException.mjs +24 -0
  162. package/Types/SecurityEvent/DetectionRuleLibrary.js +330 -0
  163. package/Types/SecurityEvent/NormalizedSecurityEvent.d.mts +5 -0
  164. package/Types/SecurityEvent/NormalizedSecurityEvent.d.ts +5 -0
  165. package/Types/SecurityEvent/SecurityAttackCampaign.d.mts +31 -0
  166. package/Types/SecurityEvent/SecurityAttackCampaign.d.ts +31 -0
  167. package/Types/SecurityEvent/SecurityAttackCampaign.js +81 -0
  168. package/Types/SecurityEvent/SecurityAttackCampaign.mjs +8 -0
  169. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.mts +28 -0
  170. package/Types/SecurityEvent/SecurityEventRequestOutcome.d.ts +28 -0
  171. package/Types/SecurityEvent/SecurityEventRequestOutcome.js +78 -0
  172. package/Types/SecurityEvent/SecurityEventRequestOutcome.mjs +6 -0
  173. package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +39 -0
  174. package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +39 -0
  175. package/Types/SecurityEvent/SecurityTelemetrySource.js +127 -0
  176. package/Types/SecurityEvent/SecurityTelemetrySource.mjs +12 -0
  177. package/Types/SecurityEvent/TurnOnRecommended.d.mts +2 -0
  178. package/Types/SecurityEvent/TurnOnRecommended.d.ts +2 -0
  179. package/Types/SecurityEvent/TurnOnRecommended.js +7 -0
  180. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +7 -1
  181. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +7 -1
  182. package/Types/SecurityPlaybook/SecurityPlaybookAction.js +46 -0
  183. package/Types/SecurityPlaybook/SecurityPlaybookAction.mjs +1 -0
  184. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +10 -0
  185. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +10 -0
  186. package/Types/SecurityPlaybook/SecurityPlaybookStep.js +37 -1
  187. package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +1 -0
  188. package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +17 -0
  189. package/Types/Team/ComplianceNotificationChannel.d.mts +2 -1
  190. package/Types/Team/ComplianceNotificationChannel.d.ts +2 -1
  191. package/Types/Team/ComplianceNotificationChannel.js +10 -1
  192. package/Types/Team/ComplianceRule.d.mts +8 -3
  193. package/Types/Team/ComplianceRule.d.ts +8 -3
  194. package/Types/Team/ComplianceRule.js +34 -22
  195. package/Types/Team/TeamComplianceStatus.d.mts +1 -0
  196. package/Types/Team/TeamComplianceStatus.d.ts +1 -0
  197. package/Types/Telemetry/OpenTelemetryGuides.d.mts +52 -0
  198. package/Types/Telemetry/OpenTelemetryGuides.d.ts +52 -0
  199. package/Types/Telemetry/OpenTelemetryGuides.js +419 -0
  200. package/Types/Telemetry/OpenTelemetryGuides.mjs +17 -0
  201. package/Types/Telemetry/TelemetrySavedViewState.d.mts +1 -0
  202. package/Types/Telemetry/TelemetrySavedViewState.d.ts +1 -0
  203. package/Types/Telemetry/TraceHealth.d.mts +24 -0
  204. package/Types/Telemetry/TraceHealth.d.ts +24 -0
  205. package/Types/Telemetry/TraceHealth.js +97 -0
  206. package/Types/Telemetry/TraceHealth.mjs +4 -0
  207. package/Types/Telemetry/TraceSpanType.d.mts +90 -0
  208. package/Types/Telemetry/TraceSpanType.d.ts +90 -0
  209. package/Types/Telemetry/TraceSpanType.js +238 -0
  210. package/Types/Telemetry/TraceSpanType.mjs +19 -0
  211. package/Types/Theme/ThemePreference.d.mts +26 -0
  212. package/Types/Theme/ThemePreference.d.ts +26 -0
  213. package/Types/Theme/ThemePreference.js +104 -0
  214. package/Types/Theme/ThemePreference.mjs +12 -0
  215. package/Types/Workflow/Component.d.mts +3 -0
  216. package/Types/Workflow/Component.d.ts +3 -0
  217. package/Types/Workflow/Components/Discord.js +2 -0
  218. package/Types/Workflow/Components/Mattermost.js +2 -0
  219. package/Types/Workflow/Components/MicrosoftTeams.js +2 -0
  220. package/Types/Workflow/Components/Slack.js +2 -0
  221. package/Types/Workflow/Components/Telegram.js +2 -0
  222. package/Types/Workflow/Components.js +6 -0
  223. package/Types/Workflow/Templates.js +5 -3
  224. package/Utils/ColorContrast.d.mts +0 -3
  225. package/Utils/ColorContrast.d.ts +0 -3
  226. package/Utils/ColorContrast.js +3 -41
  227. package/Utils/ColorContrast.mjs +0 -2
  228. package/Utils/NameInitials.d.mts +5 -0
  229. package/Utils/NameInitials.d.ts +5 -0
  230. package/Utils/NameInitials.js +92 -0
  231. package/Utils/NameInitials.mjs +6 -0
  232. package/Utils/OldestKeyCursor.d.mts +7 -0
  233. package/Utils/OldestKeyCursor.d.ts +7 -0
  234. package/Utils/OldestKeyCursor.js +68 -0
  235. package/Utils/OldestKeyCursor.mjs +2 -0
  236. package/Utils/Schema/OpenApiMetadataRegistry.d.mts +4 -0
  237. package/Utils/Schema/OpenApiMetadataRegistry.d.ts +4 -0
  238. package/Utils/Schema/OpenApiMetadataRegistry.js +20 -0
  239. package/Utils/Schema/OpenApiMetadataRegistry.mjs +2 -0
  240. package/Utils/Schema/Zod.js +6 -0
  241. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.mts +41 -0
  242. package/Utils/SecurityCase/SecurityCaseImpactFacts.d.ts +41 -0
  243. package/Utils/SecurityCase/SecurityCaseImpactFacts.js +215 -0
  244. package/Utils/SecurityCase/SecurityCaseImpactFacts.mjs +6 -0
  245. package/Utils/SecurityCase/SecurityCaseStoryItems.d.mts +46 -0
  246. package/Utils/SecurityCase/SecurityCaseStoryItems.d.ts +46 -0
  247. package/Utils/SecurityCase/SecurityCaseStoryItems.js +327 -0
  248. package/Utils/SecurityCase/SecurityCaseStoryItems.mjs +17 -0
  249. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +5 -0
  250. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +5 -0
  251. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +22 -2
  252. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +2 -0
  253. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.mts +20 -0
  254. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.ts +20 -0
  255. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.js +347 -31
  256. package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.mjs +11 -0
  257. package/Utils/SecurityEvent/RequestFollowUp.d.mts +4 -0
  258. package/Utils/SecurityEvent/RequestFollowUp.d.ts +4 -0
  259. package/Utils/SecurityEvent/RequestFollowUp.js +127 -0
  260. package/Utils/SecurityEvent/RequestFollowUp.mjs +3 -0
  261. package/Utils/SecurityEvent/RequestOutcome.d.mts +80 -0
  262. package/Utils/SecurityEvent/RequestOutcome.d.ts +80 -0
  263. package/Utils/SecurityEvent/RequestOutcome.js +371 -0
  264. package/Utils/SecurityEvent/RequestOutcome.mjs +18 -0
  265. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.mts +76 -0
  266. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.ts +76 -0
  267. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.js +348 -0
  268. package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.mjs +15 -0
  269. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.mts +61 -0
  270. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.ts +61 -0
  271. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.js +260 -0
  272. package/Utils/SecurityEvent/TelemetryScan/FlowSignals.mjs +17 -0
  273. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.mts +30 -0
  274. package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.ts +30 -0
  275. package/Utils/SecurityEvent/TelemetryScan/RumSignals.js +134 -0
  276. package/Utils/SecurityEvent/TelemetryScan/RumSignals.mjs +8 -0
  277. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.mts +40 -0
  278. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.ts +40 -0
  279. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.js +190 -0
  280. package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.mjs +6 -0
  281. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.mts +57 -0
  282. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.ts +57 -0
  283. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.js +491 -0
  284. package/Utils/SecurityEvent/TelemetryScan/TraceSignals.mjs +27 -0
  285. package/Utils/Telemetry/EntrySpan.d.mts +8 -0
  286. package/Utils/Telemetry/EntrySpan.d.ts +8 -0
  287. package/Utils/Telemetry/EntrySpan.js +53 -0
  288. package/Utils/Telemetry/EntrySpan.mjs +4 -0
  289. package/package.json +1 -1
@@ -1279,6 +1279,58 @@ detection:
1279
1279
  selection_message:
1280
1280
  message|contains: '\${jndi:'
1281
1281
  condition: 1 of selection_*
1282
+ `,
1283
+ },
1284
+ /*
1285
+ * What happened next, as the request's trace showed it
1286
+ * (Types/SecurityEvent/SecurityEventRequestOutcome): the attempts above
1287
+ * say somebody tried; these say it worked.
1288
+ */
1289
+ {
1290
+ id: "a1218db8-8e28-4afb-ae8e-ed4f0aef7595",
1291
+ title: "Injected SQL reached the database",
1292
+ description: "A request carrying SQL injection reached the database: a query it made holds the payload, or it waited as long as its SQL asked the database to sleep.",
1293
+ category: DetectionRuleLibraryCategory.Web,
1294
+ dataSource: "Web requests followed into their traces",
1295
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.WebRequests,
1296
+ evaluationIntervalInMinutes: 5,
1297
+ groupByField: "principalIp",
1298
+ matchCountThreshold: 1,
1299
+ sigmaRuleYaml: `title: Injected SQL reached the database
1300
+ id: a1218db8-8e28-4afb-ae8e-ed4f0aef7595
1301
+ description: A request whose injected SQL ran in a query the app made.
1302
+ level: critical
1303
+ tags:
1304
+ - attack.initial_access
1305
+ - attack.t1190
1306
+ detection:
1307
+ selection:
1308
+ requestOutcome: 'Reached Database'
1309
+ condition: selection
1310
+ `,
1311
+ },
1312
+ {
1313
+ id: "47d32cc6-462c-44f9-8bcb-b99d7b083860",
1314
+ title: "Attack request broke the app",
1315
+ description: "A request carrying an attack made the app fail: it answered with a server error, or threw an exception. The payload reached code that did not expect it.",
1316
+ category: DetectionRuleLibraryCategory.Web,
1317
+ dataSource: "Web requests followed into their traces",
1318
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.WebRequests,
1319
+ evaluationIntervalInMinutes: 5,
1320
+ groupByField: "principalIp",
1321
+ matchCountThreshold: 1,
1322
+ sigmaRuleYaml: `title: Attack request broke the app
1323
+ id: 47d32cc6-462c-44f9-8bcb-b99d7b083860
1324
+ description: A request carrying an attack string that errored in the app.
1325
+ level: high
1326
+ tags:
1327
+ - attack.initial_access
1328
+ - attack.t1190
1329
+ detection:
1330
+ selection:
1331
+ className: 'HTTP Activity'
1332
+ requestOutcome: 'Errored'
1333
+ condition: selection
1282
1334
  `,
1283
1335
  },
1284
1336
  // Kubernetes
@@ -1394,6 +1446,273 @@ detection:
1394
1446
  objectRef.subresource: exec
1395
1447
  verb: create
1396
1448
  condition: selection
1449
+ `,
1450
+ },
1451
+ /*
1452
+ * Your OneUptime data (SecurityTelemetrySource): the rest of what the
1453
+ * project already sends OneUptime - traces, network flows, the audit
1454
+ * log, session replays. Each source names what it found in the event's
1455
+ * oneuptime.signal (SecurityTelemetrySignal), which these read.
1456
+ */
1457
+ // Web, from traces
1458
+ {
1459
+ id: "a3d31a45-a620-48d2-895e-84b44f834b65",
1460
+ title: "Server-side request forgery toward cloud metadata",
1461
+ description: "A request that names a cloud metadata address (169.254.169.254 and the like) in its URL: somebody trying to make your server fetch its own cloud credentials.",
1462
+ category: DetectionRuleLibraryCategory.Web,
1463
+ dataSource: "OneUptime traces",
1464
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeTraces,
1465
+ evaluationIntervalInMinutes: 5,
1466
+ groupByField: "principalIp",
1467
+ matchCountThreshold: 1,
1468
+ sigmaRuleYaml: `title: Server-side request forgery toward cloud metadata
1469
+ id: a3d31a45-a620-48d2-895e-84b44f834b65
1470
+ description: A request that names a cloud metadata address in its URL.
1471
+ level: high
1472
+ tags:
1473
+ - attack.initial_access
1474
+ - attack.t1190
1475
+ - attack.credential_access
1476
+ - attack.t1552
1477
+ detection:
1478
+ selection:
1479
+ oneuptime.signal: ssrf
1480
+ condition: selection
1481
+ `,
1482
+ },
1483
+ {
1484
+ id: "48612a6d-c4b3-4ffb-a5da-0bc4e1e8a45b",
1485
+ title: "Prompt injection attempt",
1486
+ description: "A prompt to one of your LLM features that tries to override its instructions or pull out its system prompt.",
1487
+ category: DetectionRuleLibraryCategory.Web,
1488
+ dataSource: "OneUptime traces",
1489
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeTraces,
1490
+ evaluationIntervalInMinutes: 5,
1491
+ groupByField: "principalUser",
1492
+ matchCountThreshold: 1,
1493
+ sigmaRuleYaml: `title: Prompt injection attempt
1494
+ id: 48612a6d-c4b3-4ffb-a5da-0bc4e1e8a45b
1495
+ description: A prompt that tries to override an LLM's instructions.
1496
+ level: medium
1497
+ tags:
1498
+ - attack.initial_access
1499
+ - attack.t1190
1500
+ detection:
1501
+ selection:
1502
+ oneuptime.signal: prompt-injection
1503
+ condition: selection
1504
+ `,
1505
+ },
1506
+ // Network, from network flows
1507
+ {
1508
+ id: "c3a5a3a9-2f46-418f-b9e5-cea6f11fd2ff",
1509
+ title: "Port scan seen in network flows",
1510
+ description: "One address reaching twenty-five or more service ports of one host within five minutes, as your network devices' flows show it.",
1511
+ category: DetectionRuleLibraryCategory.Network,
1512
+ dataSource: "OneUptime network flows",
1513
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.NetworkFlows,
1514
+ evaluationIntervalInMinutes: 5,
1515
+ groupByField: "principalIp",
1516
+ matchCountThreshold: 1,
1517
+ sigmaRuleYaml: `title: Port scan seen in network flows
1518
+ id: c3a5a3a9-2f46-418f-b9e5-cea6f11fd2ff
1519
+ description: One address reaching many service ports of one host.
1520
+ level: medium
1521
+ tags:
1522
+ - attack.discovery
1523
+ - attack.t1046
1524
+ detection:
1525
+ selection:
1526
+ oneuptime.signal: port-scan
1527
+ condition: selection
1528
+ `,
1529
+ },
1530
+ {
1531
+ id: "ed597f63-c407-4b6e-81ff-674b917b7dbe",
1532
+ title: "Network sweep seen in network flows",
1533
+ description: "One address reaching the same service port on thirty or more hosts within five minutes: somebody looking for machines to move to.",
1534
+ category: DetectionRuleLibraryCategory.Network,
1535
+ dataSource: "OneUptime network flows",
1536
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.NetworkFlows,
1537
+ evaluationIntervalInMinutes: 5,
1538
+ groupByField: "principalIp",
1539
+ matchCountThreshold: 1,
1540
+ sigmaRuleYaml: `title: Network sweep seen in network flows
1541
+ id: ed597f63-c407-4b6e-81ff-674b917b7dbe
1542
+ description: One address reaching one service port on many hosts.
1543
+ level: medium
1544
+ tags:
1545
+ - attack.discovery
1546
+ - attack.t1018
1547
+ detection:
1548
+ selection:
1549
+ oneuptime.signal: network-sweep
1550
+ condition: selection
1551
+ `,
1552
+ },
1553
+ {
1554
+ id: "b608ce0e-3d76-46c8-bcc2-1726de3fb3f3",
1555
+ title: "Large transfer out of your network",
1556
+ description: "A private address sending a gigabyte or more to one public address within five minutes. Backups do this too; anything else is worth a look.",
1557
+ category: DetectionRuleLibraryCategory.Network,
1558
+ dataSource: "OneUptime network flows",
1559
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.NetworkFlows,
1560
+ evaluationIntervalInMinutes: 5,
1561
+ groupByField: "principalIp",
1562
+ matchCountThreshold: 1,
1563
+ sigmaRuleYaml: `title: Large transfer out of your network
1564
+ id: b608ce0e-3d76-46c8-bcc2-1726de3fb3f3
1565
+ description: A private address sending a lot of data to one public address.
1566
+ level: medium
1567
+ tags:
1568
+ - attack.exfiltration
1569
+ - attack.t1048
1570
+ detection:
1571
+ selection:
1572
+ oneuptime.signal: large-outbound-transfer
1573
+ condition: selection
1574
+ `,
1575
+ },
1576
+ {
1577
+ id: "0b89c3b4-d695-45e3-b4cb-27693cb77ae7",
1578
+ title: "Packet capture downloaded from OneUptime",
1579
+ description: "Somebody downloaded a packet capture: a copy of your network traffic left OneUptime.",
1580
+ category: DetectionRuleLibraryCategory.Network,
1581
+ dataSource: "OneUptime audit log",
1582
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeAuditLog,
1583
+ evaluationIntervalInMinutes: 15,
1584
+ groupByField: "principalUser",
1585
+ matchCountThreshold: 1,
1586
+ sigmaRuleYaml: `title: Packet capture downloaded from OneUptime
1587
+ id: 0b89c3b4-d695-45e3-b4cb-27693cb77ae7
1588
+ description: A packet capture was downloaded.
1589
+ level: low
1590
+ tags:
1591
+ - attack.collection
1592
+ - attack.t1040
1593
+ detection:
1594
+ selection:
1595
+ oneuptime.signal: packet-capture-downloaded
1596
+ condition: selection
1597
+ `,
1598
+ },
1599
+ // Identity, from OneUptime's own audit log and session replays
1600
+ {
1601
+ id: "0720ff0e-f7af-4adb-8e61-1ded25079a39",
1602
+ title: "New API key or MCP client in OneUptime",
1603
+ description: "Somebody created an API key or gave an MCP client access to the project: a new way in that does not sign in.",
1604
+ category: DetectionRuleLibraryCategory.Identity,
1605
+ dataSource: "OneUptime audit log",
1606
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeAuditLog,
1607
+ evaluationIntervalInMinutes: 15,
1608
+ groupByField: "principalUser",
1609
+ matchCountThreshold: 1,
1610
+ sigmaRuleYaml: `title: New API key or MCP client in OneUptime
1611
+ id: 0720ff0e-f7af-4adb-8e61-1ded25079a39
1612
+ description: An API key created, or an MCP client given access.
1613
+ level: low
1614
+ tags:
1615
+ - attack.persistence
1616
+ - attack.t1098
1617
+ detection:
1618
+ selection:
1619
+ oneuptime.signal:
1620
+ - api-key-created
1621
+ - mcp-client-authorized
1622
+ condition: selection
1623
+ `,
1624
+ },
1625
+ {
1626
+ id: "976f75a0-9773-4be7-9b69-94b0262614a1",
1627
+ title: "Roles changed in OneUptime",
1628
+ description: "A custom role was created or changed, or given to an API key or a team: who may do what in the project changed.",
1629
+ category: DetectionRuleLibraryCategory.Identity,
1630
+ dataSource: "OneUptime audit log",
1631
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeAuditLog,
1632
+ evaluationIntervalInMinutes: 15,
1633
+ groupByField: "principalUser",
1634
+ matchCountThreshold: 1,
1635
+ sigmaRuleYaml: `title: Roles changed in OneUptime
1636
+ id: 976f75a0-9773-4be7-9b69-94b0262614a1
1637
+ description: A custom role created, changed, or given to an API key or a team.
1638
+ level: medium
1639
+ tags:
1640
+ - attack.privilege_escalation
1641
+ - attack.t1098
1642
+ detection:
1643
+ selection:
1644
+ oneuptime.signal: role-changed
1645
+ activityName: Assign Privileges
1646
+ condition: selection
1647
+ `,
1648
+ },
1649
+ {
1650
+ id: "51a51214-ca6e-43bc-b9ba-abf06cf4a135",
1651
+ title: "Many records deleted at once in OneUptime",
1652
+ description: "One person or API key deleted twenty-five or more records within five minutes: a mistake worth catching, or somebody destroying what they found.",
1653
+ category: DetectionRuleLibraryCategory.Identity,
1654
+ dataSource: "OneUptime audit log",
1655
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeAuditLog,
1656
+ evaluationIntervalInMinutes: 5,
1657
+ groupByField: "principalUser",
1658
+ matchCountThreshold: 1,
1659
+ sigmaRuleYaml: `title: Many records deleted at once in OneUptime
1660
+ id: 51a51214-ca6e-43bc-b9ba-abf06cf4a135
1661
+ description: One actor deleting many records in a few minutes.
1662
+ level: high
1663
+ tags:
1664
+ - attack.impact
1665
+ - attack.t1485
1666
+ detection:
1667
+ selection:
1668
+ oneuptime.signal: mass-delete
1669
+ condition: selection
1670
+ `,
1671
+ },
1672
+ {
1673
+ id: "d281b129-d12e-44e7-9b5b-957029e9a5a8",
1674
+ title: "Security controls changed in OneUptime",
1675
+ description: "A protected entity, an audit log export or a security playbook was changed or removed: the first thing somebody covering their tracks touches.",
1676
+ category: DetectionRuleLibraryCategory.Identity,
1677
+ dataSource: "OneUptime audit log",
1678
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.OneUptimeAuditLog,
1679
+ evaluationIntervalInMinutes: 15,
1680
+ groupByField: "principalUser",
1681
+ matchCountThreshold: 1,
1682
+ sigmaRuleYaml: `title: Security controls changed in OneUptime
1683
+ id: d281b129-d12e-44e7-9b5b-957029e9a5a8
1684
+ description: A protected entity, an audit log export or a security playbook changed or removed.
1685
+ level: medium
1686
+ tags:
1687
+ - attack.defense_impairment
1688
+ - attack.t1685
1689
+ detection:
1690
+ selection:
1691
+ oneuptime.signal: security-control-changed
1692
+ condition: selection
1693
+ `,
1694
+ },
1695
+ {
1696
+ id: "2d9c0872-c111-4db5-8651-33621280dcff",
1697
+ title: "Signed-in user in two countries within an hour",
1698
+ description: "One user of your app used it from two countries less than an hour apart, as session replays show: somebody else has their session or their password.",
1699
+ category: DetectionRuleLibraryCategory.Identity,
1700
+ dataSource: "OneUptime session replays",
1701
+ dataKind: DetectionRuleDataKind_1.DetectionRuleDataKind.SessionReplays,
1702
+ evaluationIntervalInMinutes: 15,
1703
+ groupByField: "rum.identified_user_key",
1704
+ matchCountThreshold: 1,
1705
+ sigmaRuleYaml: `title: Signed-in user in two countries within an hour
1706
+ id: 2d9c0872-c111-4db5-8651-33621280dcff
1707
+ description: One identified user's sessions from two countries less than an hour apart.
1708
+ level: medium
1709
+ tags:
1710
+ - attack.initial_access
1711
+ - attack.t1078
1712
+ detection:
1713
+ selection:
1714
+ oneuptime.signal: user-in-two-countries
1715
+ condition: selection
1397
1716
  `,
1398
1717
  },
1399
1718
  ];
@@ -1442,6 +1761,17 @@ exports.RECOMMENDED_DETECTION_RULE_IDS = [
1442
1761
  "1ce3af71-a3d5-409a-b477-34e4a734aa83",
1443
1762
  "44e60520-facd-443a-bf1f-8c741819be91",
1444
1763
  "f18675fc-8708-44ff-9393-13e9c15250c0",
1764
+ /*
1765
+ * The rest of your OneUptime data: a forgery toward cloud metadata and a
1766
+ * prompt injection from traces, mass deletes and changed security
1767
+ * controls from the audit log, a user in two countries from session
1768
+ * replays - each rare in a healthy project.
1769
+ */
1770
+ "a3d31a45-a620-48d2-895e-84b44f834b65",
1771
+ "48612a6d-c4b3-4ffb-a5da-0bc4e1e8a45b",
1772
+ "51a51214-ca6e-43bc-b9ba-abf06cf4a135",
1773
+ "d281b129-d12e-44e7-9b5b-957029e9a5a8",
1774
+ "2d9c0872-c111-4db5-8651-33621280dcff",
1445
1775
  ];
1446
1776
  function isRecommendedDetectionRule(entry) {
1447
1777
  return exports.RECOMMENDED_DETECTION_RULE_IDS.includes(entry.id);
@@ -1,5 +1,6 @@
1
1
  import { JSONObject } from "../JSON.mjs";
2
2
  import OcsfSeverity from "./OcsfSeverity.mjs";
3
+ import SecurityEventRequestOutcome from "./SecurityEventRequestOutcome.mjs";
3
4
  export default interface NormalizedSecurityEvent {
4
5
  time: Date;
5
6
  eventUid: string;
@@ -35,4 +36,8 @@ export default interface NormalizedSecurityEvent {
35
36
  targetResource: string;
36
37
  observables: Array<string>;
37
38
  attributes: JSONObject;
39
+ traceId?: string | undefined;
40
+ spanId?: string | undefined;
41
+ sessionId?: string | undefined;
42
+ requestOutcome?: SecurityEventRequestOutcome | undefined;
38
43
  }
@@ -1,5 +1,6 @@
1
1
  import { JSONObject } from "../JSON";
2
2
  import OcsfSeverity from "./OcsfSeverity";
3
+ import SecurityEventRequestOutcome from "./SecurityEventRequestOutcome";
3
4
  export default interface NormalizedSecurityEvent {
4
5
  time: Date;
5
6
  eventUid: string;
@@ -35,4 +36,8 @@ export default interface NormalizedSecurityEvent {
35
36
  targetResource: string;
36
37
  observables: Array<string>;
37
38
  attributes: JSONObject;
39
+ traceId?: string | undefined;
40
+ spanId?: string | undefined;
41
+ sessionId?: string | undefined;
42
+ requestOutcome?: SecurityEventRequestOutcome | undefined;
38
43
  }
@@ -0,0 +1,31 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import SecurityEventRequestOutcome from "./SecurityEventRequestOutcome.mjs";
3
+ export declare const SECURITY_ATTACK_CAMPAIGNS_MAX: number;
4
+ export declare const SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS: number;
5
+ export declare const HTTP_ACTIVITY_CLASS_UID: number;
6
+ export interface SecurityAttackCampaign {
7
+ sourceIp: string;
8
+ requestCount: number;
9
+ rejectedCount: number;
10
+ reachedAppCount: number;
11
+ erroredCount: number;
12
+ reachedDatabaseCount: number;
13
+ worstOutcome: SecurityEventRequestOutcome | "";
14
+ maxSeverityId: number;
15
+ attackKinds: Array<string>;
16
+ userAgents: Array<string>;
17
+ targetCount: number;
18
+ sampleTargets: Array<string>;
19
+ firstSeen: string;
20
+ lastSeen: string;
21
+ }
22
+ export interface SecurityAttackCampaignsResult {
23
+ campaigns: Array<SecurityAttackCampaign>;
24
+ startTime: string;
25
+ endTime: string;
26
+ isTruncated: boolean;
27
+ }
28
+ export declare function getCampaignGotThroughCount(campaign: SecurityAttackCampaign): number;
29
+ export declare function getCampaignNotFollowedCount(campaign: SecurityAttackCampaign): number;
30
+ export declare function outcomeFromRank(rank: number): SecurityEventRequestOutcome | "";
31
+ export declare function readSecurityAttackCampaign(row: JSONObject): SecurityAttackCampaign;
@@ -0,0 +1,31 @@
1
+ import { JSONObject } from "../JSON";
2
+ import SecurityEventRequestOutcome from "./SecurityEventRequestOutcome";
3
+ export declare const SECURITY_ATTACK_CAMPAIGNS_MAX: number;
4
+ export declare const SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS: number;
5
+ export declare const HTTP_ACTIVITY_CLASS_UID: number;
6
+ export interface SecurityAttackCampaign {
7
+ sourceIp: string;
8
+ requestCount: number;
9
+ rejectedCount: number;
10
+ reachedAppCount: number;
11
+ erroredCount: number;
12
+ reachedDatabaseCount: number;
13
+ worstOutcome: SecurityEventRequestOutcome | "";
14
+ maxSeverityId: number;
15
+ attackKinds: Array<string>;
16
+ userAgents: Array<string>;
17
+ targetCount: number;
18
+ sampleTargets: Array<string>;
19
+ firstSeen: string;
20
+ lastSeen: string;
21
+ }
22
+ export interface SecurityAttackCampaignsResult {
23
+ campaigns: Array<SecurityAttackCampaign>;
24
+ startTime: string;
25
+ endTime: string;
26
+ isTruncated: boolean;
27
+ }
28
+ export declare function getCampaignGotThroughCount(campaign: SecurityAttackCampaign): number;
29
+ export declare function getCampaignNotFollowedCount(campaign: SecurityAttackCampaign): number;
30
+ export declare function outcomeFromRank(rank: number): SecurityEventRequestOutcome | "";
31
+ export declare function readSecurityAttackCampaign(row: JSONObject): SecurityAttackCampaign;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTTP_ACTIVITY_CLASS_UID = exports.SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS = exports.SECURITY_ATTACK_CAMPAIGNS_MAX = void 0;
4
+ exports.getCampaignGotThroughCount = getCampaignGotThroughCount;
5
+ exports.getCampaignNotFollowedCount = getCampaignNotFollowedCount;
6
+ exports.outcomeFromRank = outcomeFromRank;
7
+ exports.readSecurityAttackCampaign = readSecurityAttackCampaign;
8
+ const SecurityEventRequestOutcome_1 = require("./SecurityEventRequestOutcome");
9
+ /*
10
+ * AN ATTACK CAMPAIGN: every attack request one address sent over a window,
11
+ * as one row - the scanner that probed a hundred paths is one thing to look
12
+ * at, not a hundred - with how far its requests got. The rows of the
13
+ * Campaigns page (POST /security-event/attack-campaigns), worst first: a
14
+ * campaign one of whose requests reached the database before one that was
15
+ * turned away a thousand times.
16
+ *
17
+ * A campaign is the project's web attacks (OCSF HTTP Activity) grouped by
18
+ * the address that sent them. Requests whose address nobody knew are one
19
+ * campaign of their own, with an empty address.
20
+ */
21
+ exports.SECURITY_ATTACK_CAMPAIGNS_MAX = 100;
22
+ // The longest window the page reads, in days.
23
+ exports.SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS = 31;
24
+ exports.HTTP_ACTIVITY_CLASS_UID = 4002;
25
+ // The requests a campaign got past the app's front door.
26
+ function getCampaignGotThroughCount(campaign) {
27
+ return (campaign.reachedAppCount +
28
+ campaign.erroredCount +
29
+ campaign.reachedDatabaseCount);
30
+ }
31
+ // Requests that were never followed into a trace.
32
+ function getCampaignNotFollowedCount(campaign) {
33
+ return Math.max(0, campaign.requestCount -
34
+ campaign.rejectedCount -
35
+ getCampaignGotThroughCount(campaign));
36
+ }
37
+ // An outcome from its rank (1 Rejected .. 4 Reached Database), '' for 0.
38
+ function outcomeFromRank(rank) {
39
+ return SecurityEventRequestOutcome_1.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER[rank - 1] || "";
40
+ }
41
+ function readNumber(value) {
42
+ const number = Number(value);
43
+ return Number.isFinite(number) && number > 0 ? number : 0;
44
+ }
45
+ function readStrings(value) {
46
+ if (!Array.isArray(value)) {
47
+ return [];
48
+ }
49
+ return value
50
+ .map((item) => {
51
+ return typeof item === "string" ? item.trim() : "";
52
+ })
53
+ .filter((item) => {
54
+ return item.length > 0;
55
+ });
56
+ }
57
+ function readText(value) {
58
+ return typeof value === "string" ? value : "";
59
+ }
60
+ // A campaign from a row of the grouped read, or from the wire.
61
+ function readSecurityAttackCampaign(row) {
62
+ const worstOutcome = readText(row["worstOutcome"]);
63
+ return {
64
+ sourceIp: readText(row["sourceIp"]),
65
+ requestCount: readNumber(row["requestCount"]),
66
+ rejectedCount: readNumber(row["rejectedCount"]),
67
+ reachedAppCount: readNumber(row["reachedAppCount"]),
68
+ erroredCount: readNumber(row["erroredCount"]),
69
+ reachedDatabaseCount: readNumber(row["reachedDatabaseCount"]),
70
+ worstOutcome: worstOutcome ||
71
+ outcomeFromRank(readNumber(row["worstOutcomeRank"])) ||
72
+ "",
73
+ maxSeverityId: readNumber(row["maxSeverityId"]),
74
+ attackKinds: readStrings(row["attackKinds"]),
75
+ userAgents: readStrings(row["userAgents"]),
76
+ targetCount: readNumber(row["targetCount"]),
77
+ sampleTargets: readStrings(row["sampleTargets"]),
78
+ firstSeen: readText(row["firstSeen"]),
79
+ lastSeen: readText(row["lastSeen"]),
80
+ };
81
+ }
@@ -0,0 +1,8 @@
1
+ import commonJsModule from "./SecurityAttackCampaign.js";
2
+ export const HTTP_ACTIVITY_CLASS_UID = commonJsModule.HTTP_ACTIVITY_CLASS_UID;
3
+ export const SECURITY_ATTACK_CAMPAIGNS_MAX = commonJsModule.SECURITY_ATTACK_CAMPAIGNS_MAX;
4
+ export const SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS = commonJsModule.SECURITY_ATTACK_CAMPAIGNS_MAX_DAYS;
5
+ export const getCampaignGotThroughCount = commonJsModule.getCampaignGotThroughCount;
6
+ export const getCampaignNotFollowedCount = commonJsModule.getCampaignNotFollowedCount;
7
+ export const outcomeFromRank = commonJsModule.outcomeFromRank;
8
+ export const readSecurityAttackCampaign = commonJsModule.readSecurityAttackCampaign;
@@ -0,0 +1,28 @@
1
+ declare enum SecurityEventRequestOutcome {
2
+ Rejected = "Rejected",
3
+ ReachedApp = "Reached App",
4
+ Errored = "Errored",
5
+ ReachedDatabase = "Reached Database"
6
+ }
7
+ export declare const SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER: ReadonlyArray<SecurityEventRequestOutcome>;
8
+ export declare function isSecurityEventRequestOutcome(value: unknown): value is SecurityEventRequestOutcome;
9
+ export declare function getRequestOutcomeRank(value: string | undefined): number;
10
+ export declare const SECURITY_REQUEST_ATTRIBUTES: {
11
+ method: string;
12
+ url: string;
13
+ route: string;
14
+ statusCode: string;
15
+ clientAddress: string;
16
+ userAgent: string;
17
+ userId: string;
18
+ durationMs: string;
19
+ serverSpanId: string;
20
+ exceptionFingerprint: string;
21
+ exceptionType: string;
22
+ exceptionMessage: string;
23
+ databaseSystem: string;
24
+ databaseStatement: string;
25
+ databaseDurationMs: string;
26
+ requestedDelaySeconds: string;
27
+ };
28
+ export default SecurityEventRequestOutcome;
@@ -0,0 +1,28 @@
1
+ declare enum SecurityEventRequestOutcome {
2
+ Rejected = "Rejected",
3
+ ReachedApp = "Reached App",
4
+ Errored = "Errored",
5
+ ReachedDatabase = "Reached Database"
6
+ }
7
+ export declare const SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER: ReadonlyArray<SecurityEventRequestOutcome>;
8
+ export declare function isSecurityEventRequestOutcome(value: unknown): value is SecurityEventRequestOutcome;
9
+ export declare function getRequestOutcomeRank(value: string | undefined): number;
10
+ export declare const SECURITY_REQUEST_ATTRIBUTES: {
11
+ method: string;
12
+ url: string;
13
+ route: string;
14
+ statusCode: string;
15
+ clientAddress: string;
16
+ userAgent: string;
17
+ userId: string;
18
+ durationMs: string;
19
+ serverSpanId: string;
20
+ exceptionFingerprint: string;
21
+ exceptionType: string;
22
+ exceptionMessage: string;
23
+ databaseSystem: string;
24
+ databaseStatement: string;
25
+ databaseDurationMs: string;
26
+ requestedDelaySeconds: string;
27
+ };
28
+ export default SecurityEventRequestOutcome;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SECURITY_REQUEST_ATTRIBUTES = exports.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER = void 0;
4
+ exports.isSecurityEventRequestOutcome = isSecurityEventRequestOutcome;
5
+ exports.getRequestOutcomeRank = getRequestOutcomeRank;
6
+ /*
7
+ * HOW FAR THE REQUEST BEHIND A SECURITY EVENT GOT, as its trace shows.
8
+ *
9
+ * A log line that holds an attack string says somebody tried. The trace of
10
+ * the request it was written in says whether it worked: the status the app
11
+ * answered with, how long it took, the exception it threw, the database
12
+ * statement it ran. OneUptime holds that trace beside the log, so it can
13
+ * say what a SIEM that only reads logs cannot (Server/Utils/SecurityEvent/
14
+ * RequestTrace/SecurityRequestTrace.ts reads it, Utils/SecurityEvent/
15
+ * RequestOutcome.ts decides).
16
+ *
17
+ * Stored on the event (SecurityEvent.requestOutcome). Empty when the event
18
+ * names no request OneUptime could follow: no trace, or no spans for it.
19
+ */
20
+ var SecurityEventRequestOutcome;
21
+ (function (SecurityEventRequestOutcome) {
22
+ // The app turned the request away (4xx): no handler did what it asked.
23
+ SecurityEventRequestOutcome["Rejected"] = "Rejected";
24
+ // A handler ran and answered (2xx, 3xx).
25
+ SecurityEventRequestOutcome["ReachedApp"] = "Reached App";
26
+ // The request broke something: a 5xx, a failed span or an exception.
27
+ SecurityEventRequestOutcome["Errored"] = "Errored";
28
+ /*
29
+ * The payload ran in the database: a query the request made holds it, or
30
+ * the request took as long as the SQL it carried asked the database to
31
+ * sleep.
32
+ */
33
+ SecurityEventRequestOutcome["ReachedDatabase"] = "Reached Database";
34
+ })(SecurityEventRequestOutcome || (SecurityEventRequestOutcome = {}));
35
+ // Least to most serious - the order the UI lists and ranks them in.
36
+ exports.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER = [
37
+ SecurityEventRequestOutcome.Rejected,
38
+ SecurityEventRequestOutcome.ReachedApp,
39
+ SecurityEventRequestOutcome.Errored,
40
+ SecurityEventRequestOutcome.ReachedDatabase,
41
+ ];
42
+ function isSecurityEventRequestOutcome(value) {
43
+ return (typeof value === "string" &&
44
+ exports.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER.includes(value));
45
+ }
46
+ // 0 for no outcome, then 1 (Rejected) to 4 (Reached Database).
47
+ function getRequestOutcomeRank(value) {
48
+ if (!isSecurityEventRequestOutcome(value)) {
49
+ return 0;
50
+ }
51
+ return exports.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER.indexOf(value) + 1;
52
+ }
53
+ /*
54
+ * The facts a followed request leaves on its event, as attributes: the
55
+ * OpenTelemetry names where OpenTelemetry has one, so a search or a rule
56
+ * reads them the way it reads any request, and oneuptime.* for what only
57
+ * the trace says. The UI writes its sentences from these, so a reader's
58
+ * language words them.
59
+ */
60
+ exports.SECURITY_REQUEST_ATTRIBUTES = {
61
+ method: "http.request.method",
62
+ url: "url.original",
63
+ route: "http.route",
64
+ statusCode: "http.response.status_code",
65
+ clientAddress: "client.address",
66
+ userAgent: "user_agent.original",
67
+ userId: "enduser.id",
68
+ durationMs: "oneuptime.request.duration_ms",
69
+ serverSpanId: "oneuptime.request.span_id",
70
+ exceptionFingerprint: "oneuptime.exception.fingerprint",
71
+ exceptionType: "oneuptime.exception.type",
72
+ exceptionMessage: "oneuptime.exception.message",
73
+ databaseSystem: "oneuptime.database.system",
74
+ databaseStatement: "oneuptime.database.statement",
75
+ databaseDurationMs: "oneuptime.database.duration_ms",
76
+ requestedDelaySeconds: "oneuptime.attack.requested_delay_seconds",
77
+ };
78
+ exports.default = SecurityEventRequestOutcome;
@@ -0,0 +1,6 @@
1
+ import commonJsModule from "./SecurityEventRequestOutcome.js";
2
+ export default commonJsModule.default;
3
+ export const SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER = commonJsModule.SECURITY_EVENT_REQUEST_OUTCOMES_IN_ORDER;
4
+ export const SECURITY_REQUEST_ATTRIBUTES = commonJsModule.SECURITY_REQUEST_ATTRIBUTES;
5
+ export const getRequestOutcomeRank = commonJsModule.getRequestOutcomeRank;
6
+ export const isSecurityEventRequestOutcome = commonJsModule.isSecurityEventRequestOutcome;