s1-shift-left-cli 0.4.0__py3-none-any.whl

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 (2207) hide show
  1. s1_cns_cli/__init__.py +0 -0
  2. s1_cns_cli/cli/__init__.py +0 -0
  3. s1_cns_cli/cli/command_line_arguments.py +683 -0
  4. s1_cns_cli/cli/config/__init__.py +1 -0
  5. s1_cns_cli/cli/config/config.py +64 -0
  6. s1_cns_cli/cli/config/config_manager.py +30 -0
  7. s1_cns_cli/cli/main.py +167 -0
  8. s1_cns_cli/cli/registry.py +361 -0
  9. s1_cns_cli/cli/scan/__init__.py +0 -0
  10. s1_cns_cli/cli/scan/code_scanner.py +62 -0
  11. s1_cns_cli/cli/scan/iac.py +798 -0
  12. s1_cns_cli/cli/scan/secret.py +423 -0
  13. s1_cns_cli/cli/scan/vulnerability.py +396 -0
  14. s1_cns_cli/cli/utils.py +545 -0
  15. s1_cns_cli/s1graph/__init__.py +0 -0
  16. s1_cns_cli/s1graph/ansible/__init__.py +1 -0
  17. s1_cns_cli/s1graph/ansible/checks/__init__.py +1 -0
  18. s1_cns_cli/s1graph/ansible/checks/base_ansible_task_check.py +76 -0
  19. s1_cns_cli/s1graph/ansible/checks/base_ansible_task_value_check.py +79 -0
  20. s1_cns_cli/s1graph/ansible/checks/graph_checks/BlockErrorHandling.yaml +10 -0
  21. s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfDisableGpgCheck.yaml +12 -0
  22. s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfSslVerify.yaml +12 -0
  23. s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfValidateCerts.yaml +12 -0
  24. s1_cns_cli/s1graph/ansible/checks/graph_checks/GetUrlHttpsOnly.yaml +12 -0
  25. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosInterfaceMgmtProfileNoHTTP.yaml +17 -0
  26. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosInterfaceMgmtProfileNoTelnet.yaml +17 -0
  27. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyDescription.yaml +16 -0
  28. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyLogForwarding.yaml +16 -0
  29. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyLoggingEnabled.yaml +12 -0
  30. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoApplicationAny.yaml +22 -0
  31. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoDSRI.yaml +17 -0
  32. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoServiceAny.yaml +22 -0
  33. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoSrcAnyDstAny.yaml +40 -0
  34. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosZoneProtectionProfile.yaml +16 -0
  35. s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosZoneUserIDIncludeACL.yaml +31 -0
  36. s1_cns_cli/s1graph/ansible/checks/graph_checks/UriHttpsOnly.yaml +12 -0
  37. s1_cns_cli/s1graph/ansible/checks/graph_checks/__init__.py +0 -0
  38. s1_cns_cli/s1graph/ansible/checks/registry.py +4 -0
  39. s1_cns_cli/s1graph/ansible/checks/task/__init__.py +2 -0
  40. s1_cns_cli/s1graph/ansible/checks/task/aws/EC2EBSOptimized.py +31 -0
  41. s1_cns_cli/s1graph/ansible/checks/task/aws/EC2PublicIP.py +34 -0
  42. s1_cns_cli/s1graph/ansible/checks/task/aws/__init__.py +4 -0
  43. s1_cns_cli/s1graph/ansible/checks/task/builtin/AptAllowUnauthenticated.py +28 -0
  44. s1_cns_cli/s1graph/ansible/checks/task/builtin/AptForce.py +28 -0
  45. s1_cns_cli/s1graph/ansible/checks/task/builtin/GetUrlValidateCerts.py +23 -0
  46. s1_cns_cli/s1graph/ansible/checks/task/builtin/UriValidateCerts.py +23 -0
  47. s1_cns_cli/s1graph/ansible/checks/task/builtin/YumSslVerify.py +23 -0
  48. s1_cns_cli/s1graph/ansible/checks/task/builtin/YumValidateCerts.py +23 -0
  49. s1_cns_cli/s1graph/ansible/checks/task/builtin/__init__.py +4 -0
  50. s1_cns_cli/s1graph/ansible/graph_builder/__init__.py +0 -0
  51. s1_cns_cli/s1graph/ansible/graph_builder/graph_components/__init__.py +0 -0
  52. s1_cns_cli/s1graph/ansible/graph_builder/graph_components/resource_types.py +10 -0
  53. s1_cns_cli/s1graph/ansible/graph_builder/local_graph.py +145 -0
  54. s1_cns_cli/s1graph/ansible/runner.py +132 -0
  55. s1_cns_cli/s1graph/ansible/utils.py +91 -0
  56. s1_cns_cli/s1graph/argo_workflows/__init__.py +1 -0
  57. s1_cns_cli/s1graph/argo_workflows/checks/__init__.py +1 -0
  58. s1_cns_cli/s1graph/argo_workflows/checks/base_argo_workflows_check.py +41 -0
  59. s1_cns_cli/s1graph/argo_workflows/checks/registry.py +4 -0
  60. s1_cns_cli/s1graph/argo_workflows/checks/template/DefaultServiceAccount.py +29 -0
  61. s1_cns_cli/s1graph/argo_workflows/checks/template/RunAsNonRoot.py +31 -0
  62. s1_cns_cli/s1graph/argo_workflows/checks/template/__init__.py +4 -0
  63. s1_cns_cli/s1graph/argo_workflows/common/__init__.py +0 -0
  64. s1_cns_cli/s1graph/argo_workflows/runner.py +142 -0
  65. s1_cns_cli/s1graph/arm/__init__.py +1 -0
  66. s1_cns_cli/s1graph/arm/base_parameter_check.py +44 -0
  67. s1_cns_cli/s1graph/arm/base_registry.py +16 -0
  68. s1_cns_cli/s1graph/arm/base_resource_check.py +66 -0
  69. s1_cns_cli/s1graph/arm/base_resource_negative_value_check.py +70 -0
  70. s1_cns_cli/s1graph/arm/base_resource_value_check.py +72 -0
  71. s1_cns_cli/s1graph/arm/checks/__init__.py +2 -0
  72. s1_cns_cli/s1graph/arm/checks/graph_checks/AzureSpringCloudConfigWithVnet.yaml +15 -0
  73. s1_cns_cli/s1graph/arm/checks/graph_checks/__init__.py +0 -0
  74. s1_cns_cli/s1graph/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py +23 -0
  75. s1_cns_cli/s1graph/arm/checks/parameter/__init__.py +5 -0
  76. s1_cns_cli/s1graph/arm/checks/resource/AKSApiServerAuthorizedIpRanges.py +45 -0
  77. s1_cns_cli/s1graph/arm/checks/resource/AKSDashboardDisabled.py +39 -0
  78. s1_cns_cli/s1graph/arm/checks/resource/AKSLoggingEnabled.py +39 -0
  79. s1_cns_cli/s1graph/arm/checks/resource/AKSNetworkPolicy.py +36 -0
  80. s1_cns_cli/s1graph/arm/checks/resource/AKSRbacEnabled.py +33 -0
  81. s1_cns_cli/s1graph/arm/checks/resource/AppServiceAuthentication.py +39 -0
  82. s1_cns_cli/s1graph/arm/checks/resource/AppServiceClientCertificate.py +27 -0
  83. s1_cns_cli/s1graph/arm/checks/resource/AppServiceHTTPSOnly.py +26 -0
  84. s1_cns_cli/s1graph/arm/checks/resource/AppServiceHttps20Enabled.py +24 -0
  85. s1_cns_cli/s1graph/arm/checks/resource/AppServiceIdentity.py +32 -0
  86. s1_cns_cli/s1graph/arm/checks/resource/AppServiceMinTLSVersion.py +24 -0
  87. s1_cns_cli/s1graph/arm/checks/resource/AzureInstancePassword.py +37 -0
  88. s1_cns_cli/s1graph/arm/checks/resource/AzureManagedDiscEncryption.py +30 -0
  89. s1_cns_cli/s1graph/arm/checks/resource/AzureScaleSetPassword.py +38 -0
  90. s1_cns_cli/s1graph/arm/checks/resource/CosmosDBDisableAccessKeyWrite.py +24 -0
  91. s1_cns_cli/s1graph/arm/checks/resource/CustomRoleDefinitionSubscriptionOwner.py +39 -0
  92. s1_cns_cli/s1graph/arm/checks/resource/KeyvaultRecoveryEnabled.py +28 -0
  93. s1_cns_cli/s1graph/arm/checks/resource/MariaDBSSLEnforcementEnabled.py +22 -0
  94. s1_cns_cli/s1graph/arm/checks/resource/MonitorLogProfileCategories.py +27 -0
  95. s1_cns_cli/s1graph/arm/checks/resource/MonitorLogProfileRetentionDays.py +31 -0
  96. s1_cns_cli/s1graph/arm/checks/resource/MySQLServerSSLEnforcementEnabled.py +22 -0
  97. s1_cns_cli/s1graph/arm/checks/resource/NSGRulePortAccessRestricted.py +65 -0
  98. s1_cns_cli/s1graph/arm/checks/resource/NSGRuleRDPAccessRestricted.py +11 -0
  99. s1_cns_cli/s1graph/arm/checks/resource/NSGRuleSSHAccessRestricted.py +9 -0
  100. s1_cns_cli/s1graph/arm/checks/resource/NetworkWatcherFlowLogPeriod.py +38 -0
  101. s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py +43 -0
  102. s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py +44 -0
  103. s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py +44 -0
  104. s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerSSLEnforcementEnabled.py +22 -0
  105. s1_cns_cli/s1graph/arm/checks/resource/SQLServerAuditingEnabled.py +42 -0
  106. s1_cns_cli/s1graph/arm/checks/resource/SQLServerAuditingRetention90Days.py +43 -0
  107. s1_cns_cli/s1graph/arm/checks/resource/SQLServerEmailAlertsEnabled.py +42 -0
  108. s1_cns_cli/s1graph/arm/checks/resource/SQLServerEmailAlertsToAdminsEnabled.py +43 -0
  109. s1_cns_cli/s1graph/arm/checks/resource/SQLServerNoPublicAccess.py +38 -0
  110. s1_cns_cli/s1graph/arm/checks/resource/SQLServerThreatDetectionTypes.py +37 -0
  111. s1_cns_cli/s1graph/arm/checks/resource/SecretExpirationDate.py +27 -0
  112. s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactEmailAlert.py +26 -0
  113. s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactEmailAlertAdmins.py +26 -0
  114. s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactPhone.py +26 -0
  115. s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterStandardPricing.py +26 -0
  116. s1_cns_cli/s1graph/arm/checks/resource/StorageAccountAzureServicesAccessEnabled.py +40 -0
  117. s1_cns_cli/s1graph/arm/checks/resource/StorageAccountDefaultNetworkAccessDeny.py +38 -0
  118. s1_cns_cli/s1graph/arm/checks/resource/StorageAccountDisablePublicAccess.py +24 -0
  119. s1_cns_cli/s1graph/arm/checks/resource/StorageAccountLoggingQueueServiceEnabled.py +41 -0
  120. s1_cns_cli/s1graph/arm/checks/resource/StorageAccountsTransportEncryption.py +40 -0
  121. s1_cns_cli/s1graph/arm/checks/resource/StorageBlobServiceContainerPrivateAccess.py +32 -0
  122. s1_cns_cli/s1graph/arm/checks/resource/__init__.py +5 -0
  123. s1_cns_cli/s1graph/arm/context_parser.py +229 -0
  124. s1_cns_cli/s1graph/arm/graph_builder/__init__.py +0 -0
  125. s1_cns_cli/s1graph/arm/graph_builder/graph_components/__init__.py +0 -0
  126. s1_cns_cli/s1graph/arm/graph_builder/graph_components/block_types.py +12 -0
  127. s1_cns_cli/s1graph/arm/graph_builder/graph_components/blocks.py +19 -0
  128. s1_cns_cli/s1graph/arm/graph_builder/local_graph.py +109 -0
  129. s1_cns_cli/s1graph/arm/graph_manager.py +42 -0
  130. s1_cns_cli/s1graph/arm/parser/__init__.py +0 -0
  131. s1_cns_cli/s1graph/arm/parser/parser.py +79 -0
  132. s1_cns_cli/s1graph/arm/registry.py +4 -0
  133. s1_cns_cli/s1graph/arm/runner.py +291 -0
  134. s1_cns_cli/s1graph/arm/utils.py +59 -0
  135. s1_cns_cli/s1graph/azure_pipelines/__init__.py +1 -0
  136. s1_cns_cli/s1graph/azure_pipelines/checks/__init__.py +1 -0
  137. s1_cns_cli/s1graph/azure_pipelines/checks/base_azure_pipelines_check.py +41 -0
  138. s1_cns_cli/s1graph/azure_pipelines/checks/job/ContainerDigest.py +33 -0
  139. s1_cns_cli/s1graph/azure_pipelines/checks/job/ContainerLatestTag.py +42 -0
  140. s1_cns_cli/s1graph/azure_pipelines/checks/job/DetectImagesUsage.py +26 -0
  141. s1_cns_cli/s1graph/azure_pipelines/checks/job/SetSecretVariable.py +41 -0
  142. s1_cns_cli/s1graph/azure_pipelines/checks/job/__init__.py +4 -0
  143. s1_cns_cli/s1graph/azure_pipelines/checks/registry.py +4 -0
  144. s1_cns_cli/s1graph/azure_pipelines/common/__init__.py +0 -0
  145. s1_cns_cli/s1graph/azure_pipelines/common/resource_id_utils.py +41 -0
  146. s1_cns_cli/s1graph/azure_pipelines/image_referencer/__init__.py +0 -0
  147. s1_cns_cli/s1graph/azure_pipelines/image_referencer/manager.py +13 -0
  148. s1_cns_cli/s1graph/azure_pipelines/image_referencer/provider.py +71 -0
  149. s1_cns_cli/s1graph/azure_pipelines/runner.py +97 -0
  150. s1_cns_cli/s1graph/bicep/__init__.py +1 -0
  151. s1_cns_cli/s1graph/bicep/checks/__init__.py +0 -0
  152. s1_cns_cli/s1graph/bicep/checks/graph_checks/SQLServerAuditingEnabled.yaml +39 -0
  153. s1_cns_cli/s1graph/bicep/checks/graph_checks/__init__.py +0 -0
  154. s1_cns_cli/s1graph/bicep/checks/param/__init__.py +1 -0
  155. s1_cns_cli/s1graph/bicep/checks/param/azure/SecureStringParameterNoHardcodedValue.py +27 -0
  156. s1_cns_cli/s1graph/bicep/checks/param/azure/__init__.py +4 -0
  157. s1_cns_cli/s1graph/bicep/checks/param/base_param_check.py +48 -0
  158. s1_cns_cli/s1graph/bicep/checks/param/base_registry.py +36 -0
  159. s1_cns_cli/s1graph/bicep/checks/param/registry.py +3 -0
  160. s1_cns_cli/s1graph/bicep/checks/resource/__init__.py +1 -0
  161. s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountAzureServicesAccessEnabled.py +36 -0
  162. s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountDefaultNetworkAccessDeny.py +24 -0
  163. s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountsTransportEncryption.py +40 -0
  164. s1_cns_cli/s1graph/bicep/checks/resource/azure/__init__.py +4 -0
  165. s1_cns_cli/s1graph/bicep/checks/resource/base_registry.py +58 -0
  166. s1_cns_cli/s1graph/bicep/checks/resource/base_resource_check.py +47 -0
  167. s1_cns_cli/s1graph/bicep/checks/resource/base_resource_value_check.py +68 -0
  168. s1_cns_cli/s1graph/bicep/checks/resource/registry.py +3 -0
  169. s1_cns_cli/s1graph/bicep/graph_builder/__init__.py +0 -0
  170. s1_cns_cli/s1graph/bicep/graph_builder/context_definitions.py +57 -0
  171. s1_cns_cli/s1graph/bicep/graph_builder/graph_components/__init__.py +0 -0
  172. s1_cns_cli/s1graph/bicep/graph_builder/graph_components/block_types.py +16 -0
  173. s1_cns_cli/s1graph/bicep/graph_builder/graph_components/blocks.py +19 -0
  174. s1_cns_cli/s1graph/bicep/graph_builder/graph_to_tf_definitions.py +48 -0
  175. s1_cns_cli/s1graph/bicep/graph_builder/local_graph.py +337 -0
  176. s1_cns_cli/s1graph/bicep/graph_builder/variable_rendering/__init__.py +0 -0
  177. s1_cns_cli/s1graph/bicep/graph_builder/variable_rendering/renderer.py +57 -0
  178. s1_cns_cli/s1graph/bicep/graph_manager.py +41 -0
  179. s1_cns_cli/s1graph/bicep/image_referencer/__init__.py +0 -0
  180. s1_cns_cli/s1graph/bicep/image_referencer/base_provider.py +38 -0
  181. s1_cns_cli/s1graph/bicep/image_referencer/manager.py +19 -0
  182. s1_cns_cli/s1graph/bicep/image_referencer/provider/__init__.py +0 -0
  183. s1_cns_cli/s1graph/bicep/image_referencer/provider/azure.py +74 -0
  184. s1_cns_cli/s1graph/bicep/parser.py +50 -0
  185. s1_cns_cli/s1graph/bicep/runner.py +281 -0
  186. s1_cns_cli/s1graph/bicep/utils.py +113 -0
  187. s1_cns_cli/s1graph/bitbucket/__init__.py +1 -0
  188. s1_cns_cli/s1graph/bitbucket/base_bitbucket_configuration_check.py +43 -0
  189. s1_cns_cli/s1graph/bitbucket/checks/__init__.py +4 -0
  190. s1_cns_cli/s1graph/bitbucket/checks/merge_requests_approvals.py +35 -0
  191. s1_cns_cli/s1graph/bitbucket/dal.py +78 -0
  192. s1_cns_cli/s1graph/bitbucket/registry.py +4 -0
  193. s1_cns_cli/s1graph/bitbucket/runner.py +55 -0
  194. s1_cns_cli/s1graph/bitbucket/schemas/__init__.py +0 -0
  195. s1_cns_cli/s1graph/bitbucket/schemas/branch_restrictions.py +210 -0
  196. s1_cns_cli/s1graph/bitbucket_pipelines/__init__.py +1 -0
  197. s1_cns_cli/s1graph/bitbucket_pipelines/base_bitbucket_pipelines_check.py +39 -0
  198. s1_cns_cli/s1graph/bitbucket_pipelines/checks/__init__.py +4 -0
  199. s1_cns_cli/s1graph/bitbucket_pipelines/checks/latest_image.py +38 -0
  200. s1_cns_cli/s1graph/bitbucket_pipelines/registry.py +4 -0
  201. s1_cns_cli/s1graph/bitbucket_pipelines/runner.py +141 -0
  202. s1_cns_cli/s1graph/circleci_pipelines/__init__.py +1 -0
  203. s1_cns_cli/s1graph/circleci_pipelines/base_circleci_pipelines_check.py +42 -0
  204. s1_cns_cli/s1graph/circleci_pipelines/checks/DetectImagesUsage.py +27 -0
  205. s1_cns_cli/s1graph/circleci_pipelines/checks/ReverseShellNetcat.py +38 -0
  206. s1_cns_cli/s1graph/circleci_pipelines/checks/ShellInjection.py +42 -0
  207. s1_cns_cli/s1graph/circleci_pipelines/checks/SuspectCurlInScript.py +37 -0
  208. s1_cns_cli/s1graph/circleci_pipelines/checks/__init__.py +4 -0
  209. s1_cns_cli/s1graph/circleci_pipelines/checks/image_version_not_hash.py +37 -0
  210. s1_cns_cli/s1graph/circleci_pipelines/checks/latest_image.py +33 -0
  211. s1_cns_cli/s1graph/circleci_pipelines/checks/prevent_development_orbs.py +32 -0
  212. s1_cns_cli/s1graph/circleci_pipelines/checks/prevent_volatile_orbs.py +32 -0
  213. s1_cns_cli/s1graph/circleci_pipelines/common/__init__.py +0 -0
  214. s1_cns_cli/s1graph/circleci_pipelines/common/shell_injection_list.py +8 -0
  215. s1_cns_cli/s1graph/circleci_pipelines/image_referencer/__init__.py +0 -0
  216. s1_cns_cli/s1graph/circleci_pipelines/image_referencer/manager.py +12 -0
  217. s1_cns_cli/s1graph/circleci_pipelines/image_referencer/provider.py +50 -0
  218. s1_cns_cli/s1graph/circleci_pipelines/registry.py +4 -0
  219. s1_cns_cli/s1graph/circleci_pipelines/runner.py +123 -0
  220. s1_cns_cli/s1graph/cloudformation/__init__.py +1 -0
  221. s1_cns_cli/s1graph/cloudformation/cfn_utils.py +238 -0
  222. s1_cns_cli/s1graph/cloudformation/checks/__init__.py +0 -0
  223. s1_cns_cli/s1graph/cloudformation/checks/graph_checks/AppSyncProtectedByWAF.yaml +17 -0
  224. s1_cns_cli/s1graph/cloudformation/checks/graph_checks/__init__.py +0 -0
  225. s1_cns_cli/s1graph/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py +82 -0
  226. s1_cns_cli/s1graph/cloudformation/checks/resource/__init__.py +0 -0
  227. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBDropHttpHeaders.py +41 -0
  228. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBListenerHTTPS.py +49 -0
  229. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBListenerTLS12.py +57 -0
  230. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayAccessLogging.py +21 -0
  231. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayAuthorization.py +26 -0
  232. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayCacheEnable.py +17 -0
  233. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayV2AccessLogging.py +21 -0
  234. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayXray.py +20 -0
  235. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py +50 -0
  236. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AmazonMQBrokerPublicAccess.py +33 -0
  237. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py +22 -0
  238. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AppSyncLogging.py +23 -0
  239. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AthenaWorkgroupConfiguration.py +17 -0
  240. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AuroraEncryption.py +33 -0
  241. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/BackupVaultEncrypted.py +21 -0
  242. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudFrontTLS12.py +25 -0
  243. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudWatchLogGroupKMSKey.py +21 -0
  244. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py +21 -0
  245. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudfrontDistributionEncryption.py +38 -0
  246. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudfrontDistributionLogging.py +21 -0
  247. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailEncryption.py +23 -0
  248. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailLogValidation.py +17 -0
  249. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailMultiRegion.py +17 -0
  250. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CodeBuildProjectEncryption.py +34 -0
  251. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DAXEncryption.py +20 -0
  252. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py +22 -0
  253. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBAuditLogs.py +22 -0
  254. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBEncryption.py +17 -0
  255. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBLogging.py +27 -0
  256. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBTLS.py +22 -0
  257. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamoDBTablesEncrypted.py +30 -0
  258. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamodbGlobalTableRecovery.py +17 -0
  259. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamodbRecovery.py +17 -0
  260. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EBSDefaultEncryption.py +8 -0
  261. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EBSEncryption.py +17 -0
  262. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EC2Credentials.py +42 -0
  263. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EC2PublicIP.py +47 -0
  264. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRImageScanning.py +17 -0
  265. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRImmutableTags.py +22 -0
  266. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRPolicy.py +81 -0
  267. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRRepositoryEncrypted.py +22 -0
  268. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECSClusterContainerInsights.py +34 -0
  269. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py +33 -0
  270. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EFSEncryptionEnabled.py +17 -0
  271. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSControlPlaneLogging.py +7 -0
  272. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSNodeGroupRemoteAccess.py +31 -0
  273. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSPublicAccess.py +6 -0
  274. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSPublicAccessCIDR.py +6 -0
  275. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSSecretsEncryption.py +32 -0
  276. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ELBAccessLogs.py +17 -0
  277. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ELBv2AccessLogs.py +28 -0
  278. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py +17 -0
  279. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py +17 -0
  280. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransitAuthToken.py +32 -0
  281. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainAuditLogging.py +17 -0
  282. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainEnforceHTTPS.py +17 -0
  283. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py +28 -0
  284. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchEncryption.py +17 -0
  285. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py +17 -0
  286. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlobalAcceleratorAcceleratorFlowLogs.py +6 -0
  287. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueDataCatalogEncryption.py +37 -0
  288. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueSecurityConfiguration.py +49 -0
  289. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueSecurityConfigurationEnabled.py +28 -0
  290. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py +53 -0
  291. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMCredentialsExposure.py +29 -0
  292. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMDataExfiltration.py +15 -0
  293. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPermissionsManagement.py +15 -0
  294. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPolicyAttachedToGroupOrRoles.py +28 -0
  295. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPrivilegeEscalation.py +16 -0
  296. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py +53 -0
  297. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMRoleAllowsPublicAssume.py +52 -0
  298. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py +56 -0
  299. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMWriteAccess.py +15 -0
  300. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IMDSv1Disabled.py +30 -0
  301. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KMSKeyWildCardPrincipal.py +61 -0
  302. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KMSRotation.py +27 -0
  303. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KinesisStreamEncryptionType.py +20 -0
  304. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaDLQConfigured.py +28 -0
  305. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaEnvironmentCredentials.py +37 -0
  306. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaEnvironmentEncryptionSettings.py +30 -0
  307. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py +23 -0
  308. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaFunctionURLAuth.py +21 -0
  309. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaInVPC.py +23 -0
  310. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LaunchConfigurationEBSEncryption.py +38 -0
  311. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/MQBrokerAuditLogging.py +29 -0
  312. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterInstancePublic.py +6 -0
  313. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterLogging.py +28 -0
  314. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterStorageEncrypted.py +17 -0
  315. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyExpiration.py +6 -0
  316. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyLength.py +6 -0
  317. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyLowercaseLetter.py +6 -0
  318. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyNumber.py +6 -0
  319. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyReuse.py +6 -0
  320. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicySymbol.py +6 -0
  321. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyUppercaseLetter.py +6 -0
  322. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/QLDBLedgerDeletionProtection.py +26 -0
  323. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/QLDBLedgerPermissionsMode.py +20 -0
  324. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSClusterIAMAuthentication.py +17 -0
  325. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSEncryption.py +27 -0
  326. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSEnhancedMonitorEnabled.py +25 -0
  327. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSIAMAuthentication.py +26 -0
  328. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSMultiAZEnabled.py +27 -0
  329. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSPubliclyAccessible.py +22 -0
  330. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedShiftSSL.py +28 -0
  331. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterEncryption.py +17 -0
  332. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterLogging.py +21 -0
  333. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterPubliclyAccessible.py +20 -0
  334. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftInEc2ClassicMode.py +21 -0
  335. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3AccessLogs.py +23 -0
  336. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3BlockPublicACLs.py +18 -0
  337. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3BlockPublicPolicy.py +18 -0
  338. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3Encryption.py +25 -0
  339. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3IgnorePublicACLs.py +17 -0
  340. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3PublicACLRead.py +21 -0
  341. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3PublicACLWrite.py +22 -0
  342. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3RestrictPublicBuckets.py +18 -0
  343. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3Versioning.py +25 -0
  344. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SNSTopicEncryption.py +21 -0
  345. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SQSQueueEncryption.py +23 -0
  346. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecretManagerSecretEncrypted.py +29 -0
  347. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py +46 -0
  348. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress22.py +10 -0
  349. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress3389.py +9 -0
  350. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress80.py +10 -0
  351. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/TimestreamDatabaseKMSKey.py +23 -0
  352. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/TransferServerIsPublic.py +20 -0
  353. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/VPCEndpointAcceptanceConfigured.py +17 -0
  354. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WAFACLCVE202144228.py +55 -0
  355. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WAFEnabled.py +21 -0
  356. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WorkspaceRootVolumeEncrypted.py +17 -0
  357. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WorkspaceUserVolumeEncrypted.py +17 -0
  358. s1_cns_cli/s1graph/cloudformation/checks/resource/aws/__init__.py +5 -0
  359. s1_cns_cli/s1graph/cloudformation/checks/resource/base_registry.py +16 -0
  360. s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_check.py +48 -0
  361. s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_negative_value_check.py +76 -0
  362. s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_value_check.py +113 -0
  363. s1_cns_cli/s1graph/cloudformation/checks/resource/registry.py +3 -0
  364. s1_cns_cli/s1graph/cloudformation/checks/utils/__init__.py +0 -0
  365. s1_cns_cli/s1graph/cloudformation/checks/utils/iam_cloudformation_document_to_policy_converter.py +35 -0
  366. s1_cns_cli/s1graph/cloudformation/context_parser.py +193 -0
  367. s1_cns_cli/s1graph/cloudformation/graph_builder/__init__.py +0 -0
  368. s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/__init__.py +0 -0
  369. s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/block_types.py +15 -0
  370. s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/blocks.py +94 -0
  371. s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/generic_resource_encryption.py +100 -0
  372. s1_cns_cli/s1graph/cloudformation/graph_builder/graph_to_definitions.py +42 -0
  373. s1_cns_cli/s1graph/cloudformation/graph_builder/local_graph.py +402 -0
  374. s1_cns_cli/s1graph/cloudformation/graph_builder/utils.py +67 -0
  375. s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/__init__.py +0 -0
  376. s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/renderer.py +516 -0
  377. s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/vertex_reference.py +13 -0
  378. s1_cns_cli/s1graph/cloudformation/graph_manager.py +55 -0
  379. s1_cns_cli/s1graph/cloudformation/image_referencer/__init__.py +0 -0
  380. s1_cns_cli/s1graph/cloudformation/image_referencer/base_provider.py +38 -0
  381. s1_cns_cli/s1graph/cloudformation/image_referencer/manager.py +19 -0
  382. s1_cns_cli/s1graph/cloudformation/image_referencer/provider/__init__.py +0 -0
  383. s1_cns_cli/s1graph/cloudformation/image_referencer/provider/aws.py +98 -0
  384. s1_cns_cli/s1graph/cloudformation/parser/__init__.py +89 -0
  385. s1_cns_cli/s1graph/cloudformation/parser/cfn_keywords.py +50 -0
  386. s1_cns_cli/s1graph/cloudformation/parser/cfn_yaml.py +286 -0
  387. s1_cns_cli/s1graph/cloudformation/runner.py +283 -0
  388. s1_cns_cli/s1graph/common/__init__.py +1 -0
  389. s1_cns_cli/s1graph/common/checks/__init__.py +0 -0
  390. s1_cns_cli/s1graph/common/checks/base_check.py +121 -0
  391. s1_cns_cli/s1graph/common/checks/base_check_registry.py +213 -0
  392. s1_cns_cli/s1graph/common/checks/enums.py +8 -0
  393. s1_cns_cli/s1graph/common/checks/object_registry.py +222 -0
  394. s1_cns_cli/s1graph/common/checks_infra/__init__.py +0 -0
  395. s1_cns_cli/s1graph/common/checks_infra/checks_parser.py +319 -0
  396. s1_cns_cli/s1graph/common/checks_infra/registry.py +92 -0
  397. s1_cns_cli/s1graph/common/checks_infra/resources_types.py +1291 -0
  398. s1_cns_cli/s1graph/common/checks_infra/solvers/__init__.py +4 -0
  399. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/__init__.py +43 -0
  400. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/any_attribute_solver.py +12 -0
  401. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py +217 -0
  402. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/base_number_of_words_attribute_solver.py +27 -0
  403. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/contains_attribute_solver.py +24 -0
  404. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/ending_with_attribute_solver.py +12 -0
  405. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/equals_attribute_solver.py +19 -0
  406. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/equals_ignore_case_attribute_solver.py +17 -0
  407. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/exists_attribute_solver.py +12 -0
  408. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/greater_than_attribute_solver.py +21 -0
  409. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/greater_than_or_equal_attribute_solver.py +22 -0
  410. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/intersects_attribute_solver.py +19 -0
  411. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_empty_attribute_solver.py +16 -0
  412. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_false_attribute_solver.py +11 -0
  413. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_not_empty_attribute_solver.py +11 -0
  414. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_true_attribute_solver.py +15 -0
  415. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_equals_attribute_solver.py +23 -0
  416. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_greater_than_attribute_solver.py +27 -0
  417. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_greater_than_or_equal_attribute_solver.py +27 -0
  418. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_less_than_attribute_solver.py +27 -0
  419. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_less_than_or_equal_attribute_solver.py +27 -0
  420. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_not_equals_attribute_solver.py +11 -0
  421. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/less_than_attribute_solver.py +14 -0
  422. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/less_than_or_equal_attribute_solver.py +14 -0
  423. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_contains_attribute_solver.py +11 -0
  424. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_ending_with_attribute_solver.py +11 -0
  425. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_equals_attribute_solver.py +11 -0
  426. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_equals_ignore_case_attribute_solver.py +11 -0
  427. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_exists_attribute_solver.py +11 -0
  428. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_intersects_attribute_solver.py +11 -0
  429. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_regex_match_attribute_solver.py +11 -0
  430. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_starting_with_attribute_solver.py +11 -0
  431. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_subset_attribute_solver.py +11 -0
  432. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_within_attribute_solver.py +11 -0
  433. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_equals_attribute_solver.py +20 -0
  434. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_attribute_solver.py +23 -0
  435. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_or_equal_attribute_solver.py +23 -0
  436. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_attribute_solver.py +23 -0
  437. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_or_equal_attribute_solver.py +23 -0
  438. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_not_equals_attribute_solver.py +11 -0
  439. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/range_includes_attribute_solver.py +38 -0
  440. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/range_not_includes_attribute_solver.py +10 -0
  441. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/regex_match_attribute_solver.py +18 -0
  442. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/starting_with_attribute_solver.py +12 -0
  443. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/subset_attribute_solver.py +21 -0
  444. s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/within_attribute_solver.py +12 -0
  445. s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/__init__.py +3 -0
  446. s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/and_solver.py +27 -0
  447. s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/base_complex_solver.py +48 -0
  448. s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/not_solver.py +23 -0
  449. s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/or_solver.py +27 -0
  450. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/__init__.py +5 -0
  451. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/and_connection_solver.py +44 -0
  452. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/base_connection_solver.py +105 -0
  453. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/complex_connection_solver.py +94 -0
  454. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py +81 -0
  455. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_not_exists_solver.py +32 -0
  456. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_one_exists_solver.py +33 -0
  457. s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/or_connection_solver.py +36 -0
  458. s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/__init__.py +1 -0
  459. s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/base_filter_solver.py +27 -0
  460. s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/within_filter_solver.py +23 -0
  461. s1_cns_cli/s1graph/common/comment/__init__.py +0 -0
  462. s1_cns_cli/s1graph/common/comment/enum.py +3 -0
  463. s1_cns_cli/s1graph/common/goget/__init__.py +0 -0
  464. s1_cns_cli/s1graph/common/goget/base_getter.py +23 -0
  465. s1_cns_cli/s1graph/common/goget/github/__init__.py +0 -0
  466. s1_cns_cli/s1graph/common/goget/github/get_git.py +82 -0
  467. s1_cns_cli/s1graph/common/goget/registry/__init__.py +0 -0
  468. s1_cns_cli/s1graph/common/goget/registry/get_registry.py +31 -0
  469. s1_cns_cli/s1graph/common/graph/__init__.py +0 -0
  470. s1_cns_cli/s1graph/common/graph/checks_infra/__init__.py +0 -0
  471. s1_cns_cli/s1graph/common/graph/checks_infra/base_check.py +52 -0
  472. s1_cns_cli/s1graph/common/graph/checks_infra/base_parser.py +14 -0
  473. s1_cns_cli/s1graph/common/graph/checks_infra/enums.py +75 -0
  474. s1_cns_cli/s1graph/common/graph/checks_infra/registry.py +56 -0
  475. s1_cns_cli/s1graph/common/graph/checks_infra/solvers/__init__.py +0 -0
  476. s1_cns_cli/s1graph/common/graph/checks_infra/solvers/base_solver.py +32 -0
  477. s1_cns_cli/s1graph/common/graph/db_connectors/__init__.py +0 -0
  478. s1_cns_cli/s1graph/common/graph/db_connectors/db_connector.py +29 -0
  479. s1_cns_cli/s1graph/common/graph/db_connectors/networkx/__init__.py +0 -0
  480. s1_cns_cli/s1graph/common/graph/db_connectors/networkx/networkx_db_connector.py +50 -0
  481. s1_cns_cli/s1graph/common/graph/graph_builder/__init__.py +2 -0
  482. s1_cns_cli/s1graph/common/graph/graph_builder/consts.py +19 -0
  483. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/__init__.py +0 -0
  484. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/attribute_names.py +48 -0
  485. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/block_types.py +16 -0
  486. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/blocks.py +291 -0
  487. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/edge.py +29 -0
  488. s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/generic_resource_encryption_base.py +51 -0
  489. s1_cns_cli/s1graph/common/graph/graph_builder/graph_resources_encription_manager.py +29 -0
  490. s1_cns_cli/s1graph/common/graph/graph_builder/local_graph.py +107 -0
  491. s1_cns_cli/s1graph/common/graph/graph_builder/utils.py +46 -0
  492. s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/__init__.py +0 -0
  493. s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/breadcrumb_metadata.py +9 -0
  494. s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/renderer.py +134 -0
  495. s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/vertex_reference.py +30 -0
  496. s1_cns_cli/s1graph/common/graph/graph_manager.py +49 -0
  497. s1_cns_cli/s1graph/common/images/__init__.py +0 -0
  498. s1_cns_cli/s1graph/common/images/graph/__init__.py +0 -0
  499. s1_cns_cli/s1graph/common/images/graph/image_referencer_manager.py +20 -0
  500. s1_cns_cli/s1graph/common/images/graph/image_referencer_provider.py +58 -0
  501. s1_cns_cli/s1graph/common/images/image_referencer.py +330 -0
  502. s1_cns_cli/s1graph/common/images/workflow/__init__.py +0 -0
  503. s1_cns_cli/s1graph/common/images/workflow/image_referencer_manager.py +21 -0
  504. s1_cns_cli/s1graph/common/images/workflow/image_referencer_provider.py +21 -0
  505. s1_cns_cli/s1graph/common/models/__init__.py +0 -0
  506. s1_cns_cli/s1graph/common/models/consts.py +35 -0
  507. s1_cns_cli/s1graph/common/models/enums.py +61 -0
  508. s1_cns_cli/s1graph/common/multi_signature.py +129 -0
  509. s1_cns_cli/s1graph/common/output/__init__.py +0 -0
  510. s1_cns_cli/s1graph/common/output/ai.py +152 -0
  511. s1_cns_cli/s1graph/common/output/baseline.py +98 -0
  512. s1_cns_cli/s1graph/common/output/common.py +54 -0
  513. s1_cns_cli/s1graph/common/output/csv.py +232 -0
  514. s1_cns_cli/s1graph/common/output/cyclonedx.py +470 -0
  515. s1_cns_cli/s1graph/common/output/cyclonedx_consts.py +181 -0
  516. s1_cns_cli/s1graph/common/output/extra_resource.py +18 -0
  517. s1_cns_cli/s1graph/common/output/github_actions_record.py +45 -0
  518. s1_cns_cli/s1graph/common/output/gitlab_sast.py +173 -0
  519. s1_cns_cli/s1graph/common/output/graph_record.py +17 -0
  520. s1_cns_cli/s1graph/common/output/record.py +246 -0
  521. s1_cns_cli/s1graph/common/output/report.py +607 -0
  522. s1_cns_cli/s1graph/common/output/sarif.py +243 -0
  523. s1_cns_cli/s1graph/common/output/secrets_record.py +144 -0
  524. s1_cns_cli/s1graph/common/packaging/__init__.py +0 -0
  525. s1_cns_cli/s1graph/common/packaging/version.py +141 -0
  526. s1_cns_cli/s1graph/common/parallelizer/__init__.py +0 -0
  527. s1_cns_cli/s1graph/common/parallelizer/parallel_runner.py +72 -0
  528. s1_cns_cli/s1graph/common/parsers/__init__.py +0 -0
  529. s1_cns_cli/s1graph/common/parsers/json/__init__.py +68 -0
  530. s1_cns_cli/s1graph/common/parsers/json/decoder.py +404 -0
  531. s1_cns_cli/s1graph/common/parsers/json/errors.py +41 -0
  532. s1_cns_cli/s1graph/common/parsers/node.py +189 -0
  533. s1_cns_cli/s1graph/common/parsers/yaml/__init__.py +0 -0
  534. s1_cns_cli/s1graph/common/parsers/yaml/loader.py +76 -0
  535. s1_cns_cli/s1graph/common/parsers/yaml/parser.py +49 -0
  536. s1_cns_cli/s1graph/common/runners/__init__.py +0 -0
  537. s1_cns_cli/s1graph/common/runners/base_post_runner.py +30 -0
  538. s1_cns_cli/s1graph/common/runners/base_runner.py +216 -0
  539. s1_cns_cli/s1graph/common/runners/graph_builder/__init__.py +0 -0
  540. s1_cns_cli/s1graph/common/runners/graph_builder/local_graph.py +57 -0
  541. s1_cns_cli/s1graph/common/runners/graph_manager.py +40 -0
  542. s1_cns_cli/s1graph/common/runners/object_runner.py +354 -0
  543. s1_cns_cli/s1graph/common/runners/runner_registry.py +680 -0
  544. s1_cns_cli/s1graph/common/s1cns/__init__.py +0 -0
  545. s1_cns_cli/s1graph/common/s1cns/bc_source.py +50 -0
  546. s1_cns_cli/s1graph/common/s1cns/check_type.py +37 -0
  547. s1_cns_cli/s1graph/common/s1cns/code_categories.py +55 -0
  548. s1_cns_cli/s1graph/common/s1cns/integration_features/__init__.py +1 -0
  549. s1_cns_cli/s1graph/common/s1cns/integration_features/base_integration_feature.py +45 -0
  550. s1_cns_cli/s1graph/common/s1cns/integration_features/features/__init__.py +4 -0
  551. s1_cns_cli/s1graph/common/s1cns/integration_features/features/custom_policies_integration.py +136 -0
  552. s1_cns_cli/s1graph/common/s1cns/integration_features/features/fixes_integration.py +142 -0
  553. s1_cns_cli/s1graph/common/s1cns/integration_features/features/licensing_integration.py +87 -0
  554. s1_cns_cli/s1graph/common/s1cns/integration_features/features/policies_3d_integration.py +82 -0
  555. s1_cns_cli/s1graph/common/s1cns/integration_features/features/policy_metadata_integration.py +174 -0
  556. s1_cns_cli/s1graph/common/s1cns/integration_features/features/repo_config_integration.py +142 -0
  557. s1_cns_cli/s1graph/common/s1cns/integration_features/features/suppressions_integration.py +233 -0
  558. s1_cns_cli/s1graph/common/s1cns/integration_features/integration_feature_registry.py +52 -0
  559. s1_cns_cli/s1graph/common/s1cns/licensing.py +29 -0
  560. s1_cns_cli/s1graph/common/s1cns/platform_errors.py +14 -0
  561. s1_cns_cli/s1graph/common/s1cns/platform_integration.py +1023 -0
  562. s1_cns_cli/s1graph/common/s1cns/platform_key.py +24 -0
  563. s1_cns_cli/s1graph/common/s1cns/run_metadata/__init__.py +1 -0
  564. s1_cns_cli/s1graph/common/s1cns/run_metadata/abstract_run_metadata_extractor.py +73 -0
  565. s1_cns_cli/s1graph/common/s1cns/run_metadata/ci_variables.py +15 -0
  566. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/__init__.py +5 -0
  567. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/bitbucket.py +38 -0
  568. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/default_extractor.py +34 -0
  569. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/github_actions.py +40 -0
  570. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/gitlab_ci.py +40 -0
  571. s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/jenkins.py +39 -0
  572. s1_cns_cli/s1graph/common/s1cns/run_metadata/registry.py +29 -0
  573. s1_cns_cli/s1graph/common/s1cns/severities.py +45 -0
  574. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/__init__.py +0 -0
  575. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/image_scanner.py +203 -0
  576. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/__init__.py +0 -0
  577. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/docker_image_scanning.py +80 -0
  578. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/package_scanning.py +40 -0
  579. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/twistcli.py +123 -0
  580. s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/report.py +45 -0
  581. s1_cns_cli/s1graph/common/s1cns/wrapper.py +136 -0
  582. s1_cns_cli/s1graph/common/sca/__init__.py +0 -0
  583. s1_cns_cli/s1graph/common/sca/commons.py +60 -0
  584. s1_cns_cli/s1graph/common/sca/output.py +637 -0
  585. s1_cns_cli/s1graph/common/typing.py +104 -0
  586. s1_cns_cli/s1graph/common/util/__init__.py +0 -0
  587. s1_cns_cli/s1graph/common/util/banner.py +29 -0
  588. s1_cns_cli/s1graph/common/util/config_utils.py +26 -0
  589. s1_cns_cli/s1graph/common/util/consts.py +35 -0
  590. s1_cns_cli/s1graph/common/util/contextmanagers.py +21 -0
  591. s1_cns_cli/s1graph/common/util/data_structures_utils.py +101 -0
  592. s1_cns_cli/s1graph/common/util/decorators.py +28 -0
  593. s1_cns_cli/s1graph/common/util/dockerfile.py +7 -0
  594. s1_cns_cli/s1graph/common/util/docs_generator.py +196 -0
  595. s1_cns_cli/s1graph/common/util/ext_argument_parser.py +543 -0
  596. s1_cns_cli/s1graph/common/util/file_utils.py +84 -0
  597. s1_cns_cli/s1graph/common/util/http_utils.py +247 -0
  598. s1_cns_cli/s1graph/common/util/json_utils.py +101 -0
  599. s1_cns_cli/s1graph/common/util/parser_utils.py +398 -0
  600. s1_cns_cli/s1graph/common/util/prompt.py +277 -0
  601. s1_cns_cli/s1graph/common/util/runner_dependency_handler.py +50 -0
  602. s1_cns_cli/s1graph/common/util/secrets.py +240 -0
  603. s1_cns_cli/s1graph/common/util/secrets_omitter.py +111 -0
  604. s1_cns_cli/s1graph/common/util/stopit/__init__.py +23 -0
  605. s1_cns_cli/s1graph/common/util/stopit/signalstop.py +56 -0
  606. s1_cns_cli/s1graph/common/util/stopit/threadstop.py +81 -0
  607. s1_cns_cli/s1graph/common/util/stopit/utils.py +148 -0
  608. s1_cns_cli/s1graph/common/util/str_utils.py +17 -0
  609. s1_cns_cli/s1graph/common/util/suppression.py +53 -0
  610. s1_cns_cli/s1graph/common/util/templates/__init__.py +0 -0
  611. s1_cns_cli/s1graph/common/util/templates/data.jinja2 +29 -0
  612. s1_cns_cli/s1graph/common/util/templates/init.jinja2 +4 -0
  613. s1_cns_cli/s1graph/common/util/templates/provider.jinja2 +28 -0
  614. s1_cns_cli/s1graph/common/util/templates/resource.jinja2 +28 -0
  615. s1_cns_cli/s1graph/common/util/templates/unittest-python.jinja2 +41 -0
  616. s1_cns_cli/s1graph/common/util/templates/unittest-terraform.jinja2 +9 -0
  617. s1_cns_cli/s1graph/common/util/tqdm_utils.py +76 -0
  618. s1_cns_cli/s1graph/common/util/type_forcers.py +146 -0
  619. s1_cns_cli/s1graph/common/util/var_utils.py +44 -0
  620. s1_cns_cli/s1graph/common/variables/__init__.py +0 -0
  621. s1_cns_cli/s1graph/common/variables/context.py +49 -0
  622. s1_cns_cli/s1graph/common/vcs/__init__.py +0 -0
  623. s1_cns_cli/s1graph/common/vcs/base_vcs_dal.py +130 -0
  624. s1_cns_cli/s1graph/common/vcs/vcs_schema.py +20 -0
  625. s1_cns_cli/s1graph/common/version_manager.py +12 -0
  626. s1_cns_cli/s1graph/contributor_metrics.py +65 -0
  627. s1_cns_cli/s1graph/dockerfile/__init__.py +1 -0
  628. s1_cns_cli/s1graph/dockerfile/base_dockerfile_check.py +44 -0
  629. s1_cns_cli/s1graph/dockerfile/base_registry.py +101 -0
  630. s1_cns_cli/s1graph/dockerfile/checks/AddExists.py +27 -0
  631. s1_cns_cli/s1graph/dockerfile/checks/AliasIsUnique.py +36 -0
  632. s1_cns_cli/s1graph/dockerfile/checks/ExposePort22.py +28 -0
  633. s1_cns_cli/s1graph/dockerfile/checks/HealthcheckExists.py +27 -0
  634. s1_cns_cli/s1graph/dockerfile/checks/MaintainerExists.py +24 -0
  635. s1_cns_cli/s1graph/dockerfile/checks/ReferenceLatestTag.py +40 -0
  636. s1_cns_cli/s1graph/dockerfile/checks/RootUser.py +28 -0
  637. s1_cns_cli/s1graph/dockerfile/checks/RunUsingAPT.py +31 -0
  638. s1_cns_cli/s1graph/dockerfile/checks/UpdateNotAlone.py +57 -0
  639. s1_cns_cli/s1graph/dockerfile/checks/UserExists.py +27 -0
  640. s1_cns_cli/s1graph/dockerfile/checks/WorkdirIsAbsolute.py +39 -0
  641. s1_cns_cli/s1graph/dockerfile/checks/__init__.py +5 -0
  642. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvGitSslNoVerify.yaml +19 -0
  643. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvNodeTlsRejectUnauthorized.yaml +19 -0
  644. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvNpmConfigStrictSsl.yaml +19 -0
  645. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvPipTrustedHost.yaml +19 -0
  646. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvPythonHttpsVerify.yaml +19 -0
  647. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunApkAllowUntrusted.yaml +11 -0
  648. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunAptGetAllowUnauthenticated.yaml +11 -0
  649. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunAptGetForceYes.yaml +11 -0
  650. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunNpmConfigSetStrictSsl.yaml +11 -0
  651. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunPipTrustedHost.yaml +11 -0
  652. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunRpmNoSignature.yaml +11 -0
  653. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUnsafeCurl.yaml +11 -0
  654. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUnsafeWget.yaml +11 -0
  655. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUsingSudo.yaml +18 -0
  656. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunYumConfigManagerSslVerify.yaml +11 -0
  657. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunYumNoGpgCheck.yaml +11 -0
  658. s1_cns_cli/s1graph/dockerfile/checks/graph_checks/__init__.py +0 -0
  659. s1_cns_cli/s1graph/dockerfile/graph_builder/__init__.py +0 -0
  660. s1_cns_cli/s1graph/dockerfile/graph_builder/graph_components/__init__.py +0 -0
  661. s1_cns_cli/s1graph/dockerfile/graph_builder/graph_components/resource_types.py +26 -0
  662. s1_cns_cli/s1graph/dockerfile/graph_builder/local_graph.py +115 -0
  663. s1_cns_cli/s1graph/dockerfile/graph_manager.py +45 -0
  664. s1_cns_cli/s1graph/dockerfile/image_referencer/__init__.py +0 -0
  665. s1_cns_cli/s1graph/dockerfile/image_referencer/manager.py +23 -0
  666. s1_cns_cli/s1graph/dockerfile/image_referencer/provider.py +56 -0
  667. s1_cns_cli/s1graph/dockerfile/parser.py +41 -0
  668. s1_cns_cli/s1graph/dockerfile/registry.py +3 -0
  669. s1_cns_cli/s1graph/dockerfile/runner.py +291 -0
  670. s1_cns_cli/s1graph/dockerfile/utils.py +78 -0
  671. s1_cns_cli/s1graph/example_runner/__init__.py +2 -0
  672. s1_cns_cli/s1graph/example_runner/checks/__init__.py +1 -0
  673. s1_cns_cli/s1graph/example_runner/checks/base_example_runner_check.py +29 -0
  674. s1_cns_cli/s1graph/example_runner/checks/base_example_runner_job_check.py +24 -0
  675. s1_cns_cli/s1graph/example_runner/checks/job/ExampleCheckTrueFalse.py +68 -0
  676. s1_cns_cli/s1graph/example_runner/checks/job/__init__.py +4 -0
  677. s1_cns_cli/s1graph/example_runner/checks/job_registry.py +8 -0
  678. s1_cns_cli/s1graph/example_runner/common/__init__.py +0 -0
  679. s1_cns_cli/s1graph/example_runner/runner.py +61 -0
  680. s1_cns_cli/s1graph/github/__init__.py +1 -0
  681. s1_cns_cli/s1graph/github/base_github_branch_security.py +48 -0
  682. s1_cns_cli/s1graph/github/base_github_configuration_check.py +42 -0
  683. s1_cns_cli/s1graph/github/base_github_negative_branch_security.py +62 -0
  684. s1_cns_cli/s1graph/github/base_github_org_check.py +45 -0
  685. s1_cns_cli/s1graph/github/base_github_org_security.py +40 -0
  686. s1_cns_cli/s1graph/github/checks/2fa.py +19 -0
  687. s1_cns_cli/s1graph/github/checks/__init__.py +4 -0
  688. s1_cns_cli/s1graph/github/checks/disallow_branch_deletions.py +22 -0
  689. s1_cns_cli/s1graph/github/checks/disallow_force_pushes.py +22 -0
  690. s1_cns_cli/s1graph/github/checks/disallow_inactive_branch_60days.py +46 -0
  691. s1_cns_cli/s1graph/github/checks/dismiss_stale_reviews.py +16 -0
  692. s1_cns_cli/s1graph/github/checks/enforce_branch_protection_admins.py +19 -0
  693. s1_cns_cli/s1graph/github/checks/internal_repository_creation_is_limited.py +22 -0
  694. s1_cns_cli/s1graph/github/checks/ipallowlist.py +22 -0
  695. s1_cns_cli/s1graph/github/checks/minimum_admins_in_org.py +38 -0
  696. s1_cns_cli/s1graph/github/checks/private_repository_creation_is_limited.py +22 -0
  697. s1_cns_cli/s1graph/github/checks/public_repository_creation_is_limited.py +22 -0
  698. s1_cns_cli/s1graph/github/checks/repository_collaborators.py +42 -0
  699. s1_cns_cli/s1graph/github/checks/require_2approvals.py +20 -0
  700. s1_cns_cli/s1graph/github/checks/require_code_owner_reviews.py +16 -0
  701. s1_cns_cli/s1graph/github/checks/require_conversation_resolution.py +16 -0
  702. s1_cns_cli/s1graph/github/checks/require_linear_history.py +19 -0
  703. s1_cns_cli/s1graph/github/checks/require_push_restrictions.py +16 -0
  704. s1_cns_cli/s1graph/github/checks/require_signatures.py +19 -0
  705. s1_cns_cli/s1graph/github/checks/require_status_checks_pr.py +16 -0
  706. s1_cns_cli/s1graph/github/checks/require_strict_base_permissions_repository.py +23 -0
  707. s1_cns_cli/s1graph/github/checks/require_updated_branch_pr.py +22 -0
  708. s1_cns_cli/s1graph/github/checks/require_verified_organization.py +22 -0
  709. s1_cns_cli/s1graph/github/checks/restrict_pr_review_dismissal.py +22 -0
  710. s1_cns_cli/s1graph/github/checks/sso.py +39 -0
  711. s1_cns_cli/s1graph/github/checks/webhooks_https_orgs.py +45 -0
  712. s1_cns_cli/s1graph/github/checks/webhooks_https_repos.py +44 -0
  713. s1_cns_cli/s1graph/github/dal.py +233 -0
  714. s1_cns_cli/s1graph/github/registry.py +4 -0
  715. s1_cns_cli/s1graph/github/runner.py +75 -0
  716. s1_cns_cli/s1graph/github/schemas/__init__.py +0 -0
  717. s1_cns_cli/s1graph/github/schemas/branch.py +2685 -0
  718. s1_cns_cli/s1graph/github/schemas/branch_protection.py +99 -0
  719. s1_cns_cli/s1graph/github/schemas/no_branch_protection.py +25 -0
  720. s1_cns_cli/s1graph/github/schemas/org_members.py +173 -0
  721. s1_cns_cli/s1graph/github/schemas/org_security.py +73 -0
  722. s1_cns_cli/s1graph/github/schemas/org_webhooks.py +127 -0
  723. s1_cns_cli/s1graph/github/schemas/organization.py +439 -0
  724. s1_cns_cli/s1graph/github/schemas/repository_collaborators.py +199 -0
  725. s1_cns_cli/s1graph/github/schemas/repository_webhooks.py +217 -0
  726. s1_cns_cli/s1graph/github_actions/__init__.py +1 -0
  727. s1_cns_cli/s1graph/github_actions/checks/__init__.py +1 -0
  728. s1_cns_cli/s1graph/github_actions/checks/base_github_action_check.py +38 -0
  729. s1_cns_cli/s1graph/github_actions/checks/graph_checks/ReadOnlyTopLevelPermissions.yaml +11 -0
  730. s1_cns_cli/s1graph/github_actions/checks/graph_checks/__init__.py +0 -0
  731. s1_cns_cli/s1graph/github_actions/checks/job/AllowUnsecureCommandsOnJob.py +36 -0
  732. s1_cns_cli/s1graph/github_actions/checks/job/CosignArtifacts.py +55 -0
  733. s1_cns_cli/s1graph/github_actions/checks/job/CosignSBOM.py +55 -0
  734. s1_cns_cli/s1graph/github_actions/checks/job/EmptyWorkflowDispatch.py +43 -0
  735. s1_cns_cli/s1graph/github_actions/checks/job/ReverseShellNetcat.py +33 -0
  736. s1_cns_cli/s1graph/github_actions/checks/job/ShellInjection.py +37 -0
  737. s1_cns_cli/s1graph/github_actions/checks/job/SuspectCurlInScript.py +34 -0
  738. s1_cns_cli/s1graph/github_actions/checks/job/__init__.py +4 -0
  739. s1_cns_cli/s1graph/github_actions/checks/registry.py +4 -0
  740. s1_cns_cli/s1graph/github_actions/common/__init__.py +0 -0
  741. s1_cns_cli/s1graph/github_actions/common/artifact_build.py +10 -0
  742. s1_cns_cli/s1graph/github_actions/common/build_actions.py +5 -0
  743. s1_cns_cli/s1graph/github_actions/common/shell_injection_list.py +20 -0
  744. s1_cns_cli/s1graph/github_actions/graph_builder/__init__.py +0 -0
  745. s1_cns_cli/s1graph/github_actions/graph_builder/graph_components/__init__.py +0 -0
  746. s1_cns_cli/s1graph/github_actions/graph_builder/graph_components/resource_types.py +12 -0
  747. s1_cns_cli/s1graph/github_actions/graph_builder/local_graph.py +209 -0
  748. s1_cns_cli/s1graph/github_actions/image_referencer/__init__.py +0 -0
  749. s1_cns_cli/s1graph/github_actions/image_referencer/manager.py +15 -0
  750. s1_cns_cli/s1graph/github_actions/image_referencer/provider.py +66 -0
  751. s1_cns_cli/s1graph/github_actions/runner.py +165 -0
  752. s1_cns_cli/s1graph/github_actions/schemas.py +3139 -0
  753. s1_cns_cli/s1graph/github_actions/utils.py +154 -0
  754. s1_cns_cli/s1graph/gitlab/__init__.py +1 -0
  755. s1_cns_cli/s1graph/gitlab/base_gitlab_configuration_check.py +23 -0
  756. s1_cns_cli/s1graph/gitlab/checks/__init__.py +4 -0
  757. s1_cns_cli/s1graph/gitlab/checks/merge_requests_approvals.py +32 -0
  758. s1_cns_cli/s1graph/gitlab/checks/two_factor_authentication.py +33 -0
  759. s1_cns_cli/s1graph/gitlab/dal.py +69 -0
  760. s1_cns_cli/s1graph/gitlab/registry.py +4 -0
  761. s1_cns_cli/s1graph/gitlab/runner.py +54 -0
  762. s1_cns_cli/s1graph/gitlab/schemas/__init__.py +0 -0
  763. s1_cns_cli/s1graph/gitlab/schemas/groups.py +130 -0
  764. s1_cns_cli/s1graph/gitlab/schemas/project_approvals.py +41 -0
  765. s1_cns_cli/s1graph/gitlab_ci/__init__.py +1 -0
  766. s1_cns_cli/s1graph/gitlab_ci/checks/__init__.py +1 -0
  767. s1_cns_cli/s1graph/gitlab_ci/checks/base_gitlab_ci_check.py +35 -0
  768. s1_cns_cli/s1graph/gitlab_ci/checks/job/AvoidDoublePipelines.py +36 -0
  769. s1_cns_cli/s1graph/gitlab_ci/checks/job/DetectImagesUsage.py +25 -0
  770. s1_cns_cli/s1graph/gitlab_ci/checks/job/SuspectCurlInScript.py +29 -0
  771. s1_cns_cli/s1graph/gitlab_ci/checks/job/__init__.py +4 -0
  772. s1_cns_cli/s1graph/gitlab_ci/checks/registry.py +4 -0
  773. s1_cns_cli/s1graph/gitlab_ci/common/__init__.py +0 -0
  774. s1_cns_cli/s1graph/gitlab_ci/common/reserved.py +8 -0
  775. s1_cns_cli/s1graph/gitlab_ci/common/resource_id_utils.py +67 -0
  776. s1_cns_cli/s1graph/gitlab_ci/image_referencer/__init__.py +0 -0
  777. s1_cns_cli/s1graph/gitlab_ci/image_referencer/manager.py +13 -0
  778. s1_cns_cli/s1graph/gitlab_ci/image_referencer/provider.py +60 -0
  779. s1_cns_cli/s1graph/gitlab_ci/runner.py +104 -0
  780. s1_cns_cli/s1graph/helm/__init__.py +0 -0
  781. s1_cns_cli/s1graph/helm/base_registry.py +101 -0
  782. s1_cns_cli/s1graph/helm/image_referencer/__init__.py +0 -0
  783. s1_cns_cli/s1graph/helm/image_referencer/base_provider.py +25 -0
  784. s1_cns_cli/s1graph/helm/image_referencer/manager.py +25 -0
  785. s1_cns_cli/s1graph/helm/image_referencer/provider/__init__.py +0 -0
  786. s1_cns_cli/s1graph/helm/image_referencer/provider/helm.py +19 -0
  787. s1_cns_cli/s1graph/helm/registry.py +3 -0
  788. s1_cns_cli/s1graph/helm/runner.py +459 -0
  789. s1_cns_cli/s1graph/json_doc/__init__.py +0 -0
  790. s1_cns_cli/s1graph/json_doc/base_json_check.py +19 -0
  791. s1_cns_cli/s1graph/json_doc/base_registry.py +201 -0
  792. s1_cns_cli/s1graph/json_doc/enums.py +8 -0
  793. s1_cns_cli/s1graph/json_doc/registry.py +4 -0
  794. s1_cns_cli/s1graph/json_doc/runner.py +54 -0
  795. s1_cns_cli/s1graph/kubernetes/__init__.py +1 -0
  796. s1_cns_cli/s1graph/kubernetes/checks/__init__.py +0 -0
  797. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ImpersonatePermissions.yaml +60 -0
  798. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ModifyServicesStatus.yaml +60 -0
  799. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/NoCreateNodesProxyOrPodsExec.yaml +59 -0
  800. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ReadAllSecrets.yaml +60 -0
  801. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/RequireAllPodsToHaveNetworkPolicy.yaml +18 -0
  802. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/RoleBindingPE.yaml +59 -0
  803. s1_cns_cli/s1graph/kubernetes/checks/graph_checks/__init__.py +0 -0
  804. s1_cns_cli/s1graph/kubernetes/checks/resource/__init__.py +1 -0
  805. s1_cns_cli/s1graph/kubernetes/checks/resource/base_container_check.py +146 -0
  806. s1_cns_cli/s1graph/kubernetes/checks/resource/base_rbac_check.py +89 -0
  807. s1_cns_cli/s1graph/kubernetes/checks/resource/base_registry.py +94 -0
  808. s1_cns_cli/s1graph/kubernetes/checks/resource/base_root_container_check.py +70 -0
  809. s1_cns_cli/s1graph/kubernetes/checks/resource/base_spec_check.py +55 -0
  810. s1_cns_cli/s1graph/kubernetes/checks/resource/base_spec_omitted_or_value_check.py +34 -0
  811. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowPrivilegeEscalation.py +29 -0
  812. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowPrivilegeEscalationPSP.py +37 -0
  813. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilities.py +26 -0
  814. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilitiesPSP.py +28 -0
  815. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilitiesSysAdmin.py +26 -0
  816. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py +29 -0
  817. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAdmissionControlEventRateLimit.py +28 -0
  818. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py +29 -0
  819. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAnonymousAuth.py +23 -0
  820. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLog.py +26 -0
  821. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxAge.py +28 -0
  822. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxBackup.py +28 -0
  823. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxSize.py +28 -0
  824. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNode.py +28 -0
  825. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNotAlwaysAllow.py +27 -0
  826. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeRBAC.py +28 -0
  827. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerBasicAuthFile.py +24 -0
  828. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEncryptionProviders.py +25 -0
  829. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEtcdCaFile.py +25 -0
  830. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEtcdCertAndKey.py +29 -0
  831. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerInsecureBindAddress.py +24 -0
  832. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerInsecurePort.py +23 -0
  833. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerKubeletClientCertAndKey.py +29 -0
  834. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerKubeletHttps.py +23 -0
  835. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py +28 -0
  836. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py +28 -0
  837. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py +28 -0
  838. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerProfiling.py +23 -0
  839. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerRequestTimeout.py +34 -0
  840. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerSecurePort.py +24 -0
  841. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerSecurityContextDenyPlugin.py +29 -0
  842. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountKeyFile.py +32 -0
  843. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountLookup.py +26 -0
  844. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py +28 -0
  845. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py +39 -0
  846. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerTlsCertAndKey.py +31 -0
  847. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerTokenAuthFile.py +23 -0
  848. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerkubeletCertificateAuthority.py +23 -0
  849. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/CPULimits.py +26 -0
  850. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/CPURequests.py +28 -0
  851. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ContainerSecurityContext.py +23 -0
  852. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ControllerManagerBindAddress.py +27 -0
  853. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultNamespace.py +50 -0
  854. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultServiceAccount.py +32 -0
  855. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultServiceAccountBinding.py +29 -0
  856. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DockerSocketVolume.py +65 -0
  857. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DropCapabilities.py +28 -0
  858. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DropCapabilitiesPSP.py +32 -0
  859. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdAutoTls.py +24 -0
  860. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdCertAndKey.py +32 -0
  861. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdClientCertAuth.py +24 -0
  862. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdPeerFiles.py +26 -0
  863. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/HostPort.py +31 -0
  864. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImageDigest.py +34 -0
  865. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImagePullPolicyAlways.py +58 -0
  866. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImageTagFixed.py +44 -0
  867. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerBlockProfiles.py +26 -0
  868. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerRootCAFile.py +28 -0
  869. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountCredentials.py +26 -0
  870. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountPrivateKeyFile.py +28 -0
  871. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerTerminatedPods.py +30 -0
  872. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletAnonymousAuth.py +24 -0
  873. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletAuthorizationModeNotAlwaysAllow.py +28 -0
  874. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletClientCa.py +27 -0
  875. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletCryptographicCiphers.py +40 -0
  876. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletHostnameOverride.py +24 -0
  877. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletKeyFilesSetAppropriate.py +30 -0
  878. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletMakeIptablesUtilChains.py +24 -0
  879. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletProtectKernelDefaults.py +24 -0
  880. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletReadOnlyPort.py +27 -0
  881. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletStreamingConnectionIdleTimeout.py +24 -0
  882. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubernetesDashboard.py +34 -0
  883. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubletEventCapture.py +28 -0
  884. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubletRotateCertificates.py +24 -0
  885. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/LivenessProbe.py +29 -0
  886. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MemoryLimits.py +26 -0
  887. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MemoryRequests.py +28 -0
  888. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MinimizeCapabilities.py +28 -0
  889. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MinimizeCapabilitiesPSP.py +24 -0
  890. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py +29 -0
  891. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742AllSnippets.py +29 -0
  892. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Lua.py +29 -0
  893. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PeerClientCertAuthTrue.py +25 -0
  894. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PodSecurityContext.py +58 -0
  895. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PrivilegedContainers.py +24 -0
  896. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PrivilegedContainersPSP.py +21 -0
  897. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacApproveCertificateSigningRequests.py +26 -0
  898. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacBindRoleBindings.py +19 -0
  899. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacControlWebhooks.py +20 -0
  900. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacEscalateRoles.py +19 -0
  901. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ReadOnlyFilesystem.py +22 -0
  902. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ReadinessProbe.py +29 -0
  903. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainers.py +71 -0
  904. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainersHighUID.py +71 -0
  905. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainersPSP.py +33 -0
  906. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RotateKubeletServerCertificate.py +29 -0
  907. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SchedulerBindAddress.py +27 -0
  908. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SchedulerProfiling.py +23 -0
  909. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Seccomp.py +65 -0
  910. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SeccompPSP.py +27 -0
  911. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Secrets.py +33 -0
  912. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ServiceAccountTokens.py +61 -0
  913. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostIPC.py +61 -0
  914. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostIPCPSP.py +21 -0
  915. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostPID.py +61 -0
  916. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostPIDPSP.py +21 -0
  917. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py +61 -0
  918. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SharedHostNetworkNamespacePSP.py +21 -0
  919. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Tiller.py +35 -0
  920. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/TillerDeploymentListener.py +30 -0
  921. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/TillerService.py +40 -0
  922. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/WildcardRoles.py +33 -0
  923. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/__init__.py +5 -0
  924. s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/k8s_check_utils.py +22 -0
  925. s1_cns_cli/s1graph/kubernetes/checks/resource/registry.py +4 -0
  926. s1_cns_cli/s1graph/kubernetes/graph_builder/__init__.py +0 -0
  927. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/ResourceKeywordIdentifier.py +31 -0
  928. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/__init__.py +0 -0
  929. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/blocks.py +34 -0
  930. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/K8SEdgeBuilder.py +28 -0
  931. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/KeywordEdgeBuilder.py +74 -0
  932. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/LabelSelectorEdgeBuilder.py +53 -0
  933. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/NetworkPolicyEdgeBuilder.py +61 -0
  934. s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/__init__.py +0 -0
  935. s1_cns_cli/s1graph/kubernetes/graph_builder/local_graph.py +176 -0
  936. s1_cns_cli/s1graph/kubernetes/graph_manager.py +39 -0
  937. s1_cns_cli/s1graph/kubernetes/image_referencer/__init__.py +0 -0
  938. s1_cns_cli/s1graph/kubernetes/image_referencer/base_provider.py +40 -0
  939. s1_cns_cli/s1graph/kubernetes/image_referencer/manager.py +19 -0
  940. s1_cns_cli/s1graph/kubernetes/image_referencer/provider/__init__.py +0 -0
  941. s1_cns_cli/s1graph/kubernetes/image_referencer/provider/k8s.py +105 -0
  942. s1_cns_cli/s1graph/kubernetes/kubernetes_graph_flags.py +19 -0
  943. s1_cns_cli/s1graph/kubernetes/kubernetes_utils.py +257 -0
  944. s1_cns_cli/s1graph/kubernetes/parser/__init__.py +0 -0
  945. s1_cns_cli/s1graph/kubernetes/parser/k8_json.py +66 -0
  946. s1_cns_cli/s1graph/kubernetes/parser/k8_yaml.py +65 -0
  947. s1_cns_cli/s1graph/kubernetes/parser/parser.py +52 -0
  948. s1_cns_cli/s1graph/kubernetes/runner.py +351 -0
  949. s1_cns_cli/s1graph/kubernetes/test/share-process-namespace.yaml +27 -0
  950. s1_cns_cli/s1graph/kustomize/__init__.py +0 -0
  951. s1_cns_cli/s1graph/kustomize/image_referencer/__init__.py +0 -0
  952. s1_cns_cli/s1graph/kustomize/image_referencer/base_provider.py +26 -0
  953. s1_cns_cli/s1graph/kustomize/image_referencer/manager.py +23 -0
  954. s1_cns_cli/s1graph/kustomize/image_referencer/provider/__init__.py +0 -0
  955. s1_cns_cli/s1graph/kustomize/image_referencer/provider/kustomize.py +18 -0
  956. s1_cns_cli/s1graph/kustomize/runner.py +642 -0
  957. s1_cns_cli/s1graph/kustomize/utils.py +25 -0
  958. s1_cns_cli/s1graph/logging_init.py +22 -0
  959. s1_cns_cli/s1graph/main.py +653 -0
  960. s1_cns_cli/s1graph/openapi/__init__.py +1 -0
  961. s1_cns_cli/s1graph/openapi/checks/__init__.py +0 -0
  962. s1_cns_cli/s1graph/openapi/checks/base_openapi_check.py +27 -0
  963. s1_cns_cli/s1graph/openapi/checks/base_registry.py +10 -0
  964. s1_cns_cli/s1graph/openapi/checks/registry.py +3 -0
  965. s1_cns_cli/s1graph/openapi/checks/resource/__init__.py +3 -0
  966. s1_cns_cli/s1graph/openapi/checks/resource/generic/GlobalSecurityFieldIsEmpty.py +26 -0
  967. s1_cns_cli/s1graph/openapi/checks/resource/generic/SecurityOperations.py +43 -0
  968. s1_cns_cli/s1graph/openapi/checks/resource/generic/__init__.py +5 -0
  969. s1_cns_cli/s1graph/openapi/checks/resource/v2/BaseOpenapiCheckV2.py +29 -0
  970. s1_cns_cli/s1graph/openapi/checks/resource/v2/GlobalSchemeDefineHTTP.py +29 -0
  971. s1_cns_cli/s1graph/openapi/checks/resource/v2/GlobalSecurityScopeUndefined.py +45 -0
  972. s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py +55 -0
  973. s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityDefinitionImplicitFlow.py +40 -0
  974. s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityDefinitionPasswordFlow.py +40 -0
  975. s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py +45 -0
  976. s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityRequirement.py +47 -0
  977. s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectBasicAuth.py +52 -0
  978. s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py +43 -0
  979. s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectImplicitFlow.py +54 -0
  980. s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectProducesUndefined.py +45 -0
  981. s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py +65 -0
  982. s1_cns_cli/s1graph/openapi/checks/resource/v2/PathSchemeDefineHTTP.py +42 -0
  983. s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py +40 -0
  984. s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityDefinitions.py +30 -0
  985. s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityRequirement.py +69 -0
  986. s1_cns_cli/s1graph/openapi/checks/resource/v2/__init__.py +5 -0
  987. s1_cns_cli/s1graph/openapi/checks/resource/v3/BaseOpenapiCheckV3.py +29 -0
  988. s1_cns_cli/s1graph/openapi/checks/resource/v3/CleartextOverUnencryptedChannel.py +48 -0
  989. s1_cns_cli/s1graph/openapi/checks/resource/v3/__init__.py +5 -0
  990. s1_cns_cli/s1graph/openapi/runner.py +108 -0
  991. s1_cns_cli/s1graph/policies_3d/__init__.py +0 -0
  992. s1_cns_cli/s1graph/policies_3d/checks_infra/__init__.py +0 -0
  993. s1_cns_cli/s1graph/policies_3d/checks_infra/base_check.py +26 -0
  994. s1_cns_cli/s1graph/policies_3d/checks_infra/base_parser.py +41 -0
  995. s1_cns_cli/s1graph/policies_3d/checks_parser.py +145 -0
  996. s1_cns_cli/s1graph/policies_3d/output.py +291 -0
  997. s1_cns_cli/s1graph/policies_3d/record.py +47 -0
  998. s1_cns_cli/s1graph/policies_3d/runner.py +318 -0
  999. s1_cns_cli/s1graph/policies_3d/syntax/__init__.py +0 -0
  1000. s1_cns_cli/s1graph/policies_3d/syntax/cves_syntax.py +46 -0
  1001. s1_cns_cli/s1graph/policies_3d/syntax/iac_syntax.py +35 -0
  1002. s1_cns_cli/s1graph/policies_3d/syntax/secrets_syntax.py +14 -0
  1003. s1_cns_cli/s1graph/policies_3d/syntax/syntax.py +56 -0
  1004. s1_cns_cli/s1graph/py.typed +0 -0
  1005. s1_cns_cli/s1graph/runner_filter.py +365 -0
  1006. s1_cns_cli/s1graph/sca_image/__init__.py +0 -0
  1007. s1_cns_cli/s1graph/sca_image/models.py +18 -0
  1008. s1_cns_cli/s1graph/sca_image/runner.py +345 -0
  1009. s1_cns_cli/s1graph/sca_package/__init__.py +0 -0
  1010. s1_cns_cli/s1graph/sca_package/output.py +360 -0
  1011. s1_cns_cli/s1graph/sca_package/runner.py +172 -0
  1012. s1_cns_cli/s1graph/sca_package/scanner.py +193 -0
  1013. s1_cns_cli/s1graph/sca_package_2/__init__.py +0 -0
  1014. s1_cns_cli/s1graph/sca_package_2/output.py +428 -0
  1015. s1_cns_cli/s1graph/sca_package_2/runner.py +183 -0
  1016. s1_cns_cli/s1graph/sca_package_2/scanner.py +104 -0
  1017. s1_cns_cli/s1graph/sca_package_2/suppression.py +124 -0
  1018. s1_cns_cli/s1graph/secrets/__init__.py +0 -0
  1019. s1_cns_cli/s1graph/secrets/consts.py +31 -0
  1020. s1_cns_cli/s1graph/secrets/coordinator.py +28 -0
  1021. s1_cns_cli/s1graph/secrets/git_history_store.py +177 -0
  1022. s1_cns_cli/s1graph/secrets/git_types.py +82 -0
  1023. s1_cns_cli/s1graph/secrets/parsers/__init__.py +0 -0
  1024. s1_cns_cli/s1graph/secrets/parsers/json/__init__.py +0 -0
  1025. s1_cns_cli/s1graph/secrets/parsers/json/multiline_parser.py +60 -0
  1026. s1_cns_cli/s1graph/secrets/parsers/multiline_parser.py +62 -0
  1027. s1_cns_cli/s1graph/secrets/parsers/single_line_parser.py +36 -0
  1028. s1_cns_cli/s1graph/secrets/parsers/terraform/__init__.py +0 -0
  1029. s1_cns_cli/s1graph/secrets/parsers/terraform/multiline_parser.py +37 -0
  1030. s1_cns_cli/s1graph/secrets/parsers/terraform/single_line_parser.py +28 -0
  1031. s1_cns_cli/s1graph/secrets/parsers/yaml/__init__.py +0 -0
  1032. s1_cns_cli/s1graph/secrets/parsers/yaml/multiline_parser.py +64 -0
  1033. s1_cns_cli/s1graph/secrets/plugins/__init__.py +0 -0
  1034. s1_cns_cli/s1graph/secrets/plugins/custom_regex_detector.py +160 -0
  1035. s1_cns_cli/s1graph/secrets/plugins/detector_utils.py +279 -0
  1036. s1_cns_cli/s1graph/secrets/plugins/entropy_keyword_combinator.py +234 -0
  1037. s1_cns_cli/s1graph/secrets/plugins/load_detectors.py +120 -0
  1038. s1_cns_cli/s1graph/secrets/runner.py +518 -0
  1039. s1_cns_cli/s1graph/secrets/scan_git_history.py +247 -0
  1040. s1_cns_cli/s1graph/secrets/utils.py +39 -0
  1041. s1_cns_cli/s1graph/serverless/__init__.py +1 -0
  1042. s1_cns_cli/s1graph/serverless/base_registry.py +36 -0
  1043. s1_cns_cli/s1graph/serverless/checks/__init__.py +7 -0
  1044. s1_cns_cli/s1graph/serverless/checks/base_function_check.py +4 -0
  1045. s1_cns_cli/s1graph/serverless/checks/complete/__init__.py +0 -0
  1046. s1_cns_cli/s1graph/serverless/checks/complete/base_complete_check.py +18 -0
  1047. s1_cns_cli/s1graph/serverless/checks/complete/registry.py +3 -0
  1048. s1_cns_cli/s1graph/serverless/checks/custom/__init__.py +0 -0
  1049. s1_cns_cli/s1graph/serverless/checks/custom/base_custom_check.py +18 -0
  1050. s1_cns_cli/s1graph/serverless/checks/custom/registry.py +3 -0
  1051. s1_cns_cli/s1graph/serverless/checks/function/__init__.py +1 -0
  1052. s1_cns_cli/s1graph/serverless/checks/function/aws/AWSCredentials.py +32 -0
  1053. s1_cns_cli/s1graph/serverless/checks/function/aws/AdminPolicyDocument.py +30 -0
  1054. s1_cns_cli/s1graph/serverless/checks/function/aws/StarActionPolicyDocument.py +33 -0
  1055. s1_cns_cli/s1graph/serverless/checks/function/aws/__init__.py +5 -0
  1056. s1_cns_cli/s1graph/serverless/checks/function/base_function_check.py +29 -0
  1057. s1_cns_cli/s1graph/serverless/checks/function/registry.py +3 -0
  1058. s1_cns_cli/s1graph/serverless/checks/layer/__init__.py +0 -0
  1059. s1_cns_cli/s1graph/serverless/checks/layer/base_layer_check.py +18 -0
  1060. s1_cns_cli/s1graph/serverless/checks/layer/registry.py +3 -0
  1061. s1_cns_cli/s1graph/serverless/checks/package/__init__.py +0 -0
  1062. s1_cns_cli/s1graph/serverless/checks/package/base_package_check.py +18 -0
  1063. s1_cns_cli/s1graph/serverless/checks/package/registry.py +3 -0
  1064. s1_cns_cli/s1graph/serverless/checks/plugin/__init__.py +0 -0
  1065. s1_cns_cli/s1graph/serverless/checks/plugin/base_plugin_check.py +19 -0
  1066. s1_cns_cli/s1graph/serverless/checks/plugin/registry.py +3 -0
  1067. s1_cns_cli/s1graph/serverless/checks/provider/__init__.py +0 -0
  1068. s1_cns_cli/s1graph/serverless/checks/provider/base_provider_check.py +18 -0
  1069. s1_cns_cli/s1graph/serverless/checks/provider/registry.py +3 -0
  1070. s1_cns_cli/s1graph/serverless/checks/service/__init__.py +0 -0
  1071. s1_cns_cli/s1graph/serverless/checks/service/base_service_check.py +18 -0
  1072. s1_cns_cli/s1graph/serverless/checks/service/registry.py +3 -0
  1073. s1_cns_cli/s1graph/serverless/parsers/__init__.py +0 -0
  1074. s1_cns_cli/s1graph/serverless/parsers/context_parser.py +75 -0
  1075. s1_cns_cli/s1graph/serverless/parsers/parser.py +343 -0
  1076. s1_cns_cli/s1graph/serverless/registry.py +4 -0
  1077. s1_cns_cli/s1graph/serverless/runner.py +299 -0
  1078. s1_cns_cli/s1graph/terraform/__init__.py +3 -0
  1079. s1_cns_cli/s1graph/terraform/checks/__init__.py +0 -0
  1080. s1_cns_cli/s1graph/terraform/checks/data/__init__.py +3 -0
  1081. s1_cns_cli/s1graph/terraform/checks/data/aws/AdminPolicyDocument.py +41 -0
  1082. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMCredentialsExposure.py +23 -0
  1083. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMDataExfiltration.py +21 -0
  1084. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMManagedAdminPolicy.py +40 -0
  1085. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPermissionsManagement.py +21 -0
  1086. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPrivilegeEscalation.py +21 -0
  1087. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPublicActionsPolicy.py +34 -0
  1088. s1_cns_cli/s1graph/terraform/checks/data/aws/IAMWriteAccess.py +21 -0
  1089. s1_cns_cli/s1graph/terraform/checks/data/aws/StarActionPolicyDocument.py +39 -0
  1090. s1_cns_cli/s1graph/terraform/checks/data/aws/__init__.py +4 -0
  1091. s1_cns_cli/s1graph/terraform/checks/data/base_check.py +47 -0
  1092. s1_cns_cli/s1graph/terraform/checks/data/base_cloudsplaining_data_iam_check.py +30 -0
  1093. s1_cns_cli/s1graph/terraform/checks/data/base_registry.py +12 -0
  1094. s1_cns_cli/s1graph/terraform/checks/data/external/__init__.py +4 -0
  1095. s1_cns_cli/s1graph/terraform/checks/data/gcp/GooglePolicyIsPrivate.py +37 -0
  1096. s1_cns_cli/s1graph/terraform/checks/data/gcp/__init__.py +4 -0
  1097. s1_cns_cli/s1graph/terraform/checks/data/registry.py +4 -0
  1098. s1_cns_cli/s1graph/terraform/checks/graph_checks/__init__.py +0 -0
  1099. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ALBProtectedByWAF.yaml +43 -0
  1100. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ALBRedirectsHTTPToHTTPS.yaml +82 -0
  1101. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AMRClustersNotOpenToInternet.yaml +23 -0
  1102. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGWLoggingLevelsDefinedProperly.yaml +37 -0
  1103. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGatewayEndpointsUsesCertificateForAuthentication.yaml +47 -0
  1104. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGatewayRequestParameterValidationEnabled.yaml +10 -0
  1105. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIProtectedByWAF.yaml +76 -0
  1106. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSConfigRecorderEnabled.yaml +29 -0
  1107. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSNATGatewaysshouldbeutilized.yaml +43 -0
  1108. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSSSMParameterShouldBeEncrypted.yaml +16 -0
  1109. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AppLoadBalancerTLS12.yaml +81 -0
  1110. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AppSyncProtectedByWAF.yaml +17 -0
  1111. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AutoScalingEnableOnDynamoDBTables.yaml +48 -0
  1112. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AutoScallingEnabledELB.yaml +48 -0
  1113. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CLoudFrontS3OriginConfigWithOAI.yaml +30 -0
  1114. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontHasCustomSSLCertificate.yaml +16 -0
  1115. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontHasResponseHeadersPolicy.yaml +19 -0
  1116. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontUsesSecureProtocolsForHTTPS.yaml +11 -0
  1117. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontWebACLConfiguredWIthLog4jVulnerability.yaml +30 -0
  1118. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudtrailHasCloudwatch.yaml +22 -0
  1119. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CodecommitApprovalRulesAttached.yaml +20 -0
  1120. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ConfigRecorderRecordsAllGlobalResources.yaml +11 -0
  1121. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/DMSEndpointHaveSSLConfigured.yaml +55 -0
  1122. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EBSAddedBackup.yaml +17 -0
  1123. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EC2InstanceHasIAMRoleAttached.yaml +10 -0
  1124. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EFSAddedBackup.yaml +18 -0
  1125. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EIPAllocatedToVPCAttachedEC2.yaml +104 -0
  1126. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EMRClusterHasSecurityConfiguration.yaml +10 -0
  1127. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ElastiCacheRedisConfiguredAutomaticFailOver.yaml +11 -0
  1128. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ElasticSearchDedicatedMasterEnabled.yaml +13 -0
  1129. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EncryptedEBSVolumeOnlyConnectedToEC2s.yaml +31 -0
  1130. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/GuardDutyIsEnabled.yaml +30 -0
  1131. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/HTTPNotSendingPasswords.yaml +38 -0
  1132. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMGroupHasAtLeastOneUser.yaml +29 -0
  1133. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMManagedIAMFullAccessPolicy.yaml +41 -0
  1134. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMPolicyNotAllowFullIAMAccess.yaml +51 -0
  1135. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMUserHasNoConsoleAccess.yaml +20 -0
  1136. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMUsersAreMembersAtLeastOneGroup.yaml +25 -0
  1137. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/NeptuneDeletionProtectionEnabled.yaml +11 -0
  1138. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/NetworkFirewallHasLogging.yaml +17 -0
  1139. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/OpenSearchDomainHasFineGrainedControl.yaml +20 -0
  1140. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/PostgresDBHasQueryLoggingEnabled.yaml +37 -0
  1141. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/PostgresRDSHasQueryLoggingEnabled.yaml +35 -0
  1142. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/RDSClusterHasBackupPlan.yaml +17 -0
  1143. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/RDSEnableCopyTagsToSnapshot.yaml +26 -0
  1144. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ARecordAttachedResource.yaml +57 -0
  1145. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ZoneEnableDNSSECSigning.yaml +18 -0
  1146. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ZoneHasMatchingQueryLog.yaml +17 -0
  1147. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketEncryption.yaml +51 -0
  1148. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketEventNotifications.yaml +17 -0
  1149. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketHasPublicAccessBlock.yaml +29 -0
  1150. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketLifecycle.yaml +23 -0
  1151. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketLogging.yaml +23 -0
  1152. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketReplicationConfiguration.yaml +30 -0
  1153. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketVersioning.yaml +30 -0
  1154. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3KMSEncryptedByDefault.yaml +30 -0
  1155. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3NotAllowAccessToAllAuthenticatedUsers.yaml +11 -0
  1156. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3PublicACLRead.yaml +114 -0
  1157. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3PublicACLWrite.yaml +99 -0
  1158. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SGAttachedToResource.yaml +55 -0
  1159. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SecretsAreRotated.yaml +17 -0
  1160. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SubnetHasACL.yaml +45 -0
  1161. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCHasFlowLog.yaml +19 -0
  1162. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCHasRestrictedSG.yaml +63 -0
  1163. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCPeeringRouteTableOverlyPermissive.yaml +66 -0
  1164. s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/WAF2HasLogs.yaml +18 -0
  1165. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AccessToPostgreSQLFromAzureServicesIsDisabled.yaml +37 -0
  1166. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/ApplicationGatewayEnablesWAF.yaml +32 -0
  1167. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureACR_HTTPSwebhook.yaml +12 -0
  1168. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAKSclusterAzureCNIEnabled.yaml +13 -0
  1169. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureActiveDirectoryAdminIsConfigured.yaml +18 -0
  1170. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAntimalwareIsConfiguredWithAutoUpdatesForVMs.yaml +35 -0
  1171. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAutomationAccNotOverlyPermissiveNetAccess.yaml +12 -0
  1172. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureConfigMSSQLwithAD.yaml +21 -0
  1173. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureContainerInstanceconfigManagedIdentity.yaml +17 -0
  1174. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureDataFactoriesEncryptedWithCustomerManagedKey.yaml +17 -0
  1175. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureKeyVaultConfigPrivateEndpoint.yaml +19 -0
  1176. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureMSSQLServerHasSecurityAlertPolicy.yaml +31 -0
  1177. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureNetworkInterfacePublicIPAddressId.yaml +18 -0
  1178. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzurePostgreSQLFlexServerNotOverlyPermissive.yaml +20 -0
  1179. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSpringCloudConfigWithVnet.yaml +19 -0
  1180. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSqlDbEnableTransparentDataEncryption.yaml +13 -0
  1181. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureStorageAccConfigWithPrivateEndpoint.yaml +31 -0
  1182. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureStorageAccountsUseCustomerManagedKeyForEncryption.yaml +23 -0
  1183. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSubnetConfigWithNSG.yaml +45 -0
  1184. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSynapseWorkspacesHaveNoIPFirewallRulesAttached.yaml +18 -0
  1185. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureUnattachedDisksAreEncrypted.yaml +43 -0
  1186. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/CognitiveServicesCustomerManagedKey.yaml +23 -0
  1187. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/DataExplorerEncryptionUsesCustomKey.yaml +19 -0
  1188. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/MSQLenablesCustomerManagedKey.yaml +24 -0
  1189. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/PGSQLenablesCustomerManagedKey.yaml +24 -0
  1190. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/SQLServerAuditingEnabled.yaml +36 -0
  1191. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/SQLServerAuditingRetention90Days.yaml +38 -0
  1192. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageContainerActivityLogsNotPublic.yaml +56 -0
  1193. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageCriticalDataEncryptedCMK.yaml +17 -0
  1194. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageLoggingIsEnabledForBlobService.yaml +37 -0
  1195. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageLoggingIsEnabledForTableService.yaml +28 -0
  1196. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAconfiguredToSendReports.yaml +52 -0
  1197. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAconfiguredToSendReportsToAdmins.yaml +51 -0
  1198. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAisEnabledInStorageAccount.yaml +25 -0
  1199. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAsetPeriodicScansOnSQL.yaml +43 -0
  1200. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VMHasBackUpMachine.yaml +19 -0
  1201. s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VirtualMachinesUtilizingManagedDisks.yaml +21 -0
  1202. s1_cns_cli/s1graph/terraform/checks/graph_checks/azuredevops/ADORepositoryHasMinTwoReviewers.yaml +26 -0
  1203. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/CloudFunctionSecureHTTPTrigger.yaml +11 -0
  1204. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/DisableAccessToSqlDBInstanceForRootUsersWithoutPassword.yaml +50 -0
  1205. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPAuditLogsConfiguredForAllServicesAndUsers.yaml +34 -0
  1206. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml +34 -0
  1207. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPContainerRegistryReposAreNotPubliclyAccessible.yaml +63 -0
  1208. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPKMSCryptoKeysAreNotPubliclyAccessible.yaml +64 -0
  1209. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPKMSKeyRingsAreNotPubliclyAccessible.yaml +63 -0
  1210. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPLogBucketsConfiguredUsingLock.yaml +38 -0
  1211. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPMySQLdbInstancePoint_In_TimeRecoveryBackupIsEnabled.yaml +19 -0
  1212. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPNetworkDoesNotUseDefaultFirewall.yaml +17 -0
  1213. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_durationIsSetToON.yaml +17 -0
  1214. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_executor_statsIsSetToOFF.yaml +22 -0
  1215. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_parser_statsIsSetToOFF.yaml +22 -0
  1216. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_planner_statsIsSetToOFF.yaml +22 -0
  1217. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_statement_statsIsSetToOFF.yaml +22 -0
  1218. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPProjectHasNoLegacyNetworks.yaml +39 -0
  1219. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPdisableAlphaClusterFeatureInKubernetesEngineClusters.yaml +11 -0
  1220. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCRContainerVulnerabilityScanningEnabled.yaml +11 -0
  1221. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GKEClustersAreNotUsingDefaultServiceAccount.yaml +24 -0
  1222. s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/ServiceAccountHasGCPmanagedKey.yaml +13 -0
  1223. s1_cns_cli/s1graph/terraform/checks/graph_checks/github/RepositoryHasBranchProtection.yaml +21 -0
  1224. s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/AccessControlGroupRuleDefine.yaml +17 -0
  1225. s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/AutoScalingEnabledLB.yaml +36 -0
  1226. s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/RouteTablePublicSubnetConnection.yaml +35 -0
  1227. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/AdministratorUserNotAssociatedWithAPIKey.yaml +62 -0
  1228. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_K8EngineClusterBootVolConfigInTransitEncryption.yaml +17 -0
  1229. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_K8EngineClusterPodSecPolicyEnforced.yaml +17 -0
  1230. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_KubernetesEngineClusterEndpointConfigWithNSG.yaml +28 -0
  1231. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_NFSaccessRestrictedToRootUsers.yaml +27 -0
  1232. s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_NSGNotAllowRDP.yaml +68 -0
  1233. s1_cns_cli/s1graph/terraform/checks/module/__init__.py +0 -0
  1234. s1_cns_cli/s1graph/terraform/checks/module/base_module_check.py +39 -0
  1235. s1_cns_cli/s1graph/terraform/checks/module/base_registry.py +9 -0
  1236. s1_cns_cli/s1graph/terraform/checks/module/registry.py +4 -0
  1237. s1_cns_cli/s1graph/terraform/checks/provider/__init__.py +6 -0
  1238. s1_cns_cli/s1graph/terraform/checks/provider/aws/__init__.py +5 -0
  1239. s1_cns_cli/s1graph/terraform/checks/provider/aws/credentials.py +37 -0
  1240. s1_cns_cli/s1graph/terraform/checks/provider/base_check.py +35 -0
  1241. s1_cns_cli/s1graph/terraform/checks/provider/base_registry.py +11 -0
  1242. s1_cns_cli/s1graph/terraform/checks/provider/linode/__init__.py +4 -0
  1243. s1_cns_cli/s1graph/terraform/checks/provider/linode/credentials.py +31 -0
  1244. s1_cns_cli/s1graph/terraform/checks/provider/ncp/__init__.py +5 -0
  1245. s1_cns_cli/s1graph/terraform/checks/provider/ncp/credentials.py +37 -0
  1246. s1_cns_cli/s1graph/terraform/checks/provider/oci/__init__.py +5 -0
  1247. s1_cns_cli/s1graph/terraform/checks/provider/oci/credentials.py +27 -0
  1248. s1_cns_cli/s1graph/terraform/checks/provider/openstack/__init__.py +5 -0
  1249. s1_cns_cli/s1graph/terraform/checks/provider/openstack/credentials.py +32 -0
  1250. s1_cns_cli/s1graph/terraform/checks/provider/panos/__init__.py +4 -0
  1251. s1_cns_cli/s1graph/terraform/checks/provider/panos/credentials.py +38 -0
  1252. s1_cns_cli/s1graph/terraform/checks/provider/registry.py +4 -0
  1253. s1_cns_cli/s1graph/terraform/checks/provider/s1cns/__init__.py +5 -0
  1254. s1_cns_cli/s1graph/terraform/checks/provider/s1cns/credentials.py +31 -0
  1255. s1_cns_cli/s1graph/terraform/checks/resource/__init__.py +14 -0
  1256. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ALBACLIsUnrestricted.py +20 -0
  1257. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/APIGatewayProtocolHTTPS.py +25 -0
  1258. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/AbsRDSParameter.py +27 -0
  1259. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/AbsSecurityGroupUnrestrictedIngress.py +58 -0
  1260. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ActionTrailLogAllEvents.py +27 -0
  1261. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ActionTrailLogAllRegions.py +27 -0
  1262. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/DiskEncryptedWithCMK.py +27 -0
  1263. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/DiskIsEncrypted.py +21 -0
  1264. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/K8sEnableNetworkPolicies.py +60 -0
  1265. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/K8sNodePoolAutoRepair.py +23 -0
  1266. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/KMSKeyIsEnabled.py +22 -0
  1267. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/KMSKeyRotationIsEnabled.py +22 -0
  1268. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/LaunchTemplateDisksAreEncrypted.py +22 -0
  1269. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/LogAuditRDSEnabled.py +17 -0
  1270. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBInsideVPC.py +21 -0
  1271. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBInstanceSSL.py +21 -0
  1272. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBIsPublic.py +23 -0
  1273. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBTransparentDataEncryptionEnabled.py +21 -0
  1274. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketAccessLogs.py +23 -0
  1275. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketEncryptedWithCMK.py +21 -0
  1276. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketPublic.py +20 -0
  1277. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketTransferAcceleration.py +17 -0
  1278. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketVersioning.py +20 -0
  1279. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyExpiration.py +38 -0
  1280. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyLength.py +38 -0
  1281. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyLowercaseLetter.py +17 -0
  1282. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyMaxLogin.py +40 -0
  1283. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyNumber.py +17 -0
  1284. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyReuse.py +38 -0
  1285. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicySymbol.py +17 -0
  1286. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyUppcaseLetter.py +17 -0
  1287. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMSecurityEnforceMFA.py +23 -0
  1288. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceAutoUpgrade.py +21 -0
  1289. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogConnections.py +9 -0
  1290. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogDisconnections.py +9 -0
  1291. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogsEnabled.py +9 -0
  1292. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceSSL.py +21 -0
  1293. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSIsPublic.py +23 -0
  1294. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSRetention.py +36 -0
  1295. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSTransparentDataEncryptionEnabled.py +39 -0
  1296. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/SecurityGroupUnrestrictedIngress22.py +9 -0
  1297. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/SecurityGroupUnrestrictedIngress3389.py +9 -0
  1298. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/TLSPoliciesAreSecure.py +20 -0
  1299. s1_cns_cli/s1graph/terraform/checks/resource/alicloud/__init__.py +5 -0
  1300. s1_cns_cli/s1graph/terraform/checks/resource/aws/ACMCertCreateBeforeDestroy.py +22 -0
  1301. s1_cns_cli/s1graph/terraform/checks/resource/aws/ACMCertSetLoggingPreference.py +30 -0
  1302. s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBDesyncMode.py +24 -0
  1303. s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBDropHttpHeaders.py +22 -0
  1304. s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBListenerHTTPS.py +40 -0
  1305. s1_cns_cli/s1graph/terraform/checks/resource/aws/AMICopyIsEncrypted.py +18 -0
  1306. s1_cns_cli/s1graph/terraform/checks/resource/aws/AMICopyUsesCMK.py +21 -0
  1307. s1_cns_cli/s1graph/terraform/checks/resource/aws/AMIEncryption.py +26 -0
  1308. s1_cns_cli/s1graph/terraform/checks/resource/aws/AMILaunchIsShared.py +17 -0
  1309. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayAccessLogging.py +22 -0
  1310. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayAuthorization.py +25 -0
  1311. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayCacheEnable.py +18 -0
  1312. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayCreateBeforeDestroy.py +22 -0
  1313. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayDeploymentCreateBeforeDestroy.py +24 -0
  1314. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayDomainNameTLS.py +26 -0
  1315. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEnabled.py +18 -0
  1316. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEncrypted.py +22 -0
  1317. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsDataTrace.py +20 -0
  1318. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayV2RouteDefinesAuthorizationType.py +25 -0
  1319. s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayXray.py +18 -0
  1320. s1_cns_cli/s1graph/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py +111 -0
  1321. s1_cns_cli/s1graph/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py +114 -0
  1322. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppFlowConnectorProfileUsesCMK.py +21 -0
  1323. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppFlowUsesCMK.py +21 -0
  1324. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppSyncFieldLevelLogs.py +22 -0
  1325. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppSyncLogging.py +23 -0
  1326. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppsyncAPICacheEncryptionAtRest.py +18 -0
  1327. s1_cns_cli/s1graph/terraform/checks/resource/aws/AppsyncAPICacheEncryptionInTransit.py +18 -0
  1328. s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaDatabaseEncryption.py +21 -0
  1329. s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaWorkgroupConfiguration.py +19 -0
  1330. s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaWorkgroupEncryption.py +23 -0
  1331. s1_cns_cli/s1graph/terraform/checks/resource/aws/AuroraEncryption.py +26 -0
  1332. s1_cns_cli/s1graph/terraform/checks/resource/aws/AutoScalingLaunchTemplate.py +27 -0
  1333. s1_cns_cli/s1graph/terraform/checks/resource/aws/AutoScalingTagging.py +26 -0
  1334. s1_cns_cli/s1graph/terraform/checks/resource/aws/BackupVaultEncrypted.py +23 -0
  1335. s1_cns_cli/s1graph/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py +36 -0
  1336. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudFrontResponseHeaderStrictTransportSecurity.py +61 -0
  1337. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchAlarmsEnabled.py +25 -0
  1338. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupKMSKey.py +21 -0
  1339. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupRetention.py +21 -0
  1340. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py +36 -0
  1341. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudformationStackNotificationArns.py +21 -0
  1342. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionDefaultRoot.py +26 -0
  1343. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionEnabled.py +17 -0
  1344. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionEncryption.py +36 -0
  1345. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionLogging.py +22 -0
  1346. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionOriginFailover.py +32 -0
  1347. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontTLS12.py +25 -0
  1348. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudsearchDomainEnforceHttps.py +25 -0
  1349. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudsearchDomainTLS.py +26 -0
  1350. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailDefinesSNSTopic.py +37 -0
  1351. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEnableLogging.py +18 -0
  1352. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEncryptionWithCMK.py +27 -0
  1353. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEventDataStoreUsesCMK.py +21 -0
  1354. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailLogValidation.py +17 -0
  1355. s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailMultiRegion.py +17 -0
  1356. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeArtifactDomainEncryptedWithCMK.py +24 -0
  1357. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeBuildPrivilegedMode.py +25 -0
  1358. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeBuildProjectEncryption.py +30 -0
  1359. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodePipelineArtifactsEncrypted.py +23 -0
  1360. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildHasLogs.py +34 -0
  1361. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildS3LogsEncrypted.py +24 -0
  1362. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildUsesCMK.py +36 -0
  1363. s1_cns_cli/s1graph/terraform/checks/resource/aws/CodecommitApprovalsRulesRequireMin2.py +30 -0
  1364. s1_cns_cli/s1graph/terraform/checks/resource/aws/ComprehendEntityRecognizerModelUsesCMK.py +21 -0
  1365. s1_cns_cli/s1graph/terraform/checks/resource/aws/ComprehendEntityRecognizerVolumeUsesCMK.py +25 -0
  1366. s1_cns_cli/s1graph/terraform/checks/resource/aws/ConfigConfgurationAggregatorAllRegions.py +36 -0
  1367. s1_cns_cli/s1graph/terraform/checks/resource/aws/ConnectInstanceKinesisVideoStreamStorageConfigUsesCMK.py +21 -0
  1368. s1_cns_cli/s1graph/terraform/checks/resource/aws/ConnectInstanceS3StorageConfigUsesCMK.py +23 -0
  1369. s1_cns_cli/s1graph/terraform/checks/resource/aws/DAXEncryption.py +17 -0
  1370. s1_cns_cli/s1graph/terraform/checks/resource/aws/DAXEndpointTLS.py +20 -0
  1371. s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceBackupRetentionPeriod.py +34 -0
  1372. s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceLogging.py +29 -0
  1373. s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceMinorUpgrade.py +17 -0
  1374. s1_cns_cli/s1graph/terraform/checks/resource/aws/DBSnapshotCopyUsesCMK.py +21 -0
  1375. s1_cns_cli/s1graph/terraform/checks/resource/aws/DBSnapshotsArePrivate.py +22 -0
  1376. s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py +32 -0
  1377. s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py +32 -0
  1378. s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py +30 -0
  1379. s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryptionWithCMK.py +32 -0
  1380. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSEndpointUsesCMK.py +37 -0
  1381. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstanceEncryptedWithCMK.py +21 -0
  1382. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstanceMinorUpgrade.py +17 -0
  1383. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py +20 -0
  1384. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py +24 -0
  1385. s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSS3UsesCMK.py +25 -0
  1386. s1_cns_cli/s1graph/terraform/checks/resource/aws/DatasyncLocationExposesSecrets.py +25 -0
  1387. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBAuditLogs.py +23 -0
  1388. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBEncryptedWithCMK.py +21 -0
  1389. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBEncryption.py +17 -0
  1390. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBGlobalClusterEncryption.py +17 -0
  1391. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBLogging.py +25 -0
  1392. s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBTLS.py +23 -0
  1393. s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBGlobalTableRecovery.py +21 -0
  1394. s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBTableReplicaKMSUsesCMK.py +23 -0
  1395. s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBTablesEncrypted.py +29 -0
  1396. s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamodbRecovery.py +20 -0
  1397. s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSDefaultEncryption.py +23 -0
  1398. s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSEncryption.py +17 -0
  1399. s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSSnapshotCopyEncryptedWithCMK.py +21 -0
  1400. s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSVolumeEncryptedWithCMK.py +21 -0
  1401. s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2Credentials.py +28 -0
  1402. s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2DetailedMonitoringEnabled.py +21 -0
  1403. s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2EBSOptimized.py +17 -0
  1404. s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2PublicIP.py +32 -0
  1405. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRImageScanning.py +17 -0
  1406. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRImmutableTags.py +22 -0
  1407. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRPolicy.py +62 -0
  1408. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRRepositoryEncrypted.py +20 -0
  1409. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterContainerInsights.py +23 -0
  1410. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterLoggingEnabled.py +26 -0
  1411. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py +39 -0
  1412. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerHostProcess.py +41 -0
  1413. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerPrivilege.py +42 -0
  1414. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerReadOnlyRoot.py +45 -0
  1415. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSServiceFargateLatest.py +37 -0
  1416. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSServicePublicIP.py +33 -0
  1417. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py +27 -0
  1418. s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSTaskDefinitionRoleCheck.py +30 -0
  1419. s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSAccessPointRoot.py +25 -0
  1420. s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSAccessUserIdentity.py +26 -0
  1421. s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSEncryptionEnabled.py +17 -0
  1422. s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSFileSystemEncryptedWithCMK.py +21 -0
  1423. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSControlPlaneLogging.py +32 -0
  1424. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSNodeGroupRemoteAccess.py +25 -0
  1425. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPlatformVersion.py +30 -0
  1426. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPublicAccess.py +22 -0
  1427. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPublicAccessCIDR.py +34 -0
  1428. s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSSecretsEncryption.py +20 -0
  1429. s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBAccessLogs.py +28 -0
  1430. s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBCrossZoneEnable.py +19 -0
  1431. s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBPolicyUsesSecureProtocols.py +29 -0
  1432. s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBUsesSSL.py +23 -0
  1433. s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBv2AccessLogs.py +22 -0
  1434. s1_cns_cli/s1graph/terraform/checks/resource/aws/EMRClusterIsEncryptedKMS.py +27 -0
  1435. s1_cns_cli/s1graph/terraform/checks/resource/aws/EMRClusterKerberosAttributes.py +27 -0
  1436. s1_cns_cli/s1graph/terraform/checks/resource/aws/Ec2TransitGatewayAutoAccept.py +25 -0
  1437. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElastiCacheHasCustomSubnet.py +28 -0
  1438. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py +30 -0
  1439. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticCacheAutomaticBackup.py +32 -0
  1440. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticCacheAutomaticMinorUpgrades.py +33 -0
  1441. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheHasSecurityGroup.py +19 -0
  1442. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptedWithCMK.py +21 -0
  1443. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py +17 -0
  1444. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py +17 -0
  1445. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransitAuthToken.py +30 -0
  1446. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDefaultSG.py +26 -0
  1447. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py +31 -0
  1448. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainEnforceHTTPS.py +19 -0
  1449. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainHA.py +38 -0
  1450. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainLogging.py +33 -0
  1451. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchEncryption.py +17 -0
  1452. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchEncryptionWithCMK.py +21 -0
  1453. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchInVPC.py +22 -0
  1454. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py +51 -0
  1455. s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchTLSPolicy.py +25 -0
  1456. s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXOntapFSEncryptedWithCMK.py +21 -0
  1457. s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXOpenZFSFileSystemEncryptedWithCMK.py +21 -0
  1458. s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXWindowsFSEncryptedWithCMK.py +21 -0
  1459. s1_cns_cli/s1graph/terraform/checks/resource/aws/GlacierVaultAnyPrincipal.py +44 -0
  1460. s1_cns_cli/s1graph/terraform/checks/resource/aws/GlobalAcceleratorAcceleratorFlowLogs.py +17 -0
  1461. s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueDataCatalogEncryption.py +53 -0
  1462. s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueSecurityConfiguration.py +55 -0
  1463. s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueSecurityConfigurationEnabled.py +23 -0
  1464. s1_cns_cli/s1graph/terraform/checks/resource/aws/GuarddutyDetectorEnabled.py +19 -0
  1465. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMAdminPolicyDocument.py +50 -0
  1466. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMCredentialsExposure.py +23 -0
  1467. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMDataExfiltration.py +21 -0
  1468. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMManagedAdminPolicy.py +61 -0
  1469. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPermissionsManagement.py +21 -0
  1470. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPolicyAttachedToGroupOrRoles.py +29 -0
  1471. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPrivilegeEscalation.py +22 -0
  1472. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py +46 -0
  1473. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py +38 -0
  1474. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py +56 -0
  1475. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMUserNotUsedForAccess.py +21 -0
  1476. s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMWriteAccess.py +15 -0
  1477. s1_cns_cli/s1graph/terraform/checks/resource/aws/IMDSv1Disabled.py +45 -0
  1478. s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderComponentEncryptedWithCMK.py +21 -0
  1479. s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderDistributionConfigurationEncryptedWithCMK.py +22 -0
  1480. s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderImageRecipeEBSEncrypted.py +29 -0
  1481. s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSKeyIsEnabled.py +18 -0
  1482. s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py +42 -0
  1483. s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSRotation.py +25 -0
  1484. s1_cns_cli/s1graph/terraform/checks/resource/aws/KendraIndexSSEUsesCMK.py +21 -0
  1485. s1_cns_cli/s1graph/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py +25 -0
  1486. s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisFirehoseDeliveryStreamSSE.py +28 -0
  1487. s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisFirehoseDeliveryStreamUsesCMK.py +38 -0
  1488. s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisStreamEncryptedWithCMK.py +21 -0
  1489. s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisStreamEncryptionType.py +20 -0
  1490. s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisVideoEncryptedWithCMK.py +21 -0
  1491. s1_cns_cli/s1graph/terraform/checks/resource/aws/LBCrossZone.py +24 -0
  1492. s1_cns_cli/s1graph/terraform/checks/resource/aws/LBDeletionProtection.py +17 -0
  1493. s1_cns_cli/s1graph/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py +36 -0
  1494. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py +21 -0
  1495. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaDLQConfigured.py +21 -0
  1496. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaEnvironmentCredentials.py +41 -0
  1497. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaEnvironmentEncryptionSettings.py +40 -0
  1498. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionIsNotPublic.py +36 -0
  1499. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py +29 -0
  1500. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionURLAuth.py +21 -0
  1501. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaInVPC.py +23 -0
  1502. s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaXrayEnabled.py +23 -0
  1503. s1_cns_cli/s1graph/terraform/checks/resource/aws/LaunchConfigurationEBSEncryption.py +50 -0
  1504. s1_cns_cli/s1graph/terraform/checks/resource/aws/LustreFSEncryptedWithCMK.py +21 -0
  1505. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerAuditLogging.py +28 -0
  1506. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerEncryptedWithCMK.py +21 -0
  1507. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerLogging.py +17 -0
  1508. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerMinorAutoUpgrade.py +17 -0
  1509. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerNotPubliclyExposed.py +31 -0
  1510. s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerVersion.py +36 -0
  1511. s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterEncryption.py +33 -0
  1512. s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterLogging.py +24 -0
  1513. s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterNodesArePrivate.py +24 -0
  1514. s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAASchedulerLogsEnabled.py +22 -0
  1515. s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAAWebserverLogsEnabled.py +17 -0
  1516. s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAAWorkerLogsEnabled.py +18 -0
  1517. s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBClusterIntransitEncryption.py +24 -0
  1518. s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBEncryptionWithCMK.py +21 -0
  1519. s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBSnapshotEncryptionWithCMK.py +23 -0
  1520. s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterInstancePublic.py +21 -0
  1521. s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterLogging.py +25 -0
  1522. s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterSnapshotEncrypted.py +17 -0
  1523. s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterSnapshotEncryptedWithCMK.py +23 -0
  1524. s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterStorageEncrypted.py +17 -0
  1525. s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress20.py +9 -0
  1526. s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress21.py +9 -0
  1527. s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress22.py +9 -0
  1528. s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress3389.py +9 -0
  1529. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyExpiration.py +38 -0
  1530. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyLength.py +38 -0
  1531. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyLowercaseLetter.py +17 -0
  1532. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyNumber.py +17 -0
  1533. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyReuse.py +38 -0
  1534. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicySymbol.py +17 -0
  1535. s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyUppercaseLetter.py +17 -0
  1536. s1_cns_cli/s1graph/terraform/checks/resource/aws/QLDBLedgerDeletionProtection.py +18 -0
  1537. s1_cns_cli/s1graph/terraform/checks/resource/aws/QLDBLedgerPermissionsMode.py +20 -0
  1538. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSCACertIsRecent.py +27 -0
  1539. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterActivityStreamEncryptedWithCMK.py +27 -0
  1540. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterAuditLogging.py +48 -0
  1541. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterAuroraBacktrack.py +43 -0
  1542. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterCopyTags.py +21 -0
  1543. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterEncrypted.py +33 -0
  1544. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterEncryptedWithCMK.py +21 -0
  1545. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterIAMAuthentication.py +17 -0
  1546. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterLogging.py +30 -0
  1547. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterSnapshotEncrypted.py +17 -0
  1548. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSDeletionProtection.py +18 -0
  1549. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSEncryption.py +17 -0
  1550. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSEnhancedMonitorEnabled.py +24 -0
  1551. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSHasSecurityGroup.py +19 -0
  1552. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSIAMAuthentication.py +26 -0
  1553. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSInstanceAutoBackupEncryptionWithCMK.py +27 -0
  1554. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSInstanceDeletionProtection.py +18 -0
  1555. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSMultiAZEnabled.py +18 -0
  1556. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py +87 -0
  1557. s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSPubliclyAccessible.py +20 -0
  1558. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedShiftSSL.py +31 -0
  1559. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterAllowVersionUpgrade.py +19 -0
  1560. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterDatabaseName.py +27 -0
  1561. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterEncryptedWithCMK.py +21 -0
  1562. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterEncryption.py +17 -0
  1563. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterKMSKey.py +21 -0
  1564. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterLogging.py +17 -0
  1565. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterSnapshotCopyGrantEncryptedWithCMK.py +23 -0
  1566. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterUseEnhancedVPCRouting.py +24 -0
  1567. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftInEc2ClassicMode.py +21 -0
  1568. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftServerlessNamespaceKMSKey.py +23 -0
  1569. s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshitClusterPubliclyAvailable.py +20 -0
  1570. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3AbortIncompleteUploads.py +38 -0
  1571. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3AllowsAnyPrincipal.py +52 -0
  1572. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BlockPublicACLs.py +17 -0
  1573. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BlockPublicPolicy.py +17 -0
  1574. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BucketObjectEncryptedWithCMK.py +21 -0
  1575. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BucketObjectLock.py +29 -0
  1576. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3IgnorePublicACLs.py +17 -0
  1577. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py +21 -0
  1578. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py +53 -0
  1579. s1_cns_cli/s1graph/terraform/checks/resource/aws/S3RestrictPublicBuckets.py +17 -0
  1580. s1_cns_cli/s1graph/terraform/checks/resource/aws/SNSTopicEncryption.py +23 -0
  1581. s1_cns_cli/s1graph/terraform/checks/resource/aws/SNSTopicPolicyAnyPrincipal.py +38 -0
  1582. s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSPolicy.py +35 -0
  1583. s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSQueueEncryption.py +28 -0
  1584. s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSQueuePolicyAnyPrincipal.py +38 -0
  1585. s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMDocumentsArePrivate.py +28 -0
  1586. s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMParameterUsesCMK.py +23 -0
  1587. s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py +43 -0
  1588. s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMSessionManagerDocumentLogging.py +47 -0
  1589. s1_cns_cli/s1graph/terraform/checks/resource/aws/SageMakerInternetAccessDisabled.py +21 -0
  1590. s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerDomainEncryptedWithCMK.py +21 -0
  1591. s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerEndpointConfigurationEncryption.py +22 -0
  1592. s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookEncryption.py +21 -0
  1593. s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookInCustomVPC.py +27 -0
  1594. s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookRoot.py +26 -0
  1595. s1_cns_cli/s1graph/terraform/checks/resource/aws/SchedulerScheduleUsesCMK.py +23 -0
  1596. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecretManagerSecret90days.py +25 -0
  1597. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecretManagerSecretEncrypted.py +29 -0
  1598. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupRuleDescription.py +56 -0
  1599. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress22.py +9 -0
  1600. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress3389.py +9 -0
  1601. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress80.py +9 -0
  1602. s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngressAny.py +10 -0
  1603. s1_cns_cli/s1graph/terraform/checks/resource/aws/StateMachineLoggingExecutionHistory.py +18 -0
  1604. s1_cns_cli/s1graph/terraform/checks/resource/aws/StateMachineXray.py +18 -0
  1605. s1_cns_cli/s1graph/terraform/checks/resource/aws/SubnetPublicIP.py +20 -0
  1606. s1_cns_cli/s1graph/terraform/checks/resource/aws/TimestreamDatabaseKMSKey.py +23 -0
  1607. s1_cns_cli/s1graph/terraform/checks/resource/aws/TransferServerIsPublic.py +24 -0
  1608. s1_cns_cli/s1graph/terraform/checks/resource/aws/VPCDefaultNetwork.py +27 -0
  1609. s1_cns_cli/s1graph/terraform/checks/resource/aws/VPCEndpointAcceptanceConfigured.py +17 -0
  1610. s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFACLCVE202144228.py +58 -0
  1611. s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFEnabled.py +23 -0
  1612. s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFHasAnyRules.py +21 -0
  1613. s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFHasLogs.py +23 -0
  1614. s1_cns_cli/s1graph/terraform/checks/resource/aws/WorkspaceRootVolumeEncrypted.py +20 -0
  1615. s1_cns_cli/s1graph/terraform/checks/resource/aws/WorkspaceUserVolumeEncrypted.py +20 -0
  1616. s1_cns_cli/s1graph/terraform/checks/resource/aws/__init__.py +5 -0
  1617. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRAdminAccountDisabled.py +21 -0
  1618. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRAnonymousPullDisabled.py +33 -0
  1619. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRContainerScanEnabled.py +33 -0
  1620. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACREnableImageQuarantine.py +17 -0
  1621. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACREnableRetentionPolicy.py +17 -0
  1622. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRGeoreplicated.py +29 -0
  1623. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRPublicNetworkAccessDisabled.py +20 -0
  1624. s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRUseSignedImages.py +23 -0
  1625. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSApiServerAuthorizedIpRanges.py +32 -0
  1626. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSDashboardDisabled.py +28 -0
  1627. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSEnablesPrivateClusters.py +17 -0
  1628. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSIsPaidSku.py +26 -0
  1629. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSLocalAdminDisabled.py +20 -0
  1630. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSLoggingEnabled.py +31 -0
  1631. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSMaxPodsMinimum.py +38 -0
  1632. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSNetworkPolicy.py +21 -0
  1633. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSNodePublicIpDisabled.py +21 -0
  1634. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSPoolTypeIsScaleSet.py +24 -0
  1635. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSRbacEnabled.py +32 -0
  1636. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSSecretStoreRotation.py +17 -0
  1637. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUpgradeChannel.py +30 -0
  1638. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py +33 -0
  1639. s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUsesDiskEncryptionSet.py +22 -0
  1640. s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementBackendHTTPS.py +29 -0
  1641. s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementCertsEnforced.py +24 -0
  1642. s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementMinTLS12.py +38 -0
  1643. s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementPublicAccess.py +30 -0
  1644. s1_cns_cli/s1graph/terraform/checks/resource/azure/APIServicesUseVirtualNetwork.py +21 -0
  1645. s1_cns_cli/s1graph/terraform/checks/resource/azure/ActiveDirectoryUsedAuthenticationServiceFabric.py +21 -0
  1646. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigEncryption.py +23 -0
  1647. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigLocalAuth.py +28 -0
  1648. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigPublicAccess.py +21 -0
  1649. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigPurgeProtection.py +19 -0
  1650. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigSku.py +22 -0
  1651. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppGWUseWAFMode.py +26 -0
  1652. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppGatewayWAFACLCVE202144228.py +45 -0
  1653. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceAlwaysOn.py +25 -0
  1654. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceAuthentication.py +34 -0
  1655. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceClientCertificate.py +21 -0
  1656. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDetailedErrorMessagesEnabled.py +21 -0
  1657. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDisallowCORS.py +21 -0
  1658. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py +21 -0
  1659. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceEnableFailedRequest.py +20 -0
  1660. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceFTPSState.py +23 -0
  1661. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHTTPSOnly.py +17 -0
  1662. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHttpLoggingEnabled.py +21 -0
  1663. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHttps20Enabled.py +17 -0
  1664. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceIdentity.py +21 -0
  1665. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceIdentityProviderEnabled.py +21 -0
  1666. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceInstanceMinimum.py +31 -0
  1667. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceJavaVersion.py +21 -0
  1668. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceMinTLSVersion.py +24 -0
  1669. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServicePHPVersion.py +21 -0
  1670. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServicePythonVersion.py +21 -0
  1671. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceRemoteDebuggingNotEnabled.py +23 -0
  1672. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSetHealthCheck.py +27 -0
  1673. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSkuMinimum.py +30 -0
  1674. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotDebugDisabled.py +21 -0
  1675. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotHTTPSOnly.py +17 -0
  1676. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotMinTLS.py +21 -0
  1677. s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceUsedAzureFiles.py +20 -0
  1678. s1_cns_cli/s1graph/terraform/checks/resource/azure/AutomationEncrypted.py +22 -0
  1679. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureBatchAccountUsesKeyVaultEncryption.py +21 -0
  1680. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureContainerGroupDeployedIntoVirtualNetwork.py +25 -0
  1681. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDataExplorerDoubleEncryptionEnabled.py +20 -0
  1682. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnAppServices.py +28 -0
  1683. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnContainerRegistry.py +28 -0
  1684. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnKeyVaults.py +28 -0
  1685. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnKubernetes.py +28 -0
  1686. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnServers.py +28 -0
  1687. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnSqlServerVMS.py +27 -0
  1688. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnSqlServers.py +28 -0
  1689. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnStorage.py +28 -0
  1690. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py +21 -0
  1691. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureInstanceExtensions.py +22 -0
  1692. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureInstancePassword.py +37 -0
  1693. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureManagedDiskEncryption.py +27 -0
  1694. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureManagedDiskEncryptionSet.py +22 -0
  1695. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureScaleSetPassword.py +17 -0
  1696. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchAllowedIPsNotGlobal.py +25 -0
  1697. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchManagedIdentity.py +28 -0
  1698. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchPublicNetworkAccessDisabled.py +20 -0
  1699. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchSLAIndex.py +37 -0
  1700. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchSLAQueryUpdates.py +36 -0
  1701. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServiceFabricClusterProtectionLevel.py +30 -0
  1702. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusDoubleEncryptionEnabled.py +22 -0
  1703. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusHasCMK.py +23 -0
  1704. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusIdentityProviderEnabled.py +23 -0
  1705. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusLocalAuthDisabled.py +29 -0
  1706. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusMinTLSVersion.py +22 -0
  1707. s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusPublicAccessDisabled.py +25 -0
  1708. s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNDisableHttpEndpoints.py +31 -0
  1709. s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNEnableHttpsEndpoints.py +32 -0
  1710. s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNTLSProtocol12.py +38 -0
  1711. s1_cns_cli/s1graph/terraform/checks/resource/azure/CognitiveServicesDisablesPublicNetwork.py +20 -0
  1712. s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBAccountsRestrictedAccess.py +28 -0
  1713. s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBDisableAccessKeyWrite.py +22 -0
  1714. s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBDisablesPublicNetwork.py +20 -0
  1715. s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBHaveCMK.py +21 -0
  1716. s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBLocalAuthDisabled.py +36 -0
  1717. s1_cns_cli/s1graph/terraform/checks/resource/azure/CutsomRoleDefinitionSubscriptionOwner.py +24 -0
  1718. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerSKUHasSLA.py +33 -0
  1719. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerServiceIdentity.py +23 -0
  1720. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerUsesDiskEncryption.py +17 -0
  1721. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataFactoryNoPublicNetworkAccess.py +22 -0
  1722. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataFactoryUsesGitRepository.py +28 -0
  1723. s1_cns_cli/s1graph/terraform/checks/resource/azure/DataLakeStoreEncryption.py +20 -0
  1724. s1_cns_cli/s1graph/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py +22 -0
  1725. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainIdentityProviderEnabled.py +23 -0
  1726. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainLocalAuthentication.py +22 -0
  1727. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainNetworkAccess.py +20 -0
  1728. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicIdentityProviderEnabled.py +23 -0
  1729. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicLocalAuthentication.py +22 -0
  1730. s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicNetworkAccess.py +22 -0
  1731. s1_cns_cli/s1graph/terraform/checks/resource/azure/FrontDoorWAFACLCVE202144228.py +48 -0
  1732. s1_cns_cli/s1graph/terraform/checks/resource/azure/FrontdoorUseWAFMode.py +26 -0
  1733. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppDisallowCORS.py +20 -0
  1734. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppEnableLogging.py +18 -0
  1735. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppHttpVersionLatest.py +17 -0
  1736. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py +24 -0
  1737. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py +17 -0
  1738. s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppsEnableAuthentication.py +18 -0
  1739. s1_cns_cli/s1graph/terraform/checks/resource/azure/IoTNoPublicNetworkAccess.py +21 -0
  1740. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyBackedByHSM.py +23 -0
  1741. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyExpirationDate.py +21 -0
  1742. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultDisablesPublicNetworkAccess.py +45 -0
  1743. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesFirewallRulesSettings.py +20 -0
  1744. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesPurgeProtection.py +17 -0
  1745. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesSoftDelete.py +19 -0
  1746. s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyvaultRecoveryEnabled.py +24 -0
  1747. s1_cns_cli/s1graph/terraform/checks/resource/azure/LinuxVMUsesSSH.py +25 -0
  1748. s1_cns_cli/s1graph/terraform/checks/resource/azure/MLCCLADisabled.py +29 -0
  1749. s1_cns_cli/s1graph/terraform/checks/resource/azure/MLComputeClusterMinNodes.py +20 -0
  1750. s1_cns_cli/s1graph/terraform/checks/resource/azure/MLPublicAccess.py +32 -0
  1751. s1_cns_cli/s1graph/terraform/checks/resource/azure/MSSQLServerAuditPolicyLogMonitor.py +18 -0
  1752. s1_cns_cli/s1graph/terraform/checks/resource/azure/MSSQLServerMinTLSVersion.py +20 -0
  1753. s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBGeoBackupEnabled.py +17 -0
  1754. s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBPublicAccessDisabled.py +24 -0
  1755. s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBSSLEnforcementEnabled.py +17 -0
  1756. s1_cns_cli/s1graph/terraform/checks/resource/azure/MonitorLogProfileCategories.py +26 -0
  1757. s1_cns_cli/s1graph/terraform/checks/resource/azure/MonitorLogProfileRetentionDays.py +35 -0
  1758. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLEncryptionEnaled.py +17 -0
  1759. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLGeoBackupEnabled.py +17 -0
  1760. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLPublicAccessDisabled.py +25 -0
  1761. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLServerMinTLSVersion.py +22 -0
  1762. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLServerSSLEnforcementEnabled.py +17 -0
  1763. s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLTreatDetectionEnabled.py +17 -0
  1764. s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleHTTPAccessRestricted.py +13 -0
  1765. s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py +97 -0
  1766. s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleRDPAccessRestricted.py +13 -0
  1767. s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleSSHAccessRestricted.py +13 -0
  1768. s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleUDPAccessRestricted.py +40 -0
  1769. s1_cns_cli/s1graph/terraform/checks/resource/azure/NetworkInterfaceEnableIPForwarding.py +21 -0
  1770. s1_cns_cli/s1graph/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py +28 -0
  1771. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLEncryptionEnabled.py +17 -0
  1772. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLFlexiServerGeoBackupEnabled.py +17 -0
  1773. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLMinTLSVersion.py +21 -0
  1774. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerConnectionThrottlingEnabled.py +23 -0
  1775. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogCheckpointsEnabled.py +23 -0
  1776. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogConnectionsEnabled.py +23 -0
  1777. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogRetentionEnabled.py +23 -0
  1778. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerPublicAccessDisabled.py +21 -0
  1779. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerSSLEnforcementEnabled.py +17 -0
  1780. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgresSQLTreatDetectionEnabled.py +17 -0
  1781. s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgressSQLGeoBackupEnabled.py +17 -0
  1782. s1_cns_cli/s1graph/terraform/checks/resource/azure/PubsubSKUSLA.py +24 -0
  1783. s1_cns_cli/s1graph/terraform/checks/resource/azure/PubsubSpecifyIdentity.py +23 -0
  1784. s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCacheEnableNonSSLPort.py +21 -0
  1785. s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCacheMinTLSVersion.py +21 -0
  1786. s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCachePublicNetworkAccessEnabled.py +20 -0
  1787. s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerEmailAlertsEnabled.py +21 -0
  1788. s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerEmailAlertsToAdminsEnabled.py +17 -0
  1789. s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerNoPublicAccess.py +35 -0
  1790. s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerPublicAccessDisabled.py +21 -0
  1791. s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerThreatDetectionTypes.py +23 -0
  1792. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecretContentType.py +21 -0
  1793. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecretExpirationDate.py +21 -0
  1794. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmailAlert.py +17 -0
  1795. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmailAlertAdmins.py +17 -0
  1796. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmails.py +21 -0
  1797. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactPhone.py +21 -0
  1798. s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterStandardPricing.py +20 -0
  1799. s1_cns_cli/s1graph/terraform/checks/resource/azure/SignalRSKUSLA.py +24 -0
  1800. s1_cns_cli/s1graph/terraform/checks/resource/azure/SpringCloudAPIPortalHTTPSOnly.py +17 -0
  1801. s1_cns_cli/s1graph/terraform/checks/resource/azure/SpringCloudAPIPortalPublicAccessIsDisabled.py +21 -0
  1802. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountAzureServicesAccessEnabled.py +34 -0
  1803. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountDefaultNetworkAccessDeny.py +40 -0
  1804. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountDisablePublicAccess.py +30 -0
  1805. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountLoggingQueueServiceEnabled.py +33 -0
  1806. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountMinimumTlsVersion.py +29 -0
  1807. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountName.py +42 -0
  1808. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountsTransportEncryption.py +23 -0
  1809. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountsUseReplication.py +24 -0
  1810. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageBlobRestrictPublicAccess.py +30 -0
  1811. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageBlobServiceContainerPrivateAccess.py +21 -0
  1812. s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageSyncPublicAccessDisabled.py +21 -0
  1813. s1_cns_cli/s1graph/terraform/checks/resource/azure/SynapseWorkspaceEnablesDataExfilProtection.py +17 -0
  1814. s1_cns_cli/s1graph/terraform/checks/resource/azure/SynapseWorkspaceEnablesManagedVirtualNetworks.py +17 -0
  1815. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMAgentIsInstalled.py +27 -0
  1816. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMCredsInCustomData.py +34 -0
  1817. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMDisablePasswordAuthentication.py +20 -0
  1818. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMEncryptionAtHostEnabled.py +17 -0
  1819. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMScaleSetsAutoOSImagePatchingEnabled.py +26 -0
  1820. s1_cns_cli/s1graph/terraform/checks/resource/azure/VMStorageOsDisk.py +28 -0
  1821. s1_cns_cli/s1graph/terraform/checks/resource/azure/VnetLocalDNS.py +45 -0
  1822. s1_cns_cli/s1graph/terraform/checks/resource/azure/VnetSingleDNSServer.py +28 -0
  1823. s1_cns_cli/s1graph/terraform/checks/resource/azure/WinVMAutomaticUpdates.py +21 -0
  1824. s1_cns_cli/s1graph/terraform/checks/resource/azure/WinVMEncryptionAtHost.py +20 -0
  1825. s1_cns_cli/s1graph/terraform/checks/resource/azure/__init__.py +5 -0
  1826. s1_cns_cli/s1graph/terraform/checks/resource/base_cloudsplaining_resource_iam_check.py +27 -0
  1827. s1_cns_cli/s1graph/terraform/checks/resource/base_registry.py +12 -0
  1828. s1_cns_cli/s1graph/terraform/checks/resource/base_resource_check.py +51 -0
  1829. s1_cns_cli/s1graph/terraform/checks/resource/base_resource_negative_value_check.py +90 -0
  1830. s1_cns_cli/s1graph/terraform/checks/resource/base_resource_value_check.py +114 -0
  1831. s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/DropletSSHKeys.py +23 -0
  1832. s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/FirewallIngressOpen.py +32 -0
  1833. s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/SpacesBucketPublicRead.py +23 -0
  1834. s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/SpacesBucketVersioning.py +19 -0
  1835. s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/__init__.py +5 -0
  1836. s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleBasicRoles.py +17 -0
  1837. s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleComputeFirewallUnrestrictedIngress.py +46 -0
  1838. s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleIAMMemberDefaultServiceAccount.py +17 -0
  1839. s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleImpersonationRoles.py +30 -0
  1840. s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py +37 -0
  1841. s1_cns_cli/s1graph/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py +45 -0
  1842. s1_cns_cli/s1graph/terraform/checks/resource/gcp/ArtifactRegsitryEncryptedWithCMK.py +21 -0
  1843. s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryDatasetEncryptedWithCMK.py +21 -0
  1844. s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryPrivateTable.py +45 -0
  1845. s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryTableEncryptedWithCMK.py +21 -0
  1846. s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigTableInstanceEncryptedWithCMK.py +21 -0
  1847. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudArmorWAFACLCVE202144228.py +39 -0
  1848. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudBuildWorkersArePrivate.py +18 -0
  1849. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudFunctionsShouldNotBePublic.py +30 -0
  1850. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudPubSubEncryptedWithCMK.py +21 -0
  1851. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudSqlMajorVersion.py +21 -0
  1852. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageLogging.py +32 -0
  1853. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageSelfLogging.py +30 -0
  1854. s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageVersioningEnabled.py +17 -0
  1855. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionPrivateInstance.py +17 -0
  1856. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionStackdriverLogs.py +17 -0
  1857. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionStackdriverMonitoring.py +17 -0
  1858. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataflowJobEncryptedWithCMK.py +21 -0
  1859. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataflowPrivateJob.py +23 -0
  1860. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocClusterEncryptedWithCMK.py +21 -0
  1861. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocPrivateCluster.py +45 -0
  1862. s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocPublicIpCluster.py +17 -0
  1863. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GCPCloudRunPrivateService.py +45 -0
  1864. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEAliasIpEnabled.py +21 -0
  1865. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEBasicAuth.py +37 -0
  1866. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEBinaryAuthorization.py +29 -0
  1867. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEClientCertificateDisabled.py +26 -0
  1868. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEClusterLogging.py +30 -0
  1869. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEDisableLegacyAuth.py +20 -0
  1870. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnableShieldedNodes.py +24 -0
  1871. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnableVPCFlowLogs.py +22 -0
  1872. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnsureIntegrityMonitoring.py +32 -0
  1873. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEHasLabels.py +31 -0
  1874. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEKubernetesRBACGoogleGroups.py +21 -0
  1875. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py +36 -0
  1876. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMasterAuthorizedNetworksEnabled.py +21 -0
  1877. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMetadataServerIsEnabled.py +35 -0
  1878. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMonitoringEnabled.py +20 -0
  1879. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENetworkPolicyEnabled.py +38 -0
  1880. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENodePoolAutoRepairEnabled.py +24 -0
  1881. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENodePoolAutoUpgradeEnabled.py +23 -0
  1882. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPodSecurityPolicyEnabled.py +17 -0
  1883. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPrivateClusterConfig.py +23 -0
  1884. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPrivateNodes.py +21 -0
  1885. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPublicControlPlane.py +34 -0
  1886. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEReleaseChannel.py +21 -0
  1887. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKESecureBootforShieldedNodes.py +35 -0
  1888. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEUseCosImage.py +35 -0
  1889. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleBigQueryDatasetPublicACL.py +48 -0
  1890. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudDNSKeySpecsRSASHA1.py +36 -0
  1891. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudDNSSECEnabled.py +37 -0
  1892. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py +49 -0
  1893. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlEnablePgaudit.py +24 -0
  1894. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py +47 -0
  1895. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py +44 -0
  1896. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py +50 -0
  1897. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogHostname.py +24 -0
  1898. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py +50 -0
  1899. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py +51 -0
  1900. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinErrorStatement.py +34 -0
  1901. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py +52 -0
  1902. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogStatement.py +28 -0
  1903. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py +50 -0
  1904. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlBackupConfiguration.py +26 -0
  1905. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePubliclyAccessible.py +51 -0
  1906. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlDatabaseRequireSsl.py +24 -0
  1907. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py +50 -0
  1908. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py +51 -0
  1909. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerNoPublicIP.py +34 -0
  1910. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py +30 -0
  1911. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeBootDiskEncryption.py +21 -0
  1912. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccount.py +39 -0
  1913. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py +54 -0
  1914. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDiskEncryption.py +21 -0
  1915. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeExternalIP.py +32 -0
  1916. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress20.py +16 -0
  1917. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress21.py +16 -0
  1918. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress22.py +16 -0
  1919. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress3306.py +17 -0
  1920. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress3389.py +16 -0
  1921. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress80.py +16 -0
  1922. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeIPForward.py +39 -0
  1923. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeInstanceOSLogin.py +34 -0
  1924. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeProjectOSLogin.py +20 -0
  1925. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeSSLPolicy.py +39 -0
  1926. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeSerialPorts.py +33 -0
  1927. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeShieldedVM.py +41 -0
  1928. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderBasicRole.py +14 -0
  1929. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderImpersonationRole.py +14 -0
  1930. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderMemberDefaultServiceAccount.py +14 -0
  1931. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSKeyIsPublic.py +57 -0
  1932. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSPreventDestroy.py +23 -0
  1933. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSRotationPeriod.py +38 -0
  1934. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgBasicRole.py +14 -0
  1935. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgImpersonationRole.py +14 -0
  1936. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgMemberDefaultServiceAccount.py +14 -0
  1937. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectAdminServiceAccount.py +28 -0
  1938. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectBasicRole.py +14 -0
  1939. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectDefaultNetwork.py +25 -0
  1940. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectImpersonationRole.py +14 -0
  1941. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectMemberDefaultServiceAccount.py +14 -0
  1942. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleRoleServiceAccountUser.py +25 -0
  1943. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStorageBucketNotPublic.py +26 -0
  1944. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py +17 -0
  1945. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStoragePublicAccessPrevention.py +22 -0
  1946. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkIPV6PrivateGoogleEnabled.py +33 -0
  1947. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkLoggingEnabled.py +31 -0
  1948. s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkPrivateGoogleEnabled.py +28 -0
  1949. s1_cns_cli/s1graph/terraform/checks/resource/gcp/MemorystoreForRedisAuthEnabled.py +23 -0
  1950. s1_cns_cli/s1graph/terraform/checks/resource/gcp/MemorystoreForRedisInTransitEncryption.py +21 -0
  1951. s1_cns_cli/s1graph/terraform/checks/resource/gcp/PubSubPrivateTopic.py +45 -0
  1952. s1_cns_cli/s1graph/terraform/checks/resource/gcp/SpannerDatabaseEncryptedWithCMK.py +21 -0
  1953. s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIDatasetEncryptedWithCMK.py +21 -0
  1954. s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIMetadataStoreEncryptedWithCMK.py +21 -0
  1955. s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIPrivateInstance.py +23 -0
  1956. s1_cns_cli/s1graph/terraform/checks/resource/gcp/__init__.py +5 -0
  1957. s1_cns_cli/s1graph/terraform/checks/resource/github/BranchProtectionRequireSignedCommits.py +23 -0
  1958. s1_cns_cli/s1graph/terraform/checks/resource/github/BranchProtectionReviewNumTwo.py +30 -0
  1959. s1_cns_cli/s1graph/terraform/checks/resource/github/PrivateRepo.py +23 -0
  1960. s1_cns_cli/s1graph/terraform/checks/resource/github/RepositoryEnableVulnerabilityAlerts.py +33 -0
  1961. s1_cns_cli/s1graph/terraform/checks/resource/github/SecretsEncrypted.py +37 -0
  1962. s1_cns_cli/s1graph/terraform/checks/resource/github/WebhookInsecureSsl.py +23 -0
  1963. s1_cns_cli/s1graph/terraform/checks/resource/github/__init__.py +4 -0
  1964. s1_cns_cli/s1graph/terraform/checks/resource/gitlab/ForcePushDisabled.py +23 -0
  1965. s1_cns_cli/s1graph/terraform/checks/resource/gitlab/PreventSecretsEnabled.py +23 -0
  1966. s1_cns_cli/s1graph/terraform/checks/resource/gitlab/RejectUnsignedCommits.py +23 -0
  1967. s1_cns_cli/s1graph/terraform/checks/resource/gitlab/RequireTwoApprovalsToMerge.py +28 -0
  1968. s1_cns_cli/s1graph/terraform/checks/resource/gitlab/__init__.py +4 -0
  1969. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py +55 -0
  1970. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowPrivilegeEscalationPSP.py +32 -0
  1971. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilities.py +54 -0
  1972. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilitiesPSP.py +27 -0
  1973. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py +51 -0
  1974. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/CPULimits.py +56 -0
  1975. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/CPURequests.py +52 -0
  1976. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ContainerSecurityContext.py +45 -0
  1977. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultNamespace.py +40 -0
  1978. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultServiceAccount.py +34 -0
  1979. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultServiceAccountBinding.py +26 -0
  1980. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DockerSocketVolume.py +57 -0
  1981. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DropCapabilities.py +68 -0
  1982. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DropCapabilitiesPSP.py +33 -0
  1983. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/HostPort.py +58 -0
  1984. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImageDigest.py +51 -0
  1985. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py +58 -0
  1986. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImageTagFixed.py +55 -0
  1987. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/LivenessProbe.py +52 -0
  1988. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MemoryLimits.py +53 -0
  1989. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MemoryRequests.py +52 -0
  1990. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MinimiseCapabilities.py +54 -0
  1991. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MinimiseCapabilitiesPSP.py +32 -0
  1992. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PodSecurityContext.py +57 -0
  1993. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PrivilegedContainer.py +47 -0
  1994. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PrivilegedContainerPSP.py +28 -0
  1995. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ReadinessProbe.py +56 -0
  1996. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py +41 -0
  1997. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/RootContainerPSP.py +35 -0
  1998. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SeccompPSP.py +31 -0
  1999. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/Secrets.py +61 -0
  2000. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostIPC.py +28 -0
  2001. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostIPCPSP.py +25 -0
  2002. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostPID.py +29 -0
  2003. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostPIDPSP.py +26 -0
  2004. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SharedHostNetworkNamespace.py +29 -0
  2005. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SharedHostNetworkNamespacePSP.py +26 -0
  2006. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/Tiller.py +77 -0
  2007. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/TillerService.py +51 -0
  2008. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/WildcardRoles.py +34 -0
  2009. s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/__init__.py +4 -0
  2010. s1_cns_cli/s1graph/terraform/checks/resource/linode/__init__.py +4 -0
  2011. s1_cns_cli/s1graph/terraform/checks/resource/linode/authorized_keys.py +23 -0
  2012. s1_cns_cli/s1graph/terraform/checks/resource/linode/firewall_inbound_policy.py +22 -0
  2013. s1_cns_cli/s1graph/terraform/checks/resource/linode/firewall_outbound_policy.py +22 -0
  2014. s1_cns_cli/s1graph/terraform/checks/resource/linode/user_email_set.py +23 -0
  2015. s1_cns_cli/s1graph/terraform/checks/resource/linode/user_username_set.py +23 -0
  2016. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRule.py +58 -0
  2017. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort22.py +9 -0
  2018. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort3389.py +9 -0
  2019. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort80.py +9 -0
  2020. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupOutboundRule.py +25 -0
  2021. s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupRuleDescription.py +47 -0
  2022. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBListenerUsesSecureProtocols.py +24 -0
  2023. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBListenerUsingHTTPS.py +23 -0
  2024. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBNetworkPrivate.py +24 -0
  2025. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBTargetGroupDefinesHealthCheck.py +28 -0
  2026. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBTargetGroupUsingHTTPS.py +23 -0
  2027. s1_cns_cli/s1graph/terraform/checks/resource/ncp/LaunchConfigurationEncryptionVPC.py +17 -0
  2028. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound20.py +9 -0
  2029. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound21.py +9 -0
  2030. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound22.py +9 -0
  2031. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound3389.py +9 -0
  2032. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInboundCheck.py +27 -0
  2033. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLPortCheck.py +24 -0
  2034. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NASEncryptionEnabled.py +17 -0
  2035. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NKSControlPlaneLogging.py +17 -0
  2036. s1_cns_cli/s1graph/terraform/checks/resource/ncp/NKSPublicAccess.py +20 -0
  2037. s1_cns_cli/s1graph/terraform/checks/resource/ncp/RouteTableNATGatewayDefault.py +24 -0
  2038. s1_cns_cli/s1graph/terraform/checks/resource/ncp/ServerEncryptionVPC.py +17 -0
  2039. s1_cns_cli/s1graph/terraform/checks/resource/ncp/ServerPublicIP.py +21 -0
  2040. s1_cns_cli/s1graph/terraform/checks/resource/ncp/__init__.py +4 -0
  2041. s1_cns_cli/s1graph/terraform/checks/resource/oci/AbsSecurityGroupUnrestrictedIngress.py +39 -0
  2042. s1_cns_cli/s1graph/terraform/checks/resource/oci/AbsSecurityListUnrestrictedIngress.py +45 -0
  2043. s1_cns_cli/s1graph/terraform/checks/resource/oci/FileSystemEncryption.py +21 -0
  2044. s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordLength.py +31 -0
  2045. s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyLowerCase.py +20 -0
  2046. s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyNumeric.py +20 -0
  2047. s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicySpecialCharacters.py +20 -0
  2048. s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyUpperCase.py +20 -0
  2049. s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceBootVolumeIntransitEncryption.py +20 -0
  2050. s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceMetadataServiceEnabled.py +22 -0
  2051. s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceMonitoringEnabled.py +24 -0
  2052. s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageEmitEvents.py +20 -0
  2053. s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageEncryption.py +21 -0
  2054. s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStoragePublic.py +20 -0
  2055. s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageVersioning.py +20 -0
  2056. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityGroupUnrestrictedIngress22.py +10 -0
  2057. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityGroupsIngressStatelessSecurityRules.py +29 -0
  2058. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListIngress.py +21 -0
  2059. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListIngressStateless.py +34 -0
  2060. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListUnrestrictedIngress22.py +9 -0
  2061. s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListUnrestrictedIngress3389.py +9 -0
  2062. s1_cns_cli/s1graph/terraform/checks/resource/oci/StorageBlockBackupEnabled.py +22 -0
  2063. s1_cns_cli/s1graph/terraform/checks/resource/oci/StorageBlockEncryption.py +23 -0
  2064. s1_cns_cli/s1graph/terraform/checks/resource/oci/__init__.py +4 -0
  2065. s1_cns_cli/s1graph/terraform/checks/resource/openstack/AbsSecurityGroupUnrestrictedIngress.py +77 -0
  2066. s1_cns_cli/s1graph/terraform/checks/resource/openstack/ComputeInstanceAdminPassword.py +32 -0
  2067. s1_cns_cli/s1graph/terraform/checks/resource/openstack/FirewallRuleSetDestinationIP.py +28 -0
  2068. s1_cns_cli/s1graph/terraform/checks/resource/openstack/SecurityGroupUnrestrictedIngress22.py +9 -0
  2069. s1_cns_cli/s1graph/terraform/checks/resource/openstack/SecurityGroupUnrestrictedIngress3389.py +9 -0
  2070. s1_cns_cli/s1graph/terraform/checks/resource/openstack/__init__.py +5 -0
  2071. s1_cns_cli/s1graph/terraform/checks/resource/panos/InterfaceMgmtProfileNoHTTP.py +20 -0
  2072. s1_cns_cli/s1graph/terraform/checks/resource/panos/InterfaceMgmtProfileNoTelnet.py +20 -0
  2073. s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecAlgorithms.py +43 -0
  2074. s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecAuthAlgorithms.py +43 -0
  2075. s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecProtocols.py +20 -0
  2076. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyDescription.py +50 -0
  2077. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyLogForwarding.py +50 -0
  2078. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyLoggingEnabled.py +49 -0
  2079. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoApplicationAny.py +51 -0
  2080. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoDSRI.py +48 -0
  2081. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoServiceAny.py +51 -0
  2082. s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoSrcAnyDstAny.py +70 -0
  2083. s1_cns_cli/s1graph/terraform/checks/resource/panos/ZoneProtectionProfile.py +43 -0
  2084. s1_cns_cli/s1graph/terraform/checks/resource/panos/ZoneUserIDIncludeACL.py +55 -0
  2085. s1_cns_cli/s1graph/terraform/checks/resource/panos/__init__.py +5 -0
  2086. s1_cns_cli/s1graph/terraform/checks/resource/registry.py +4 -0
  2087. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeInstanceGroupPublicIP.py +29 -0
  2088. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeInstanceGroupSecurityGroup.py +23 -0
  2089. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMPublicIP.py +28 -0
  2090. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMSecurityGroup.py +23 -0
  2091. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMSerialConsole.py +28 -0
  2092. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMCloudElevatedMembers.py +26 -0
  2093. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMFolderElevatedMembers.py +26 -0
  2094. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMOrganizationElevatedMembers.py +29 -0
  2095. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMPassportAccountUsage.py +57 -0
  2096. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SAutoUpgrade.py +28 -0
  2097. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SEtcdKMSEncryption.py +23 -0
  2098. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNetworkPolicy.py +23 -0
  2099. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupAutoUpgrade.py +29 -0
  2100. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupPublicIP.py +28 -0
  2101. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupSecurityGroup.py +23 -0
  2102. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SPublicIP.py +29 -0
  2103. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SSecurityGroup.py +23 -0
  2104. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/KMSSymmetricKeyRotation.py +23 -0
  2105. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/MDBPublicIP.py +41 -0
  2106. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/MDBSecurityGroup.py +33 -0
  2107. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ObjectStorageBucketEncryption.py +23 -0
  2108. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ObjectStorageBucketPublicAccess.py +34 -0
  2109. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/VPCSecurityGroupAllowAll.py +38 -0
  2110. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/VPCSecurityGroupRuleAllowAll.py +38 -0
  2111. s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/__init__.py +4 -0
  2112. s1_cns_cli/s1graph/terraform/checks/utils/__init__.py +0 -0
  2113. s1_cns_cli/s1graph/terraform/checks/utils/base_cloudsplaining_iam_scanner.py +53 -0
  2114. s1_cns_cli/s1graph/terraform/checks/utils/consts.py +0 -0
  2115. s1_cns_cli/s1graph/terraform/checks/utils/dependency_path_handler.py +13 -0
  2116. s1_cns_cli/s1graph/terraform/checks/utils/iam_terraform_document_to_policy_converter.py +25 -0
  2117. s1_cns_cli/s1graph/terraform/context_parsers/__init__.py +1 -0
  2118. s1_cns_cli/s1graph/terraform/context_parsers/base_parser.py +186 -0
  2119. s1_cns_cli/s1graph/terraform/context_parsers/parsers/__init__.py +4 -0
  2120. s1_cns_cli/s1graph/terraform/context_parsers/parsers/data_context_parser.py +32 -0
  2121. s1_cns_cli/s1graph/terraform/context_parsers/parsers/locals_context_parser.py +40 -0
  2122. s1_cns_cli/s1graph/terraform/context_parsers/parsers/module_context_parser.py +29 -0
  2123. s1_cns_cli/s1graph/terraform/context_parsers/parsers/provider_context_parser.py +59 -0
  2124. s1_cns_cli/s1graph/terraform/context_parsers/parsers/resource_context_parser.py +36 -0
  2125. s1_cns_cli/s1graph/terraform/context_parsers/parsers/variable_context_parser.py +42 -0
  2126. s1_cns_cli/s1graph/terraform/context_parsers/registry.py +48 -0
  2127. s1_cns_cli/s1graph/terraform/context_parsers/tf_plan/__init__.py +34 -0
  2128. s1_cns_cli/s1graph/terraform/deep_analysis_plan_graph_manager.py +50 -0
  2129. s1_cns_cli/s1graph/terraform/evaluation/__init__.py +0 -0
  2130. s1_cns_cli/s1graph/terraform/evaluation/base_variable_evaluation.py +71 -0
  2131. s1_cns_cli/s1graph/terraform/graph_builder/EncryptionCalculation.md +45 -0
  2132. s1_cns_cli/s1graph/terraform/graph_builder/__init__.py +0 -0
  2133. s1_cns_cli/s1graph/terraform/graph_builder/foreach/__init__.py +0 -0
  2134. s1_cns_cli/s1graph/terraform/graph_builder/foreach/abstract_handler.py +248 -0
  2135. s1_cns_cli/s1graph/terraform/graph_builder/foreach/builder.py +25 -0
  2136. s1_cns_cli/s1graph/terraform/graph_builder/foreach/consts.py +14 -0
  2137. s1_cns_cli/s1graph/terraform/graph_builder/foreach/module_handler.py +271 -0
  2138. s1_cns_cli/s1graph/terraform/graph_builder/foreach/resource_handler.py +110 -0
  2139. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/__init__.py +0 -0
  2140. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/attribute_names.py +0 -0
  2141. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/block_types.py +15 -0
  2142. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/blocks.py +181 -0
  2143. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/generic_resource_encryption.py +122 -0
  2144. s1_cns_cli/s1graph/terraform/graph_builder/graph_components/module.py +271 -0
  2145. s1_cns_cli/s1graph/terraform/graph_builder/graph_to_tf_definitions.py +43 -0
  2146. s1_cns_cli/s1graph/terraform/graph_builder/local_graph.py +710 -0
  2147. s1_cns_cli/s1graph/terraform/graph_builder/utils.py +300 -0
  2148. s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/__init__.py +0 -0
  2149. s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/evaluate_terraform.py +583 -0
  2150. s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/renderer.py +588 -0
  2151. s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/safe_eval_functions.py +344 -0
  2152. s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/vertex_reference.py +17 -0
  2153. s1_cns_cli/s1graph/terraform/graph_manager.py +63 -0
  2154. s1_cns_cli/s1graph/terraform/image_referencer/__init__.py +0 -0
  2155. s1_cns_cli/s1graph/terraform/image_referencer/base_provider.py +57 -0
  2156. s1_cns_cli/s1graph/terraform/image_referencer/manager.py +27 -0
  2157. s1_cns_cli/s1graph/terraform/image_referencer/provider/__init__.py +0 -0
  2158. s1_cns_cli/s1graph/terraform/image_referencer/provider/aws.py +97 -0
  2159. s1_cns_cli/s1graph/terraform/image_referencer/provider/azure.py +111 -0
  2160. s1_cns_cli/s1graph/terraform/image_referencer/provider/gcp.py +70 -0
  2161. s1_cns_cli/s1graph/terraform/module_loading/__init__.py +8 -0
  2162. s1_cns_cli/s1graph/terraform/module_loading/content.py +39 -0
  2163. s1_cns_cli/s1graph/terraform/module_loading/loader.py +74 -0
  2164. s1_cns_cli/s1graph/terraform/module_loading/loaders/__init__.py +5 -0
  2165. s1_cns_cli/s1graph/terraform/module_loading/loaders/bitbucket_access_token_loader.py +19 -0
  2166. s1_cns_cli/s1graph/terraform/module_loading/loaders/bitbucket_loader.py +10 -0
  2167. s1_cns_cli/s1graph/terraform/module_loading/loaders/git_loader.py +145 -0
  2168. s1_cns_cli/s1graph/terraform/module_loading/loaders/github_access_token_loader.py +38 -0
  2169. s1_cns_cli/s1graph/terraform/module_loading/loaders/github_loader.py +21 -0
  2170. s1_cns_cli/s1graph/terraform/module_loading/loaders/local_path_loader.py +49 -0
  2171. s1_cns_cli/s1graph/terraform/module_loading/loaders/registry_loader.py +210 -0
  2172. s1_cns_cli/s1graph/terraform/module_loading/loaders/versions_parser.py +68 -0
  2173. s1_cns_cli/s1graph/terraform/module_loading/module_finder.py +100 -0
  2174. s1_cns_cli/s1graph/terraform/module_loading/module_params.py +26 -0
  2175. s1_cns_cli/s1graph/terraform/module_loading/registry.py +106 -0
  2176. s1_cns_cli/s1graph/terraform/modules/__init__.py +2 -0
  2177. s1_cns_cli/s1graph/terraform/modules/module_objects.py +94 -0
  2178. s1_cns_cli/s1graph/terraform/modules/module_utils.py +288 -0
  2179. s1_cns_cli/s1graph/terraform/parser.py +650 -0
  2180. s1_cns_cli/s1graph/terraform/parser_functions.py +207 -0
  2181. s1_cns_cli/s1graph/terraform/plan_parser.py +330 -0
  2182. s1_cns_cli/s1graph/terraform/plan_runner.py +292 -0
  2183. s1_cns_cli/s1graph/terraform/plan_utils.py +137 -0
  2184. s1_cns_cli/s1graph/terraform/runner.py +694 -0
  2185. s1_cns_cli/s1graph/terraform/tag_providers/__init__.py +21 -0
  2186. s1_cns_cli/s1graph/terraform/tag_providers/aws.py +7 -0
  2187. s1_cns_cli/s1graph/terraform/tag_providers/azure.py +7 -0
  2188. s1_cns_cli/s1graph/terraform/tag_providers/gcp.py +7 -0
  2189. s1_cns_cli/s1graph/terraform/tf_parser.py +563 -0
  2190. s1_cns_cli/s1graph/terraform_json/__init__.py +0 -0
  2191. s1_cns_cli/s1graph/terraform_json/parser.py +199 -0
  2192. s1_cns_cli/s1graph/terraform_json/runner.py +230 -0
  2193. s1_cns_cli/s1graph/terraform_json/utils.py +67 -0
  2194. s1_cns_cli/s1graph/version.py +1 -0
  2195. s1_cns_cli/s1graph/yaml_doc/__init__.py +0 -0
  2196. s1_cns_cli/s1graph/yaml_doc/base_registry.py +349 -0
  2197. s1_cns_cli/s1graph/yaml_doc/base_yaml_check.py +28 -0
  2198. s1_cns_cli/s1graph/yaml_doc/enums.py +8 -0
  2199. s1_cns_cli/s1graph/yaml_doc/registry.py +4 -0
  2200. s1_cns_cli/s1graph/yaml_doc/runner.py +128 -0
  2201. s1_cns_cli/sentry.py +39 -0
  2202. s1_cns_cli/version.py +2 -0
  2203. s1_shift_left_cli-0.4.0.dist-info/LICENSE +5 -0
  2204. s1_shift_left_cli-0.4.0.dist-info/METADATA +113 -0
  2205. s1_shift_left_cli-0.4.0.dist-info/RECORD +2207 -0
  2206. s1_shift_left_cli-0.4.0.dist-info/WHEEL +4 -0
  2207. s1_shift_left_cli-0.4.0.dist-info/entry_points.txt +5 -0
