@oneuptime/common 14.0.98 → 14.0.99

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 (527) hide show
  1. package/Models/DatabaseModels/CloudAccount.d.mts +8 -0
  2. package/Models/DatabaseModels/CloudAccount.d.ts +8 -0
  3. package/Models/DatabaseModels/CloudAccount.js +167 -0
  4. package/Models/DatabaseModels/CloudAccountFeed.d.mts +27 -0
  5. package/Models/DatabaseModels/CloudAccountFeed.d.ts +27 -0
  6. package/Models/DatabaseModels/CloudAccountFeed.js +557 -0
  7. package/Models/DatabaseModels/CloudAccountFeed.mjs +3 -0
  8. package/Models/DatabaseModels/DataSecurityCheckSetting.d.mts +17 -0
  9. package/Models/DatabaseModels/DataSecurityCheckSetting.d.ts +17 -0
  10. package/Models/DatabaseModels/DataSecurityCheckSetting.js +304 -0
  11. package/Models/DatabaseModels/DataSecurityCheckSetting.mjs +2 -0
  12. package/Models/DatabaseModels/DataSecurityCustomDataType.d.mts +25 -0
  13. package/Models/DatabaseModels/DataSecurityCustomDataType.d.ts +25 -0
  14. package/Models/DatabaseModels/DataSecurityCustomDataType.js +431 -0
  15. package/Models/DatabaseModels/DataSecurityCustomDataType.mjs +2 -0
  16. package/Models/DatabaseModels/DataSecurityFlow.d.mts +26 -0
  17. package/Models/DatabaseModels/DataSecurityFlow.d.ts +26 -0
  18. package/Models/DatabaseModels/DataSecurityFlow.js +456 -0
  19. package/Models/DatabaseModels/DataSecurityFlow.mjs +2 -0
  20. package/Models/DatabaseModels/DataSecurityIssue.d.mts +49 -0
  21. package/Models/DatabaseModels/DataSecurityIssue.d.ts +49 -0
  22. package/Models/DatabaseModels/DataSecurityIssue.js +797 -0
  23. package/Models/DatabaseModels/DataSecurityIssue.mjs +2 -0
  24. package/Models/DatabaseModels/DataSecurityIssueFeed.d.mts +43 -0
  25. package/Models/DatabaseModels/DataSecurityIssueFeed.d.ts +43 -0
  26. package/Models/DatabaseModels/DataSecurityIssueFeed.js +382 -0
  27. package/Models/DatabaseModels/DataSecurityIssueFeed.mjs +3 -0
  28. package/Models/DatabaseModels/DataSecurityResidencyRule.d.mts +18 -0
  29. package/Models/DatabaseModels/DataSecurityResidencyRule.d.ts +18 -0
  30. package/Models/DatabaseModels/DataSecurityResidencyRule.js +331 -0
  31. package/Models/DatabaseModels/DataSecurityResidencyRule.mjs +2 -0
  32. package/Models/DatabaseModels/DataSecurityScan.d.mts +29 -0
  33. package/Models/DatabaseModels/DataSecurityScan.d.ts +29 -0
  34. package/Models/DatabaseModels/DataSecurityScan.js +520 -0
  35. package/Models/DatabaseModels/DataSecurityScan.mjs +2 -0
  36. package/Models/DatabaseModels/DataSecuritySetting.d.mts +35 -0
  37. package/Models/DatabaseModels/DataSecuritySetting.d.ts +35 -0
  38. package/Models/DatabaseModels/DataSecuritySetting.js +631 -0
  39. package/Models/DatabaseModels/DataSecuritySetting.mjs +2 -0
  40. package/Models/DatabaseModels/DataStore.d.mts +83 -0
  41. package/Models/DatabaseModels/DataStore.d.ts +83 -0
  42. package/Models/DatabaseModels/DataStore.js +1343 -0
  43. package/Models/DatabaseModels/DataStore.mjs +2 -0
  44. package/Models/DatabaseModels/DataStoreAccess.d.mts +22 -0
  45. package/Models/DatabaseModels/DataStoreAccess.d.ts +22 -0
  46. package/Models/DatabaseModels/DataStoreAccess.js +407 -0
  47. package/Models/DatabaseModels/DataStoreAccess.mjs +2 -0
  48. package/Models/DatabaseModels/DataStoreFeed.d.mts +36 -0
  49. package/Models/DatabaseModels/DataStoreFeed.d.ts +36 -0
  50. package/Models/DatabaseModels/DataStoreFeed.js +613 -0
  51. package/Models/DatabaseModels/DataStoreFeed.mjs +3 -0
  52. package/Models/DatabaseModels/DataStoreFinding.d.mts +38 -0
  53. package/Models/DatabaseModels/DataStoreFinding.d.ts +38 -0
  54. package/Models/DatabaseModels/DataStoreFinding.js +683 -0
  55. package/Models/DatabaseModels/DataStoreFinding.mjs +2 -0
  56. package/Models/DatabaseModels/DataStoreLabelRule.d.mts +21 -0
  57. package/Models/DatabaseModels/DataStoreLabelRule.d.ts +21 -0
  58. package/Models/DatabaseModels/DataStoreLabelRule.js +623 -0
  59. package/Models/DatabaseModels/DataStoreLabelRule.mjs +2 -0
  60. package/Models/DatabaseModels/DataStoreOwnerRule.d.mts +24 -0
  61. package/Models/DatabaseModels/DataStoreOwnerRule.d.ts +24 -0
  62. package/Models/DatabaseModels/DataStoreOwnerRule.js +714 -0
  63. package/Models/DatabaseModels/DataStoreOwnerRule.mjs +2 -0
  64. package/Models/DatabaseModels/DataStoreOwnerTeam.d.mts +19 -0
  65. package/Models/DatabaseModels/DataStoreOwnerTeam.d.ts +19 -0
  66. package/Models/DatabaseModels/DataStoreOwnerTeam.js +477 -0
  67. package/Models/DatabaseModels/DataStoreOwnerTeam.mjs +2 -0
  68. package/Models/DatabaseModels/DataStoreOwnerUser.d.mts +18 -0
  69. package/Models/DatabaseModels/DataStoreOwnerUser.d.ts +18 -0
  70. package/Models/DatabaseModels/DataStoreOwnerUser.js +476 -0
  71. package/Models/DatabaseModels/DataStoreOwnerUser.mjs +2 -0
  72. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  73. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  74. package/Models/DatabaseModels/GlobalConfig.js +110 -0
  75. package/Models/DatabaseModels/Index.js +35 -0
  76. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +1 -0
  77. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +1 -0
  78. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +43 -0
  79. package/Models/DatabaseModels/ResourceAiAgent.js +3 -1
  80. package/Models/DatabaseModels/SecurityEntityCriticality.js +7 -6
  81. package/Models/DatabaseModels/SecurityEntityRisk.js +2 -2
  82. package/Models/DatabaseModels/TelemetryException.d.mts +5 -0
  83. package/Models/DatabaseModels/TelemetryException.d.ts +5 -0
  84. package/Models/DatabaseModels/TelemetryException.js +170 -8
  85. package/Types/AI/AIChatPageContext.d.mts +4 -1
  86. package/Types/AI/AIChatPageContext.d.ts +4 -1
  87. package/Types/AI/AIChatPageContext.js +7 -0
  88. package/Types/AI/AIChatTypes.d.mts +6 -1
  89. package/Types/AI/AIChatTypes.d.ts +6 -1
  90. package/Types/AI/AIChatTypes.js +9 -0
  91. package/Types/AI/AiAffectedResources.js +5 -3
  92. package/Types/AI/CodeFixTaskContext.d.mts +21 -0
  93. package/Types/AI/CodeFixTaskContext.d.ts +21 -0
  94. package/Types/AI/CodeFixTaskContext.js +61 -4
  95. package/Types/AI/CodeFixTaskContext.mjs +2 -0
  96. package/Types/AI/CodeTask.d.mts +2 -0
  97. package/Types/AI/CodeTask.d.ts +2 -0
  98. package/Types/AI/CodeTask.js +4 -0
  99. package/Types/AI/ResourceAiAccessApi.d.mts +1 -0
  100. package/Types/AI/ResourceAiAccessApi.d.ts +1 -0
  101. package/Types/AI/ResourceAiAccessPermissions.js +6 -0
  102. package/Types/AutoRemediation/AiRemediationCommandPlan.d.mts +19 -0
  103. package/Types/AutoRemediation/AiRemediationCommandPlan.d.ts +19 -0
  104. package/Types/AutoRemediation/AiRemediationCommandPlan.js +85 -10
  105. package/Types/AutoRemediation/AiRemediationCommandPlan.mjs +4 -0
  106. package/Types/AutoRemediation/RemediationTryAgain.d.mts +17 -0
  107. package/Types/AutoRemediation/RemediationTryAgain.d.ts +17 -0
  108. package/Types/AutoRemediation/RemediationTryAgain.js +104 -0
  109. package/Types/AutoRemediation/RemediationTryAgain.mjs +6 -0
  110. package/Types/CloudConnection/CloudAiAgentCost.d.mts +19 -0
  111. package/Types/CloudConnection/CloudAiAgentCost.d.ts +19 -0
  112. package/Types/CloudConnection/CloudAiAgentCost.js +95 -0
  113. package/Types/CloudConnection/CloudAiAgentCost.mjs +15 -0
  114. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.mts +70 -0
  115. package/Types/CloudConnection/CloudAiAgentSetupCommands.d.ts +70 -0
  116. package/Types/CloudConnection/CloudAiAgentSetupCommands.js +1107 -0
  117. package/Types/CloudConnection/CloudAiAgentSetupCommands.mjs +37 -0
  118. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +8 -0
  119. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +8 -0
  120. package/Types/CloudConnection/CloudConnectionCatalog.js +75 -1
  121. package/Types/CloudConnection/CloudConnectionCatalog.mjs +6 -0
  122. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +48 -4
  123. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +48 -4
  124. package/Types/CloudConnection/CloudConnectionSetupCommands.js +410 -16
  125. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +21 -0
  126. package/Types/CodeRepository/CodeHost.d.mts +2 -1
  127. package/Types/CodeRepository/CodeHost.d.ts +2 -1
  128. package/Types/CodeRepository/CodeHost.js +12 -5
  129. package/Types/CodeRepository/ProductionReview.d.mts +7 -0
  130. package/Types/CodeRepository/ProductionReview.d.ts +7 -0
  131. package/Types/CodeRepository/ProductionReview.js +67 -1
  132. package/Types/CodeRepository/ProductionReview.mjs +1 -0
  133. package/Types/DataSecurity/ComplianceFramework.d.mts +21 -0
  134. package/Types/DataSecurity/ComplianceFramework.d.ts +21 -0
  135. package/Types/DataSecurity/ComplianceFramework.js +97 -0
  136. package/Types/DataSecurity/ComplianceFramework.mjs +5 -0
  137. package/Types/DataSecurity/ComplianceRequirementCatalog.d.mts +41 -0
  138. package/Types/DataSecurity/ComplianceRequirementCatalog.d.ts +41 -0
  139. package/Types/DataSecurity/ComplianceRequirementCatalog.js +199 -0
  140. package/Types/DataSecurity/ComplianceRequirementCatalog.mjs +7 -0
  141. package/Types/DataSecurity/DataCategory.d.mts +15 -0
  142. package/Types/DataSecurity/DataCategory.d.ts +15 -0
  143. package/Types/DataSecurity/DataCategory.js +61 -0
  144. package/Types/DataSecurity/DataCategory.mjs +7 -0
  145. package/Types/DataSecurity/DataConfidence.d.mts +11 -0
  146. package/Types/DataSecurity/DataConfidence.d.ts +11 -0
  147. package/Types/DataSecurity/DataConfidence.js +49 -0
  148. package/Types/DataSecurity/DataConfidence.mjs +7 -0
  149. package/Types/DataSecurity/DataSecurityApiTypes.d.mts +106 -0
  150. package/Types/DataSecurity/DataSecurityApiTypes.d.ts +106 -0
  151. package/Types/DataSecurity/DataSecurityApiTypes.js +53 -0
  152. package/Types/DataSecurity/DataSecurityApiTypes.mjs +3 -0
  153. package/Types/DataSecurity/DataSecurityCheckCatalog.d.mts +93 -0
  154. package/Types/DataSecurity/DataSecurityCheckCatalog.d.ts +93 -0
  155. package/Types/DataSecurity/DataSecurityCheckCatalog.js +1183 -0
  156. package/Types/DataSecurity/DataSecurityCheckCatalog.mjs +10 -0
  157. package/Types/DataSecurity/DataSecurityIssueStatus.d.mts +10 -0
  158. package/Types/DataSecurity/DataSecurityIssueStatus.d.ts +10 -0
  159. package/Types/DataSecurity/DataSecurityIssueStatus.js +38 -0
  160. package/Types/DataSecurity/DataSecurityIssueStatus.mjs +5 -0
  161. package/Types/DataSecurity/DataSecurityResidency.d.mts +21 -0
  162. package/Types/DataSecurity/DataSecurityResidency.d.ts +21 -0
  163. package/Types/DataSecurity/DataSecurityResidency.js +92 -0
  164. package/Types/DataSecurity/DataSecurityResidency.mjs +5 -0
  165. package/Types/DataSecurity/DataSecurityResponseAction.d.mts +14 -0
  166. package/Types/DataSecurity/DataSecurityResponseAction.d.ts +14 -0
  167. package/Types/DataSecurity/DataSecurityResponseAction.js +115 -0
  168. package/Types/DataSecurity/DataSecurityResponseAction.mjs +11 -0
  169. package/Types/DataSecurity/DataSecurityRisk.d.mts +38 -0
  170. package/Types/DataSecurity/DataSecurityRisk.d.ts +38 -0
  171. package/Types/DataSecurity/DataSecurityRisk.js +138 -0
  172. package/Types/DataSecurity/DataSecurityRisk.mjs +7 -0
  173. package/Types/DataSecurity/DataSensitivity.d.mts +13 -0
  174. package/Types/DataSecurity/DataSensitivity.d.ts +13 -0
  175. package/Types/DataSecurity/DataSensitivity.js +68 -0
  176. package/Types/DataSecurity/DataSensitivity.mjs +8 -0
  177. package/Types/DataSecurity/DataStoreAccess.d.mts +27 -0
  178. package/Types/DataSecurity/DataStoreAccess.d.ts +27 -0
  179. package/Types/DataSecurity/DataStoreAccess.js +35 -0
  180. package/Types/DataSecurity/DataStoreAccess.mjs +4 -0
  181. package/Types/DataSecurity/DataStoreEnvironment.d.mts +11 -0
  182. package/Types/DataSecurity/DataStoreEnvironment.d.ts +11 -0
  183. package/Types/DataSecurity/DataStoreEnvironment.js +80 -0
  184. package/Types/DataSecurity/DataStoreEnvironment.mjs +5 -0
  185. package/Types/DataSecurity/DataStoreKey.d.mts +18 -0
  186. package/Types/DataSecurity/DataStoreKey.d.ts +18 -0
  187. package/Types/DataSecurity/DataStoreKey.js +49 -0
  188. package/Types/DataSecurity/DataStoreKey.mjs +7 -0
  189. package/Types/DataSecurity/DataStoreKind.d.mts +67 -0
  190. package/Types/DataSecurity/DataStoreKind.d.ts +67 -0
  191. package/Types/DataSecurity/DataStoreKind.js +230 -0
  192. package/Types/DataSecurity/DataStoreKind.mjs +10 -0
  193. package/Types/DataSecurity/DataStorePosture.d.mts +40 -0
  194. package/Types/DataSecurity/DataStorePosture.d.ts +40 -0
  195. package/Types/DataSecurity/DataStorePosture.js +100 -0
  196. package/Types/DataSecurity/DataStorePosture.mjs +7 -0
  197. package/Types/DataSecurity/DataTypeCatalog.d.mts +17 -0
  198. package/Types/DataSecurity/DataTypeCatalog.d.ts +17 -0
  199. package/Types/DataSecurity/DataTypeCatalog.js +434 -0
  200. package/Types/DataSecurity/DataTypeCatalog.mjs +4 -0
  201. package/Types/Email/EmailTemplateType.d.mts +1 -0
  202. package/Types/Email/EmailTemplateType.d.ts +1 -0
  203. package/Types/Email/EmailTemplateType.js +6 -0
  204. package/Types/Monitor/CephAlertTemplates.d.mts +2 -1
  205. package/Types/Monitor/CephAlertTemplates.d.ts +2 -1
  206. package/Types/Monitor/CephAlertTemplates.js +49 -0
  207. package/Types/Monitor/CephAlertTemplates.mjs +1 -0
  208. package/Types/Monitor/DockerAlertTemplates.d.mts +2 -1
  209. package/Types/Monitor/DockerAlertTemplates.d.ts +2 -1
  210. package/Types/Monitor/DockerAlertTemplates.js +109 -37
  211. package/Types/Monitor/DockerAlertTemplates.mjs +1 -0
  212. package/Types/Monitor/DockerMetricCatalog.d.mts +1 -0
  213. package/Types/Monitor/DockerMetricCatalog.d.ts +1 -0
  214. package/Types/Monitor/DockerMetricCatalog.js +26 -52
  215. package/Types/Monitor/DockerSwarmAlertTemplates.d.mts +1 -0
  216. package/Types/Monitor/DockerSwarmAlertTemplates.d.ts +1 -0
  217. package/Types/Monitor/DockerSwarmAlertTemplates.js +65 -8
  218. package/Types/Monitor/DockerSwarmAlertTemplates.mjs +1 -0
  219. package/Types/Monitor/DockerSwarmMetricCatalog.js +7 -4
  220. package/Types/Monitor/HostAlertTemplates.d.mts +2 -1
  221. package/Types/Monitor/HostAlertTemplates.d.ts +2 -1
  222. package/Types/Monitor/HostAlertTemplates.js +48 -0
  223. package/Types/Monitor/HostAlertTemplates.mjs +1 -0
  224. package/Types/Monitor/IotAlertTemplates.d.mts +1 -0
  225. package/Types/Monitor/IotAlertTemplates.d.ts +1 -0
  226. package/Types/Monitor/IotAlertTemplates.js +11 -0
  227. package/Types/Monitor/IotAlertTemplates.mjs +1 -0
  228. package/Types/Monitor/KubernetesAlertTemplates.d.mts +49 -1
  229. package/Types/Monitor/KubernetesAlertTemplates.d.ts +49 -1
  230. package/Types/Monitor/KubernetesAlertTemplates.js +392 -75
  231. package/Types/Monitor/KubernetesAlertTemplates.mjs +2 -0
  232. package/Types/Monitor/KubernetesMetricCatalog.js +12 -2
  233. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.mts +4 -4
  234. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.ts +4 -4
  235. package/Types/Monitor/MonitorCriteriaInstance.js +107 -10
  236. package/Types/Monitor/MonitorStep.js +50 -3
  237. package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.mts +33 -11
  238. package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.ts +33 -11
  239. package/Types/Monitor/MonitorStepDockerSwarmMonitor.js +65 -0
  240. package/Types/Monitor/MonitorStepKubernetesMonitor.d.mts +6 -0
  241. package/Types/Monitor/MonitorStepKubernetesMonitor.d.ts +6 -0
  242. package/Types/Monitor/MonitorStepKubernetesMonitor.js +38 -1
  243. package/Types/Monitor/MonitorStepKubernetesMonitor.mjs +2 -0
  244. package/Types/Monitor/MonitorType.d.mts +1 -0
  245. package/Types/Monitor/MonitorType.d.ts +1 -0
  246. package/Types/Monitor/MonitorType.js +18 -0
  247. package/Types/Monitor/PodmanAlertTemplates.d.mts +12 -1
  248. package/Types/Monitor/PodmanAlertTemplates.d.ts +12 -1
  249. package/Types/Monitor/PodmanAlertTemplates.js +161 -33
  250. package/Types/Monitor/PodmanAlertTemplates.mjs +2 -0
  251. package/Types/Monitor/PodmanMetricCatalog.d.mts +1 -0
  252. package/Types/Monitor/PodmanMetricCatalog.d.ts +1 -0
  253. package/Types/Monitor/PodmanMetricCatalog.js +26 -52
  254. package/Types/Monitor/ProxmoxAlertTemplates.d.mts +1 -0
  255. package/Types/Monitor/ProxmoxAlertTemplates.d.ts +1 -0
  256. package/Types/Monitor/ProxmoxAlertTemplates.js +49 -0
  257. package/Types/Monitor/ProxmoxAlertTemplates.mjs +1 -0
  258. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.mts +19 -0
  259. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.ts +19 -0
  260. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +50 -2
  261. package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.mjs +2 -0
  262. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +2 -0
  263. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +2 -0
  264. package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +31 -2
  265. package/Types/Monitor/StorageArrayAlertTemplates.d.mts +2 -1
  266. package/Types/Monitor/StorageArrayAlertTemplates.d.ts +2 -1
  267. package/Types/Monitor/StorageArrayAlertTemplates.js +69 -0
  268. package/Types/Monitor/StorageArrayAlertTemplates.mjs +1 -0
  269. package/Types/Monitor/VMwareAlertTemplates.d.mts +2 -1
  270. package/Types/Monitor/VMwareAlertTemplates.d.ts +2 -1
  271. package/Types/Monitor/VMwareAlertTemplates.js +50 -0
  272. package/Types/Monitor/VMwareAlertTemplates.mjs +1 -0
  273. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +44 -0
  274. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +44 -0
  275. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +171 -0
  276. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +14 -0
  277. package/Types/Permission.d.mts +51 -0
  278. package/Types/Permission.d.ts +51 -0
  279. package/Types/Permission.js +542 -0
  280. package/Types/Probe/ProbeCapability.d.mts +2 -1
  281. package/Types/Probe/ProbeCapability.d.ts +2 -1
  282. package/Types/Probe/ProbeCapability.js +8 -0
  283. package/Types/ProviderLogo/ProviderLogo.d.mts +2 -0
  284. package/Types/ProviderLogo/ProviderLogo.d.ts +2 -0
  285. package/Types/ProviderLogo/ProviderLogo.js +4 -0
  286. package/Types/ResourceAiAgent/AiResourceType.d.mts +7 -1
  287. package/Types/ResourceAiAgent/AiResourceType.d.ts +7 -1
  288. package/Types/ResourceAiAgent/AiResourceType.js +76 -2
  289. package/Types/ResourceAiAgent/AiResourceType.mjs +3 -0
  290. package/Types/ResourceAiAgent/CloudAiAgentNames.d.mts +19 -0
  291. package/Types/ResourceAiAgent/CloudAiAgentNames.d.ts +19 -0
  292. package/Types/ResourceAiAgent/CloudAiAgentNames.js +75 -0
  293. package/Types/ResourceAiAgent/CloudAiAgentNames.mjs +16 -0
  294. package/Types/ResourceAiAgent/ResourceAiAccess.d.mts +12 -1
  295. package/Types/ResourceAiAgent/ResourceAiAccess.d.ts +12 -1
  296. package/Types/ResourceAiAgent/ResourceAiAccess.js +28 -1
  297. package/Types/ResourceAiAgent/ResourceAiAccess.mjs +6 -0
  298. package/Types/Rules/RuleCriteriaFieldRegistry.js +13 -0
  299. package/Types/Rules/RuleCriteriaSubject.d.mts +2 -1
  300. package/Types/Rules/RuleCriteriaSubject.d.ts +2 -1
  301. package/Types/Rules/RuleCriteriaSubject.js +3 -0
  302. package/Types/Rules/RuleRun.d.mts +2 -0
  303. package/Types/Rules/RuleRun.d.ts +2 -0
  304. package/Types/Rules/RuleRun.js +4 -0
  305. package/Types/SecurityCase/SecurityDetectionSource.d.mts +2 -1
  306. package/Types/SecurityCase/SecurityDetectionSource.d.ts +2 -1
  307. package/Types/SecurityCase/SecurityDetectionSource.js +5 -2
  308. package/Types/SecurityCase/SecurityEntity.d.mts +5 -0
  309. package/Types/SecurityCase/SecurityEntity.d.ts +5 -0
  310. package/Types/SecurityCase/SecurityEntity.js +39 -1
  311. package/Types/SecurityCase/SecurityEntity.mjs +4 -0
  312. package/Types/SecurityCase/SecurityEntityRisk.js +14 -6
  313. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
  314. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
  315. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +124 -1
  316. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.mjs +2 -0
  317. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.mts +3 -1
  318. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.ts +3 -1
  319. package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js +4 -0
  320. package/Types/SecurityEvent/DataSecuritySignal.d.mts +33 -0
  321. package/Types/SecurityEvent/DataSecuritySignal.d.ts +33 -0
  322. package/Types/SecurityEvent/DataSecuritySignal.js +114 -0
  323. package/Types/SecurityEvent/DataSecuritySignal.mjs +14 -0
  324. package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +7 -1
  325. package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +7 -1
  326. package/Types/SecurityEvent/DetectionRuleDataKind.js +74 -0
  327. package/Types/SecurityEvent/DetectionRuleLibrary.d.mts +2 -1
  328. package/Types/SecurityEvent/DetectionRuleLibrary.d.ts +2 -1
  329. package/Types/SecurityEvent/DetectionRuleLibrary.js +730 -0
  330. package/Types/SecurityEvent/OcsfEventClass.js +31 -2
  331. package/Types/SecurityEvent/SecurityLogFormat.d.mts +15 -0
  332. package/Types/SecurityEvent/SecurityLogFormat.d.ts +15 -0
  333. package/Types/SecurityEvent/SecurityLogFormat.js +123 -10
  334. package/Types/SecurityEvent/SecurityLogFormat.mjs +4 -0
  335. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +3 -0
  336. package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +3 -0
  337. package/Types/SecurityPlaybook/SecurityPlaybookAction.js +37 -0
  338. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +3 -0
  339. package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +3 -0
  340. package/Types/SecurityPlaybook/SecurityPlaybookStep.js +9 -0
  341. package/Types/SecurityPlaybook/SecurityProtectedEntity.js +8 -1
  342. package/Types/Telemetry/ExceptionAIDigest.d.mts +31 -0
  343. package/Types/Telemetry/ExceptionAIDigest.d.ts +31 -0
  344. package/Types/Telemetry/ExceptionAIDigest.js +131 -0
  345. package/Types/Telemetry/ExceptionAIDigest.mjs +13 -0
  346. package/Types/Telemetry/ExceptionAIExplanation.d.mts +37 -0
  347. package/Types/Telemetry/ExceptionAIExplanation.d.ts +37 -0
  348. package/Types/Telemetry/ExceptionAIExplanation.js +110 -0
  349. package/Types/Telemetry/ExceptionAIExplanation.mjs +12 -0
  350. package/Types/Telemetry/TraceSpanType.d.mts +1 -1
  351. package/Types/Telemetry/TraceSpanType.d.ts +1 -1
  352. package/Types/Telemetry/TraceSpanType.js +33 -8
  353. package/Types/Telemetry/TraceSpanType.mjs +1 -1
  354. package/Types/UpdateCheck/SecurityAdvisory.d.mts +39 -0
  355. package/Types/UpdateCheck/SecurityAdvisory.d.ts +39 -0
  356. package/Types/UpdateCheck/SecurityAdvisory.js +221 -0
  357. package/Types/UpdateCheck/SecurityAdvisory.mjs +7 -0
  358. package/Types/UpdateCheck/UpdateCheckFailure.d.mts +9 -0
  359. package/Types/UpdateCheck/UpdateCheckFailure.d.ts +9 -0
  360. package/Types/UpdateCheck/UpdateCheckFailure.js +32 -0
  361. package/Types/UpdateCheck/UpdateCheckFailure.mjs +3 -0
  362. package/Types/UpdateCheck/UpdateStatus.d.mts +44 -0
  363. package/Types/UpdateCheck/UpdateStatus.d.ts +44 -0
  364. package/Types/UpdateCheck/UpdateStatus.js +195 -0
  365. package/Types/UpdateCheck/UpdateStatus.mjs +3 -0
  366. package/Types/Workspace/WorkspaceMessagePayload.d.mts +1 -0
  367. package/Types/Workspace/WorkspaceMessagePayload.d.ts +1 -0
  368. package/Utils/AiRemediation/CloudChangeDryRunPlan.d.mts +17 -0
  369. package/Utils/AiRemediation/CloudChangeDryRunPlan.d.ts +17 -0
  370. package/Utils/AiRemediation/CloudChangeDryRunPlan.js +122 -0
  371. package/Utils/AiRemediation/CloudChangeDryRunPlan.mjs +7 -0
  372. package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.mts +4 -0
  373. package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.ts +4 -0
  374. package/Utils/AiRemediation/Resource/CloudCommandPolicy.js +177 -0
  375. package/Utils/AiRemediation/Resource/CloudCommandPolicy.mjs +4 -0
  376. package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.mts +144 -0
  377. package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.ts +144 -0
  378. package/Utils/AiRemediation/Resource/CloudOperationCatalog.js +1964 -0
  379. package/Utils/AiRemediation/Resource/CloudOperationCatalog.mjs +48 -0
  380. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +4 -0
  381. package/Utils/DataSecurity/CustomDataTypeDetector.d.mts +23 -0
  382. package/Utils/DataSecurity/CustomDataTypeDetector.d.ts +23 -0
  383. package/Utils/DataSecurity/CustomDataTypeDetector.js +130 -0
  384. package/Utils/DataSecurity/CustomDataTypeDetector.mjs +8 -0
  385. package/Utils/DataSecurity/Detector.d.mts +26 -0
  386. package/Utils/DataSecurity/Detector.d.ts +26 -0
  387. package/Utils/DataSecurity/Detector.js +83 -0
  388. package/Utils/DataSecurity/Detector.mjs +8 -0
  389. package/Utils/DataSecurity/Detectors/ContactDetectors.d.mts +12 -0
  390. package/Utils/DataSecurity/Detectors/ContactDetectors.d.ts +12 -0
  391. package/Utils/DataSecurity/Detectors/ContactDetectors.js +915 -0
  392. package/Utils/DataSecurity/Detectors/ContactDetectors.mjs +12 -0
  393. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.mts +3 -0
  394. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.ts +3 -0
  395. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.js +52 -0
  396. package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.mjs +3 -0
  397. package/Utils/DataSecurity/Detectors/FinancialDetectors.d.mts +8 -0
  398. package/Utils/DataSecurity/Detectors/FinancialDetectors.d.ts +8 -0
  399. package/Utils/DataSecurity/Detectors/FinancialDetectors.js +566 -0
  400. package/Utils/DataSecurity/Detectors/FinancialDetectors.mjs +8 -0
  401. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.mts +3 -0
  402. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.ts +3 -0
  403. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.js +2415 -0
  404. package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.mjs +3 -0
  405. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.mts +3 -0
  406. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.ts +3 -0
  407. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.js +258 -0
  408. package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.mjs +3 -0
  409. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.mts +3 -0
  410. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.ts +3 -0
  411. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.js +115 -0
  412. package/Utils/DataSecurity/Detectors/HealthRecordDetectors.mjs +3 -0
  413. package/Utils/DataSecurity/Detectors/Index.d.mts +4 -0
  414. package/Utils/DataSecurity/Detectors/Index.d.ts +4 -0
  415. package/Utils/DataSecurity/Detectors/Index.js +47 -0
  416. package/Utils/DataSecurity/Detectors/Index.mjs +4 -0
  417. package/Utils/DataSecurity/Detectors/SecretDetectors.d.mts +11 -0
  418. package/Utils/DataSecurity/Detectors/SecretDetectors.d.ts +11 -0
  419. package/Utils/DataSecurity/Detectors/SecretDetectors.js +1733 -0
  420. package/Utils/DataSecurity/Detectors/SecretDetectors.mjs +11 -0
  421. package/Utils/DataSecurity/FieldClassifier.d.mts +20 -0
  422. package/Utils/DataSecurity/FieldClassifier.d.ts +20 -0
  423. package/Utils/DataSecurity/FieldClassifier.js +247 -0
  424. package/Utils/DataSecurity/FieldClassifier.mjs +5 -0
  425. package/Utils/DataSecurity/FieldCollector.d.mts +23 -0
  426. package/Utils/DataSecurity/FieldCollector.d.ts +23 -0
  427. package/Utils/DataSecurity/FieldCollector.js +81 -0
  428. package/Utils/DataSecurity/FieldCollector.mjs +3 -0
  429. package/Utils/DataSecurity/FieldNameHints.d.mts +9 -0
  430. package/Utils/DataSecurity/FieldNameHints.d.ts +9 -0
  431. package/Utils/DataSecurity/FieldNameHints.js +184 -0
  432. package/Utils/DataSecurity/FieldNameHints.mjs +6 -0
  433. package/Utils/DataSecurity/FindingTally.d.mts +44 -0
  434. package/Utils/DataSecurity/FindingTally.d.ts +44 -0
  435. package/Utils/DataSecurity/FindingTally.js +138 -0
  436. package/Utils/DataSecurity/FindingTally.mjs +6 -0
  437. package/Utils/DataSecurity/Masking.d.mts +6 -0
  438. package/Utils/DataSecurity/Masking.d.ts +6 -0
  439. package/Utils/DataSecurity/Masking.js +159 -0
  440. package/Utils/DataSecurity/Masking.mjs +7 -0
  441. package/Utils/DataSecurity/PathPattern.d.mts +3 -0
  442. package/Utils/DataSecurity/PathPattern.d.ts +3 -0
  443. package/Utils/DataSecurity/PathPattern.js +55 -0
  444. package/Utils/DataSecurity/PathPattern.mjs +4 -0
  445. package/Utils/DataSecurity/Sha256.d.mts +1 -0
  446. package/Utils/DataSecurity/Sha256.d.ts +1 -0
  447. package/Utils/DataSecurity/Sha256.js +94 -0
  448. package/Utils/DataSecurity/Sha256.mjs +2 -0
  449. package/Utils/DataSecurity/TextScanner.d.mts +35 -0
  450. package/Utils/DataSecurity/TextScanner.d.ts +35 -0
  451. package/Utils/DataSecurity/TextScanner.js +303 -0
  452. package/Utils/DataSecurity/TextScanner.mjs +8 -0
  453. package/Utils/DataSecurity/Validators.d.mts +16 -0
  454. package/Utils/DataSecurity/Validators.d.ts +16 -0
  455. package/Utils/DataSecurity/Validators.js +339 -0
  456. package/Utils/DataSecurity/Validators.mjs +17 -0
  457. package/Utils/Exceptions/ExceptionIssueState.d.mts +18 -0
  458. package/Utils/Exceptions/ExceptionIssueState.d.ts +18 -0
  459. package/Utils/Exceptions/ExceptionIssueState.js +131 -0
  460. package/Utils/Exceptions/ExceptionIssueState.mjs +8 -0
  461. package/Utils/HostCollector/HostCollectorDefaultConfig.d.mts +2 -0
  462. package/Utils/HostCollector/HostCollectorDefaultConfig.d.ts +2 -0
  463. package/Utils/HostCollector/HostCollectorDefaultConfig.js +39 -1
  464. package/Utils/HostCollector/HostCollectorDefaultConfig.mjs +2 -0
  465. package/Utils/LabelRuleImportExport.js +17 -3
  466. package/Utils/Monitor/PlatformResourceIdentity.js +7 -4
  467. package/Utils/SecurityAdvisoryMatcher.d.mts +33 -0
  468. package/Utils/SecurityAdvisoryMatcher.d.ts +33 -0
  469. package/Utils/SecurityAdvisoryMatcher.js +291 -0
  470. package/Utils/SecurityAdvisoryMatcher.mjs +2 -0
  471. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.mts +24 -0
  472. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.ts +24 -0
  473. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.js +380 -0
  474. package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.mjs +15 -0
  475. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.mts +29 -0
  476. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.ts +29 -0
  477. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.js +527 -0
  478. package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.mjs +13 -0
  479. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.mts +21 -0
  480. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.ts +21 -0
  481. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.js +365 -0
  482. package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.mjs +11 -0
  483. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.mts +17 -0
  484. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.ts +17 -0
  485. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.js +344 -0
  486. package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.mjs +12 -0
  487. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.mts +27 -0
  488. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.ts +27 -0
  489. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.js +326 -0
  490. package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.mjs +10 -0
  491. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.mts +38 -0
  492. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.ts +38 -0
  493. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.js +629 -0
  494. package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.mjs +13 -0
  495. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +9 -0
  496. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +9 -0
  497. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +63 -3
  498. package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +4 -0
  499. package/Utils/SecurityEvent/LogParsers/SecurityLogParser.js +54 -0
  500. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.mts +26 -0
  501. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.ts +26 -0
  502. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.js +1046 -0
  503. package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.mjs +11 -0
  504. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.mts +19 -0
  505. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.ts +19 -0
  506. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.js +724 -0
  507. package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.mjs +7 -0
  508. package/Utils/SecurityEvent/SecurityRecordReading.d.mts +32 -0
  509. package/Utils/SecurityEvent/SecurityRecordReading.d.ts +32 -0
  510. package/Utils/SecurityEvent/SecurityRecordReading.js +78 -0
  511. package/Utils/SecurityEvent/SecurityRecordReading.mjs +2 -0
  512. package/Utils/Sms/OnCallPageSms.d.mts +1 -0
  513. package/Utils/Sms/OnCallPageSms.d.ts +1 -0
  514. package/Utils/Sms/OnCallPageSms.js +16 -2
  515. package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.mts +44 -0
  516. package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.ts +44 -0
  517. package/Utils/Suggestions/InvestigationCodeFixSuggestion.js +223 -0
  518. package/Utils/Suggestions/InvestigationCodeFixSuggestion.mjs +8 -0
  519. package/Utils/Syslog/LeefParser.d.mts +28 -0
  520. package/Utils/Syslog/LeefParser.d.ts +28 -0
  521. package/Utils/Syslog/LeefParser.js +326 -0
  522. package/Utils/Syslog/LeefParser.mjs +10 -0
  523. package/Utils/VersionRange.d.mts +34 -0
  524. package/Utils/VersionRange.d.ts +34 -0
  525. package/Utils/VersionRange.js +422 -0
  526. package/Utils/VersionRange.mjs +5 -0
  527. package/package.json +1 -1
