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.
- s1_cns_cli/__init__.py +0 -0
- s1_cns_cli/cli/__init__.py +0 -0
- s1_cns_cli/cli/command_line_arguments.py +683 -0
- s1_cns_cli/cli/config/__init__.py +1 -0
- s1_cns_cli/cli/config/config.py +64 -0
- s1_cns_cli/cli/config/config_manager.py +30 -0
- s1_cns_cli/cli/main.py +167 -0
- s1_cns_cli/cli/registry.py +361 -0
- s1_cns_cli/cli/scan/__init__.py +0 -0
- s1_cns_cli/cli/scan/code_scanner.py +62 -0
- s1_cns_cli/cli/scan/iac.py +798 -0
- s1_cns_cli/cli/scan/secret.py +423 -0
- s1_cns_cli/cli/scan/vulnerability.py +396 -0
- s1_cns_cli/cli/utils.py +545 -0
- s1_cns_cli/s1graph/__init__.py +0 -0
- s1_cns_cli/s1graph/ansible/__init__.py +1 -0
- s1_cns_cli/s1graph/ansible/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/ansible/checks/base_ansible_task_check.py +76 -0
- s1_cns_cli/s1graph/ansible/checks/base_ansible_task_value_check.py +79 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/BlockErrorHandling.yaml +10 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfDisableGpgCheck.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfSslVerify.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/DnfValidateCerts.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/GetUrlHttpsOnly.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosInterfaceMgmtProfileNoHTTP.yaml +17 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosInterfaceMgmtProfileNoTelnet.yaml +17 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyDescription.yaml +16 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyLogForwarding.yaml +16 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyLoggingEnabled.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoApplicationAny.yaml +22 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoDSRI.yaml +17 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoServiceAny.yaml +22 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosPolicyNoSrcAnyDstAny.yaml +40 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosZoneProtectionProfile.yaml +16 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/PanosZoneUserIDIncludeACL.yaml +31 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/UriHttpsOnly.yaml +12 -0
- s1_cns_cli/s1graph/ansible/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/ansible/checks/registry.py +4 -0
- s1_cns_cli/s1graph/ansible/checks/task/__init__.py +2 -0
- s1_cns_cli/s1graph/ansible/checks/task/aws/EC2EBSOptimized.py +31 -0
- s1_cns_cli/s1graph/ansible/checks/task/aws/EC2PublicIP.py +34 -0
- s1_cns_cli/s1graph/ansible/checks/task/aws/__init__.py +4 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/AptAllowUnauthenticated.py +28 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/AptForce.py +28 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/GetUrlValidateCerts.py +23 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/UriValidateCerts.py +23 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/YumSslVerify.py +23 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/YumValidateCerts.py +23 -0
- s1_cns_cli/s1graph/ansible/checks/task/builtin/__init__.py +4 -0
- s1_cns_cli/s1graph/ansible/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/ansible/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/ansible/graph_builder/graph_components/resource_types.py +10 -0
- s1_cns_cli/s1graph/ansible/graph_builder/local_graph.py +145 -0
- s1_cns_cli/s1graph/ansible/runner.py +132 -0
- s1_cns_cli/s1graph/ansible/utils.py +91 -0
- s1_cns_cli/s1graph/argo_workflows/__init__.py +1 -0
- s1_cns_cli/s1graph/argo_workflows/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/argo_workflows/checks/base_argo_workflows_check.py +41 -0
- s1_cns_cli/s1graph/argo_workflows/checks/registry.py +4 -0
- s1_cns_cli/s1graph/argo_workflows/checks/template/DefaultServiceAccount.py +29 -0
- s1_cns_cli/s1graph/argo_workflows/checks/template/RunAsNonRoot.py +31 -0
- s1_cns_cli/s1graph/argo_workflows/checks/template/__init__.py +4 -0
- s1_cns_cli/s1graph/argo_workflows/common/__init__.py +0 -0
- s1_cns_cli/s1graph/argo_workflows/runner.py +142 -0
- s1_cns_cli/s1graph/arm/__init__.py +1 -0
- s1_cns_cli/s1graph/arm/base_parameter_check.py +44 -0
- s1_cns_cli/s1graph/arm/base_registry.py +16 -0
- s1_cns_cli/s1graph/arm/base_resource_check.py +66 -0
- s1_cns_cli/s1graph/arm/base_resource_negative_value_check.py +70 -0
- s1_cns_cli/s1graph/arm/base_resource_value_check.py +72 -0
- s1_cns_cli/s1graph/arm/checks/__init__.py +2 -0
- s1_cns_cli/s1graph/arm/checks/graph_checks/AzureSpringCloudConfigWithVnet.yaml +15 -0
- s1_cns_cli/s1graph/arm/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/arm/checks/parameter/SecureStringParameterNoHardcodedValue.py +23 -0
- s1_cns_cli/s1graph/arm/checks/parameter/__init__.py +5 -0
- s1_cns_cli/s1graph/arm/checks/resource/AKSApiServerAuthorizedIpRanges.py +45 -0
- s1_cns_cli/s1graph/arm/checks/resource/AKSDashboardDisabled.py +39 -0
- s1_cns_cli/s1graph/arm/checks/resource/AKSLoggingEnabled.py +39 -0
- s1_cns_cli/s1graph/arm/checks/resource/AKSNetworkPolicy.py +36 -0
- s1_cns_cli/s1graph/arm/checks/resource/AKSRbacEnabled.py +33 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceAuthentication.py +39 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceClientCertificate.py +27 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceHTTPSOnly.py +26 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceHttps20Enabled.py +24 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceIdentity.py +32 -0
- s1_cns_cli/s1graph/arm/checks/resource/AppServiceMinTLSVersion.py +24 -0
- s1_cns_cli/s1graph/arm/checks/resource/AzureInstancePassword.py +37 -0
- s1_cns_cli/s1graph/arm/checks/resource/AzureManagedDiscEncryption.py +30 -0
- s1_cns_cli/s1graph/arm/checks/resource/AzureScaleSetPassword.py +38 -0
- s1_cns_cli/s1graph/arm/checks/resource/CosmosDBDisableAccessKeyWrite.py +24 -0
- s1_cns_cli/s1graph/arm/checks/resource/CustomRoleDefinitionSubscriptionOwner.py +39 -0
- s1_cns_cli/s1graph/arm/checks/resource/KeyvaultRecoveryEnabled.py +28 -0
- s1_cns_cli/s1graph/arm/checks/resource/MariaDBSSLEnforcementEnabled.py +22 -0
- s1_cns_cli/s1graph/arm/checks/resource/MonitorLogProfileCategories.py +27 -0
- s1_cns_cli/s1graph/arm/checks/resource/MonitorLogProfileRetentionDays.py +31 -0
- s1_cns_cli/s1graph/arm/checks/resource/MySQLServerSSLEnforcementEnabled.py +22 -0
- s1_cns_cli/s1graph/arm/checks/resource/NSGRulePortAccessRestricted.py +65 -0
- s1_cns_cli/s1graph/arm/checks/resource/NSGRuleRDPAccessRestricted.py +11 -0
- s1_cns_cli/s1graph/arm/checks/resource/NSGRuleSSHAccessRestricted.py +9 -0
- s1_cns_cli/s1graph/arm/checks/resource/NetworkWatcherFlowLogPeriod.py +38 -0
- s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerConnectionThrottlingEnabled.py +43 -0
- s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerLogCheckpointsEnabled.py +44 -0
- s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerLogConnectionsEnabled.py +44 -0
- s1_cns_cli/s1graph/arm/checks/resource/PostgreSQLServerSSLEnforcementEnabled.py +22 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerAuditingEnabled.py +42 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerAuditingRetention90Days.py +43 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerEmailAlertsEnabled.py +42 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerEmailAlertsToAdminsEnabled.py +43 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerNoPublicAccess.py +38 -0
- s1_cns_cli/s1graph/arm/checks/resource/SQLServerThreatDetectionTypes.py +37 -0
- s1_cns_cli/s1graph/arm/checks/resource/SecretExpirationDate.py +27 -0
- s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactEmailAlert.py +26 -0
- s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactEmailAlertAdmins.py +26 -0
- s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterContactPhone.py +26 -0
- s1_cns_cli/s1graph/arm/checks/resource/SecurityCenterStandardPricing.py +26 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageAccountAzureServicesAccessEnabled.py +40 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageAccountDefaultNetworkAccessDeny.py +38 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageAccountDisablePublicAccess.py +24 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageAccountLoggingQueueServiceEnabled.py +41 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageAccountsTransportEncryption.py +40 -0
- s1_cns_cli/s1graph/arm/checks/resource/StorageBlobServiceContainerPrivateAccess.py +32 -0
- s1_cns_cli/s1graph/arm/checks/resource/__init__.py +5 -0
- s1_cns_cli/s1graph/arm/context_parser.py +229 -0
- s1_cns_cli/s1graph/arm/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/arm/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/arm/graph_builder/graph_components/block_types.py +12 -0
- s1_cns_cli/s1graph/arm/graph_builder/graph_components/blocks.py +19 -0
- s1_cns_cli/s1graph/arm/graph_builder/local_graph.py +109 -0
- s1_cns_cli/s1graph/arm/graph_manager.py +42 -0
- s1_cns_cli/s1graph/arm/parser/__init__.py +0 -0
- s1_cns_cli/s1graph/arm/parser/parser.py +79 -0
- s1_cns_cli/s1graph/arm/registry.py +4 -0
- s1_cns_cli/s1graph/arm/runner.py +291 -0
- s1_cns_cli/s1graph/arm/utils.py +59 -0
- s1_cns_cli/s1graph/azure_pipelines/__init__.py +1 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/base_azure_pipelines_check.py +41 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/job/ContainerDigest.py +33 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/job/ContainerLatestTag.py +42 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/job/DetectImagesUsage.py +26 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/job/SetSecretVariable.py +41 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/job/__init__.py +4 -0
- s1_cns_cli/s1graph/azure_pipelines/checks/registry.py +4 -0
- s1_cns_cli/s1graph/azure_pipelines/common/__init__.py +0 -0
- s1_cns_cli/s1graph/azure_pipelines/common/resource_id_utils.py +41 -0
- s1_cns_cli/s1graph/azure_pipelines/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/azure_pipelines/image_referencer/manager.py +13 -0
- s1_cns_cli/s1graph/azure_pipelines/image_referencer/provider.py +71 -0
- s1_cns_cli/s1graph/azure_pipelines/runner.py +97 -0
- s1_cns_cli/s1graph/bicep/__init__.py +1 -0
- s1_cns_cli/s1graph/bicep/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/checks/graph_checks/SQLServerAuditingEnabled.yaml +39 -0
- s1_cns_cli/s1graph/bicep/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/checks/param/__init__.py +1 -0
- s1_cns_cli/s1graph/bicep/checks/param/azure/SecureStringParameterNoHardcodedValue.py +27 -0
- s1_cns_cli/s1graph/bicep/checks/param/azure/__init__.py +4 -0
- s1_cns_cli/s1graph/bicep/checks/param/base_param_check.py +48 -0
- s1_cns_cli/s1graph/bicep/checks/param/base_registry.py +36 -0
- s1_cns_cli/s1graph/bicep/checks/param/registry.py +3 -0
- s1_cns_cli/s1graph/bicep/checks/resource/__init__.py +1 -0
- s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountAzureServicesAccessEnabled.py +36 -0
- s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountDefaultNetworkAccessDeny.py +24 -0
- s1_cns_cli/s1graph/bicep/checks/resource/azure/StorageAccountsTransportEncryption.py +40 -0
- s1_cns_cli/s1graph/bicep/checks/resource/azure/__init__.py +4 -0
- s1_cns_cli/s1graph/bicep/checks/resource/base_registry.py +58 -0
- s1_cns_cli/s1graph/bicep/checks/resource/base_resource_check.py +47 -0
- s1_cns_cli/s1graph/bicep/checks/resource/base_resource_value_check.py +68 -0
- s1_cns_cli/s1graph/bicep/checks/resource/registry.py +3 -0
- s1_cns_cli/s1graph/bicep/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/graph_builder/context_definitions.py +57 -0
- s1_cns_cli/s1graph/bicep/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/graph_builder/graph_components/block_types.py +16 -0
- s1_cns_cli/s1graph/bicep/graph_builder/graph_components/blocks.py +19 -0
- s1_cns_cli/s1graph/bicep/graph_builder/graph_to_tf_definitions.py +48 -0
- s1_cns_cli/s1graph/bicep/graph_builder/local_graph.py +337 -0
- s1_cns_cli/s1graph/bicep/graph_builder/variable_rendering/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/graph_builder/variable_rendering/renderer.py +57 -0
- s1_cns_cli/s1graph/bicep/graph_manager.py +41 -0
- s1_cns_cli/s1graph/bicep/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/image_referencer/base_provider.py +38 -0
- s1_cns_cli/s1graph/bicep/image_referencer/manager.py +19 -0
- s1_cns_cli/s1graph/bicep/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/bicep/image_referencer/provider/azure.py +74 -0
- s1_cns_cli/s1graph/bicep/parser.py +50 -0
- s1_cns_cli/s1graph/bicep/runner.py +281 -0
- s1_cns_cli/s1graph/bicep/utils.py +113 -0
- s1_cns_cli/s1graph/bitbucket/__init__.py +1 -0
- s1_cns_cli/s1graph/bitbucket/base_bitbucket_configuration_check.py +43 -0
- s1_cns_cli/s1graph/bitbucket/checks/__init__.py +4 -0
- s1_cns_cli/s1graph/bitbucket/checks/merge_requests_approvals.py +35 -0
- s1_cns_cli/s1graph/bitbucket/dal.py +78 -0
- s1_cns_cli/s1graph/bitbucket/registry.py +4 -0
- s1_cns_cli/s1graph/bitbucket/runner.py +55 -0
- s1_cns_cli/s1graph/bitbucket/schemas/__init__.py +0 -0
- s1_cns_cli/s1graph/bitbucket/schemas/branch_restrictions.py +210 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/__init__.py +1 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/base_bitbucket_pipelines_check.py +39 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/checks/__init__.py +4 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/checks/latest_image.py +38 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/registry.py +4 -0
- s1_cns_cli/s1graph/bitbucket_pipelines/runner.py +141 -0
- s1_cns_cli/s1graph/circleci_pipelines/__init__.py +1 -0
- s1_cns_cli/s1graph/circleci_pipelines/base_circleci_pipelines_check.py +42 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/DetectImagesUsage.py +27 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/ReverseShellNetcat.py +38 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/ShellInjection.py +42 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/SuspectCurlInScript.py +37 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/__init__.py +4 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/image_version_not_hash.py +37 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/latest_image.py +33 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/prevent_development_orbs.py +32 -0
- s1_cns_cli/s1graph/circleci_pipelines/checks/prevent_volatile_orbs.py +32 -0
- s1_cns_cli/s1graph/circleci_pipelines/common/__init__.py +0 -0
- s1_cns_cli/s1graph/circleci_pipelines/common/shell_injection_list.py +8 -0
- s1_cns_cli/s1graph/circleci_pipelines/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/circleci_pipelines/image_referencer/manager.py +12 -0
- s1_cns_cli/s1graph/circleci_pipelines/image_referencer/provider.py +50 -0
- s1_cns_cli/s1graph/circleci_pipelines/registry.py +4 -0
- s1_cns_cli/s1graph/circleci_pipelines/runner.py +123 -0
- s1_cns_cli/s1graph/cloudformation/__init__.py +1 -0
- s1_cns_cli/s1graph/cloudformation/cfn_utils.py +238 -0
- s1_cns_cli/s1graph/cloudformation/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/checks/graph_checks/AppSyncProtectedByWAF.yaml +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/BaseCloudsplainingIAMCheck.py +82 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBDropHttpHeaders.py +41 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBListenerHTTPS.py +49 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ALBListenerTLS12.py +57 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayAccessLogging.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayAuthorization.py +26 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayCacheEnable.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayV2AccessLogging.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/APIGatewayXray.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py +50 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AmazonMQBrokerPublicAccess.py +33 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AppSyncFieldLevelLogs.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AppSyncLogging.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AthenaWorkgroupConfiguration.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/AuroraEncryption.py +33 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/BackupVaultEncrypted.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudFrontTLS12.py +25 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudWatchLogGroupKMSKey.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudWatchLogGroupRetention.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudfrontDistributionEncryption.py +38 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudfrontDistributionLogging.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailEncryption.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailLogValidation.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CloudtrailMultiRegion.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/CodeBuildProjectEncryption.py +34 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DAXEncryption.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBAuditLogs.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBEncryption.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBLogging.py +27 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DocDBTLS.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamoDBTablesEncrypted.py +30 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamodbGlobalTableRecovery.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/DynamodbRecovery.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EBSDefaultEncryption.py +8 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EBSEncryption.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EC2Credentials.py +42 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EC2PublicIP.py +47 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRImageScanning.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRImmutableTags.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRPolicy.py +81 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECRRepositoryEncrypted.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECSClusterContainerInsights.py +34 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py +33 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EFSEncryptionEnabled.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSControlPlaneLogging.py +7 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSNodeGroupRemoteAccess.py +31 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSPublicAccess.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSPublicAccessCIDR.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/EKSSecretsEncryption.py +32 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ELBAccessLogs.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ELBv2AccessLogs.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransitAuthToken.py +32 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainAuditLogging.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainEnforceHTTPS.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchDomainLogging.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchEncryption.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlobalAcceleratorAcceleratorFlowLogs.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueDataCatalogEncryption.py +37 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueSecurityConfiguration.py +49 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/GlueSecurityConfigurationEnabled.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMAdminPolicyDocument.py +53 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMCredentialsExposure.py +29 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMDataExfiltration.py +15 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPermissionsManagement.py +15 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPolicyAttachedToGroupOrRoles.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMPrivilegeEscalation.py +16 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py +53 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMRoleAllowsPublicAssume.py +52 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMStarActionPolicyDocument.py +56 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IAMWriteAccess.py +15 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/IMDSv1Disabled.py +30 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KMSKeyWildCardPrincipal.py +61 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KMSRotation.py +27 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/KinesisStreamEncryptionType.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaDLQConfigured.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaEnvironmentCredentials.py +37 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaEnvironmentEncryptionSettings.py +30 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaFunctionURLAuth.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LambdaInVPC.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/LaunchConfigurationEBSEncryption.py +38 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/MQBrokerAuditLogging.py +29 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterInstancePublic.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterLogging.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/NeptuneClusterStorageEncrypted.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyExpiration.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyLength.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyLowercaseLetter.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyNumber.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyReuse.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicySymbol.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/PasswordPolicyUppercaseLetter.py +6 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/QLDBLedgerDeletionProtection.py +26 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/QLDBLedgerPermissionsMode.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSClusterIAMAuthentication.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSEncryption.py +27 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSEnhancedMonitorEnabled.py +25 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSIAMAuthentication.py +26 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSMultiAZEnabled.py +27 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RDSPubliclyAccessible.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedShiftSSL.py +28 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterEncryption.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterLogging.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftClusterPubliclyAccessible.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/RedshiftInEc2ClassicMode.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3AccessLogs.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3BlockPublicACLs.py +18 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3BlockPublicPolicy.py +18 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3Encryption.py +25 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3IgnorePublicACLs.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3PublicACLRead.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3PublicACLWrite.py +22 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3RestrictPublicBuckets.py +18 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/S3Versioning.py +25 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SNSTopicEncryption.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SQSQueueEncryption.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecretManagerSecretEncrypted.py +29 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupRuleDescription.py +46 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress22.py +10 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/SecurityGroupUnrestrictedIngress80.py +10 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/TimestreamDatabaseKMSKey.py +23 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/TransferServerIsPublic.py +20 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/VPCEndpointAcceptanceConfigured.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WAFACLCVE202144228.py +55 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WAFEnabled.py +21 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WorkspaceRootVolumeEncrypted.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/WorkspaceUserVolumeEncrypted.py +17 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/aws/__init__.py +5 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/base_registry.py +16 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_check.py +48 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_negative_value_check.py +76 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/base_resource_value_check.py +113 -0
- s1_cns_cli/s1graph/cloudformation/checks/resource/registry.py +3 -0
- s1_cns_cli/s1graph/cloudformation/checks/utils/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/checks/utils/iam_cloudformation_document_to_policy_converter.py +35 -0
- s1_cns_cli/s1graph/cloudformation/context_parser.py +193 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/block_types.py +15 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/blocks.py +94 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/graph_components/generic_resource_encryption.py +100 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/graph_to_definitions.py +42 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/local_graph.py +402 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/utils.py +67 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/renderer.py +516 -0
- s1_cns_cli/s1graph/cloudformation/graph_builder/variable_rendering/vertex_reference.py +13 -0
- s1_cns_cli/s1graph/cloudformation/graph_manager.py +55 -0
- s1_cns_cli/s1graph/cloudformation/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/image_referencer/base_provider.py +38 -0
- s1_cns_cli/s1graph/cloudformation/image_referencer/manager.py +19 -0
- s1_cns_cli/s1graph/cloudformation/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/cloudformation/image_referencer/provider/aws.py +98 -0
- s1_cns_cli/s1graph/cloudformation/parser/__init__.py +89 -0
- s1_cns_cli/s1graph/cloudformation/parser/cfn_keywords.py +50 -0
- s1_cns_cli/s1graph/cloudformation/parser/cfn_yaml.py +286 -0
- s1_cns_cli/s1graph/cloudformation/runner.py +283 -0
- s1_cns_cli/s1graph/common/__init__.py +1 -0
- s1_cns_cli/s1graph/common/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/common/checks/base_check.py +121 -0
- s1_cns_cli/s1graph/common/checks/base_check_registry.py +213 -0
- s1_cns_cli/s1graph/common/checks/enums.py +8 -0
- s1_cns_cli/s1graph/common/checks/object_registry.py +222 -0
- s1_cns_cli/s1graph/common/checks_infra/__init__.py +0 -0
- s1_cns_cli/s1graph/common/checks_infra/checks_parser.py +319 -0
- s1_cns_cli/s1graph/common/checks_infra/registry.py +92 -0
- s1_cns_cli/s1graph/common/checks_infra/resources_types.py +1291 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/__init__.py +4 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/__init__.py +43 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/any_attribute_solver.py +12 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py +217 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/base_number_of_words_attribute_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/contains_attribute_solver.py +24 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/ending_with_attribute_solver.py +12 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/equals_attribute_solver.py +19 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/equals_ignore_case_attribute_solver.py +17 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/exists_attribute_solver.py +12 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/greater_than_attribute_solver.py +21 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/greater_than_or_equal_attribute_solver.py +22 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/intersects_attribute_solver.py +19 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_empty_attribute_solver.py +16 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_false_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_not_empty_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/is_true_attribute_solver.py +15 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_equals_attribute_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_greater_than_attribute_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_greater_than_or_equal_attribute_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_less_than_attribute_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_less_than_or_equal_attribute_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/length_not_equals_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/less_than_attribute_solver.py +14 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/less_than_or_equal_attribute_solver.py +14 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_contains_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_ending_with_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_equals_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_equals_ignore_case_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_exists_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_intersects_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_regex_match_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_starting_with_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_subset_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/not_within_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_equals_attribute_solver.py +20 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_attribute_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_greater_than_or_equal_attribute_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_attribute_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_less_than_or_equal_attribute_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/number_of_words_not_equals_attribute_solver.py +11 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/range_includes_attribute_solver.py +38 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/range_not_includes_attribute_solver.py +10 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/regex_match_attribute_solver.py +18 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/starting_with_attribute_solver.py +12 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/subset_attribute_solver.py +21 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/attribute_solvers/within_attribute_solver.py +12 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/__init__.py +3 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/and_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/base_complex_solver.py +48 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/not_solver.py +23 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/complex_solvers/or_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/__init__.py +5 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/and_connection_solver.py +44 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/base_connection_solver.py +105 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/complex_connection_solver.py +94 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_exists_solver.py +81 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_not_exists_solver.py +32 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/connection_one_exists_solver.py +33 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/connections_solvers/or_connection_solver.py +36 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/__init__.py +1 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/base_filter_solver.py +27 -0
- s1_cns_cli/s1graph/common/checks_infra/solvers/filter_solvers/within_filter_solver.py +23 -0
- s1_cns_cli/s1graph/common/comment/__init__.py +0 -0
- s1_cns_cli/s1graph/common/comment/enum.py +3 -0
- s1_cns_cli/s1graph/common/goget/__init__.py +0 -0
- s1_cns_cli/s1graph/common/goget/base_getter.py +23 -0
- s1_cns_cli/s1graph/common/goget/github/__init__.py +0 -0
- s1_cns_cli/s1graph/common/goget/github/get_git.py +82 -0
- s1_cns_cli/s1graph/common/goget/registry/__init__.py +0 -0
- s1_cns_cli/s1graph/common/goget/registry/get_registry.py +31 -0
- s1_cns_cli/s1graph/common/graph/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/base_check.py +52 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/base_parser.py +14 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/enums.py +75 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/registry.py +56 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/solvers/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/checks_infra/solvers/base_solver.py +32 -0
- s1_cns_cli/s1graph/common/graph/db_connectors/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/db_connectors/db_connector.py +29 -0
- s1_cns_cli/s1graph/common/graph/db_connectors/networkx/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/db_connectors/networkx/networkx_db_connector.py +50 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/__init__.py +2 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/consts.py +19 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/attribute_names.py +48 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/block_types.py +16 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/blocks.py +291 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/edge.py +29 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_components/generic_resource_encryption_base.py +51 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/graph_resources_encription_manager.py +29 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/local_graph.py +107 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/utils.py +46 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/__init__.py +0 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/breadcrumb_metadata.py +9 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/renderer.py +134 -0
- s1_cns_cli/s1graph/common/graph/graph_builder/variable_rendering/vertex_reference.py +30 -0
- s1_cns_cli/s1graph/common/graph/graph_manager.py +49 -0
- s1_cns_cli/s1graph/common/images/__init__.py +0 -0
- s1_cns_cli/s1graph/common/images/graph/__init__.py +0 -0
- s1_cns_cli/s1graph/common/images/graph/image_referencer_manager.py +20 -0
- s1_cns_cli/s1graph/common/images/graph/image_referencer_provider.py +58 -0
- s1_cns_cli/s1graph/common/images/image_referencer.py +330 -0
- s1_cns_cli/s1graph/common/images/workflow/__init__.py +0 -0
- s1_cns_cli/s1graph/common/images/workflow/image_referencer_manager.py +21 -0
- s1_cns_cli/s1graph/common/images/workflow/image_referencer_provider.py +21 -0
- s1_cns_cli/s1graph/common/models/__init__.py +0 -0
- s1_cns_cli/s1graph/common/models/consts.py +35 -0
- s1_cns_cli/s1graph/common/models/enums.py +61 -0
- s1_cns_cli/s1graph/common/multi_signature.py +129 -0
- s1_cns_cli/s1graph/common/output/__init__.py +0 -0
- s1_cns_cli/s1graph/common/output/ai.py +152 -0
- s1_cns_cli/s1graph/common/output/baseline.py +98 -0
- s1_cns_cli/s1graph/common/output/common.py +54 -0
- s1_cns_cli/s1graph/common/output/csv.py +232 -0
- s1_cns_cli/s1graph/common/output/cyclonedx.py +470 -0
- s1_cns_cli/s1graph/common/output/cyclonedx_consts.py +181 -0
- s1_cns_cli/s1graph/common/output/extra_resource.py +18 -0
- s1_cns_cli/s1graph/common/output/github_actions_record.py +45 -0
- s1_cns_cli/s1graph/common/output/gitlab_sast.py +173 -0
- s1_cns_cli/s1graph/common/output/graph_record.py +17 -0
- s1_cns_cli/s1graph/common/output/record.py +246 -0
- s1_cns_cli/s1graph/common/output/report.py +607 -0
- s1_cns_cli/s1graph/common/output/sarif.py +243 -0
- s1_cns_cli/s1graph/common/output/secrets_record.py +144 -0
- s1_cns_cli/s1graph/common/packaging/__init__.py +0 -0
- s1_cns_cli/s1graph/common/packaging/version.py +141 -0
- s1_cns_cli/s1graph/common/parallelizer/__init__.py +0 -0
- s1_cns_cli/s1graph/common/parallelizer/parallel_runner.py +72 -0
- s1_cns_cli/s1graph/common/parsers/__init__.py +0 -0
- s1_cns_cli/s1graph/common/parsers/json/__init__.py +68 -0
- s1_cns_cli/s1graph/common/parsers/json/decoder.py +404 -0
- s1_cns_cli/s1graph/common/parsers/json/errors.py +41 -0
- s1_cns_cli/s1graph/common/parsers/node.py +189 -0
- s1_cns_cli/s1graph/common/parsers/yaml/__init__.py +0 -0
- s1_cns_cli/s1graph/common/parsers/yaml/loader.py +76 -0
- s1_cns_cli/s1graph/common/parsers/yaml/parser.py +49 -0
- s1_cns_cli/s1graph/common/runners/__init__.py +0 -0
- s1_cns_cli/s1graph/common/runners/base_post_runner.py +30 -0
- s1_cns_cli/s1graph/common/runners/base_runner.py +216 -0
- s1_cns_cli/s1graph/common/runners/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/common/runners/graph_builder/local_graph.py +57 -0
- s1_cns_cli/s1graph/common/runners/graph_manager.py +40 -0
- s1_cns_cli/s1graph/common/runners/object_runner.py +354 -0
- s1_cns_cli/s1graph/common/runners/runner_registry.py +680 -0
- s1_cns_cli/s1graph/common/s1cns/__init__.py +0 -0
- s1_cns_cli/s1graph/common/s1cns/bc_source.py +50 -0
- s1_cns_cli/s1graph/common/s1cns/check_type.py +37 -0
- s1_cns_cli/s1graph/common/s1cns/code_categories.py +55 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/__init__.py +1 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/base_integration_feature.py +45 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/__init__.py +4 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/custom_policies_integration.py +136 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/fixes_integration.py +142 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/licensing_integration.py +87 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/policies_3d_integration.py +82 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/policy_metadata_integration.py +174 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/repo_config_integration.py +142 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/features/suppressions_integration.py +233 -0
- s1_cns_cli/s1graph/common/s1cns/integration_features/integration_feature_registry.py +52 -0
- s1_cns_cli/s1graph/common/s1cns/licensing.py +29 -0
- s1_cns_cli/s1graph/common/s1cns/platform_errors.py +14 -0
- s1_cns_cli/s1graph/common/s1cns/platform_integration.py +1023 -0
- s1_cns_cli/s1graph/common/s1cns/platform_key.py +24 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/__init__.py +1 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/abstract_run_metadata_extractor.py +73 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/ci_variables.py +15 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/__init__.py +5 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/bitbucket.py +38 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/default_extractor.py +34 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/github_actions.py +40 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/gitlab_ci.py +40 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/extractors/jenkins.py +39 -0
- s1_cns_cli/s1graph/common/s1cns/run_metadata/registry.py +29 -0
- s1_cns_cli/s1graph/common/s1cns/severities.py +45 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/__init__.py +0 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/image_scanner.py +203 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/__init__.py +0 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/docker_image_scanning.py +80 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/package_scanning.py +40 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/integrations/twistcli.py +123 -0
- s1_cns_cli/s1graph/common/s1cns/vulnerability_scanning/report.py +45 -0
- s1_cns_cli/s1graph/common/s1cns/wrapper.py +136 -0
- s1_cns_cli/s1graph/common/sca/__init__.py +0 -0
- s1_cns_cli/s1graph/common/sca/commons.py +60 -0
- s1_cns_cli/s1graph/common/sca/output.py +637 -0
- s1_cns_cli/s1graph/common/typing.py +104 -0
- s1_cns_cli/s1graph/common/util/__init__.py +0 -0
- s1_cns_cli/s1graph/common/util/banner.py +29 -0
- s1_cns_cli/s1graph/common/util/config_utils.py +26 -0
- s1_cns_cli/s1graph/common/util/consts.py +35 -0
- s1_cns_cli/s1graph/common/util/contextmanagers.py +21 -0
- s1_cns_cli/s1graph/common/util/data_structures_utils.py +101 -0
- s1_cns_cli/s1graph/common/util/decorators.py +28 -0
- s1_cns_cli/s1graph/common/util/dockerfile.py +7 -0
- s1_cns_cli/s1graph/common/util/docs_generator.py +196 -0
- s1_cns_cli/s1graph/common/util/ext_argument_parser.py +543 -0
- s1_cns_cli/s1graph/common/util/file_utils.py +84 -0
- s1_cns_cli/s1graph/common/util/http_utils.py +247 -0
- s1_cns_cli/s1graph/common/util/json_utils.py +101 -0
- s1_cns_cli/s1graph/common/util/parser_utils.py +398 -0
- s1_cns_cli/s1graph/common/util/prompt.py +277 -0
- s1_cns_cli/s1graph/common/util/runner_dependency_handler.py +50 -0
- s1_cns_cli/s1graph/common/util/secrets.py +240 -0
- s1_cns_cli/s1graph/common/util/secrets_omitter.py +111 -0
- s1_cns_cli/s1graph/common/util/stopit/__init__.py +23 -0
- s1_cns_cli/s1graph/common/util/stopit/signalstop.py +56 -0
- s1_cns_cli/s1graph/common/util/stopit/threadstop.py +81 -0
- s1_cns_cli/s1graph/common/util/stopit/utils.py +148 -0
- s1_cns_cli/s1graph/common/util/str_utils.py +17 -0
- s1_cns_cli/s1graph/common/util/suppression.py +53 -0
- s1_cns_cli/s1graph/common/util/templates/__init__.py +0 -0
- s1_cns_cli/s1graph/common/util/templates/data.jinja2 +29 -0
- s1_cns_cli/s1graph/common/util/templates/init.jinja2 +4 -0
- s1_cns_cli/s1graph/common/util/templates/provider.jinja2 +28 -0
- s1_cns_cli/s1graph/common/util/templates/resource.jinja2 +28 -0
- s1_cns_cli/s1graph/common/util/templates/unittest-python.jinja2 +41 -0
- s1_cns_cli/s1graph/common/util/templates/unittest-terraform.jinja2 +9 -0
- s1_cns_cli/s1graph/common/util/tqdm_utils.py +76 -0
- s1_cns_cli/s1graph/common/util/type_forcers.py +146 -0
- s1_cns_cli/s1graph/common/util/var_utils.py +44 -0
- s1_cns_cli/s1graph/common/variables/__init__.py +0 -0
- s1_cns_cli/s1graph/common/variables/context.py +49 -0
- s1_cns_cli/s1graph/common/vcs/__init__.py +0 -0
- s1_cns_cli/s1graph/common/vcs/base_vcs_dal.py +130 -0
- s1_cns_cli/s1graph/common/vcs/vcs_schema.py +20 -0
- s1_cns_cli/s1graph/common/version_manager.py +12 -0
- s1_cns_cli/s1graph/contributor_metrics.py +65 -0
- s1_cns_cli/s1graph/dockerfile/__init__.py +1 -0
- s1_cns_cli/s1graph/dockerfile/base_dockerfile_check.py +44 -0
- s1_cns_cli/s1graph/dockerfile/base_registry.py +101 -0
- s1_cns_cli/s1graph/dockerfile/checks/AddExists.py +27 -0
- s1_cns_cli/s1graph/dockerfile/checks/AliasIsUnique.py +36 -0
- s1_cns_cli/s1graph/dockerfile/checks/ExposePort22.py +28 -0
- s1_cns_cli/s1graph/dockerfile/checks/HealthcheckExists.py +27 -0
- s1_cns_cli/s1graph/dockerfile/checks/MaintainerExists.py +24 -0
- s1_cns_cli/s1graph/dockerfile/checks/ReferenceLatestTag.py +40 -0
- s1_cns_cli/s1graph/dockerfile/checks/RootUser.py +28 -0
- s1_cns_cli/s1graph/dockerfile/checks/RunUsingAPT.py +31 -0
- s1_cns_cli/s1graph/dockerfile/checks/UpdateNotAlone.py +57 -0
- s1_cns_cli/s1graph/dockerfile/checks/UserExists.py +27 -0
- s1_cns_cli/s1graph/dockerfile/checks/WorkdirIsAbsolute.py +39 -0
- s1_cns_cli/s1graph/dockerfile/checks/__init__.py +5 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvGitSslNoVerify.yaml +19 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvNodeTlsRejectUnauthorized.yaml +19 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvNpmConfigStrictSsl.yaml +19 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvPipTrustedHost.yaml +19 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/EnvPythonHttpsVerify.yaml +19 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunApkAllowUntrusted.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunAptGetAllowUnauthenticated.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunAptGetForceYes.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunNpmConfigSetStrictSsl.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunPipTrustedHost.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunRpmNoSignature.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUnsafeCurl.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUnsafeWget.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunUsingSudo.yaml +18 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunYumConfigManagerSslVerify.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/RunYumNoGpgCheck.yaml +11 -0
- s1_cns_cli/s1graph/dockerfile/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/dockerfile/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/dockerfile/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/dockerfile/graph_builder/graph_components/resource_types.py +26 -0
- s1_cns_cli/s1graph/dockerfile/graph_builder/local_graph.py +115 -0
- s1_cns_cli/s1graph/dockerfile/graph_manager.py +45 -0
- s1_cns_cli/s1graph/dockerfile/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/dockerfile/image_referencer/manager.py +23 -0
- s1_cns_cli/s1graph/dockerfile/image_referencer/provider.py +56 -0
- s1_cns_cli/s1graph/dockerfile/parser.py +41 -0
- s1_cns_cli/s1graph/dockerfile/registry.py +3 -0
- s1_cns_cli/s1graph/dockerfile/runner.py +291 -0
- s1_cns_cli/s1graph/dockerfile/utils.py +78 -0
- s1_cns_cli/s1graph/example_runner/__init__.py +2 -0
- s1_cns_cli/s1graph/example_runner/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/example_runner/checks/base_example_runner_check.py +29 -0
- s1_cns_cli/s1graph/example_runner/checks/base_example_runner_job_check.py +24 -0
- s1_cns_cli/s1graph/example_runner/checks/job/ExampleCheckTrueFalse.py +68 -0
- s1_cns_cli/s1graph/example_runner/checks/job/__init__.py +4 -0
- s1_cns_cli/s1graph/example_runner/checks/job_registry.py +8 -0
- s1_cns_cli/s1graph/example_runner/common/__init__.py +0 -0
- s1_cns_cli/s1graph/example_runner/runner.py +61 -0
- s1_cns_cli/s1graph/github/__init__.py +1 -0
- s1_cns_cli/s1graph/github/base_github_branch_security.py +48 -0
- s1_cns_cli/s1graph/github/base_github_configuration_check.py +42 -0
- s1_cns_cli/s1graph/github/base_github_negative_branch_security.py +62 -0
- s1_cns_cli/s1graph/github/base_github_org_check.py +45 -0
- s1_cns_cli/s1graph/github/base_github_org_security.py +40 -0
- s1_cns_cli/s1graph/github/checks/2fa.py +19 -0
- s1_cns_cli/s1graph/github/checks/__init__.py +4 -0
- s1_cns_cli/s1graph/github/checks/disallow_branch_deletions.py +22 -0
- s1_cns_cli/s1graph/github/checks/disallow_force_pushes.py +22 -0
- s1_cns_cli/s1graph/github/checks/disallow_inactive_branch_60days.py +46 -0
- s1_cns_cli/s1graph/github/checks/dismiss_stale_reviews.py +16 -0
- s1_cns_cli/s1graph/github/checks/enforce_branch_protection_admins.py +19 -0
- s1_cns_cli/s1graph/github/checks/internal_repository_creation_is_limited.py +22 -0
- s1_cns_cli/s1graph/github/checks/ipallowlist.py +22 -0
- s1_cns_cli/s1graph/github/checks/minimum_admins_in_org.py +38 -0
- s1_cns_cli/s1graph/github/checks/private_repository_creation_is_limited.py +22 -0
- s1_cns_cli/s1graph/github/checks/public_repository_creation_is_limited.py +22 -0
- s1_cns_cli/s1graph/github/checks/repository_collaborators.py +42 -0
- s1_cns_cli/s1graph/github/checks/require_2approvals.py +20 -0
- s1_cns_cli/s1graph/github/checks/require_code_owner_reviews.py +16 -0
- s1_cns_cli/s1graph/github/checks/require_conversation_resolution.py +16 -0
- s1_cns_cli/s1graph/github/checks/require_linear_history.py +19 -0
- s1_cns_cli/s1graph/github/checks/require_push_restrictions.py +16 -0
- s1_cns_cli/s1graph/github/checks/require_signatures.py +19 -0
- s1_cns_cli/s1graph/github/checks/require_status_checks_pr.py +16 -0
- s1_cns_cli/s1graph/github/checks/require_strict_base_permissions_repository.py +23 -0
- s1_cns_cli/s1graph/github/checks/require_updated_branch_pr.py +22 -0
- s1_cns_cli/s1graph/github/checks/require_verified_organization.py +22 -0
- s1_cns_cli/s1graph/github/checks/restrict_pr_review_dismissal.py +22 -0
- s1_cns_cli/s1graph/github/checks/sso.py +39 -0
- s1_cns_cli/s1graph/github/checks/webhooks_https_orgs.py +45 -0
- s1_cns_cli/s1graph/github/checks/webhooks_https_repos.py +44 -0
- s1_cns_cli/s1graph/github/dal.py +233 -0
- s1_cns_cli/s1graph/github/registry.py +4 -0
- s1_cns_cli/s1graph/github/runner.py +75 -0
- s1_cns_cli/s1graph/github/schemas/__init__.py +0 -0
- s1_cns_cli/s1graph/github/schemas/branch.py +2685 -0
- s1_cns_cli/s1graph/github/schemas/branch_protection.py +99 -0
- s1_cns_cli/s1graph/github/schemas/no_branch_protection.py +25 -0
- s1_cns_cli/s1graph/github/schemas/org_members.py +173 -0
- s1_cns_cli/s1graph/github/schemas/org_security.py +73 -0
- s1_cns_cli/s1graph/github/schemas/org_webhooks.py +127 -0
- s1_cns_cli/s1graph/github/schemas/organization.py +439 -0
- s1_cns_cli/s1graph/github/schemas/repository_collaborators.py +199 -0
- s1_cns_cli/s1graph/github/schemas/repository_webhooks.py +217 -0
- s1_cns_cli/s1graph/github_actions/__init__.py +1 -0
- s1_cns_cli/s1graph/github_actions/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/github_actions/checks/base_github_action_check.py +38 -0
- s1_cns_cli/s1graph/github_actions/checks/graph_checks/ReadOnlyTopLevelPermissions.yaml +11 -0
- s1_cns_cli/s1graph/github_actions/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/github_actions/checks/job/AllowUnsecureCommandsOnJob.py +36 -0
- s1_cns_cli/s1graph/github_actions/checks/job/CosignArtifacts.py +55 -0
- s1_cns_cli/s1graph/github_actions/checks/job/CosignSBOM.py +55 -0
- s1_cns_cli/s1graph/github_actions/checks/job/EmptyWorkflowDispatch.py +43 -0
- s1_cns_cli/s1graph/github_actions/checks/job/ReverseShellNetcat.py +33 -0
- s1_cns_cli/s1graph/github_actions/checks/job/ShellInjection.py +37 -0
- s1_cns_cli/s1graph/github_actions/checks/job/SuspectCurlInScript.py +34 -0
- s1_cns_cli/s1graph/github_actions/checks/job/__init__.py +4 -0
- s1_cns_cli/s1graph/github_actions/checks/registry.py +4 -0
- s1_cns_cli/s1graph/github_actions/common/__init__.py +0 -0
- s1_cns_cli/s1graph/github_actions/common/artifact_build.py +10 -0
- s1_cns_cli/s1graph/github_actions/common/build_actions.py +5 -0
- s1_cns_cli/s1graph/github_actions/common/shell_injection_list.py +20 -0
- s1_cns_cli/s1graph/github_actions/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/github_actions/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/github_actions/graph_builder/graph_components/resource_types.py +12 -0
- s1_cns_cli/s1graph/github_actions/graph_builder/local_graph.py +209 -0
- s1_cns_cli/s1graph/github_actions/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/github_actions/image_referencer/manager.py +15 -0
- s1_cns_cli/s1graph/github_actions/image_referencer/provider.py +66 -0
- s1_cns_cli/s1graph/github_actions/runner.py +165 -0
- s1_cns_cli/s1graph/github_actions/schemas.py +3139 -0
- s1_cns_cli/s1graph/github_actions/utils.py +154 -0
- s1_cns_cli/s1graph/gitlab/__init__.py +1 -0
- s1_cns_cli/s1graph/gitlab/base_gitlab_configuration_check.py +23 -0
- s1_cns_cli/s1graph/gitlab/checks/__init__.py +4 -0
- s1_cns_cli/s1graph/gitlab/checks/merge_requests_approvals.py +32 -0
- s1_cns_cli/s1graph/gitlab/checks/two_factor_authentication.py +33 -0
- s1_cns_cli/s1graph/gitlab/dal.py +69 -0
- s1_cns_cli/s1graph/gitlab/registry.py +4 -0
- s1_cns_cli/s1graph/gitlab/runner.py +54 -0
- s1_cns_cli/s1graph/gitlab/schemas/__init__.py +0 -0
- s1_cns_cli/s1graph/gitlab/schemas/groups.py +130 -0
- s1_cns_cli/s1graph/gitlab/schemas/project_approvals.py +41 -0
- s1_cns_cli/s1graph/gitlab_ci/__init__.py +1 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/__init__.py +1 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/base_gitlab_ci_check.py +35 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/job/AvoidDoublePipelines.py +36 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/job/DetectImagesUsage.py +25 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/job/SuspectCurlInScript.py +29 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/job/__init__.py +4 -0
- s1_cns_cli/s1graph/gitlab_ci/checks/registry.py +4 -0
- s1_cns_cli/s1graph/gitlab_ci/common/__init__.py +0 -0
- s1_cns_cli/s1graph/gitlab_ci/common/reserved.py +8 -0
- s1_cns_cli/s1graph/gitlab_ci/common/resource_id_utils.py +67 -0
- s1_cns_cli/s1graph/gitlab_ci/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/gitlab_ci/image_referencer/manager.py +13 -0
- s1_cns_cli/s1graph/gitlab_ci/image_referencer/provider.py +60 -0
- s1_cns_cli/s1graph/gitlab_ci/runner.py +104 -0
- s1_cns_cli/s1graph/helm/__init__.py +0 -0
- s1_cns_cli/s1graph/helm/base_registry.py +101 -0
- s1_cns_cli/s1graph/helm/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/helm/image_referencer/base_provider.py +25 -0
- s1_cns_cli/s1graph/helm/image_referencer/manager.py +25 -0
- s1_cns_cli/s1graph/helm/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/helm/image_referencer/provider/helm.py +19 -0
- s1_cns_cli/s1graph/helm/registry.py +3 -0
- s1_cns_cli/s1graph/helm/runner.py +459 -0
- s1_cns_cli/s1graph/json_doc/__init__.py +0 -0
- s1_cns_cli/s1graph/json_doc/base_json_check.py +19 -0
- s1_cns_cli/s1graph/json_doc/base_registry.py +201 -0
- s1_cns_cli/s1graph/json_doc/enums.py +8 -0
- s1_cns_cli/s1graph/json_doc/registry.py +4 -0
- s1_cns_cli/s1graph/json_doc/runner.py +54 -0
- s1_cns_cli/s1graph/kubernetes/__init__.py +1 -0
- s1_cns_cli/s1graph/kubernetes/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ImpersonatePermissions.yaml +60 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ModifyServicesStatus.yaml +60 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/NoCreateNodesProxyOrPodsExec.yaml +59 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/ReadAllSecrets.yaml +60 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/RequireAllPodsToHaveNetworkPolicy.yaml +18 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/RoleBindingPE.yaml +59 -0
- s1_cns_cli/s1graph/kubernetes/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/__init__.py +1 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_container_check.py +146 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_rbac_check.py +89 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_registry.py +94 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_root_container_check.py +70 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_spec_check.py +55 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/base_spec_omitted_or_value_check.py +34 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowPrivilegeEscalation.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowPrivilegeEscalationPSP.py +37 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilities.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilitiesPSP.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/AllowedCapabilitiesSysAdmin.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAdmissionControlAlwaysAdmit.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAdmissionControlEventRateLimit.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAlwaysPullImagesPlugin.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAnonymousAuth.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLog.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxAge.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxBackup.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuditLogMaxSize.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNode.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeNotAlwaysAllow.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerAuthorizationModeRBAC.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerBasicAuthFile.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEncryptionProviders.py +25 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEtcdCaFile.py +25 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerEtcdCertAndKey.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerInsecureBindAddress.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerInsecurePort.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerKubeletClientCertAndKey.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerKubeletHttps.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerNamespaceLifecyclePlugin.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerNodeRestrictionPlugin.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerPodSecurityPolicyPlugin.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerProfiling.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerRequestTimeout.py +34 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerSecurePort.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerSecurityContextDenyPlugin.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountKeyFile.py +32 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountLookup.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerServiceAccountPlugin.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerStrongCryptographicCiphers.py +39 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerTlsCertAndKey.py +31 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerTokenAuthFile.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ApiServerkubeletCertificateAuthority.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/CPULimits.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/CPURequests.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ContainerSecurityContext.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ControllerManagerBindAddress.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultNamespace.py +50 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultServiceAccount.py +32 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DefaultServiceAccountBinding.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DockerSocketVolume.py +65 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DropCapabilities.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/DropCapabilitiesPSP.py +32 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdAutoTls.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdCertAndKey.py +32 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdClientCertAuth.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/EtcdPeerFiles.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/HostPort.py +31 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImageDigest.py +34 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImagePullPolicyAlways.py +58 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ImageTagFixed.py +44 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerBlockProfiles.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerRootCAFile.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountCredentials.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerServiceAccountPrivateKeyFile.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeControllerManagerTerminatedPods.py +30 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletAnonymousAuth.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletAuthorizationModeNotAlwaysAllow.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletClientCa.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletCryptographicCiphers.py +40 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletHostnameOverride.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletKeyFilesSetAppropriate.py +30 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletMakeIptablesUtilChains.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletProtectKernelDefaults.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletReadOnlyPort.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubeletStreamingConnectionIdleTimeout.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubernetesDashboard.py +34 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubletEventCapture.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/KubletRotateCertificates.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/LivenessProbe.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MemoryLimits.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MemoryRequests.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MinimizeCapabilities.py +28 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/MinimizeCapabilitiesPSP.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742AllSnippets.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Lua.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PeerClientCertAuthTrue.py +25 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PodSecurityContext.py +58 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PrivilegedContainers.py +24 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/PrivilegedContainersPSP.py +21 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacApproveCertificateSigningRequests.py +26 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacBindRoleBindings.py +19 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacControlWebhooks.py +20 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RbacEscalateRoles.py +19 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ReadOnlyFilesystem.py +22 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ReadinessProbe.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainers.py +71 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainersHighUID.py +71 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RootContainersPSP.py +33 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/RotateKubeletServerCertificate.py +29 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SchedulerBindAddress.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SchedulerProfiling.py +23 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Seccomp.py +65 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SeccompPSP.py +27 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Secrets.py +33 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ServiceAccountTokens.py +61 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostIPC.py +61 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostIPCPSP.py +21 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostPID.py +61 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/ShareHostPIDPSP.py +21 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SharedHostNetworkNamespace.py +61 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/SharedHostNetworkNamespacePSP.py +21 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/Tiller.py +35 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/TillerDeploymentListener.py +30 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/TillerService.py +40 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/WildcardRoles.py +33 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/__init__.py +5 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/k8s/k8s_check_utils.py +22 -0
- s1_cns_cli/s1graph/kubernetes/checks/resource/registry.py +4 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/ResourceKeywordIdentifier.py +31 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/blocks.py +34 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/K8SEdgeBuilder.py +28 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/KeywordEdgeBuilder.py +74 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/LabelSelectorEdgeBuilder.py +53 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/NetworkPolicyEdgeBuilder.py +61 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/graph_components/edge_builders/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/graph_builder/local_graph.py +176 -0
- s1_cns_cli/s1graph/kubernetes/graph_manager.py +39 -0
- s1_cns_cli/s1graph/kubernetes/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/image_referencer/base_provider.py +40 -0
- s1_cns_cli/s1graph/kubernetes/image_referencer/manager.py +19 -0
- s1_cns_cli/s1graph/kubernetes/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/image_referencer/provider/k8s.py +105 -0
- s1_cns_cli/s1graph/kubernetes/kubernetes_graph_flags.py +19 -0
- s1_cns_cli/s1graph/kubernetes/kubernetes_utils.py +257 -0
- s1_cns_cli/s1graph/kubernetes/parser/__init__.py +0 -0
- s1_cns_cli/s1graph/kubernetes/parser/k8_json.py +66 -0
- s1_cns_cli/s1graph/kubernetes/parser/k8_yaml.py +65 -0
- s1_cns_cli/s1graph/kubernetes/parser/parser.py +52 -0
- s1_cns_cli/s1graph/kubernetes/runner.py +351 -0
- s1_cns_cli/s1graph/kubernetes/test/share-process-namespace.yaml +27 -0
- s1_cns_cli/s1graph/kustomize/__init__.py +0 -0
- s1_cns_cli/s1graph/kustomize/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/kustomize/image_referencer/base_provider.py +26 -0
- s1_cns_cli/s1graph/kustomize/image_referencer/manager.py +23 -0
- s1_cns_cli/s1graph/kustomize/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/kustomize/image_referencer/provider/kustomize.py +18 -0
- s1_cns_cli/s1graph/kustomize/runner.py +642 -0
- s1_cns_cli/s1graph/kustomize/utils.py +25 -0
- s1_cns_cli/s1graph/logging_init.py +22 -0
- s1_cns_cli/s1graph/main.py +653 -0
- s1_cns_cli/s1graph/openapi/__init__.py +1 -0
- s1_cns_cli/s1graph/openapi/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/openapi/checks/base_openapi_check.py +27 -0
- s1_cns_cli/s1graph/openapi/checks/base_registry.py +10 -0
- s1_cns_cli/s1graph/openapi/checks/registry.py +3 -0
- s1_cns_cli/s1graph/openapi/checks/resource/__init__.py +3 -0
- s1_cns_cli/s1graph/openapi/checks/resource/generic/GlobalSecurityFieldIsEmpty.py +26 -0
- s1_cns_cli/s1graph/openapi/checks/resource/generic/SecurityOperations.py +43 -0
- s1_cns_cli/s1graph/openapi/checks/resource/generic/__init__.py +5 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/BaseOpenapiCheckV2.py +29 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/GlobalSchemeDefineHTTP.py +29 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/GlobalSecurityScopeUndefined.py +45 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2OperationObjectPasswordFlow.py +55 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityDefinitionImplicitFlow.py +40 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityDefinitionPasswordFlow.py +40 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityPasswordFlow.py +45 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/Oauth2SecurityRequirement.py +47 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectBasicAuth.py +52 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectConsumesUndefined.py +43 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectImplicitFlow.py +54 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectProducesUndefined.py +45 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/OperationObjectSecurityScopeUndefined.py +65 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/PathSchemeDefineHTTP.py +42 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityDefinitionBasicAuth.py +40 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityDefinitions.py +30 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/SecurityRequirement.py +69 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v2/__init__.py +5 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v3/BaseOpenapiCheckV3.py +29 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v3/CleartextOverUnencryptedChannel.py +48 -0
- s1_cns_cli/s1graph/openapi/checks/resource/v3/__init__.py +5 -0
- s1_cns_cli/s1graph/openapi/runner.py +108 -0
- s1_cns_cli/s1graph/policies_3d/__init__.py +0 -0
- s1_cns_cli/s1graph/policies_3d/checks_infra/__init__.py +0 -0
- s1_cns_cli/s1graph/policies_3d/checks_infra/base_check.py +26 -0
- s1_cns_cli/s1graph/policies_3d/checks_infra/base_parser.py +41 -0
- s1_cns_cli/s1graph/policies_3d/checks_parser.py +145 -0
- s1_cns_cli/s1graph/policies_3d/output.py +291 -0
- s1_cns_cli/s1graph/policies_3d/record.py +47 -0
- s1_cns_cli/s1graph/policies_3d/runner.py +318 -0
- s1_cns_cli/s1graph/policies_3d/syntax/__init__.py +0 -0
- s1_cns_cli/s1graph/policies_3d/syntax/cves_syntax.py +46 -0
- s1_cns_cli/s1graph/policies_3d/syntax/iac_syntax.py +35 -0
- s1_cns_cli/s1graph/policies_3d/syntax/secrets_syntax.py +14 -0
- s1_cns_cli/s1graph/policies_3d/syntax/syntax.py +56 -0
- s1_cns_cli/s1graph/py.typed +0 -0
- s1_cns_cli/s1graph/runner_filter.py +365 -0
- s1_cns_cli/s1graph/sca_image/__init__.py +0 -0
- s1_cns_cli/s1graph/sca_image/models.py +18 -0
- s1_cns_cli/s1graph/sca_image/runner.py +345 -0
- s1_cns_cli/s1graph/sca_package/__init__.py +0 -0
- s1_cns_cli/s1graph/sca_package/output.py +360 -0
- s1_cns_cli/s1graph/sca_package/runner.py +172 -0
- s1_cns_cli/s1graph/sca_package/scanner.py +193 -0
- s1_cns_cli/s1graph/sca_package_2/__init__.py +0 -0
- s1_cns_cli/s1graph/sca_package_2/output.py +428 -0
- s1_cns_cli/s1graph/sca_package_2/runner.py +183 -0
- s1_cns_cli/s1graph/sca_package_2/scanner.py +104 -0
- s1_cns_cli/s1graph/sca_package_2/suppression.py +124 -0
- s1_cns_cli/s1graph/secrets/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/consts.py +31 -0
- s1_cns_cli/s1graph/secrets/coordinator.py +28 -0
- s1_cns_cli/s1graph/secrets/git_history_store.py +177 -0
- s1_cns_cli/s1graph/secrets/git_types.py +82 -0
- s1_cns_cli/s1graph/secrets/parsers/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/parsers/json/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/parsers/json/multiline_parser.py +60 -0
- s1_cns_cli/s1graph/secrets/parsers/multiline_parser.py +62 -0
- s1_cns_cli/s1graph/secrets/parsers/single_line_parser.py +36 -0
- s1_cns_cli/s1graph/secrets/parsers/terraform/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/parsers/terraform/multiline_parser.py +37 -0
- s1_cns_cli/s1graph/secrets/parsers/terraform/single_line_parser.py +28 -0
- s1_cns_cli/s1graph/secrets/parsers/yaml/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/parsers/yaml/multiline_parser.py +64 -0
- s1_cns_cli/s1graph/secrets/plugins/__init__.py +0 -0
- s1_cns_cli/s1graph/secrets/plugins/custom_regex_detector.py +160 -0
- s1_cns_cli/s1graph/secrets/plugins/detector_utils.py +279 -0
- s1_cns_cli/s1graph/secrets/plugins/entropy_keyword_combinator.py +234 -0
- s1_cns_cli/s1graph/secrets/plugins/load_detectors.py +120 -0
- s1_cns_cli/s1graph/secrets/runner.py +518 -0
- s1_cns_cli/s1graph/secrets/scan_git_history.py +247 -0
- s1_cns_cli/s1graph/secrets/utils.py +39 -0
- s1_cns_cli/s1graph/serverless/__init__.py +1 -0
- s1_cns_cli/s1graph/serverless/base_registry.py +36 -0
- s1_cns_cli/s1graph/serverless/checks/__init__.py +7 -0
- s1_cns_cli/s1graph/serverless/checks/base_function_check.py +4 -0
- s1_cns_cli/s1graph/serverless/checks/complete/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/complete/base_complete_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/complete/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/custom/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/custom/base_custom_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/custom/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/function/__init__.py +1 -0
- s1_cns_cli/s1graph/serverless/checks/function/aws/AWSCredentials.py +32 -0
- s1_cns_cli/s1graph/serverless/checks/function/aws/AdminPolicyDocument.py +30 -0
- s1_cns_cli/s1graph/serverless/checks/function/aws/StarActionPolicyDocument.py +33 -0
- s1_cns_cli/s1graph/serverless/checks/function/aws/__init__.py +5 -0
- s1_cns_cli/s1graph/serverless/checks/function/base_function_check.py +29 -0
- s1_cns_cli/s1graph/serverless/checks/function/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/layer/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/layer/base_layer_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/layer/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/package/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/package/base_package_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/package/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/plugin/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/plugin/base_plugin_check.py +19 -0
- s1_cns_cli/s1graph/serverless/checks/plugin/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/provider/base_provider_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/provider/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/checks/service/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/checks/service/base_service_check.py +18 -0
- s1_cns_cli/s1graph/serverless/checks/service/registry.py +3 -0
- s1_cns_cli/s1graph/serverless/parsers/__init__.py +0 -0
- s1_cns_cli/s1graph/serverless/parsers/context_parser.py +75 -0
- s1_cns_cli/s1graph/serverless/parsers/parser.py +343 -0
- s1_cns_cli/s1graph/serverless/registry.py +4 -0
- s1_cns_cli/s1graph/serverless/runner.py +299 -0
- s1_cns_cli/s1graph/terraform/__init__.py +3 -0
- s1_cns_cli/s1graph/terraform/checks/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/checks/data/__init__.py +3 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/AdminPolicyDocument.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMCredentialsExposure.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMDataExfiltration.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMManagedAdminPolicy.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPermissionsManagement.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPrivilegeEscalation.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMPublicActionsPolicy.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/IAMWriteAccess.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/StarActionPolicyDocument.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/data/aws/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/data/base_check.py +47 -0
- s1_cns_cli/s1graph/terraform/checks/data/base_cloudsplaining_data_iam_check.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/data/base_registry.py +12 -0
- s1_cns_cli/s1graph/terraform/checks/data/external/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/data/gcp/GooglePolicyIsPrivate.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/data/gcp/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/data/registry.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ALBProtectedByWAF.yaml +43 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ALBRedirectsHTTPToHTTPS.yaml +82 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AMRClustersNotOpenToInternet.yaml +23 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGWLoggingLevelsDefinedProperly.yaml +37 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGatewayEndpointsUsesCertificateForAuthentication.yaml +47 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIGatewayRequestParameterValidationEnabled.yaml +10 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/APIProtectedByWAF.yaml +76 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSConfigRecorderEnabled.yaml +29 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSNATGatewaysshouldbeutilized.yaml +43 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AWSSSMParameterShouldBeEncrypted.yaml +16 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AppLoadBalancerTLS12.yaml +81 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AppSyncProtectedByWAF.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AutoScalingEnableOnDynamoDBTables.yaml +48 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/AutoScallingEnabledELB.yaml +48 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CLoudFrontS3OriginConfigWithOAI.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontHasCustomSSLCertificate.yaml +16 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontHasResponseHeadersPolicy.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontUsesSecureProtocolsForHTTPS.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudFrontWebACLConfiguredWIthLog4jVulnerability.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CloudtrailHasCloudwatch.yaml +22 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/CodecommitApprovalRulesAttached.yaml +20 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ConfigRecorderRecordsAllGlobalResources.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/DMSEndpointHaveSSLConfigured.yaml +55 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EBSAddedBackup.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EC2InstanceHasIAMRoleAttached.yaml +10 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EFSAddedBackup.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EIPAllocatedToVPCAttachedEC2.yaml +104 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EMRClusterHasSecurityConfiguration.yaml +10 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ElastiCacheRedisConfiguredAutomaticFailOver.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/ElasticSearchDedicatedMasterEnabled.yaml +13 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/EncryptedEBSVolumeOnlyConnectedToEC2s.yaml +31 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/GuardDutyIsEnabled.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/HTTPNotSendingPasswords.yaml +38 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMGroupHasAtLeastOneUser.yaml +29 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMManagedIAMFullAccessPolicy.yaml +41 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMPolicyNotAllowFullIAMAccess.yaml +51 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMUserHasNoConsoleAccess.yaml +20 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/IAMUsersAreMembersAtLeastOneGroup.yaml +25 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/NeptuneDeletionProtectionEnabled.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/NetworkFirewallHasLogging.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/OpenSearchDomainHasFineGrainedControl.yaml +20 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/PostgresDBHasQueryLoggingEnabled.yaml +37 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/PostgresRDSHasQueryLoggingEnabled.yaml +35 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/RDSClusterHasBackupPlan.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/RDSEnableCopyTagsToSnapshot.yaml +26 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ARecordAttachedResource.yaml +57 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ZoneEnableDNSSECSigning.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/Route53ZoneHasMatchingQueryLog.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketEncryption.yaml +51 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketEventNotifications.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketHasPublicAccessBlock.yaml +29 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketLifecycle.yaml +23 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketLogging.yaml +23 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketReplicationConfiguration.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3BucketVersioning.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3KMSEncryptedByDefault.yaml +30 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3NotAllowAccessToAllAuthenticatedUsers.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3PublicACLRead.yaml +114 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/S3PublicACLWrite.yaml +99 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SGAttachedToResource.yaml +55 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SecretsAreRotated.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/SubnetHasACL.yaml +45 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCHasFlowLog.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCHasRestrictedSG.yaml +63 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/VPCPeeringRouteTableOverlyPermissive.yaml +66 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/aws/WAF2HasLogs.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AccessToPostgreSQLFromAzureServicesIsDisabled.yaml +37 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/ApplicationGatewayEnablesWAF.yaml +32 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureACR_HTTPSwebhook.yaml +12 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAKSclusterAzureCNIEnabled.yaml +13 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureActiveDirectoryAdminIsConfigured.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAntimalwareIsConfiguredWithAutoUpdatesForVMs.yaml +35 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureAutomationAccNotOverlyPermissiveNetAccess.yaml +12 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureConfigMSSQLwithAD.yaml +21 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureContainerInstanceconfigManagedIdentity.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureDataFactoriesEncryptedWithCustomerManagedKey.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureKeyVaultConfigPrivateEndpoint.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureMSSQLServerHasSecurityAlertPolicy.yaml +31 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureNetworkInterfacePublicIPAddressId.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzurePostgreSQLFlexServerNotOverlyPermissive.yaml +20 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSpringCloudConfigWithVnet.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSqlDbEnableTransparentDataEncryption.yaml +13 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureStorageAccConfigWithPrivateEndpoint.yaml +31 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureStorageAccountsUseCustomerManagedKeyForEncryption.yaml +23 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSubnetConfigWithNSG.yaml +45 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureSynapseWorkspacesHaveNoIPFirewallRulesAttached.yaml +18 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/AzureUnattachedDisksAreEncrypted.yaml +43 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/CognitiveServicesCustomerManagedKey.yaml +23 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/DataExplorerEncryptionUsesCustomKey.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/MSQLenablesCustomerManagedKey.yaml +24 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/PGSQLenablesCustomerManagedKey.yaml +24 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/SQLServerAuditingEnabled.yaml +36 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/SQLServerAuditingRetention90Days.yaml +38 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageContainerActivityLogsNotPublic.yaml +56 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageCriticalDataEncryptedCMK.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageLoggingIsEnabledForBlobService.yaml +37 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/StorageLoggingIsEnabledForTableService.yaml +28 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAconfiguredToSendReports.yaml +52 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAconfiguredToSendReportsToAdmins.yaml +51 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAisEnabledInStorageAccount.yaml +25 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VAsetPeriodicScansOnSQL.yaml +43 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VMHasBackUpMachine.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azure/VirtualMachinesUtilizingManagedDisks.yaml +21 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/azuredevops/ADORepositoryHasMinTwoReviewers.yaml +26 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/CloudFunctionSecureHTTPTrigger.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/DisableAccessToSqlDBInstanceForRootUsersWithoutPassword.yaml +50 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPAuditLogsConfiguredForAllServicesAndUsers.yaml +34 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml +34 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPContainerRegistryReposAreNotPubliclyAccessible.yaml +63 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPKMSCryptoKeysAreNotPubliclyAccessible.yaml +64 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPKMSKeyRingsAreNotPubliclyAccessible.yaml +63 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPLogBucketsConfiguredUsingLock.yaml +38 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPMySQLdbInstancePoint_In_TimeRecoveryBackupIsEnabled.yaml +19 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPNetworkDoesNotUseDefaultFirewall.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_durationIsSetToON.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_executor_statsIsSetToOFF.yaml +22 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_parser_statsIsSetToOFF.yaml +22 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_planner_statsIsSetToOFF.yaml +22 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPPostgreSQLDatabaseFlaglog_statement_statsIsSetToOFF.yaml +22 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPProjectHasNoLegacyNetworks.yaml +39 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCPdisableAlphaClusterFeatureInKubernetesEngineClusters.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GCRContainerVulnerabilityScanningEnabled.yaml +11 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/GKEClustersAreNotUsingDefaultServiceAccount.yaml +24 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/gcp/ServiceAccountHasGCPmanagedKey.yaml +13 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/github/RepositoryHasBranchProtection.yaml +21 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/AccessControlGroupRuleDefine.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/AutoScalingEnabledLB.yaml +36 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/ncp/RouteTablePublicSubnetConnection.yaml +35 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/AdministratorUserNotAssociatedWithAPIKey.yaml +62 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_K8EngineClusterBootVolConfigInTransitEncryption.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_K8EngineClusterPodSecPolicyEnforced.yaml +17 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_KubernetesEngineClusterEndpointConfigWithNSG.yaml +28 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_NFSaccessRestrictedToRootUsers.yaml +27 -0
- s1_cns_cli/s1graph/terraform/checks/graph_checks/oci/OCI_NSGNotAllowRDP.yaml +68 -0
- s1_cns_cli/s1graph/terraform/checks/module/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/checks/module/base_module_check.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/module/base_registry.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/module/registry.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/provider/__init__.py +6 -0
- s1_cns_cli/s1graph/terraform/checks/provider/aws/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/provider/aws/credentials.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/provider/base_check.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/provider/base_registry.py +11 -0
- s1_cns_cli/s1graph/terraform/checks/provider/linode/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/provider/linode/credentials.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/provider/ncp/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/provider/ncp/credentials.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/provider/oci/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/provider/oci/credentials.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/provider/openstack/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/provider/openstack/credentials.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/provider/panos/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/provider/panos/credentials.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/provider/registry.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/provider/s1cns/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/provider/s1cns/credentials.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/__init__.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ALBACLIsUnrestricted.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/APIGatewayProtocolHTTPS.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/AbsRDSParameter.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/AbsSecurityGroupUnrestrictedIngress.py +58 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ActionTrailLogAllEvents.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/ActionTrailLogAllRegions.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/DiskEncryptedWithCMK.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/DiskIsEncrypted.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/K8sEnableNetworkPolicies.py +60 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/K8sNodePoolAutoRepair.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/KMSKeyIsEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/KMSKeyRotationIsEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/LaunchTemplateDisksAreEncrypted.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/LogAuditRDSEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBInsideVPC.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBInstanceSSL.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBIsPublic.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/MongoDBTransparentDataEncryptionEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketAccessLogs.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketPublic.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketTransferAcceleration.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/OSSBucketVersioning.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyExpiration.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyLength.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyLowercaseLetter.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyMaxLogin.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyNumber.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyReuse.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicySymbol.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMPasswordPolicyUppcaseLetter.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RAMSecurityEnforceMFA.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceAutoUpgrade.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogConnections.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogDisconnections.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceLogsEnabled.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSInstanceSSL.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSIsPublic.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSRetention.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/RDSTransparentDataEncryptionEnabled.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/SecurityGroupUnrestrictedIngress22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/SecurityGroupUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/TLSPoliciesAreSecure.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/alicloud/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ACMCertCreateBeforeDestroy.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ACMCertSetLoggingPreference.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBDesyncMode.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBDropHttpHeaders.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ALBListenerHTTPS.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AMICopyIsEncrypted.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AMICopyUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AMIEncryption.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AMILaunchIsShared.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayAccessLogging.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayAuthorization.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayCacheEnable.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayCreateBeforeDestroy.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayDeploymentCreateBeforeDestroy.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayDomainNameTLS.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEnabled.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsCacheEncrypted.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayMethodSettingsDataTrace.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayV2RouteDefinesAuthorizationType.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/APIGatewayXray.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py +111 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AbsSecurityGroupUnrestrictedIngress.py +114 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppFlowConnectorProfileUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppFlowUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppSyncFieldLevelLogs.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppSyncLogging.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppsyncAPICacheEncryptionAtRest.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AppsyncAPICacheEncryptionInTransit.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaDatabaseEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaWorkgroupConfiguration.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AthenaWorkgroupEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AuroraEncryption.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AutoScalingLaunchTemplate.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/AutoScalingTagging.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/BackupVaultEncrypted.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudFrontResponseHeaderStrictTransportSecurity.py +61 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchAlarmsEnabled.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupKMSKey.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupRetention.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudformationStackNotificationArns.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionDefaultRoot.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionEncryption.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionLogging.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontDistributionOriginFailover.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudfrontTLS12.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudsearchDomainEnforceHttps.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudsearchDomainTLS.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailDefinesSNSTopic.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEnableLogging.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEncryptionWithCMK.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailEventDataStoreUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailLogValidation.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CloudtrailMultiRegion.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeArtifactDomainEncryptedWithCMK.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeBuildPrivilegedMode.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodeBuildProjectEncryption.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodePipelineArtifactsEncrypted.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildHasLogs.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildS3LogsEncrypted.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodebuildUsesCMK.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/CodecommitApprovalsRulesRequireMin2.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ComprehendEntityRecognizerModelUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ComprehendEntityRecognizerVolumeUsesCMK.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ConfigConfgurationAggregatorAllRegions.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ConnectInstanceKinesisVideoStreamStorageConfigUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ConnectInstanceS3StorageConfigUsesCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DAXEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DAXEndpointTLS.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceBackupRetentionPeriod.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceLogging.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DBInstanceMinorUpgrade.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DBSnapshotCopyUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DBSnapshotsArePrivate.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMEventsCrossRegionEncryption.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMEventsCrossRegionEncryptionWithCMK.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryption.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DLMScheduleCrossRegionEncryptionWithCMK.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSEndpointUsesCMK.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstanceEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstanceMinorUpgrade.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSReplicationInstancePubliclyAccessible.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DMSS3UsesCMK.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DatasyncLocationExposesSecrets.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBAuditLogs.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBGlobalClusterEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBLogging.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DocDBTLS.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBGlobalTableRecovery.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBTableReplicaKMSUsesCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamoDBTablesEncrypted.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/DynamodbRecovery.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSDefaultEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSSnapshotCopyEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EBSVolumeEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2Credentials.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2DetailedMonitoringEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2EBSOptimized.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EC2PublicIP.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRImageScanning.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRImmutableTags.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRPolicy.py +62 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECRRepositoryEncrypted.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterContainerInsights.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterLoggingEnabled.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerHostProcess.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerPrivilege.py +42 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSContainerReadOnlyRoot.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSServiceFargateLatest.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSServicePublicIP.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSTaskDefinitionEFSVolumeEncryption.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ECSTaskDefinitionRoleCheck.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSAccessPointRoot.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSAccessUserIdentity.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSEncryptionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EFSFileSystemEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSControlPlaneLogging.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSNodeGroupRemoteAccess.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPlatformVersion.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPublicAccess.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSPublicAccessCIDR.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EKSSecretsEncryption.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBAccessLogs.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBCrossZoneEnable.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBPolicyUsesSecureProtocols.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBUsesSSL.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ELBv2AccessLogs.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EMRClusterIsEncryptedKMS.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/EMRClusterKerberosAttributes.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/Ec2TransitGatewayAutoAccept.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElastiCacheHasCustomSubnet.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticCacheAutomaticBackup.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticCacheAutomaticMinorUpgrades.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheHasSecurityGroup.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtRest.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransit.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticacheReplicationGroupEncryptionAtTransitAuthToken.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDefaultSG.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainEnforceHTTPS.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainHA.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchDomainLogging.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchEncryptionWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchInVPC.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchNodeToNodeEncryption.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ElasticsearchTLSPolicy.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXOntapFSEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXOpenZFSFileSystemEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/FSXWindowsFSEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GlacierVaultAnyPrincipal.py +44 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GlobalAcceleratorAcceleratorFlowLogs.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueDataCatalogEncryption.py +53 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueSecurityConfiguration.py +55 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GlueSecurityConfigurationEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/GuarddutyDetectorEnabled.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMAdminPolicyDocument.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMCredentialsExposure.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMDataExfiltration.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMManagedAdminPolicy.py +61 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPermissionsManagement.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPolicyAttachedToGroupOrRoles.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMPrivilegeEscalation.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMRoleAllowAssumeFromAccount.py +46 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py +56 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMUserNotUsedForAccess.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IAMWriteAccess.py +15 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/IMDSv1Disabled.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderComponentEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderDistributionConfigurationEncryptedWithCMK.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/ImagebuilderImageRecipeEBSEncrypted.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSKeyIsEnabled.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSKeyWildcardPrincipal.py +42 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KMSRotation.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KendraIndexSSEUsesCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisFirehoseDeliveryStreamSSE.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisFirehoseDeliveryStreamUsesCMK.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisStreamEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisStreamEncryptionType.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/KinesisVideoEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LBCrossZone.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LBDeletionProtection.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LBTargetGroupsDefinesHealthcheck.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaDLQConfigured.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaEnvironmentCredentials.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaEnvironmentEncryptionSettings.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionIsNotPublic.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionLevelConcurrentExecutionLimit.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaFunctionURLAuth.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaInVPC.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LambdaXrayEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LaunchConfigurationEBSEncryption.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/LustreFSEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerAuditLogging.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerLogging.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerMinorAutoUpgrade.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerNotPubliclyExposed.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MQBrokerVersion.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterEncryption.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterLogging.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MSKClusterNodesArePrivate.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAASchedulerLogsEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAAWebserverLogsEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MWAAWorkerLogsEnabled.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBClusterIntransitEncryption.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBEncryptionWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/MemoryDBSnapshotEncryptionWithCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterInstancePublic.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterLogging.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterSnapshotEncrypted.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterSnapshotEncryptedWithCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NeptuneClusterStorageEncrypted.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress20.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress21.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/NetworkACLUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyExpiration.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyLength.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyLowercaseLetter.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyNumber.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyReuse.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicySymbol.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/PasswordPolicyUppercaseLetter.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/QLDBLedgerDeletionProtection.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/QLDBLedgerPermissionsMode.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSCACertIsRecent.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterActivityStreamEncryptedWithCMK.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterAuditLogging.py +48 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterAuroraBacktrack.py +43 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterCopyTags.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterEncrypted.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterIAMAuthentication.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterLogging.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSClusterSnapshotEncrypted.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSDeletionProtection.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSEnhancedMonitorEnabled.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSHasSecurityGroup.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSIAMAuthentication.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSInstanceAutoBackupEncryptionWithCMK.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSInstanceDeletionProtection.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSMultiAZEnabled.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSPostgreSQLLogFDWExtension.py +87 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RDSPubliclyAccessible.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedShiftSSL.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterAllowVersionUpgrade.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterDatabaseName.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterKMSKey.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterLogging.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterSnapshotCopyGrantEncryptedWithCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftClusterUseEnhancedVPCRouting.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftInEc2ClassicMode.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshiftServerlessNamespaceKMSKey.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/RedshitClusterPubliclyAvailable.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3AbortIncompleteUploads.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3AllowsAnyPrincipal.py +52 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BlockPublicACLs.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BlockPublicPolicy.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BucketObjectEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3BucketObjectLock.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3IgnorePublicACLs.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py +53 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/S3RestrictPublicBuckets.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SNSTopicEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SNSTopicPolicyAnyPrincipal.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSPolicy.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSQueueEncryption.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SQSQueuePolicyAnyPrincipal.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMDocumentsArePrivate.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMParameterUsesCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMSessionManagerDocumentEncryption.py +43 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SSMSessionManagerDocumentLogging.py +47 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SageMakerInternetAccessDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerDomainEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerEndpointConfigurationEncryption.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookInCustomVPC.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SagemakerNotebookRoot.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SchedulerScheduleUsesCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecretManagerSecret90days.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecretManagerSecretEncrypted.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupRuleDescription.py +56 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngress80.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SecurityGroupUnrestrictedIngressAny.py +10 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/StateMachineLoggingExecutionHistory.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/StateMachineXray.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/SubnetPublicIP.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/TimestreamDatabaseKMSKey.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/TransferServerIsPublic.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/VPCDefaultNetwork.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/VPCEndpointAcceptanceConfigured.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFACLCVE202144228.py +58 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFHasAnyRules.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WAFHasLogs.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WorkspaceRootVolumeEncrypted.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/WorkspaceUserVolumeEncrypted.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/aws/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRAdminAccountDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRAnonymousPullDisabled.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRContainerScanEnabled.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACREnableImageQuarantine.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACREnableRetentionPolicy.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRGeoreplicated.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRPublicNetworkAccessDisabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ACRUseSignedImages.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSApiServerAuthorizedIpRanges.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSDashboardDisabled.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSEnablesPrivateClusters.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSIsPaidSku.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSLocalAdminDisabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSLoggingEnabled.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSMaxPodsMinimum.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSNetworkPolicy.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSNodePublicIpDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSPoolTypeIsScaleSet.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSRbacEnabled.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSSecretStoreRotation.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUpgradeChannel.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUsesAzurePoliciesAddon.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AKSUsesDiskEncryptionSet.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementBackendHTTPS.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementCertsEnforced.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementMinTLS12.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/APIManagementPublicAccess.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/APIServicesUseVirtualNetwork.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/ActiveDirectoryUsedAuthenticationServiceFabric.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigLocalAuth.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigPublicAccess.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigPurgeProtection.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppConfigSku.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppGWUseWAFMode.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppGatewayWAFACLCVE202144228.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceAlwaysOn.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceAuthentication.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceClientCertificate.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDetailedErrorMessagesEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDisallowCORS.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceEnableFailedRequest.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceFTPSState.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHTTPSOnly.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHttpLoggingEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceHttps20Enabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceIdentity.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceIdentityProviderEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceInstanceMinimum.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceJavaVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceMinTLSVersion.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServicePHPVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServicePythonVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceRemoteDebuggingNotEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSetHealthCheck.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSkuMinimum.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotDebugDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotHTTPSOnly.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceSlotMinTLS.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AppServiceUsedAzureFiles.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AutomationEncrypted.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureBatchAccountUsesKeyVaultEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureContainerGroupDeployedIntoVirtualNetwork.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDataExplorerDoubleEncryptionEnabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnAppServices.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnContainerRegistry.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnKeyVaults.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnKubernetes.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnServers.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnSqlServerVMS.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnSqlServers.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureDefenderOnStorage.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureInstanceExtensions.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureInstancePassword.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureManagedDiskEncryption.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureManagedDiskEncryptionSet.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureScaleSetPassword.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchAllowedIPsNotGlobal.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchManagedIdentity.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchPublicNetworkAccessDisabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchSLAIndex.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureSearchSLAQueryUpdates.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServiceFabricClusterProtectionLevel.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusDoubleEncryptionEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusHasCMK.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusIdentityProviderEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusLocalAuthDisabled.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusMinTLSVersion.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/AzureServicebusPublicAccessDisabled.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNDisableHttpEndpoints.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNEnableHttpsEndpoints.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CDNTLSProtocol12.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CognitiveServicesDisablesPublicNetwork.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBAccountsRestrictedAccess.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBDisableAccessKeyWrite.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBDisablesPublicNetwork.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBHaveCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CosmosDBLocalAuthDisabled.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/CutsomRoleDefinitionSubscriptionOwner.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerSKUHasSLA.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerServiceIdentity.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataExplorerUsesDiskEncryption.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataFactoryNoPublicNetworkAccess.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataFactoryUsesGitRepository.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DataLakeStoreEncryption.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/DatabricksWorkspaceIsNotPublic.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainIdentityProviderEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainLocalAuthentication.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridDomainNetworkAccess.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicIdentityProviderEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicLocalAuthentication.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/EventgridTopicNetworkAccess.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FrontDoorWAFACLCVE202144228.py +48 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FrontdoorUseWAFMode.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppDisallowCORS.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppEnableLogging.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppHttpVersionLatest.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppsAccessibleOverHttps.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/FunctionAppsEnableAuthentication.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/IoTNoPublicNetworkAccess.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyBackedByHSM.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyExpirationDate.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultDisablesPublicNetworkAccess.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesFirewallRulesSettings.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesPurgeProtection.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyVaultEnablesSoftDelete.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/KeyvaultRecoveryEnabled.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/LinuxVMUsesSSH.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MLCCLADisabled.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MLComputeClusterMinNodes.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MLPublicAccess.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MSSQLServerAuditPolicyLogMonitor.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MSSQLServerMinTLSVersion.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBGeoBackupEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBPublicAccessDisabled.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MariaDBSSLEnforcementEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MonitorLogProfileCategories.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MonitorLogProfileRetentionDays.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLEncryptionEnaled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLGeoBackupEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLPublicAccessDisabled.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLServerMinTLSVersion.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLServerSSLEnforcementEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/MySQLTreatDetectionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleHTTPAccessRestricted.py +13 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py +97 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleRDPAccessRestricted.py +13 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleSSHAccessRestricted.py +13 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NSGRuleUDPAccessRestricted.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NetworkInterfaceEnableIPForwarding.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLEncryptionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLFlexiServerGeoBackupEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLMinTLSVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerConnectionThrottlingEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogCheckpointsEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogConnectionsEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerLogRetentionEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerPublicAccessDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgreSQLServerSSLEnforcementEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgresSQLTreatDetectionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PostgressSQLGeoBackupEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PubsubSKUSLA.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/PubsubSpecifyIdentity.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCacheEnableNonSSLPort.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCacheMinTLSVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/RedisCachePublicNetworkAccessEnabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerEmailAlertsEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerEmailAlertsToAdminsEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerNoPublicAccess.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerPublicAccessDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SQLServerThreatDetectionTypes.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecretContentType.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecretExpirationDate.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmailAlert.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmailAlertAdmins.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactEmails.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterContactPhone.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SecurityCenterStandardPricing.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SignalRSKUSLA.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SpringCloudAPIPortalHTTPSOnly.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SpringCloudAPIPortalPublicAccessIsDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountAzureServicesAccessEnabled.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountDefaultNetworkAccessDeny.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountDisablePublicAccess.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountLoggingQueueServiceEnabled.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountMinimumTlsVersion.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountName.py +42 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountsTransportEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageAccountsUseReplication.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageBlobRestrictPublicAccess.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageBlobServiceContainerPrivateAccess.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/StorageSyncPublicAccessDisabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SynapseWorkspaceEnablesDataExfilProtection.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/SynapseWorkspaceEnablesManagedVirtualNetworks.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMAgentIsInstalled.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMCredsInCustomData.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMDisablePasswordAuthentication.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMEncryptionAtHostEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMScaleSetsAutoOSImagePatchingEnabled.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VMStorageOsDisk.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VnetLocalDNS.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/VnetSingleDNSServer.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/WinVMAutomaticUpdates.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/WinVMEncryptionAtHost.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/azure/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/base_cloudsplaining_resource_iam_check.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/base_registry.py +12 -0
- s1_cns_cli/s1graph/terraform/checks/resource/base_resource_check.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/base_resource_negative_value_check.py +90 -0
- s1_cns_cli/s1graph/terraform/checks/resource/base_resource_value_check.py +114 -0
- s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/DropletSSHKeys.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/FirewallIngressOpen.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/SpacesBucketPublicRead.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/SpacesBucketVersioning.py +19 -0
- s1_cns_cli/s1graph/terraform/checks/resource/digitalocean/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleBasicRoles.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleComputeFirewallUnrestrictedIngress.py +46 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleIAMMemberDefaultServiceAccount.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGoogleImpersonationRoles.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/AbsGooglePostgresqlDatabaseFlags.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/ArtifactRegistryPrivateRepo.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/ArtifactRegsitryEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryDatasetEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryPrivateTable.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigQueryTableEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/BigTableInstanceEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudArmorWAFACLCVE202144228.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudBuildWorkersArePrivate.py +18 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudFunctionsShouldNotBePublic.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudPubSubEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudSqlMajorVersion.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageLogging.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageSelfLogging.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/CloudStorageVersioningEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionPrivateInstance.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionStackdriverLogs.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataFusionStackdriverMonitoring.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataflowJobEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataflowPrivateJob.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocClusterEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocPrivateCluster.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/DataprocPublicIpCluster.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GCPCloudRunPrivateService.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEAliasIpEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEBasicAuth.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEBinaryAuthorization.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEClientCertificateDisabled.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEClusterLogging.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEDisableLegacyAuth.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnableShieldedNodes.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnableVPCFlowLogs.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEEnsureIntegrityMonitoring.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEHasLabels.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEKubernetesRBACGoogleGroups.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKELegacyInstanceMetadataDisabled.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMasterAuthorizedNetworksEnabled.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMetadataServerIsEnabled.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEMonitoringEnabled.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENetworkPolicyEnabled.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENodePoolAutoRepairEnabled.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKENodePoolAutoUpgradeEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPodSecurityPolicyEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPrivateClusterConfig.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPrivateNodes.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEPublicControlPlane.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEReleaseChannel.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKESecureBootforShieldedNodes.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GKEUseCosImage.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleBigQueryDatasetPublicACL.py +48 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudDNSKeySpecsRSASHA1.py +36 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudDNSSECEnabled.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudMySqlLocalInfileOff.py +49 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlEnablePgaudit.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogCheckpoints.py +47 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogConnection.py +44 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogDisconnection.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogHostname.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogLockWaits.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinDuration.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinErrorStatement.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogMinMessage.py +52 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogStatement.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudPostgreSqlLogTemp.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlBackupConfiguration.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePubliclyAccessible.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlDatabaseRequireSsl.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerContainedDBAuthentication.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerCrossDBOwnershipChaining.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleCloudSqlServerNoPublicIP.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeBlockProjectSSH.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeBootDiskEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccount.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDefaultServiceAccountFullAccess.py +54 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeDiskEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeExternalIP.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress20.py +16 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress21.py +16 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress22.py +16 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress3306.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress3389.py +16 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeFirewallUnrestrictedIngress80.py +16 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeIPForward.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeInstanceOSLogin.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeProjectOSLogin.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeSSLPolicy.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeSerialPorts.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleComputeShieldedVM.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderBasicRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderImpersonationRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleFolderMemberDefaultServiceAccount.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSKeyIsPublic.py +57 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSPreventDestroy.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleKMSRotationPeriod.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgBasicRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgImpersonationRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleOrgMemberDefaultServiceAccount.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectAdminServiceAccount.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectBasicRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectDefaultNetwork.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectImpersonationRole.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleProjectMemberDefaultServiceAccount.py +14 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleRoleServiceAccountUser.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStorageBucketNotPublic.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleStoragePublicAccessPrevention.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkIPV6PrivateGoogleEnabled.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkLoggingEnabled.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/GoogleSubnetworkPrivateGoogleEnabled.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/MemorystoreForRedisAuthEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/MemorystoreForRedisInTransitEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/PubSubPrivateTopic.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/SpannerDatabaseEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIDatasetEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIMetadataStoreEncryptedWithCMK.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/VertexAIPrivateInstance.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gcp/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/BranchProtectionRequireSignedCommits.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/BranchProtectionReviewNumTwo.py +30 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/PrivateRepo.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/RepositoryEnableVulnerabilityAlerts.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/SecretsEncrypted.py +37 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/WebhookInsecureSsl.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/github/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gitlab/ForcePushDisabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gitlab/PreventSecretsEnabled.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gitlab/RejectUnsignedCommits.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gitlab/RequireTwoApprovalsToMerge.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/gitlab/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowPrivilegeEscalation.py +55 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowPrivilegeEscalationPSP.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilities.py +54 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilitiesPSP.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/AllowedCapabilitiesSysAdmin.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/CPULimits.py +56 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/CPURequests.py +52 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ContainerSecurityContext.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultNamespace.py +40 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultServiceAccount.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DefaultServiceAccountBinding.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DockerSocketVolume.py +57 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DropCapabilities.py +68 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/DropCapabilitiesPSP.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/HostPort.py +58 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImageDigest.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImagePullPolicyAlways.py +58 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ImageTagFixed.py +55 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/LivenessProbe.py +52 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MemoryLimits.py +53 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MemoryRequests.py +52 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MinimiseCapabilities.py +54 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/MinimiseCapabilitiesPSP.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PodSecurityContext.py +57 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PrivilegedContainer.py +47 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/PrivilegedContainerPSP.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ReadinessProbe.py +56 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ReadonlyRootFilesystem.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/RootContainerPSP.py +35 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SeccompPSP.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/Secrets.py +61 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostIPC.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostIPCPSP.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostPID.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/ShareHostPIDPSP.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SharedHostNetworkNamespace.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/SharedHostNetworkNamespacePSP.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/Tiller.py +77 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/TillerService.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/WildcardRoles.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/kubernetes/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/authorized_keys.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/firewall_inbound_policy.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/firewall_outbound_policy.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/user_email_set.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/linode/user_username_set.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRule.py +58 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupInboundRulePort80.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupOutboundRule.py +25 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/AccessControlGroupRuleDescription.py +47 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBListenerUsesSecureProtocols.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBListenerUsingHTTPS.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBNetworkPrivate.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBTargetGroupDefinesHealthCheck.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LBTargetGroupUsingHTTPS.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/LaunchConfigurationEncryptionVPC.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound20.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound21.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInbound3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLInboundCheck.py +27 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NACLPortCheck.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NASEncryptionEnabled.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NKSControlPlaneLogging.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/NKSPublicAccess.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/RouteTableNATGatewayDefault.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/ServerEncryptionVPC.py +17 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/ServerPublicIP.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/ncp/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/AbsSecurityGroupUnrestrictedIngress.py +39 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/AbsSecurityListUnrestrictedIngress.py +45 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/FileSystemEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordLength.py +31 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyLowerCase.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyNumeric.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicySpecialCharacters.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/IAMPasswordPolicyUpperCase.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceBootVolumeIntransitEncryption.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceMetadataServiceEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/InstanceMonitoringEnabled.py +24 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageEmitEvents.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageEncryption.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStoragePublic.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/ObjectStorageVersioning.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityGroupUnrestrictedIngress22.py +10 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityGroupsIngressStatelessSecurityRules.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListIngress.py +21 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListIngressStateless.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListUnrestrictedIngress22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/SecurityListUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/StorageBlockBackupEnabled.py +22 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/StorageBlockEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/oci/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/AbsSecurityGroupUnrestrictedIngress.py +77 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/ComputeInstanceAdminPassword.py +32 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/FirewallRuleSetDestinationIP.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/SecurityGroupUnrestrictedIngress22.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/SecurityGroupUnrestrictedIngress3389.py +9 -0
- s1_cns_cli/s1graph/terraform/checks/resource/openstack/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/InterfaceMgmtProfileNoHTTP.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/InterfaceMgmtProfileNoTelnet.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecAlgorithms.py +43 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecAuthAlgorithms.py +43 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/NetworkIPsecProtocols.py +20 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyDescription.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyLogForwarding.py +50 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyLoggingEnabled.py +49 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoApplicationAny.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoDSRI.py +48 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoServiceAny.py +51 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/PolicyNoSrcAnyDstAny.py +70 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/ZoneProtectionProfile.py +43 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/ZoneUserIDIncludeACL.py +55 -0
- s1_cns_cli/s1graph/terraform/checks/resource/panos/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/checks/resource/registry.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeInstanceGroupPublicIP.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeInstanceGroupSecurityGroup.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMPublicIP.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMSecurityGroup.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ComputeVMSerialConsole.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMCloudElevatedMembers.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMFolderElevatedMembers.py +26 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMOrganizationElevatedMembers.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/IAMPassportAccountUsage.py +57 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SAutoUpgrade.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SEtcdKMSEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNetworkPolicy.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupAutoUpgrade.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupPublicIP.py +28 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SNodeGroupSecurityGroup.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SPublicIP.py +29 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/K8SSecurityGroup.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/KMSSymmetricKeyRotation.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/MDBPublicIP.py +41 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/MDBSecurityGroup.py +33 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ObjectStorageBucketEncryption.py +23 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/ObjectStorageBucketPublicAccess.py +34 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/VPCSecurityGroupAllowAll.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/VPCSecurityGroupRuleAllowAll.py +38 -0
- s1_cns_cli/s1graph/terraform/checks/resource/yandexcloud/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/checks/utils/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/checks/utils/base_cloudsplaining_iam_scanner.py +53 -0
- s1_cns_cli/s1graph/terraform/checks/utils/consts.py +0 -0
- s1_cns_cli/s1graph/terraform/checks/utils/dependency_path_handler.py +13 -0
- s1_cns_cli/s1graph/terraform/checks/utils/iam_terraform_document_to_policy_converter.py +25 -0
- s1_cns_cli/s1graph/terraform/context_parsers/__init__.py +1 -0
- s1_cns_cli/s1graph/terraform/context_parsers/base_parser.py +186 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/__init__.py +4 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/data_context_parser.py +32 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/locals_context_parser.py +40 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/module_context_parser.py +29 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/provider_context_parser.py +59 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/resource_context_parser.py +36 -0
- s1_cns_cli/s1graph/terraform/context_parsers/parsers/variable_context_parser.py +42 -0
- s1_cns_cli/s1graph/terraform/context_parsers/registry.py +48 -0
- s1_cns_cli/s1graph/terraform/context_parsers/tf_plan/__init__.py +34 -0
- s1_cns_cli/s1graph/terraform/deep_analysis_plan_graph_manager.py +50 -0
- s1_cns_cli/s1graph/terraform/evaluation/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/evaluation/base_variable_evaluation.py +71 -0
- s1_cns_cli/s1graph/terraform/graph_builder/EncryptionCalculation.md +45 -0
- s1_cns_cli/s1graph/terraform/graph_builder/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/abstract_handler.py +248 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/builder.py +25 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/consts.py +14 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/module_handler.py +271 -0
- s1_cns_cli/s1graph/terraform/graph_builder/foreach/resource_handler.py +110 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/attribute_names.py +0 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/block_types.py +15 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/blocks.py +181 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/generic_resource_encryption.py +122 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_components/module.py +271 -0
- s1_cns_cli/s1graph/terraform/graph_builder/graph_to_tf_definitions.py +43 -0
- s1_cns_cli/s1graph/terraform/graph_builder/local_graph.py +710 -0
- s1_cns_cli/s1graph/terraform/graph_builder/utils.py +300 -0
- s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/evaluate_terraform.py +583 -0
- s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/renderer.py +588 -0
- s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/safe_eval_functions.py +344 -0
- s1_cns_cli/s1graph/terraform/graph_builder/variable_rendering/vertex_reference.py +17 -0
- s1_cns_cli/s1graph/terraform/graph_manager.py +63 -0
- s1_cns_cli/s1graph/terraform/image_referencer/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/image_referencer/base_provider.py +57 -0
- s1_cns_cli/s1graph/terraform/image_referencer/manager.py +27 -0
- s1_cns_cli/s1graph/terraform/image_referencer/provider/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform/image_referencer/provider/aws.py +97 -0
- s1_cns_cli/s1graph/terraform/image_referencer/provider/azure.py +111 -0
- s1_cns_cli/s1graph/terraform/image_referencer/provider/gcp.py +70 -0
- s1_cns_cli/s1graph/terraform/module_loading/__init__.py +8 -0
- s1_cns_cli/s1graph/terraform/module_loading/content.py +39 -0
- s1_cns_cli/s1graph/terraform/module_loading/loader.py +74 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/__init__.py +5 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/bitbucket_access_token_loader.py +19 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/bitbucket_loader.py +10 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/git_loader.py +145 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/github_access_token_loader.py +38 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/github_loader.py +21 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/local_path_loader.py +49 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/registry_loader.py +210 -0
- s1_cns_cli/s1graph/terraform/module_loading/loaders/versions_parser.py +68 -0
- s1_cns_cli/s1graph/terraform/module_loading/module_finder.py +100 -0
- s1_cns_cli/s1graph/terraform/module_loading/module_params.py +26 -0
- s1_cns_cli/s1graph/terraform/module_loading/registry.py +106 -0
- s1_cns_cli/s1graph/terraform/modules/__init__.py +2 -0
- s1_cns_cli/s1graph/terraform/modules/module_objects.py +94 -0
- s1_cns_cli/s1graph/terraform/modules/module_utils.py +288 -0
- s1_cns_cli/s1graph/terraform/parser.py +650 -0
- s1_cns_cli/s1graph/terraform/parser_functions.py +207 -0
- s1_cns_cli/s1graph/terraform/plan_parser.py +330 -0
- s1_cns_cli/s1graph/terraform/plan_runner.py +292 -0
- s1_cns_cli/s1graph/terraform/plan_utils.py +137 -0
- s1_cns_cli/s1graph/terraform/runner.py +694 -0
- s1_cns_cli/s1graph/terraform/tag_providers/__init__.py +21 -0
- s1_cns_cli/s1graph/terraform/tag_providers/aws.py +7 -0
- s1_cns_cli/s1graph/terraform/tag_providers/azure.py +7 -0
- s1_cns_cli/s1graph/terraform/tag_providers/gcp.py +7 -0
- s1_cns_cli/s1graph/terraform/tf_parser.py +563 -0
- s1_cns_cli/s1graph/terraform_json/__init__.py +0 -0
- s1_cns_cli/s1graph/terraform_json/parser.py +199 -0
- s1_cns_cli/s1graph/terraform_json/runner.py +230 -0
- s1_cns_cli/s1graph/terraform_json/utils.py +67 -0
- s1_cns_cli/s1graph/version.py +1 -0
- s1_cns_cli/s1graph/yaml_doc/__init__.py +0 -0
- s1_cns_cli/s1graph/yaml_doc/base_registry.py +349 -0
- s1_cns_cli/s1graph/yaml_doc/base_yaml_check.py +28 -0
- s1_cns_cli/s1graph/yaml_doc/enums.py +8 -0
- s1_cns_cli/s1graph/yaml_doc/registry.py +4 -0
- s1_cns_cli/s1graph/yaml_doc/runner.py +128 -0
- s1_cns_cli/sentry.py +39 -0
- s1_cns_cli/version.py +2 -0
- s1_shift_left_cli-0.4.0.dist-info/LICENSE +5 -0
- s1_shift_left_cli-0.4.0.dist-info/METADATA +113 -0
- s1_shift_left_cli-0.4.0.dist-info/RECORD +2207 -0
- s1_shift_left_cli-0.4.0.dist-info/WHEEL +4 -0
- s1_shift_left_cli-0.4.0.dist-info/entry_points.txt +5 -0
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import copy
|
|
4
|
+
import io
|
|
5
|
+
import logging
|
|
6
|
+
import multiprocessing
|
|
7
|
+
import os
|
|
8
|
+
import pathlib
|
|
9
|
+
import platform
|
|
10
|
+
import shutil
|
|
11
|
+
import subprocess # nosec
|
|
12
|
+
import tempfile
|
|
13
|
+
|
|
14
|
+
import yaml
|
|
15
|
+
from typing import Optional, Dict, Any, TextIO, TYPE_CHECKING
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from s1_cns_cli.s1graph.common.graph.graph_builder import CustomAttributes
|
|
19
|
+
from s1_cns_cli.s1graph.common.graph.graph_builder.consts import GraphSource
|
|
20
|
+
from s1_cns_cli.s1graph.common.images.image_referencer import Image
|
|
21
|
+
from s1_cns_cli.s1graph.common.output.record import Record
|
|
22
|
+
from s1_cns_cli.s1graph.common.output.report import Report
|
|
23
|
+
from s1_cns_cli.s1graph.common.s1cns.check_type import CheckType
|
|
24
|
+
from s1_cns_cli.s1graph.common.runners.base_runner import BaseRunner, filter_ignored_paths
|
|
25
|
+
from s1_cns_cli.s1graph.common.typing import _CheckResult
|
|
26
|
+
from s1_cns_cli.s1graph.kubernetes.kubernetes_utils import get_resource_id
|
|
27
|
+
from s1_cns_cli.s1graph.kubernetes.runner import Runner as K8sRunner
|
|
28
|
+
from s1_cns_cli.s1graph.kubernetes.runner import _get_entity_abs_path
|
|
29
|
+
from s1_cns_cli.s1graph.kustomize.image_referencer.manager import KustomizeImageReferencerManager
|
|
30
|
+
from s1_cns_cli.s1graph.kustomize.utils import get_kustomize_version
|
|
31
|
+
from s1_cns_cli.s1graph.runner_filter import RunnerFilter
|
|
32
|
+
from s1_cns_cli.s1graph.common.graph.checks_infra.registry import BaseRegistry
|
|
33
|
+
from s1_cns_cli.s1graph.common.typing import LibraryGraphConnector
|
|
34
|
+
from s1_cns_cli.s1graph.kubernetes.graph_builder.local_graph import KubernetesLocalGraph
|
|
35
|
+
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
from s1_cns_cli.s1graph.common.checks.base_check import BaseCheck
|
|
38
|
+
from s1_cns_cli.s1graph.common.graph.checks_infra.base_check import BaseGraphCheck
|
|
39
|
+
from s1_cns_cli.s1graph.kubernetes.graph_manager import KubernetesGraphManager
|
|
40
|
+
from networkx import DiGraph
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class K8sKustomizeRunner(K8sRunner):
|
|
44
|
+
def __init__(
|
|
45
|
+
self,
|
|
46
|
+
graph_class: type[KubernetesLocalGraph] = KubernetesLocalGraph,
|
|
47
|
+
db_connector: LibraryGraphConnector | None = None,
|
|
48
|
+
source: str = GraphSource.KUBERNETES,
|
|
49
|
+
graph_manager: KubernetesGraphManager | None = None,
|
|
50
|
+
external_registries: list[BaseRegistry] | None = None
|
|
51
|
+
) -> None:
|
|
52
|
+
|
|
53
|
+
super().__init__(graph_class, db_connector, source, graph_manager, external_registries, CheckType.KUSTOMIZE)
|
|
54
|
+
self.check_type = CheckType.KUSTOMIZE
|
|
55
|
+
self.report_mutator_data: "dict[str, dict[str, Any]]" = {}
|
|
56
|
+
self.original_root_dir: str = ''
|
|
57
|
+
self.pbar.turn_off_progress_bar()
|
|
58
|
+
|
|
59
|
+
def set_external_data(
|
|
60
|
+
self,
|
|
61
|
+
definitions: dict[str, dict[str, Any] | list[dict[str, Any]]] | None,
|
|
62
|
+
context: dict[str, dict[str, Any]] | None,
|
|
63
|
+
breadcrumbs: dict[str, dict[str, Any]] | None,
|
|
64
|
+
report_mutator_data: dict[str, dict[str, Any]] | None = None,
|
|
65
|
+
**kwargs: Any,
|
|
66
|
+
) -> None:
|
|
67
|
+
super().set_external_data(definitions, context, breadcrumbs)
|
|
68
|
+
self.report_mutator_data = report_mutator_data or {}
|
|
69
|
+
|
|
70
|
+
def set_report_mutator_data(self, report_mutator_data: Optional[Dict[str, Dict[str, Any]]]) -> None:
|
|
71
|
+
self.report_mutator_data = report_mutator_data or {}
|
|
72
|
+
|
|
73
|
+
def mutate_kubernetes_results(
|
|
74
|
+
self,
|
|
75
|
+
results: dict[BaseCheck, _CheckResult],
|
|
76
|
+
report: Report,
|
|
77
|
+
k8_file: str,
|
|
78
|
+
k8_file_path: str,
|
|
79
|
+
file_abs_path: str,
|
|
80
|
+
entity_conf: dict[str, Any],
|
|
81
|
+
variable_evaluations: dict[str, Any],
|
|
82
|
+
) -> Report:
|
|
83
|
+
# Moves report generation logic out of s1graph.kubernetes.runner.run() def.
|
|
84
|
+
# Allows us to overriding report file information for "child" frameworks such as Kustomize, Helm
|
|
85
|
+
# Where Kubernetes CHECKS are needed, but the specific file references are to another framework for the user output (or a mix of both).
|
|
86
|
+
if not self.context:
|
|
87
|
+
# this shouldn't happen
|
|
88
|
+
logging.error("context was not set correctly")
|
|
89
|
+
return report
|
|
90
|
+
|
|
91
|
+
kustomize_metadata = self.report_mutator_data['kustomizeMetadata'],
|
|
92
|
+
kustomize_file_mappings = self.report_mutator_data['kustomizeFileMappings']
|
|
93
|
+
for check, check_result in results.items():
|
|
94
|
+
resource_id = get_resource_id(entity_conf)
|
|
95
|
+
if not resource_id:
|
|
96
|
+
logging.error(f"Couldn't get resource ID for {entity_conf}")
|
|
97
|
+
continue
|
|
98
|
+
|
|
99
|
+
entity_context = self.context[k8_file][resource_id]
|
|
100
|
+
|
|
101
|
+
if file_abs_path not in kustomize_file_mappings:
|
|
102
|
+
logging.warning(f"couldn't find {file_abs_path} path in kustomizeFileMappings")
|
|
103
|
+
continue
|
|
104
|
+
|
|
105
|
+
realKustomizeEnvMetadata = kustomize_metadata[0][kustomize_file_mappings[file_abs_path]]
|
|
106
|
+
if 'overlay' in realKustomizeEnvMetadata["type"]:
|
|
107
|
+
kustomizeResourceID = f'{realKustomizeEnvMetadata["type"]}:{str(realKustomizeEnvMetadata["overlay_name"])}:{resource_id}'
|
|
108
|
+
else:
|
|
109
|
+
kustomizeResourceID = f'{realKustomizeEnvMetadata["type"]}:{resource_id}'
|
|
110
|
+
|
|
111
|
+
external_run_indicator = "Bc"
|
|
112
|
+
file_path = realKustomizeEnvMetadata['filePath']
|
|
113
|
+
# means this scan originated in the platform
|
|
114
|
+
if type(self.graph_manager).__name__.startswith(external_run_indicator):
|
|
115
|
+
absolute_file_path = file_abs_path
|
|
116
|
+
else:
|
|
117
|
+
absolute_file_path = realKustomizeEnvMetadata['filePath']
|
|
118
|
+
# Fix file path to repo relative path
|
|
119
|
+
if self.original_root_dir:
|
|
120
|
+
repo_dir = str(pathlib.Path(self.original_root_dir).resolve())
|
|
121
|
+
if realKustomizeEnvMetadata['filePath'].startswith(repo_dir):
|
|
122
|
+
file_path = realKustomizeEnvMetadata['filePath'][len(repo_dir):]
|
|
123
|
+
|
|
124
|
+
code_lines = entity_context.get("code_lines")
|
|
125
|
+
file_line_range = self.line_range(code_lines)
|
|
126
|
+
record = Record(
|
|
127
|
+
check_id=check.id, bc_check_id=check.bc_id, check_name=check.name,
|
|
128
|
+
check_result=check_result, code_block=code_lines, file_path=file_path,
|
|
129
|
+
file_line_range=file_line_range,
|
|
130
|
+
resource=kustomizeResourceID, evaluations=variable_evaluations,
|
|
131
|
+
check_class=check.__class__.__module__, file_abs_path=absolute_file_path, severity=check.severity)
|
|
132
|
+
record.set_guideline(check.guideline)
|
|
133
|
+
report.add_record(record=record)
|
|
134
|
+
|
|
135
|
+
return report
|
|
136
|
+
|
|
137
|
+
def line_range(self, code_lines: list[tuple[int, str]]) -> list[int]:
|
|
138
|
+
num_of_lines = len(code_lines)
|
|
139
|
+
file_line_range = [0, 0]
|
|
140
|
+
if num_of_lines > 0:
|
|
141
|
+
first_line, code = code_lines[0]
|
|
142
|
+
last_line, code = code_lines[num_of_lines - 1]
|
|
143
|
+
file_line_range = [first_line, last_line]
|
|
144
|
+
return file_line_range
|
|
145
|
+
|
|
146
|
+
def mutate_kubernetes_graph_results(
|
|
147
|
+
self, root_folder: str | None, runner_filter: RunnerFilter, report: Report, checks_results: dict[BaseGraphCheck, list[_CheckResult]]
|
|
148
|
+
) -> Report:
|
|
149
|
+
# Moves report generation logic out of run() method in Runner class.
|
|
150
|
+
# Allows function overriding of a much smaller function than run() for other "child" frameworks such as Kustomize, Helm
|
|
151
|
+
# Where Kubernetes CHECKS are needed, but the specific file references are to another framework for the user output (or a mix of both).
|
|
152
|
+
if not self.context:
|
|
153
|
+
if self.context is None:
|
|
154
|
+
# this shouldn't happen
|
|
155
|
+
logging.error("Context for Kustomize runner was not set")
|
|
156
|
+
return report
|
|
157
|
+
|
|
158
|
+
kustomize_metadata = self.report_mutator_data['kustomizeMetadata'],
|
|
159
|
+
kustomize_file_mappings = self.report_mutator_data['kustomizeFileMappings']
|
|
160
|
+
|
|
161
|
+
for check, check_results in checks_results.items():
|
|
162
|
+
for check_result in check_results:
|
|
163
|
+
entity = check_result["entity"]
|
|
164
|
+
entity_file_path: str = entity[CustomAttributes.FILE_PATH]
|
|
165
|
+
entity_file_abs_path: str = _get_entity_abs_path(root_folder, entity_file_path)
|
|
166
|
+
entity_id: str = entity[CustomAttributes.ID]
|
|
167
|
+
entity_context = super().get_entity_context(entity=entity, entity_file_path=entity_file_path)
|
|
168
|
+
|
|
169
|
+
if entity_file_abs_path in kustomize_file_mappings:
|
|
170
|
+
realKustomizeEnvMetadata = kustomize_metadata[0][kustomize_file_mappings[entity_file_abs_path]]
|
|
171
|
+
if 'overlay' in realKustomizeEnvMetadata["type"]:
|
|
172
|
+
kustomizeResourceID = f'{realKustomizeEnvMetadata["type"]}:{str(realKustomizeEnvMetadata["overlay_name"])}:{entity_id}'
|
|
173
|
+
else:
|
|
174
|
+
kustomizeResourceID = f'{realKustomizeEnvMetadata["type"]}:{entity_id}'
|
|
175
|
+
else:
|
|
176
|
+
logging.warning(f"couldn't find {entity_file_abs_path} path in kustomizeFileMappings")
|
|
177
|
+
continue
|
|
178
|
+
code_lines = entity_context["code_lines"]
|
|
179
|
+
file_line_range = self.line_range(code_lines)
|
|
180
|
+
|
|
181
|
+
record = Record(
|
|
182
|
+
check_id=check.id,
|
|
183
|
+
check_name=check.name,
|
|
184
|
+
check_result=check_result,
|
|
185
|
+
code_block=code_lines,
|
|
186
|
+
file_path=realKustomizeEnvMetadata['filePath'],
|
|
187
|
+
file_line_range=file_line_range,
|
|
188
|
+
resource=kustomizeResourceID, # entity.get(CustomAttributes.ID),
|
|
189
|
+
evaluations={},
|
|
190
|
+
check_class=check.__class__.__module__,
|
|
191
|
+
file_abs_path=entity_file_abs_path,
|
|
192
|
+
severity=check.severity
|
|
193
|
+
)
|
|
194
|
+
record.set_guideline(check.guideline)
|
|
195
|
+
report.add_record(record=record)
|
|
196
|
+
|
|
197
|
+
return report
|
|
198
|
+
|
|
199
|
+
def get_image_report(self, root_folder: str | None, runner_filter: RunnerFilter) -> Report | None:
|
|
200
|
+
if not self.graph_manager:
|
|
201
|
+
return None
|
|
202
|
+
return self.check_container_image_references(
|
|
203
|
+
graph_connector=self.graph_manager.get_reader_endpoint(),
|
|
204
|
+
root_path=self.original_root_dir,
|
|
205
|
+
runner_filter=runner_filter,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
def extract_images(
|
|
209
|
+
self,
|
|
210
|
+
graph_connector: DiGraph | None = None,
|
|
211
|
+
definitions: None = None,
|
|
212
|
+
definitions_raw: dict[str, list[tuple[int, str]]] | None = None
|
|
213
|
+
) -> list[Image]:
|
|
214
|
+
if not graph_connector:
|
|
215
|
+
# should not happen
|
|
216
|
+
return []
|
|
217
|
+
|
|
218
|
+
manager = KustomizeImageReferencerManager(graph_connector=graph_connector, report_mutator_data=self.report_mutator_data)
|
|
219
|
+
images = manager.extract_images_from_resources()
|
|
220
|
+
|
|
221
|
+
return images
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class Runner(BaseRunner["KubernetesGraphManager"]):
|
|
225
|
+
kustomize_command = 'kustomize' # noqa: CCE003 # a static attribute
|
|
226
|
+
kubectl_command = 'kubectl' # noqa: CCE003 # a static attribute
|
|
227
|
+
check_type = CheckType.KUSTOMIZE # noqa: CCE003 # a static attribute
|
|
228
|
+
system_deps = True # noqa: CCE003 # a static attribute
|
|
229
|
+
kustomizeSupportedFileTypes = ('kustomization.yaml', 'kustomization.yml') # noqa: CCE003 # a static attribute
|
|
230
|
+
|
|
231
|
+
def __init__(self) -> None:
|
|
232
|
+
super().__init__(file_names=Runner.kustomizeSupportedFileTypes)
|
|
233
|
+
self.potentialBases: "list[str]" = []
|
|
234
|
+
self.potentialOverlays: "list[str]" = []
|
|
235
|
+
self.kustomizeProcessedFolderAndMeta: "dict[str, dict[str, str]]" = {}
|
|
236
|
+
self.kustomizeFileMappings: "dict[str, str]" = {}
|
|
237
|
+
self.templateRendererCommand: str | None = None
|
|
238
|
+
self.target_folder_path = ''
|
|
239
|
+
|
|
240
|
+
def get_k8s_target_folder_path(self) -> str:
|
|
241
|
+
return self.target_folder_path
|
|
242
|
+
|
|
243
|
+
def get_kustomize_metadata(self) -> dict[str, dict[str, Any]]:
|
|
244
|
+
return {'kustomizeMetadata': self.kustomizeProcessedFolderAndMeta,
|
|
245
|
+
'kustomizeFileMappings': self.kustomizeFileMappings}
|
|
246
|
+
|
|
247
|
+
def _parseKustomization(self, kustomize_dir: str) -> dict[str, str]:
|
|
248
|
+
# We may have multiple results for "kustomization.yaml" files. These could be:
|
|
249
|
+
# - Base and Environment (overlay) DIR's for the same kustomize-powered deployment
|
|
250
|
+
# - OR, Multiple different Kustomize-powered deployments
|
|
251
|
+
# - OR, a mixture of the two.
|
|
252
|
+
# We need parse some of the Kustomization.yaml files to work out which
|
|
253
|
+
# This is so we can provide "Environment" information back to the user as part of the checked resource name/description.
|
|
254
|
+
# TODO: We could also add a --kustomize-environment option so we only scan certain overlay names (prod, test etc) useful in CI.
|
|
255
|
+
yaml_path = os.path.join(kustomize_dir, "kustomization.yaml")
|
|
256
|
+
yml_path = os.path.join(kustomize_dir, "kustomization.yml")
|
|
257
|
+
if os.path.isfile(yml_path):
|
|
258
|
+
kustomization_path = yml_path
|
|
259
|
+
elif os.path.isfile(yaml_path):
|
|
260
|
+
kustomization_path = yaml_path
|
|
261
|
+
else:
|
|
262
|
+
return {}
|
|
263
|
+
|
|
264
|
+
with open(kustomization_path, 'r') as kustomizationFile:
|
|
265
|
+
metadata = {}
|
|
266
|
+
try:
|
|
267
|
+
fileContent = yaml.safe_load(kustomizationFile)
|
|
268
|
+
except yaml.YAMLError:
|
|
269
|
+
logging.info(f"Failed to load Kustomize metadata from {kustomization_path}.", exc_info=True)
|
|
270
|
+
|
|
271
|
+
if 'resources' in fileContent:
|
|
272
|
+
logging.debug(f"Kustomization contains resources: section. Likley a base. {kustomization_path}")
|
|
273
|
+
metadata['type'] = "base"
|
|
274
|
+
|
|
275
|
+
elif 'patchesStrategicMerge' in fileContent:
|
|
276
|
+
logging.debug(f"Kustomization contains patchesStrategicMerge: section. Likley an overlay/env. {kustomization_path}")
|
|
277
|
+
metadata['type'] = "overlay"
|
|
278
|
+
if 'bases' in fileContent:
|
|
279
|
+
metadata['referenced_bases'] = fileContent['bases']
|
|
280
|
+
|
|
281
|
+
elif 'bases' in fileContent:
|
|
282
|
+
logging.debug(f"Kustomization contains bases: section. Likley an overlay/env. {kustomization_path}")
|
|
283
|
+
metadata['type'] = "overlay"
|
|
284
|
+
metadata['referenced_bases'] = fileContent['bases']
|
|
285
|
+
|
|
286
|
+
metadata['fileContent'] = fileContent
|
|
287
|
+
metadata['filePath'] = f"{kustomization_path}"
|
|
288
|
+
if metadata.get('type') == "base":
|
|
289
|
+
self.potentialBases.append(metadata['filePath'])
|
|
290
|
+
|
|
291
|
+
if metadata.get('type') == "overlay":
|
|
292
|
+
self.potentialOverlays.append(metadata['filePath'])
|
|
293
|
+
|
|
294
|
+
return metadata
|
|
295
|
+
|
|
296
|
+
def check_system_deps(self) -> str | None:
|
|
297
|
+
# Ensure local system dependancies are available and of the correct version.
|
|
298
|
+
# Returns framework names to skip if deps **fail** (ie, return None for a successful deps check).
|
|
299
|
+
logging.info(f"Checking necessary system dependancies for {self.check_type} checks.")
|
|
300
|
+
|
|
301
|
+
if shutil.which(self.kubectl_command) is not None:
|
|
302
|
+
try:
|
|
303
|
+
proc = subprocess.run([self.kubectl_command, 'version', '--client=true'], capture_output=True) # nosec
|
|
304
|
+
version_output = proc.stdout.decode("utf-8")
|
|
305
|
+
|
|
306
|
+
if "Client Version:" in version_output:
|
|
307
|
+
kubectl_version_major = version_output.split('\n')[0].split('Major:\"')[1].split('"')[0]
|
|
308
|
+
kubectl_version_minor = version_output.split('\n')[0].split('Minor:\"')[1].split('"')[0]
|
|
309
|
+
kubectl_version = float(f"{kubectl_version_major}.{kubectl_version_minor}")
|
|
310
|
+
if kubectl_version >= 1.14:
|
|
311
|
+
logging.info(f"Found working version of {self.check_type} dependancy {self.kubectl_command}: {kubectl_version}")
|
|
312
|
+
self.templateRendererCommand = self.kubectl_command
|
|
313
|
+
return None
|
|
314
|
+
|
|
315
|
+
except Exception:
|
|
316
|
+
logging.debug(f"An error occured testing the {self.kubectl_command} command:", exc_info=True)
|
|
317
|
+
|
|
318
|
+
elif shutil.which(self.kustomize_command) is not None:
|
|
319
|
+
kustomize_version = get_kustomize_version(kustomize_command=self.kustomize_command)
|
|
320
|
+
if kustomize_version:
|
|
321
|
+
logging.info(
|
|
322
|
+
f"Found working version of {self.check_type} dependency {self.kustomize_command}: {kustomize_version}"
|
|
323
|
+
)
|
|
324
|
+
self.templateRendererCommand = self.kustomize_command
|
|
325
|
+
return None
|
|
326
|
+
else:
|
|
327
|
+
return self.check_type
|
|
328
|
+
else:
|
|
329
|
+
logging.info(f"Could not find usable tools locally to process {self.check_type} checks. Framework will be disabled for this run.")
|
|
330
|
+
return self.check_type
|
|
331
|
+
|
|
332
|
+
return None
|
|
333
|
+
|
|
334
|
+
def _handle_overlay_case(self, file_path: str) -> None:
|
|
335
|
+
for parent in pathlib.Path(file_path).parents:
|
|
336
|
+
for potentialBase in self.potentialBases:
|
|
337
|
+
pathlib_base_object = pathlib.Path(potentialBase)
|
|
338
|
+
potential_base_path = pathlib_base_object.parents[1]
|
|
339
|
+
if parent == potential_base_path.resolve():
|
|
340
|
+
self.kustomizeProcessedFolderAndMeta[file_path]['calculated_bases'] = str(pathlib_base_object.parent)
|
|
341
|
+
try:
|
|
342
|
+
relativeToFullPath = f"{file_path}/{self.kustomizeProcessedFolderAndMeta[file_path]['referenced_bases'][0]}"
|
|
343
|
+
if pathlib.Path(self.kustomizeProcessedFolderAndMeta[file_path]['calculated_bases']) == pathlib.Path(relativeToFullPath).resolve():
|
|
344
|
+
self.kustomizeProcessedFolderAndMeta[file_path]['validated_base'] = str(pathlib.Path(self.kustomizeProcessedFolderAndMeta[file_path]['calculated_bases']))
|
|
345
|
+
s1cns_kustomize_env_name_by_path = str(pathlib.Path(file_path).relative_to(pathlib.Path(self.kustomizeProcessedFolderAndMeta[file_path]['calculated_bases']).parent))
|
|
346
|
+
self.kustomizeProcessedFolderAndMeta[file_path]['overlay_name'] = s1cns_kustomize_env_name_by_path
|
|
347
|
+
logging.debug(f"Overlay based on {self.kustomizeProcessedFolderAndMeta[file_path]['validated_base']}, naming overlay {s1cns_kustomize_env_name_by_path} for SentinelOneCns Results.")
|
|
348
|
+
else:
|
|
349
|
+
s1cns_kustomize_env_name_by_path = pathlib.Path(file_path).stem
|
|
350
|
+
self.kustomizeProcessedFolderAndMeta[file_path]['overlay_name'] = s1cns_kustomize_env_name_by_path
|
|
351
|
+
logging.debug(f"Could not confirm base dir for Kustomize overlay/env. Using {s1cns_kustomize_env_name_by_path} for SentinelOneCns Results.")
|
|
352
|
+
|
|
353
|
+
except KeyError:
|
|
354
|
+
s1cns_kustomize_env_name_by_path = pathlib.Path(file_path).stem
|
|
355
|
+
self.kustomizeProcessedFolderAndMeta[file_path]['overlay_name'] = s1cns_kustomize_env_name_by_path
|
|
356
|
+
logging.debug(f"Could not confirm base dir for Kustomize overlay/env. Using {s1cns_kustomize_env_name_by_path} for SentinelOneCns Results.")
|
|
357
|
+
|
|
358
|
+
@staticmethod
|
|
359
|
+
def _get_parsed_output(
|
|
360
|
+
file_path: str, extract_dir: str, output: str, shared_kustomize_file_mappings: dict[str, str]
|
|
361
|
+
) -> TextIO | None:
|
|
362
|
+
cur_source_file = None
|
|
363
|
+
cur_writer = None
|
|
364
|
+
last_line_dashes = False
|
|
365
|
+
line_num = 1
|
|
366
|
+
file_num = 0
|
|
367
|
+
|
|
368
|
+
# page-to-file parser from helm framework works well, but we expect the file to start with --- in this case from Kustomize.
|
|
369
|
+
output = "---\n" + output
|
|
370
|
+
reader = io.StringIO(output)
|
|
371
|
+
for s in reader:
|
|
372
|
+
s = s.rstrip()
|
|
373
|
+
if s == '---':
|
|
374
|
+
last_line_dashes = True
|
|
375
|
+
continue
|
|
376
|
+
|
|
377
|
+
if last_line_dashes:
|
|
378
|
+
# The next line should contain a "apiVersion" line for the next Kubernetes manifest
|
|
379
|
+
# So we will close the old file, open a new file, and write the dashes from last iteration plus this line
|
|
380
|
+
source = file_num
|
|
381
|
+
file_num += 1
|
|
382
|
+
if source != cur_source_file:
|
|
383
|
+
if cur_writer:
|
|
384
|
+
# Here we are about to close a "complete" file. The function will validate it looks like a K8S manifest before continuing.
|
|
385
|
+
Runner._curWriterValidateStoreMapAndClose(cur_writer, file_path, shared_kustomize_file_mappings)
|
|
386
|
+
parent = os.path.dirname(os.path.join(extract_dir, str(source)))
|
|
387
|
+
os.makedirs(parent, exist_ok=True)
|
|
388
|
+
cur_source_file = source
|
|
389
|
+
cur_writer = open(os.path.join(extract_dir, str(source)), 'a')
|
|
390
|
+
if cur_writer:
|
|
391
|
+
cur_writer.write('---' + os.linesep)
|
|
392
|
+
cur_writer.write(s + os.linesep)
|
|
393
|
+
|
|
394
|
+
last_line_dashes = False
|
|
395
|
+
else:
|
|
396
|
+
if not cur_writer:
|
|
397
|
+
continue
|
|
398
|
+
else:
|
|
399
|
+
cur_writer.write(s + os.linesep)
|
|
400
|
+
line_num += 1
|
|
401
|
+
return cur_writer
|
|
402
|
+
|
|
403
|
+
@staticmethod
|
|
404
|
+
def _get_kubectl_output(filePath: str, template_renderer_command: str, source_type: str | None) -> bytes:
|
|
405
|
+
# Template out the Kustomizations to Kubernetes YAML
|
|
406
|
+
if template_renderer_command == "kubectl":
|
|
407
|
+
template_render_command_options = "kustomize"
|
|
408
|
+
if template_renderer_command == "kustomize":
|
|
409
|
+
template_render_command_options = "build"
|
|
410
|
+
proc = subprocess.Popen([template_renderer_command, template_render_command_options, filePath], stdout=subprocess.PIPE, stderr=subprocess.PIPE) # nosec
|
|
411
|
+
output, _ = proc.communicate()
|
|
412
|
+
logging.info(
|
|
413
|
+
f"Ran kubectl to build Kustomize output. DIR: {filePath}. TYPE: {source_type}.")
|
|
414
|
+
return output
|
|
415
|
+
|
|
416
|
+
@staticmethod
|
|
417
|
+
def _get_env_or_base_path_prefix(
|
|
418
|
+
file_path: str, kustomize_processed_folder_and_meta: dict[str, dict[str, Any]]
|
|
419
|
+
) -> str | None:
|
|
420
|
+
env_or_base_path_prefix = None
|
|
421
|
+
if kustomize_processed_folder_and_meta[file_path].get('type') == "overlay":
|
|
422
|
+
if 'calculated_bases' not in kustomize_processed_folder_and_meta[file_path]:
|
|
423
|
+
logging.debug(f"Kustomize: Overlay with unknown base. User may have specified overlay dir directly. {file_path}")
|
|
424
|
+
env_or_base_path_prefix = ""
|
|
425
|
+
else:
|
|
426
|
+
base_path_parts = pathlib.Path(kustomize_processed_folder_and_meta[file_path]['calculated_bases']).parts
|
|
427
|
+
most_significant_base_path = f"/{base_path_parts[-3]}/{base_path_parts[-2]}/{base_path_parts[-1]}"
|
|
428
|
+
env_or_base_path_prefix = f"{most_significant_base_path}/{kustomize_processed_folder_and_meta[file_path]['overlay_name']}"
|
|
429
|
+
|
|
430
|
+
elif kustomize_processed_folder_and_meta[file_path].get('type') == "base":
|
|
431
|
+
# Validated base last three parents as a path
|
|
432
|
+
base_path_parts = pathlib.Path(kustomize_processed_folder_and_meta[file_path]['filePath']).parts
|
|
433
|
+
most_significant_base_path = f"/{base_path_parts[-4]}/{base_path_parts[-3]}/{base_path_parts[-2]}"
|
|
434
|
+
env_or_base_path_prefix = most_significant_base_path
|
|
435
|
+
|
|
436
|
+
return env_or_base_path_prefix
|
|
437
|
+
|
|
438
|
+
@staticmethod
|
|
439
|
+
def get_binary_output(
|
|
440
|
+
file_path: str,
|
|
441
|
+
kustomize_processed_folder_and_meta: dict[str, dict[str, Any]],
|
|
442
|
+
template_renderer_command: str,
|
|
443
|
+
) -> tuple[bytes, str] | tuple[None, None]:
|
|
444
|
+
source_type = kustomize_processed_folder_and_meta[file_path].get('type')
|
|
445
|
+
logging.debug(f"Kustomization at {file_path} likley a {source_type}")
|
|
446
|
+
try:
|
|
447
|
+
output = Runner._get_kubectl_output(file_path, template_renderer_command, source_type)
|
|
448
|
+
return output, file_path
|
|
449
|
+
except Exception:
|
|
450
|
+
logging.warning(f"Error building Kustomize output at dir: {file_path}.", exc_info=True)
|
|
451
|
+
return None, None
|
|
452
|
+
|
|
453
|
+
@staticmethod
|
|
454
|
+
def _parse_output(
|
|
455
|
+
output: bytes,
|
|
456
|
+
file_path: str,
|
|
457
|
+
kustomize_processed_folder_and_meta: dict[str, dict[str, Any]],
|
|
458
|
+
target_folder_path: str,
|
|
459
|
+
shared_kustomize_file_mappings: dict[str, str],
|
|
460
|
+
) -> None:
|
|
461
|
+
env_or_base_path_prefix = Runner._get_env_or_base_path_prefix(file_path, kustomize_processed_folder_and_meta)
|
|
462
|
+
if env_or_base_path_prefix is None:
|
|
463
|
+
logging.warning(f"env_or_base_path_prefix is None, filePath: {file_path}", exc_info=True)
|
|
464
|
+
return
|
|
465
|
+
|
|
466
|
+
extract_dir = target_folder_path + env_or_base_path_prefix
|
|
467
|
+
os.makedirs(extract_dir, exist_ok=True)
|
|
468
|
+
|
|
469
|
+
logging.debug(f"Kustomize: Temporary directory for {file_path} at {extract_dir}")
|
|
470
|
+
output_str = output.decode("utf-8")
|
|
471
|
+
cur_writer = Runner._get_parsed_output(file_path, extract_dir, output_str, shared_kustomize_file_mappings)
|
|
472
|
+
if cur_writer:
|
|
473
|
+
Runner._curWriterValidateStoreMapAndClose(cur_writer, file_path, shared_kustomize_file_mappings)
|
|
474
|
+
|
|
475
|
+
@staticmethod
|
|
476
|
+
def _run_kustomize_parser(
|
|
477
|
+
file_path: str,
|
|
478
|
+
shared_kustomize_file_mappings: dict[str, str],
|
|
479
|
+
kustomize_processed_folder_and_meta: dict[str, dict[str, Any]],
|
|
480
|
+
template_renderer_command: str,
|
|
481
|
+
target_folder_path: str,
|
|
482
|
+
) -> None:
|
|
483
|
+
output, _ = Runner.get_binary_output(file_path, kustomize_processed_folder_and_meta, template_renderer_command)
|
|
484
|
+
if not output:
|
|
485
|
+
return
|
|
486
|
+
Runner._parse_output(output, file_path, kustomize_processed_folder_and_meta, target_folder_path, shared_kustomize_file_mappings)
|
|
487
|
+
|
|
488
|
+
def run_kustomize_to_k8s(
|
|
489
|
+
self, root_folder: str | None, files: list[str] | None, runner_filter: RunnerFilter
|
|
490
|
+
) -> None:
|
|
491
|
+
kustomize_dirs = find_kustomize_directories(root_folder, files, runner_filter.excluded_paths)
|
|
492
|
+
if not kustomize_dirs:
|
|
493
|
+
# nothing to process
|
|
494
|
+
return
|
|
495
|
+
|
|
496
|
+
for kustomize_dir in kustomize_dirs:
|
|
497
|
+
self.kustomizeProcessedFolderAndMeta[kustomize_dir] = self._parseKustomization(kustomize_dir)
|
|
498
|
+
self.target_folder_path = tempfile.mkdtemp()
|
|
499
|
+
for file_path in self.kustomizeProcessedFolderAndMeta:
|
|
500
|
+
if self.kustomizeProcessedFolderAndMeta[file_path].get('type') == 'overlay':
|
|
501
|
+
self._handle_overlay_case(file_path)
|
|
502
|
+
|
|
503
|
+
if platform.system() == 'Windows':
|
|
504
|
+
if not self.templateRendererCommand:
|
|
505
|
+
logging.error("The 'templateRendererCommand' was not set correctly")
|
|
506
|
+
return
|
|
507
|
+
|
|
508
|
+
shared_kustomize_file_mappings: dict[str, str] = {}
|
|
509
|
+
for file_path in self.kustomizeProcessedFolderAndMeta:
|
|
510
|
+
Runner._run_kustomize_parser(
|
|
511
|
+
file_path=file_path,
|
|
512
|
+
shared_kustomize_file_mappings=shared_kustomize_file_mappings,
|
|
513
|
+
kustomize_processed_folder_and_meta=self.kustomizeProcessedFolderAndMeta,
|
|
514
|
+
template_renderer_command=self.templateRendererCommand,
|
|
515
|
+
target_folder_path=self.target_folder_path,
|
|
516
|
+
)
|
|
517
|
+
self.kustomizeFileMappings = shared_kustomize_file_mappings
|
|
518
|
+
return
|
|
519
|
+
|
|
520
|
+
manager = multiprocessing.Manager()
|
|
521
|
+
# make sure we have new dict
|
|
522
|
+
shared_kustomize_file_mappings = copy.copy(manager.dict()) # type:ignore[arg-type] # works with DictProxy
|
|
523
|
+
shared_kustomize_file_mappings.clear()
|
|
524
|
+
jobs = []
|
|
525
|
+
for filePath in self.kustomizeProcessedFolderAndMeta:
|
|
526
|
+
p = multiprocessing.Process(
|
|
527
|
+
target=Runner._run_kustomize_parser,
|
|
528
|
+
args=(
|
|
529
|
+
filePath,
|
|
530
|
+
shared_kustomize_file_mappings,
|
|
531
|
+
self.kustomizeProcessedFolderAndMeta,
|
|
532
|
+
self.templateRendererCommand,
|
|
533
|
+
self.target_folder_path
|
|
534
|
+
)
|
|
535
|
+
)
|
|
536
|
+
jobs.append(p)
|
|
537
|
+
p.start()
|
|
538
|
+
|
|
539
|
+
for proc in jobs:
|
|
540
|
+
proc.join()
|
|
541
|
+
|
|
542
|
+
self.kustomizeFileMappings = dict(shared_kustomize_file_mappings)
|
|
543
|
+
|
|
544
|
+
def run(
|
|
545
|
+
self,
|
|
546
|
+
root_folder: str | None,
|
|
547
|
+
external_checks_dir: list[str] | None = None,
|
|
548
|
+
files: list[str] | None = None,
|
|
549
|
+
runner_filter: RunnerFilter | None = None,
|
|
550
|
+
collect_skip_comments: bool = True,
|
|
551
|
+
) -> Report | list[Report]:
|
|
552
|
+
runner_filter = runner_filter or RunnerFilter()
|
|
553
|
+
if not runner_filter.show_progress_bar:
|
|
554
|
+
self.pbar.turn_off_progress_bar()
|
|
555
|
+
|
|
556
|
+
self.run_kustomize_to_k8s(root_folder, files, runner_filter)
|
|
557
|
+
report: "Report | list[Report]" = Report(self.check_type)
|
|
558
|
+
|
|
559
|
+
if not self.kustomizeProcessedFolderAndMeta:
|
|
560
|
+
# nothing to process
|
|
561
|
+
return report
|
|
562
|
+
|
|
563
|
+
target_dir = ""
|
|
564
|
+
try:
|
|
565
|
+
k8s_runner = K8sKustomizeRunner()
|
|
566
|
+
# k8s_runner.run() will kick off both CKV_ and CKV2_ checks and return a merged results object.
|
|
567
|
+
target_dir = self.get_k8s_target_folder_path()
|
|
568
|
+
k8s_runner.report_mutator_data = self.get_kustomize_metadata()
|
|
569
|
+
if root_folder:
|
|
570
|
+
k8s_runner.original_root_dir = root_folder
|
|
571
|
+
|
|
572
|
+
# the returned report can be a list of reports, which also includes an SCA image report
|
|
573
|
+
report = k8s_runner.run(target_dir, external_checks_dir=None, runner_filter=runner_filter)
|
|
574
|
+
logging.debug(f"Sucessfully ran k8s scan on Kustomization templated files in tmp scan dir : {target_dir}")
|
|
575
|
+
|
|
576
|
+
shutil.rmtree(target_dir)
|
|
577
|
+
|
|
578
|
+
except Exception:
|
|
579
|
+
logging.warning("Failed to run Kubernetes runner", exc_info=True)
|
|
580
|
+
with tempfile.TemporaryDirectory() as save_error_dir:
|
|
581
|
+
logging.debug(
|
|
582
|
+
f"Error running k8s scan on Scan dir: {target_dir}. Saved context dir: {save_error_dir}")
|
|
583
|
+
shutil.move(target_dir, save_error_dir)
|
|
584
|
+
|
|
585
|
+
return report
|
|
586
|
+
|
|
587
|
+
@staticmethod
|
|
588
|
+
def _curWriterValidateStoreMapAndClose(
|
|
589
|
+
cur_writer: TextIO, file_path: str, shared_kustomize_file_mappings: dict[str, str]
|
|
590
|
+
) -> None:
|
|
591
|
+
currentFileName = cur_writer.name
|
|
592
|
+
cur_writer.close()
|
|
593
|
+
# Now we have a complete kubernetes manifest as we closed the writer, and it's temporary file name (currentFileName) plus the original file templated out (FilePath)
|
|
594
|
+
# Rename them to useful information from the K8S metadata before conting.
|
|
595
|
+
# Then keep a mapping of template files to original kustomize repo locations for use with SentinelOneCns output later.
|
|
596
|
+
try:
|
|
597
|
+
with open(currentFileName) as f:
|
|
598
|
+
currentYamlObject = yaml.safe_load(f)
|
|
599
|
+
# Validate we have a K8S manifest
|
|
600
|
+
if "apiVersion" in currentYamlObject:
|
|
601
|
+
itemName = []
|
|
602
|
+
itemName.append(currentYamlObject['kind'])
|
|
603
|
+
if 'namespace' in currentYamlObject['metadata']:
|
|
604
|
+
itemName.append(currentYamlObject['metadata']['namespace'])
|
|
605
|
+
else:
|
|
606
|
+
itemName.append("default")
|
|
607
|
+
if 'name' in currentYamlObject['metadata']:
|
|
608
|
+
itemName.append(currentYamlObject['metadata']['name'])
|
|
609
|
+
else:
|
|
610
|
+
itemName.append("noname")
|
|
611
|
+
|
|
612
|
+
filename = f"{'-'.join(itemName)}.yaml"
|
|
613
|
+
newFullPathFilename = str(pathlib.Path(currentFileName).parent / filename)
|
|
614
|
+
os.rename(currentFileName, newFullPathFilename)
|
|
615
|
+
shared_kustomize_file_mappings[newFullPathFilename] = file_path
|
|
616
|
+
else:
|
|
617
|
+
raise Exception(f'Not a valid Kubernetes manifest (no apiVersion) while parsing Kustomize template: {file_path}. Templated output: {currentFileName}.')
|
|
618
|
+
except IsADirectoryError:
|
|
619
|
+
pass
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
def find_kustomize_directories(
|
|
623
|
+
root_folder: str | None, files: list[str] | None, excluded_paths: list[str]
|
|
624
|
+
) -> list[str]:
|
|
625
|
+
kustomize_directories = []
|
|
626
|
+
if not excluded_paths:
|
|
627
|
+
excluded_paths = []
|
|
628
|
+
if files:
|
|
629
|
+
logging.info('Running with --file argument; file must be a kustomization.yaml file')
|
|
630
|
+
for file in files:
|
|
631
|
+
if os.path.basename(file) in Runner.kustomizeSupportedFileTypes:
|
|
632
|
+
kustomize_directories.append(os.path.dirname(file))
|
|
633
|
+
|
|
634
|
+
if root_folder:
|
|
635
|
+
for root, d_names, f_names in os.walk(root_folder):
|
|
636
|
+
filter_ignored_paths(root_folder, root, d_names, excluded_paths)
|
|
637
|
+
filter_ignored_paths(root_folder, root, f_names, excluded_paths)
|
|
638
|
+
kustomize_directories.extend(
|
|
639
|
+
os.path.abspath(root) for x in f_names if x in Runner.kustomizeSupportedFileTypes
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
return kustomize_directories
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import subprocess # nosec
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_kustomize_version(kustomize_command: str) -> str | None:
|
|
8
|
+
try:
|
|
9
|
+
proc = subprocess.run([kustomize_command, "version"], capture_output=True) # nosec
|
|
10
|
+
version_output = proc.stdout.decode("utf-8")
|
|
11
|
+
|
|
12
|
+
if "Version:" in version_output:
|
|
13
|
+
# version <= 4 output looks like '{Version:kustomize/v4.5.7 GitCommit:...}\n'
|
|
14
|
+
kustomize_version = version_output[version_output.find("/") + 1 : version_output.find("G") - 1]
|
|
15
|
+
elif version_output.startswith("v"):
|
|
16
|
+
# version >= 5 output looks like 'v5.0.0\n'
|
|
17
|
+
kustomize_version = version_output.rstrip("\n")
|
|
18
|
+
else:
|
|
19
|
+
return None
|
|
20
|
+
|
|
21
|
+
return kustomize_version
|
|
22
|
+
except Exception:
|
|
23
|
+
logging.debug(f"An error occured testing the {kustomize_command} command:", exc_info=True)
|
|
24
|
+
|
|
25
|
+
return None
|