@@ -0,0 +1,1023 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import logging
5
+ import os.path
6
+ import re
7
+ import uuid
8
+ import webbrowser
9
+ from collections import namedtuple
10
+ from concurrent import futures
11
+ from io import StringIO
12
+ from json import JSONDecodeError
13
+ from os import path
14
+ from pathlib import Path
15
+ from time import sleep
16
+ from typing import List, Dict, TYPE_CHECKING, Any, cast
17
+
18
+ import boto3
19
+ import dpath
20
+ import requests
21
+ import urllib3
22
+ from botocore.exceptions import ClientError
23
+ from botocore.config import Config
24
+ from cachetools import cached, TTLCache
25
+ from colorama import Style
26
+ from termcolor import colored
27
+ from tqdm import trange
28
+ from urllib3.exceptions import HTTPError, MaxRetryError
29
+
30
+ from s1_cns_cli.s1graph.common.s1cns.run_metadata.registry import registry
31
+ from s1_cns_cli.s1graph.common.s1cns.platform_errors import SentinelOneCnsAuthError
32
+ from s1_cns_cli.s1graph.common.s1cns.platform_key import read_key, persist_key, s1_cns_file
33
+ from s1_cns_cli.s1graph.common.s1cns.wrapper import reduce_scan_reports, persist_checks_results, \
34
+ enrich_and_persist_checks_metadata, s1cns_results_prefix, persist_run_metadata, _put_json_object, \
35
+ persist_logs_stream
36
+ from s1_cns_cli.s1graph.common.models.consts import SUPPORTED_FILE_EXTENSIONS, SUPPORTED_FILES, SCANNABLE_PACKAGE_FILES
37
+ from s1_cns_cli.s1graph.common.s1cns.check_type import CheckType
38
+ from s1_cns_cli.s1graph.common.runners.base_runner import filter_ignored_paths
39
+ from s1_cns_cli.s1graph.common.typing import _CicdDetails
40
+ from s1_cns_cli.s1graph.common.util.consts import PRISMA_PLATFORM, SENTINELONE_CNS_PLATFORM, SENTINELONE_CNS_RUN_SCA_PACKAGE_SCAN_V2
41
+ from s1_cns_cli.s1graph.common.util.data_structures_utils import merge_dicts
42
+ from s1_cns_cli.s1graph.common.util.http_utils import normalize_prisma_url, get_auth_header, get_default_get_headers, \
43
+ get_user_agent_header, get_default_post_headers, get_prisma_get_headers, get_prisma_auth_header, \
44
+ get_auth_error_message, normalize_bc_url
45
+ from s1_cns_cli.s1graph.common.util.type_forcers import convert_prisma_policy_filter_to_dict, convert_str_to_bool
46
+ from s1_cns_cli.s1graph.secrets.coordinator import EnrichedSecret
47
+ from s1_cns_cli.s1graph.version import version as s1cns_version
48
+
49
+ if TYPE_CHECKING:
50
+ import argparse
51
+ from s1_cns_cli.s1graph.common.s1cns.bc_source import SourceType
52
+ from s1_cns_cli.s1graph.common.output.report import Report
53
+ from mypy_boto3_s3.client import S3Client
54
+ from requests import Response
55
+ from typing_extensions import TypeGuard
56
+
57
+
58
+ SLEEP_SECONDS = 1
59
+
60
+ EMAIL_PATTERN = re.compile(r"[^@]+@[^@]+\.[^@]+")
61
+ UUID_V4_PATTERN = re.compile(r"^[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}$")
62
+ # found at https://regexland.com/base64/
63
+ BASE64_PATTERN = re.compile(r"^(?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{3}=|[A-Za-z\d+/]{2}==)?$")
64
+ REPO_PATH_PATTERN = re.compile(r's1cns/(.*?)/src')
65
+
66
+ ACCOUNT_CREATION_TIME = 180 # in seconds
67
+
68
+ UNAUTHORIZED_MESSAGE = 'User is not authorized to access this resource with an explicit deny'
69
+ ASSUME_ROLE_UNUATHORIZED_MESSAGE = 'is not authorized to perform: sts:AssumeRole'
70
+
71
+ FileToPersist = namedtuple('FileToPersist', 'full_file_path s3_file_key')
72
+
73
+ DEFAULT_REGION = "us-west-2"
74
+ GOV_CLOUD_REGION = 'us-gov-west-1'
75
+ PRISMA_GOV_API_URL = 'https://api.gov.prismacloud.io'
76
+ MAX_RETRIES = 40
77
+ ONBOARDING_SOURCE = "s1cns"
78
+
79
+ SIGNUP_HEADER = merge_dicts({
80
+ 'Accept': 'application/json',
81
+ 'Content-Type': 'application/json;charset=UTF-8'},
82
+ get_user_agent_header())
83
+ CI_METADATA_EXTRACTOR = registry.get_extractor()
84
+
85
+
86
+ class BcPlatformIntegration:
87
+ def __init__(self) -> None:
88
+ self.bc_api_key = read_key()
89
+ self.s3_client: S3Client | None = None
90
+ self.bucket: str | None = None
91
+ self.credentials: dict[str, str] | None = None
92
+ self.repo_path: str | None = None
93
+ self.support_bucket: str | None = None
94
+ self.support_repo_path: str | None = None
95
+ self.repo_id: str | None = None
96
+ self.repo_branch: str | None = None
97
+ self.skip_fixes = False
98
+ self.skip_download = False
99
+ self.bc_source: SourceType | None = None
100
+ self.bc_source_version: str | None = None
101
+ self.timestamp: str | None = None
102
+ self.scan_reports: list[Report] = []
103
+ self.bc_api_url = normalize_bc_url(os.getenv('BC_API_URL', "https://www.sentinelone.com"))
104
+ self.prisma_api_url = normalize_prisma_url(os.getenv("PRISMA_API_URL"))
105
+ self.prisma_policies_url: str | None = None
106
+ self.prisma_policy_filters_url: str | None = None
107
+ self.setup_api_urls()
108
+ self.customer_run_config_response = None
109
+ self.prisma_policies_response = None
110
+ self.public_metadata_response = None
111
+ self.use_s3_integration = False
112
+ self.platform_integration_configured = False
113
+ self.http: urllib3.PoolManager | urllib3.ProxyManager | None = None
114
+ self.bc_skip_mapping = False
115
+ self.cicd_details: _CicdDetails = {}
116
+ self.support_flag_enabled = False
117
+
118
+ def set_bc_api_url(self, new_url: str) -> None:
119
+ self.bc_api_url = normalize_bc_url(new_url)
120
+ self.setup_api_urls()
121
+
122
+ def setup_api_urls(self) -> None:
123
+ """
124
+ API URLs vary depending upon whether the platform is SentinelOneCns or Prisma Cloud.
125
+ SentinelOneCns has one default that can be used when initializing the class,
126
+ but Prisma Cloud requires resetting them in setup_s1cns_credentials,
127
+ which is where command-line parameters are first made available.
128
+ """
129
+ if self.prisma_api_url:
130
+ self.api_url = f"{self.prisma_api_url}/s1cns"
131
+ self.prisma_policies_url = f"{self.prisma_api_url}/v2/policy"
132
+ self.prisma_policy_filters_url = f"{self.prisma_api_url}/filter/policy/suggest"
133
+ else:
134
+ self.api_url = self.bc_api_url
135
+ self.guidelines_api_url = f"{self.api_url}/api/v2/guidelines"
136
+ self.guidelines_api_url_backoff = f"{self.api_url}/api/v1/guidelines"
137
+
138
+ self.integrations_api_url = f"{self.api_url}/api/v1/integrations/types/s1cns"
139
+ self.onboarding_url = f"{self.api_url}/api/v1/signup/s1cns"
140
+ self.platform_run_config_url = f"{self.api_url}/api/v2/s1cns/runConfiguration"
141
+ self.platform_run_config_url_backoff = f"{self.api_url}/api/v1/s1cns/runConfiguration"
142
+
143
+ def is_prisma_integration(self) -> bool:
144
+ if self.bc_api_key and not self.is_bc_token(self.bc_api_key):
145
+ return True
146
+ return False
147
+
148
+ @staticmethod
149
+ def is_token_valid(token: str) -> bool:
150
+ parts = token.split('::')
151
+ parts_len = len(parts)
152
+ if parts_len == 1:
153
+ return BcPlatformIntegration.is_bc_token(token)
154
+ elif parts_len == 2:
155
+ # A Prisma access key is a UUID, same as a BC API key
156
+ if BcPlatformIntegration.is_bc_token(parts[0]) and parts[1] and BASE64_PATTERN.match(parts[1]) is not None:
157
+ return True
158
+ return False
159
+ else:
160
+ return False
161
+
162
+ @staticmethod
163
+ def is_bc_token(token: str | None) -> TypeGuard[str]:
164
+ if not token:
165
+ return False
166
+
167
+ return re.match(UUID_V4_PATTERN, token) is not None
168
+
169
+ @cached(TTLCache(maxsize=1, ttl=540))
170
+ def get_auth_token(self) -> str:
171
+ if self.is_bc_token(self.bc_api_key):
172
+ return self.bc_api_key
173
+ # A Prisma Cloud Access Key was specified as the SentinelOneCns token.
174
+ if not self.prisma_api_url:
175
+ raise ValueError("A Prisma Cloud token was set, but no Prisma Cloud API URL was set")
176
+ if not self.bc_api_key:
177
+ # should usually not happen
178
+ raise ValueError("A Prisma Cloud or Birdgecrew token was not set")
179
+ if '::' not in self.bc_api_key:
180
+ raise ValueError(
181
+ "A Prisma Cloud token was set, but the token is not in the correct format: <access_key_id>::<secret_key>")
182
+ if not self.http:
183
+ raise AttributeError("HTTP manager was not correctly created")
184
+ username, password = self.bc_api_key.split('::')
185
+ request = self.http.request("POST", f"{self.prisma_api_url}/login", # type:ignore[no-untyped-call]
186
+ body=json.dumps({"username": username, "password": password}),
187
+ headers=merge_dicts({"Content-Type": "application/json"}, get_user_agent_header()))
188
+ if request.status == 401:
189
+ logging.error(f'Received 401 response from Prisma /login endpoint: {request.data.decode("utf8")}')
190
+ raise SentinelOneCnsAuthError()
191
+ elif request.status == 403:
192
+ logging.error('Received 403 (Forbidden) response from Prisma /login endpoint')
193
+ raise SentinelOneCnsAuthError()
194
+ token: str = json.loads(request.data.decode("utf8"))['token']
195
+ return token
196
+
197
+ def setup_http_manager(self, ca_certificate: str | None = None, no_cert_verify: bool = False) -> None:
198
+ """
199
+ s1cns uses both the urllib3 and requests libraries, while s1cns uses the requests library.
200
+ :param ca_certificate: an optional CA bundle to be used by both libraries.
201
+ :param no_cert_verify: whether to skip SSL cert verification
202
+ """
203
+ ca_certificate = ca_certificate or os.getenv('BC_CA_BUNDLE')
204
+ cert_reqs: str | None
205
+
206
+ if self.http:
207
+ return
208
+ if ca_certificate:
209
+ os.environ['REQUESTS_CA_BUNDLE'] = ca_certificate
210
+ cert_reqs = 'CERT_NONE' if no_cert_verify else 'REQUIRED'
211
+ logging.debug(f'Using CA cert {ca_certificate} and cert_reqs {cert_reqs}')
212
+ try:
213
+ parsed_url = urllib3.util.parse_url(os.environ['https_proxy'])
214
+ self.http = urllib3.ProxyManager(os.environ['https_proxy'],
215
+ cert_reqs=cert_reqs,
216
+ ca_certs=ca_certificate,
217
+ proxy_headers=urllib3.make_headers(proxy_basic_auth=parsed_url.auth)) # type:ignore[no-untyped-call]
218
+ except KeyError:
219
+ self.http = urllib3.PoolManager(cert_reqs=cert_reqs, ca_certs=ca_certificate)
220
+ else:
221
+ cert_reqs = 'CERT_NONE' if no_cert_verify else None
222
+ logging.debug(f'Using cert_reqs {cert_reqs}')
223
+ try:
224
+ parsed_url = urllib3.util.parse_url(os.environ['https_proxy'])
225
+ self.http = urllib3.ProxyManager(os.environ['https_proxy'],
226
+ cert_reqs=cert_reqs,
227
+ proxy_headers=urllib3.make_headers(proxy_basic_auth=parsed_url.auth)) # type:ignore[no-untyped-call]
228
+ except KeyError:
229
+ self.http = urllib3.PoolManager(cert_reqs=cert_reqs)
230
+ logging.debug('Successfully set up HTTP manager')
231
+
232
+ def setup_s1cns_credentials(
233
+ self,
234
+ repo_id: str,
235
+ skip_fixes: bool = False,
236
+ skip_download: bool = False,
237
+ source: SourceType | None = None,
238
+ source_version: str | None = None,
239
+ repo_branch: str | None = None,
240
+ prisma_api_url: str | None = None,
241
+ ) -> None:
242
+ """
243
+ Setup credentials against SentinelOneCns's platform.
244
+ :param repo_id: Identity string of the scanned repository, of the form <repo_owner>/<repo_name>
245
+ :param skip_fixes: whether to skip querying fixes from SentinelOneCns
246
+ :param skip_download: whether to skip downloading data (guidelines, custom policies, etc) from the platform
247
+ :param source:
248
+ :param prisma_api_url: optional URL for the Prisma Cloud platform, requires a Prisma Cloud Access Key as bc_api_key
249
+ """
250
+ self.repo_id = repo_id
251
+ self.repo_branch = repo_branch
252
+ self.skip_fixes = skip_fixes
253
+ self.skip_download = skip_download
254
+ self.bc_source = source
255
+ self.bc_source_version = source_version
256
+
257
+ if prisma_api_url:
258
+ self.prisma_api_url = normalize_prisma_url(prisma_api_url)
259
+ self.setup_api_urls()
260
+ logging.info(f'Using Prisma API URL: {self.prisma_api_url}')
261
+
262
+ if self.bc_source and self.bc_source.upload_results:
263
+ self.set_s3_integration()
264
+
265
+ self.platform_integration_configured = True
266
+
267
+ def set_s3_integration(self) -> None:
268
+ region = DEFAULT_REGION
269
+ use_accelerate_endpoint = True
270
+ if self.prisma_api_url == PRISMA_GOV_API_URL:
271
+ region = GOV_CLOUD_REGION
272
+ use_accelerate_endpoint = False
273
+
274
+ try:
275
+ self.skip_fixes = True # no need to run fixes on CI integration
276
+ repo_full_path, support_path, response = self.get_s3_role(self.repo_id) # type: ignore
277
+ self.bucket, self.repo_path = repo_full_path.split("/", 1)
278
+
279
+ self.timestamp = self.repo_path.split("/")[-2]
280
+ self.credentials = cast("dict[str, str]", response["creds"])
281
+ config = Config(
282
+ s3={
283
+ "use_accelerate_endpoint": use_accelerate_endpoint,
284
+ }
285
+ )
286
+ self.s3_client = boto3.client(
287
+ "s3",
288
+ aws_access_key_id=self.credentials["AccessKeyId"],
289
+ aws_secret_access_key=self.credentials["SecretAccessKey"],
290
+ aws_session_token=self.credentials["SessionToken"],
291
+ region_name=region,
292
+ config=config,
293
+ )
294
+
295
+ if support_path:
296
+ self.support_bucket, self.support_repo_path = support_path.split("/", 1)
297
+ elif self.support_flag_enabled:
298
+ logging.debug('--support was used, but we did not get a support file upload path in the platform response. Using the old location.')
299
+ self.support_bucket = self.bucket
300
+ self.support_repo_path = self.repo_path
301
+
302
+ self.use_s3_integration = True
303
+ except MaxRetryError:
304
+ logging.error("An SSL error occurred connecting to the platform. If you are on a VPN, please try "
305
+ "disabling it and re-running the command.", exc_info=True)
306
+ raise
307
+ except HTTPError:
308
+ logging.error("Failed to get customer assumed role", exc_info=True)
309
+ raise
310
+ except ClientError:
311
+ logging.error(f"Failed to initiate client with credentials {self.credentials}", exc_info=True)
312
+ raise
313
+ except JSONDecodeError:
314
+ logging.error(f"Response of {self.integrations_api_url} is not a valid JSON", exc_info=True)
315
+ raise
316
+ except SentinelOneCnsAuthError:
317
+ logging.error("Received an error response during authentication")
318
+ raise
319
+
320
+ def get_s3_role(self, repo_id: str) -> tuple[str, str | None, dict[str, Any]]:
321
+ token = self.get_auth_token()
322
+
323
+ if not self.http:
324
+ raise AttributeError("HTTP manager was not correctly created")
325
+
326
+ request = self.http.request("POST", self.integrations_api_url, body=json.dumps({"repoId": repo_id, "support": self.support_flag_enabled}), # type:ignore[no-untyped-call]
327
+ headers=merge_dicts({"Authorization": token, "Content-Type": "application/json"},
328
+ get_user_agent_header()))
329
+ if request.status == 403:
330
+ error_message = get_auth_error_message(request.status, self.is_prisma_integration(), True)
331
+ raise SentinelOneCnsAuthError(error_message)
332
+ response = json.loads(request.data.decode("utf8"))
333
+ while ('Message' in response or 'message' in response):
334
+ if 'Message' in response and response['Message'] == UNAUTHORIZED_MESSAGE:
335
+ raise SentinelOneCnsAuthError()
336
+ if 'message' in response and ASSUME_ROLE_UNUATHORIZED_MESSAGE in response['message']:
337
+ raise SentinelOneCnsAuthError(
338
+ "SentinelOneCns got an unexpected authorization error that may not be due to your credentials. Please contact support.")
339
+ if 'message' in response and "cannot be found" in response['message']:
340
+ self.loading_output("creating role")
341
+ request = self.http.request("POST", self.integrations_api_url, body=json.dumps({"repoId": repo_id}), # type:ignore[no-untyped-call]
342
+ headers=merge_dicts(
343
+ {"Authorization": token, "Content-Type": "application/json"},
344
+ get_user_agent_header()))
345
+ response = json.loads(request.data.decode("utf8"))
346
+
347
+ repo_full_path = response["path"]
348
+ support_path = response.get("supportPath")
349
+ return repo_full_path, support_path, response
350
+
351
+ def is_integration_configured(self) -> bool:
352
+ """
353
+ Checks if SentinelOneCns integration is fully configured based in input params.
354
+ :return: True if the integration is configured, False otherwise
355
+ """
356
+ return self.platform_integration_configured
357
+
358
+ def persist_repository(
359
+ self,
360
+ root_dir: str | Path,
361
+ files: list[str] | None = None,
362
+ excluded_paths: list[str] | None = None,
363
+ included_paths: list[str] | None = None,
364
+ ) -> None:
365
+ """
366
+ Persist the repository found on root_dir path to SentinelOneCns's platform. If --file flag is used, only files
367
+ that are specified will be persisted.
368
+ :param files: Absolute path of the files passed in the --file flag.
369
+ :param root_dir: Absolute path of the directory containing the repository root level.
370
+ :param excluded_paths: Paths to exclude from persist process
371
+ :param included_paths: Paths to exclude from persist process
372
+ """
373
+ excluded_paths = excluded_paths if excluded_paths is not None else []
374
+
375
+ if not self.use_s3_integration:
376
+ return
377
+ files_to_persist: List[FileToPersist] = []
378
+ if files:
379
+ for f in files:
380
+ f_name = os.path.basename(f)
381
+ _, file_extension = os.path.splitext(f)
382
+ if SENTINELONE_CNS_RUN_SCA_PACKAGE_SCAN_V2 and file_extension in SCANNABLE_PACKAGE_FILES:
383
+ continue
384
+ if file_extension in SUPPORTED_FILE_EXTENSIONS or f_name in SUPPORTED_FILES:
385
+ files_to_persist.append(FileToPersist(f, os.path.relpath(f, root_dir)))
386
+ else:
387
+ for root_path, d_names, f_names in os.walk(root_dir):
388
+ # self.excluded_paths only contains the config fetched from the platform.
389
+ # but here we expect the list from runner_registry as well (which includes self.excluded_paths).
390
+ filter_ignored_paths(root_dir, root_path, d_names, excluded_paths, included_paths=included_paths)
391
+ filter_ignored_paths(root_dir, root_path, f_names, excluded_paths)
392
+ for file_path in f_names:
393
+ _, file_extension = os.path.splitext(file_path)
394
+ if SENTINELONE_CNS_RUN_SCA_PACKAGE_SCAN_V2 and file_extension in SCANNABLE_PACKAGE_FILES:
395
+ continue
396
+ if file_extension in SUPPORTED_FILE_EXTENSIONS or file_path in SUPPORTED_FILES:
397
+ full_file_path = os.path.join(root_path, file_path)
398
+ relative_file_path = os.path.relpath(full_file_path, root_dir)
399
+ files_to_persist.append(FileToPersist(full_file_path, relative_file_path))
400
+
401
+ self.persist_files(files_to_persist)
402
+
403
+ def persist_git_configuration(self, root_dir: str | Path, git_config_folders: list[str]) -> None:
404
+ if not self.use_s3_integration:
405
+ return
406
+ files_to_persist: list[FileToPersist] = []
407
+
408
+ for git_config_folder in git_config_folders:
409
+ if not os.path.isdir(git_config_folder):
410
+ continue
411
+ if not len(os.listdir(git_config_folder)):
412
+ continue
413
+
414
+ for root_path, _, f_names in os.walk(git_config_folder):
415
+ for file_path in f_names:
416
+ _, file_extension = os.path.splitext(file_path)
417
+ if file_extension in SUPPORTED_FILE_EXTENSIONS:
418
+ full_file_path = os.path.join(root_path, file_path)
419
+ relative_file_path = os.path.relpath(full_file_path, root_dir)
420
+ files_to_persist.append(FileToPersist(full_file_path, relative_file_path))
421
+
422
+ self.persist_files(files_to_persist)
423
+
424
+ def persist_scan_results(self, scan_reports: list[Report]) -> None:
425
+ """
426
+ Persist s1cns's scan result into s1cns's platform.
427
+ :param scan_reports: List of s1cns scan reports
428
+ """
429
+ if not self.use_s3_integration or not self.s3_client:
430
+ return
431
+ if not self.bucket or not self.repo_path:
432
+ logging.error(f"Something went wrong: bucket {self.bucket}, repo path {self.repo_path}")
433
+ return
434
+
435
+ # just process reports with actual results in it
436
+ self.scan_reports = [scan_report for scan_report in scan_reports if not scan_report.is_empty(full=True)]
437
+
438
+ reduced_scan_reports = reduce_scan_reports(self.scan_reports)
439
+ checks_metadata_paths = enrich_and_persist_checks_metadata(self.scan_reports, self.s3_client, self.bucket,
440
+ self.repo_path)
441
+ dpath.merge(reduced_scan_reports, checks_metadata_paths)
442
+ persist_checks_results(reduced_scan_reports, self.s3_client, self.bucket, self.repo_path)
443
+
444
+ def persist_image_scan_results(self, report: dict[str, Any] | None, file_path: str, image_name: str, branch: str) -> None:
445
+ if not self.s3_client:
446
+ logging.error("S3 upload was not correctly initialized")
447
+ return
448
+ if not self.bucket or not self.repo_path:
449
+ logging.error("Bucket or repo_path was not set")
450
+ return
451
+
452
+ repo_path_without_src = os.path.dirname(self.repo_path)
453
+ target_report_path = f'{repo_path_without_src}/{s1cns_results_prefix}/{CheckType.SCA_IMAGE}/raw_results.json'
454
+ to_upload = {"report": report, "file_path": file_path, "image_name": image_name, "branch": branch}
455
+ _put_json_object(self.s3_client, to_upload, self.bucket, target_report_path)
456
+
457
+ def persist_enriched_secrets(self, enriched_secrets: list[EnrichedSecret]) -> str | None:
458
+ if not enriched_secrets or not self.repo_path or not self.bucket:
459
+ logging.debug(f'One of enriched secrets, repo path, or bucket are empty, aborting. values:'
460
+ f'enriched_secrets={"Valid" if enriched_secrets else "Empty"},'
461
+ f' repo_path={self.repo_path}, bucket={self.bucket}')
462
+ return None
463
+
464
+ if not bc_integration.bc_api_key or not os.getenv("CKV_VALIDATE_SECRETS"):
465
+ logging.debug('Skipping persistence of enriched secrets object as secrets verification is off,'
466
+ ' enabled it via env var CKV_VALIDATE_SECRETS and provide an api key')
467
+ return None
468
+
469
+ if not self.s3_client:
470
+ logging.error("S3 upload was not correctly initialized")
471
+ return None
472
+
473
+ base_path = re.sub(REPO_PATH_PATTERN, r'original_secrets/\1', self.repo_path)
474
+ s3_path = f'{base_path}/{uuid.uuid4()}.json'
475
+ try:
476
+ _put_json_object(self.s3_client, enriched_secrets, self.bucket, s3_path, log_stack_trace_on_error=False)
477
+ except ClientError:
478
+ logging.warning("Got access denied, retrying as s3 role changes should be propagated")
479
+ sleep(4)
480
+ try:
481
+ _put_json_object(self.s3_client, enriched_secrets, self.bucket, s3_path, log_stack_trace_on_error=False)
482
+ except ClientError:
483
+ logging.error("Getting access denied consistently, skipping secrets verification, please try again")
484
+ return None
485
+
486
+ return s3_path
487
+
488
+ def persist_run_metadata(self, run_metadata: dict[str, str | list[str]]) -> None:
489
+ if not self.use_s3_integration or not self.s3_client:
490
+ return
491
+ if not self.bucket or not self.repo_path:
492
+ logging.error(f"Something went wrong: bucket {self.bucket}, repo path {self.repo_path}")
493
+ return
494
+ persist_run_metadata(run_metadata, self.s3_client, self.bucket, self.repo_path, True)
495
+ # only upload it if we did not fall back to use the same location
496
+ if self.support_bucket and self.support_repo_path and self.support_repo_path != self.repo_path:
497
+ logging.debug('Also uploading run_metadata.json to support location')
498
+ persist_run_metadata(run_metadata, self.s3_client, self.support_bucket, self.support_repo_path, False)
499
+
500
+ def persist_logs_stream(self, logs_stream: StringIO) -> None:
501
+ if not self.use_s3_integration or not self.s3_client:
502
+ return
503
+ if not self.support_bucket or not self.support_repo_path:
504
+ logging.error(f"Something went wrong with the log upload location: bucket {self.support_bucket}, repo path {self.support_repo_path}")
505
+ return
506
+ # use s1cns_results if we fall back to using the same location
507
+ log_path = f'{self.support_repo_path}/s1cns_results' if self.support_repo_path == self.repo_path else self.support_repo_path
508
+ persist_logs_stream(logs_stream, self.s3_client, self.support_bucket, log_path)
509
+
510
+ def commit_repository(self, branch: str) -> str | None:
511
+ """
512
+ :param branch: branch to be persisted
513
+ Finalize the repository's scanning in s1cns's platform.
514
+ """
515
+ try_num = 0
516
+ while try_num < MAX_RETRIES:
517
+ if not self.use_s3_integration:
518
+ return None
519
+
520
+ request = None
521
+ response = None
522
+ try:
523
+ if not self.http:
524
+ logging.error("HTTP manager was not correctly created")
525
+ return None
526
+ if not self.bc_source:
527
+ logging.error("Source was not set")
528
+ return None
529
+ if not self.bc_source.upload_results:
530
+ # no need to upload something
531
+ return None
532
+
533
+ request = self.http.request("PUT", f"{self.integrations_api_url}?source={self.bc_source.name}", # type:ignore[no-untyped-call]
534
+ body=json.dumps(
535
+ {"path": self.repo_path, "branch": branch,
536
+ "to_branch": CI_METADATA_EXTRACTOR.to_branch,
537
+ "pr_id": CI_METADATA_EXTRACTOR.pr_id,
538
+ "pr_url": CI_METADATA_EXTRACTOR.pr_url,
539
+ "commit_hash": CI_METADATA_EXTRACTOR.commit_hash,
540
+ "commit_url": CI_METADATA_EXTRACTOR.commit_url,
541
+ "author": CI_METADATA_EXTRACTOR.author_name,
542
+ "author_url": CI_METADATA_EXTRACTOR.author_url,
543
+ "run_id": CI_METADATA_EXTRACTOR.run_id,
544
+ "run_url": CI_METADATA_EXTRACTOR.run_url,
545
+ "repository_url": CI_METADATA_EXTRACTOR.repository_url}),
546
+ headers=merge_dicts({"Authorization": self.get_auth_token(),
547
+ "Content-Type": "application/json",
548
+ 'x-api-client': self.bc_source.name,
549
+ 'x-api-s1cns-version': s1cns_version},
550
+ get_user_agent_header()
551
+ ))
552
+ response = json.loads(request.data.decode("utf8"))
553
+ url: str = response.get("url", None)
554
+ return url
555
+ except HTTPError:
556
+ logging.error(f"Failed to commit repository {self.repo_path}", exc_info=True)
557
+ raise
558
+ except JSONDecodeError:
559
+ if request:
560
+ logging.warning(f"Response (status: {request.status}) of {self.integrations_api_url}: {request.data.decode('utf8')}")
561
+ logging.error(f"Response of {self.integrations_api_url} is not a valid JSON", exc_info=True)
562
+ raise
563
+ finally:
564
+ if request and request.status == 201 and response and response.get("result") == "Success":
565
+ logging.info(f"Finalize repository {self.repo_id} in s1cns's platform")
566
+ elif (
567
+ response
568
+ and try_num < MAX_RETRIES
569
+ and re.match("The integration ID .* in progress", response.get("message", ""))
570
+ ):
571
+ logging.info(
572
+ f"Failed to persist for repo {self.repo_id}, sleeping for {SLEEP_SECONDS} seconds before retrying")
573
+ try_num += 1
574
+ sleep(SLEEP_SECONDS)
575
+ else:
576
+ raise Exception(
577
+ f"Failed to finalize repository {self.repo_id} in s1cns's platform\n{response}")
578
+
579
+ return None
580
+
581
+ def persist_files(self, files_to_persist: list[FileToPersist]) -> None:
582
+ logging.info(f"Persisting {len(files_to_persist)} files")
583
+ with futures.ThreadPoolExecutor() as executor:
584
+ futures.wait(
585
+ [executor.submit(self._persist_file, file_to_persist.full_file_path, file_to_persist.s3_file_key) for
586
+ file_to_persist in files_to_persist],
587
+ return_when=futures.FIRST_EXCEPTION,
588
+ )
589
+ logging.info(f"Done persisting {len(files_to_persist)} files")
590
+
591
+ def _persist_file(self, full_file_path: str, s3_file_key: str) -> None:
592
+ tries = MAX_RETRIES
593
+ curr_try = 0
594
+
595
+ if not self.s3_client or not self.bucket or not self.repo_path:
596
+ logging.error(
597
+ f"Something went wrong: S3 client {self.s3_client} bucket {self.bucket}, repo path {self.repo_path}"
598
+ )
599
+ return
600
+
601
+ file_object_key = os.path.join(self.repo_path, s3_file_key).replace("\\", "/")
602
+ while curr_try < tries:
603
+ try:
604
+ self.s3_client.upload_file(full_file_path, self.bucket, file_object_key)
605
+ return
606
+ except ClientError as e:
607
+ if e.response.get('Error', {}).get('Code') == 'AccessDenied':
608
+ sleep(SLEEP_SECONDS)
609
+ curr_try += 1
610
+ else:
611
+ logging.error(f"failed to persist file {full_file_path} into S3 bucket {self.bucket}",
612
+ exc_info=True)
613
+ raise
614
+ except Exception:
615
+ logging.error(f"failed to persist file {full_file_path} into S3 bucket {self.bucket}", exc_info=True)
616
+ raise
617
+ if curr_try == tries:
618
+ logging.error(
619
+ f"failed to persist file {full_file_path} into S3 bucket {self.bucket} - gut AccessDenied {tries} times")
620
+
621
+ def get_platform_run_config(self) -> None:
622
+ if self.skip_download is True:
623
+ logging.debug("Skipping downloading configs from platform")
624
+ return
625
+
626
+ if self.is_integration_configured():
627
+ self.get_customer_run_config()
628
+ else:
629
+ self.get_public_run_config()
630
+
631
+ def _get_run_config_query_params(self) -> str:
632
+ return f'module={"bc" if self.is_bc_token(self.bc_api_key) else "pc"}&enforcementv2=true'
633
+
634
+ def get_run_config_url(self) -> str:
635
+ return f'{self.platform_run_config_url}?{self._get_run_config_query_params()}'
636
+
637
+ def get_run_config_url_backoff(self) -> str:
638
+ return f'{self.platform_run_config_url_backoff}?{self._get_run_config_query_params()}'
639
+
640
+ def get_customer_run_config(self) -> None:
641
+ if self.skip_download is True:
642
+ logging.debug("Skipping customer run config API call")
643
+ return
644
+
645
+ if not self.bc_api_key or not self.is_integration_configured():
646
+ raise Exception(
647
+ "Tried to get customer run config, but the API key was missing or the integration was not set up")
648
+
649
+ if not self.bc_source:
650
+ logging.error("Source was not set")
651
+ return
652
+
653
+ try:
654
+ token = self.get_auth_token()
655
+ headers = merge_dicts(get_auth_header(token),
656
+ get_default_get_headers(self.bc_source, self.bc_source_version))
657
+
658
+ self.setup_http_manager()
659
+ if not self.http:
660
+ logging.error("HTTP manager was not correctly created")
661
+ return
662
+
663
+ platform_type = PRISMA_PLATFORM if self.is_prisma_integration() else SENTINELONE_CNS_PLATFORM
664
+
665
+ url = self.get_run_config_url()
666
+ logging.debug(f'Platform run config URL: {url}')
667
+ request = self.http.request("GET", url, headers=headers) # type:ignore[no-untyped-call]
668
+ if request.status != 200:
669
+ url = self.get_run_config_url_backoff()
670
+ logging.debug(f'Platform run config URL: {url}')
671
+ request = self.http.request("GET", url, headers=headers) # type:ignore[no-untyped-call]
672
+ if request.status != 200:
673
+ error_message = get_auth_error_message(request.status, self.is_prisma_integration(), False)
674
+ logging.error(error_message)
675
+ raise SentinelOneCnsAuthError(error_message)
676
+ self.customer_run_config_response = json.loads(request.data.decode("utf8"))
677
+
678
+ logging.debug(f"Got customer run config from {platform_type} platform")
679
+ except Exception:
680
+ logging.warning(f"Failed to get the customer run config from {self.platform_run_config_url}", exc_info=True)
681
+ raise
682
+
683
+ def get_prisma_build_policies(self, policy_filter: str) -> None:
684
+ """
685
+ Get Prisma policy for enriching runConfig with metadata
686
+ Filters: https://prisma.pan.dev/api/cloud/cspm/policy#operation/get-policy-filters-and-options
687
+ :param policy_filter: comma separated filter string. Example, policy.label=A,cloud.type=aws
688
+ :return:
689
+ """
690
+ if self.skip_download is True:
691
+ logging.debug("Skipping prisma policy API call")
692
+ return
693
+ if not policy_filter:
694
+ return
695
+ if not self.is_prisma_integration():
696
+ return
697
+ if not self.bc_api_key or not self.is_integration_configured():
698
+ raise Exception(
699
+ "Tried to get prisma build policy metadata, "
700
+ "but the API key was missing or the integration was not set up")
701
+ try:
702
+ token = self.get_auth_token()
703
+ headers = merge_dicts(get_prisma_auth_header(token), get_prisma_get_headers())
704
+
705
+ self.setup_http_manager()
706
+ if not self.http:
707
+ logging.error("HTTP manager was not correctly created")
708
+ return
709
+
710
+ logging.debug(f'Prisma policy URL: {self.prisma_policies_url}')
711
+ query_params = convert_prisma_policy_filter_to_dict(policy_filter)
712
+ if self.is_valid_policy_filter(query_params, valid_filters=self.get_prisma_policy_filters()):
713
+ # If enabled and subtype are not explicitly set, use the only acceptable values.
714
+ query_params['policy.enabled'] = True
715
+ query_params['policy.subtype'] = 'build'
716
+ request = self.http.request("GET", self.prisma_policies_url, headers=headers, fields=query_params) # type:ignore[no-untyped-call]
717
+ self.prisma_policies_response = json.loads(request.data.decode("utf8"))
718
+ logging.debug("Got Prisma build policy metadata")
719
+ else:
720
+ logging.warning("Skipping get prisma build policies. --policy-metadata-filter will not be applied.")
721
+ except Exception:
722
+ logging.warning(f"Failed to get prisma build policy metadata from {self.platform_run_config_url}", exc_info=True)
723
+
724
+ def get_prisma_policy_filters(self) -> Dict[str, Dict[str, Any]]:
725
+ try:
726
+ token = self.get_auth_token()
727
+ headers = merge_dicts(get_prisma_auth_header(token), get_prisma_get_headers())
728
+
729
+ self.setup_http_manager()
730
+ if not self.http:
731
+ logging.error("HTTP manager was not correctly created")
732
+ return {}
733
+
734
+ logging.debug(f'Prisma filter URL: {self.prisma_policy_filters_url}')
735
+ request = self.http.request("GET", self.prisma_policy_filters_url, headers=headers) # type:ignore[no-untyped-call]
736
+ policy_filters: dict[str, dict[str, Any]] = json.loads(request.data.decode("utf8"))
737
+ logging.debug(f'Prisma filter suggestion response: {policy_filters}')
738
+ return policy_filters
739
+ except Exception:
740
+ logging.warning(f"Failed to get prisma build policy metadata from {self.platform_run_config_url}", exc_info=True)
741
+ return {}
742
+
743
+ @staticmethod
744
+ def is_valid_policy_filter(policy_filter: dict[str, str], valid_filters: dict[str, dict[str, Any]] | None = None) -> bool:
745
+ """
746
+ Validates only the filter names
747
+ """
748
+ valid_filters = valid_filters or {}
749
+
750
+ if not policy_filter:
751
+ return False
752
+ if not valid_filters:
753
+ return False
754
+ for filter_name, filter_value in policy_filter.items():
755
+ if filter_name not in valid_filters.keys():
756
+ logging.warning(f"Invalid filter name: {filter_name}")
757
+ logging.warning(f"Available filter names: {', '.join(valid_filters.keys())}")
758
+ return False
759
+ elif filter_name == 'policy.subtype' and filter_value != 'build':
760
+ logging.warning(f"Filter value not allowed: {filter_value}")
761
+ logging.warning("Available options: build")
762
+ return False
763
+ elif filter_name == 'policy.enabled' and not convert_str_to_bool(filter_value):
764
+ logging.warning(f"Filter value not allowed: {filter_value}")
765
+ logging.warning("Available options: True")
766
+ return False
767
+ logging.debug("--policy-metadata-filter is valid")
768
+ return True
769
+
770
+ def get_public_run_config(self) -> None:
771
+ if self.skip_download is True:
772
+ logging.debug("Skipping s1cns mapping and guidelines API call")
773
+ return
774
+ try:
775
+ headers: dict[str, Any] = {}
776
+
777
+ self.setup_http_manager()
778
+ if not self.http:
779
+ logging.error("HTTP manager was not correctly created")
780
+ return
781
+
782
+ request = self.http.request("GET", self.guidelines_api_url, headers=headers) # type:ignore[no-untyped-call]
783
+ if request.status >= 300:
784
+ request = self.http.request("GET", self.guidelines_api_url_backoff, headers=headers) # type:ignore[no-untyped-call]
785
+
786
+ self.public_metadata_response = json.loads(request.data.decode("utf8"))
787
+ platform_type = PRISMA_PLATFORM if self.is_prisma_integration() else SENTINELONE_CNS_PLATFORM
788
+ logging.debug(f"Got s1cns mappings and guidelines from {platform_type} platform")
789
+ except Exception:
790
+ logging.warning(f"Failed to get the s1cns mappings and guidelines from {self.guidelines_api_url}. Skips using BC_* IDs will not work.",
791
+ exc_info=True)
792
+
793
+ def onboarding(self) -> None:
794
+ if not self.bc_api_key:
795
+ print(Style.BRIGHT + colored(
796
+ "\nWould you like to “level up” your SentinelOneCns powers for free? The upgrade includes: \n\n", 'green',
797
+ attrs=['bold']) + colored(
798
+ u"\u2022 " + "Command line docker Image scanning\n"
799
+ u"\u2022 " + "Software Composition Analysis\n"
800
+ u"\u2022 " + "Centralized policy management\n"
801
+ u"\u2022 " + "Free s1cns.com account with API access\n"
802
+ u"\u2022 " + "Auto-fix remediation suggestions\n"
803
+ u"\u2022 " + "Enabling of VS Code Plugin\n"
804
+ u"\u2022 " + "Dashboard visualisation of SentinelOneCns scans\n"
805
+ u"\u2022 " + "Integration with GitHub for:\n"
806
+ "\t" + u"\u25E6 " + "\tAutomated Pull Request scanning\n"
807
+ "\t" + u"\u25E6 " + "\tAuto remediation PR generation\n"
808
+ u"\u2022 " + "Integration with up to 100 cloud resources for:\n"
809
+ "\t" + u"\u25E6 " + "\tAutomated cloud resource checks\n"
810
+ "\t" + u"\u25E6 " + "\tResource drift detection\n"
811
+ "\n"
812
+ "\n" + "and much more...",
813
+ 'yellow') +
814
+ colored("\n\nIt's easy and only takes 2 minutes. We can do it right now!\n\n"
815
+ "To Level-up, press 'y'... \n",
816
+ 'cyan') + Style.RESET_ALL)
817
+ reply = self._input_levelup_results()
818
+ if reply[:1] == 'y':
819
+ print(Style.BRIGHT + colored("\nOk, let’s get you started on creating your free account! \n"
820
+ "\nEnter your email address to begin: ", 'green',
821
+ attrs=['bold']) + colored(
822
+ " // This will be used as your login at https://sentinelone.com.\n", 'green'))
823
+ if not self.bc_api_key:
824
+ email = self._input_email()
825
+ print(Style.BRIGHT + colored("\nLooks good!"
826
+ "\nNow choose an Organisation Name: ", 'green',
827
+ attrs=['bold']) + colored(
828
+ " // This will enable collaboration with others who you can add to your team.\n", 'green'))
829
+ org = self._input_orgname()
830
+ print(Style.BRIGHT + colored("\nAmazing!"
831
+ "\nWe are now generating a personal API key to immediately enable some new features… ",
832
+ 'green', attrs=['bold']))
833
+
834
+ bc_api_token, response = self.get_api_token(email, org)
835
+ self.bc_api_key = bc_api_token
836
+ if response.status_code == 200:
837
+ print(Style.BRIGHT + colored("\nComplete!", 'green', attrs=['bold']))
838
+ print('\nSaving API key to {}'.format(s1_cns_file))
839
+ print(Style.BRIGHT + colored(
840
+ "\nSentinelOneCns will automatically check this location for a key. If you forget it you’ll find it here\nhttps://sentinelone.com/integrations/api-token\n\n",
841
+ 'green'))
842
+ persist_key(self.bc_api_key)
843
+ print(Style.BRIGHT + colored(
844
+ "SentinelOneCns Dashboard is configured, opening https://sentinelone.com to explore your new powers.",
845
+ 'green', attrs=['bold']))
846
+ print(Style.BRIGHT + colored("FYI - check your inbox for login details! \n", 'green'))
847
+
848
+ print(Style.BRIGHT + colored(
849
+ "Congratulations! You’ve just super-sized your SentinelOneCns! Why not test-drive image scanning now:",
850
+ 'cyan'))
851
+
852
+ print(Style.BRIGHT + colored(
853
+ "\ns1cns --docker-image ubuntu --dockerfile-path /Users/bob/workspaces/s1cns/Dockerfile --repo-id bob/test --branch master\n",
854
+ 'white'))
855
+
856
+ print(Style.BRIGHT + colored(
857
+ "Or download our VS Code plugin: https://github.com/s1cnsio/s1cns-vscode \n",
858
+ 'cyan', attrs=['bold']))
859
+
860
+ print(Style.BRIGHT + colored(
861
+ "Interested in contributing to SentinelOneCns as an open source developer. We thought you’d never ask. Check us out at: \nhttps://github.com/s1cnsio/s1cns/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 \n",
862
+ 'white', attrs=['bold']))
863
+
864
+ else:
865
+ print(
866
+ Style.BRIGHT + colored("\nCould not create account, please try again on your next scan! \n",
867
+ 'red', attrs=['bold']) + Style.RESET_ALL)
868
+ webbrowser.open(
869
+ "https://sentinelone.com/?utm_source=cli&utm_medium=organic_oss&utm_campaign=s1cns")
870
+ else:
871
+ print(
872
+ "\n To see the Dashboard prompt again, run `s1cns` with no arguments \n For SentinelOneCns usage, try `s1-cns-cli --help`")
873
+ else:
874
+ print("No argument given. Try ` --help` for further information")
875
+
876
+ def get_report_to_platform(self, args: argparse.Namespace, scan_reports: list[Report]) -> None:
877
+ if self.bc_api_key:
878
+
879
+ if args.directory:
880
+ repo_id = self.get_repository(args)
881
+ self.setup_s1cns_credentials(repo_id=repo_id)
882
+ if self.is_integration_configured():
883
+ self._upload_run(args, scan_reports)
884
+
885
+ # Added this to generate a default repo_id for cli scans for upload to the platform
886
+ # whilst also persisting a cli repo_id into the object
887
+ def persist_bc_api_key(self, args: argparse.Namespace) -> str | None:
888
+ if args.bc_api_key:
889
+ self.bc_api_key = args.bc_api_key
890
+ else:
891
+ # get the key from file
892
+ self.bc_api_key = read_key()
893
+ return self.bc_api_key
894
+
895
+ # Added this to generate a default repo_id for cli scans for upload to the platform
896
+ # whilst also persisting a cli repo_id into the object
897
+ def persist_repo_id(self, args: argparse.Namespace) -> str:
898
+ if args.repo_id is None:
899
+ if CI_METADATA_EXTRACTOR.from_branch:
900
+ self.repo_id = CI_METADATA_EXTRACTOR.from_branch
901
+ if args.directory:
902
+ basename = path.basename(os.path.abspath(args.directory[0]))
903
+ self.repo_id = f"cli_repo/{basename}"
904
+ if args.file:
905
+ # Get the base path of the file based on it's absolute path
906
+ basename = os.path.basename(os.path.dirname(os.path.abspath(args.file[0])))
907
+ self.repo_id = f"cli_repo/{basename}"
908
+
909
+ else:
910
+ self.repo_id = args.repo_id
911
+
912
+ if not self.repo_id:
913
+ # this should not happen
914
+ self.repo_id = "cli_repo/unknown"
915
+
916
+ return self.repo_id
917
+
918
+ def get_repository(self, args: argparse.Namespace) -> str:
919
+ if CI_METADATA_EXTRACTOR.from_branch:
920
+ return CI_METADATA_EXTRACTOR.from_branch
921
+ basename = 'unnamed_repo' if path.basename(args.directory[0]) == '.' else path.basename(args.directory[0])
922
+ repo_id = f"cli_repo/{basename}"
923
+ return repo_id
924
+
925
+ def get_api_token(self, email: str, org: str) -> tuple[str, Response]:
926
+ response = self._create_s1cns_account(email, org)
927
+ bc_api_token = response.json()["s1cnsSignup"]
928
+ return bc_api_token, response
929
+
930
+ def _upload_run(self, args: argparse.Namespace, scan_reports: list[Report]) -> None:
931
+ print(Style.BRIGHT + colored("Connecting to SentinelOneCns.com...", 'green',
932
+ attrs=['bold']) + Style.RESET_ALL)
933
+ self.persist_repository(args.directory[0])
934
+ print(Style.BRIGHT + colored("Metadata upload complete", 'green',
935
+ attrs=['bold']) + Style.RESET_ALL)
936
+ self.persist_scan_results(scan_reports)
937
+ print(Style.BRIGHT + colored("Report upload complete", 'green',
938
+ attrs=['bold']) + Style.RESET_ALL)
939
+ self.commit_repository(args.branch)
940
+ print(Style.BRIGHT + colored(
941
+ "COMPLETE! \nYour results are in your SentinelOneCns dashboard, available here: https://sentinelone.com \n",
942
+ 'green', attrs=['bold']) + Style.RESET_ALL)
943
+
944
+ def _create_s1cns_account(self, email: str, org: str) -> Response:
945
+ """
946
+ Create new s1cns account
947
+ :param email: email of account owner
948
+ :return: account creation response
949
+ """
950
+ payload = {
951
+ "owner_email": email,
952
+ "org": org,
953
+ "source": ONBOARDING_SOURCE,
954
+ "customer_name": org
955
+ }
956
+ response = requests.request("POST", self.onboarding_url, headers=SIGNUP_HEADER, json=payload)
957
+ if response.status_code == 200:
958
+ return response
959
+ else:
960
+ raise Exception("failed to create a s1cns account. An organization with this name might already "
961
+ "exist with this email address. Please login sentinelone.com to retrieve access key")
962
+
963
+ def _input_orgname(self) -> str:
964
+ while True:
965
+ result = str(input('Organization name: ')).lower().strip() # nosec
966
+ # remove spaces and special characters
967
+ result = ''.join(e for e in result if e.isalnum())
968
+ if result:
969
+ break
970
+ return result
971
+
972
+ def _input_visualize_results(self) -> str:
973
+ while True:
974
+ result = str(input('Visualize results? (y/n): ')).lower().strip() # nosec
975
+ if result[:1] in ["y", "n"]:
976
+ break
977
+ return result
978
+
979
+ def _input_levelup_results(self) -> str:
980
+ while True:
981
+ result = str(input('Level up? (y/n): ')).lower().strip() # nosec
982
+ if result[:1] in ["y", "n"]:
983
+ break
984
+ return result
985
+
986
+ def _input_email(self) -> str:
987
+ while True:
988
+ email = str(input('E-Mail: ')).lower().strip() # nosec
989
+ if re.search(EMAIL_PATTERN, email):
990
+ break
991
+ else:
992
+ print("email should match the following pattern: {}".format(EMAIL_PATTERN))
993
+ return email
994
+
995
+ @staticmethod
996
+ def loading_output(msg: str) -> None:
997
+ with trange(ACCOUNT_CREATION_TIME) as t:
998
+ for _ in t:
999
+ t.set_description(msg)
1000
+ t.set_postfix(refresh=False)
1001
+ sleep(SLEEP_SECONDS)
1002
+
1003
+ def repo_matches(self, repo_name: str) -> bool:
1004
+ # matches xyz_org/repo or org/repo (where xyz is the BC org name and the CLI repo prefix from the platform)
1005
+ return re.match(re.compile(f'^(\\w+_)?{self.repo_id}$'), repo_name) is not None
1006
+
1007
+ def get_default_headers(self, request_type: str) -> dict[str, Any]:
1008
+ if not self.bc_source:
1009
+ logging.warning("Source was not set")
1010
+ return {}
1011
+
1012
+ if request_type.upper() == "GET":
1013
+ return merge_dicts(get_default_get_headers(self.bc_source, self.bc_source_version),
1014
+ {"Authorization": self.get_auth_token()})
1015
+ elif request_type.upper() == "POST":
1016
+ return merge_dicts(get_default_post_headers(self.bc_source, self.bc_source_version),
1017
+ {"Authorization": self.get_auth_token()})
1018
+
1019
+ logging.info(f"Unsupported request {request_type}")
1020
+ return {}
1021
+
1022
+
1023
+ bc_integration = BcPlatformIntegration()