@@ -0,0 +1,1183 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DATA_SECURITY_CHECKS = exports.DataSecurityCheckStatus = exports.ALL_DATA_SECURITY_CHECK_GROUPS = exports.DataSecurityCheckGroup = void 0;
7
+ exports.getDataSecurityCheck = getDataSecurityCheck;
8
+ exports.checkAppliesToKind = checkAppliesToKind;
9
+ exports.getCheckRemediation = getCheckRemediation;
10
+ exports.fillRemediationText = fillRemediationText;
11
+ exports.evaluateDataStoreChecks = evaluateDataStoreChecks;
12
+ const SecuritySeverity_1 = __importDefault(require("../SecuritySeverity"));
13
+ const ComplianceFramework_1 = __importDefault(require("./ComplianceFramework"));
14
+ const DataSensitivity_1 = __importDefault(require("./DataSensitivity"));
15
+ const DataStoreKind_1 = require("./DataStoreKind");
16
+ const DataStorePosture_1 = require("./DataStorePosture");
17
+ const DataStoreEnvironment_1 = require("./DataStoreEnvironment");
18
+ /*
19
+ * EVERY CHECK DATA SECURITY RUNS ON A STORE, AND WHAT A FAILING ONE MEANS.
20
+ *
21
+ * A check reads the facts about one store - its configuration
22
+ * (DataStorePosture.ts), what was found in it, who can reach it, where it
23
+ * lives - and passes, fails, or cannot tell. A failing check opens one
24
+ * issue on that store. Each check says:
25
+ *
26
+ * - what it is, in the sentence an issue is titled with, and why it
27
+ * matters, in one more;
28
+ * - how bad a failure is for each level of sensitivity
29
+ * (`severityBySensitivity`): a public bucket of card numbers is
30
+ * Critical, a public bucket of website images is no issue at all (null);
31
+ * - the framework requirements it is evidence for, which is how
32
+ * Compliance scores frameworks;
33
+ * - how to fix it on each cloud: the console steps, the CLI command and
34
+ * the Terraform, with {placeholders} the issue page fills in.
35
+ *
36
+ * Kept free of anything server-only: the Dashboard lists, explains and
37
+ * renders these, so what a page says is what the check did. Ids are stored
38
+ * on issues and never renamed.
39
+ */
40
+ var DataSecurityCheckGroup;
41
+ (function (DataSecurityCheckGroup) {
42
+ DataSecurityCheckGroup["Exposure"] = "Exposure";
43
+ DataSecurityCheckGroup["Encryption"] = "Encryption";
44
+ DataSecurityCheckGroup["Recovery"] = "Recovery";
45
+ DataSecurityCheckGroup["Visibility"] = "Visibility";
46
+ DataSecurityCheckGroup["Access"] = "Access";
47
+ DataSecurityCheckGroup["Hygiene"] = "Data hygiene";
48
+ DataSecurityCheckGroup["Telemetry"] = "Telemetry";
49
+ DataSecurityCheckGroup["Residency"] = "Residency";
50
+ DataSecurityCheckGroup["AI"] = "AI";
51
+ })(DataSecurityCheckGroup || (exports.DataSecurityCheckGroup = DataSecurityCheckGroup = {}));
52
+ exports.ALL_DATA_SECURITY_CHECK_GROUPS = [
53
+ DataSecurityCheckGroup.Exposure,
54
+ DataSecurityCheckGroup.Encryption,
55
+ DataSecurityCheckGroup.Recovery,
56
+ DataSecurityCheckGroup.Visibility,
57
+ DataSecurityCheckGroup.Access,
58
+ DataSecurityCheckGroup.Hygiene,
59
+ DataSecurityCheckGroup.Telemetry,
60
+ DataSecurityCheckGroup.Residency,
61
+ DataSecurityCheckGroup.AI,
62
+ ];
63
+ var DataSecurityCheckStatus;
64
+ (function (DataSecurityCheckStatus) {
65
+ DataSecurityCheckStatus["Pass"] = "Pass";
66
+ DataSecurityCheckStatus["Fail"] = "Fail";
67
+ DataSecurityCheckStatus["Unknown"] = "Unknown";
68
+ DataSecurityCheckStatus["NotApplicable"] = "Not applicable";
69
+ })(DataSecurityCheckStatus || (exports.DataSecurityCheckStatus = DataSecurityCheckStatus = {}));
70
+ const S = SecuritySeverity_1.default;
71
+ function severities(restricted, confidential, internal, publicLevel) {
72
+ return {
73
+ [DataSensitivity_1.default.Restricted]: restricted,
74
+ [DataSensitivity_1.default.Confidential]: confidential,
75
+ [DataSensitivity_1.default.Internal]: internal,
76
+ [DataSensitivity_1.default.Public]: publicLevel,
77
+ };
78
+ }
79
+ const PASS = { status: DataSecurityCheckStatus.Pass };
80
+ const UNKNOWN = {
81
+ status: DataSecurityCheckStatus.Unknown,
82
+ };
83
+ const NOT_APPLICABLE = {
84
+ status: DataSecurityCheckStatus.NotApplicable,
85
+ };
86
+ function fail(evidence, severity) {
87
+ return { status: DataSecurityCheckStatus.Fail, evidence, severity };
88
+ }
89
+ /*
90
+ * A check of one fact: fails when the fact equals `failWhen`, cannot tell
91
+ * when the reader could not read it, and does not apply when the store's
92
+ * kind has no such fact.
93
+ */
94
+ function factIs(value, failWhen, evidence) {
95
+ if (value === undefined) {
96
+ return NOT_APPLICABLE;
97
+ }
98
+ if (value === null) {
99
+ return UNKNOWN;
100
+ }
101
+ return value === failWhen ? fail(evidence) : PASS;
102
+ }
103
+ function r(framework, requirement) {
104
+ return { framework, requirement };
105
+ }
106
+ const CF = ComplianceFramework_1.default;
107
+ const G = DataSecurityCheckGroup;
108
+ const FAM = DataStoreKind_1.DataStoreFamily;
109
+ const K = DataStoreKind_1.DataStoreKind;
110
+ const P = DataStoreKind_1.DataStoreProvider;
111
+ const STORING_FAMILIES = [
112
+ FAM.ObjectStorage,
113
+ FAM.Database,
114
+ FAM.Warehouse,
115
+ FAM.Search,
116
+ FAM.Cache,
117
+ FAM.FileSystem,
118
+ FAM.Snapshot,
119
+ ];
120
+ const DATABASE_FAMILIES = [
121
+ FAM.Database,
122
+ FAM.Warehouse,
123
+ FAM.Search,
124
+ FAM.Cache,
125
+ ];
126
+ // Access requirements every exposure check is evidence for.
127
+ const ACCESS_REQUIREMENTS = [
128
+ r(CF.GDPR, "Art. 32"),
129
+ r(CF.CCPA, "1798.150"),
130
+ r(CF.HIPAA, "164.312(a)(1)"),
131
+ r(CF.PCIDSS, "7.2"),
132
+ r(CF.SOC2, "CC6.1"),
133
+ r(CF.ISO27001, "A.5.15"),
134
+ r(CF.NISTCSF, "PR.AA-05"),
135
+ r(CF.LGPD, "Art. 46"),
136
+ r(CF.DPDP, "Sec. 8(5)"),
137
+ ];
138
+ const AT_REST_REQUIREMENTS = [
139
+ r(CF.GDPR, "Art. 32"),
140
+ r(CF.HIPAA, "164.312(a)(2)(iv)"),
141
+ r(CF.PCIDSS, "3.5.1"),
142
+ r(CF.SOC2, "CC6.1"),
143
+ r(CF.ISO27001, "A.8.24"),
144
+ r(CF.NISTCSF, "PR.DS-01"),
145
+ r(CF.LGPD, "Art. 46"),
146
+ r(CF.DPDP, "Sec. 8(5)"),
147
+ ];
148
+ const IN_TRANSIT_REQUIREMENTS = [
149
+ r(CF.GDPR, "Art. 32"),
150
+ r(CF.HIPAA, "164.312(e)(1)"),
151
+ r(CF.PCIDSS, "4.2.1"),
152
+ r(CF.SOC2, "CC6.7"),
153
+ r(CF.ISO27001, "A.8.24"),
154
+ r(CF.NISTCSF, "PR.DS-02"),
155
+ ];
156
+ const RECOVERY_REQUIREMENTS = [
157
+ r(CF.GDPR, "Art. 32"),
158
+ r(CF.HIPAA, "164.308(a)(7)"),
159
+ r(CF.SOC2, "A1.2"),
160
+ r(CF.ISO27001, "A.8.13"),
161
+ r(CF.NISTCSF, "PR.DS-11"),
162
+ ];
163
+ const LOGGING_REQUIREMENTS = [
164
+ r(CF.GDPR, "Art. 32"),
165
+ r(CF.HIPAA, "164.312(b)"),
166
+ r(CF.PCIDSS, "10.2"),
167
+ r(CF.SOC2, "CC7.2"),
168
+ r(CF.ISO27001, "A.8.15"),
169
+ r(CF.NISTCSF, "DE.CM-09"),
170
+ ];
171
+ const MINIMISATION_REQUIREMENTS = [
172
+ r(CF.GDPR, "Art. 5(1)(c)"),
173
+ r(CF.GDPR, "Art. 25"),
174
+ r(CF.CCPA, "1798.100(c)"),
175
+ r(CF.ISO27001, "A.5.34"),
176
+ r(CF.ISO27001, "A.8.11"),
177
+ r(CF.LGPD, "Art. 6"),
178
+ r(CF.DPDP, "Sec. 8(7)"),
179
+ ];
180
+ const LEAKAGE_REQUIREMENTS = [
181
+ r(CF.GDPR, "Art. 32"),
182
+ r(CF.ISO27001, "A.8.12"),
183
+ r(CF.SOC2, "CC6.1"),
184
+ r(CF.NISTCSF, "PR.DS-01"),
185
+ ];
186
+ function isSecretType(dataTypeId) {
187
+ return (dataTypeId.endsWith("-key") ||
188
+ dataTypeId.endsWith("-token") ||
189
+ dataTypeId.endsWith("-secret") ||
190
+ [
191
+ "private-key",
192
+ "password-in-url",
193
+ "connection-string-password",
194
+ "authorization-header",
195
+ "generic-secret",
196
+ "json-web-token",
197
+ "slack-webhook-url",
198
+ "aws-access-key-id",
199
+ ].includes(dataTypeId));
200
+ }
201
+ exports.DATA_SECURITY_CHECKS = [
202
+ // Exposure.
203
+ {
204
+ id: "public-read",
205
+ group: G.Exposure,
206
+ title: "Anyone on the internet can read it",
207
+ description: "The store's policy, ACL or IAM bindings let anyone read its data without signing in.",
208
+ whyItMatters: "Public stores are found by automated scanners within hours, and everything in them should be treated as already copied.",
209
+ severityBySensitivity: severities(S.Critical, S.Critical, S.High, S.Low),
210
+ families: [FAM.ObjectStorage, FAM.Warehouse, FAM.Search],
211
+ requirements: ACCESS_REQUIREMENTS,
212
+ remediation: {
213
+ [K.AwsS3Bucket]: {
214
+ steps: [
215
+ "Open the bucket in the S3 console and choose Permissions.",
216
+ "Under Block public access, choose Edit, turn on all four settings and save.",
217
+ 'Remove any bucket policy statement whose Principal is "*" without a restricting condition, and any ACL grant to Everyone or Authenticated users.',
218
+ ],
219
+ cli: "aws s3api put-public-access-block --bucket {name} --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true",
220
+ terraform: 'resource "aws_s3_bucket_public_access_block" "{name}" {\n bucket = "{name}"\n block_public_acls = true\n ignore_public_acls = true\n block_public_policy = true\n restrict_public_buckets = true\n}',
221
+ },
222
+ [K.AzureStorageAccount]: {
223
+ steps: [
224
+ "Open the storage account in the Azure portal and choose Configuration.",
225
+ "Set Allow Blob anonymous access to Disabled and save.",
226
+ "Set each container's access level to Private.",
227
+ ],
228
+ cli: "az storage account update --name {name} --allow-blob-public-access false",
229
+ terraform: 'resource "azurerm_storage_account" "{name}" {\n # ...\n allow_nested_items_to_be_public = false\n}',
230
+ },
231
+ [K.GcpStorageBucket]: {
232
+ steps: [
233
+ "Open the bucket in the Cloud console and choose Permissions.",
234
+ "Remove the allUsers and allAuthenticatedUsers principals.",
235
+ "Turn on Prevent public access.",
236
+ ],
237
+ cli: "gcloud storage buckets update gs://{name} --public-access-prevention",
238
+ terraform: 'resource "google_storage_bucket" "{name}" {\n # ...\n public_access_prevention = "enforced"\n}',
239
+ },
240
+ [K.GcpBigQueryDataset]: {
241
+ steps: [
242
+ "Open the dataset in BigQuery and choose Sharing, then Permissions.",
243
+ "Remove allUsers and allAuthenticatedUsers.",
244
+ ],
245
+ cli: "bq show --format=prettyjson {name} > dataset.json # remove the allUsers / allAuthenticatedUsers entries, then: bq update --source dataset.json {name}",
246
+ },
247
+ default: {
248
+ steps: [
249
+ "Remove every grant to anonymous or all-authenticated principals.",
250
+ "If the store must serve public files, move them to a store marked public by design that holds nothing else.",
251
+ ],
252
+ },
253
+ },
254
+ evaluate: (input) => {
255
+ if (input.isPublicByDesign) {
256
+ return PASS;
257
+ }
258
+ return factIs(input.posture.publicRead, true, input.posture.publicReason ||
259
+ "Its access settings let anyone read it without signing in.");
260
+ },
261
+ },
262
+ {
263
+ id: "public-write",
264
+ group: G.Exposure,
265
+ title: "Anyone on the internet can change it",
266
+ description: "The store's policy, ACL or IAM bindings let anyone write or delete its data.",
267
+ whyItMatters: "Anyone can plant malware, replace files your apps serve, or delete everything in it.",
268
+ severityBySensitivity: severities(S.Critical, S.Critical, S.Critical, S.High),
269
+ families: [FAM.ObjectStorage, FAM.Warehouse, FAM.Search],
270
+ requirements: ACCESS_REQUIREMENTS,
271
+ remediation: {
272
+ [K.AwsS3Bucket]: {
273
+ steps: [
274
+ "Remove bucket policy statements and ACL grants that give s3:PutObject, s3:DeleteObject or WRITE to everyone.",
275
+ "Turn on all four Block public access settings.",
276
+ ],
277
+ cli: "aws s3api put-public-access-block --bucket {name} --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true",
278
+ },
279
+ default: {
280
+ steps: [
281
+ "Remove every write or delete grant to anonymous or all-authenticated principals.",
282
+ ],
283
+ },
284
+ },
285
+ evaluate: (input) => {
286
+ return factIs(input.posture.publicWrite, true, "Its access settings let anyone write to it without signing in.");
287
+ },
288
+ },
289
+ {
290
+ id: "public-access-not-blocked",
291
+ group: G.Exposure,
292
+ title: "Public access is not blocked",
293
+ description: "S3 Block Public Access is not fully on for the bucket or its account, so one policy change can make it public.",
294
+ whyItMatters: "Most public-bucket breaches start as a single mistaken policy edit; the block stops that edit from taking effect.",
295
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
296
+ kinds: [K.AwsS3Bucket],
297
+ requirements: ACCESS_REQUIREMENTS,
298
+ remediation: {
299
+ [K.AwsS3Bucket]: {
300
+ steps: [
301
+ "Open the bucket in the S3 console and choose Permissions.",
302
+ "Under Block public access, choose Edit, turn on all four settings and save.",
303
+ ],
304
+ cli: "aws s3api put-public-access-block --bucket {name} --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true",
305
+ terraform: 'resource "aws_s3_bucket_public_access_block" "{name}" {\n bucket = "{name}"\n block_public_acls = true\n ignore_public_acls = true\n block_public_policy = true\n restrict_public_buckets = true\n}',
306
+ },
307
+ },
308
+ evaluate: (input) => {
309
+ if (input.isPublicByDesign) {
310
+ return PASS;
311
+ }
312
+ return factIs(input.posture.blockPublicAccess, false, "Block Public Access is off, or only partly on, for the bucket and its account.");
313
+ },
314
+ },
315
+ {
316
+ id: "internet-reachable",
317
+ group: G.Exposure,
318
+ title: "The database accepts connections from the internet",
319
+ description: "The database has a public endpoint or public network access turned on.",
320
+ whyItMatters: "A reachable database is one leaked or guessed password away from a breach, and is probed for weak credentials constantly.",
321
+ severityBySensitivity: severities(S.High, S.High, S.Medium, S.Low),
322
+ families: DATABASE_FAMILIES,
323
+ requirements: ACCESS_REQUIREMENTS,
324
+ remediation: {
325
+ [K.AwsRdsInstance]: {
326
+ steps: [
327
+ "Open the instance in the RDS console and choose Modify.",
328
+ "Under Connectivity, set Public access to Not publicly accessible.",
329
+ "Apply immediately or in the next maintenance window.",
330
+ ],
331
+ cli: "aws rds modify-db-instance --db-instance-identifier {name} --no-publicly-accessible --apply-immediately --region {region}",
332
+ terraform: 'resource "aws_db_instance" "{name}" {\n # ...\n publicly_accessible = false\n}',
333
+ },
334
+ [K.AwsRedshiftCluster]: {
335
+ steps: ["Modify the cluster and turn off Publicly accessible."],
336
+ cli: "aws redshift modify-cluster --cluster-identifier {name} --no-publicly-accessible --region {region}",
337
+ },
338
+ [K.AzureSqlDatabase]: {
339
+ steps: [
340
+ "Open the SQL server in the Azure portal and choose Networking.",
341
+ "Set Public network access to Disable and use a private endpoint.",
342
+ ],
343
+ cli: "az sql server update --name {name} --resource-group <group> --enable-public-network false",
344
+ },
345
+ [K.GcpCloudSqlInstance]: {
346
+ steps: [
347
+ "Open the instance in the Cloud console and choose Connections.",
348
+ "Turn off Public IP, and turn on Private IP.",
349
+ ],
350
+ cli: "gcloud sql instances patch {name} --no-assign-ip",
351
+ },
352
+ default: {
353
+ steps: [
354
+ "Turn off the public endpoint, and reach the database through a private network or a bastion.",
355
+ ],
356
+ },
357
+ },
358
+ evaluate: (input) => {
359
+ return factIs(input.posture.publicNetworkAccess, true, "Its network settings accept connections from the internet.");
360
+ },
361
+ },
362
+ {
363
+ id: "open-to-all-addresses",
364
+ group: G.Exposure,
365
+ title: "Its firewall lets in every address",
366
+ description: "A firewall rule or authorized network allows 0.0.0.0/0 or the whole address range.",
367
+ whyItMatters: "An allow-everything rule removes the network as a layer of defence; only the password stands between the internet and the data.",
368
+ severityBySensitivity: severities(S.Critical, S.Critical, S.High, S.Medium),
369
+ families: DATABASE_FAMILIES,
370
+ requirements: ACCESS_REQUIREMENTS,
371
+ remediation: {
372
+ [K.AzureSqlDatabase]: {
373
+ steps: [
374
+ "Open the SQL server's Networking page and delete the rule that allows 0.0.0.0 to 255.255.255.255.",
375
+ "Add rules only for the addresses that need access, or use a private endpoint.",
376
+ ],
377
+ cli: "az sql server firewall-rule delete --server {name} --resource-group <group> --name <rule>",
378
+ },
379
+ [K.GcpCloudSqlInstance]: {
380
+ steps: [
381
+ "Open the instance's Connections page and remove the 0.0.0.0/0 authorized network.",
382
+ ],
383
+ cli: "gcloud sql instances patch {name} --authorized-networks=<your-cidr>",
384
+ },
385
+ default: {
386
+ steps: [
387
+ "Replace the allow-everything rule with the specific addresses or networks that need access.",
388
+ ],
389
+ },
390
+ },
391
+ evaluate: (input) => {
392
+ return factIs(input.posture.openToAllAddresses, true, "A firewall rule allows connections from every address.");
393
+ },
394
+ },
395
+ {
396
+ id: "snapshot-public",
397
+ group: G.Exposure,
398
+ title: "A snapshot of it can be restored by anyone",
399
+ description: "A database snapshot is shared publicly, so any cloud account can restore a full copy.",
400
+ whyItMatters: "A public snapshot is a complete copy of the database, handed to anyone who looks.",
401
+ severityBySensitivity: severities(S.Critical, S.Critical, S.Critical, S.High),
402
+ families: [FAM.Database, FAM.Snapshot],
403
+ requirements: ACCESS_REQUIREMENTS,
404
+ remediation: {
405
+ [P.Aws]: {
406
+ steps: [
407
+ "Open the snapshot in the RDS console, choose Actions, then Share snapshot.",
408
+ "Set DB snapshot visibility to Private and save.",
409
+ ],
410
+ cli: "aws rds modify-db-snapshot-attribute --db-snapshot-identifier <snapshot> --attribute-name restore --values-to-remove all --region {region}",
411
+ },
412
+ default: {
413
+ steps: ["Make the snapshot private."],
414
+ },
415
+ },
416
+ evaluate: (input) => {
417
+ return factIs(input.posture.snapshotPublic, true, "At least one snapshot is shared with all accounts.");
418
+ },
419
+ },
420
+ {
421
+ id: "snapshot-shared-externally",
422
+ group: G.Exposure,
423
+ title: "A snapshot of it is shared with other accounts",
424
+ description: "A database snapshot is shared with accounts outside your connected ones.",
425
+ whyItMatters: "Whoever controls that account can restore a full copy of the data, outside every control you have.",
426
+ severityBySensitivity: severities(S.High, S.High, S.Medium, S.Low),
427
+ families: [FAM.Database, FAM.Snapshot],
428
+ requirements: ACCESS_REQUIREMENTS,
429
+ remediation: {
430
+ [P.Aws]: {
431
+ steps: [
432
+ "Open the snapshot in the RDS console, choose Actions, then Share snapshot, and remove the accounts that should not have it.",
433
+ ],
434
+ cli: "aws rds modify-db-snapshot-attribute --db-snapshot-identifier <snapshot> --attribute-name restore --values-to-remove <account-id> --region {region}",
435
+ },
436
+ default: { steps: ["Stop sharing the snapshot with outside accounts."] },
437
+ },
438
+ evaluate: (input) => {
439
+ const shared = input.posture.snapshotSharedWith || [];
440
+ if (input.posture.snapshotSharedWith === undefined) {
441
+ return NOT_APPLICABLE;
442
+ }
443
+ return shared.length > 0
444
+ ? fail(`Shared with ${shared.slice(0, 5).join(", ")}.`)
445
+ : PASS;
446
+ },
447
+ },
448
+ {
449
+ id: "shared-with-external-accounts",
450
+ group: G.Exposure,
451
+ title: "Accounts outside your organization can reach it",
452
+ description: "The store's policy grants access to accounts, tenants or projects that are not connected to OneUptime.",
453
+ whyItMatters: "Access you cannot see the other side of: a vendor's compromised account becomes your breach.",
454
+ severityBySensitivity: severities(S.High, S.High, S.Medium, S.Low),
455
+ families: STORING_FAMILIES,
456
+ requirements: ACCESS_REQUIREMENTS,
457
+ remediation: {
458
+ [K.AwsS3Bucket]: {
459
+ steps: [
460
+ "Open the bucket policy and remove, or narrow with conditions, every statement whose Principal is another account.",
461
+ ],
462
+ },
463
+ default: {
464
+ steps: [
465
+ "Review each outside principal, and remove the ones that do not need access.",
466
+ ],
467
+ },
468
+ },
469
+ evaluate: (input) => {
470
+ if (input.posture.sharedWithExternal === undefined) {
471
+ return NOT_APPLICABLE;
472
+ }
473
+ const shared = input.posture.sharedWithExternal;
474
+ return shared.length > 0
475
+ ? fail(`Shared with ${shared.slice(0, 5).join(", ")}.`)
476
+ : PASS;
477
+ },
478
+ },
479
+ // Encryption.
480
+ {
481
+ id: "not-encrypted-at-rest",
482
+ group: G.Encryption,
483
+ title: "Its data is not encrypted at rest",
484
+ description: "Storage encryption is turned off.",
485
+ whyItMatters: "Disks, backups and snapshots of an unencrypted store can be read by anyone who gets hold of them.",
486
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
487
+ families: STORING_FAMILIES,
488
+ requirements: AT_REST_REQUIREMENTS,
489
+ remediation: {
490
+ [K.AwsRdsInstance]: {
491
+ steps: [
492
+ "RDS cannot encrypt an existing instance in place: take a snapshot, copy it with encryption on, and restore the copy.",
493
+ "Point applications at the restored instance, then delete the old one.",
494
+ ],
495
+ cli: "aws rds copy-db-snapshot --source-db-snapshot-identifier <snapshot> --target-db-snapshot-identifier <snapshot>-encrypted --kms-key-id alias/aws/rds --region {region}",
496
+ },
497
+ [K.AwsRedshiftCluster]: {
498
+ steps: ["Modify the cluster and turn on database encryption."],
499
+ cli: "aws redshift modify-cluster --cluster-identifier {name} --encrypted --region {region}",
500
+ },
501
+ default: { steps: ["Turn on encryption at rest for the store."] },
502
+ },
503
+ evaluate: (input) => {
504
+ return factIs(input.posture.encryptedAtRest, false, "Encryption at rest is off.");
505
+ },
506
+ },
507
+ {
508
+ id: "no-customer-managed-key",
509
+ group: G.Encryption,
510
+ title: "Restricted data is not under your own key",
511
+ description: "The store holds Restricted data but is encrypted with the provider's default key, not a customer-managed one.",
512
+ whyItMatters: "With your own key you can revoke access to every copy at once and see each use of it in your audit log.",
513
+ severityBySensitivity: severities(S.Medium, null, null, null),
514
+ families: STORING_FAMILIES,
515
+ requirements: AT_REST_REQUIREMENTS,
516
+ remediation: {
517
+ [K.AwsS3Bucket]: {
518
+ steps: [
519
+ "Create a KMS key, then set the bucket's default encryption to SSE-KMS with that key.",
520
+ ],
521
+ cli: 'aws s3api put-bucket-encryption --bucket {name} --server-side-encryption-configuration \'{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"aws:kms","KMSMasterKeyID":"<key-arn>"},"BucketKeyEnabled":true}]}\'',
522
+ },
523
+ default: {
524
+ steps: ["Encrypt the store with a key you manage in your key service."],
525
+ },
526
+ },
527
+ evaluate: (input) => {
528
+ return factIs(input.posture.customerManagedKey, false, "It is encrypted with the provider's default key.");
529
+ },
530
+ },
531
+ {
532
+ id: "encryption-in-transit-not-enforced",
533
+ group: G.Encryption,
534
+ title: "Unencrypted connections are allowed",
535
+ description: "The store accepts connections that do not use TLS.",
536
+ whyItMatters: "Data sent without TLS can be read and changed by anyone on the network path.",
537
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
538
+ families: STORING_FAMILIES,
539
+ requirements: IN_TRANSIT_REQUIREMENTS,
540
+ remediation: {
541
+ [K.AwsS3Bucket]: {
542
+ steps: [
543
+ "Add a bucket policy statement that denies every request where aws:SecureTransport is false.",
544
+ ],
545
+ terraform: 'data "aws_iam_policy_document" "{name}_tls" {\n statement {\n effect = "Deny"\n actions = ["s3:*"]\n resources = ["arn:aws:s3:::{name}", "arn:aws:s3:::{name}/*"]\n principals {\n type = "*"\n identifiers = ["*"]\n }\n condition {\n test = "Bool"\n variable = "aws:SecureTransport"\n values = ["false"]\n }\n }\n}',
546
+ },
547
+ [K.AzureStorageAccount]: {
548
+ steps: ["Turn on Secure transfer required for the storage account."],
549
+ cli: "az storage account update --name {name} --https-only true",
550
+ },
551
+ [K.GcpCloudSqlInstance]: {
552
+ steps: ["Require SSL connections on the instance."],
553
+ cli: "gcloud sql instances patch {name} --ssl-mode=ENCRYPTED_ONLY",
554
+ },
555
+ default: { steps: ["Require TLS for every connection to the store."] },
556
+ },
557
+ evaluate: (input) => {
558
+ return factIs(input.posture.encryptionInTransitEnforced, false, "It accepts connections without TLS.");
559
+ },
560
+ },
561
+ {
562
+ id: "weak-tls",
563
+ group: G.Encryption,
564
+ title: "It accepts TLS older than 1.2",
565
+ description: "The minimum TLS version is 1.0 or 1.1.",
566
+ whyItMatters: "TLS 1.0 and 1.1 have known weaknesses, and PCI DSS has not allowed them since 2018.",
567
+ severityBySensitivity: severities(S.Medium, S.Medium, S.Low, null),
568
+ families: STORING_FAMILIES,
569
+ requirements: IN_TRANSIT_REQUIREMENTS,
570
+ remediation: {
571
+ [K.AzureStorageAccount]: {
572
+ steps: ["Set the storage account's Minimum TLS version to 1.2."],
573
+ cli: "az storage account update --name {name} --min-tls-version TLS1_2",
574
+ },
575
+ default: { steps: ["Set the minimum TLS version to 1.2 or later."] },
576
+ },
577
+ evaluate: (input) => {
578
+ if (input.posture.minimumTlsVersion === undefined) {
579
+ return NOT_APPLICABLE;
580
+ }
581
+ if (input.posture.minimumTlsVersion === null) {
582
+ return UNKNOWN;
583
+ }
584
+ return (0, DataStorePosture_1.tlsVersionNumber)(input.posture.minimumTlsVersion) < 1.2
585
+ ? fail(`The minimum TLS version is ${input.posture.minimumTlsVersion}.`)
586
+ : PASS;
587
+ },
588
+ },
589
+ // Recovery.
590
+ {
591
+ id: "no-backups",
592
+ group: G.Recovery,
593
+ title: "It has no backups, or keeps them under 7 days",
594
+ description: "Automated backups are off, or kept for fewer than 7 days.",
595
+ whyItMatters: "Ransomware, a bad migration or a deleted table is permanent without a backup to restore.",
596
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
597
+ families: [FAM.Database, FAM.Warehouse],
598
+ requirements: RECOVERY_REQUIREMENTS,
599
+ remediation: {
600
+ [K.AwsRdsInstance]: {
601
+ steps: [
602
+ "Modify the instance and set the backup retention period to at least 7 days.",
603
+ ],
604
+ cli: "aws rds modify-db-instance --db-instance-identifier {name} --backup-retention-period 7 --apply-immediately --region {region}",
605
+ terraform: 'resource "aws_db_instance" "{name}" {\n # ...\n backup_retention_period = 7\n}',
606
+ },
607
+ default: {
608
+ steps: ["Turn on automated backups and keep them for at least 7 days."],
609
+ },
610
+ },
611
+ evaluate: (input) => {
612
+ if (input.posture.backupsEnabled === false) {
613
+ return fail("Automated backups are off.");
614
+ }
615
+ if (typeof input.posture.backupRetentionDays === "number" &&
616
+ input.posture.backupRetentionDays < 7) {
617
+ return fail(`Backups are kept for ${input.posture.backupRetentionDays} day(s).`);
618
+ }
619
+ if (input.posture.backupsEnabled === undefined &&
620
+ input.posture.backupRetentionDays === undefined) {
621
+ return NOT_APPLICABLE;
622
+ }
623
+ if (input.posture.backupsEnabled === null &&
624
+ input.posture.backupRetentionDays === null) {
625
+ return UNKNOWN;
626
+ }
627
+ return PASS;
628
+ },
629
+ },
630
+ {
631
+ id: "no-point-in-time-recovery",
632
+ group: G.Recovery,
633
+ title: "Point-in-time recovery is off",
634
+ description: "The table or database cannot be restored to a moment before a mistake.",
635
+ whyItMatters: "Daily backups lose a day of data; point-in-time recovery restores to the second before the damage.",
636
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
637
+ kinds: [K.AwsDynamoDbTable, K.AzureCosmosDbAccount],
638
+ requirements: RECOVERY_REQUIREMENTS,
639
+ remediation: {
640
+ [K.AwsDynamoDbTable]: {
641
+ steps: [
642
+ "Open the table's Backups tab and turn on point-in-time recovery.",
643
+ ],
644
+ cli: "aws dynamodb update-continuous-backups --table-name {name} --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true --region {region}",
645
+ terraform: 'resource "aws_dynamodb_table" "{name}" {\n # ...\n point_in_time_recovery {\n enabled = true\n }\n}',
646
+ },
647
+ default: { steps: ["Turn on point-in-time recovery."] },
648
+ },
649
+ evaluate: (input) => {
650
+ return factIs(input.posture.pointInTimeRecovery, false, "Point-in-time recovery is off.");
651
+ },
652
+ },
653
+ {
654
+ id: "deletion-protection-off",
655
+ group: G.Recovery,
656
+ title: "It can be deleted in one step",
657
+ description: "Deletion protection is off.",
658
+ whyItMatters: "One wrong command or compromised credential deletes the whole database.",
659
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
660
+ families: [FAM.Database, FAM.Warehouse],
661
+ requirements: RECOVERY_REQUIREMENTS,
662
+ remediation: {
663
+ [K.AwsRdsInstance]: {
664
+ steps: ["Modify the instance and turn on Deletion protection."],
665
+ cli: "aws rds modify-db-instance --db-instance-identifier {name} --deletion-protection --region {region}",
666
+ },
667
+ [K.AwsDynamoDbTable]: {
668
+ steps: ["Turn on deletion protection for the table."],
669
+ cli: "aws dynamodb update-table --table-name {name} --deletion-protection-enabled --region {region}",
670
+ },
671
+ default: { steps: ["Turn on deletion protection."] },
672
+ },
673
+ evaluate: (input) => {
674
+ return factIs(input.posture.deletionProtection, false, "Deletion protection is off.");
675
+ },
676
+ },
677
+ {
678
+ id: "deleted-data-not-recoverable",
679
+ group: G.Recovery,
680
+ title: "Deleted or overwritten files cannot be recovered",
681
+ description: "Versioning and soft delete are both off.",
682
+ whyItMatters: "Ransomware that overwrites objects, or a script that deletes them, leaves nothing to restore.",
683
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
684
+ families: [FAM.ObjectStorage],
685
+ requirements: RECOVERY_REQUIREMENTS,
686
+ remediation: {
687
+ [K.AwsS3Bucket]: {
688
+ steps: ["Turn on Bucket Versioning in the bucket's Properties."],
689
+ cli: "aws s3api put-bucket-versioning --bucket {name} --versioning-configuration Status=Enabled",
690
+ },
691
+ [K.AzureStorageAccount]: {
692
+ steps: ["Turn on soft delete for blobs and containers."],
693
+ cli: "az storage account blob-service-properties update --account-name {name} --enable-delete-retention true --delete-retention-days 14",
694
+ },
695
+ [K.GcpStorageBucket]: {
696
+ steps: ["Turn on Object Versioning or a soft delete policy."],
697
+ cli: "gcloud storage buckets update gs://{name} --versioning",
698
+ },
699
+ default: { steps: ["Turn on versioning or soft delete."] },
700
+ },
701
+ evaluate: (input) => {
702
+ const { versioning, softDelete } = input.posture;
703
+ if (versioning === undefined && softDelete === undefined) {
704
+ return NOT_APPLICABLE;
705
+ }
706
+ if (versioning === true || softDelete === true) {
707
+ return PASS;
708
+ }
709
+ if (versioning === null || softDelete === null) {
710
+ return UNKNOWN;
711
+ }
712
+ return fail("Versioning and soft delete are off.");
713
+ },
714
+ },
715
+ // Visibility.
716
+ {
717
+ id: "access-not-logged",
718
+ group: G.Visibility,
719
+ title: "Nobody would know who read it",
720
+ description: "Reads of the store are not logged: no access logs, no data-access audit logs.",
721
+ whyItMatters: "After a breach you cannot say what was taken or whose data it was, which most breach laws require you to tell.",
722
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
723
+ families: STORING_FAMILIES,
724
+ requirements: LOGGING_REQUIREMENTS,
725
+ remediation: {
726
+ [K.AwsS3Bucket]: {
727
+ steps: [
728
+ "Turn on server access logging in the bucket's Properties, or CloudTrail data events for the bucket.",
729
+ ],
730
+ cli: 'aws s3api put-bucket-logging --bucket {name} --bucket-logging-status \'{"LoggingEnabled":{"TargetBucket":"<log-bucket>","TargetPrefix":"{name}/"}}\'',
731
+ },
732
+ [K.AzureStorageAccount]: {
733
+ steps: [
734
+ "Add a diagnostic setting for the blob service that sends StorageRead logs to a Log Analytics workspace.",
735
+ ],
736
+ },
737
+ [K.GcpStorageBucket]: {
738
+ steps: ["Turn on Data Access audit logs for Cloud Storage."],
739
+ },
740
+ default: { steps: ["Turn on access or audit logging for reads."] },
741
+ },
742
+ evaluate: (input) => {
743
+ return factIs(input.posture.accessLogging, false, "Reads of the store are not logged.");
744
+ },
745
+ },
746
+ // Access.
747
+ {
748
+ id: "shared-key-access",
749
+ group: G.Access,
750
+ title: "Anyone with the account key can read everything",
751
+ description: "The storage account allows shared key access, which bypasses Microsoft Entra ID and leaves no per-person audit trail.",
752
+ whyItMatters: "An account key is a password to every container, and leaks with every copied connection string.",
753
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
754
+ kinds: [K.AzureStorageAccount],
755
+ requirements: ACCESS_REQUIREMENTS,
756
+ remediation: {
757
+ [K.AzureStorageAccount]: {
758
+ steps: [
759
+ "Move applications to Microsoft Entra ID, then set Allow storage account key access to Disabled.",
760
+ ],
761
+ cli: "az storage account update --name {name} --allow-shared-key-access false",
762
+ },
763
+ },
764
+ evaluate: (input) => {
765
+ return factIs(input.posture.sharedKeyAccess, true, "Shared key access is allowed.");
766
+ },
767
+ },
768
+ {
769
+ id: "object-acls-enabled",
770
+ group: G.Access,
771
+ title: "Objects can carry their own access rules",
772
+ description: "Object ACLs are on, so one object can be made public while the bucket looks private.",
773
+ whyItMatters: "Per-object rules are invisible in the bucket's policy, and are how single files end up public.",
774
+ severityBySensitivity: severities(S.Low, S.Low, null, null),
775
+ kinds: [K.AwsS3Bucket, K.GcpStorageBucket],
776
+ requirements: ACCESS_REQUIREMENTS,
777
+ remediation: {
778
+ [K.AwsS3Bucket]: {
779
+ steps: ["Set Object Ownership to Bucket owner enforced."],
780
+ cli: "aws s3api put-bucket-ownership-controls --bucket {name} --ownership-controls 'Rules=[{ObjectOwnership=BucketOwnerEnforced}]'",
781
+ },
782
+ [K.GcpStorageBucket]: {
783
+ steps: ["Turn on uniform bucket-level access."],
784
+ cli: "gcloud storage buckets update gs://{name} --uniform-bucket-level-access",
785
+ },
786
+ },
787
+ evaluate: (input) => {
788
+ return factIs(input.posture.uniformAccess, false, "Object-level access rules are allowed.");
789
+ },
790
+ },
791
+ {
792
+ id: "many-readers",
793
+ group: G.Access,
794
+ title: "More than 25 identities can read Restricted data",
795
+ description: "More identities than most teams can review hold read access to the store.",
796
+ whyItMatters: "Every reader is a credential that can leak; least privilege is how a single leak stays small.",
797
+ severityBySensitivity: severities(S.Medium, null, null, null),
798
+ families: STORING_FAMILIES,
799
+ requirements: ACCESS_REQUIREMENTS,
800
+ remediation: {
801
+ default: {
802
+ steps: [
803
+ "Open the store's Who can reach it tab, and remove access that is unused or broader than needed.",
804
+ ],
805
+ },
806
+ },
807
+ evaluate: (input) => {
808
+ if (input.readerCount === undefined || input.readerCount === null) {
809
+ return UNKNOWN;
810
+ }
811
+ return input.readerCount > 25
812
+ ? fail(`${input.readerCount} identities can read it.`)
813
+ : PASS;
814
+ },
815
+ },
816
+ // Data hygiene.
817
+ {
818
+ id: "secrets-stored",
819
+ group: G.Hygiene,
820
+ title: "Secrets are stored in it",
821
+ description: "Passwords, API keys, tokens or private keys were found in the store's data.",
822
+ whyItMatters: "A secret in a data store is readable by everyone who can read the store, and is copied into every backup and export.",
823
+ severityBySensitivity: severities(S.High, S.High, S.High, S.High),
824
+ families: STORING_FAMILIES,
825
+ requirements: LEAKAGE_REQUIREMENTS,
826
+ remediation: {
827
+ default: {
828
+ steps: [
829
+ "Rotate every secret found: treat it as leaked.",
830
+ "Move secrets to a secret manager (AWS Secrets Manager, Azure Key Vault, Google Secret Manager) and delete them from the store.",
831
+ ],
832
+ },
833
+ },
834
+ evaluate: (input) => {
835
+ const secrets = input.dataTypeIds.filter(isSecretType);
836
+ if (secrets.length === 0) {
837
+ return PASS;
838
+ }
839
+ const exposure = (0, DataStorePosture_1.getDataStoreExposure)(input.posture);
840
+ const exposed = exposure === DataStorePosture_1.DataStoreExposure.Public ||
841
+ exposure === DataStorePosture_1.DataStoreExposure.OtherAccounts;
842
+ return fail(`Found ${secrets.length} kind(s) of secret.`, exposed ? S.Critical : undefined);
843
+ },
844
+ },
845
+ {
846
+ id: "card-security-codes-stored",
847
+ group: G.Hygiene,
848
+ title: "Card security codes are stored",
849
+ description: "CVV or CVC codes were found. PCI DSS forbids keeping them after a payment is authorised, encrypted or not.",
850
+ whyItMatters: "A card number with its security code is everything a fraudster needs, and keeping codes breaks PCI DSS outright.",
851
+ severityBySensitivity: severities(S.Critical, S.Critical, S.Critical, S.Critical),
852
+ families: STORING_FAMILIES,
853
+ requirements: [r(CF.PCIDSS, "3.3.1")],
854
+ remediation: {
855
+ default: {
856
+ steps: [
857
+ "Stop the code that writes security codes, delete the stored codes, and confirm none remain in backups.",
858
+ ],
859
+ },
860
+ },
861
+ evaluate: (input) => {
862
+ return input.dataTypeIds.includes("card-verification-code")
863
+ ? fail("Card security codes were found.")
864
+ : PASS;
865
+ },
866
+ },
867
+ {
868
+ id: "card-numbers-readable",
869
+ group: G.Hygiene,
870
+ title: "Card numbers are stored readable",
871
+ description: "Full card numbers were found in readable form. PCI DSS requires them to be unreadable wherever they are stored.",
872
+ whyItMatters: "Readable card numbers put the store, and everything that can reach it, in PCI DSS scope.",
873
+ severityBySensitivity: severities(S.High, S.High, S.High, S.High),
874
+ families: STORING_FAMILIES,
875
+ requirements: [r(CF.PCIDSS, "3.5.1"), r(CF.PCIDSS, "3.4.1")],
876
+ remediation: {
877
+ default: {
878
+ steps: [
879
+ "Tokenize card numbers with your payment provider, or store them encrypted at the field level, and delete the readable copies.",
880
+ ],
881
+ },
882
+ },
883
+ evaluate: (input) => {
884
+ return input.dataTypeIds.includes("credit-card-number")
885
+ ? fail("Readable card numbers were found.")
886
+ : PASS;
887
+ },
888
+ },
889
+ {
890
+ id: "plaintext-passwords",
891
+ group: G.Hygiene,
892
+ title: "Passwords are stored in plain text",
893
+ description: "A password field holds values that are not password hashes (bcrypt, argon2, scrypt or PBKDF2).",
894
+ whyItMatters: "One read of this store hands over every user's password, and with password reuse, their other accounts.",
895
+ severityBySensitivity: severities(S.Critical, S.Critical, S.Critical, S.Critical),
896
+ families: STORING_FAMILIES,
897
+ requirements: [
898
+ r(CF.GDPR, "Art. 32"),
899
+ r(CF.PCIDSS, "8.3.2"),
900
+ r(CF.ISO27001, "A.8.24"),
901
+ r(CF.SOC2, "CC6.1"),
902
+ ],
903
+ remediation: {
904
+ default: {
905
+ steps: [
906
+ "Hash passwords with bcrypt, scrypt or argon2 at sign-up and sign-in, migrate the stored ones, and force a reset for every account.",
907
+ ],
908
+ },
909
+ },
910
+ evaluate: (input) => {
911
+ const fields = input.plaintextPasswordFields || [];
912
+ return fields.length > 0
913
+ ? fail(`Plain-text passwords in ${fields.slice(0, 3).join(", ")}.`)
914
+ : PASS;
915
+ },
916
+ },
917
+ {
918
+ id: "production-data-in-non-production",
919
+ group: G.Hygiene,
920
+ title: "Production data was copied into a non-production store",
921
+ description: "Values found in a production store were also found here, in a development, test or staging store.",
922
+ whyItMatters: "Non-production stores are rarely guarded like production ones, so copies of real customer data leak from them most.",
923
+ severityBySensitivity: severities(S.High, S.Medium, null, null),
924
+ families: STORING_FAMILIES,
925
+ requirements: MINIMISATION_REQUIREMENTS,
926
+ remediation: {
927
+ default: {
928
+ steps: [
929
+ "Replace the copy with masked or synthetic data, and delete the real data from the non-production store.",
930
+ ],
931
+ },
932
+ },
933
+ evaluate: (input) => {
934
+ if (!(0, DataStoreEnvironment_1.isNonProduction)(input.environment)) {
935
+ return NOT_APPLICABLE;
936
+ }
937
+ return input.copiedFromProductionStoreName
938
+ ? fail(`It holds copies of data from ${input.copiedFromProductionStoreName}.`)
939
+ : PASS;
940
+ },
941
+ },
942
+ {
943
+ id: "stale-sensitive-data",
944
+ group: G.Hygiene,
945
+ title: "Sensitive data nobody has used in 90 days",
946
+ description: "The store holds sensitive data and has had no reads or writes for 90 days.",
947
+ whyItMatters: "Data you no longer use is pure risk; GDPR's storage limitation principle says to delete it.",
948
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
949
+ families: STORING_FAMILIES,
950
+ requirements: [r(CF.GDPR, "Art. 5(1)(e)"), ...MINIMISATION_REQUIREMENTS],
951
+ remediation: {
952
+ default: {
953
+ steps: [
954
+ "Confirm the data is no longer needed, then archive it with a retention date, or delete it.",
955
+ ],
956
+ },
957
+ },
958
+ evaluate: (input) => {
959
+ if (!input.lastActivityAt) {
960
+ return UNKNOWN;
961
+ }
962
+ const now = input.now || new Date();
963
+ const idleDays = Math.floor((now.getTime() - input.lastActivityAt.getTime()) / 86400000);
964
+ return idleDays >= 90 ? fail(`No activity for ${idleDays} days.`) : PASS;
965
+ },
966
+ },
967
+ {
968
+ id: "no-owner",
969
+ group: G.Hygiene,
970
+ title: "Nobody owns this sensitive store",
971
+ description: "The store holds sensitive data and has no owner.",
972
+ whyItMatters: "An issue on a store nobody owns is an issue nobody fixes. Owner rules assign owners from tags.",
973
+ severityBySensitivity: severities(S.Medium, S.Low, null, null),
974
+ requirements: [r(CF.ISO27001, "A.5.9"), r(CF.NISTCSF, "ID.AM-07")],
975
+ remediation: {
976
+ default: {
977
+ steps: [
978
+ "Add an owner on the store's Owners tab, or an owner rule under Data Security > Settings that matches its tags.",
979
+ ],
980
+ },
981
+ },
982
+ evaluate: (input) => {
983
+ return input.hasOwner ? PASS : fail("It has no owner.");
984
+ },
985
+ },
986
+ // Telemetry.
987
+ {
988
+ id: "sensitive-data-in-telemetry",
989
+ group: G.Telemetry,
990
+ title: "Sensitive data is reaching your telemetry",
991
+ description: "Logs, traces, exceptions, replays or AI conversations carry sensitive data that no scrub rule masks.",
992
+ whyItMatters: "Telemetry is copied to many places and read by many people; personal data in it widens every privacy obligation.",
993
+ severityBySensitivity: severities(S.High, S.Medium, S.Low, null),
994
+ families: [FAM.Telemetry],
995
+ requirements: [...MINIMISATION_REQUIREMENTS, r(CF.PCIDSS, "3.4.1")],
996
+ remediation: {
997
+ default: {
998
+ steps: [
999
+ "Press Scrub It on each finding to mask that data at ingest from now on.",
1000
+ "Fix the code that writes it: the finding names the service and the attribute.",
1001
+ ],
1002
+ },
1003
+ },
1004
+ evaluate: (input) => {
1005
+ const unscrubbed = (input.unscrubbedDataTypeIds || []).filter((dataTypeId) => {
1006
+ return !isSecretType(dataTypeId);
1007
+ });
1008
+ return unscrubbed.length > 0
1009
+ ? fail(`${unscrubbed.length} kind(s) of sensitive data are not scrubbed.`)
1010
+ : PASS;
1011
+ },
1012
+ },
1013
+ {
1014
+ id: "secrets-in-telemetry",
1015
+ group: G.Telemetry,
1016
+ title: "Secrets are reaching your telemetry",
1017
+ description: "Passwords, API keys or tokens appear in logs, traces, exceptions or AI conversations.",
1018
+ whyItMatters: "Anyone who can read the telemetry can use the secret; rotate it and stop the code that logs it.",
1019
+ severityBySensitivity: severities(S.Critical, S.Critical, S.Critical, S.Critical),
1020
+ families: [FAM.Telemetry],
1021
+ requirements: LEAKAGE_REQUIREMENTS,
1022
+ remediation: {
1023
+ default: {
1024
+ steps: [
1025
+ "Rotate the secret first: it has been seen by everyone who can read this telemetry.",
1026
+ "Press Scrub It to mask it at ingest, then fix the code that writes it.",
1027
+ ],
1028
+ },
1029
+ },
1030
+ evaluate: (input) => {
1031
+ const secrets = (input.unscrubbedDataTypeIds || []).filter(isSecretType);
1032
+ return secrets.length > 0
1033
+ ? fail(`${secrets.length} kind(s) of secret are not scrubbed.`)
1034
+ : PASS;
1035
+ },
1036
+ },
1037
+ // Residency.
1038
+ {
1039
+ id: "residency-violation",
1040
+ group: G.Residency,
1041
+ title: "Data is stored outside the regions it may live in",
1042
+ description: "The store's region, or a region its data is replicated to, breaks a residency rule.",
1043
+ whyItMatters: "Personal data moved outside its allowed regions can be an unlawful transfer under GDPR and similar laws.",
1044
+ severityBySensitivity: severities(S.High, S.High, S.Medium, null),
1045
+ families: STORING_FAMILIES,
1046
+ requirements: [
1047
+ r(CF.GDPR, "Arts. 44-49"),
1048
+ r(CF.LGPD, "Art. 33"),
1049
+ r(CF.DPDP, "Sec. 16"),
1050
+ ],
1051
+ remediation: {
1052
+ default: {
1053
+ steps: [
1054
+ "Move the data to an allowed region, or stop replicating it to the disallowed one.",
1055
+ "If the transfer is lawful (for example under standard contractual clauses), accept the issue and record the basis.",
1056
+ ],
1057
+ },
1058
+ },
1059
+ evaluate: (input) => {
1060
+ const violations = input.residencyViolations || [];
1061
+ if (violations.length === 0) {
1062
+ return PASS;
1063
+ }
1064
+ const first = violations[0];
1065
+ return fail(`${first.region} is outside what "${first.ruleName}" allows.`);
1066
+ },
1067
+ },
1068
+ // AI.
1069
+ {
1070
+ id: "sensitive-data-to-ai",
1071
+ group: G.AI,
1072
+ title: "Sensitive data is being sent to an AI provider",
1073
+ description: "AI conversations recorded in OneUptime carry sensitive data to a model provider.",
1074
+ whyItMatters: "Data sent to a model provider leaves your control, may be retained, and is a transfer to a processor.",
1075
+ severityBySensitivity: severities(S.Critical, S.High, S.Low, null),
1076
+ kinds: [K.TelemetryAiConversations],
1077
+ requirements: [...MINIMISATION_REQUIREMENTS, r(CF.GDPR, "Art. 28")],
1078
+ remediation: {
1079
+ default: {
1080
+ steps: [
1081
+ "Redact sensitive values before prompts are sent, or route these calls to a model you host.",
1082
+ "Press Scrub It to stop storing the values in OneUptime's copy of the conversation.",
1083
+ ],
1084
+ },
1085
+ },
1086
+ evaluate: (input) => {
1087
+ const providers = input.aiProvidersReached || [];
1088
+ if (input.dataTypeIds.length === 0) {
1089
+ return PASS;
1090
+ }
1091
+ return fail(providers.length > 0
1092
+ ? `Sent to ${providers.slice(0, 3).join(", ")}.`
1093
+ : "Found in prompts or responses.");
1094
+ },
1095
+ },
1096
+ {
1097
+ id: "sensitive-data-in-ai-store",
1098
+ group: G.AI,
1099
+ title: "Restricted data is in a store used for AI",
1100
+ description: "A store tagged as AI training or retrieval data holds Restricted data.",
1101
+ whyItMatters: "Models and retrieval indexes can repeat what they were given to anyone who asks the right question.",
1102
+ severityBySensitivity: severities(S.High, S.Medium, null, null),
1103
+ families: STORING_FAMILIES,
1104
+ requirements: MINIMISATION_REQUIREMENTS,
1105
+ remediation: {
1106
+ default: {
1107
+ steps: [
1108
+ "Remove or mask the Restricted data before it is used to train or ground a model.",
1109
+ ],
1110
+ },
1111
+ },
1112
+ evaluate: (input) => {
1113
+ return input.isAiData ? fail("It is tagged for AI use.") : NOT_APPLICABLE;
1114
+ },
1115
+ },
1116
+ ];
1117
+ const CHECKS_BY_ID = new Map(exports.DATA_SECURITY_CHECKS.map((check) => {
1118
+ return [check.id, check];
1119
+ }));
1120
+ function getDataSecurityCheck(id) {
1121
+ return CHECKS_BY_ID.get(id);
1122
+ }
1123
+ // Whether a check applies to a store of this kind at all.
1124
+ function checkAppliesToKind(check, kind) {
1125
+ const info = (0, DataStoreKind_1.getDataStoreKindInfo)(kind);
1126
+ if (check.kinds && !check.kinds.includes(kind)) {
1127
+ return false;
1128
+ }
1129
+ if (check.families && (!info || !check.families.includes(info.family))) {
1130
+ return false;
1131
+ }
1132
+ return true;
1133
+ }
1134
+ // How to fix a check's failure on a store of this kind.
1135
+ function getCheckRemediation(check, kind) {
1136
+ const info = (0, DataStoreKind_1.getDataStoreKindInfo)(kind);
1137
+ return (check.remediation[kind] ||
1138
+ (info ? check.remediation[info.provider] : undefined) ||
1139
+ check.remediation.default);
1140
+ }
1141
+ /*
1142
+ * Fills a remediation's {placeholders} with the store's values. Values are
1143
+ * inserted as they are; the page shows the result as code, never as markup.
1144
+ */
1145
+ function fillRemediationText(text, values) {
1146
+ return text
1147
+ .split("{name}")
1148
+ .join(values.name)
1149
+ .split("{region}")
1150
+ .join(values.region || "<region>");
1151
+ }
1152
+ /*
1153
+ * Runs every applicable check on a store. A failing check whose severity
1154
+ * for the store's sensitivity is null - a public bucket holding nothing
1155
+ * sensitive is only Low, a missing backup of public data is nothing - is
1156
+ * reported with a null severity and opens no issue.
1157
+ */
1158
+ function evaluateDataStoreChecks(input, options = {}) {
1159
+ var _a, _b;
1160
+ const results = [];
1161
+ for (const check of exports.DATA_SECURITY_CHECKS) {
1162
+ if (((_a = options.disabledCheckIds) === null || _a === void 0 ? void 0 : _a.has(check.id)) ||
1163
+ !checkAppliesToKind(check, input.kind)) {
1164
+ continue;
1165
+ }
1166
+ let result;
1167
+ try {
1168
+ result = check.evaluate(input);
1169
+ }
1170
+ catch (_c) {
1171
+ result = UNKNOWN;
1172
+ }
1173
+ let severity = null;
1174
+ if (result.status === DataSecurityCheckStatus.Fail) {
1175
+ severity =
1176
+ ((_b = options.severityOverrides) === null || _b === void 0 ? void 0 : _b.get(check.id)) ||
1177
+ result.severity ||
1178
+ check.severityBySensitivity[input.sensitivity];
1179
+ }
1180
+ results.push({ check, result, severity });
1181
+ }
1182
+ return results;
1183
+ }