query,description "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-flexible-server' AND json.rule = properties.state equal ignore case ""Ready"" and require_secure_transport.value equal ignore case ""ON"" and (tls_version.value does not equal ignore case ""TLSV1.2"" and tls_version.value does not equal ignore case ""TLSV1.3"" and tls_version.value does not equal ignore case ""TLSV1.2,TLSV1.3"" and tls_version.value does not equal ignore case ""TLSV1.3,TLSV1.2"")```",Azure MySQL database flexible server using insecure TLS version ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-flexible-server' AND json.rule = properties.state equal ignore case Ready and properties.network.publicNetworkAccess equal ignore case Enabled and firewallRules[?any(properties.startIpAddress equals 0.0.0.0 and properties.endIpAddress equals 255.255.255.255)] exists```,Azure PostgreSQL database flexible server configured with overly permissive network access "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals Udp or protocol equals Icmp or protocol equals *) and ((destinationPortRange exists and destinationPortRange is not member of (20, 21, 22, 23, 25, 53, 80, 135, 137, 138, 443, 445, 1433, 1434, 3306, 3389, 4333, 5432, 5500, 5900, *)) or (destinationPortRanges is not empty and destinationPortRanges[*] is not member of (20, 21, 22, 23, 25, 53, 80, 135, 137, 138, 443, 445, 1433, 1434, 3306, 3389, 4333, 5432, 5500, 5900, *))) )] exists```",Azure Network Security Group allows all traffic on ports which are not commonly used ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = encryptionConfig does not exist or (encryptionConfig exists and encryptionConfig[*].provider.keyArn does not exist and encryptionConfig[*].resources[*] does not contain secrets)```,AWS EKS cluster does not have secrets encryption enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'monitoringService does not exist or monitoringService equals none'```,GCP Kubernetes Engine Clusters have Cloud Monitoring disabled "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = instanceId contains ""[RantiAWS"" ```",Chaitu EC2 instance policy "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as X; config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = (status equals RUNNING and name does not start with ""gke-"") and serviceAccounts[?any( email contains ""compute@developer.gserviceaccount.com"")] exists as Y; filter '$.Y.serviceAccounts[*].email contains $.X.user'; show Y;```",GCP VM instance configured with default service account ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-disk' AND json.rule = 'type equals data and deleteWithInstance is true'```,Alibaba Cloud data disk is configured with release disk with instance feature "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",Info of AWS S3 bucket publicly readable ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.encryption.status equal ignore case disabled```,Azure Container Registry not encrypted with Customer Managed Key (CMK) "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy akceq ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-services-list' AND json.rule = services[?any(name contains containerscanning.googleapis.com and state contains ENABLED)] does not exist```,GCP GCR Container Vulnerability Scanning is disabled ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = state_description equal ignore case active and secret_type equal ignore case username_password and ( rotation.auto_rotate is false or (rotation.unit equal ignore case month and rotation.interval > 3) or (rotation.unit equal ignore case day and rotation.interval > 90))```,IBM Cloud Secrets Manager user credentials with rotation policy more than 90 days ```config from cloud.resource where api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or maxPasswordAge !isType Integer or $.maxPasswordAge > 90 or maxPasswordAge equals 0'```,AWS IAM password policy does not expire in 90 days ```config from cloud.resource where api.name = 'azure-machine-learning-workspace' AND json.rule = 'properties.provisioningState equal ignore case Succeeded and properties.hbiWorkspace is true and properties.storageAccount exists' as X; config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = 'totalPublicContainers > 0 and (properties.allowBlobPublicAccess is true or properties.allowBlobPublicAccess does not exist) and properties.publicNetworkAccess equal ignore case Enabled and networkRuleSet.virtualNetworkRules is empty and (properties.privateEndpointConnections is empty or properties.privateEndpointConnections does not exist)' as Y; filter '$.X.properties.storageAccount contains $.Y.id'; show Y;```,Azure Storage Account storing Machine Learning workspace high business impact data is publicly accessible "```config from cloud.resource where api.name = 'aws-iam-list-groups' as X; config from cloud.resource where api.name = 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any(Effect equals Allow and Action equals * and Resource equals * )] exists as Y; filter ""($.X.inlinePolicies[*].policyDocument.Statement[?(@.Effect=='Allow' && @.Resource=='*')].Action any equal * ) or ($.X.attachedPolicies[*].policyArn intersects $.Y.policyArn)""; show X;```",AWS IAM Groups with administrator access permissions ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dms-certificate' AND json.rule = '_DateTime.ageInDays(validToDate) > -1'```,AWS Database Migration Service (DMS) has expired certificates ```config from cloud.resource where api.name = 'gcloud-container-describe-clusters' as X; config from cloud.resource where api.name = 'gcloud-compute-firewall-rules-list' as Y; filter '$.Y.network contains $.X.network and $.Y.sourceRanges contains 0.0.0.0/0 and $.Y.direction contains INGRESS and $.Y.allowed exists'; show Y;```,GCP Kubernetes Engine Clusters network firewall inbound rule overly permissive to all traffic ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-gateway' AND json.rule = (['properties.webApplicationFirewallConfiguration'] does not exist and ['properties.firewallPolicy'] does not exist) or (['properties.webApplicationFirewallConfiguration'].enabled is false and ['properties.firewallPolicy'] does not exist)```,Azure Application Gateway does not have the Web application firewall (WAF) enabled "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains CreateVpc and $.X.filterPattern contains DeleteVpc and $.X.filterPattern contains ModifyVpcAttribute and $.X.filterPattern contains AcceptVpcPeeringConnection and $.X.filterPattern contains CreateVpcPeeringConnection and $.X.filterPattern contains DeleteVpcPeeringConnection and $.X.filterPattern contains RejectVpcPeeringConnection and $.X.filterPattern contains AttachClassicLinkVpc and $.X.filterPattern contains DetachClassicLinkVpc and $.X.filterPattern contains DisableVpcClassicLink and $.X.filterPattern contains EnableVpcClassicLink) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for VPC changes ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-loadbalancer' AND json.rule = lifecycleState equals ACTIVE and listeners.* is not empty and listeners.*.protocol equal ignore case HTTP and ruleSets.*.items[?any(redirectUri.protocol equal ignore case https)] does not exist```,OCI Load balancer listener allows connection requests over HTTP "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.adaptiveApplicationControlsMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud adaptive application controls monitoring is set to disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-notebook-instance' AND json.rule = state equals ""ACTIVE"" and shieldedInstanceConfig.enableVtpm is false```",GCP Vertex AI Workbench user-managed notebook has vTPM disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-vpc-peering-connections' AND json.rule = $.accepterVpcInfo.ownerId does not equal $.requesterVpcInfo.ownerId and $.status.code equals active```,AWS VPC allows unauthorized peering ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = deleteRetentionPolicy.blob.enabled is false and (kind does not equal ignore case FileStorage)```,Azure Storage account soft delete is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-object-storage-bucket' AND json.rule = publicAccessType does not equal NoPublicAccess```,OCI Object Storage bucket is publicly accessible "```config from cloud.resource where cloud.accountgroup = 'Flowlog-sol' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""sol-test"" ```",Sol-test config policy ```config from cloud.resource where api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = vpcoptions.securityGroupIds[*] exists as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[*].ipv4Ranges[*].cidrIp equals 0.0.0.0/0 or ipPermissions[*].ipv6Ranges[*].cidrIpv6 equals ::/0) as Y; filter '$.X.vpcoptions.securityGroupIds[*] contains $.Y.groupId'; show Y;```,AWS OpenSearch attached security group overly permissive to all traffic ```config from cloud.resource where api.name = 'aws-ecs-cluster' and json.rule = configuration.executeCommandConfiguration.logConfiguration.s3EncryptionEnabled exists and configuration.executeCommandConfiguration.logConfiguration.s3EncryptionEnabled is false```,AWS ECS Cluster S3 Log Encryption Disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(3306,3306) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on MySQL DB port (3306) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any((Condition.ForAnyValue:IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains ::/0 or Condition.ForAnyValue:IpAddress.aws:SourceIp contains ::/0) and Effect equals Allow and Action anyStartWith lambda:)] exists```,AWS Lambda IAM policy overly permissive to all traffic ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-lambda-get-region-summary' AND json.rule = 'lambdaCodeSize.size > 67500000'```,AWS Lambda nearing availability code storage limit ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' AND json.rule = restrictions.apiTargets does not exist```,GCP API key not restricting any specific API "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = 'databaseVersion contains SQLSERVER and state equals RUNNABLE and (settings.databaseFlags[*].name does not contain ""remote access"" or settings.databaseFlags[?any(name contains ""remote access"" and value contains on)] exists)'```",GCP SQL server instance database flag remote access is not set to off ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-redis-instances-list' AND json.rule = state equal ignore case ready and not(customerManagedKey contains cryptoKeys)```,GCP Memorystore for Redis instance not encrypted with CMEK ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = serverBlobAuditingPolicy.properties.state equal ignore case Enabled and serverBlobAuditingPolicy.properties.storageEndpoint is not empty and (serverBlobAuditingPolicy.properties.retentionDays does not equal 0 and serverBlobAuditingPolicy.properties.retentionDays < 91)```,Azure SQL Server audit log retention is less than 91 days ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or requireNumbers is false or requireNumbers does not exist'```,AWS IAM password policy does not have a number ```config from cloud.resource where api.name = 'ibm-vpc-block-storage-volume' as X; config from cloud.resource where api.name = 'ibm-key-protect-registration' as Y;filter 'not($.Y.resourceCrn equals $.X.crn)' ; show X;```,API testing "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='log_connections')].properties.value equals OFF or configurations.value[?(@.name=='log_connections')].properties.value equals off""```",Azure PostgreSQL database server with log connections parameter disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = Policy.Statement[?any(Effect equals Allow and (Principal.AWS equals * or Principal equals *) and (Action contains SNS:Publish or Action contains sns:Publish) and (Condition does not exist or Condition all empty))] exists```,AWS SNS topic policy overly permissive for publishing ```config from cloud.resource where api.name = 'gcloud-domain-users' AND json.rule = isAdmin is false and isEnrolledIn2Sv is false and archived is false and suspended is false```,GCP Google Workspace User not enrolled with 2-step verification "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-logging-sinks-list' AND json.rule = name contains ""pk""```",pk-gcp-empty ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.identitycontrolplane.createidentityprovider and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.deleteidentityprovider and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updateidentityprovider) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for Identity Provider changes "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""errorCode="" or $.X.filterPattern contains ""errorCode ="") and ($.X.filterPattern does not contain ""errorCode!="" and $.X.filterPattern does not contain ""errorCode !="") and $.X.filterPattern contains ""UnauthorizedOperation"" and $.X.filterPattern contains ""AccessDenied"") and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for unauthorized API calls ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-describe-task-definition' AND json.rule = status equals ACTIVE and containerDefinitions[?any(logConfiguration.logDriver does not exist)] exists```,AWS ECS task definition logging configuration disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-athena-workgroup' AND json.rule = WorkGroup.State equal ignore case enabled and (WorkGroup.Configuration.ResultConfiguration.EncryptionConfiguration does not exist or (WorkGroup.Configuration.EngineVersion.EffectiveEngineVersion contains Athena and WorkGroup.Configuration.EnforceWorkGroupConfiguration is false))```,AWS Athena Workgroup data encryption at rest not configured ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kusto-clusters' AND json.rule = properties.state equal ignore case Running and properties.enableDiskEncryption is false```,Azure Data Explorer cluster disk encryption is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function-v2' AND json.rule = state equals ACTIVE and iamPolicy.bindings[?any(members[*] is member of (""allAuthenticatedUsers"",""allUsers""))] exists```",GCP Cloud Function is publicly accessible by allUsers or allAuthenticatedUsers ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = (securityContacts is empty or securityContacts[?any(properties.phone is empty)] exists) and pricings[?any(properties.pricingTier equal ignore case Standard)] exists```,Azure Microsoft Defender for Cloud security contact phone number is not set ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = 'origins.items[*].s3OriginConfig exists and origins.items[*].s3OriginConfig.originAccessIdentity is empty and origins.items[*].originAccessControlId is empty'```,AWS Cloudfront Distribution with S3 have Origin Access set to disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.virtualnetwork.changeroutetablecompartment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createroutetable and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deleteroutetable and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updateroutetable) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for route tables changes "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(20,20)""```",Alibaba Cloud Security group allow internet traffic to FTP-Data port (20) "```config from cloud.resource where api.name = 'ibm-key-protect-registration' as X; config from cloud.resource where api.name = 'ibm-object-storage-bucket' AND json.rule = not( locationConstraint contains ""ams03"" or locationConstraint contains ""mon01"" or locationConstraint contains ""tor01"" or locationConstraint contains ""sjc03"" or locationConstraint contains ""sjc04"" or locationConstraint contains ""sao01"" or locationConstraint contains ""mil01"" or locationConstraint contains ""sng01"" or locationConstraint contains ""che01"" ) as Y; filter 'not($.X.resourceCrn equals $.Y.crn)'; show Y;```",IBM Cloud Object Storage bucket is not encrypted with BYOK (bring your own key) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3-access-point' AND json.rule = networkOrigin equal ignore case internet and (publicAccessBlockConfiguration does not exist or (publicAccessBlockConfiguration.blockPublicAcls is false and publicAccessBlockConfiguration.ignorePublicAcls is false and publicAccessBlockConfiguration.blockPublicPolicy is false and publicAccessBlockConfiguration.restrictPublicBuckets is false))```,AWS S3 access point Block public access setting disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cosmos-db' AND json.rule = properties.provisioningState equals Succeeded and properties.disableKeyBasedMetadataWriteAccess is false```,Azure Cosmos DB key based authentication is enabled ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-cloudtrail-describe-trails' as X; count(X) less than 1```,AWS CloudTrail is not enabled on the account "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains SQLSERVER and state equals RUNNABLE and (settings.databaseFlags[*].name does not contain 3625 or settings.databaseFlags[?any(name contains 3625 and value contains off)] exists)""```",GCP SQL server instance database flag 3625 (trace flag) is not set to on ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'requireLowercaseCharacters does not exist or requireLowercaseCharacters is false'```,Alibaba Cloud RAM password policy does not have a lowercase character "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and ($.X.filterPattern contains ""eventSource="" or $.X.filterPattern contains ""eventSource ="") and ($.X.filterPattern does not contain ""eventSource!="" and $.X.filterPattern does not contain ""eventSource !="") and $.X.filterPattern contains config.amazonaws.com and $.X.filterPattern contains StopConfigurationRecorder and $.X.filterPattern contains DeleteDeliveryChannel and $.X.filterPattern contains PutDeliveryChannel and $.X.filterPattern contains PutConfigurationRecorder) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for AWS Config configuration changes ```config from cloud.resource where api.name = 'aws-apigateway-get-stages' AND json.rule = webAclArn is not empty as X; config from cloud.resource where api.name = 'aws-waf-v2-web-acl-resource' AND json.rule = (webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesAnonymousIpList or webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesKnownBadInputsRuleSet) and NOT ( webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesAnonymousIpList and webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesKnownBadInputsRuleSet ) as Y; filter '$.Y.webACL.arn equals $.X.webAclArn'; show X;```,AWS API Gateway Rest API attached WAFv2 WebACL is not configured with AMR for Log4j Vulnerability "```config from cloud.resource where api.name = 'aws-dms-replication-task' AND json.rule = ReplicationTaskSettings.Logging.EnableLogging is false or ReplicationTaskSettings.Logging.LogComponents[?any( Id is member of (""TARGET_APPLY"",""TARGET_LOAD"") and Severity is not member of (""LOGGER_SEVERITY_DEFAULT"",""LOGGER_SEVERITY_DEBUG"",""LOGGER_SEVERITY_DETAILED_DEBUG"") )] exists```",AWS DMS replication task for the target database have logging not set to the minimum severity level "```config from cloud.resource where api.name = 'oci-networking-networkloadbalancer' and json.rule = lifecycleState equal ignore case ""ACTIVE"" as X; config from cloud.resource where api.name = 'oci-networking-subnet' and json.rule = lifecycleState equal ignore case ""AVAILABLE"" as Y; config from cloud.resource where api.name = 'oci-networking-security-list' AND json.rule = lifecycleState equal ignore case AVAILABLE as Z; filter 'not ($.X.listeners does not equal ""{}"" and ($.X.subnetId contains $.Y.id and $.Y.securityListIds contains $.Z.id and $.Z.ingressSecurityRules is not empty))'; show X;```",OCI Network Load Balancer not configured with inbound rules or listeners "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains SQLSERVER and settings.databaseFlags[?(@.name=='contained database authentication')].value equals on""```",GCP SQL Server instance database flag 'contained database authentication' is enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-project-info' AND json.rule = 'commonInstanceMetadata.items[*].key does not contain enable-oslogin or (commonInstanceMetadata.items[?any(key contains enable-oslogin and (value contains false or value contains FALSE))] exists)'```,GCP Projects have OS Login disabled ```config from cloud.resource where cloud.type = 'azure' and api.name= 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.allowSharedKeyAccess is true```,Azure Storage account configured with Shared Key authorization "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ( $.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="" ) and ( $.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="" ) and $.X.filter contains ""gce_route"" and ( $.X.filter contains ""protoPayload.methodName:"" or $.X.filter contains ""protoPayload.methodName :"" ) and ( $.X.filter does not contain ""protoPayload.methodName!:"" and $.X.filter does not contain ""protoPayload.methodName !:"" ) and $.X.filter contains ""compute.routes.delete"" and $.X.filter contains ""compute.routes.insert""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for VPC network route delete and insert ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-client-vpn-endpoint' AND json.rule = status.code equal ignore case available and connectionLogOptions.Enabled is false```,AWS EC2 Client VPN endpoints client connection logging disabled "```config from cloud.resource where api.name = 'alibaba-cloud-ecs-disk' AND json.rule = category contains ""foo"" ```",bobby 3/28 "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-security-group' AND json.rule = rules[?any( remote.cidr_block equals ""8.8.8.8/32"" and direction equals ""outbound"" and ( protocol equals ""all"" or ( protocol equals ""tcp"" and ( port_max greater than 53 and port_min less than 53 ) or ( port_max equals 53 and port_min equals 53 ))))] exists```",IBM Cloud Virtual Private Cloud (VPC) security group contains outbound rules that specify source IP 8.8.8.8/32 to DNS port ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = 'viewerCertificate.certificateSource contains cloudfront'```,AWS CloudFront web distribution with default SSL certificate "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(3306,3306) or destinationPortRanges[*] contains _Port.inRange(3306,3306) ))] exists```",Azure Network Security Group allows all traffic on MySQL (TCP Port 3306) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = '(_DateTime.ageInDays($.notAfter) > -1) and status equals EXPIRED'```,AWS Certificate Manager (ACM) has expired certificates ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'ipAllocationPolicy.useIpAliases does not exist or ipAllocationPolicy.useIpAliases equals false'```,GCP Kubernetes Engine Clusters have Alias IP disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = Policy.Statement[?any(Effect equals Allow and (Principal.AWS equals * or Principal equals *) and (Action contains SNS:Subscribe or Action contains sns:Subscribe or Action contains SNS:Receive or Action contains sns:Receive) and Condition does not exist)] exists```,AWS SNS topic policy overly permissive for subscription ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-describe-vpc-endpoints' AND json.rule = vpcEndpointType equals Gateway and policyDocument.Statement[?any(Effect equals Allow and (Principal.AWS equals * or Principal equals *) and Action contains * and Condition does not exist)] exists```,AWS VPC gateway endpoint policy is overly permissive ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = 'secret_type equals arbitrary and state_description equal ignore case active and (_DateTime.ageInDays(last_update_date) > 90)'```,IBM Cloud Secrets Manager arbitrary secrets have aged more than 90 days without being rotated ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cosmos-db' AND json.rule = properties.provisioningState equals Succeeded and properties.ipRangeFilter is not empty and properties.ipRangeFilter startsWith 0.0.0.0 or properties.ipRangeFilter endsWith 0.0.0.0```,Azure Cosmos DB allows traffic from public Azure datacenters ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.keyPolicy.keyExpirationPeriodInDays does not exist```,Azure Storage account key expiration policy is not configured ```config from cloud.resource where api.name = 'gcloud-compute-backend-bucket' as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as Y; filter ' not (Y.name intersects X.bucketName) '; show X;```,GCP backend bucket having dangling GCP Storage bucket ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-block-storage-snapshot' AND json.rule = encryption equal ignore case provider_managed```,IBM Cloud Block Storage Snapshot for VPC is not encrypted with customer managed keys "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' AND json.rule = osType does not exist and managedBy exists and (encryptionSettings does not exist or encryptionSettings.enabled is false) and encryption.type is not member of (""EncryptionAtRestWithCustomerKey"", ""EncryptionAtRestWithPlatformAndCustomerKeys"",""EncryptionAtRestWithPlatformKey"")```",Azure VM data disk is not configured with any encryption ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and kind contains workflowapp and (identity.type does not exist or identity.principalId is empty)```,Azure Logic app is not configured with managed identity ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = $.databaseEncryption.state equals DECRYPTED```,GCP Kubernetes cluster Application-layer Secrets not encrypted ```config from cloud.resource where cloud.type = 'AWS' and api.name = 'aws-ec2-describe-subnets' AND json.rule = 'mapPublicIpOnLaunch is true'```,Copy of AWS VPC subnets should not allow automatic public IP assignment ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-registry' AND json.rule = ((properties.publicNetworkAccess equals Enabled and properties.networkRuleSet does not exist) or (properties.publicNetworkAccess equals Enabled and properties.networkRuleSet exists and properties.networkRuleSet.defaultAction equals Allow))```,Azure Container registries Public access to All networks is enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = firewallRules.value[*].properties.startIpAddress equals ""0.0.0.0"" or firewallRules.value[*].properties.endIpAddress equals ""0.0.0.0""```",EIP-CSE-IACOHP-AzurePostgreSQL-NetworkAccessibility-eca1500-5 ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-disk-list' AND json.rule = dataAccessAuthMode does not equal ignore case AzureActiveDirectory and managedBy contains virtualMachines and provisioningState equal ignore case Succeeded```,Azure disk data access authentication mode not enabled "```config from cloud.resource where api.name = 'aws-lambda-list-functions' as X; config from cloud.resource where api.name = 'aws-iam-list-roles' AND json.rule = inlinePolicies[*].policyDocument.Statement[?any(Effect equals Allow and (Action equals ""*"" or Action contains :* or Action[*] contains :*) and (Resource equals ""*"" or Resource[*] anyStartWith ""*""))] exists as Y; filter '$.X.role equals $.Y.role.arn'; show Y;```",AWS Lambda execution role having overly permissive inline policy "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' as X; config from cloud.resource where api.name = 'azure-active-directory-user' as Y; filter '((_DateTime.daysBetween($.X.properties.updatedOn,today()) != 8) and ($.X.properties.principalId contains $.Y.id))'; show X;```",llatorre - RoleAssignment v3 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = '((description.listenerDescriptions[*].listener.protocol equals HTTPS or description.listenerDescriptions[*].listener.protocol equals SSL) and (description.listenerDescriptions[*].listener.sslcertificateId is empty or description.listenerDescriptions[*].listener.sslcertificateId does not exist)) or description.listenerDescriptions[*].listener.protocol equals HTTP or description.listenerDescriptions[*].listener.protocol equals TCP'```,AWS Elastic Load Balancer with listener TLS/SSL is not configured ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'addonsConfig.httpLoadBalancing.disabled equals true'```,GCP Kubernetes Engine Clusters have HTTP load balancing disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' AND json.rule = (properties.roleDefinition.properties.type equals CustomRole and (properties.roleDefinition.properties.permissions[?any((actions[*] equals Microsoft.Authorization/locks/delete and actions[*] equals Microsoft.Authorization/locks/read and actions[*] equals Microsoft.Authorization/locks/write) or actions[*] equals Microsoft.Authorization/locks/*)] exists) and (properties.roleDefinition.properties.permissions[?any(notActions[*] equals Microsoft.Authorization/locks/delete or notActions[*] equals Microsoft.Authorization/locks/read or notActions[*] equals Microsoft.Authorization/locks/write or notActions[*] equals Microsoft.Authorization/locks/*)] does not exist)) as X; count(X) less than 1```,Azure Custom Role Administering Resource Locks not assigned ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-iam-list-attached-user-policies' AND json.rule='attachedPolicies isType Array and not attachedPolicies size == 0'```,AWS IAM policy attached to users "```config from cloud.resource where api.name = 'aws-emr-studio' AND json.rule = DefaultS3Location exists and DefaultS3Location contains ""aws-emr-studio-"" as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as Y; filter 'not ($.X.BucketName equals $.Y.bucketName)' ; show X;```",aws emr shadow ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cache-redis' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.enableNonSslPort is true```,Azure Cache for Redis not configured with data in transit encryption "```config from cloud.resource where api.name = 'aws-bedrock-custom-model' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and keyMetadata.keyManager equal ignore case CUSTOMER and keyMetadata.origin equals AWS_KMS and (rotation_status.keyRotationEnabled is false or rotation_status.keyRotationEnabled equals ""null"") as Y; filter '$.X.modelKmsKeyArn equals $.Y.key.keyArn'; show X;```",AWS Bedrock Custom model encrypted with Customer Managed Key (CMK) is not enabled for regular rotation ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-docdb-db-cluster' AND json.rule = Status contains available and DeletionProtection is false```,AWS DocumentDB cluster deletion protection is disabled ```config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as X; config from cloud.resource where api.name = 'aws-sagemaker-training-job' as Y; filter '$.Y.InputDataConfig[*].DataSource.S3DataSource.bucketName intersects $.X.bucketName'; show X;```,AWS S3 bucket is utilized for AWS Sagemaker training job data ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equals Succeeded and networkRuleSet.defaultAction equal ignore case Allow and properties.privateEndpointConnections[*] is empty```,Azure Storage account is not configured with private endpoint connection ```config from cloud.resource where api.name = 'aws-elbv2-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = ipPermissions[*] is empty or ipPermissionsEgress[*] is empty as Y; filter '$.X.securityGroups[*] contains $.Y.groupId'; show X;```,cloned copy - RLP-93423 - 2 "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule =status equals ""RUNNING"" and resourceLabels.goog-composer-version does not start with ""composer-1"" and ((workloadIdentityConfig[*] does not exist) or (workloadIdentityConfig[*] exists and (nodePools[?any(config.workloadMetadataConfig does not contain GKE_METADATA)] exists)))```",GCP Kubernetes Engine cluster workload identity is disabled ```config from cloud.resource where api.name = 'azure-machine-learning-datastores' AND json.rule = properties.datastoreType equal ignore case AzureBlob as X; config from cloud.resource where api.name = 'azure-storage-account-list' as Y; filter ' $.X.properties.accountName equal ignore case $.Y.name ' ; show Y;```,Azure Blob Storage utilized for Azure Machine Learning training job data "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule = ""clusterGroupsDetails[*].parameters[?(@.parameterName=='require_ssl')].parameterValue is false""```",AWS Redshift does not have require_ssl configured ```config from cloud.resource where cloud.type = 'alibaba_cloud' and api.name = 'alibaba-cloud-vpc' AND json.rule = vpcFlowLogs[*].flowLogId does not exist and status equal ignore case Available```,Alibaba Cloud VPC flow log not enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = gceSetup.metadata.notebook-upgrade-schedule does not exist```,GCP Vertex AI Workbench Instance auto-upgrade is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-registry' AND json.rule = 'webhooks[*] contains config and webhooks[*].config.serviceUri starts with http://'```,Azure ACR HTTPS not enabled for webhook "```config from cloud.resource where api.name = 'aws-ec2-client-vpn-endpoint' and json.rule = authorizationRules[*].accessAll exists and authorizationRules[*].accessAll equals ""True"" ```",Detect Unrestricted Access to EC2 Client VPN Endpoints "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy sizbn ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-ec2-describe-images' AND json.rule = image.platform contains windows and image.imageId contains ami-1e542176```,AWS Amazon Machine Image (AMI) infected with mining malware ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-organization-asset-group-member' as X; config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = '(roles[*] contains roles/editor or roles[*] contains roles/owner or roles[*] contains roles/appengine.* or roles[*] contains roles/browser or roles[*] contains roles/compute.networkAdmin or roles[*] contains roles/cloudtpu.serviceAgent or roles[*] contains roles/composer.serviceAgent or roles[*] contains roles/composer.ServiceAgentV2Ext or roles[*] contains roles/container.serviceAgent or roles[*] contains roles/dataflow.serviceAgent)' as Y; filter '($.X.groupKey.id contains $.Y.user)'; show Y;```,pcsup-13966-policy "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(22,22) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = totalPublicContainers > 0 and (properties.allowBlobPublicAccess is true or properties.allowBlobPublicAccess does not exist) and properties.publicNetworkAccess equal ignore case Enabled and networkRuleSet.virtualNetworkRules is empty and (properties.privateEndpointConnections is empty or properties.privateEndpointConnections does not exist)```,Azure storage account has a blob container with public access "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy sklde "```config from cloud.resource where api.name = 'aws-lambda-list-functions' AND json.rule = policy.Statement[?any(Effect equals Allow and Principal equals ""*"" and Condition does not exist and (Action equals ""*"" or Action equals lambda:*))] exists```",AWS Lambda Function resource-based policy is overly permissive ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-event-subscriptions' AND json.rule = 'sourceType equals db-instance and ((status does not equal active or enabled is false) or (status equals active and enabled is true and (sourceIdsList is not empty or eventCategoriesList is not empty)))'```,AWS RDS Event subscription All event categories and All instances disabled for DB instance ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = binaryAuthorization.evaluationMode does not exist or binaryAuthorization.evaluationMode equal ignore case EVALUATION_MODE_UNSPECIFIED or binaryAuthorization.evaluationMode equal ignore case DISABLED```,asasas23 ```config from cloud.resource where cloud.type = 'AWS' AND finding.type = 'AWS GuardDuty IAM' AND finding.name = 'Impact:IAMUser/AnomalousBehavior'```,GuardDuty IAM Impact: AnomalousBehavior "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy nrnqu "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-kms-crypto-keys-list' AND json.rule = purpose equal ignore case ""ENCRYPT_DECRYPT"" and primary.state equals ""ENABLED"" and (rotationPeriod does not exist or rotationPeriod greater than 7776000)```",GCP KMS Symmetric key not rotating in every 90 days ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-datacatalog-catalogs' AND json.rule = lifecycleState equal ignore case ACTIVE and (attachedCatalogPrivateEndpoints is empty or attachedCatalogPrivateEndpoints does not exist)```,OCI Data Catalog configured with overly permissive network access ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = 'policyName equals AWSSupportAccess and policyArn contains arn:aws:iam::aws:policy/AWSSupportAccess and (isAttached is false or (isAttached is true and entities.policyRoles[*].roleId is empty))'```,AWS IAM support access policy is not associated to any role "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = 'state equals RUNNABLE and databaseVersion contains SQLSERVER and settings.databaseFlags[*].name contains ""user options""'```",GCP SQL server instance database flag user options is set ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-user' AND json.rule = 'Policies[*] size > 0'```,Alibaba Cloud RAM policy attached to users ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-vpn-connection-list' AND json.rule = 'ipsecPolicies is empty and connectionType does not equal ExpressRoute'```,Azure VPN is not configured with cryptographic algorithm "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(10250,10250) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp or IPProtocol contains ""all"")))] exists as X; config from cloud.resource where api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals RUNNING as Y; filter '$.X.network contains $.Y.networkConfig.network' ; show X;```",GCP Firewall rule exposes GKE clusters by allowing all traffic on port 10250 ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-lambda-list-functions' AND json.rule = authType equal ignore case NONE```,PCSUP-16458-CLI-Test ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-spring-cloud-service' AND json.rule = properties.powerState equals Running and sku.tier does not equal Basic and properties.networkProfile.serviceRuntimeSubnetId does not exist```,Azure Spring Cloud service is not configured with virtual network ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-instance' AND json.rule = 'instanceNetworkType does not equal vpc or vpcAttributes is empty'```,Alibaba Cloud ECS instance is not using VPC network "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy lgwpn "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-project-info' AND json.rule = commonInstanceMetadata.items[?any(key contains ""enable-oslogin"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] exists as X; config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = (metadata.items[?any(key exists and key contains ""enable-oslogin"" and (value contains ""False"" or value contains ""N"" or value contains ""No"" or value contains ""false"" or value contains ""FALSE"" or value contains ""0""))] exists and name does not start with ""gke-"" and status equals RUNNING) as Y;filter'$.Y.zone contains $.X.name';show Y;```",GCP VM instance OS login overrides Project metadata OS login configuration "```config from cloud.resource where api.name = 'aws-emr-studio' AND json.rule = DefaultS3Location exists and DefaultS3Location contains ""aws-emr-studio-"" as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""aws-emr-studio-"" as Y; filter 'not ($.X.BucketName equals $.Y.bucketName)' ; show X;```",AWS EMR Studio using the shadow resource bucket for workspace storage "```config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = status equals ""RUNNING"" as X; config from cloud.resource where api.name = 'gcloud-vertex-ai-workbench-instance' as Y; filter ' $.Y.labels.resource-name equals $.X.labels.resource-name '; show X;```",GCP VM instance used by Vertex AI Workbench Instance ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_validate_compliance_hyperion_policy_ss_finding_1 ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-active-directory-authorization-policy' AND json.rule = defaultUserRolePermissions.allowedToCreateSecurityGroups is true ```,Azure user not restricted to create Microsoft Entra Security Group "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-route-tables' AND json.rule = ""routes[*].vpcPeeringConnectionId exists and routes[?(@.destinationCidrBlock=='0.0.0.0/0' || @.destinationIpv6CidrBlock == '::/0')].vpcPeeringConnectionId starts with pcx""```",AWS route table with VPC peering overly permissive to all traffic "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_error_verbosity or settings.databaseFlags[?any(name contains log_error_verbosity and value contains verbose)] exists)""```",GCP PostgreSQL instance database flag log_error_verbosity is not set to default or stricter ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded as X; config from cloud.resource where api.name = 'azure-storage-account-table-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.name equal ignore case $.Y.StorageAccountName)'; show X;```,Azure Storage account diagnostic setting for table is disabled "```config from cloud.resource where api.name = 'gcloud-compute-ssl-policies' AND json.rule = (profile equals MODERN or profile equals CUSTOM) and minTlsVersion does not equal ""TLS_1_2"" as X; config from cloud.resource where api.name = 'gcloud-compute-target-https-proxies' AND json.rule = sslPolicy exists as Y; filter ""$.X.selfLink contains $.Y.sslPolicy""; show Y;```",Check BC "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = ""policies[*].policyAttributeDescriptions[?(@.attributeName=='DHE-RSA-AES128-SHA'|| @.attributeName=='DHE-DSS-AES128-SHA' || @.attributeName=='CAMELLIA128-SHA' || @.attributeName=='EDH-RSA-DES-CBC3-SHA' || @.attributeName=='DES-CBC3-SHA' || @.attributeName=='ECDHE-RSA-RC4-SHA' || @.attributeName=='RC4-SHA' || @.attributeName=='ECDHE-ECDSA-RC4-SHA' || @.attributeName=='DHE-DSS-AES256-GCM-SHA384' || @.attributeName=='DHE-RSA-AES256-GCM-SHA384' || @.attributeName=='DHE-RSA-AES256-SHA256' || @.attributeName=='DHE-DSS-AES256-SHA256' || @.attributeName=='DHE-RSA-AES256-SHA' || @.attributeName=='DHE-DSS-AES256-SHA' || @.attributeName=='DHE-RSA-CAMELLIA256-SHA' || @.attributeName=='DHE-DSS-CAMELLIA256-SHA' || @.attributeName=='CAMELLIA256-SHA' || @.attributeName=='EDH-DSS-DES-CBC3-SHA' || @.attributeName=='DHE-DSS-AES128-GCM-SHA256' || @.attributeName=='DHE-RSA-AES128-GCM-SHA256' || @.attributeName=='DHE-RSA-AES128-SHA256' || @.attributeName=='DHE-DSS-AES128-SHA256' || @.attributeName=='DHE-RSA-CAMELLIA128-SHA' || @.attributeName=='DHE-DSS-CAMELLIA128-SHA' || @.attributeName=='ADH-AES128-GCM-SHA256' || @.attributeName=='ADH-AES128-SHA' || @.attributeName=='ADH-AES128-SHA256' || @.attributeName=='ADH-AES256-GCM-SHA384' || @.attributeName=='ADH-AES256-SHA' || @.attributeName=='ADH-AES256-SHA256' || @.attributeName=='ADH-CAMELLIA128-SHA' || @.attributeName=='ADH-CAMELLIA256-SHA' || @.attributeName=='ADH-DES-CBC3-SHA' || @.attributeName=='ADH-DES-CBC-SHA' || @.attributeName=='ADH-RC4-MD5' || @.attributeName=='ADH-SEED-SHA' || @.attributeName=='DES-CBC-SHA' || @.attributeName=='DHE-DSS-SEED-SHA' || @.attributeName=='DHE-RSA-SEED-SHA' || @.attributeName=='EDH-DSS-DES-CBC-SHA' || @.attributeName=='EDH-RSA-DES-CBC-SHA' || @.attributeName=='IDEA-CBC-SHA' || @.attributeName=='RC4-MD5' || @.attributeName=='SEED-SHA' || @.attributeName=='DES-CBC3-MD5' || @.attributeName=='DES-CBC-MD5' || @.attributeName=='RC2-CBC-MD5' || @.attributeName=='PSK-AES256-CBC-SHA' || @.attributeName=='PSK-3DES-EDE-CBC-SHA' || @.attributeName=='KRB5-DES-CBC3-SHA' || @.attributeName=='KRB5-DES-CBC3-MD5' || @.attributeName=='PSK-AES128-CBC-SHA' || @.attributeName=='PSK-RC4-SHA' || @.attributeName=='KRB5-RC4-SHA' || @.attributeName=='KRB5-RC4-MD5' || @.attributeName=='KRB5-DES-CBC-SHA' || @.attributeName=='KRB5-DES-CBC-MD5' || @.attributeName=='EXP-EDH-RSA-DES-CBC-SHA' || @.attributeName=='EXP-EDH-DSS-DES-CBC-SHA' || @.attributeName=='EXP-ADH-DES-CBC-SHA' || @.attributeName=='EXP-DES-CBC-SHA' || @.attributeName=='EXP-RC2-CBC-MD5' || @.attributeName=='EXP-KRB5-RC2-CBC-SHA' || @.attributeName=='EXP-KRB5-DES-CBC-SHA' || @.attributeName=='EXP-KRB5-RC2-CBC-MD5' || @.attributeName=='EXP-KRB5-DES-CBC-MD5' || @.attributeName=='EXP-ADH-RC4-MD5' || @.attributeName=='EXP-RC4-MD5' || @.attributeName=='EXP-KRB5-RC4-SHA' || @.attributeName=='EXP-KRB5-RC4-MD5')].attributeValue equals true""```",AWS Elastic Load Balancer (Classic) SSL negotiation policy configured with insecure ciphers ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-bigquery-dataset-list' AND json.rule = defaultEncryptionConfiguration.kmsKeyName does not exist```,GCP BigQuery Dataset not configured with default CMEK "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(445,445) or destinationPortRanges[*] contains _Port.inRange(445,445) ))] exists```",Azure Network Security Group allows all traffic on Windows SMB (TCP Port 445) ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = 'policy.Statement[?any((Condition.StringNotEquals contains aws:SourceVpce and Effect equals Deny and (Action contains s3:* or Action[*] contains s3:*)) or (Condition.StringEquals contains aws:SourceVpce and Effect equals Allow and (Action contains s3:* or Action[*] contains s3:*)))] exists'```,AWS S3 bucket having policy overly permissive to VPC endpoints ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and policies.default.Statement[?any(Principal.AWS contains * and Effect equal ignore case allow and Condition does not exist)] exists```,AWS KMS Key policy overly permissive ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'config.isDotnetcoreVersionLatest exists and config.isDotnetcoreVersionLatest equals false'```,Azure App Service Web app doesn't use latest .Net Core version "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and keyMetadata.keyManager equals CUSTOMER and keyMetadata.origin equals AWS_KMS and (rotation_status.keyRotationEnabled is false or rotation_status.keyRotationEnabled equals ""null"") and keyMetadata.customerMasterKeySpec equals SYMMETRIC_DEFAULT```",AWS Customer Master Key (CMK) rotation is not enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-database-maria-db-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Azure Database for MariaDB not configured with private endpoint ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.state'] equal ignore case Ready and ['sqlServer'].['properties.publicNetworkAccess'] equal ignore case Enabled and ['sqlServer'].['properties.privateEndpointConnections'] is empty and firewallRules[*] is empty```,Azure SQL server public network access setting is enabled "```config from cloud.resource where api.name = 'oci-networking-loadbalancer' AND json.rule = lifecycleState equal ignore case ""ACTIVE"" and backendSets.*.backends is empty OR backendSets.*.backends equals ""[]""```",OCI Load Balancer not configured with backend set ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and protocol equals Tcp and access equals Allow and direction equals Inbound and destinationPortRange contains *)] exists```,Azure overly permissive HTTP(S) access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = (serverSecurityAlertPolicy.properties.state equal ignore case Disabled) or (serverSecurityAlertPolicy.properties.state equal ignore case Enabled and vulnerabilityAssessments[*].type does not exist)```,Azure SQL Server ADS Vulnerability Assessment is disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = policy.Statement[?any(Effect equals Allow and (Principal.AWS does not equal * and Principal does not equal * and Principal.AWS contains arn and Principal.AWS does not contain $.accountId) and (Action contains ""s3:Put*"" or Action contains ""s3:Delete*"" or Action equals ""*"" or Action contains ""s3:*"" or Action is member of ('s3:DeleteBucketPolicy','s3:PutBucketAcl','s3:PutBucketPolicy','s3:PutEncryptionConfiguration','s3:PutObjectAcl') ))] exists```",AWS S3 bucket with cross-account access "```config from cloud.resource where cloud.type = 'ibm' and api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id is member of (""crn:v1:bluemix:public:cloud-object-storage::::serviceRole:ObjectReader"",""crn:v1:bluemix:public:cloud-object-storage::::serviceRole:ContentReader"") )] exists and resources[?any( attributes[?any( name equal ignore case ""resourceType"" and value equal ignore case ""bucket"" and operator is member of (""stringEquals"", ""stringMatch"") )] exists )] exists and subjects[?any( attributes[?any( name contains ""access_group_id"" and value contains ""AccessGroupId-PublicAccess"")] exists )] exists as X; config from cloud.resource where api.name = 'ibm-object-storage-bucket' as Y; filter ' $.X.resources[*].attributes[*].value intersects $.Y.name and $.X.resources[*].attributes[*].value intersects $.Y.service_instance_id '; show Y;```",IBM Cloud Object Storage bucket is publicly readable through an access group "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-appsync-graphql-api' AND json.rule = authenticationType equals ""API_KEY"" or additionalAuthenticationProviders[?any( authenticationType equals ""API_KEY"" )] exists```",AWS AppSync GraphQL API is authenticated with API key ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.endpointPublicAccess is true or resourcesVpcConfig.endpointPrivateAccess is false```,again test perf of AWS EKS cluster endpoint access publicly enabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = 'customerSecretKeys[?any(lifecycleState equals ACTIVE and (_DateTime.ageInDays(timeCreated) > 90))] exists'```,OCI users customer secret keys have aged more than 90 days without being rotated ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = settings[?any( name equals MCAS and properties.enabled is false )] exists ```,Azure Microsoft Defender for Cloud MCAS integration Disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-fsx-file-system' AND json.rule = FileSystemType equals ""WINDOWS"" and ( WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel equals ""DISABLED"" AND WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel equals ""DISABLED"")```",AWS FSX Windows filesystem is not configured with file access auditing "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-mwaa-environment' AND json.rule = EnvironmentClass contains ""foo"" ```",bobby run build informational ```config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as X; config from cloud.resource where api.name = 'aws-bedrock-custom-model' as Y; filter ' $.Y.outputDataConfig.bucketName equals $.X.bucketName'; show X;```,AWS S3 bucket used for storing AWS Bedrock Custom model training artifacts "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.systemUpdatesMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud system updates monitoring is set to disabled "```config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = _AWSCloudAccount.orgHierarchyNames() does not intersect (""all-accounts"")```",jashah_ms_does_not_intersect ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = lifecycleState equal ignore case ACTIVE and capabilities.canUseConsolePassword is true and isMfaActivated is false```,OCI MFA is disabled for IAM users ```config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as X; config from cloud.resource where api.name = 'gcloud-vertex-ai-aiplatform-model' as Y; filter ' $.Y.artifactUri contains $.X.id '; show X;```,GCP Storage Bucket storing Vertex AI model ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_without_asset_type_finding_2 "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(27017,27017) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on MongoDB port (27017) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Azure Database for MySQL server not configured with private endpoint ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-active-directory-group-settings' and json.rule = values[?any(name equals LockoutDurationInSeconds and (value less than 60 or value does not exist))] exists```,Azure Microsoft Entra ID account lockout duration less than 60 seconds ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING) and ($.X.securityConfiguration contains $.Y.name) and ($.Y.AuthenticationConfiguration.KerberosConfiguration does not exist)' ; show X;```,AWS EMR cluster is not configured with Kerberos Authentication ```config from cloud.resource where api.name = 'azure-container-registry' AND json.rule = (skuName contains Standard or skuName contains Premium) and properties.provisioningState equal ignore case Succeeded and properties.anonymousPullEnabled is false```,Azure Container Registry with anonymous authentication enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/networkSecurityGroups/securityRules/write"" as X; count(X) less than 1```",Azure Activity log alert for Create or update network security group rule does not exist "```config from cloud.resource where api.name = 'aws-rds-db-cluster' as X; config from cloud.resource where api.name = 'aws-rds-db-cluster-parameter-group' AND json.rule = (((DBParameterGroupFamily starts with ""postgres"" or DBParameterGroupFamily starts with ""aurora-postgresql"") and (['parameters'].['rds.force_ssl'].['ParameterValue'] does not equal 1 or ['parameters'].['rds.force_ssl'].['ParameterValue'] does not exist)) or ((DBParameterGroupFamily starts with ""aurora-mysql"" or DBParameterGroupFamily starts with ""mysql"") and (parameters.require_secure_transport.ParameterValue is not member of (""ON"", ""1"") or parameters.require_secure_transport.ParameterValue does not exist))) as Y; filter '$.X.dBclusterParameterGroupArn equals $.Y.DBClusterParameterGroupArn' ; show X;```",AWS RDS cluster encryption in transit is not configured ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-spanner-database' AND json.rule = state equal ignore case ready AND encryptionConfig.kmsKeyNames does not exist```,GCP Spanner Databases not encrypted with CMEK "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudformation-describe-stacks' AND json.rule = ""(($.stackResources[?( @.resourceType == 'AWS::EC2::SecurityGroup' || @.resourceType == 'AWS::EC2::SecurityGroupIngress' || @.resourceType == 'AWS::EC2::NetworkAclEntry')].resourceStatus any equal CREATE_COMPLETE) or ($.stackResources[?( @.resourceType == 'AWS::EC2::SecurityGroup' || @.resourceType == 'AWS::EC2::SecurityGroupIngress' || @.resourceType == 'AWS::EC2::NetworkAclEntry')].resourceStatus any equal UPDATE_COMPLETE)) and (($.cloudFormationTemplate.Resources.{}.SecurityGroupIngress[*].CidrIp any equal 0.0.0.0/0 or $.cloudFormationTemplate.Resources.{}.SecurityGroupIngress[*].CidrIpv6 any equal ::/0 or $.cloudFormationTemplate.Resources.{}.Properties.CidrIp any equal 0.0.0.0/0 or $.cloudFormationTemplate.Resources.{}.Properties.CidrIpv6 any equal ::/0) or ($.cloudFormationTemplate.Resources.{}.Properties.CidrBlock any equal 0.0.0.0/0 or $.cloudFormationTemplate.Resources.{}.Properties.Ipv6CidrBlock any equal ::/0 or $.cloudFormationTemplate.Resources.{}.Properties.Protocol any equal -1))""```",AWS CloudFormation template contains globally open resources "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Authorization/policyAssignments/write"" as X; count(X) less than 1```",Azure Activity log alert for Create policy assignment does not exist "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = enabled is true and origins.items[*] contains customOriginConfig and origins.items[?any(customOriginConfig.originProtocolPolicy does not contain https-only and ( domainName contains "".data.mediastore."" or domainName contains "".mediapackage."" or domainName contains "".elb."" ))] exists```",AWS CloudFront origin protocol policy does not enforce HTTPS-only "```config from cloud.resource where api.name = 'oci-networking-loadbalancer' AND json.rule = listeners.*.protocol equals HTTP and lifecycleState equals ACTIVE and isPrivate is false as X; config from cloud.resource where api.name = 'oci-loadbalancer-waf' AND json.rule = lifecycleState equal ignore case ACTIVE and (webAppFirewallPolicyId exists and webAppFirewallPolicyId does not equal ""null"") as Y; filter 'not ($.X.id equals $.Y.loadBalancerId) '; show X;```",OCI Load balancer not configured with Web application firewall (WAF) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-emr-describe-cluster' AND json.rule = status.state does not contain TERMINATING and terminationProtected is false```,AWS EMR cluster is not enabled with termination protection ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-flexible-server' AND json.rule = properties.state equal ignore case Ready and firewallRules[*] is empty and properties.network.publicNetworkAccess equal ignore case Enabled```,Azure Database for MySQL flexible server public network access setting is enabled ```config from cloud.resource where resource.status = Active AND api.name = 'oci-compute-instance' AND json.rule = lifecycleState exists```,OCI Hosts test - Ali "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(25,25) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on SMTP port (25) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' and json.rule = secrets[?any(attributes.exp equals -1 and attributes.enabled contains true)] exists and properties.enableRbacAuthorization is true```,Azure Key Vault secret has no expiration date (RBAC Key vault) ```config from cloud.resource where api.name = 'aws-code-build-project' AND json.rule = environment.privilegedMode exists and environment.privilegedMode is true```,AWS CodeBuild project environment privileged mode is enabled ```config from cloud.resource where api.name='gcloud-sql-instances-list' AND json.rule='$.settings.backupConfiguration.binaryLogEnabled is false and $.databaseVersion contains MYSQL'```,GCP SQL MySQL DB instance point-in-time recovery backup (Binary logs) is not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-elastic-address' AND json.rule = associationId does not exist```,AWS Elastic IP not in use "```config from cloud.resource where api.name = 'aws-ec2-autoscaling-launch-configuration' AND json.rule = metadataOptions.httpEndpoint exists and metadataOptions.httpEndpoint equals ""enabled"" and metadataOptions.httpPutResponseHopLimit greater than 1 as X; config from cloud.resource where api.name = 'aws-describe-auto-scaling-groups' as Y; filter ' $.X.launchConfigurationName equal ignore case $.Y.launchConfigurationName'; show X;```",AWS Auto Scaling group launch configuration configured with Instance Metadata Service hop count greater than 1 "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains AuthorizeSecurityGroupIngress and $.X.filterPattern contains AuthorizeSecurityGroupEgress and $.X.filterPattern contains RevokeSecurityGroupIngress and $.X.filterPattern contains RevokeSecurityGroupEgress and $.X.filterPattern contains CreateSecurityGroup and $.X.filterPattern contains DeleteSecurityGroup) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Security group changes are not monitored "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_parser_stats or settings.databaseFlags[?any(name contains log_parser_stats and value contains on)] exists)""```",GCP PostgreSQL instance database flag log_parser_stats is not set to off ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and kind contains workflowapp and config.http20Enabled is false```,Azure Logic App does not utilize HTTP 2.0 version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_system_policy_as_child_policies_ss_finding_1 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and (copyTagsToSnapshot is false or copyTagsToSnapshot does not exist) and engine does not contain aurora and engine does not contain docdb and engine does not contain neptune```,AWS RDS instance with copy tags to snapshots disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = state.code contains active and listeners[?any(protocol equals HTTP and defaultActions[?any(type equals redirect and redirectConfig.protocol equals HTTPS)] does not exist )] exists```,AWS Elastic Load Balancer v2 (ELBv2) listener that allow connection requests over HTTP ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-flexible-server' AND json.rule = properties.state equal ignore case Ready and properties.network.publicNetworkAccess equal ignore case Enabled and firewallRules[?any(properties.startIpAddress equals 0.0.0.0 and properties.endIpAddress equals 255.255.255.255)] exists```,Azure Database for MySQL flexible server firewall rule allow access to all IPv4 address ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-kubernetes-cluster' AND json.rule = type equal ignore case kubernetes and state equal ignore case normal and features.pullSecretApplied is false```,IBM Cloud Kubernetes cluster has Image pull secrets disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-rds-db-cluster' AND json.rule = status contains available and (engine contains postgres or engine contains mysql) and iamdatabaseAuthenticationEnabled is false```,AWS RDS cluster not configured with IAM authentication ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cosmos-db' AND json.rule = properties.provisioningState equals Succeeded and properties.privateEndpointConnections[*] does not exist```,Azure Cosmos DB Private Endpoint Connection is not configured ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-user' AND json.rule = userType equals Guest```,Azure Active Directory Guest users found "```config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = name does not start with ""gke-"" and status equals RUNNING as X; config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' as Y; filter '($.X.serviceAccounts[*].email equals $.Y.user) and not($.Y.roles[*] contains projects or $.Y.roles[*] all equal roles/viewer)'; show X;```",GCP VM instances with excessive service account permissions ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_ss_update_child_policy_finding_1 ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded as X; config from cloud.resource where api.name = 'azure-storage-account-queue-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.name equal ignore case $.Y.StorageAccountName)'; show X;```,Azure Storage account diagnostic setting for queue is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-authentication-policy' AND json.rule = 'passwordPolicy.isSpecialCharactersRequired isFalse'```,OCI IAM password policy for local (non-federated) users does not have a symbol "```config from cloud.resource where api.name = 'gcloud-compute-external-backend-service' AND json.rule = iap does not exist or iap.enabled equals ""false""```",GCP Identity-Aware Proxy (IAP) not enabled for External HTTP(s) Load Balancer "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = ""not ( diagnosticSettings.value[*].properties.logs[*].enabled any equal true and diagnosticSettings.value[*].properties.logs[*].enabled size greater than 0 )""```",Azure Key Vault audit logging is disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-aiplatform-endpoint' AND json.rule = encryptionSpec.kmsKeyName does not exist```,GCP Vertex AI Endpoint not encrypted with CMEK "```config from cloud.resource where api.name = 'aws-glue-job' as X; config from cloud.resource where api.name = 'aws-glue-security-configuration' as Y; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager does not equal CUSTOMER or (keyMetadata.keyManager equals CUSTOMER and keyMetadata.keyState equals Disabled) as Z; filter '$.X.SecurityConfiguration does not exist or ( $.X.SecurityConfiguration equals $.Y.name and ($.Y.encryptionConfiguration.s3Encryption[*].s3EncryptionMode does not equal ""SSE-KMS"" or ($.Y.encryptionConfiguration.s3Encryption[*].kmsKeyArn exists and $.Y.encryptionConfiguration.s3Encryption[*].kmsKeyArn equals $.Z.keyMetadata.arn)))' ; show X;```",AWS Glue Job not encrypted by Customer Managed Key (CMK) ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-machine-learning-compute' AND json.rule = properties.properties.state equal ignore case running and (properties.computeType equal ignore case ComputeInstance or properties.computeType equal ignore case AmlCompute ) and properties.disableLocalAuth is false```,Azure Machine Learning compute instance with local authentication enabled "```config from cloud.resource where api.name = 'oci-networking-networkloadbalancer' AND json.rule = lifecycleState equal ignore case ""ACTIVE"" and backendSets.*.backends is empty OR backendSets.*.backends equals ""[]""```",OCI Network Load Balancer not configured with backend set ```config from cloud.resource where api.name = 'aws-redshift-describe-clusters' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '$.X.encrypted is true and $.X.kmsKeyId equals $.Y.key.keyArn and $.Y.keyMetadata.keyManager contains AWS'; show X;```,AWS Redshift Cluster not encrypted using Customer Managed Key ```config from cloud.resource where cloud.type = 'gcp' AND api.name= 'gcloud-storage-buckets-list' AND json.rule = logging does not exist```,GCP Storage Bucket does not have Access and Storage Logging enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = 'status contains PENDING_VALIDATION'```,AWS Certificate Manager (ACM) contains certificate pending validation ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-user' AND json.rule = 'accessKeys[*] size > 0 and accessKeys[*].status any equal Active and loginProfile[*] is not empty'```,Alibaba Cloud RAM user has both console access and access keys "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""secrets-manager"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Secrets Manager service "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Sql/servers/firewallRules/delete"" as X; count(X) less than 1```",Azure Activity log alert for Delete SQL server firewall rule does not exist "```config from cloud.resource where api.name = 'ibm-vpc-network-security-group' AND json.rule = rules[?any( ( remote.cidr_block equals ""0.0.0.0/0"" or remote.name equals $.name ) and direction equals ""inbound"" )] exists as X; config from cloud.resource where api.name = 'ibm-vpc' as Y; filter ' $.X.id equals $.Y.default_security_group.id '; show X;```",IBM Cloud Default Security Group allow ingress rule from 0.0.0.0/0 "```config from cloud.resource where cloud.account = 'Bikram-Personal-AWS Account' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = versioningConfiguration.status contains ""Off"" ```",bikram-test-policy ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.enablePurgeProtection is false```,Azure Key Vault Purge protection is not enabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudtrail-describe-trails' as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as Y; filter ""($.Y.bucketName==$.X.s3BucketName) and ($.Y.acl.grants[*].grantee contains AllUsers or $.Y.acl.grants[*].permission contains FullControl) and ($.Y.policy.Statement[?(@.Principal=='*' && @.Effect=='Allow')].Action contains s3:* or $.Y.policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Allow')].Action contains s3:*)"" ; show Y;```",AWS S3 Bucket Policy allows public access to CloudTrail logs ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_add_remove_child_policy_hyperion_policy_ss_finding_1 "```config from cloud.resource where api.name = 'oci-block-storage-boot-volume' AND json.rule = lifecycleState equal ignore case ""AVAILABLE"" AND kmsKeyId is member of (""null"")```",OCI boot volume is not encrypted with Customer Managed Key (CMK) "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.publicNetworkAccess'] equal ignore case Enabled and firewallRules[?any(startIpAddress equals ""0.0.0.0"" and endIpAddress equals ""0.0.0.0"")] exists```",Copy of Azure SQL Server allow access to any Azure internal resources ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = logging.clusterLogging[*].types[*] all empty or logging.clusterLogging[*].enabled is false```,AWS EKS control plane logging disabled "```config from cloud.resource where api.name = 'aws-lambda-list-functions' as X; config from cloud.resource where api.name = 'aws-iam-list-roles' as Y; config from cloud.resource where api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and (Action equals ""*"" or Action contains :* or Action[*] contains :*) and (Resource equals ""*"" or Resource[*] anyStartWith ""*"") and Condition does not exist)] exists as Z; filter '$.X.role equals $.Y.role.arn and $.Y.attachedPolicies[*].policyName equals $.Z.policyName'; show Z;```",AWS IAM policy attached to AWS Lambda execution role is overly permissive ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-authentication-policy' AND json.rule = 'passwordPolicy.isNumericCharactersRequired isFalse'```,OCI IAM password policy for local (non-federated) users does not have a number ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-rds-describe-db-instances' AND json.rule = 'publiclyAccessible is true'```,AWS RDS database instance is publicly accessible "```config from cloud.resource where cloud.type = 'aws' and api.name= 'aws-rds-db-cluster-snapshots' AND json.rule = dbclusterSnapshotAttributes[?any( attributeName equals restore and attributeValues[*] contains ""all"" )] exists```",AWS RDS Cluster snapshot is accessible to public ```config from cloud.resource where api.name = 'aws-ec2-ebs-encryption' AND cloud.region IN ( 'AWS Ohio' ) AND json.rule = ebsEncryptionByDefault is false```,Roman - AWS EBS volume region with encryption is disabled - Revised for ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-apigateway-method' AND json.rule = authorizationType contains NONE```,AWS API gateway request authorisation is not set "```config from cloud.resource where api.name = 'azure-dns-recordsets' AND json.rule = type contains CNAME and properties.CNAMERecord.cname contains ""azurewebsites.net"" as X; config from cloud.resource where api.name = 'azure-app-service' as Y; filter 'not ($.Y.properties.hostNames contains $.X.properties.CNAMERecord.cname) '; show X;```",Azure DNS Zone having dangling DNS Record vulnerable to subdomain takeover associated with Web App Service ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals RUNNING and (masterAuth.clientKey exists or masterAuth.clientCertificate exists)```,GCP Kubernetes Engine Cluster Client Certificate is not disabled ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded as X; config from cloud.resource where api.name = 'azure-storage-account-file-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.name equal ignore case $.Y.StorageAccountName)'; show X;```,Azure Storage account diagnostic setting for file is disabled "```config from cloud.resource where cloud.accountgroup = 'Flowlog-sol' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""sol-test"" ```",Copy of Sol-test config policy ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-object-storage-bucket' AND json.rule = objectEventsEnabled is false```,OCI Object Storage bucket does not emit object events "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals does not equal Microsoft.Network/publicIPAddresses/delete and properties.condition.allOf[?(@.field=='category')].['equals'] contains Administrative"" as X; count(X) less than 1```",Azure Activity Log Alert does not exist for Delete Public IP Address rule ```config from cloud.resource where api.name = 'aws-elb-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' as Y; filter '$.X.description.securityGroups[*] contains $.Y.groupId and $.Y.ipPermissions[*] is empty'; show X;```,AWS Elastic Load Balancer (ELB) has security group with no inbound rules "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = powerState equal ignore case ""PowerState/running"" and ['properties.securityProfile'].['securityType'] equal ignore case ""TrustedLaunch"" and ['properties.securityProfile'].['uefiSettings'].['vTpmEnabled'] is false```",Azure Virtual Machine vTPM feature is disabled "```config from cloud.resource where api.name = 'gcloud-compute-target-ssl-proxy' as X; config from cloud.resource where api.name = 'gcloud-compute-ssl-policies' as Y; filter ""$.X.sslPolicy does not exist or ($.Y.profile equals COMPATIBLE and $.Y.selfLink contains $.X.sslPolicy) or ( ($.Y.profile equals MODERN or $.Y.profile equals CUSTOM) and $.Y.minTlsVersion does not equal TLS_1_2 and $.Y.selfLink contains $.X.sslPolicy ) or ( $.Y.profile equals CUSTOM and ( $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_128_GCM_SHA256 or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_256_GCM_SHA384 or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_128_CBC_SHA or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_256_CBC_SHA or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_3DES_EDE_CBC_SHA ) and $.Y.selfLink contains $.X.sslPolicy ) ""; show X;```",GCP Load Balancer SSL proxy permits SSL policies with weak cipher suites ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-authentication-policy' AND json.rule = 'passwordPolicy.minimumPasswordLength less than 14'```,OCI IAM password policy for local (non-federated) users does not have minimum 14 characters "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(20,20) or destinationPortRanges[*] contains _Port.inRange(20,20) ))] exists```",Azure Network Security Group allows all traffic on FTP-Data (TCP Port 20) "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ( $.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="" ) and ( $.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="" ) and $.X.filter contains ""gce_route"" and ( $.X.filter contains ""protoPayload.methodName="" or $.X.filter contains ""protoPayload.methodName ="" ) and ( $.X.filter does not contain ""protoPayload.methodName!="" and $.X.filter does not contain ""protoPayload.methodName !="" ) and $.X.filter contains ""beta.compute.routes.patch"" and $.X.filter contains ""beta.compute.routes.insert""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for VPC network route patch and insert "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.encryption.keySource equals ""Microsoft.Storage""```",Azure Storage account Encryption Customer Managed Keys Disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and autoMinorVersionUpgrade is false and engine does not contain docdb and engine does not contain neptune```,AWS RDS minor upgrades not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-events-eventbus' AND json.rule = Policy does not exist```,AWS EventBridge event bus with no resource-based policy attached "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and diagnosticSettings.value[*].properties.workspaceId does not equal ignore case ""/subscriptions/8dff688e-d9b0-477c-b2b0-b0e729fb06bd/resourceGroups/rg-analytics-sh-prd-scus/providers/Microsoft.OperationalInsights/workspaces/log-sh-workspace""```",bboiko test 03 - policy ```config from cloud.resource where api.name = 'azure-event-hub-namespace' AND json.rule = properties.disableLocalAuth is false as X; config from cloud.resource where api.name = 'azure-event-hub' AND json.rule = properties.status equal ignore case ACTIVE and authorizationRules[*] is empty as Y; filter '$.Y.id contains $.X.name'; show Y;```,Azure Event Hub Instance not defined with authorization rule "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""containers-kubernetes"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance"",""namespace""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Kubernetes Service ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = 'iam.bindings[*] size greater than 0 and iam.bindings[*].members[*] any equal allAuthenticatedUsers'```,GCP Storage buckets are publicly accessible to all authenticated users ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc' AND json.rule = classic_access is true```,IBM Cloud Virtual Private Cloud (VPC) classic access is enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-vnet-list' AND json.rule = ['properties.provisioningState'] equals Succeeded and (['properties.ddosProtectionPlan'].['id'] does not exist or ['properties.enableDdosProtection'] is false)```,Azure Virtual network not protected by DDoS Protection Standard ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-cache-clusters' AND json.rule = engine contains redis and autoMinorVersionUpgrade is false```,AWS ElastiCache Redis cluster automatic version upgrade disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-appsync-graphql-api' AND json.rule = logConfig.fieldLogLevel is not member of ('ERROR','ALL')```",AWS AppSync has field-level logging disabled ```config from cloud.resource where api.name = 'aws-cloudfront-list-distributions' AND json.rule = webACLId is not empty as X; config from cloud.resource where api.name = 'aws-waf-v2-global-web-acl-resource' AND json.rule =(webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesAnonymousIpList or webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesKnownBadInputsRuleSet) and NOT ( webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesAnonymousIpList and webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesKnownBadInputsRuleSet ) as Y; filter '$.Y.webACL.arn equals $.X.webACLId'; show X;```,AWS CloudFront attached WAFv2 WebACL is not configured with AMR for Log4j Vulnerability "```config from cloud.resource where cloud.type = 'aws' AND cloud.service = 'Amazon EC2' AND api.name = 'aws-ec2-describe-instances' AND json.rule = securityGroups[*].groupName equals ""default"" as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = groupName equals ""default"" as Y; filter '$.X.securityGroups[*].groupId equals $.Y.groupId';show Y;```",Naveed "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-run-services-list' AND json.rule = status.conditions[?any(type equals Ready and status equals True)] exists and status.conditions[?any(type equals RoutesReady and status equals True)] exists and iamPolicy.bindings[?any(role equals roles/run.invoker and members is member of (allUsers, allAuthenticatedUsers))] exists```",GCP Cloud Run service is publicly accessible "```config from cloud.resource where api.name= 'aws-cloudtrail-describe-trails' AND json.rule = 'isMultiRegionTrail is true and includeGlobalServiceEvents is true' as X; config from cloud.resource where api.name= 'aws-cloudtrail-get-trail-status' AND json.rule = 'status.isLogging equals true' as Y; config from cloud.resource where api.name= 'aws-cloudtrail-get-event-selectors' AND json.rule = eventSelectors[?any( dataResources[?any( type contains ""AWS::S3::Object"" and values contains ""arn:aws:s3"")] exists and readWriteType is member of (""All"",""Writeonly"") and includeManagementEvents is true)] exists as Z; filter '($.X.trailARN equals $.Z.trailARN) and ($.X.name equals $.Y.trail)'; show X; count(X) less than 1```",AWS S3 Buckets with Object-level logging for write events not enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_duration or settings.databaseFlags[?any(name contains log_duration and value contains off)] exists)""```",GCP PostgreSQL instance database flag log_duration is not set to on "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-kubernetes-cluster' AND json.rule = type equal ignore case kubernetes and state equal ignore case ""normal"" and features.keyProtectEnabled is false```",IBM Cloud Kubernetes secrets data is not encrypted with bring your own key "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" and ( gceSetup.metadata.proxy-mode equals ""mail"" or gceSetup.metadata.proxy-user-mail exists )```",GCP Vertex AI Workbench Instance JupyterLab interface access mode set to single user ```config from cloud.resource where api.name = 'aws-elasticache-cache-clusters' as X; config from cloud.resource where api.name = 'aws-cache-engine-versions' as Y; filter 'not( $.X.engine equals $.Y.engine and $.Y.cacheEngineVersionDescription contains $.X.engineVersion)'; show X;```,AWS ElastiCache cluster not using supported engine version ```config from cloud.resource where api.name = 'azure-spring-cloud-service' AND json.rule = properties.powerState equals Running as X; config from cloud.resource where api.name = 'azure-spring-cloud-app' AND json.rule = properties.provisioningState equals Succeeded and identity does not exist as Y; filter '$.X.name equals $.Y.serviceName'; show Y;```,Azure Spring Cloud App system-assigned managed identity is disabled ```config from cloud.resource where api.name = 'aws-route53-list-hosted-zones' AND json.rule = hostedZone.config.privateZone is false and resourceRecordSet[?any( type equals CNAME and resourceRecords[*].value contains s3-website )] exists as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as Y; filter 'not ($.X.resourceRecordSet[*].name intersects $.Y.bucketName)'; show X;```,AWS Route53 Hosted Zone having dangling DNS record with subdomain takeover risk associated with AWS S3 Bucket "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-network-acls' AND json.rule = ""entries[?any(egress equals false and ((protocol equals 6 and ((portRange.to equals 22 or portRange.to equals 3389 or portRange.from equals 22 or portRange.from equals 3389) or (portRange.to > 22 and portRange.from < 22) or (portRange.to > 3389 and portRange.from < 3389))) or protocol equals -1) and (cidrBlock equals 0.0.0.0/0 or ipv6CidrBlock equals ::/0) and ruleAction equals allow)] exists""```",AWS Network ACLs that allow ingress from 0.0.0.0/0 to remote server administration ports ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'websiteConfiguration exists'```,AWS S3 buckets with configurations set to host websites ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.endpointPublicAccess is true or resourcesVpcConfig.endpointPrivateAccess is false```,test perf of AWS EKS cluster endpoint access publicly enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,BikramTest-AWS S3 Object Versioning is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = 'attributes.accessLog.enabled is false'```,AWS Elastic Load Balancer (Classic) with access log disabled ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING) and ($.X.securityConfiguration equals $.Y.name) and ($.Y.EncryptionConfiguration.EnableAtRestEncryption is false)'; show X;```,AWS EMR cluster is not enabled with data encryption at rest "```config from cloud.resource where api.name = 'gcloud-compute-ssl-policies' AND json.rule = (profile equals MODERN or profile equals CUSTOM) and minTlsVersion does not equal ""TLS_1_2"" as X; config from cloud.resource where api.name = 'gcloud-compute-target-https-proxies' AND json.rule = sslPolicy exists as Y; filter ""$.X.selfLink contains $.Y.sslPolicy""; show Y;```",GCP HTTPS Load balancer is configured with SSL policy having TLS version 1.1 or lower ```config from cloud.resource where api.name = 'aws-sagemaker-notebook-instance' AND json.rule = notebookInstanceStatus equals InService and kmsKeyId exists as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '$.X.kmsKeyId equals $.Y.key.keyArn and $.Y.keyMetadata.keyManager contains AWS'; show X;```,AWS SageMaker notebook instance not encrypted using Customer Managed Key ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-kms-crypto-keys-list' AND json.rule = ((purpose does not equal ENCRYPT_DECRYPT) or (purpose equals ENCRYPT_DECRYPT and primary.state equals ENABLED)) and iamPolicy.bindings[*].members contains allUsers or iamPolicy.bindings[*].members contains allAuthenticatedUsers```,GCP KMS crypto key is anonymously accessible ```config from cloud.resource where api.name = 'aws-rds-db-cluster-parameter-group' AND json.rule = parameters.log_min_duration_statement.ParameterValue does not exist or parameters.log_min_duration_statement.ParameterValue equals -1 as X; config from cloud.resource where api.name= 'aws-rds-db-cluster' AND json.rule = status contains available and engine contains postgres as Y; filter '$.X.DBClusterParameterGroupName equals $.Y.dbclusterParameterGroup'; show Y;```,AWS RDS Postgres Cluster does not have query logging enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind starts with app and config.siteAuthEnabled equals false'```,Azure App Service Web app authentication is off ```config from cloud.resource where api.name = 'aws-iam-list-users' AND json.rule = createDate contains 2018```,tbsjmfcdgf_ui_auto_policies_tests_name ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-ec2-describe-snapshots' AND json.rule='createVolumePermissions[*].group contains all' ```,PCSUP-22910-Policy "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id is member of (""crn:v1:bluemix:public:iam::::role:Administrator"",""crn:v1:bluemix:public:iam::::serviceRole:Manager"") )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""cloud-object-storage"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and (attributes[?any( name is member of (""resource"",""resourceGroupId"",""serviceInstance"",""prefix""))] does not exist or attributes[?any( name equal ignore case ""resourceType"" and value equal ignore case ""bucket"" )] exists ) )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Cloud object storage buckets ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.virtualnetwork.createdrg and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletedrg and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatedrg and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createdrgattachment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletedrgattachment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatedrgattachment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.changeinternetgatewaycompartment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createinternetgateway and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deleteinternetgateway and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updateinternetgateway and condition.eventType[*] contains com.oraclecloud.virtualnetwork.changelocalpeeringgatewaycompartment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createlocalpeeringgateway and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletelocalpeeringgateway and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatelocalpeeringgateway and condition.eventType[*] contains com.oraclecloud.natgateway.changenatgatewaycompartment and condition.eventType[*] contains com.oraclecloud.natgateway.createnatgateway and condition.eventType[*] contains com.oraclecloud.natgateway.deletenatgateway and condition.eventType[*] contains com.oraclecloud.natgateway.updatenatgateway and condition.eventType[*] contains com.oraclecloud.servicegateway.attachserviceid and condition.eventType[*] contains com.oraclecloud.servicegateway.changeservicegatewaycompartment and condition.eventType[*] contains com.oraclecloud.servicegateway.createservicegateway and condition.eventType[*] contains com.oraclecloud.servicegateway.deleteservicegateway.begin and condition.eventType[*] contains com.oraclecloud.servicegateway.deleteservicegateway.end and condition.eventType[*] contains com.oraclecloud.servicegateway.detachserviceid and condition.eventType[*] contains com.oraclecloud.servicegateway.updateservicegateway ) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for network gateways changes ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-automation-account' AND json.rule = variable[?any(properties.isEncrypted is false)] exists```,Azure Automation account variables are not encrypted "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ssm-document' AND json.rule = accountSharingInfoList[*].accountId equal ignore case ""all""```",AWS SSM documents are public "```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-sagemaker-endpoint-config' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; config from cloud.resource where api.name = 'aws-sagemaker-endpoint' AND json.rule = endpointStatus does not equal ""Failed"" as Z; filter '($.X.KmsKeyId does not exist or (($.X.KmsKeyId exists and $.Y.keyMetadata.keyState equals Disabled) and $.X.KmsKeyId equals $.Y.keyMetadata.arn)) and ($.X.EndpointConfigName equals $.Z.endpointConfigName)' ; show X;```",AWS SageMaker endpoint data encryption at rest not configured with CMK "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(1433,1433)""```",Alibaba Cloud Security group allow internet traffic to MS SQL port (1433) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = (securityContacts is empty or securityContacts[?any(properties.email is empty)] exists) and pricings[?any(properties.pricingTier equal ignore case Standard)] exists```,Azure Microsoft Defender for Cloud security contact additional email is not set "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = roles[*] contains ""roles/editor"" or roles[*] contains ""roles/owner"" as X; config from cloud.resource where api.name = 'gcloud-cloud-function' as Y; filter '$.Y.serviceAccountEmail equals $.X.user'; show Y;```",GCP Cloud Function has risky basic role assigned ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = domainProcessingStatus equal ignore case active and (logPublishingOptions does not exist or logPublishingOptions.AUDIT_LOGS.enabled is false)```,AWS Opensearch domain audit logging disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = 'state equals RUNNABLE and databaseVersion contains SQLSERVER and settings.databaseFlags[*].name does not contain ""user connections""'```",GCP SQL server instance database flag user connections is not set ```config from cloud.resource where cloud.type = 'azure' aND api.name = 'azure-vm-list' AND json.rule = ['properties.storageProfile'].osDisk.vhd.uri exists```,mkurter-testing--0002 ```config from cloud.resource where cloud.type = 'azure' AND cloud.accountgroup NOT IN ( 'AWS' ) AND api.name = 'azure-vm-list' AND json.rule = ['properties.storageProfile'].osDisk.vhd.uri exists```,mkurter-testing-pcf-azure "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' AND json.rule = ""_DateTime.ageInDays(createTime) > 90""```",GCP API key not rotating in every 90 days ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-cluster' AND json.rule = status equals ACTIVE and activeServicesCount equals 0```,AWS ECS cluster not configured with active services ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-gateway' AND json.rule = (['properties.sslPolicy'] does not exist and ['properties.defaultPredefinedSslPolicy'] does not equal ignore case AppGwSslPolicy20220101) or (['properties.sslPolicy'].['policyType'] equal ignore case Predefined and (['properties.sslPolicy'].['policyName'] equal ignore case AppGwSslPolicy20150501 or ['properties.sslPolicy'].['policyName'] equal ignore case AppGwSslPolicy20170401)) or (['properties.sslPolicy'].['policyType'] equal ignore case Custom and (['properties.sslPolicy'].['minProtocolVersion'] equal ignore case TLSv1_0 or ['properties.sslPolicy'].['minProtocolVersion'] equal ignore case TLSv1_1))```,Azure Application Gateway is configured with SSL policy having TLS version 1.1 or lower ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and kind contains functionapp and kind does not contain workflowapp and kind does not equal app and config.siteAuthEnabled is false```,Azure Function App authentication is off ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = 'processing is false and (encryptionAtRestOptions.enabled is false or encryptionAtRestOptions does not exist)'```,AWS Elasticsearch domain Encryption for data at rest is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.endpointPublicAccess is true or resourcesVpcConfig.endpointPrivateAccess is false```,Copy of AWS EKS cluster endpoint access publicly enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' and json.rule = keys[?any(attributes.exp equals -1 and attributes.enabled contains true)] exists and properties.enableRbacAuthorization is true```,Azure Key Vault Key has no expiration date (RBAC Key vault) "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ""$.serverBlobAuditingPolicy.properties.retentionDays does not exist or $.serverBlobAuditingPolicy.properties.state equals Disabled""```",Azure SQL Server auditing is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-securityhub-hub' AND json.rule = SubscribedAt exists as X; count(X) less than 1```,AWS Security Hub is not enabled ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.encryption.status equal ignore case disabled```,test c p ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-networks-list' as X; config from cloud.resource where api.name = 'gcloud-dns-policy' as Y; filter 'not($.Y.networks[*].networkUrl contains $.X.name and $.Y.enableLogging is true)'; show X;```,GCP VPC network not configured with DNS policy with logging enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' AND json.rule = (properties.roleDefinition.properties.type equals CustomRole and (properties.roleDefinition.properties.permissions[?any((actions[*] equals Microsoft.Authorization/locks/delete and actions[*] equals Microsoft.Authorization/locks/read and actions[*] equals Microsoft.Authorization/locks/write) or actions[*] equals Microsoft.Authorization/locks/*)] exists) and (properties.roleDefinition.properties.permissions[?any(notActions[*] equals Microsoft.Authorization/locks/delete or notActions[*] equals Microsoft.Authorization/locks/read or notActions[*] equals Microsoft.Authorization/locks/write or notActions[*] equals Microsoft.Authorization/locks/*)] does not exist)) as X; count(X) less than 1```,liron test custom policy #3 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sqs-get-queue-attributes' AND json.rule = attributes.Policy.Statement[?any(Effect equals Allow and (Action anyStartWith sqs: or Action anyStartWith SQS:) and (Principal.AWS contains * or Principal equals *) and Condition does not exist)] exists```,AWS SQS queue access policy is overly permissive ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-user' AND json.rule = 'accessKeys[*] size > 1 and accessKeys[*].status all equal Active'```,Alibaba Cloud RAM user has more than one active access keys "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(5432,5432)""```",Alibaba Cloud Security group allow internet traffic to PostgreSQL port (5432) "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""containers-kubernetes"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance"",""namespace""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Kubernetes Service "```config from cloud.resource where api.name = 'gcloud-compute-project-info' AND json.rule = commonInstanceMetadata.kind equals ""compute#metadata"" and commonInstanceMetadata.items[?any(key contains ""enable-oslogin"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and commonInstanceMetadata.items[?any(key contains ""ssh-keys"")] exists as X; config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = status equals RUNNING and ( metadata.items[?any(key exists and key contains ""block-project-ssh-keys"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and metadata.items[?any(key exists and key contains ""enable-oslogin"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and name does not start with ""gke-"") as Y; filter '$.Y.zone contains $.X.name'; show Y;```",GCP VM instances have block project-wide SSH keys feature disabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'maxPasswordAge !isType Integer or maxPasswordAge > 90 or maxPasswordAge equals 0'```,Alibaba Cloud RAM password policy does not expire in 90 days "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='log_checkpoints')].properties.value equals OFF or configurations.value[?(@.name=='log_checkpoints')].properties.value equals off""```",Azure PostgreSQL database server with log checkpoints parameter disabled "```config from cloud.resource where api.name = 'aws-elasticbeanstalk-environment' AND json.rule = status does not equal ""Terminated"" as X; config from cloud.resource where api.name = 'aws-elasticbeanstalk-configuration-settings' AND json.rule = configurationSettings[*].optionSettings[?any( optionName equals ""StreamLogs"" and value equals ""false"" )] exists as Y; filter ' $.X.environmentName equals $.Y.configurationSettings[*].environmentName and $.X.applicationName equals $.Y.configurationSettings[*].applicationName'; show X;```",AWS Elastic Beanstalk environment logging not configured ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = 'secret_type equals username_password and state_description equal ignore case active and (_DateTime.ageInDays(last_update_date) > 90)'```,IBM Cloud Secrets Manager user credentials have aged more than 90 days without being rotated "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains SQLSERVER and settings.databaseFlags[?(@.name=='cross db ownership chaining')].value equals on""```",GCP SQL Server instance database flag 'cross db ownership chaining' is enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-insights-component' AND json.rule = properties.provisioningState equals Succeeded and (properties.DisableLocalAuth does not exist or properties.DisableLocalAuth is false)```,Azure Application Insights not configured with Azure Active Directory (Azure AD) authentication ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cognitive-services-account' AND json.rule = kind equal ignore case OpenAI and properties.provisioningState equal ignore case Succeeded and (properties.restrictOutboundNetworkAccess does not exist or properties.restrictOutboundNetworkAccess is false or (properties.restrictOutboundNetworkAccess is true and properties.allowedFqdnList is empty))```,Azure Cognitive Services account hosted with OpenAI is not configured with data loss prevention ```config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as X; config from cloud.resource where api.name = 'gcloud-vertex-ai-aiplatform-pipeline-job' as Y; filter ' $.Y.runtimeConfig.gcsOutputDirectory contains $.X.id '; show X;```,GCP Storage Bucket storing GCP Vertex AI pipeline output data ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-block-storage-volume' AND json.rule = volume_attachments[*] size greater than 0 and volume_attachments[*].type equals boot and encryption equal ignore case provider_managed```,IBM Cloud OS disk is not encrypted with customer managed keys ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-log-analytics-workspace' AND json.rule = properties.provisioningState equals Succeeded and (properties.publicNetworkAccessForQuery equals Enabled or properties.publicNetworkAccessForIngestion equals Enabled)```,Azure Log Analytics workspace configured with overly permissive network access ```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = tags[*] exists```,Izabella config with tags test 1 ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-virtual-desktop-workspace' AND json.rule = diagnostic-settings[?none( properties.logs[?any( enabled is true )] exists )] exists```,Azure Virtual Desktop workspace diagnostic log is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = (securityContacts is empty or securityContacts[?any(properties.email is empty and alertNotifications equal ignore case Off)] exists) and pricings[?any(properties.pricingTier equal ignore case Standard)] exists```,Azure Microsoft Defender for Cloud security alert email notifications is not set "```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.encryption.keySource equal ignore case ""Microsoft.Keyvault"" as X; config from cloud.resource where api.name = 'azure-key-vault-list' and json.rule = keys[?any(attributes.exp equals -1 and attributes.enabled contains true)] exists as Y; filter '$.Y.properties.vaultUri contains $.X.properties.encryption.keyvaultproperties.keyvaulturi'; show X;```",Azure Storage account encryption key is not rotated regularly ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_ss_finding_1 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and engine equals aurora-postgresql and engineVersion is member of ('10.11','10.12','10.13','11.6','11.7','11.8')```",AWS Aurora PostgreSQL exposed to local file read vulnerability ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kinesis-firehose-delivery-stream' AND json.rule = deliveryStreamEncryptionConfiguration exists and deliveryStreamEncryptionConfiguration.status equals DISABLED```,AWS Kinesis Firehose with Direct PUT as source has SSE encryption disabled "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-compute-instance' AND json.rule = lifecycleState equal ignore case running AND (platformConfig does not exist OR platformConfig equal ignore case ""null"" OR platformConfig.isSecureBootEnabled is false)```",OCI Compute Instance with Secure Boot disabled "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND resource.status = Active AND json.rule = tags[*].key none equal ""application"" AND tags[*].key none equal ""Application""```",pcsup-aws-policy ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function-v2' AND json.rule = state equals ACTIVE and serviceConfig.vpcConnector does not exist```,GCP Cloud Function not enabled with VPC connector for network egress "```config from cloud.resource where api.name = 'alibaba-cloud-ecs-instance' as X; config from cloud.resource where api.name = 'alibaba-cloud-ecs-security-group' as Y; filter ""$.X.publicIpAddress[*] is not empty and $.X.securityGroupIds[*] contains $.Y.securityGroupId and $.Y.permissions[?(@.policy=='Accept' && @.direction=='ingress')].sourceCidrIp contains 0.0.0.0/0""; show X;```",Alibaba Cloud ECS instance that has a public IP address and is attached to a security group with internet access ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,Chao Copy of Critical - AWS S3 Object Versioning is disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-credential-report' AND json.rule = 'user equals """" and ( _DateTime.ageInDays(access_key_1_last_used_date) < 14 or _DateTime.ageInDays(access_key_2_last_used_date) < 14 or _DateTime.ageInDays(password_last_used) < 14 )'```",AWS root account activity detected in last 14 days ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.virtualnetwork.createvcn and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletevcn and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatevcn) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for VCN changes "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = state.code equals active and type equals ""network"" and listeners[?any(protocol equals TLS and sslPolicy exists and sslPolicy does not contain ELBSecurityPolicy-TLS13-1-2-2021-06)] exists```",AWS Network Load Balancer (NLB) is not using the latest predefined security policy ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-load-balancer' AND json.rule = 'deleteProtection equals off'```,Alibaba Cloud SLB delete protection is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-loadbalancer' AND json.rule = lifecycleState equals ACTIVE and backendSets.* is not empty and backendSets.*.sslConfiguration.certificateName is empty```,OCI Load balancer backend set not configured with SSL certificate ```config from cloud.resource where api.name = 'aws-ec2-describe-network-acls' AND json.rule = associations[*] size less than 1```,AWS Network ACL is not in use ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-networks-list' AND json.rule = 'name equals default'```,GCP project is using the default network ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,BikramTest AWS S3 Object Versioning is disabled ```config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as X; config from cloud.resource where api.name = 'aws-bedrock-custom-model' as Y; filter ' $.Y.trainingDataConfig.bucketName equals $.X.bucketName'; show X;```,AWS S3 bucket is utilized for AWS Bedrock Custom model training data ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-emr-public-access-block' AND json.rule = blockPublicAccessConfiguration.blockPublicSecurityGroupRules is false```,AWS EMR Block public access setting disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-notebook-instance' AND json.rule = state equals ""ACTIVE"" and metadata.notebook-upgrade-schedule does not exist```",GCP Vertex AI Workbench user-managed notebook auto-upgrade is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = state equals ""RUNNABLE"" and deletionProtectionEnabled is false```",GCP SQL database instance deletion protection is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-appsync-graphql-api' AND json.rule = wafWebAclArn does not exist```,AWS AppSync not configured with AWS Web Application Firewall v2 (AWS WAFv2) ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING) and ($.X.securityConfiguration equals $.Y.name) and ($.Y.EncryptionConfiguration.EnableInTransitEncryption is false)' ; show X;```,AWS EMR cluster is not enabled with data encryption in transit ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind starts with app and properties.httpsOnly equals false'```,Azure App Service Web app doesn't redirect HTTP to HTTPS "```config from cloud.resource where api.name= 'aws-cloudtrail-describe-trails' AND json.rule = 'isMultiRegionTrail is true and includeGlobalServiceEvents is true' as X; config from cloud.resource where api.name= 'aws-cloudtrail-get-trail-status' AND json.rule = 'status.isLogging equals true' as Y; config from cloud.resource where api.name= 'aws-cloudtrail-get-event-selectors' AND json.rule = '(eventSelectors[*].readWriteType contains All and eventSelectors[*].includeManagementEvents equal ignore case true) or (advancedEventSelectors[*].fieldSelectors[*].equals contains ""Management"" and advancedEventSelectors[*].fieldSelectors[*].field does not contain ""readOnly"" and advancedEventSelectors[*].fieldSelectors[*].field does not contain ""eventSource"")' as Z; filter '($.X.trailARN equals $.Z.trailARN) and ($.X.name equals $.Y.trail)'; show X; count(X) less than 1```",AWS CloudTrail is not enabled with multi trail and not capturing all management events "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.diskEncryptionMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud disk encryption monitoring is set to disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='log_retention_days')].properties.value less than 4""```",Azure PostgreSQL database server log retention days is less than or equals to 3 days "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",Patch 21.11.1 - RLP-83104 - Copy of Critical of AWS S3 bucket publicly readable ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'nodeConfig.imageType does not exist or nodeConfig.imageType does not start with COS'```,GCP Kubernetes Engine Clusters not using Container-Optimized OS for Node image ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = releaseChannel.channel does not exist```,GCP Kubernetes Engine cluster not using Release Channel for version management ```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-sql-instances-list' and json.rule = 'settings.userLabels[*] does not exist'```,GCP SQL Instances without any Label information ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = 'networkRuleSet.bypass does not contain AzureServices'```,Azure Storage Account 'Trusted Microsoft Services' access not enabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-oss-bucket-info' AND json.rule = 'serverSideEncryptionConfiguration.applyServerSideEncryptionByDefault.ssealgorithm equals None'```,Alibaba Cloud OSS bucket server-side encryption is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-file-storage-file-system' AND json.rule = kmsKeyId is empty```,OCI File Storage File Systems are not encrypted with a Customer Managed Key (CMK) "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-object-storage-bucket' AND json.rule = (firewall does not exist or (firewall exists and _IPAddress.areAnyOutsideCIDRRange(firewall.allowed_ip,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8) is true))```",IBM Cloud Object Storage bucket is not restricted to Private IP ranges ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-gateway-waf-policy' AND json.rule = properties.policySettings.state equals Enabled and properties.managedRules.managedRuleSets is not empty and properties.managedRules.managedRuleSets[*].ruleGroupOverrides[*].rules[?any(ruleId equals 944240 and state equals Disabled)] exists and properties.applicationGateways[*] is not empty```,Azure Application Gateway Web application firewall (WAF) policy rule for Remote Command Execution is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-vpn-gateways-summary' AND json.rule = 'TotalVPNGateways greater than 3'```,AWS regions nearing VPC Private Gateway limit "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-secretsmanager-describe-secret' AND json.rule = 'lastRotatedDate exists and rotationEnabled is true and _DateTime.daysBetween($.lastRotatedDate,today()) > $.rotationRules.automaticallyAfterDays'```",AWS Secrets Manager secret configured with automatic rotation not rotated as scheduled "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-acl' AND json.rule = rules[?any( source equals ""0.0.0.0/0"" and direction equals ""inbound"" and action equals ""allow"" and ( (protocol equals ""tcp"" and (( destination_port_max greater than 3389 and destination_port_min less than 3389 ) or ( destination_port_max equals 3389 and destination_port_min equals 3389 ))) or protocol equals ""all"" ))] exists```",IBM Cloud VPC ACL allow ingress rule from 0.0.0.0/0 to RDP port ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,AWS S3 Object Versioning is disabled "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(5500,5500)""```",Alibaba Cloud Security group allow internet traffic to VNC Listener port (5500) ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and identity.type does not contain UserAssigned```,Azure Machine Learning workspace not configured with user-assigned managed identity "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-credential-report' AND json.rule = 'user equals """" and mfa_active is false and arn does not contain gov:'```",AWS MFA is not enabled on Root account "```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-compute-firewall-rules-list' AND json.rule= disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(IPProtocol equals ""all"")] exists```",GCP Firewall with Inbound rule overly permissive to All Traffic "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case ""Running"" AND kind contains ""functionapp"" AND kind does not contain ""workflowapp"" AND kind does not equal ""app"" AND properties.clientCertEnabled is false```",Azure Function App client certificate is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals StorageAccounts and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for Storage "```config from cloud.resource where api.name = 'azure-vm-list' AND json.rule = ['Extensions'].['Microsoft.PowerShell.DSC'].['settings'].['properties'].['hostPoolName'] exists and powerState contains running as X; config from cloud.resource where api.name = 'azure-disk-list' AND json.rule = provisioningState equal ignore case Succeeded and (encryption.type does not contain ""EncryptionAtRestWithCustomerKey"" or encryption.diskEncryptionSetId does not exist) as Y; filter ' $.X.id equal ignore case $.Y.managedBy '; show Y;```",Azure Virtual Desktop disk encryption not configured with Customer Managed Key (CMK) ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-block-storage-volume' AND json.rule = volume_attachments[*] size greater than 0 and volume_attachments[*].type equals data and encryption equal ignore case provider_managed```,IBM Cloud data disk is not encrypted with customer managed key "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' and json.rule = osType exists and managedBy exists and (encryptionSettings does not exist or encryptionSettings.enabled is false) and encryption.type is not member of (""EncryptionAtRestWithCustomerKey"",""EncryptionAtRestWithPlatformAndCustomerKeys"",""EncryptionAtRestWithPlatformKey"")```",Azure VM OS disk is not configured with any encryption "```config from cloud.resource where cloud.type = 'aws' AND cloud.account = 'jScheel AWS Account' AND api.name = 'aws-ec2-describe-instances' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = ipPermissions[?any( toPort equals 51820 and ipRanges[*] contains ""0/0"" )] exists as Y; config from cloud.resource where api.name = 'aws-ec2-describe-route-tables' AND json.rule = routes[?any( state equals active and gatewayId contains ""igw"" and destinationCidrBlock contains ""0/0"" )] exists as Z; filter ' $.X.securityGroups[*].groupId == $.Y.groupId and $.X.subnetId == $.Z.associations[*].subnetId'; show Z;```",jScheel Wireguard instance allows ANY toPort on 51820 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-describe-mount-targets' AND json.rule = 'fileSystemDescription.encrypted is false'```,AWS Elastic File System (EFS) with encryption for data at rest is disabled "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy buecs ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.identitycontrolplane.createuser and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.deleteuser and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updateuser and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updateusercapabilities and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updateuserstate) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for user changes "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-registry' AND json.rule = skuName contains ""Classic""```",Azure Container Registry using the deprecated classic registry ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or passwordReusePrevention equals null or passwordReusePrevention !isType Integer or passwordReusePrevention < 1'```,AWS IAM password policy allows password reuse "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-acl' AND json.rule = rules[?any( source equals ""0.0.0.0/0"" and direction equals ""inbound"" and action equals ""allow"" and ( (protocol equals ""tcp"" and (( destination_port_max greater than 22 and destination_port_min less than 22 ) or ( destination_port_max equals 22 and destination_port_min equals 22 ))) or protocol equals ""all"" ))] exists```",IBM Cloud VPC ACL allow ingress rule from 0.0.0.0/0 to SSH port "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-policy' AND json.rule = lifecycleState equals ACTIVE and (statements[*] contains ""to manage all-resources in tenancy"" or statements[*] contains ""to manage all-resources IN TENANCY"") and name does not contain ""Tenant Admin Policy""```",OCI IAM policy with full administrative privileges across the tenancy to non Administrator ```config from cloud.resource where cloud.type='azure' and api.name= 'azure-container-registry' as X; config from cloud.resource where api.name = 'azure-resource-group' as Y; filter ' $.X.resourceGroupName equals $.Y.name and $.Y.isDedicatedContainerRegistryGroup is false' ; show X;```,Azure Container Registry does not use a dedicated resource group ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and config.httpLoggingEnabled exists and config.httpLoggingEnabled is false```,Azure App service HTTP logging is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-defender-for-cloud-security-contact' AND json.rule = properties.alertNotifications.state does not equal ignore case ON and properties.alertNotifications.minimalSeverity equal ignore case High```,Azure 'Notify about alerts with the following severity' is Set to 'High' ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-disk' AND json.rule = 'encrypted is false'```,Alibaba Cloud disk encryption is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-virtual-machine-scale-set' AND json.rule = properties.virtualMachineProfile.diagnosticsProfile.bootDiagnostics.enabled is false```,Azure Virtual Machine scale sets Boot Diagnostics Disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = (sku.tier equals GeneralPurpose or sku.tier equals MemoryOptimized) and properties.userVisibleState equals Ready and properties.infrastructureEncryption equals Disabled```,Azure PostgreSQL database server Infrastructure double encryption is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = not (pricings[?any(properties.extensions[?any(name equal ignore case FileIntegrityMonitoring AND isEnabled is true)] exists AND properties.pricingTier equal ignore case Standard )] exists)```,Azure Microsoft Defender for Cloud set to Off for File Integrity Monitoring "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains AuthorizeSecurityGroupIngress and $.X.filterPattern contains AuthorizeSecurityGroupEgress and $.X.filterPattern contains RevokeSecurityGroupIngress and $.X.filterPattern contains RevokeSecurityGroupEgress and $.X.filterPattern contains CreateSecurityGroup and $.X.filterPattern contains DeleteSecurityGroup) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for AWS Security group changes ```config from cloud.resource where api.name = 'azure-frontdoor-waf-policy' AND json.rule = properties.policySettings.enabledState equals Enabled and properties.managedRules.managedRuleSets is not empty and properties.managedRules.managedRuleSets[*].ruleGroupOverrides[*].rules[?any(action equals Block and ruleId equals 944240 and enabledState equals Disabled)] exists as X; config from cloud.resource where api.name = 'azure-frontdoor' AND json.rule = properties.frontendEndpoints[*].properties.webApplicationFirewallPolicyLink exists and properties.provisioningState equals Succeeded as Y; filter '$.Y.properties.frontendEndpoints[*].properties.webApplicationFirewallPolicyLink.id contains $.X.name'; show X;```,Azure Front Door Web application firewall (WAF) policy rule for Remote Command Execution is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = Policy.Statement[?any(Effect equals Allow and (Principal.AWS does not equal * and Principal does not equal * and Principal.AWS contains arn and Principal.AWS does not contain $.Owner))] exists```,bobby Copy of AWS SNS topic with cross-account access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'properties.state equals Running and ((config.javaVersion exists and config.javaVersion does not equal 1.8 and config.javaVersion does not equal 11 and config.javaVersion does not equal 17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JAVA and (config.linuxFxVersion contains 8 or config.linuxFxVersion contains 11 or config.linuxFxVersion contains 17) and config.linuxFxVersion does not contain 8-jre8 and config.linuxFxVersion does not contain 11-java11 and config.linuxFxVersion does not contain 17-java17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JBOSSEAP and config.linuxFxVersion does not contain 7-java8 and config.linuxFxVersion does not contain 7-java11 and config.linuxFxVersion does not contain 7-java17) or (config.linuxFxVersion contains TOMCAT and config.linuxFxVersion does not end with 10.0-jre8 and config.linuxFxVersion does not end with 9.0-jre8 and config.linuxFxVersion does not end with 8.5-jre8 and config.linuxFxVersion does not end with 10.0-java11 and config.linuxFxVersion does not end with 9.0-java11 and config.linuxFxVersion does not end with 8.5-java11 and config.linuxFxVersion does not end with 10.0-java17 and config.linuxFxVersion does not end with 9.0-java17 and config.linuxFxVersion does not end with 8.5-java17))'```,Azure App Service Web app doesn't use latest Java version ```config from cloud.resource where api.name = 'azure-storage-account-list' as X; config from cloud.resource where api.name = 'azure-storage-account-blob-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.id contains $.Y.properties.storageAccountId)'; show X;```,Azure Storage logging is not Enabled for Blob Service for Read Write and Delete requests ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-disk' AND json.rule = status contains In_use and enableAutomatedSnapshotPolicy is false```,Alibaba Cloud disk automatic snapshot policy is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_multi_cloud_child_policies_ss_finding_1 ```config from cloud.resource where resource.status = Active AND api.name = 'oci-compute-instance' AND json.rule = lifecycleState exists```,Copy of OCI Hosts test - Ali "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function' AND json.rule = status equals ACTIVE and iamPolicy.bindings[?any(members[*] is member of (""allAuthenticatedUsers"",""allUsers""))] exists```",GCP Cloud Function is publicly accessible ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equal ignore case Arm and properties.pricingTier does not equal ignore case Standard)] exists```,Azure Microsoft Defender for Cloud set to Off for Resource Manager "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (destinationPortRange contains _Port.inRange(22,22) or destinationPortRanges[*] contains _Port.inRange(22,22) ))] exists```",Azure Network Security Group allows all traffic on SSH port 22 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = vulnerabilityAssessments[*].properties.storageContainerPath exists and vulnerabilityAssessments[*].properties.recurringScans.emails[*] is empty```,Azure SQL Server ADS Vulnerability Assessment 'Send scan reports to' is not configured "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy ojnou ```config from cloud.resource where api.name = 'aws-ecs-service' AND json.rule = launchType equals EC2 as X; config from cloud.resource where api.name = 'aws-ecs-cluster' AND json.rule = status equals ACTIVE and registeredContainerInstancesCount equals 0 as Y; filter '$.X.clusterArn equals $.Y.clusterArn'; show Y;```,AWS ECS cluster not configured with a registered instance "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy poumk ```config from cloud.resource where api.name = 'aws-ec2-ebs-encryption' AND json.rule = ebsEncryptionByDefault is false as X; config from cloud.resource where api.name = 'aws-region' AND json.rule = optInStatus does not equal not-opted-in as Y; filter '$.X.region equals $.Y.regionName'; show X;```,AWS EBS volume region with encryption is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-nic-list' AND json.rule = ['properties.virtualMachine'].id is not empty and ['properties.enableIPForwarding'] exists and ['properties.enableIPForwarding'] is true```,Azure Virtual machine NIC has IP forwarding enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-definition' AND json.rule = properties.type equals ""CustomRole"" and properties.assignableScopes[*] contains ""/"" and properties.permissions[*].actions[*] starts with ""*""```",Azure subscriptions with custom roles are overly permissive ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-action-trail' AND json.rule = 'status equals Disable and isLogging is false'```,Alibaba Cloud ActionTrail logging is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = externalIdentifier contains null and (email does not exist or emailVerified is false)```,OCI IAM local (non-federated) user account does not have a valid and current email address ```config from cloud.resource where cloud.type = 'gcp' AND api.name= 'gcloud-storage-buckets-list' AND json.rule = logging.logBucket equals $.name```,GCP storage bucket is logging to itself ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-nsg-list' AND json.rule = flowLogsSettings does not exist or flowLogsSettings.enabled is false```,Azure Network Watcher Network Security Group (NSG) flow logs are disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" AND shieldedInstanceConfig.enableIntegrityMonitoring is false```",GCP Vertex AI Workbench Instance has Integrity monitoring disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.supportsHttpsTrafficOnly !exists```,VenuTestPolicyRem ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-apigateway-method' AND json.rule = requestValidatorId does not exist ```,AWS API gateway request parameter is not validated ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = 'autoProvisioningSettings[*].name equals default and (autoProvisioningSettings[*].properties.autoProvision equals Off or autoProvisioningSettings[*] does not exist)'```,Azure Microsoft Defender for Cloud automatic provisioning of log Analytics agent for Azure VMs is set to Off "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.state'] equal ignore case ""Ready"" and (['sqlServer'].['properties.minimalTlsVersion'] equal ignore case ""None"" or ['sqlServer'].['properties.minimalTlsVersion'] equals ""1.0"" or ['sqlServer'].['properties.minimalTlsVersion'] equals ""1.1"")```",Azure SQL server using insecure TLS version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.enabled is false```,AWS KMS Customer Managed Key (CMK) is disabled ```config from cloud.resource where api.name = 'aws-iam-list-users' AND json.rule = createDate contains 2018```,Edited_pwdzvysgyp_ui_auto_policies_tests_name ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' as X; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Y; filter '($.Y.s3BucketName==$.X.bucketName) and ($.X.versioningConfiguration.mfaDeleteEnabled does not exist)'; show X;```,AWS CloudTrail S3 buckets have not enabled MFA Delete ```config from cloud.resource where api.name = 'azure-synapse-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded as X; config from cloud.resource where api.name = 'azure-synapse-workspace-managed-sql-server-vulnerability-assessments' AND json.rule = properties.recurringScans.isEnabled is false as Y; filter '$.X.name equals $.Y.workspaceName'; show X;```,Azure Synapse Workspace vulnerability assessment is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kusto-clusters' AND json.rule = properties.state equal ignore case Running and properties.enableDoubleEncryption is false```,Azure Data Explorer cluster double encryption is disabled "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = roles[*] contains ""roles/viewer"" or roles[*] contains ""roles/editor"" or roles[*] contains ""roles/owner"" as X; config from cloud.resource where api.name = 'gcloud-cloud-function-v2' as Y; filter '$.Y.serviceConfig.serviceAccountEmail equals $.X.user'; show Y;```",GCP Cloud Function is granted a basic role ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule= 'publicContainersList[*] contains insights-operational-logs and (totalPublicContainers > 0 and (properties.allowBlobPublicAccess is true or properties.allowBlobPublicAccess does not exist) and properties.publicNetworkAccess equal ignore case Enabled and networkRuleSet.virtualNetworkRules is empty and (properties.privateEndpointConnections is empty or properties.privateEndpointConnections does not exist))' as X; config from cloud.resource where api.name = 'azure-monitor-log-profiles-list' as Y; filter '$.X.id contains $.Y.properties.storageAccountId'; show X;```,Azure Storage account container storing activity logs is publicly accessible "```config from cloud.resource where api.name = 'aws-rds-describe-db-instances' and json.rule = storageEncrypted is true as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and keyMetadata.keyManager equals CUSTOMER and keyMetadata.origin equals AWS_KMS and (rotation_status.keyRotationEnabled is false or rotation_status.keyRotationEnabled equals ""null"") as Y; filter '($.X.kmsKeyId equals $.Y.key.keyArn)'; show X;```",AWS RDS database instance encrypted with Customer Managed Key (CMK) is not enabled for regular rotation "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(3306,3306)""```",Alibaba Cloud Security group allow internet traffic to MySQL port (3306) ```config from cloud.resource where cloud.type = 'aws' AND cloud.account = 'jScheel AWS Account' AND api.name = 'aws-route53-domain' AND json.rule = dnssecKeys[*] is empty```,jScheel AWS Route53 domain configured without DNSSEC "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instance-template' AND json.rule = properties.canIpForward is true and (name does not start with ""gke-"" or (name starts with ""gke-"" and properties.disks[*].initializeParams.labels does not exist) )```",GCP VM instance template with IP forwarding enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case ""Running"" AND kind contains ""functionapp"" AND kind does not contain ""workflowapp"" AND kind does not equal ""app"" AND config.http20Enabled is false```",Azure Function App doesn't use HTTP 2.0 ```config from cloud.resource where api.name = 'gcloud-compute-backend-bucket' as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as Y; filter ' not (Y.name intersects X.bucketName) '; show X;```,bobby gcp policy ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.policies.exportPolicy.status contains enabled or properties.publicNetworkAccess contains enabled)```,Azure Container Registry with exports enabled "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ($.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="") and ($.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="") and $.X.filter contains ""gce_route"" and ($.X.filter contains ""jsonPayload.event_subtype="" or $.X.filter contains ""jsonPayload.event_subtype ="") and ($.X.filter does not contain ""jsonPayload.event_subtype!="" and $.X.filter does not contain ""jsonPayload.event_subtype !="") and $.X.filter contains ""compute.routes.delete"" and $.X.filter contains ""compute.routes.insert""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for VPC network route changes "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ""acl.grants[?(@.grantee.typeIdentifier=='id')].grantee.identifier size > 0 and acl.grants[?(@.grantee.typeIdentifier=='id')].grantee.identifier does not contain c4c1ede66af53448b93c283ce9448c4ba468c9432aa01d700d3878632f77d2d0 and _AWSCloudAccount.isRedLockMonitored(acl.grants[?(@.grantee.typeIdentifier=='id')].grantee.identifier) is false""```",AWS S3 bucket accessible to unmonitored cloud accounts ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and sku.tier does not equal ignore case Basic and properties.publicNetworkAccess equal ignore case Enabled```,Azure PostgreSQL database server deny public network access setting is not set ```config from cloud.resource where api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = scheme equals internet-facing and type equals application as X; config from cloud.resource where api.name = 'aws-waf-v2-web-acl-resource' AND json.rule = (webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesAnonymousIpList or webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesKnownBadInputsRuleSet) and NOT ( webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesAnonymousIpList and webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesKnownBadInputsRuleSet ) as Y; filter '$.Y.resources.applicationLoadBalancer[*] contains $.X.loadBalancerArn'; show X;```,AWS ALB attached WAFv2 WebACL is not configured with AMR for Log4j Vulnerability ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.allowCrossTenantReplication exists and properties.allowCrossTenantReplication is true```,Azure 'Cross Tenant Replication' is enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = settings[?any( name equals WDATP and properties.enabled is false )] exists```,Azure Microsoft Defender for Cloud WDATP integration Disabled "```config from cloud.resource where api.name = 'aws-sqs-get-queue-attributes' AND json.rule = attributes.SqsManagedSseEnabled equals ""false"" and attributes.KmsMasterKeyId does not exist```",RomanTest - Ensure SQS service is encrypted at-rest "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultCacheBehavior.viewerProtocolPolicy contains ""allow-all"" or cacheBehaviors.items[?any( viewerProtocolPolicy contains ""allow-all"" )] exists```",AWS CloudFront viewer protocol policy is not configured with HTTPS "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-glue-connection' AND json.rule = ((connectionType equals KAFKA and connectionProperties.KAFKA_SSL_ENABLED is false) or (connectionType does not equal KAFKA and connectionProperties.JDBC_ENFORCE_SSL is false)) and connectionType does not equal ""NETWORK""```",AWS Glue connection do not have SSL configured "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-network-acls' AND json.rule = ""entries[?any(egress equals false and ((protocol equals 6 and ((portRange.to equals 22 or portRange.to equals 3389 or portRange.from equals 22 or portRange.from equals 3389) or (portRange.to > 22 and portRange.from < 22) or (portRange.to > 3389 and portRange.from < 3389))) or protocol equals -1) and (cidrBlock equals 0.0.0.0/0 or ipv6CidrBlock equals ::/0) and ruleAction equals allow)] exists""```",AWS Network ACLs allow ingress traffic on Admin ports 22/3389 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind starts with app and properties.state equal ignore case running and properties.publicNetworkAccess exists and properties.publicNetworkAccess equal ignore case Enabled and config.ipSecurityRestrictions[?any(action equals Allow and ipAddress equals Any)] exists'```,Azure App Service web apps with public network access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-monitor-log-profiles-list' AND json.rule = properties.logs[?any((enabled is true and category equals Administrative))] exists and properties.logs[?any((enabled is true and category equals Alert))] exists and properties.logs[?any((enabled is true and category equals Policy))] exists and properties.logs[?any((enabled is true and category equals Security))] exists as X; count(X) less than 1```,Azure Monitor Diagnostic Setting does not captures appropriate categories "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.scopes[*] does not contain resourceGroups and properties.enabled equals true and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Authorization/policyAssignments/delete"" as X; count(X) less than 1```",Azure Activity log alert for delete policy assignment does not exist ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.sslEnforcement equals Enabled and properties.minimalTlsVersion does not equal TLS1_2```,Azure MySQL Database Server using insecure TLS version ```config from cloud.resource where api.name = 'aws-describe-mount-targets' AND json.rule = fileSystemDescription.encrypted is true as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager does not equal CUSTOMER or (keyMetadata.keyManager equals CUSTOMER and keyMetadata.keyState equals Disabled) as Y; filter '$.X.fileSystemDescription.kmsKeyId equals $.Y.key.keyArn'; show X;```,AWS Elastic File System (EFS) not encrypted using Customer Managed Key "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-object-storage-bucket' AND json.rule = metrics_monitoring does not exist or metrics_monitoring.request_metrics_enabled does not equal ignore case ""true"" or metrics_monitoring.usage_metrics_enabled does not equal ignore case ""true""```",IBM Cloud Object Storage bucket is not enabled with IBM Cloud Monitoring ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-db-list' AND json.rule = 'securityAlertPolicy does not exist or securityAlertPolicy[*] is empty or (securityAlertPolicy.properties.state equals Enabled and securityAlertPolicy.properties.emailAccountAdmins equals Disabled)'```,Azure SQL Databases with disabled Email service and co-administrators for Threat Detection "```config from cloud.resource where api.name = 'aws-docdb-db-cluster-parameter-group' AND json.rule = parameters.tls.ParameterValue equals ""disabled"" as X; config from cloud.resource where api.name = 'aws-docdb-db-cluster' AND json.rule = Status equals available as Y; filter '$.X.DBClusterParameterGroupName equals $.Y.DBClusterParameterGroup'; show Y;```",AWS DocumentDB Cluster is not enabled with data encryption in transit ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-waf-v2-rule-group' AND json.rule = VisibilityConfig.CloudWatchMetricsEnabled is false or Rules[?any( VisibilityConfig.CloudWatchMetricsEnabled is false)] exists```,AWS WAF Rule Group CloudWatch metrics disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-vpn-connections-summary' AND json.rule = 'vpnConnectionsSummary[*].vpnConnectionsCount greater than 7'```,AWS regions nearing VPC Private Gateway IPSec Limit "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-iam-identity-account-setting' AND json.rule = restrict_create_service_id does not equal ""RESTRICTED"" ```",IBM Cloud Service ID creation is not restricted in account settings ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.addonProfiles.omsagent.config does not exist or properties.addonProfiles.omsagent.enabled is false```,Azure AKS cluster monitoring not enabled ```config from cloud.resource where cloud.type = 'AWS' and api.name = 'aws-ec2-describe-subnets' AND json.rule = 'mapPublicIpOnLaunch is true'```,AWS VPC subnets should not allow automatic public IP assignment ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = 'logging.enabled is false and logging.bucket is empty'```,AWS CloudFront distribution with access logging disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='log_disconnections')].properties.value equals OFF or configurations.value[?(@.name=='log_disconnections')].properties.value equals off""```",Azure PostgreSQL database server with log disconnections parameter disabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'passwordReusePrevention !isType Integer or passwordReusePrevention == 0'```,Alibaba Cloud RAM password history check policy is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = config.remoteDebuggingEnabled is true```,mosh-stam2 ```config from cloud.resource where api.name = 'aws-secretsmanager-describe-secret' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager does not equal CUSTOMER or (keyMetadata.keyManager equals CUSTOMER and keyMetadata.keyState equals Disabled) as Y; filter '($.X.kmsKeyId does not exist ) or ($.X.kmsKeyId exists and $.X.kmsKeyId equals $.Y.keyMetadata.arn)'; show X;```,AWS Secrets Manager secret not encrypted by Customer Managed Key (CMK) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dynamodb-describe-table' AND json.rule = tableStatus equal ignore case ACTIVE AND continuousBackupsDescription.pointInTimeRecoveryDescription.pointInTimeRecoveryStatus does not equal ENABLED```,AWS DynamoDB table point-in-time recovery (PITR) disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Udp or protocol equals *) and (destinationPortRange contains _Port.inRange(445,445) or destinationPortRanges[*] contains _Port.inRange(445,445) ))] exists```",Azure Network Security Group allows all traffic on CIFS (UDP Port 445) ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.encryption.status does not exist or properties.encryption.status equal ignore case disabled)```,Azure Machine Learning workspace not encrypted with Customer Managed Key (CMK) ```config from cloud.resource where api.name = 'aws-ec2-describe-flow-logs' as X; config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' AND json.rule = shared is false as Y; filter 'not($.X.resourceId equals $.Y.vpcId)' ; show Y;```,AWS VPC Flow Logs not enabled "```config from cloud.resource where api.name = 'gcloud-kms-crypto-keys-list' AND json.rule = primary.state equals ""ENABLED"" and (rotationPeriod does not exist or rotationPeriod greater than 7776000) as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as Y; filter ' $.X.name equals $.Y.encryption.defaultKmsKeyName'; show Y;```",GCP Storage bucket CMEK not rotated every 90 days ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals AppServices and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for App Service "```config from cloud.resource where api.name = 'gcloud-vertex-ai-notebook-instance' AND json.rule = state equals ""ACTIVE"" and serviceAccount contains ""compute@developer.gserviceaccount.com"" as X; config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as Y; filter ' $.X.serviceAccount equals $.Y.user'; show X;```",GCP Vertex AI Workbench user-managed notebook is using default service account with the editor role ```config from cloud.resource where cloud.type = 'azure' AND cloud.service = 'Azure Network Watcher' AND api.name = 'azure-network-watcher-list' AND json.rule = ' provisioningState !exists or provisioningState != Succeeded'```,Azure Network Watcher is not enabled ```config from cloud.resource where cloud.type = 'azure' AND cloud.account = 'Azure_Redlock_QA_BVT_25FE' AND api.name = 'azure-disk-list' AND json.rule = id exists ```,dnd-azure-disk-flip-flop-policy "```config from cloud.resource where api.name = 'oci-networking-loadbalancer' and json.rule = lifecycleState equal ignore case ""ACTIVE"" as X; config from cloud.resource where api.name = 'oci-networking-subnet' and json.rule = lifecycleState equal ignore case ""AVAILABLE"" as Y; config from cloud.resource where api.name = 'oci-networking-security-list' AND json.rule = lifecycleState equal ignore case AVAILABLE as Z; filter 'not ($.X.listeners does not equal ""{}"" and ($.X.subnetIds contains $.Y.id and $.Y.securityListIds contains $.Z.id and $.Z.ingressSecurityRules is not empty))'; show X;```",OCI Load Balancer not configured with inbound rules or listeners ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-mysql-deployment-info' AND json.rule = allowedListIPAddresses[*] size equals 0 or allowedListIPAddresses[?any( address equals 0.0.0.0/0 )] exists```,IBM Cloud MySQL Database network access is not restricted to a specific IP range ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-autoscaling-launch-configuration' AND json.rule = blockDeviceMappings[*].ebs exists AND blockDeviceMappings[?any(ebs.encrypted is false)] exists```,AWS EC2 Auto Scaling Launch Configuration is not using encrypted EBS volumes "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-secretsmanager-describe-secret' AND json.rule = rotationEnabled is false and owningService is not member of (appflow, databrew, datasync, directconnect, events, opsworks-cm, rds, sqlworkbench)```",AWS Secret Manager Automatic Key Rotation is not enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = not (pricings[?any(properties.extensions[?any(name equal ignore case ContainerRegistriesVulnerabilityAssessments AND isEnabled is true)] exists AND properties.pricingTier equal ignore case Standard )] exists)```,Azure Microsoft Defender for Cloud set to Off for Agentless container vulnerability assessment ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-admin-consent-request-policy' AND json.rule = ['@odata.context'] exists```,pcsup-26179-policy "```config from cloud.resource where api.name = 'aws-msk-cluster' AND json.rule = state equal ignore case active and enhancedMonitoring is member of (DEFAULT, PER_BROKER)```",AWS MSK clusters not configured with enhanced monitoring "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-definition' AND json.rule = properties.permissions[*].actions any start with ""*"" and properties.permissions[*].actions any end with ""*"" and properties.type equal ignore case ""CustomRole"" and properties.assignableScopes starts with ""/subscriptions"" and properties.assignableScopes does not contain ""resourceGroups""```",Azure Custom subscription administrator roles found "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = isNodeVersionSupported exists AND isNodeVersionSupported does not equal ""true""```",GCP GKE unsupported node version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-waf-classic-web-acl-resource' AND json.rule = '(resources.applicationLoadBalancer[*] exists or resources.apiGateway[*] exists or resources.other[*] exists) and loggingConfiguration.resourceArn does not exist'```,AWS Web Application Firewall (AWS WAF) Classic logging is disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = networkConfig.datapathProvider does not equal ADVANCED_DATAPATH and (addonsConfig.networkPolicyConfig.disabled is true or networkPolicy.enabled does not exist or networkPolicy.enabled is false )```,GCP Kubernetes Engine Clusters have Network policy disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = (properties.supportsHttpsTrafficOnly does not exist or properties.supportsHttpsTrafficOnly is false) as X; config from cloud.resource where api.name = 'azure-storage-file-shares' as Y; filter '($.X.kind does not equal ignore case ""FileStorage"") or ($.X.kind equal ignore case ""FileStorage"" and $.Y.id contains $.X.name and $.Y.properties.enabledProtocols does not contain NFS)'; show X;```",Azure Storage Account without Secure transfer enabled "```config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND resource.status = Active AND json.rule = tags[*].key none equal ""application"" AND tags[*].key none equal ""Application""```",pcsup-gcp-policy "```config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' AND json.rule = _AWSCloudAccount.orgHierarchyNames() intersects (""all-accounts"") as X; config from cloud.resource where api.name = 'aws-ec2-describe-subnets' AND json.rule = _AWSCloudAccount.orgHierarchyNames() intersects (""all-accounts"") as Y; filter '$.X.vpcId equals $.Y.vpcId'; show Y;```",jashah_ms_join_pol ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'maxLoginAttemps !isType Integer or maxLoginAttemps == 0'```,Alibaba Cloud RAM password retry constraint policy is disabled "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-loadbalancer' AND json.rule = profile.family equal ignore case ""application"" and operating_status equal ignore case ""online"" and is_public is true```",IBM Cloud Application Load Balancer for VPC has public access enabled ```config from cloud.resource where api.name = 'azure-storage-account-list' as X; config from cloud.resource where api.name = 'azure-app-service-web-apps-configurations' as Y; config from cloud.resource where api.name = 'azure-app-service' AND json.rule = 'kind contains functionapp and kind does not contain workflowapp and kind does not equal app and properties.state equal ignore case running and ((properties.publicNetworkAccess exists and properties.publicNetworkAccess equal ignore case Enabled) or (properties.publicNetworkAccess does not exist)) and config.ipSecurityRestrictions[?any((action equals Allow and ipAddress equals Any) or (action equals Allow and ipAddress equals 0.0.0.0/0))] exists' as Z; filter ' $.Y.properties.azureStorageAccounts contains $.X.name and $.Z.name equal ignore case $.Y.name' ; show Z;```,Azure Function App with public access linked to Blob Storage ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and kind contains workflowapp and properties.httpsOnly is false```,Azure Logic app does not redirect HTTP requests to HTTPS ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-iam-get-audit-config' AND json.rule = 'auditConfigs[*].service does not contain allServices or (auditConfigs[*].auditLogConfigs[*].exemptedMembers exists and auditConfigs[*].auditLogConfigs[*].exemptedMembers is not empty)'```,GCP Project audit logging is not configured properly across all services and all users in a project ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-key-protect-key' AND json.rule = dualAuthDelete does not exist or dualAuthDelete.enabled is false```,IBM Cloud Key Protect Key dual authorization for deletion is not enabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-group' as X; config from cloud.resource where api.name = 'oci-iam-user' as Y; filter '($.X.name equals Administrators) and ($.X.groupMembers[*].userId contains $.Y.id) and ($.Y.apiKeys[*] size greater than 0)';show Y;```,OCI tenancy administrator users are associated with API keys ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,DemoAggPolicy - AWS S3 Object Versioning is disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-redis-instances-list' AND json.rule = state equal ignore case ready and transitEncryptionMode does not equal ignore case SERVER_AUTHENTICATION```,GCP Memorystore for Redis instance does not use in transit encryption ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.encryption.requireInfrastructureEncryption does not exist or properties.encryption.requireInfrastructureEncryption is false)```,Azure storage account infrastructure encryption is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-security-list' AND json.rule = ingressSecurityRules[?any( isStateless is false )] exists```,OCI VCN Security list has stateful security rules "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(139,139) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on NetBIOS-SSN port (139) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-event-subscriptions' AND json.rule = 'sourceType equals db-security-group and ((status does not equal active or enabled is false) or (status equals active and enabled is true and (sourceIdsList is not empty or eventCategoriesList is not empty)))'```,AWS RDS event subscription disabled for DB security groups "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-regional-forwarding-rule' AND json.rule = target contains ""/targetHttpProxies/"" and loadBalancingScheme contains ""EXTERNAL""```",GCP public-facing (external) regional load balancer using HTTP protocol ```config from cloud.resource where api.name = 'aws-waf-v2-web-acl-resource' AND json.rule = resources.applicationLoadBalancer[*] exists as X; config from cloud.resource where api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = scheme equals internet-facing and type equals application as Y; filter 'not($.X.resources.applicationLoadBalancer[*] contains $.Y.loadBalancerArn)'; show Y;```,AWS Application Load Balancer (ALB) not configured with AWS Web Application Firewall v2 (AWS WAFv2) "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(5432,5432) or destinationPortRanges[*] contains _Port.inRange(5432,5432) ))] exists```",Azure Network Security Group allows all traffic on PostgreSQL (TCP Port 5432) "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = status equals RUNNING and canIpForward is true and name does not start with ""gke-""```",GCP VM instances have IP Forwarding enabled "```config from cloud.resource where api.name = 'gcloud-logging-sinks-list' AND json.rule = ""filter exists"" as X; count(X) less than 1```",GCP Log Entries without sinks configured ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'requireNumbers does not exist or requireNumbers is false'```,Alibaba Cloud RAM password policy does not have a number ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.privateEndpointConnections[*] does not exist or properties.privateEndpointConnections[*] is empty or (properties.privateEndpointConnections[*] exists and properties.privateEndpointConnections[*].properties.privateLinkServiceConnectionState.status does not equal ignore case Approved))```,Azure Machine learning workspace is not configured with private endpoint "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-data-factory-v2' AND json.rule = properties.provisioningState equal ignore case Succeeded and identity does not exist or identity.type equal ignore case ""None""```",Azure Data Factory (V2) is not configured with managed identity ```config from cloud.resource where api.name = 'aws-iam-list-users' AND json.rule = createDate contains 2018```,gfssrguptn_ui_auto_policies_tests_name "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-s3api-get-bucket-acl' AND json.rule = (sseAlgorithm contains ""aws:kms"" or sseAlgorithm contains ""aws:kms:dsse"") and kmsMasterKeyID exists as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager equal ignore case CUSTOMER and keyMetadata.keyState contains PendingDeletion as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '$.X.kmsMasterKeyID contains $.Y.key.keyArn and $.Z.s3BucketName equals $.X.bucketName'; show X;```",AWS CloudTrail S3 bucket encrypted with Customer Managed Key (CMK) that is scheduled for deletion "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = (origins.items[*] contains ""customOriginConfig"") and (origins.items[?(@.customOriginConfig.originSslProtocols.items)] contains ""SSLv3"")```",AWS CloudFront distribution is using insecure SSL protocols for HTTPS communication "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",Critical of AWS S3 bucket publicly readable ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-batch-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.networkProfile.accountAccess.defaultAction equal ignore case Allow and properties.publicNetworkAccess equal ignore case Enabled```,Azure Batch Account configured with overly permissive network access ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-loadbalancer' AND json.rule = listeners[?any( protocol does not equal ignore case https AND https_redirect does not exist )] exists```,IBM Cloud Application Load Balancer for VPC not configured with HTTPS Listeners ```config from cloud.resource where api.name = 'alibaba-cloud-rds-instance' as X; config from cloud.resource where api.name = 'alibaba-cloud-vpc' as Y; filter '$.X.vpcId equals $.Y.vpcId and $.Y.isDefault is true'; show X;```,Alibaba Cloud ApsaraDB RDS instance is using the default VPC "```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.encryption.keySource does not equal ignore case ""Microsoft.Keyvault"" as X; config from cloud.resource where api.name = 'azure-log-analytics-linked-storage-accounts' AND json.rule = properties.dataSourceType equal ignore case Query as Y; filter '$.X.id contains $.Y.properties.storageAccountIds'; show X;```",Azure Log analytics linked storage account is not configured with CMK encryption ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cdn-endpoint' AND json.rule = properties.customDomains[?any( properties.customHttpsProvisioningState equals Enabled and properties.customHttpsParameters.minimumTlsVersion equals TLS10 )] exists```,Azure CDN Endpoint Custom domains using insecure TLS version ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = config.ftpsState equals AllAllowed```,Azure App Services FTP deployment is All allowed ```config from cloud.resource where cloud.type = 'gcp' AND api.name= 'gcloud-storage-buckets-list' AND json.rule = '($.logging does not exist or $.logging equals null) and ($.acl[*].email exists and $.acl[*].email contains logging)'```,GCP Bucket containing Operations Suite Logs have bucket logging disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dms-replication-instance' AND json.rule = replicationInstanceStatus equals ""available"" and autoMinorVersionUpgrade is false```",AWS DMS replication instance automatic version upgrade disabled "```config from cloud.resource where api.name = 'aws-networkfirewall-firewall' AND json.rule = FirewallStatus.Status equals ""READY"" as X; config from cloud.resource where api.name = 'aws-network-firewall-logging-configuration' AND json.rule = LoggingConfiguration.LogDestinationConfigs[*].LogType does not exist as Y; filter '$.X.Firewall.FirewallArn equal ignore case $.Y.FirewallArn' ; show X;```",AWS Network Firewall is not configured with logging configuration ```config from cloud.resource where api.name = 'aws-dynamodb-describe-table' AND json.rule = tableStatus equal ignore case ACTIVE and deletionProtectionEnabled is false```,AWS DynamoDB table deletion protection is disabled ```config from cloud.resource where api.name = 'aws-ec2-describe-network-interfaces' AND json.rule = association.allocationId exists```,amtest-eni ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = 'networkRuleSet.defaultAction equals Allow'```,Azure Storage Account default network access is set to 'Allow' ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecr-get-repository-policy' AND json.rule = imageTagMutability equal ignore case mutable```,AWS ECR private repository tag mutable ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = nodePools[?any(management.autoRepair does not exist or management.autoRepair is false)] exists```,GCP Kubernetes cluster node auto-repair configuration disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' as X; config from cloud.resource where api.name = 'azure-active-directory-user' as Y; filter '((_DateTime.ageInDays($.X.properties.updatedOn) < 80) and (($.X.properties.principalId contains $.Y.id)))'; show X; addcolumn properties.roleDefinition.properties.roleName```,llatorre - RoleAssignment v1 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dms-endpoint' AND json.rule = status equals active and (endpointType equals SOURCE and sslMode equals none and engineName is not member of (""s3"", ""azuredb"")) or (endpointType equals TARGET and sslMode equals none and engineName is not member of (""dynamodb"", ""kinesis"", ""neptune"", ""redshift"", ""s3"", ""elasticsearch"", ""kafka""))```",AWS Database Migration Service endpoint do not have SSL configured "```config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = _AWSCloudAccount.orgHierarchyNames() intersects (""all-accounts"")```",jashah_ms_config "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = status equal ignore case ""RUNNING"" and (machineType contains ""machineTypes/n2d-"" or machineType contains ""machineTypes/c2d-"" or machineType contains ""machineTypes/c3d-"" or machineType contains ""machineTypes/c3-standard-"")and (disks[*].guestOsFeatures[*].type contains ""SEV_CAPABLE"" or disks[*].guestOsFeatures[*].type contains ""SEV_LIVE_MIGRATABLE_V2"" or disks[*].guestOsFeatures[*].type contains ""SEV_SNP_CAPABLE"" or disks[*].guestOsFeatures[*].type contains ""TDX_CAPABLE"") and (confidentialInstanceConfig.enableConfidentialCompute does not exist or confidentialInstanceConfig.enableConfidentialCompute is false)```",GCP VM instance Confidential VM service disabled "```config from cloud.resource where api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = state.code contains active and listeners[?any( protocol is member of (HTTP,TCP,UDP,TCP_UDP) and defaultActions[?any( redirectConfig.protocol contains HTTPS)] does not exist )] exists as X; config from cloud.resource where api.name = 'aws-elbv2-target-group' AND json.rule = targetType does not equal alb and protocol exists and protocol is not member of ('TLS', 'HTTPS') as Y; filter '$.X.listeners[?any( protocol equals HTTP or protocol equals UDP or protocol equals TCP_UDP )] exists or ( $.X.listeners[*].protocol equals TCP and $.X.listeners[*].defaultActions[*].targetGroupArn contains $.Y.targetGroupArn)'; show X;```",AWS Elastic Load Balancer v2 (ELBv2) with listener TLS/SSL is not configured ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-containers-artifacts-kubernetes-cluster' AND json.rule = lifecycleState equal ignore case ACTIVE and options.admissionControllerOptions.isPodSecurityPolicyEnabled is false```,OCI Kubernetes Engine Cluster pod security policy not enforced ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and (Action contains iam:CreatePolicyVersion or Action contains iam:SetDefaultPolicyVersion or Action contains iam:PassRole or Action contains iam:CreateAccessKey or Action contains iam:CreateLoginProfile or Action contains iam:UpdateLoginProfile or Action contains iam:AttachUserPolicy or Action contains iam:AttachGroupPolicy or Action contains iam:AttachRolePolicy or Action contains iam:PutUserPolicy or Action contains iam:PutGroupPolicy or Action contains iam:PutRolePolicy or Action contains iam:AddUserToGroup or Action contains iam:UpdateAssumeRolePolicy or Action contains iam:*))] exists```,AWS IAM Policy permission may cause privilege escalation "```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-compute-firewall-rules-list' AND json.rule= disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(80,80) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on HTTP port (80) "```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-sql-instances-list' and json.rule = ""(settings.ipConfiguration.sslMode equal ignore case TRUSTED_CLIENT_CERTIFICATE_REQUIRED and _DateTime.ageInDays(serverCaCert.expirationTime) > -1) or settings.ipConfiguration.sslMode equal ignore case ALLOW_UNENCRYPTED_AND_ENCRYPTED""```",GCP SQL Instances do not have valid SSL configuration ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.identitycontrolplane.creategroup and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.deletegroup and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updategroup) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for IAM group changes ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-postgresql-deployment-info' AND json.rule = deployment.enable_public_endpoints is true```,IBM Cloud Database PostgreSQL is exposed to public "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-services-list' AND json.rule = services[?any( name ends with ""/cloudasset.googleapis.com"" and state equals ""ENABLED"" )] does not exist```",GCP Cloud Asset Inventory is disabled ```config from cloud.resource where api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.policies.azureADAuthenticationAsArmPolicy.status contains enabled```,Azure Container Registry with ARM audience token authentication enabled "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress')].sourceCidrIp contains 0.0.0.0/0""```",Alibaba Cloud Security group is overly permissive to all traffic ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-cloudtrail-describe-trails' as X; count(X) less than 1 ```,test_aggr_pk ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-flexible-server' AND json.rule = properties.state equal ignore case Ready and require_secure_transport.value does not equal ignore case on```,Azure PostgreSQL flexible server secure transport parameter is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = 'properties.powerState.code equal ignore case Running and properties.agentPoolProfiles[?any(type equal ignore case AvailabilitySet and count less than 3)] exists'```,Azure AKS cluster pool profile count contains less than 3 nodes "```config from cloud.resource where cloud.service = 'AWS Auto Scaling' AND api.name = 'aws-describe-auto-scaling-groups' AND json.rule = createdTime does not contain ""foo""```",Automation Audit Log Cron BUVZK Policy ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-loadbalancer' AND json.rule = lifecycleState equals ACTIVE and listeners.* is not empty and listeners.*.sslConfiguration.certificateName is empty and listeners.*.protocol does not equal ignore case HTTP```,OCI Load balancer listener is not configured with SSL certificate ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cognitive-services-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and (identity.type does not exist or identity.type equal ignore case None)```,Azure Cognitive Services account is not configured with managed identity ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-compute-instance' AND json.rule = launchOptions.isPvEncryptionInTransitEnabled is false```,OCI Compute Instance boot volume has in-transit data encryption is disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' AND json.rule = '((_DateTime.ageInDays($.properties.updatedOn) < 60) and (properties.principalType contains User) and (properties.scope starts with""/subscriptions""))' addcolumn properties.roleDefinition.properties.roleName properties.roleDefinition.properties.type properties.principalId properties.updatedBy```",llatorre - RoleAssigment v4 ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or minimumPasswordLength < 16 or minimumPasswordLength does not exist'```,AWS IAM password policy does not have a minimum of 16 characters ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = nodePools[?any(config.shieldedInstanceConfig.enableSecureBoot does not exist or config.shieldedInstanceConfig.enableSecureBoot is false)] exists```,GCP Kubernetes cluster shielded GKE node with Secure Boot disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = iamConfiguration.publicAccessPrevention does not equal ignore case ""enforced"" and iam.bindings[*] size greater than 0 and iam.bindings[*].members[*] any equal allUsers```",GCP Storage buckets are publicly accessible to all users "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-iam-identity-account-setting' AND json.rule = restrict_create_platform_apikey does not equal ""RESTRICTED""```",IBM Cloud API key creation is not restricted in account settings ```config from cloud.resource where api.name = 'gcloud-iam-service-accounts-keys-list' as X; config from cloud.resource where api.name = 'gcloud-iam-service-accounts-list' as Y; filter '($.X.name does not contain prisma-cloud and $.X.name contains iam.gserviceaccount.com and $.X.name contains $.Y.email and $.X.keyType contains USER_MANAGED)' ; show X;```,GCP User managed service accounts have user managed service account keys ```config from cloud.resource where api.name = 'aws-elasticache-cache-clusters' as X; config from cloud.resource where api.name = 'aws-elasticache-describe-replication-groups' as Y; filter '$.Y.memberClusters contains $.X.cacheClusterId and $.X.cacheClusterStatus equals available and ($.X.cacheSubnetGroupName is empty or $.X.cacheSubnetGroupName does not exist)'; show Y;```,AWS ElastiCache cluster not associated with VPC ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = (properties.publicNetworkAccess does not equal ignore case disabled and properties.networkAcls does not exist) or (properties.publicNetworkAccess does not equal ignore case disabled and properties.networkAcls.defaultAction equal ignore case allow ) ```,Azure Key Vault Firewall is not enabled "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as X; config from cloud.resource where api.name = 'gcloud-cloud-run-revisions-list' AND json.rule = spec.serviceAccountName contains ""compute@developer.gserviceaccount.com"" as Y; filter ' $.X.user equals $.Y.spec.serviceAccountName '; show Y;```",GCP Cloud Run service revision is using default service account with editor role "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '($.Y.conditions[*].metricThresholdFilter contains $.X.name) and ($.X.filter contains ""protoPayload.serviceName="" or $.X.filter contains ""protoPayload.serviceName ="") and ($.X.filter does not contain ""protoPayload.serviceName !="" and $.X.filter does not contain ""protoPayload.serviceName!="") and $.X.filter contains ""cloudresourcemanager.googleapis.com"" and ($.X.filter contains ""ProjectOwnership OR projectOwnerInvitee"" or $.X.filter contains ""ProjectOwnership or projectOwnerInvitee"") and ($.X.filter contains ""protoPayload.serviceData.policyDelta.bindingDeltas.action="" or $.X.filter contains ""protoPayload.serviceData.policyDelta.bindingDeltas.action ="") and ($.X.filter does not contain ""protoPayload.serviceData.policyDelta.bindingDeltas.action!="" and $.X.filter does not contain ""protoPayload.serviceData.policyDelta.bindingDeltas.action !="") and ($.X.filter contains ""protoPayload.serviceData.policyDelta.bindingDeltas.role="" or $.X.filter contains ""protoPayload.serviceData.policyDelta.bindingDeltas.role ="") and ($.X.filter does not contain ""protoPayload.serviceData.policyDelta.bindingDeltas.role!="" and $.X.filter does not contain ""protoPayload.serviceData.policyDelta.bindingDeltas.role !="") and $.X.filter contains ""REMOVE"" and $.X.filter contains ""ADD"" and $.X.filter contains ""roles/owner""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for Project Ownership assignments/changes "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ""(((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and publicAccessBlockConfiguration.ignorePublicAcls is false) or (policyStatus.isPublic is true and publicAccessBlockConfiguration.restrictPublicBuckets is false)) and websiteConfiguration does not exist) and ((policy.Statement[*].Condition.Bool.aws:SecureTransport does not exist) or ((policy.Statement[?(@.Principal=='*' || @.Principal.AWS=='*')].Action contains s3: or policy.Statement[?(@.Principal=='*' || @.Principal.AWS=='*')].Action[*] contains s3:) and (policy.Statement[?(@.Principal=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains false or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains false or policy.Statement[?(@.Principal=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains FALSE or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains FALSE or policy.Statement[?(@.Principal=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains true or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains true or policy.Statement[?(@.Principal=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains TRUE or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains TRUE)))""```",pkodoth - AWS S3 bucket not configured with secure data transport policy "```config from cloud.resource where api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" and gceSetup.serviceAccounts[*].email contains ""compute@developer.gserviceaccount.com"" as X; config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as Y; filter ' $.X.gceSetup.serviceAccounts[*].email equals $.Y.user'; show X;```",GCP Vertex AI Workbench Instance is using default service account with the editor role ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.networkProfile.networkPlugin does not contain azure```,Azure AKS cluster Azure CNI networking not enabled ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-key-protect-key' AND json.rule = 'extractable is false and state equals 1 and ((lastRotateDate does not exist and _DateTime.ageInDays(creationDate) > 90 ) or _DateTime.ageInDays(lastRotateDate) > 90)'```,IBM Cloud Key Protect root key have aged more than 90 days without being rotated ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = '(acl[*].email exists and acl[*].email contains logging) and (versioning.enabled is false or versioning does not exist)'```,GCP Storage log buckets have object versioning disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-cache-clusters' AND json.rule = engine equals redis and transitEncryptionEnabled is false and replicationGroupId does not exist```,AWS ElastiCache Redis with in-transit encryption disabled (Non-replication group) ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-iam-service-accounts-keys-list' AND json.rule = 'name contains iam.gserviceaccount.com and (_DateTime.ageInDays($.validAfterTime) > -1) and keyType equals USER_MANAGED'```,bboiko test 02 - policy "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-flexible-server' AND json.rule = properties.state equal ignore case ""Ready"" and require_secure_transport.value equal ignore case ""OFF""```",Azure MySQL database flexible server SSL enforcement is disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = settings.ipConfiguration.authorizedNetworks[?any(value contains 0.0.0.0/0 or value contains ::/0)] exists```,GCP SQL instance configured with overly permissive authorized networks ```config from cloud.resource where api.name = 'aws-securityhub-hub' AND json.rule = SubscribedAt exists```,test ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = versioning.enabled is false or versioning does not exist```,GCP Storage bucket with object versioning disabled ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-cloudtrail-describe-trails' AND json.rule='logFileValidationEnabled is false'```,AWS CloudTrail log validation is not enabled in all regions "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = '(status equals RUNNING and name does not start with ""gke-"") and shieldedInstanceConfig exists and (shieldedInstanceConfig.enableVtpm is false or shieldedInstanceConfig.enableIntegrityMonitoring is false)'```",GCP VM instance with Shielded VM features disabled "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""databases-for-mysql"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resourceGroupId"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Databases for MySQL service ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-functions-applications' AND json.rule = lifecycleState equal ignore case ACTIVE and (networkSecurityGroupIds does not exist or networkSecurityGroupIds[*] is empty)```,OCI Function Application is not configured with Network Security Groups "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-security-list' AND json.rule = (displayName contains ""Default Security List for"") and (ingressSecurityRules[?any((source equals 0.0.0.0/0) and (((*.destinationPortRange.min == 22 or *.destinationPortRange.max == 22) or (*.destinationPortRange.min < 22 and *.destinationPortRange.max > 22)) or (protocol equals ""all"") or ((tcpOptions does not exist) and (udpOptions does not exist) and (protocol does not equal 1))))] exists)```",OCI Default Security List of every VCN allows all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-loadbalancer' AND json.rule = lifecycleState equals ACTIVE and networkSecurityGroupIds[*] does not exist```,OCI Load balancer not configured with Network Security Groups ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-file-storage-export' AND json.rule = exportOptions[?any( identitySquash equals ROOT and (anonymousGid does not equal 65534 or anonymousUid does not equal 65534))] exists```,OCI File Storage File System access is not restricted to root users ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-key-protect-key' AND json.rule = extractable is false and state equals 1 and ((policy[*].rotation exists and policy[*].rotation.enabled is false ) or policy[*].rotation does not exist)```,IBM Cloud Key Protect root key automatic key rotation is not enabled "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and ($.X.filterPattern contains ""eventSource="" or $.X.filterPattern contains ""eventSource ="") and ($.X.filterPattern does not contain ""eventSource!="" and $.X.filterPattern does not contain ""eventSource !="") and $.X.filterPattern contains organizations.amazonaws.com and $.X.filterPattern contains AcceptHandshake and $.X.filterPattern contains AttachPolicy and $.X.filterPattern contains CreateAccount and $.X.filterPattern contains CreateOrganizationalUnit and $.X.filterPattern contains CreatePolicy and $.X.filterPattern contains DeclineHandshake and $.X.filterPattern contains DeleteOrganization and $.X.filterPattern contains DeleteOrganizationalUnit and $.X.filterPattern contains DeletePolicy and $.X.filterPattern contains DetachPolicy and $.X.filterPattern contains DisablePolicyType and $.X.filterPattern contains EnablePolicyType and $.X.filterPattern contains InviteAccountToOrganization and $.X.filterPattern contains LeaveOrganization and $.X.filterPattern contains MoveAccount and $.X.filterPattern contains RemoveAccountFromOrganization and $.X.filterPattern contains UpdatePolicy and $.X.filterPattern contains UpdateOrganizationalUnit) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for AWS Organization changes ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-networks-list' AND json.rule = 'autoCreateSubnetworks does not exist'```,GCP project is configured with legacy network "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' AND json.rule = (restrictions.browserKeyRestrictions does not exist and restrictions.serverKeyRestrictions does not exist and restrictions.androidKeyRestrictions does not exist and restrictions.iosKeyRestrictions does not exist) or (restrictions.browserKeyRestrictions exists and (restrictions.browserKeyRestrictions[?any(allowedReferrers[*] equals ""*"")] exists or restrictions.browserKeyRestrictions[?any(allowedReferrers[*] equals ""*.[TLD]"")] exists or restrictions.browserKeyRestrictions[?any(allowedReferrers[*] equals ""*.[TLD]/*"")] exists)) or (restrictions.serverKeyRestrictions exists and (restrictions.serverKeyRestrictions[?any(allowedIps[*] equals 0.0.0.0)] exists or restrictions.serverKeyRestrictions[?any(allowedIps[*] equals 0.0.0.0/0)] exists or restrictions.serverKeyRestrictions[?any(allowedIps[*] equals ::/0)] exists or restrictions.serverKeyRestrictions[?any(allowedIps[*] equals ::0)] exists))```",GCP API key not restricted to use by specified Hosts and Apps ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-db-cluster' AND json.rule = 'storageEncrypted is false'```,AWS RDS DB cluster encryption is disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' and json.rule = groupName contains ""ahazra"" ```",Demo AWS Security Group overly permissive to all traffic ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-sql-server-list' AND json.rule = sqlEncryptionProtectors[*].kind != azurekeyvault and sqlEncryptionProtectors[*].properties.serverKeyType != AzureKeyVault and sqlEncryptionProtectors[*].properties.uri !exists```,Azure SQL server TDE protector is not encrypted with BYOK (Use your own key) "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals does not equal Microsoft.Network/publicIPAddresses/write and properties.condition.allOf[?(@.field=='category')].['equals'] contains Administrative"" as X; count(X) less than 1```",Azure Activity Log alert for Create or Update Public IP does not exist ```config from cloud.resource where api.name = 'azure-spring-cloud-service' AND json.rule = properties.powerState equals Running and sku.tier does not equal Basic as X; config from cloud.resource where api.name = 'azure-spring-cloud-app' AND json.rule = properties.provisioningState equals Succeeded and properties.enableEndToEndTLS is false as Y; filter '$.X.name equals $.Y.serviceName'; show Y;```,Azure Spring Cloud app end-to-end TLS is disabled "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(25,25)""```",Alibaba Cloud Security group allow internet traffic to SMTP port (25) "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = 'scheduling.preemptible equals true and (status equals RUNNING and name does not start with ""gke-"")'```",GCP VM Instances enabled with Pre-Emptible termination "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/networkSecurityGroups/securityRules/delete"" as X; count(X) less than 1```",Azure Activity log alert for Delete network security group rule does not exist ```config from cloud.resource where cloud.type ='aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = '(access_key_1_active is true and ((access_key_1_last_used_date != N/A and _DateTime.ageInDays(access_key_1_last_used_date) > 45) or (access_key_1_last_used_date == N/A and access_key_1_last_rotated != N/A and _DateTime.ageInDays(access_key_1_last_rotated) > 45))) or (access_key_2_active is true and ((access_key_2_last_used_date != N/A and _DateTime.ageInDays(access_key_2_last_used_date) > 45) or (access_key_2_last_used_date == N/A and access_key_2_last_rotated != N/A and _DateTime.ageInDays(access_key_2_last_rotated) > 45)))'```,AWS access keys not used for more than 45 days ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-database-maria-db-server' AND json.rule = properties.userVisibleState equals Ready and properties.sslEnforcement equals Disabled```,Azure MariaDB database server with SSL connection disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-compute-firewall-rules-list' AND json.rule= disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(80,80) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",IR-test-GCP Firewall rule allows all traffic on HTTP port (80) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-cache-clusters' AND json.rule = engine equals memcached and transitEncryptionEnabled is false```,AWS ElastiCache Memcached cluster with in-transit encryption disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.powerState.code equal ignore case Running and properties.addonProfiles.azureKeyvaultSecretsProvider.enabled is false```,Azure AKS cluster is not configured with disk encryption set ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-authentication-policy' AND json.rule = 'passwordPolicy.isLowercaseCharactersRequired isFalse'```,OCI IAM password policy for local (non-federated) users does not have a lowercase character "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-block-storage-volume' AND json.rule = volumeBackupPolicyAssignment[*] size equals 0 and volumeGroupId equal ignore case ""null""```",OCI Block Storage Block Volume does not have backup enabled "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = roles[*] contains ""roles/editor"" or roles[*] contains ""roles/owner"" as X; config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = status equals RUNNING and name does not start with ""gke-"" as Y; filter '$.Y.serviceAccounts[*].email contains $.X.user'; show Y;```",GCP VM instance has risky basic role assigned "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Udp or protocol equals *) and (destinationPortRange contains _Port.inRange(1434,1434) or destinationPortRanges[*] contains _Port.inRange(1434,1434) ))] exists```",Azure Network Security Group allows all traffic on SQL Server (UDP Port 1434) "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-run-services-list' AND json.rule = ""status.conditions[?any(type equals Ready and status equals True)] exists and status.conditions[?any(type equals RoutesReady and status equals True)] exists and ['metadata'].['annotations'].['run.googleapis.com/ingress'] equals all""```",GCP Cloud Run service with overly permissive ingress rule "```config from cloud.resource where api.name = 'aws-connect-instance' AND json.rule = InstanceStatus equals ""ACTIVE"" and storageConfig[?any( resourceType is member of ('CHAT_TRANSCRIPTS','CALL_RECORDINGS','SCREEN_RECORDINGS') and storageConfigs[*] exists )] exists as X; config from cloud.resource where api.name='aws-s3api-get-bucket-acl' AND json.rule = ""((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and ((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false))) or (policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))))"" as Y; filter ' $.X.storageConfig[*].storageConfigs[*].S3Config.BucketName intersects $.Y.bucketName' ; show Y;```",AWS Connect instance using publicly accessible S3 bucket ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 443 or fromPort == 443) or (toPort > 443 and fromPort < 443)))] exists)```,Allowing all to HTTPS ```config from cloud.resource where api.name = 'aws-route53-list-hosted-zones' AND json.rule = resourceRecordSet[?any( resourceRecords[*].value contains s3-website or aliasTarget.dnsname contains s3-website )] exists as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as Y; filter 'not($.X.resourceRecordSet[*].name contains $.Y.bucketName)'; show X;```,AWS Route53 Hosted Zone having dangling DNS record with subdomain takeover risk ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-mysql-deployment-info' AND json.rule = deployment.enable_public_endpoints is true```,IBM Cloud Database MySQL is exposed to public "```config from cloud.resource where cloud.type = 'aws' and api.name='aws-rds-describe-db-snapshots' AND json.rule=""attributes[?(@.attributeName=='restore')]‌‌.attributeValues[*] contains all""```",AWS RDS snapshots are accessible to public ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sagemaker-notebook-instance' AND json.rule = notebookInstanceStatus equals InService and rootAccess equals Enabled and notebookInstanceLifecycleConfigName does not exist```,AWS SageMaker notebook instance with root access enabled ```config from cloud.resource where Resource.status = Active AND api.name = 'aws-application-autoscaling-scaling-policy' as Y; config from cloud.resource where api.name = 'aws-dynamodb-describe-table' AND json.rule = tableStatus equal ignore case ACTIVE AND billingModeSummary.billingMode does not equal PAY_PER_REQUEST as X; filter 'not($.Y.ResourceName equals $.X.tableName)'; show X;```,AWS DynamoDB table Auto Scaling not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = Policy.Statement[?any(Effect equals Allow and (Principal.AWS does not equal * and Principal does not equal * and Principal.AWS contains arn and Principal.AWS does not contain $.Owner))] exists```,AWS SNS topic with cross-account access "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='cloudsql.enable_pgaudit')] does not exist or settings.databaseFlags[?(@.name=='cloudsql.enable_pgaudit')].value does not equal on)""```",GCP PostgreSQL instance database flag cloudsql.enable_pgaudit is not set to on ```config from cloud.resource where api.name = 'azure-key-vault-list' AND json.rule = 'properties.enableSoftDelete does not exist or properties.enablePurgeProtection does not exist'```,Azure Key Vault is not recoverable "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",RLP-83104 - Copy of Critical of AWS S3 bucket publicly readable "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = enaSupport is true and clientToken contains ""foo"" ```",ajay ec2 describe ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = domainProcessingStatus equal ignore case active and (logPublishingOptions does not exist or logPublishingOptions.ES_APPLICATION_LOGS.enabled is false)```,AWS Opensearch domain Error logging disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-macie2-session' AND json.rule = status equals ""ENABLED"" as X; count(X) less than 1```",AWS Macie is not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = 'restrictions.geoRestriction.restrictionType contains none'```,AWS CloudFront web distribution with geo restriction disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = state equals RUNNABLE and databaseVersion contains MYSQL and (settings.databaseFlags[*].name does not contain skip_show_database or settings.databaseFlags[?any(name contains skip_show_database and value does not contain on)] exists)```,GCP MySQL instance database flag skip_show_database is not set to on ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = 'roles[*] contains roles/cloudkms.admin and roles[*] contains roles/cloudkms.crypto'```,GCP IAM user have overly permissive Cloud KMS roles ```config from cloud.resource where api.name = 'aws-iam-list-users' AND json.rule = createDate contains 2018```,xnbnuowcaz_ui_auto_policies_tests_name ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-postgresql-deployment-info' AND json.rule = allowedListIPAddresses[*] size equals 0 or allowedListIPAddresses[?any( address equals 0.0.0.0/0 )] exists```,IBM Cloud PostgreSQL Database network access is not restricted to a specific IP range ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = ['attributes'].['deletion_protection.enabled'] contains false```,AWS Elastic Load Balancer v2 (ELBv2) with deletion protection disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ""(((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and publicAccessBlockConfiguration.ignorePublicAcls is false) or (policyStatus.isPublic is true and publicAccessBlockConfiguration.restrictPublicBuckets is false)) and websiteConfiguration does not exist) and ((policy.Statement[*].Condition.Bool.aws:SecureTransport does not exist) or ((policy.Statement[?(@.Principal=='*' || @.Principal.AWS=='*')].Action contains s3: or policy.Statement[?(@.Principal=='*' || @.Principal.AWS=='*')].Action[*] contains s3:) and (policy.Statement[?(@.Principal=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains false or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains false or policy.Statement[?(@.Principal=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains FALSE or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Allow')].Condition.Bool.aws:SecureTransport contains FALSE or policy.Statement[?(@.Principal=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains true or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains true or policy.Statement[?(@.Principal=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains TRUE or policy.Statement[?(@.Principal.AWS=='*' && @.Effect=='Deny')].Condition.Bool.aws:SecureTransport contains TRUE)))""```",AWS S3 bucket not configured with secure data transport policy ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any((Condition.ForAnyValue:IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains ::/0 or Condition.ForAnyValue:IpAddress.aws:SourceIp contains ::/0) and Effect equals Allow and Action contains *)] exists```,AWS IAM policy is overly permissive to all traffic via condition clause ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-dns-managed-zone' AND json.rule = '(dnssecConfig.state does not exist or dnssecConfig.state equals off) and visibility equals public'```,GCP Cloud DNS has DNSSEC disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = 'processing is false and (logPublishingOptions does not exist or logPublishingOptions.INDEX_SLOW_LOGS.enabled is false or logPublishingOptions.INDEX_SLOW_LOGS.cloudWatchLogsLogGroupArn is empty)'```,AWS Elasticsearch domain has Index slow logs set to disabled ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = 'secret_type equals username_password and (expiration_date does not exist or (_DateTime.ageInDays(expiration_date) > -1))'```,IBM Cloud Secrets Manager has expired user credentials "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.publicNetworkAccess'] equal ignore case Enabled and firewallRules[?any(startIpAddress equals ""0.0.0.0"" and endIpAddress equals ""255.255.255.255"")] exists```",Azure SQL Servers Firewall rule allow access to all IPV4 address "```config from cloud.resource where api.name = 'gcp-compute-disk-list' AND json.rule = status equals READY and name does not start with ""gke-"" and diskEncryptionKey.sha256 does not exist```",GCP VM disks not encrypted with Customer-Supplied Encryption Keys (CSEK) ```config from cloud.resource where api.name = 'oci-database-autonomous-database' AND json.rule = lifecycleState equal ignore case AVAILABLE and dataSafeStatus does not equal ignore case REGISTERED```,OCI Autonomous Database not registered in Data Safe ```config from cloud.resource where api.name = 'aws-iam-list-groups' as X; config from cloud.resource where api.name = 'aws-iam-list-users' as Y; filter ' not ($.Y.groupList[*] intersects $.X.groupName)'; show X;```,AWS IAM group not in use ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = '($.acl[*].email exists and $.acl[*].email contains logging) and ($.acl[*].entity contains allUsers or $.acl[*].entity contains allAuthenticatedUsers)'```,GCP Storage Buckets with publicly accessible GCP logs "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.systemConfigurationsMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud security configurations monitoring is set to disabled "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = clientToken is not empty AND monitoring.state contains ""running""```",Venu Test "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-fsx-file-system' AND json.rule = FileSystemType equals ""OPENZFS"" and Lifecycle equals ""AVAILABLE"" and (OpenZFSConfiguration.CopyTagsToBackups is false or OpenZFSConfiguration.CopyTagsToVolumes is false )```",AWS FSx for OpenZFS file systems not configured to copy tags to backups or volumes "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Udp or protocol equals *) and (destinationPortRange contains _Port.inRange(53,53) or destinationPortRanges[*] contains _Port.inRange(53,53) ))] exists```",Azure Network Security Group allows all traffic on NetBIOS DNS (UDP Port 53) "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-iam-identity-account-setting' AND json.rule = mfa equal ignore case ""NONE""```",IBM Cloud Multi-Factor Authentication (MFA) not enabled at the account level ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-oracledatabase-bmvm-dbsystem' AND json.rule = 'lifecycleState equals AVAILABLE and nsgIds contains null'```,OCI Database system is not configured with Network Security Groups ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule='loggingConfiguration.targetBucket equals null or loggingConfiguration.targetPrefix equals null'```,Bobby Copy of AWS Access logging not enabled on S3 buckets "```config from cloud.resource where cloud.type = 'gcp' AND api.name= 'gcloud-compute-instances-list' AND json.rule = (networkInterfaces[*].accessConfigs[*].type exists and networkInterfaces[*].accessConfigs[*].type contains ""ONE_TO_ONE_NAT"") and (labels.goog-composer-environment does not exist and tags.items[*] does not contain ""dataflow"") and (metadata.items[*].key does not equal ""nat"" and metadata.items[*].value does not equal ""TRUE"") and (name does not contain ""paloALTO"")```",CNA customer "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = state_description equal ignore case active and secret_type is member of (private_cert, public_cert) and rotation.auto_rotate is false```",IBM Cloud Secrets Manager certificate not configured with automatic rotation ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.publicNetworkAccess equal ignore case Enabled and (properties.ipAllowlist does not exist or properties.ipAllowlist is empty)```,Azure Machine learning workspace configured with overly permissive network access "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(21,21) or destinationPortRanges[*] contains _Port.inRange(21,21) ))] exists```",Azure Network Security Group allows all traffic on FTP (TCP Port 21) ```config from cloud.resource where api.name = 'aws-waf-classic-web-acl-resource' AND json.rule = resources.apiGateway[*] exists or resources.applicationLoadBalancer[*] exists```,AWS WAF Classic (Regional) in use "```config from cloud.resource where api.name = 'ibm-vpc-network-security-group' AND json.rule = rules[?any( remote.cidr_block equals ""0.0.0.0/0"" and direction equals ""inbound"" and ( protocol equals ""all"" or ( protocol equals ""tcp"" and (( port_max greater than 22 and port_min less than 22 ) or ( port_max equals 22 and port_min equals 22 )))))] exists as X; config from cloud.resource where api.name = 'ibm-vpc' as Y; filter ' $.X.id equals $.Y.default_security_group.id '; show X;```",IBM Cloud Default Security Group allow all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-instances' AND json.rule = state contains running and metadataOptions.httpEndpoint equals enabled and metadataOptions.httpTokens does not contain required```,AWS EC2 instance not configured with Instance Metadata Service v2 (IMDSv2) "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains CreateCustomerGateway and $.X.filterPattern contains DeleteCustomerGateway and $.X.filterPattern contains AttachInternetGateway and $.X.filterPattern contains CreateInternetGateway and $.X.filterPattern contains DeleteInternetGateway and $.X.filterPattern contains DetachInternetGateway) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for Network gateways changes ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = Policy.Statement[?any(Effect equals Allow and (Principal.AWS equals * or Principal equals *) and Condition does not exist)] exists```,AWS SNS topic is exposed to unauthorized access ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-dataproc-clusters-list' AND json.rule = config.encryptionConfig.gcePdKmsKeyName does not exist and config.encryptionConfig.kmsKey does not exist```,GCP Dataproc Cluster not configured with Customer-Managed Encryption Key (CMEK) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cognito-identity-pool' AND json.rule = allowUnauthenticatedIdentities is true```,Copy of AWS Cognito identity pool allows unauthenticated guest access "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ( $.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="" ) and ( $.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="" ) and $.X.filter contains ""gce_route"" and ( $.X.filter contains ""protoPayload.methodName:"" or $.X.filter contains ""protoPayload.methodName :"" ) and ( $.X.filter does not contain ""protoPayload.methodName!:"" and $.X.filter does not contain ""protoPayload.methodName !:"" ) and $.X.filter contains ""compute.routes.delete"" and $.X.filter contains ""compute.routes.insert""'; show X; count(X) less than 1```",bobby remediation 1 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and engine equals postgres and engineVersion is member of ('13.2','13.1','12.6','12.5','12.4','12.3','12.2','11.11','11.10','11.9','11.8','11.7','11.6','11.5','11.4','11.3','11.2','11.1','10.16','10.15','10.14','10.13','10.12','10.11','10.10','10.9','10.7','10.6','10.5','10.4','10.3','10.1','9.6.21','9.6.20','9.6.19','9.6.18','9.6.17','9.6.16','9.6.15','9.6.14','9.6.12','9.6.11','9.6.10','9.6.9','9.6.8','9.6.6','9.6.5','9.6.3','9.6.2','9.6.1','9.5','9.4','9.3')```",AWS RDS PostgreSQL exposed to local file read vulnerability ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING and $.X.status.state does not contain TERMINATED and $.X.status.state does not contain TERMINATED_WITH_ERRORS) and ($.X.securityConfiguration contains $.Y.name) and ($.Y.EncryptionConfiguration.EnableAtRestEncryption is true) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.LocalDiskEncryptionConfiguration does not exist)' ; show X;```,AWS EMR cluster is not enabled with local disk encryption ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-users' AND json.rule = groupList is empty```,AWS IAM user is not a member of any IAM group ```config from cloud.resource where cloud.type = 'alibaba_cloud' and api.name = 'alibaba-cloud-oss-bucket-info' AND json.rule = bucket.logging.targetBucket does not exist```,Alibaba Cloud OSS bucket logging not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = versioningConfiguration.status equals Enabled and (versioningConfiguration.mfaDeleteEnabled does not exist or versioningConfiguration.mfaDeleteEnabled is false) AND (bucketLifecycleConfiguration does not exist or bucketLifecycleConfiguration.rules[*].status equals Disabled)```,AWS S3 bucket is not configured with MFA Delete "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-kubernetes-cluster' AND json.rule = type equal ignore case kubernetes and state equal ignore case ""normal"" and serviceEndpoints.publicServiceEndpointEnabled is true```",IBM Cloud Kubernetes clusters are accessible by using public endpoint ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = 'authTokens[?any(lifecycleState equals ACTIVE and (_DateTime.ageInDays(timeCreated) > 90))] exists'```,OCI users Auth Tokens have aged more than 90 days without being rotated "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-user' AND json.rule = userType equals Guest as X; config from cloud.resource where api.name = 'azure-role-assignment' AND json.rule = properties.principalType contains User and properties.roleDefinition.properties.roleName is member of (""Owner"") as Y; filter '$.X.id equals $.Y.properties.principalId'; show X;```",Custom Azure Guest User with owner permissions ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = 'access_key_1_active is true and access_key_2_active is true'```,AWS IAM user has two active Access Keys ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = iamConfiguration.uniformBucketLevelAccess.enabled contains false```,Copy of a Copy Maybe GCP cloud storage bucket with uniform bucket-level access disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'nodePools[*].config.serviceAccount contains default'```,GCP Kubernetes Engine Cluster Nodes have default Service account for Project access ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecr-get-repository-policy' AND json.rule = policy.Statement[?any(Effect equals Allow and (Principal.AWS does not equal * and Principal does not equal * and Principal.AWS contains arn and Principal.AWS does not contain $.registryId))] exists```,AWS ECR private repository with cross-account access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals KeyVaults and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for Key Vault "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '($.Y.conditions[*].metricThresholdFilter contains $.X.name) and ($.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="") and ($.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="") and $.X.filter contains ""gce_firewall_rule"" and ($.X.filter contains ""jsonPayload.event_subtype="" or $.X.filter contains ""jsonPayload.event_subtype ="") and ($.X.filter does not contain ""jsonPayload.event_subtype!="" and $.X.filter does not contain ""jsonPayload.event_subtype !="") and $.X.filter contains ""compute.firewalls.patch"" and $.X.filter contains ""compute.firewalls.insert""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for VPC Network Firewall rule changes ```config from cloud.resource where api.name = 'aws-elbv2-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = ipPermissions[*] is empty or ipPermissionsEgress[*] is empty as Y; filter '$.X.securityGroups[*] contains $.Y.groupId'; show X;```,AWS Elastic Load Balancer v2 (ELBv2) load balancer with invalid security groups ```config from cloud.resource where cloud.account = 'AWS Account' AND api.name = 'aws-ec2-describe-instances' AND json.rule = instanceId exists```,nsk_config_ec2 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and (backupRetentionPeriod does not exist or backupRetentionPeriod less than 7)```,AWS RDS retention policy less than 7 days ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-target-https-proxies' AND json.rule = 'sslPolicy does not exist or sslPolicy is empty'```,GCP Load balancer HTTPS target proxy configured with default SSL policy instead of custom SSL policy ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-automation-account' AND json.rule = properties.publicNetworkAccess does not exist or properties.publicNetworkAccess is true```,Azure Automation account configured with overly permissive network access ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function' AND json.rule = status equals ACTIVE and httpsTrigger exists and httpsTrigger.securityLevel does not equal SECURE_ALWAYS```,GCP Cloud Function HTTP trigger is not secured ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and protocol equals Udp and access equals Allow and direction equals Inbound and destinationPortRange contains *)] exists```,Azure Network Security Group having Inbound rule overly permissive to all traffic on UDP protocol "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = (status equals RUNNING and name does not start with ""gke-"") and metadata.items[?any(key contains ""serial-port-logging-enable"" and value equals ""true"")] exists```",GCP VM instance serial port output logging is enabled ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING) and ($.X.securityConfiguration contains $.Y.name) and ($.Y.EncryptionConfiguration.EnableAtRestEncryption is true) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration exists) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration.EncryptionMode contains SSE) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration.EncryptionMode does not contain KMS)' ; show X;```,AWS EMR cluster is not configured with SSE KMS for data at rest encryption (Amazon S3 with EMRFS) ```config from cloud.resource where api.name = 'aws-appsync-graphql-api' AND json.rule = wafWebAclArn is not empty as X; config from cloud.resource where api.name = 'aws-waf-v2-web-acl-resource' AND json.rule = (webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesAnonymousIpList or webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesKnownBadInputsRuleSet) and NOT ( webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesAnonymousIpList and webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesKnownBadInputsRuleSet ) as Y; filter '$.Y.webACL.arn equals $.X.wafWebAclArn'; show X;```,AWS AppSync attached WAFv2 WebACL is not configured with AMR for Log4j Vulnerability ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-rds-instance' AND json.rule = 'Items[*].securityIPList contains 0.0.0.0/0 or Items[*].securityIPList contains 127.0.0.1'```,Alibaba Cloud ApsaraDB RDS allowlist group is not restrictive ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals SqlServerVirtualMachines and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for SQL servers on machines "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' as X; config from cloud.resource where api.name = 'aws-ec2-describe-volumes' as Y; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Z; filter ""$.X.blockDeviceMappings[*].ebs.volumeId == $.Y.volumeId and $.Y.encrypted contains true and $.Y.kmsKeyId equals $.Z.key.keyArn and $.Z.keyMetadata.keyManager contains AWS and $.X.tags[?(@.key=='Name')].value does not contain CSR""; show Y; ```",Morgan_Stanley_custom_policy "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.endpointProtectionMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud endpoint protection monitoring is set to disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudtrail-describe-trails' AND json.rule = 'cloudWatchLogsRoleArn equals null or cloudWatchLogsRoleArn does not exist'```,AWS CloudTrail trail logs is not integrated with CloudWatch Log ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' and json.rule = secrets[?any(attributes.exp equals -1 and attributes.enabled contains true)] exists and properties.enableRbacAuthorization is false```,Azure Key Vault secret has no expiration date (Non-RBAC Key vault) ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'requireUppercaseCharacters does not exist or requireUppercaseCharacters is false'```,Alibaba Cloud RAM password policy does not have an uppercase character "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ($.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="") and ($.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="") and $.X.filter contains ""gce_network"" and ($.X.filter contains ""jsonPayload.event_subtype="" or $.X.filter contains ""jsonPayload.event_subtype ="") and ($.X.filter does not contain ""jsonPayload.event_subtype!="" and $.X.filter does not contain ""jsonPayload.event_subtype !="") and $.X.filter contains ""compute.networks.insert"" and $.X.filter contains ""compute.networks.patch"" and $.X.filter contains ""compute.networks.delete"" and $.X.filter contains ""compute.networks.removePeering"" and $.X.filter contains ""compute.networks.addPeering""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for VPC network changes "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sns-get-topic-attributes' AND json.rule = KmsMasterKeyId exists and KmsMasterKeyId equal ignore case ""alias/aws/sns""```",AWS SNS Topic not encrypted by Customer Managed Key (CMK) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cosmos-db' AND json.rule = properties.ipRangeFilter is empty```,Azure Cosmos DB IP range filter not configured ```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-compute-firewall-rules-list' AND json.rule = 'disabled is false and direction equals INGRESS and allowed[*] exists and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and targetTags[*] does not exist and targetServiceAccounts[*] does not exist'```,GCP Firewall rule allows inbound traffic from anywhere with no specific target set ```config from cloud.resource where cloud.type ='aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = '(access_key_1_active is true and ((access_key_1_last_used_date != N/A and _DateTime.ageInDays(access_key_1_last_used_date) > 90) or (access_key_1_last_used_date == N/A and access_key_1_last_rotated != N/A and _DateTime.ageInDays(access_key_1_last_rotated) > 90))) or (access_key_2_active is true and ((access_key_2_last_used_date != N/A and _DateTime.ageInDays(access_key_2_last_used_date) > 90) or (access_key_2_last_used_date == N/A and access_key_2_last_rotated != N/A and _DateTime.ageInDays(access_key_2_last_rotated) > 90)))'```,Informational - AWS access keys not used for more than 90 days ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-secretsmanager-secret' AND json.rule = replication.userManaged.replicas[*].customerManagedEncryption.kmsKeyName does not exist and replication.automatic.customerManagedEncryption.kmsKeyName does not exist```,GCP Secrets Manager secret not encrypted with CMEK "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and ($.X.filterPattern contains ""eventSource="" or $.X.filterPattern contains ""eventSource ="") and ($.X.filterPattern does not contain ""eventSource!="" and $.X.filterPattern does not contain ""eventSource !="") and $.X.filterPattern contains s3.amazonaws.com and $.X.filterPattern contains PutBucketAcl and $.X.filterPattern contains PutBucketPolicy and $.X.filterPattern contains PutBucketCors and $.X.filterPattern contains PutBucketLifecycle and $.X.filterPattern contains PutBucketReplication and $.X.filterPattern contains DeleteBucketPolicy and $.X.filterPattern contains DeleteBucketCors and $.X.filterPattern contains DeleteBucketLifecycle and $.X.filterPattern contains DeleteBucketReplication) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for S3 bucket policy changes ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = 'automaticFailover equals disabled or automaticFailover does not exist'```,AWS ElastiCache Redis cluster with Multi-AZ Automatic Failover feature set to disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-service-bus-namespace' AND json.rule = properties.status equals ""Active"" and (properties.disableLocalAuth does not exist or properties.disableLocalAuth is false)```",Azure Service bus namespace not configured with Azure Active Directory (Azure AD) authentication "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ""((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and ((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false))) or (policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))))"" as X; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Y; filter'$.X.bucketName equals $.Y.s3BucketName'; show X;```",Copy of AWS CloudTrail bucket is publicly accessible "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains DeleteGroupPolicy and $.X.filterPattern contains DeleteRolePolicy and $.X.filterPattern contains DeleteUserPolicy and $.X.filterPattern contains PutGroupPolicy and $.X.filterPattern contains PutRolePolicy and $.X.filterPattern contains PutUserPolicy and $.X.filterPattern contains CreatePolicy and $.X.filterPattern contains DeletePolicy and $.X.filterPattern contains CreatePolicyVersion and $.X.filterPattern contains DeletePolicyVersion and $.X.filterPattern contains AttachRolePolicy and $.X.filterPattern contains DetachRolePolicy and $.X.filterPattern contains AttachUserPolicy and $.X.filterPattern contains DetachUserPolicy and $.X.filterPattern contains AttachGroupPolicy and $.X.filterPattern contains DetachGroupPolicy) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for IAM policy changes ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = '(user does not contain appspot.gserviceaccount.com and user does not contain developer.gserviceaccount.com and user does not contain cloudservices.gserviceaccount.com and user does not contain system.gserviceaccount.com and user does not contain cloudbuild.gserviceaccount.com) and (roles contains roles/editor or roles contains roles/owner)'```,GCP IAM primitive roles are in use ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-credential-user-registration-details' AND json.rule = isMfaRegistered is false as X; config from cloud.resource where api.name = 'azure-active-directory-user' AND json.rule = accountEnabled is true as Y; filter '$.X.userDisplayName equals $.Y.displayName'; show X;```,Custom AlertRule Azure AD MFA is not enabled for the user ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.endpointPublicAccess is true or resourcesVpcConfig.endpointPrivateAccess is false```,AWS EKS cluster endpoint access publicly enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' AND json.rule = publicNetworkAccess equal ignore case Enabled and networkAccessPolicy equal ignore case AllowAll and managedBy contains virtualMachines```,Azure VM disk configured with overly permissive network access "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""databases-for-postgresql"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resourceGroupId"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Databases for PostgreSQL service "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Udp or protocol equals *) and (destinationPortRange contains _Port.inRange(137,137) or destinationPortRanges[*] contains _Port.inRange(137,137) ))] exists```",Azure Network Security Group allows all traffic on NetBIOS (UDP Port 137) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cognitive-services-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.publicNetworkAccess equal ignore case Enabled and (properties.networkAcls.defaultAction does not exist or properties.networkAcls.defaultAction equal ignore case Allow)```,Azure Cognitive Services account configured with public network access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.allowCrossTenantReplication exists and properties.allowCrossTenantReplication is true```,Azure Storage account with cross tenant replication enabled "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case access and roles[?any( role_id is member of (crn:v1:bluemix:public:iam::::role:Administrator,crn:v1:bluemix:public:iam::::role:Editor,crn:v1:bluemix:public:iam::::role:Viewer ) )] exists and resources[?any( attributes[?any( value equal ignore case support and operator is member of (stringEquals, stringMatch))] exists)] exists and subjects[?any( attributes[?any( value contains AccessGroupId)] exists )] exists as X; count(X) less than 1```",IBM Cloud Support Access Group to manage incidents has not been created "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(25,25) or destinationPortRanges[*] contains _Port.inRange(25,25) ))] exists```",Azure Network Security Group allows all traffic on SMTP (TCP Port 25) "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy ajtmu ```config from cloud.resource where api.name = 'azure-storage-account-list' as X; config from cloud.resource where api.name = 'azure-storage-account-queue-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.id contains $.Y.properties.storageAccountId)'; show X;```,Azure Storage Logging is not Enabled for Queue Service for Read Write and Delete requests ```config from cloud.resource where api.name = 'oci-networking-subnet' as X; config from cloud.resource where api.name = 'oci-logging-logs' AND json.rule = lifecycleState equals ACTIVE and isEnabled is true and configuration.source.service contains flowlogs as Y; filter 'not ($.X.id contains $.Y.configuration.source.resource)'; show X;```,OCI VCN subnet flow logging is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus equals available and (engine does not contain aurora and engine does not contain sqlserver and engine does not contain docdb) and (multiAZ is false or multiAZ does not exist)```,AWS RDS instance with Multi-Availability Zone disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'enableKubernetesAlpha is true'```,GCP Kubernetes Engine Clusters have Alpha cluster feature enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name= 'gcloud-compute-firewall-rules-list' AND json.rule = 'disabled is false and (name equals default-allow-ssh or name equals default-allow-icmp or name equals default-allow-internal or name equals default-allow-rdp) and (deleted is false) and (sourceRanges[*] contains 0.0.0.0/0 or sourceRanges[*] contains ::/0)'```,GCP Default Firewall rule is overly permissive (except http and https) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = kind starts with app and (identity.type does not exist or (identity.type exists and identity.type does not contain SystemAssigned and identity.type does not contain UserAssigned))```,Azure App Service Web app doesn't have a Managed Service Identity ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kms-get-key-rotation-status' AND json.rule = 'keyMetadata.origin contains EXTERNAL and keyMetadata.keyManager contains CUSTOMER and keyMetadata.enabled is true and (_DateTime.ageInDays($.keyMetadata.validTo) > -30)'```,AWS KMS customer managed external key expiring in 30 days or less ```config from cloud.resource where api.name = 'aws-rds-db-cluster' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '($.X.storageEncrypted is true) and ($.X.kmsKeyId equals $.Y.key.keyArn) and ($.Y.keyMetadata.keyManager does not contain CUSTOMER)' ; show X;```,AWS RDS DB cluster is encrypted using default KMS key instead of CMK "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = firewallRules.value[*].properties.startIpAddress equals ""0.0.0.0"" or firewallRules.value[*].properties.endIpAddress equals ""0.0.0.0""```",EIP-CSE-IACOHP-AzurePostgreSQL-NetworkAccessibility-eca1500-51 ```config from cloud.resource where api.name = 'aws-route53-list-hosted-zones' AND json.rule = hostedZone.config.privateZone is false as X; config from cloud.resource where api.name = 'aws-route53-query-logging-config' as Y; filter ' not ($.X.hostedZone.id equals $.Y.HostedZoneId) ' ; show X;```,AWS Route53 public Hosted Zone query logging is not enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(53,53) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on DNS port (53) "```config from cloud.resource where api.name = 'aws-account-management-alternate-contact' group by account as X; filter ' AlternateContactType is not member of (""SECURITY"") ' ;```",mnm test ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-acm-pca-certificate-authority' AND json.rule = Type equal ignore case ROOT and Status equal ignore case active```,AWS Private CA root certificate authority is enabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-user' AND json.rule = 'MFADevice is empty'```,Alibaba Cloud MFA is disabled for RAM user ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-group' AND json.rule = mail contains 42```,dnd_test_create_hyperion_policy_multi_cloud_child_policies_ss_finding_2 ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-object-storage-bucket' AND json.rule = versioning equals Disabled```,OCI Object Storage Bucket has object Versioning disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = not (pricings[?any(properties.extensions[?any(name equal ignore case AgentlessVmScanning AND isEnabled is true)] exists AND properties.pricingTier equal ignore case Standard )] exists)```,Azure Microsoft Defender for Cloud set to Off for Agentless scanning for machines ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = serverAdmins does not exist or serverAdmins[*] size equals 0 or (serverAdmins[*].properties.administratorType exists and serverAdmins[*].properties.administratorType does not equal ActiveDirectory and serverAdmins[*].properties.login is not empty)```,Dikla test ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-postgresql-deployment-info' AND json.rule = deployment.platform_options.disk_encryption_key_crn is empty```,IBM Cloud PostgreSQL Database disk encryption is not enabled with customer managed keys ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' as X; config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' as Y; filter ' $.X.resourcesVpcConfig.vpcId contains $.Y.vpcId and $.Y.isDefault is true'; show X;```,AWS EKS cluster using the default VPC "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ($.X.filter contains ""protoPayload.methodName="" or $.X.filter contains ""protoPayload.methodName ="") and ($.X.filter does not contain ""protoPayload.methodName!="" and $.X.filter does not contain ""protoPayload.methodName !="") and $.X.filter contains ""cloudsql.instances.update""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for SQL instance configuration changes ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.enableRBAC is false```,Azure AKS enable role-based access control (RBAC) not enforced ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and protocol equals Tcp and access equals Allow and direction equals Inbound and destinationPortRange contains *)] exists```,Azure Network Security Group having Inbound rule overly permissive to all traffic on TCP protocol "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-attached-user-policies' AND json.rule = attachedPolicies[*].policyArn contains ""arn:aws:iam::aws:policy/AmazonElasticTranscoderFullAccess""```",AWS IAM deprecated managed policies in use by User "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-s3api-get-bucket-acl' AND json.rule = (sseAlgorithm contains ""aws:kms"" or sseAlgorithm contains ""aws:kms:dsse"") and kmsMasterKeyID exists as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and keyMetadata.keyManager equals CUSTOMER and policies.default.Statement[?any((Principal.AWS equals * or Principal equals *)and Condition does not exist)] exists as Y; filter '$.X.kmsMasterKeyID contains $.Y.key.keyArn' ; show X;```",AWS S3 bucket encrypted using Customer Managed Key (CMK) with overly permissive policy "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = properties.publicNetworkAccess equal ignore case Enabled and firewallRules.value[*].properties.startIpAddress equals ""0.0.0.0"" and firewallRules.value[*].properties.endIpAddress equals ""0.0.0.0""```",Azure PostgreSQL Database Server 'Allow access to Azure services' enabled ```config from cloud.resource where api.name = 'aws-rds-describe-db-instances' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '$.X.storageEncrypted is true and $.X.kmsKeyId equals $.Y.key.keyArn and $.Y.keyMetadata.keyManager contains AWS'; show X;```,AWS RDS database not encrypted using Customer Managed Key "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-describe-task-definition' AND json.rule = status equals ""ACTIVE"" AND containerDefinitions[*].readonlyRootFilesystem any false or containerDefinitions[*].readonlyRootFilesystem does not exist```",AWS ECS task definition is not configured with read-only access to container root filesystems "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.endpointPublicAccess is true and resourcesVpcConfig.publicAccessCidrs contains ""0.0.0.0/0""```",AWS EKS cluster public endpoint access overly permissive to all traffic ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.virtualnetwork.changenetworksecuritygroupcompartment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createnetworksecuritygroup and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletenetworksecuritygroup and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatenetworksecuritygroup) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for Network Security Groups changes "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains CreateRoute and $.X.filterPattern contains CreateRouteTable and $.X.filterPattern contains ReplaceRoute and $.X.filterPattern contains ReplaceRouteTableAssociation and $.X.filterPattern contains DeleteRouteTable and $.X.filterPattern contains DeleteRoute and $.X.filterPattern contains DisassociateRouteTable) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for Route table changes "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/networkSecurityGroups/write"" as X; count(X) less than 1```",Azure Activity log alert for Create or update network security group does not exist "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-virtual-server-image' AND json.rule = status equals ""available"" and encryption equal ignore case ""none""```",IBM Cloud Virtual Server Image for Virtual Private Cloud (VPC) using basic Provider Managed Encryption ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-secret-manager-secret' AND json.rule = 'secret_type equals arbitrary and (expiration_date does not exist or (_DateTime.ageInDays(expiration_date) > -1))'```,IBM Cloud Secrets Manager has expired arbitrary secrets "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-logging-bucket' AND json.rule = name contains ""pk""```",pk-gcp-global ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-configservice-describe-configuration-recorders' AND json.rule = 'status.recording is true and status.lastStatus contains FAILURE'```,AWS Config fails to deliver log files "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-networks-subnets-list' AND json.rule = purpose is not member of (REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, GLOBAL_MANAGED_PROXY, PRIVATE_NAT) and (privateIpGoogleAccess does not exist or privateIpGoogleAccess is false)```",GCP VPC Network subnets have Private Google access disabled "```config from cloud.resource where api.name = 'aws-glue-datacatalog' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager does not equal CUSTOMER or (keyMetadata.keyManager equals CUSTOMER and keyMetadata.keyState equals Disabled) as Y; filter '($.X.DataCatalogEncryptionSettings.EncryptionAtRest.CatalogEncryptionMode equals ""DISABLED"" or $.X.ConnectionPasswordEncryption.ReturnConnectionPasswordEncrypted equals ""false"") or ($.X.DataCatalogEncryptionSettings.EncryptionAtRest.SseAwsKmsKeyId exists and ($.X.DataCatalogEncryptionSettings.EncryptionAtRest.SseAwsKmsKeyId equals $.Y.keyMetadata.arn or $.X.DataCatalogEncryptionSettings.EncryptionAtRest.SseAwsKmsKeyId starts with ""alias/aws/"")) or ($.X.DataCatalogEncryptionSettings.ConnectionPasswordEncryption.AwsKmsKeyId exists and ($.X.DataCatalogEncryptionSettings.ConnectionPasswordEncryption.AwsKmsKeyId equals $.Y.keyMetadata.arn or $.X.DataCatalogEncryptionSettings.ConnectionPasswordEncryption.AwsKmsKeyId starts with ""alias/aws/""))' ; show X;```",AWS Glue Data Catalog not encrypted by Customer Managed Key (CMK) "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_checkpoints')] does not exist or settings.databaseFlags[?(@.name=='log_checkpoints')].value equals off)""```",GCP PostgreSQL instance with log_checkpoints database flag is disabled "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains ConsoleLogin and ($.X.filterPattern contains ""errorMessage="" or $.X.filterPattern contains ""errorMessage ="") and ($.X.filterPattern does not contain ""errorMessage!="" and $.X.filterPattern does not contain ""errorMessage !="") and $.X.filterPattern contains ""Failed authentication"") and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for AWS management console authentication failures ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = $.nodePools[*].management.autoUpgrade is true and $.currentNodeCount less than 3```,GCP Kubernetes cluster size contains less than 3 nodes with auto upgrade enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(21,21) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on FTP port (21) "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-object-storage-bucket' AND json.rule = kmsKeyId is member of (""null"")```",OCI Object Storage Bucket is not encrypted with a Customer Managed Key (CMK) "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(80,80)""```",Alibaba Cloud Security group allow internet traffic to HTTP port (80) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = 'atRestEncryptionEnabled is false or atRestEncryptionEnabled does not exist'```,AWS ElastiCache Redis cluster with encryption for data at rest disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = '(_DateTime.ageInDays(apiKeys[*].timeCreated) > 90)'```,OCI users API keys have aged more than 90 days without being rotated "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Security/policies/write"" as X; count(X) less than 1```",Azure Activity log alert for Update security policy does not exist "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-route53-list-hosted-zones' AND json.rule = 'hostedZone.config.privateZone is false and resourceRecordSet[*].type any equal A and (resourceRecordSet[*].resourceRecords[*].value any start with 10. or resourceRecordSet[*].resourceRecords[*].value any start with _IPAddress.inRange(""172.%d"",16,31) or resourceRecordSet[*].resourceRecords[*].value any start with 192.168.)'```",AWS Route53 Public Zone with Private Records "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any(tags does not exist and attributes[?any( value equal ignore case ""service"" and name equal ignore case ""serviceType"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name equal ignore case ""region"")] does not exist)] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for all Identity and Access enabled services ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-describe-task-definition' AND json.rule = containerDefinitions[*].user exists and containerDefinitions[*].user contains root```,AWS ECS Fargate task definition root user found "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(22,22)""```",Alibaba Cloud Security group allow internet traffic to SSH port (22) ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'minimumPasswordLength does not exist or minimumPasswordLength less than 14'```,Alibaba Cloud RAM password policy does not have a minimum of 14 characters ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-block-storage-volume' AND json.rule = volume_attachments[*] size equals 0 and encryption equal ignore case provider_managed```,IBM Cloud unattached disk is not encrypted with customer managed key "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy mtmay ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equals Dns and properties.pricingTier does not equal Standard)] exists```,Copy of Azure Microsoft Defender for Cloud set to Off for DNS ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-redshift-describe-clusters' AND json.rule='encrypted is false'```,AWS Redshift instances are not encrypted "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(5900,5900)""```",Alibaba Cloud Security group allow internet traffic to VNC Server port (5900) ```config from cloud.resource where api.name = 'gcloud-domain-users' AND json.rule = isAdmin is true and isEnrolledIn2Sv is false and archived is false and suspended is false```,GCP Google Workspace Super Admin not enrolled with 2-step verification ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any((Condition.ForAnyValue:IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains ::/0 or Condition.ForAnyValue:IpAddress.aws:SourceIp contains ::/0) and Effect equals Allow and Action anyStartWith ecs:)] exists```,AWS ECS IAM policy overly permissive to all traffic ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-networkfirewall-firewall' AND json.rule = FirewallStatus.Status equals READY and Firewall.DeleteProtection is false```,VenuTestCLi "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_planner_stats or settings.databaseFlags[?any(name contains log_planner_stats and value contains on)] exists)""```",GCP PostgreSQL instance database flag log_planner_stats is not set to off "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and ($.X.filterPattern contains ""eventSource="" or $.X.filterPattern contains ""eventSource ="") and ($.X.filterPattern does not contain ""eventSource!="" and $.X.filterPattern does not contain ""eventSource !="") and $.X.filterPattern contains kms.amazonaws.com and $.X.filterPattern contains DisableKey and $.X.filterPattern contains ScheduleKeyDeletion) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for disabling or scheduled deletion of customer created CMKs ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-application-gateway' AND json.rule = ['properties.provisioningState'] equal ignore case Succeeded AND ['properties.httpListeners'][*].['properties.provisioningState'] equal ignore case Succeeded AND ['properties.httpListeners'][*].['properties.protocol'] equal ignore case Https AND ['properties.httpListeners'][*].['properties.sslProfile'].['id'] does not exist```,Azure Application Gateway listener not secured with SSL profile ```config from cloud.resource where api.name = 'aws-route53-list-hosted-zones' AND json.rule = hostedZone.config.privateZone is false and resourceRecordSet[?any( type equals CNAME and resourceRecords[*].value contains elasticbeanstalk.com)] exists as X; config from cloud.resource where api.name = 'aws-elasticbeanstalk-environment' as Y; filter 'not (X.resourceRecordSet[*].resourceRecords[*].value intersects $.Y.cname)'; show X;```,AWS Route53 Hosted Zone having dangling DNS record with subdomain takeover risk associated with AWS Elastic Beanstalk Instance ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudwatch-log-group' AND json.rule = retentionInDays exists and retentionInDays less than 365```,AWS CloudWatch log groups retention set to less than 365 days ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-acl' AND json.rule = rules[?any( action equals allow and direction equals outbound and destination equals 0.0.0.0/0 )] exists```,IBM Cloud ACL for VPC with overly permissive egress rule ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule='loggingConfiguration.targetBucket equals null or loggingConfiguration.targetPrefix equals null'```,AWS Access logging not enabled on S3 buckets ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-enforcement-policy' AND json.rule = isEnabled is false```,Azure Active Directory Security Defaults is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cosmos-db' AND json.rule = properties.provisioningState equals Succeeded AND properties.publicNetworkAccess equal ignore case Enabled AND properties.virtualNetworkRules[*] is empty```,Azure Cosmos DB Virtual network is not configured "```config from cloud.resource where api.name = 'gcloud-compute-ssl-policies' AND json.rule = profile does not equal RESTRICTED and profile does not equal CUSTOM as X; config from cloud.resource where api.name = 'gcloud-compute-target-https-proxies' AND json.rule = sslPolicy exists as Y; filter "" $.X.selfLink contains $.Y.sslPolicy ""; show Y;```",GCP HTTPS Load balancer SSL Policy not using restrictive profile "```config from cloud.resource where api.name = 'azure-storage-account-list' as X; config from cloud.resource where api.name = 'azure-monitor-log-profiles-list' as Y; filter '($.X.properties.encryption.keySource does not equal ""Microsoft.Keyvault"" and $.X.properties.encryption.keyvaultproperties.keyname is not empty and $.X.properties.encryption.keyvaultproperties.keyversion is not empty and $.X.properties.encryption.keyvaultproperties.keyvaulturi is not empty and $.Y.properties.storageAccountId contains $.X.name)'; show X;```",Azure Storage Account Container with activity log has BYOK encryption disabled ```config from cloud.resource where resource.status = Deleted and api.name = 'aws-securityhub-hub' AND json.rule = SubscribedAt exists```,test-resource-status ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind contains functionapp and kind does not contain workflowapp and kind does not equal app and properties.state equal ignore case running and ((properties.publicNetworkAccess exists and properties.publicNetworkAccess equal ignore case Enabled) or (properties.publicNetworkAccess does not exist)) and config.ipSecurityRestrictions[?any((action equals Allow and ipAddress equals Any) or (action equals Allow and ipAddress equals 0.0.0.0/0))] exists'```,Azure Function app configured with public network access ```config from cloud.resource where api.name = 'aws-iam-service-last-accessed-details' AND json.rule = '(arn contains :role or arn contains :user) and serviceLastAccesses[?any(serviceNamespace contains cloudtrail and totalAuthenticatedEntities any equal 0)] exists' as X; config from cloud.resource where api.name = 'aws-iam-get-policy-version' AND json.rule = 'isAttached is true and (document.Statement[?any(Effect equals Allow and (Action[*] contains DeleteTrail or Action contains DeleteTrail or Action contains cloudtrail:* or Action[*] contains cloudtrail:*))] exists)' as Y; filter '($.Y.entities.policyRoles[*].roleName exists and $.X.arn contains $.Y.entities.policyRoles[*].roleName) or ($.Y.entities.policyUsers[*].userName exists and $.X.arn contains $.Y.entities.policyUsers[*].userName)'; show X;```,AWS IAM role/user with unused CloudTrail delete or full permission "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-service-bus-namespace' AND json.rule = sku.tier equals ""Premium"" and properties.status equals ""Active"" and networkRuleSets[*].properties.defaultAction equals ""Allow"" and networkRuleSets[*].properties.publicNetworkAccess equals Enabled```",Azure Service bus namespace configured with overly permissive network access "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-roles' AND json.rule = role.assumeRolePolicyDocument.Statement[*].Action contains ""sts:AssumeRoleWithWebIdentity"" and role.assumeRolePolicyDocument.Statement[*].Principal.Federated contains ""cognito-identity.amazonaws.com"" and role.assumeRolePolicyDocument.Statement[*].Effect contains ""Allow"" and role.assumeRolePolicyDocument.Statement[*].Condition.StringEquals does not contain ""cognito-identity.amazonaws.com:aud""```",AWS Cognito service role does not have identity pool verification "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = metadata.items[?any(key contains ""serial-port-enable"" and value contains ""true"")] exists and (status equals RUNNING and name does not start with ""gke-"")```",GCP VM instances have serial port access enabled "```config from cloud.resource where api.name = 'azure-cognitive-services-account-diagnostic-settings' AND json.rule = (properties.logs[?any(enabled equal ignore case ""true"")] exists or properties.metrics[?any( enabled equal ignore case ""true"" )] exists) and properties.storageAccountId exists as X; config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = 'totalPublicContainers > 0 and (properties.allowBlobPublicAccess is true or properties.allowBlobPublicAccess does not exist) and properties.publicNetworkAccess equal ignore case Enabled and networkRuleSet.virtualNetworkRules is empty and (properties.privateEndpointConnections is empty or properties.privateEndpointConnections does not exist)' as Y; filter '$.X.properties.storageAccountId contains $.Y.id'; show Y;```",Azure Storage Account storing Cognitive service diagnostic logs is publicly accessible ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-compute-instance' AND json.rule = instanceOptions.areLegacyImdsEndpointsDisabled is false```,OCI Compute Instance has Legacy MetaData service endpoint enabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dax-cluster' AND json.rule = Status equals ""available"" and SSEDescription.Status equals ""DISABLED""```",AWS DAX cluster not configured with encryption at rest ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = 'processing is false and (elasticsearchClusterConfig.zoneAwarenessEnabled is false or elasticsearchClusterConfig.zoneAwarenessEnabled does not exist)'```,AWS Elasticsearch domain has Zone Awareness set to disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-private-endpoint' AND json.rule = properties.privateLinkServiceConnections[*].properties.privateLinkServiceId is not empty and properties.privateLinkServiceConnections[*].properties.privateLinkServiceId contains id```,Test-Uilian ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-authorization-policy' AND json.rule = defaultUserRolePermissions.permissionGrantPoliciesAssigned[*] contains microsoft-user-default-legacy```,Azure AD Users can consent to apps accessing company data on their behalf is enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = 'user does not end with @yourcompanydomainname and user does not end with gserviceaccount.com'```,CUSTOMIZE: Non-corporate accounts have access to Google Cloud Platform (GCP) resources ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'config.isPhpVersionLatest exists and config.isPhpVersionLatest equals false'```,Azure App Service Web app doesn't use latest PHP version ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-loadbalancer' AND json.rule = profile.family equal ignore case application and operating_status equal ignore case online and pools[?any( health_monitor.type does not equal ignore case https )] exists```,IBM Cloud Application Load Balancer for VPC has backend pool with health check protocol not configured with HTTPS "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""cloud-object-storage"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and (attributes[?any( name is member of (""resource"",""resourceGroupId"",""serviceInstance"",""prefix""))] does not exist or attributes[?any( name equal ignore case ""resourceType"" and value equal ignore case ""bucket"" )] exists ) )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Cloud object storage buckets ```config from cloud.resource where cloud.account = 'Aws_sand_2743_Dipankar_Again' AND api.name = 'aws-configservice-describe-configuration-recorders' AND json.rule = 'status.recording is true and status.lastStatus equals SUCCESS and recordingGroup.allSupported is true' as X; config from cloud.resource where api.name = 'aws-region' AND json.rule = optInStatus equals opted-in or optInStatus equals opt-in-not-required as Y; filter '$.X.region equals $.Y.regionName'; show X; count(X) less than 1```,NSK test AWS config recorder "```config from cloud.resource where cloud.account = 'Bikram-Personal-AWS Account' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",bikram-test-public-s3-bucket ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 1433 or fromPort == 1433) or (toPort > 1433 and fromPort < 1433)))] exists)```,Copy of AWS Security Group allows all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dynamodb-describe-table' AND json.rule = 'ssedescription does not exist or (ssedescription exists and ssedescription.ssetype == AES256)'```,AWS DynamoDB encrypted using AWS owned CMK instead of AWS managed CMK ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equals VirtualMachines and properties.pricingTier equal ignore case Standard and properties.subPlan equal ignore case P2)] does not exist or pricings[?any(name equals Dns and properties.deprecated is false and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud set to Off for DNS ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = serverAdmins does not exist or serverAdmins[*] size equals 0 or (serverAdmins[*].properties.administratorType exists and serverAdmins[*].properties.administratorType does not equal ActiveDirectory and serverAdmins[*].properties.login is not empty)```,Azure SQL server not configured with Active Directory admin authentication ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-redis-instances-list' AND json.rule = state equal ignore case ready and authEnabled is false```,GCP Memorystore for Redis instance has AUTH disabled ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' AND json.rule = status.state does not contain TERMINATING as X; config from cloud.resource where api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 8088 or fromPort == 8088) or (toPort > 8088 and fromPort < 8088)))] exists) as Y; filter '$.X.ec2InstanceAttributes.emrManagedMasterSecurityGroup equals $.Y.groupId or $.X.ec2InstanceAttributes.additionalMasterSecurityGroups[*] contains $.Y.groupId'; show X;```,AWS EMR cluster Master Security Group allows all traffic to port 8088 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' as X; config from cloud.resource where api.name = 'aws-rds-describe-db-parameter-groups' AND json.rule = (((dbparameterGroupFamily starts with ""postgres"" or dbparameterGroupFamily contains ""sqlserver"") and (['parameters'].['rds.force_ssl'].['parameterValue'] does not equal 1 or ['parameters'].['rds.force_ssl'].['parameterValue'] does not exist)) or ((dbparameterGroupFamily starts with ""mariadb"" or dbparameterGroupFamily starts with ""mysql"") and (parameters.require_secure_transport.parameterValue does not equal 1 or parameters.require_secure_transport.parameterValue does not exist)) or (dbparameterGroupFamily contains ""db2-ae"" and (parameters.db2comm.parameterValue does not equal ignore case ""SSL"" or parameters.db2comm.parameterValue does not exist))) as Y; filter '$.X.dbparameterGroups[*].dbparameterGroupArn equals $.Y.dbparameterGroupArn' ; show X;```",AWS RDS database instance not configured with encryption in transit ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-apigateway-get-stages' AND json.rule = webAclArn does not exist or webAclArn does not start with arn:aws:wafv2```,AWS API Gateway REST API not configured with AWS Web Application Firewall v2 (AWS WAFv2) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-networkfirewall-firewall' AND json.rule = FirewallStatus.Status equals READY and Firewall.DeleteProtection is false```,AWS Network Firewall delete protection is disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-networks-subnets-list' AND json.rule = purpose does not contain INTERNAL_HTTPS_LOAD_BALANCER and purpose does not contain REGIONAL_MANAGED_PROXY and purpose does not contain GLOBAL_MANAGED_PROXY and purpose does not contain PRIVATE_SERVICE_CONNECT and (enableFlowLogs is false or enableFlowLogs does not exist)```,GCP VPC Flow logs for the subnet is set to Off ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or requireLowercaseCharacters is false or requireLowercaseCharacters does not exist'```,AWS IAM password policy does not have a lowercase character ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = 'status equals ISSUED and (_DateTime.ageInDays($.notAfter) > -31)'```,AWS Certificate Manager (ACM) has certificates expiring in 30 days or less ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-instances-container-group' AND json.rule = properties.provisioningState equals Succeeded and properties.containers[*].properties.environmentVariables[*] exists and properties.containers[*].properties.environmentVariables[*].value exists```,Azure Container Instance environment variable with regular value type "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-authorization-policy' AND json.rule = defaultUserRolePermissions.permissionGrantPoliciesAssigned[*] does not contain ""ManagePermissionGrantsForSelf.microsoft-user-default-low""```",Azure Microsoft Entra ID users can consent to apps accessing company data on their behalf not set to verified publishers "```config from cloud.resource where api.name = 'aws-ecs-service' AND json.rule = networkConfiguration.awsvpcConfiguration.assignPublicIp exists and networkConfiguration.awsvpcConfiguration.assignPublicIp equal ignore case ""ENABLED""```",AWS ECS services have automatic public IP address assignment enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_validate_compliance_hyperion_policy_ss_finding_2 ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'privateClusterConfig.enablePrivateNodes does not exist or privateClusterConfig.enablePrivateNodes is false'```,GCP Kubernetes Engine Clusters not configured with private nodes feature ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = type equals application and ['attributes'].['routing.http.drop_invalid_header_fields.enabled'] is false```,AWS Application Load Balancer (ALB) is not configured to drop HTTP headers ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-guardduty-detector' AND json.rule = status does not equal ENABLED```,AWS GuardDuty detector is not enabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-instance' AND json.rule = 'ramRoleName is empty'```,Alibaba Cloud ECS instance RAM role not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecr-get-repository-policy' AND json.rule = policy.Statement[?any((Principal equals * or Principal.AWS contains *) and Effect equals Allow and Condition does not exist)] exists```,AWS Private ECR repository policy is overly permissive ```config from cloud.resource where api.name = 'azure-app-service-basic-publishing-credentials-policies' AND json.rule = properties.allow is true as X; config from cloud.resource where api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running as Y; filter '$.X.id contains $.Y.id'; show Y;```,Azure App Service basic authentication enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-eks-describe-cluster' AND json.rule = resourcesVpcConfig.securityGroupIds[*] size greater than 1```,AWS EKS cluster control plane assigned multiple security groups "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and diagnosticSettings.value[*].properties.workspaceId does not equal ignore case ""/subscriptions/8dff688e-d9b0-477c-b2b0-b0e729fb06bd/resourceGroups/rg-analytics-sh-prd-scus/providers/Microsoft.OperationalInsights/workspaces/log-sh-workspace""```",test-p3 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-subscription-tenantpolicy' AND json.rule = properties.blockSubscriptionsIntoTenant is false or properties.blockSubscriptionsLeavingTenant is false```,Azure subscription permission for Microsoft Entra tenant is set to 'Allow everyone' ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals RUNNING and privateClusterConfig exists and privateClusterConfig.enablePrivateEndpoint does not exist```,GCP Kubernetes Engine private cluster has private endpoint disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ssm-parameter' AND json.rule = 'type does not contain SecureString'```,AWS SSM Parameter is not encrypted ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Copy of Copy of Copy of build information ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = description.availabilityZones[*] size less than 2```,AWS Classic Load Balancer not configured to span multiple Availability Zones ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-instances-container-group' AND json.rule = properties.provisioningState equals Succeeded and (identity.type does not exist or (identity.type exists and identity.type equal ignore case None))```,Azure Container Instance not configured with the managed identity "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-notebook-instance' AND json.rule = state equals ""ACTIVE"" and shieldedInstanceConfig.enableIntegrityMonitoring is false```",GCP Vertex AI Workbench user-managed notebook has Integrity monitoring disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipProtocol equals tcp or ipProtocol equals icmp or ipProtocol equals icmpv6 or ipProtocol equals udp) and (ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0))] exists)```,Copy of navnon-onboarding-policy "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-policy-assignments' AND json.rule = '((name == SecurityCenterBuiltIn and properties.parameters.jitNetworkAccessMonitoringEffect.value equals Disabled) or (name == SecurityCenterBuiltIn and properties.parameters[*] is empty and properties.displayName does not start with ""ASC Default""))'```",Azure Microsoft Defender for Cloud JIT network access monitoring is set to disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Copy of Copy of build information "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = roles contains roles/editor or roles contains roles/owner and (user does not start with g-bootstrap-svcacct-terraform and user does not equal ""g-devops-admin@cna.com"" and user does not equal ""g-atos-devsecops@cna.com"" and user does not contain ""iam.gserviceaccount.com"") and (user does not contain ""appspot"" and user does not contain ""cloud"" and user does not contain ""developer"")```",GM-Mukhtar-AyawDaw ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-machine-learning-datastores' AND json.rule = (properties.datastoreType equal ignore case AzureFile or properties.datastoreType equal ignore case AzureBlob) and properties.credentials.credentialsType equal ignore case AccountKey```,Azure Machine Learning workspace Storage account Datastore using Account key based authentication ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-monitor-log-profiles-list' AND json.rule = 'isLegacy is true and properties.isCapturingLogsForAllRegions is false'```,Azure log profile not capturing activity logs for all regions ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-data-factory-v2' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.publicNetworkAccess equal ignore case Enabled```,Azure Data Factory (V2) configured with overly permissive network access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service-environment' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.clusterSettings exists and properties.clusterSettings[?any(name equal ignore case FrontEndSSLCipherSuiteOrder)] does not exist```,Azure App Service Environment configured with weak TLS cipher suites "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equal ignore case Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and access equal ignore case Allow and direction equal ignore case Inbound and ((protocol equal ignore case Tcp and (destinationPortRange contains * or destinationPortRange contains _Port.inRange(80,80) or destinationPortRange contains _Port.inRange(443,443) or destinationPortRanges any equal * or destinationPortRanges[*] contains _Port.inRange(80,80) or destinationPortRanges contains _Port.inRange(443,443) )) or (protocol contains * and (destinationPortRange contains _Port.inRange(80,80) or destinationPortRange contains _Port.inRange(443,443) or destinationPortRanges[*] contains _Port.inRange(80,80) or destinationPortRanges contains _Port.inRange(443,443) ))) )] exists```",Azure Network Security Group having Inbound rule overly permissive to HTTP(S) traffic ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-sync-service' AND json.rule = properties.provisioningState equals Succeeded and properties.incomingTrafficPolicy equals AllowAllTraffic```,Azure Storage Sync Service configured with overly permissive network access ```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded as X; config from cloud.resource where api.name = 'azure-storage-account-blob-diagnostic-settings' AND json.rule = (properties.logs[?(@.categoryGroup)] exists and properties.logs[*].enabled any true) or (properties.logs[?(@.category)] exists and properties.logs[*].enabled all true) as Y; filter 'not($.X.name equal ignore case $.Y.StorageAccountName)'; show X;```,Azure Storage account diagnostic setting for blob is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Action anyStartWith * and Resource equals * and Effect equals Allow)] exists and (policyArn exists and policyArn does not contain iam::aws:policy/AdministratorAccess)```,AWS IAM policy allows full administrative privileges "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = state.name contains ""stopped"" ```",bikram_test "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-lambda-list-functions' AND json.rule = cors exists and cors.allowOrigins[*] contains ""*"" and cors.allowMethods[*] contains ""*""```",AWS Lambda function URL having overly permissive cross-origin resource sharing permissions "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.publicNetworkAccess'] equal ignore case Enabled and firewallRules[?any(startIpAddress equals ""0.0.0.0"" and endIpAddress equals ""0.0.0.0"")] exists```",Azure SQL Server allow access to any Azure internal resources ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-authentication-policy' AND json.rule = 'passwordPolicy.isUppercaseCharactersRequired isFalse'```,OCI IAM password policy for local (non-federated) users does not have an uppercase character "```config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = status equal ignore case ""RUNNING"" and (machineType contains ""machineTypes/n2d-"" or machineType contains ""machineTypes/c2d-"") and (confidentialInstanceConfig.enableConfidentialCompute does not exist or confidentialInstanceConfig.enableConfidentialCompute is false)```",GCP Compute instances with confidential computing disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-nsg-list' AND json.rule = ' $.flowLogsSettings does not exist or $.flowLogsSettings.enabled is false or ($.flowLogsSettings.retentionPolicy.days does not equal 0 and $.flowLogsSettings.retentionPolicy.days less than 90) '```,Azure Network Watcher Network Security Group (NSG) flow logs retention is less than 90 days ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-access-analyzer' AND json.rule = status equals ACTIVE as X; config from cloud.resource where api.name = 'aws-region' AND json.rule = optInStatus does not equal not-opted-in as Y; filter '$.X.arn contains $.Y.regionName'; show X; count(X) less than 1```,AWS IAM Access analyzer is not configured "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = kind starts with app and config.minTlsVersion is member of ('1.0', '1.1')```",Azure App Service Web app doesn't use latest TLS version ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.identitycontrolplane.createpolicy and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.deletepolicy and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updatepolicy) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for IAM policy changes ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-kubernetes-cluster' AND json.rule = type equal ignore case openshift and state equal ignore case normal and serviceEndpoints.publicServiceEndpointEnabled is true```,IBM Cloud OpenShift cluster is accessible by using public endpoint ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-waf-v2-web-acl-resource' AND json.rule = '(resources.applicationLoadBalancer[*] exists or resources.apiGateway[*] exists or resources.other[*] exists) and loggingConfiguration.resourceArn does not exist'```,AWS Web Application Firewall v2 (AWS WAFv2) logging is disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Udp or protocol equals *) and (destinationPortRange contains _Port.inRange(138,138) or destinationPortRanges[*] contains _Port.inRange(138,138) ))] exists```",Azure Network Security Group allows all traffic on NetBIOS (UDP Port 138) ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function' AND json.rule = status equals ACTIVE and ingressSettings equals ALLOW_ALL```,GCP Cloud Function configured with overly permissive Ingress setting ```config from cloud.resource where api.name = 'aws-elb-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' as Y; filter '$.X.description.securityGroups[*] contains $.Y.groupId and $.Y.ipPermissionsEgress[*] is empty'; show X;```,AWS Elastic Load Balancer (ELB) has security group with no outbound rules ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-target-https-proxies' AND json.rule = 'quicOverride does not contain ENABLE'```,GCP Load balancer HTTPS target proxy is not configured with QUIC protocol "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-instances' and json.rule = state .name contains ""running""```",Khalid Test Policy ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-describe-task-definition' AND json.rule = status equals ACTIVE and containerDefinitions[*].privileged exists and containerDefinitions[*].privileged is true```,AWS ECS task definition elevated privileges enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-neptune-db-cluster' AND json.rule = Status contains available and IAMDatabaseAuthenticationEnabled is false```,AWS Neptune Cluster not configured with IAM authentication "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = type equals application and listeners[?any(protocol equals HTTPS and sslPolicy exists and sslPolicy is not member of ('ELBSecurityPolicy-TLS13-1-2-2021-06','ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04'))] exists```",AWS Application Load Balancer (ALB) is not using the latest predefined security policy ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = zone exists and locations[*] size less than 3```,GCP Kubernetes cluster not in redundant zones "```config from cloud.resource where api.name = 'aws-iam-list-roles' AND json.rule = role.assumeRolePolicyDocument.Statement[*].Action contains ""sts:AssumeRoleWithWebIdentity"" and role.assumeRolePolicyDocument.Statement[*].Principal.Federated contains ""cognito-identity.amazonaws.com"" and role.assumeRolePolicyDocument.Statement[*].Effect contains ""Allow"" and role.assumeRolePolicyDocument.Statement[*].Condition contains ""cognito-identity.amazonaws.com:amr"" and role.assumeRolePolicyDocument.Statement[*].Condition contains ""unauthenticated"" as X; config from cloud.resource where api.name = 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any(Effect equals Allow and Action contains :* and Resource equals * )] exists as Y; filter ""($.X.inlinePolicies[*].policyDocument.Statement[?(@.Effect=='Allow' && @.Resource=='*')].Action contains :* ) or ($.X.attachedPolicies[*].policyArn intersects $.Y.policyArn)""; show X;```",AWS Cognito service role with wide privileges does not validate authentication ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sagemaker-notebook-instance' AND json.rule = 'notebookInstanceStatus equals InService and kmsKeyId does not exist'```,AWS SageMaker notebook instance not configured with data encryption at rest using KMS key "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and settings.databaseFlags[?(@.name=='log_min_messages')] does not exist""```",GCP PostgreSQL instance database flag log_min_messages is not set ```config from cloud.resource where api.name = 'oci-cloudguard-configuration' AND json.rule = status does not equal ignore case ENABLED```,OCI Cloud Guard is not enabled in the root compartment of the tenancy "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = ""(policies[*].policyAttributeDescriptions[?(@.attributeValue=='true')].attributeName equals Protocol-TLSv1) or (policies[*].policyAttributeDescriptions[?(@.attributeValue=='true')].attributeName equals Protocol-SSLv3) or (policies[*].policyAttributeDescriptions[?(@.attributeValue=='true')].attributeName equals Protocol-TLSv1.1)""```",AWS Elastic Load Balancer (Classic) SSL negotiation policy configured with vulnerable SSL protocol ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equals CosmosDbs and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud set to Off for Cosmos DB ```config from cloud.resource where cloud.type = 'aws' and api.name= 'aws-es-describe-elasticsearch-domain' AND json.rule = serviceSoftwareOptions.updateAvailable exists and serviceSoftwareOptions.updateAvailable is true```,AWS OpenSearch domain does not have the latest service software version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-docdb-db-cluster' AND json.rule = Status equals available and ( BackupRetentionPeriod does not exist or BackupRetentionPeriod less than 7 )```,AWS DocumentDB clusters have backup retention period less than 7 days "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ""((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and ((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false))) or (policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false)))) and websiteConfiguration does not exist""```",AWS S3 buckets are accessible to public via ACL "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-compute' AND json.rule = properties.provisioningState equal ignore case Succeeded AND properties.properties.connectivityEndpoints.publicIpAddress exists AND properties.properties.connectivityEndpoints.publicIpAddress does not equal ignore case ""null""```",Azure Machine learning compute instance configured with public IP ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ownershipControls.rules[*] does not contain BucketOwnerEnforced```,AWS S3 bucket access control lists (ACLs) in use "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals RUNNING and masterAuthorizedNetworksConfig.enabled does not equal ""true""```",GCP Kubernetes Engine Clusters have Master authorized networks disabled ```config from cloud.resource where api.name = 'aws-ec2-autoscaling-launch-configuration' AND json.rule = associatePublicIpAddress exists and associatePublicIpAddress is true```,AWS Auto Scaling group launch configuration has public IP address assignment enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-virtual-mfa-devices' AND json.rule = 'serialNumber contains root-account-mfa-device and user.arn contains root'```,AWS root account configured with Virtual MFA "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case ""Running"" AND kind contains ""functionapp"" AND kind does not contain ""workflowapp"" AND kind does not equal ""app"" AND config.minTlsVersion does not equal ""1.2""```",Azure Function App doesn't use latest TLS version "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-nsg' AND json.rule = (securityRules[?any((((*.destinationPortRange.min == 22 or *.destinationPortRange.max == 22) or (*.destinationPortRange.min < 22 and *.destinationPortRange.max > 22)) or (protocol equals ""all"") or ((tcpOptions does not exist) and (udpOptions does not exist) and (protocol does not equal 1))) and (source equals 0.0.0.0/0 and direction equals INGRESS))] exists)```",OCI security group allows unrestricted ingress access to port 22 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.sslEnforcement equals Enabled and properties.minimalTlsVersion does not equal TLS1_2```,sailesh of liron's policy #4 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Azure PostgreSQL servers not configured with private endpoint "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function' AND json.rule = status equals ACTIVE and iamPolicy.bindings[?any(members[*] is member of (""allAuthenticatedUsers"",""allUsers""))] exists```",mkurter clone of GCP Cloud Function is publicly accessible ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-emr-describe-cluster' AND json.rule = 'status.state does not contain TERMINATING and securityConfiguration does not exist'```,AWS EMR cluster is not configured with security configuration ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-secretsmanager-describe-secret' AND json.rule = '(lastAccessedDate does not exist and _DateTime.ageInDays(createdDate) > 90) or (lastAccessedDate exists and _DateTime.ageInDays(lastAccessedDate) > 90)'```,AWS Secrets Manager secret not used for more than 90 days "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(1434,1434)""```",Alibaba Cloud Security group allow internet traffic to MS SQL Monitor port (1434) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-resource-group' AND json.rule = locks.* size equals 0```,Azure Resource Group does not have a resource lock ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-account-password-policy' AND json.rule = 'requireNumbers contains false and requireSymbols contains false and expirePasswords contains false and allowUsersToChangePassword contains false and requireLowercaseCharacters contains false and requireUppercaseCharacters contains false and maxPasswordAge does not exist and passwordReusePrevention does not exist and minimumPasswordLength==6'```,AWS IAM Password policy is unsecure ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-load-balancer' AND json.rule = 'listenerPortsAndProtocal[*].listenerProtocal equals http'```,Alibaba Cloud SLB listener that allow connection requests over HTTP ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Icmp or protocol equals *) and access equals Allow and direction equals Inbound and destinationPortRange contains *)] exists```,Azure Network Security Group allows all traffic on ICMP (Ping) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-container-instances-container-group' AND json.rule = properties.provisioningState equals Succeeded and properties.ipAddress.type exists and properties.ipAddress.type equals Public```,Azure Container Instance is not configured with virtual network ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-file-storage-file-system' as X; config from cloud.resource where api.name = 'oci-file-storage-export' AND json.rule = (exportOptions[?any(source equals 0.0.0.0/0 and requirePrivilegedSourcePort is false and access equals READ_WRITE and identitySquash equals NONE)] exists) as Y; filter '($.X.id equals $.Y.fileSystemId)';show X;```,OCI File Storage File System Export is publicly accessible "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(23,23) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on Telnet port (23) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecr-get-repository-policy' AND json.rule = lifecyclePolicy does not exist```,AWS ECR Repository not configured with a lifecycle policy "```config from cloud.resource where api.name = 'aws-ec2-describe-instances' AND json.rule = clientToken is not empty AND monitoring.state contains ""running""```",vv15_2 ```config from cloud.resource where api.name = 'oci-analytics-instance' AND json.rule = lifecycleState equal ignore case ACTIVE AND networkEndpointDetails.networkEndpointType equal ignore case PUBLIC AND (networkEndpointDetails.whitelistedServices is empty AND networkEndpointDetails.whitelistedIps is empty AND networkEndpointDetails.whitelistedVcns is empty)```,OCI Oracle Analytics Cloud (OAC) access is not restricted to allowed sources or deployed within a Virtual Cloud Network "```config from cloud.resource where cloud.type = 'gcp' and api.name = 'gcloud-sql-instances-list' AND json.rule = state equals ""RUNNABLE"" and diskEncryptionConfiguration.kmsKeyName does not exist```",GCP SQL Instance not encrypted with CMEK "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ""acl.grantsAsList[?(@.grantee=='AllUsers')].permission contains ReadAcp or acl.grantsAsList[?(@.grantee=='AllUsers')].permission contains FullControl""```",AWS S3 bucket has global view ACL permissions enabled "```config from cloud.resource where api.name = 'aws-rds-describe-db-instances' as X; config from cloud.resource where api.name = 'aws-ec2-describe-route-tables' AND json.rule = associations[*].subnetId exists and routes[?any( state equals active and gatewayId starts with igw- and (destinationCidrBlock equals ""0.0.0.0/0"" or destinationIpv6CidrBlock equals ""::/0""))] exists as Y; filter '$.X.dbsubnetGroup.subnets[*].subnetIdentifier intersects $.Y.associations[*].subnetId'; show X;```",AWS RDS instance not in private subnet "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = status equal ignore case ""available"" and snapshotRetentionLimit does not exist or snapshotRetentionLimit < 1```",AWS ElastiCache Redis cluster is not configured with automatic backup ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = listeners[?any(sslPolicy contains ELBSecurityPolicy-TLS-1-0-2015-04)] exists```,AWS Elastic Load Balancer v2 (ELBv2) SSL negotiation policy configured with weak ciphers ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.sslEnforcement equals Enabled and properties.minimalTlsVersion does not equal TLS1_2```,liron's policy #4 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kinesis-list-streams' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '$.Y.keyMetadata.keyManager == AWS and $.Y.key.keyArn == $.X.keyId and $.X.encryptionType equals KMS'; show X;```,AWS Kinesis streams encryption using default KMS keys instead of Customer's Managed Master Keys ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'loggingService does not exist or loggingService equals none'```,GCP Kubernetes Engine Clusters have Cloud Logging disabled "```config from cloud.resource where api.name = 'aws-rds-db-cluster' AND json.rule = engine equals ""aurora-mysql"" and status equals ""available"" as X; config from cloud.resource where api.name = 'aws-rds-db-cluster-parameter-group' AND json.rule = DBParameterGroupFamily contains ""aurora-mysql"" as Y; filter '$.X.dBclusterParameterGroupArn equals $.Y.DBClusterParameterGroupArn and (($.Y.parameters.server_audit_logging.ParameterValue does not exist or $.Y.parameters.server_audit_logging.ParameterValue equals 0) or ($.X.enabledCloudwatchLogsExports does not contain ""audit"" and $.Y.parameters.server_audit_logs_upload.ParameterValue equals 0))' ; show X;```",AWS Aurora MySQL DB cluster does not publish audit logs to CloudWatch Logs ```config from cloud.resource where api.name = 'gcloud-bigquery-table' AND json.rule = encryptionConfiguration.kmsKeyName does not exist```,GCP BigQuery Table not encrypted with CMEK ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.state'] equal ignore case Ready and sqlEncryptionProtectors[*].kind does not exist```,Azure SQL server Transparent Data Encryption (TDE) encryption disabled "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(21,21)""```",Alibaba Cloud Security group allow internet traffic to FTP port (21) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kinesis-list-streams' AND json.rule = 'encryptionType equals NONE or encryptionType does not exist'```,AWS Kinesis streams are not encrypted using Server Side Encryption "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and (acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists or acl.grantsAsList[?any(grantee equals AuthenticatedUsers and permission is member of (ReadAcp,Read,FullControl))] exists)) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",AWS S3 bucket publicly readable ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-instances' AND json.rule = networkInterfaces[*].association.publicIp exists```,AWS EC2 instance is assigned with public IP ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-iam-service-accounts-keys-list' AND json.rule = 'disabled is false and name contains iam.gserviceaccount.com and (_DateTime.ageInDays($.validAfterTime) > 90) and keyType equals USER_MANAGED'```,GCP User managed service account keys are not rotated for 90 days "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""sysdig-monitor"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance"",""sysdigTeam""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Cloud Monitoring Service ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ( ( publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist ) or ( publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false ) or ( publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false ) or ( publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist ) )AND policy.Statement[?any(Effect equals Allow and Action anyStartWith s3: and (Principal.AWS contains * or Principal equals *) and (Condition does not exist or Condition[*] is empty) )] exists```,AWS S3 bucket policy overly permissive to any principal "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-containers-artifacts-kubernetes-cluster-nodepool' AND json.rule = lifecycleState equal ignore case ACTIVE and (nodeConfigDetails.isPvEncryptionInTransitEnabled equal ignore case ""null"" or nodeConfigDetails.isPvEncryptionInTransitEnabled does not exist)```",OCI Kubernetes Engine Cluster boot volume is not configured with in-transit data encryption "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-global-forwarding-rule' AND json.rule = globalForwardingRules[?any( target contains ""/targetHttpProxies/"" and loadBalancingScheme contains ""EXTERNAL"" )] exists```",GCP public-facing (external) global load balancer using HTTP protocol ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_ss_update_child_policy_finding_2 "```config from cloud.resource where api.name = 'aws-cloudfront-list-distributions' AND json.rule = arn contains ""E2PTZRGF0OBZQJ"" and tags[*].key contains ""test""```",eai_test_policy_demo ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' and json.rule = keys[?any(attributes.exp equals -1 and attributes.enabled contains true)] exists and properties.enableRbacAuthorization is false```,Azure Key Vault Key has no expiration date (Non-RBAC Key vault) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-database-maria-db-server' AND json.rule = properties.userVisibleState equals Ready and properties.sslEnforcement equals Enabled and properties.minimalTlsVersion does not equal TLS1_2```,Azure MariaDB database server not using latest TLS version "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-batch-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and identity does not exist or identity.type equal ignore case ""None""```",Azure Batch account is not configured with managed identity "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(5432,5432) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on PostgreSQL port (5432) ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'hardExpiry is false'```,Alibaba Cloud RAM password policy configured to allow login after the password expires ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = 'transitEncryptionEnabled is false or transitEncryptionEnabled does not exist'```,AWS ElastiCache Redis cluster with in-transit encryption disabled (Replication group) ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-security-list' AND json.rule = ingressSecurityRules[*] size equals 0```,OCI VCN has no inbound security list ```config from cloud.resource where api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = status equals available and atRestEncryptionEnabled is true as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '($.X.kmsKeyId does not exist) or ($.X.kmsKeyId exists and $.Y.keyMetadata.keyState equals Disabled) and $.X.kmsKeyId equals $.Y.keyMetadata.arn'; show X;```,AWS ElastiCache Redis cluster encryption not configured with CMK key "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-vnet-list' AND json.rule = ['properties.virtualNetworkPeerings'][*].['properties.peeringState'] equals ""Disconnected""```",Azure virtual network peer is disconnected "```config from cloud.resource where api.name = 'aws-docdb-db-cluster' AND json.rule = Status equals ""available"" as X; config from cloud.resource where api.name = 'aws-docdb-db-cluster-parameter-group' AND json.rule = parameters.audit_logs.ParameterValue is member of ( 'disabled','none') as Y; filter '($.X.EnabledCloudwatchLogsExports.member does not contain ""audit"") or $.X.DBClusterParameterGroup equals $.Y.DBClusterParameterGroupName' ; show X;```",AWS DocumentDB cluster does not publish audit logs to CloudWatch Logs "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = status equals ""ISSUED"" and keyAlgorithm starts with ""RSA-"" and keyAlgorithm equals RSA-1024```",AWS Certificate Manager (ACM) RSA certificate key length less than 2048 "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(22,22) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",PCSUP-22411 - policy ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = '(access_key_1_active is true and access_key_1_last_rotated != N/A and _DateTime.ageInDays(access_key_1_last_rotated) > 90) or (access_key_2_active is true and access_key_2_last_rotated != N/A and _DateTime.ageInDays(access_key_2_last_rotated) > 90)'```,AWS access keys are not rotated for 90 days ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-images' AND json.rule = image.public is true and image.shared is false and image.imageOwnerAlias does not exist```,AWS Amazon Machine Image (AMI) is publicly accessible ```config from cloud.resource where api.name = 'azure-storage-account-list' as X; config from cloud.resource where api.name = 'azure-storage-account-table-diagnostic-settings' AND json.rule = properties.logs[*].enabled all true as Y; filter 'not($.X.id contains $.Y.properties.storageAccountId)'; show X;```,Azure Storage Logging is not Enabled for Table Service for Read Write and Delete requests ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.virtualnetwork.changesecuritylistcompartment and condition.eventType[*] contains com.oraclecloud.virtualnetwork.createsecuritylist and condition.eventType[*] contains com.oraclecloud.virtualnetwork.deletesecuritylist and condition.eventType[*] contains com.oraclecloud.virtualnetwork.updatesecuritylist) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for security list changes ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = description.scheme contains internet-facing```,AWS Classic Load Balancer is in use for internet-facing applications ```config from cloud.resource where api.name = 'ibm-vpc' as X; config from cloud.resource where api.name = 'ibm-vpc-flow-log-collector' as Y; filter 'not($.X.id equals $.Y.target.id)'; show X;```,IBM Cloud VPC Flow Logs not enabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'resourceUsageExportConfig.enableNetworkEgressMetering does not exist or resourceUsageExportConfig.enableNetworkEgressMetering is false'```,GCP Kubernetes Engine Clusters not configured with network traffic egress metering ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-monitor-log-profiles-list' as X; count(X) less than 1```,Azure Monitoring log profile is not configured to export activity logs "```config from cloud.resource where api.name = 'gcloud-compute-project-info' AND json.rule = commonInstanceMetadata.kind equals ""compute#metadata"" and commonInstanceMetadata.items[?any(key contains ""enable-oslogin"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and commonInstanceMetadata.items[?any(key contains ""ssh-keys"")] exists as X; config from cloud.resource where api.name = 'gcloud-compute-instances-list' AND json.rule = status equals RUNNING and ( metadata.items[?any(key exists and key contains ""block-project-ssh-keys"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and metadata.items[?any(key exists and key contains ""enable-oslogin"" and (value contains ""Yes"" or value contains ""Y"" or value contains ""True"" or value contains ""true"" or value contains ""TRUE"" or value contains ""1""))] does not exist and name does not start with ""gke-"") as Y; filter '$.Y.zone contains $.X.name'; show Y;```",HD-GCP VM instances have block project-wide SSH keys feature disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-security-groups' AND json.rule = '((groupName == default) and (ipPermissions[*] is not empty or ipPermissionsEgress[*] is not empty))'```,AWS Default Security Group does not restrict all traffic "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule = publiclyAccessible is true and masterUsername is member of (""awsuser"",""administrator"",""admin"")```",AWS Redshift cluster with commonly used master username and public access setting enabled "```config from cloud.resource where api.name = 'azure-machine-learning-workspace' AND json.rule = properties.keyVault exists as X; config from cloud.resource where api.name = 'azure-key-vault-list' AND json.rule = ""not (diagnosticSettings.value[*].properties.logs[*].enabled any equal true and diagnosticSettings.value[*].properties.logs[*].enabled size greater than 0)"" as Y; filter '$.X.properties.keyVault contains $.Y.name'; show Y;```",Azure Key vault used for machine learning workspace secrets storage is not enabled with audit logging "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-external-backend-service' AND json.rule = backends exists and ( protocol equal ignore case ""HTTP"" or protocol equal ignore case ""HTTPS"" or protocol equal ignore case ""HTTP2"" ) and ( logConfig.enable does not exist or logConfig.enable is false )```",GCP External Load Balancer logging is disabled ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.managedNetwork.isolationMode equal ignore case Disabled OR properties.managedNetwork.isolationMode does not exist)```,Azure Machine Learning workspace not enforced with Managed Virtual Network Isolation ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,Copy of build information "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-security-group' AND json.rule = rules[?any( remote.cidr_block equals ""0.0.0.0/0"" and direction equals ""inbound"" and ( protocol equals ""all"" or ( protocol equals ""tcp"" and ( port_max greater than 3389 and port_min less than 3389 ) or ( port_max equals 3389 and port_min equals 3389 ))))] exists```",IBM Cloud Security Group allow all traffic on RDP port (3389) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = ['properties.storageProfile'].['osDisk'].['vhd'].['uri'] exists ```,Azure Virtual Machines are not utilising Managed Disks "```config from cloud.resource where api.name = 'aws-elasticbeanstalk-environment' AND json.rule = status does not equal ""Terminated"" as X; config from cloud.resource where api.name = 'aws-elasticbeanstalk-configuration-settings' AND json.rule = configurationSettings[*].optionSettings[?any( optionName equals ""ManagedActionsEnabled"" and namespace equals ""aws:elasticbeanstalk:managedactions"" and value equals ""false"")] exists as Y; filter ' $.X.environmentName equals $.Y.configurationSettings[*].environmentName and $.X.applicationName equals $.Y.configurationSettings[*].applicationName'; show X;```",AWS Elastic Beanstalk environment managed platform updates are not enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = isMasterVersionSupported exists AND isMasterVersionSupported does not equal ""true""```",GCP GKE unsupported Master node version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sagemaker-notebook-instance' AND json.rule = notebookInstanceStatus equals InService and subnetId does not exist```,AWS SageMaker notebook instance is not placed in VPC ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-instances' AND json.rule = iamInstanceProfile.arn does not exist and state.code equals 16```,AWS EC2 Instance IAM Role not enabled "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains CreateNetworkAcl and $.X.filterPattern contains CreateNetworkAclEntry and $.X.filterPattern contains DeleteNetworkAcl and $.X.filterPattern contains DeleteNetworkAclEntry and $.X.filterPattern contains ReplaceNetworkAclEntry and $.X.filterPattern contains ReplaceNetworkAclAssociation) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for Network Access Control Lists (NACL) changes "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and settings.databaseFlags[?any(name contains log_hostname and value contains on)] exists""```",GCP PostgreSQL instance database flag log_hostname is not set to off "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/publicIPAddresses/delete"" as X; count(X) less than 1```",Azure Activity log alert for Delete public IP address rule does not exist ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = policy.Statement[?any(Effect equals Deny and Action equals s3:* and (Principal.AWS equals * or Principal equals *) and Condition.Bool.aws:SecureTransport contains false )] does not exist```,AWS S3 bucket policy does not enforce HTTPS request only "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and diagnosticSettings.value[*].properties.workspaceId does not equal ignore case ""/subscriptions/8dff688e-d9b0-477c-b2b0-b0e729fb06bd/resourceGroups/rg-analytics-sh-prd-scus/providers/Microsoft.OperationalInsights/workspaces/log-sh-workspace""```",bboiko test 04 - policy ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = 'webACLId is empty'```,AWS CloudFront web distribution with AWS Web Application Firewall (AWS WAF) service disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-lb-list' AND json.rule = diagnosticSettings.value[*] size equals 0```,Azure Load Balancer diagnostics logs are disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(110,110) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on POP3 port (110) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = advancedSecurityOptions.enabled is false and advancedSecurityOptions.internalUserDatabaseEnabled is false```,AWS OpenSearch Fine-grained access control is disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cognitive-services-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.privateEndpointConnections[*] is empty```,Azure Cognitive Services account not configured with private endpoint ```config from cloud.resource where api.name = 'aws-apigateway-get-stages' AND json.rule = methodSettings.[*].loggingLevel does not exist or methodSettings.[*].loggingLevel equal ignore case off as X; config from cloud.resource where api.name = 'aws-apigateway-get-rest-apis' as Y; filter ' $.X.restApi equal ignore case $.Y.id '; show Y;```,AWS API Gateway REST API execution logging disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = ""state.code contains active and ['attributes'].['access_logs.s3.enabled'] contains false""```",AWS Elastic Load Balancer v2 (ELBv2) with access log disabled "```config from cloud.resource where cloud.type = 'aws' and api.name='aws-iam-get-credential-report' AND json.rule='user does not equal """" and password_enabled equals true and mfa_active is false'```",AWS MFA not enabled for IAM users "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(1521,1521) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on Oracle DB port (1521) ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'legacyAbac.enabled equals true'```,GCP Kubernetes Engine Clusters have Legacy Authorization enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,AWS CloudFront distributions does not have a default root object configured ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = vulnerabilityAssessments[*].properties.storageContainerPath exists and vulnerabilityAssessments[*].properties.recurringScans.isEnabled is false```,Azure SQL Server ADS Vulnerability Assessment Periodic recurring scans is disabled ```config from cloud.resource where api.name = 'aws-cloudfront-list-distributions' AND json.rule = webACLId is not empty as X; config from cloud.resource where api.name = 'aws-waf-v2-global-web-acl-resource' AND json.rule =(webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesAnonymousIpList or webACL.postProcessFirewallManagerRuleGroups.firewallManagerStatement.name does not contain AWSManagedRulesKnownBadInputsRuleSet) and NOT ( webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesAnonymousIpList and webACL.rules[*].statement.managedRuleGroupStatement.name contains AWSManagedRulesKnownBadInputsRuleSet ) as Y; filter '$.Y.webACL.arn equals $.X.webACLId'; show X;```,cloneAWS CloudFront attached WAFv2 WebACL is not configured with AMR for Log4j Vulnerability ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = 'backupRetentionPeriod equals 0 or backupRetentionPeriod does not exist'```,AWS RDS instance without Automatic Backup setting "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy wvpvq ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind starts with app and config.http20Enabled equals false'```,Azure App Service Web app doesn't use HTTP 2.0 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-configservice-describe-configuration-recorders' AND json.rule = '(status.recording is true and status.lastStatus equals SUCCESS) and (recordingGroup.allSupported is false or recordingGroup.includeGlobalResourceTypes is false)'```,AWS Config must record all possible resources ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-compute-instance' AND json.rule = agentConfig.isMonitoringDisabled is true```,OCI Compute Instance has monitoring disabled "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-activity-tracker-route' AND json.rule = rules[?any( (locations[*] equal ignore case ""global"") or (locations[*] equals ""*"") )] exists as X; count(X) less than 1```",IBM Cloud Activity Tracker Event Routing is not configured to collect global events ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule ='loggingStatus.loggingEnabled is false'```,cloned copy - RLP-93423 - 1 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-snapshots' AND json.rule = 'snapshot.status equals available and snapshot.encrypted is false'```,AWS RDS DB snapshot is not encrypted "```config from cloud.resource where api.name = 'aws-vpc-transit-gateway' AND json.rule = isShared is false and options.autoAcceptSharedAttachments exists and options.autoAcceptSharedAttachments equal ignore case ""enable""```",AWS Transit Gateway auto accept vpc attachment is enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = 'domainValidationOptions[*].domainName contains *'```,AWS ACM Certificate with wildcard domain name "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals ""RUNNING"" and nodePools[?any(config.bootDiskKmsKey does not exist)] exists```",GCP GKE cluster node boot disk not encrypted with CMEK ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-monitor-log-profiles-list' AND json.rule = 'isLegacy is true and (properties.categories[*] does not contain Write or properties.categories[*] does not contain Delete or properties.categories[*] does not contain Action)'```,Azure Monitor log profile does not capture all activities ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and Action contains sts:AssumeRole and Resource anyStartWith * and Condition does not exist)] exists and policyArn does not contain iam::aws```,AWS IAM policy allows assume role permission across all services "```config from cloud.resource where cloud.type ='aws' and api.name = 'aws-rds-describe-db-snapshots' AND json.rule = ""attributes[?(@.attributeName=='restore')].attributeValues[*] size != 0 and _AWSCloudAccount.isRedLockMonitored(attributes[?(@.attributeName=='restore')].attributeValues) is false""```",AWS RDS Snapshot with access for unmonitored cloud accounts "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' AND json.rule = 'osType does not exist and managedBy exists and (encryptionSettings does not exist or encryptionSettings.enabled is false) and encryption.type is not member of (""EncryptionAtRestWithCustomerKey"", ""EncryptionAtRestWithPlatformAndCustomerKeys"")'```",Azure VM data disk is encrypted with the default encryption key instead of ADE/CMK "```config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.encryption.keySource equal ignore case ""Microsoft.Keyvault"" as X; config from cloud.resource where api.name = 'azure-key-vault-list' and json.rule = properties.enableRbacAuthorization is false and properties.accessPolicies[*].permissions exists and (properties.accessPolicies[*].permissions.keys[*] intersects ('Decrypt', 'Encrypt', 'Release', 'Purge', 'all') or properties.accessPolicies[*].permissions.secrets[*] intersects ('Purge', 'all') or properties.accessPolicies[*].permissions.certificates[*] intersects ('Purge', 'all')) as Y; filter '$.Y.properties.vaultUri contains $.X.properties.encryption.keyvaultproperties.keyvaulturi'; show X;```",Azure Storage account encryption key configured by access policy with privileged operations ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = nodePools[?any(management.autoUpgrade does not exist or management.autoUpgrade is false)] exists```,GCP Kubernetes cluster node auto-upgrade configuration disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-bigquery-dataset-list' AND json.rule = iamPolicy.bindings[?any(members[*] equals ""allUsers"" or members[*] equals ""allAuthenticatedUsers"")] exists```",GCP BigQuery dataset is publicly accessible "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains ""ConsoleLogin"" and ($.X.filterPattern contains ""MFAUsed !="" or $.X.filterPattern contains ""MFAUsed!="") and $.X.filterPattern contains ""Yes"" and ($.X.filterPattern contains ""userIdentity.type ="" or $.X.filterPattern contains ""userIdentity.type="") and $.X.filterPattern contains ""IAMUser"" and ($.X.filterPattern contains ""responseElements.ConsoleLogin ="" or $.X.filterPattern contains ""responseElements.ConsoleLogin="") and $.X.filterPattern contains ""Success"") and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for management console sign-in without MFA "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" AND gceSetup.metadata.notebook-disable-root is false```",GCP Vertex AI Workbench Instance has root access enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule = publiclyAccessible is true```,AWS Redshift cluster instance with public access setting enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='log_duration')].properties.value equals OFF or configurations.value[?(@.name=='log_duration')].properties.value equals off""```",Azure PostgreSQL database server with log duration parameter disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = ['properties.storageProfile'].osDisk.vhd.uri exists as X; config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.encryption.keySource equals ""Microsoft.Storage"" as Y; filter ""$.['X'].['properties.storageProfile'].['osDisk'].['vhd'].['uri'] contains $.Y.name""; show Y;```",Azure Storage account containing VHD OS disk is not encrypted with CMK ```config from cloud.resource where api.name = 'gcloud-logging-sinks-list' AND json.rule = 'destination.bucket exists' as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' AND json.rule = (retentionPolicy does not exist ) as Y; filter '($.X.destination.bucket contains $.Y.name)'; show Y;```,GCP Log bucket retention policy not enabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",Low of AWS S3 bucket publicly readable "```config from cloud.resource where api.name = 'gcloud-access-approval-project-approval-setting' AND json.rule = enrolledServices[*].cloudProduct does not equal ""all""```",GCP Cloud ' Access Approval' is not enabled "```config from cloud.resource where api.name = 'aws-glue-job' AND json.rule = Command.BucketName exists and Command.BucketName contains ""aws-glue-assets-"" as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""aws-glue-assets-"" as Y; filter 'not ($.X.Command.BucketName equals $.Y.bucketName)' ; show X;```",aws glue shadow "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (destinationPortRange contains _Port.inRange(3389,3389) or destinationPortRanges[*] contains _Port.inRange(3389,3389) ))] exists```",Azure Network Security Group allows all traffic on RDP Port 3389 "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-object-storage-bucket' AND json.rule = activity_tracking does not exist or activity_tracking.write_data_events does not equal ignore case ""true"" or activity_tracking.read_data_events does not equal ignore case ""true""```",IBM Cloud Object Storage bucket is not enabled with IBM Activity Tracker ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function' AND json.rule = status equals ACTIVE and vpcConnector does not exist```,GCP Cloud Function not enabled with VPC connector ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and tokens[?any( properties.status contains enabled )] exists```,Azure Container Registry with repository scoped access token enabled "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-nsg' AND json.rule = (securityRules[?any((((*.destinationPortRange.min == 3389 or *.destinationPortRange.max == 3389) or (*.destinationPortRange.min < 3389 and *.destinationPortRange.max > 3389)) or (protocol equals ""all"") or ((tcpOptions does not exist) and (udpOptions does not exist) and (protocol does not equal 1))) and (source equals 0.0.0.0/0 and direction equals INGRESS))] exists)```",OCI Network Security Group allows all traffic on RDP port (3389) "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any(tags does not exist and attributes[?any( value equal ignore case ""service"" and name equal ignore case ""serviceType"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name equal ignore case ""region"")] does not exist )] exists and subjects[?any( attributes[?any( name contains ""access_group_id"")] exists )] exists as X; config from cloud.resource where api.name = 'ibm-iam-access-group-member' as Y; config from cloud.resource where api.name = 'ibm-iam-access-group' as Z; filter '$.X.subjects[*].attributes[*].value contains $.Y.access_group.id and $.Y.access_group.id equal ignore case $.Z.id'; show Z;```",IBM Cloud Access group with members having administrator role permission for All Identity and Access enabled services ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-active-directory-authorization-policy' AND json.rule = not (allowInvitesFrom equal ignore case adminsAndGuestInviters OR allowInvitesFrom equal ignore case none)```,Azure Guest User Invite not restricted to users with specific admin role "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = powerState equal ignore case ""PowerState/running"" and (['properties.osProfile'].['linuxConfiguration'] exists and ['properties.osProfile'].['linuxConfiguration'].['disablePasswordAuthentication'] is false)```",Azure Virtual Machine (Linux) does not authenticate using SSH keys ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_add_remove_child_policy_hyperion_policy_ss_finding_2 ```config from cloud.resource where api.name = 'alibaba-cloud-action-trail' as X; config from cloud.resource where api.name = 'alibaba-cloud-oss-bucket-info' as Y; filter '$.X.isLogging is true and $.X.ossBucketName equals $.Y.bucket.name and $.Y.cannedACL does not contain Private'; show Y;```,Alibaba Cloud ActionTrail log OSS bucket is publicly accessible ```config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' AND json.rule = loggingConfiguration.targetBucket does not exist as Y; filter '$.X.s3BucketName equals $.Y.bucketName'; show Y;```,AWS S3 CloudTrail bucket for which access logging is disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' and json.rule = 'osType exists and managedBy exists and (encryptionSettings does not exist or encryptionSettings.enabled == false) and encryption.type is not member of (""EncryptionAtRestWithCustomerKey"", ""EncryptionAtRestWithPlatformAndCustomerKeys"")'```",Azure VM OS disk is encrypted with the default encryption key instead of ADE/CMK "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-compute' AND json.rule = properties.provisioningState equal ignore case ""Succeeded"" and properties.properties.state equal ignore case ""Running"" and properties.properties.osImageMetadata.isLatestOsImageVersion is false```",Azure Machine Learning compute instance not running latest OS Image Version "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '$.Y.conditions[*].metricThresholdFilter contains $.X.name and ($.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="") and ($.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="") and $.X.filter contains ""gcs_bucket"" and ($.X.filter contains ""protoPayload.methodName="" or $.X.filter contains ""protoPayload.methodName ="") and ($.X.filter does not contain ""protoPayload.methodName!="" and $.X.filter does not contain ""protoPayload.methodName !="") and $.X.filter contains ""storage.setIamPermissions""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for Cloud Storage IAM permission changes ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-gateway-waf-policy' AND json.rule = properties.applicationGateways[*].id size greater than 0 and properties.policySettings.state equal ignore case Enabled and properties.policySettings.mode does not equal ignore case Prevention```,Azure Application Gateway WAF policy is not enabled in prevention mode "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ""$.serverSecurityAlertPolicy.properties.retentionDays does not exist or $.serverSecurityAlertPolicy.properties.state equals Disabled""```",Azure SQL server Defender setting is set to Off ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' as X; count(X) greater than 0```,Copy of GCP API key is created for a project1 "```config from cloud.resource where api.name = 'aws-emr-studio' AND json.rule = DefaultS3Location exists and DefaultS3Location contains ""aws-emr-studio-"" as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""aws-emr-studio-"" as Y; filter 'not ($.X.BucketName equals $.Y.bucketName)' ; show X;```",AWS EMR shadow resource ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any((sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and protocol equals * and access equals Allow and destinationPortRange contains * and direction equals Inbound)] exists```,Azure Network Security Group having Inbound rule overly permissive to all traffic on any protocol ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-subnet' and json.rule = public_gateway exists```,IBM Cloud Virtual Private Cloud (VPC) Subnet has public gateways attached ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elasticache-describe-replication-groups' AND json.rule = 'authTokenEnabled is false or transitEncryptionEnabled is false or authTokenEnabled does not exist or transitEncryptionEnabled does not exist'```,AWS ElastiCache Redis cluster with Redis AUTH feature disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and diagnosticSettings.value[*].properties.workspaceId does not equal ignore case ""/subscriptions/8dff688e-d9b0-477c-b2b0-b0e729fb06bd/resourceGroups/rg-analytics-sh-prd-scus/providers/Microsoft.OperationalInsights/workspaces/log-sh-workspace""```",test-3 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-roles' as X; config from cloud.resource where api.name = 'aws-iam-get-policy-version' as Y; filter ""($.X.inlinePolicies[*].policyDocument.Statement[?(@.Effect=='Allow' && @.Resource=='*')].Action any equal *) or ($.X.attachedPolicies[*].policyArn contains $.Y.policyArn and $.Y.document.Statement[?(@.Effect=='Allow' && @.Resource=='*')].Action any equal *)""; show X;```",AWS IAM Roles with Administrator Access Permissions "```config from cloud.resource where finding.type IN ( 'Host Vulnerability', 'Serverless Vulnerability' , 'Compliance' , 'AWS Inspector Runtime Behavior Analysis' , 'AWS Inspector Security Best Practices' , 'AWS GuardDuty Host' , 'AWS GuardDuty IAM' ) ```",Hostfindings test ```config from cloud.resource where api.name = 'aws-mq-broker' AND json.rule = brokerState equal ignore case RUNNING as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equal ignore case Enabled and keyMetadata.keyManager does not equal ignore case CUSTOMER as Y; filter '$.X.encryptionOptions.kmsKeyId equals $.Y.keyMetadata.arn or $.X.encryptionOptions.useAwsOwnedKey is true'; show X;```,AWS MQ Broker is not encrypted by Customer Managed Key (CMK) ```config from cloud.resource where api.name = 'oci-object-storage-bucket' as X; config from cloud.resource where api.name = 'oci-logging-logs' as Y; filter 'not ($.X.name contains $.Y.configuration.source.resource and $.Y.configuration.source.service contains objectstorage and $.Y.configuration.source.category contains write and $.Y.lifecycleState equal ignore case ACTIVE )'; show X;```,OCI Object Storage Bucket write level logging is disabled ```config from cloud.resource where api.name = 'azure-active-directory-user-registration-details' AND json.rule = isMfaRegistered is false as X; config from cloud.resource where api.name = 'azure-active-directory-user' AND json.rule = accountEnabled is true as Y; filter '$.X.userDisplayName equals $.Y.displayName'; show X;```,Azure Active Directory MFA is not enabled for user ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'kind starts with app and properties.clientCertEnabled equals false'```,Azure App Service Web app client certificate is disabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-service-bus-namespace' AND json.rule = properties.status equals ""Active"" and (properties.disableLocalAuth does not exist or properties.disableLocalAuth is false)```",Bobby Copy of Azure Service bus namespace not configured with Azure Active Directory (Azure AD) authentication ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = encryption.defaultKmsKeyName does not exist```,GCP Storage Bucket encryption not configured with Customer-Managed Encryption Key (CMEK) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(properties.pricingTier does not equal Standard and (properties.deprecated does not exist or properties.deprecated is false))] exists```,Azure Microsoft Defender for Cloud Defender plans is set to Off ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals VirtualMachines and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for Servers "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-security-list' AND json.rule = (ingressSecurityRules[?any((source equals 0.0.0.0/0) and (((*.destinationPortRange.min == 3389 or *.destinationPortRange.max == 3389) or (*.destinationPortRange.min < 3389 and *.destinationPortRange.max > 3389)) or (protocol equals ""all"") or ((tcpOptions does not exist) and (udpOptions does not exist) and (protocol does not equal 1))))] exists)```",OCI security lists allows unrestricted ingress access to port 3389 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-server-certificates' AND json.rule = '(_DateTime.ageInDays($.expiration) > -1)'```,AWS IAM has expired SSL/TLS certificates ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sagemaker-notebook-instance' AND json.rule = 'notebookInstanceStatus equals InService and directInternetAccess equals Enabled'```,AWS SageMaker notebook instance configured with direct internet access feature ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = 'properties.sslEnforcement does not equal Enabled'```,Azure MySQL Database Server SSL connection is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or maxPasswordAge !isType Integer or maxPasswordAge < 1 or maxPasswordAge does not exist'```,AWS IAM password policy does not have password expiration period ```config from cloud.resource where cloud.type = 'gcp' and api.name = 'gcloud-cloud-spanner-database' AND json.rule = state equal ignore case ready AND enableDropProtection does not exist```,GCP Spanner Database drop protection disabled "```config from cloud.resource where api.name= 'gcloud-compute-instances-list' and json.rule = ['metadata'].items does not exist and (status equals RUNNING and name does not start with ""gke-"")```",GCP VM Instances without any Custom metadata information "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""logdnaat"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""logGroup"",""resourceType"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""iam-ServiceId"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-service-id' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.id'; show Y;```",IBM Cloud Service ID with IAM policies provide administrative privileges for Activity Tracker Service ```config from cloud.resource where api.name = 'ibm-vpc-block-storage-volume' as X; config from cloud.resource where api.name = 'ibm-key-protect-registration' as Y;filter 'not($.Y.resourceCrn equals $.X.crn)' ; show X;```,IBM Cloud Block Storage volume for VPC is not encrypted with BYOK ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-db-list' AND json.rule = transparentDataEncryption is false```,Azure SQL database Transparent Data Encryption (TDE) encryption disabled "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-network-security-group' AND json.rule = rules[?any( remote.cidr_block equals ""0.0.0.0/0"" and direction equals ""inbound"" and ( protocol equals ""all"" or ( protocol equals ""tcp"" and ( port_max greater than 22 and port_min less than 22 ) or ( port_max equals 22 and port_min equals 22 ))))] exists```",IBM Cloud Security Group allow all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'properties.state equals Running and ((config.javaVersion exists and config.javaVersion does not equal 1.8 and config.javaVersion does not equal 11 and config.javaVersion does not equal 17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JAVA and (config.linuxFxVersion contains 8 or config.linuxFxVersion contains 11 or config.linuxFxVersion contains 17) and config.linuxFxVersion does not contain 8-jre8 and config.linuxFxVersion does not contain 11-java11 and config.linuxFxVersion does not contain 17-java17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JBOSSEAP and config.linuxFxVersion does not contain 7-java8 and config.linuxFxVersion does not contain 7-java11 and config.linuxFxVersion does not contain 7-java17) or (config.linuxFxVersion contains TOMCAT and config.linuxFxVersion does not end with 10.0-jre8 and config.linuxFxVersion does not end with 9.0-jre8 and config.linuxFxVersion does not end with 8.5-jre8 and config.linuxFxVersion does not end with 10.0-java11 and config.linuxFxVersion does not end with 9.0-java11 and config.linuxFxVersion does not end with 8.5-java11 and config.linuxFxVersion does not end with 10.0-java17 and config.linuxFxVersion does not end with 9.0-java17 and config.linuxFxVersion does not end with 8.5-java17))'```,bbaotest2 "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and (($.X.filterPattern contains ""eventName="" or $.X.filterPattern contains ""eventName ="") and ($.X.filterPattern does not contain ""eventName!="" and $.X.filterPattern does not contain ""eventName !="") and $.X.filterPattern contains CreateTrail and $.X.filterPattern contains UpdateTrail and $.X.filterPattern contains DeleteTrail and $.X.filterPattern contains StartLogging and $.X.filterPattern contains StopLogging) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for CloudTrail configuration changes "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-virtual-server-instance' AND json.rule = status equal ignore case ""running"" AND network_interfaces[?any( floating_ips is not empty)] exists```",IBM Cloud Virtual Servers for VPC instance have floating IP address ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_ss_finding_2 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule ='loggingStatus.loggingEnabled is false'```,AWS Redshift database does not have audit logging enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-gateway' AND json.rule = ['properties.httpListeners'][*].['properties.protocol'] equals Http```,Azure Application gateways listener that allow connection requests over HTTP "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(1521,1521)""```",Alibaba Cloud Security group allow internet traffic to Oracle DB port (1521) "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-route-tables' AND json.rule = ""routes[?(@.state == 'active' && @.instanceId)].destinationCidrBlock contains 0.0.0.0/0""```",AWS NAT Gateways are not being utilized for the default route "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(23,23)""```",Alibaba Cloud Security group allow internet traffic to Telnet port (23) ```config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as X; config from cloud.resource where api.name = 'gcloud-vertex-ai-aiplatform-training-pipeline' as Y; filter ' $.Y.trainingTaskOutputDirectory contains $.X.id '; show X;```,GCP Storage Bucket storing GCP Vertex AI training pipeline output model ```config from cloud.resource where api.name = 'aws-iam-list-users' AND json.rule = createDate contains 2018```,Edited_ayiumvbvgu_ui_auto_policies_tests_name "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-security-list' AND json.rule = (ingressSecurityRules[?any((source equals 0.0.0.0/0) and (((*.destinationPortRange.min == 22 or *.destinationPortRange.max == 22) or (*.destinationPortRange.min < 22 and *.destinationPortRange.max > 22)) or (protocol equals ""all"") or ((tcpOptions does not exist) and (udpOptions does not exist) and (protocol does not equal 1))))] exists)```",OCI Security List allows all traffic on SSH port (22) ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-container-registry' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.adminUserEnabled is true```,Azure Container Registry with local admin account enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = viewerCertificate.certificateSource does not contain cloudfront and viewerCertificate.minimumProtocolVersion does not equal TLSv1.2_2021```,AWS CloudFront web distribution using insecure TLS version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = processing is false and domainEndpointOptions.enforceHTTPS is false```,AWS Elasticsearch domain is not configured with HTTPS ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = diagnosticSettings.value[*] size equals 0```,Azure Key vaults diagnostics logs are disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_lock_waits')] does not exist or settings.databaseFlags[?(@.name=='log_lock_waits')].value equals off)""```",GCP PostgreSQL instance database flag log_lock_waits is disabled ```config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' as X; config from cloud.resource where api.name = 'aws-sagemaker-training-job' as Y; filter '$.Y.OutputDataConfig.bucketName equals $.X.bucketName'; show X;```,AWS S3 bucket used for storing AWS Sagemaker training job output ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = 'properties.sslEnforcement contains Disabled'```,Azure PostgreSQL database server with SSL connection disabled ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = nodePools[?any(config.shieldedInstanceConfig.enableIntegrityMonitoring does not exist or config.shieldedInstanceConfig.enableIntegrityMonitoring is false)] exists```,GCP Kubernetes cluster shielded GKE node with integrity monitoring disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = 'type does not equal IMPORTED and (options.certificateTransparencyLoggingPreference equals DISABLED or options.certificateTransparencyLoggingPreference does not exist) and status equals ISSUED and _DateTime.ageInDays($.notAfter) < 1'```,AWS Certificate Manager (ACM) has certificates with Certificate Transparency Logging disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cognitive-services-account' AND json.rule = properties.provisioningState equal ignore case Succeeded and (properties.disableLocalAuth does not exist or properties.disableLocalAuth is false)```,Azure Cognitive Services account configured with local authentication ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-dns-managed-zone' AND json.rule = 'dnssecConfig.defaultKeySpecs[*].keyType contains keySigning and dnssecConfig.defaultKeySpecs[*].algorithm contains rsasha1'```,GCP Cloud DNS zones using RSASHA1 algorithm for DNSSEC key-signing "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case ""Running"" AND kind contains ""functionapp"" AND kind does not contain ""workflowapp"" AND kind does not equal ""app"" AND properties.httpsOnly is false```",Azure Function App doesn't redirect HTTP to HTTPS "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""databases-for-postgresql"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resourceGroupId"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Databases for PostgreSQL service "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ""(publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.blockPublicAcls is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.blockPublicAcls is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.ignorePublicAcls is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.blockPublicPolicy is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.blockPublicPolicy is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.restrictPublicBuckets is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))""```",AWS S3 Buckets Block public access setting disabled "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy kuzde "```config from cloud.resource where api.name = 'aws-account-management-alternate-contact' group by account as X; filter ' AlternateContactType is not member of (""SECURITY"") ' ;```",AWS account security contact information is not set ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-ec2-describe-snapshots' AND json.rule='createVolumePermissions[*].group contains all'```,AWS EBS snapshots are accessible to public ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 3389 or fromPort == 3389) or (toPort > 3389 and fromPort < 3389)))] exists)```,AWS Security Group allows all traffic on RDP port (3389) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-monitor-log-profiles-list' AND json.rule = isLegacy is true and (properties.retentionPolicy does not exist or properties.retentionPolicy.enabled is false or (properties.retentionPolicy.enabled is true and (properties.retentionPolicy.days does not equal 0 and properties.retentionPolicy.days < 365)))```,Azure Activity Log retention should not be set to less than 365 days "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ssm-resource-compliance-summary' AND json.rule = Status equals ""NON_COMPLIANT"" and ComplianceType contains ""Patch"" and ResourceType contains ""ManagedInstance"" and (NonCompliantSummary.SeveritySummary.CriticalCount greater than 0 or NonCompliantSummary.SeveritySummary.HighCount greater than 0)```",AWS Systems Manager EC2 instance having NON_COMPLIANT patch compliance status ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any(Effect equals Allow and Resource equals * and (Action contains kms:* or Action contains kms:Decrypt or Action contains kms:ReEncryptFrom) and Condition does not exist)] exists```,AWS IAM policy allows decryption actions on all KMS keys "```config from cloud.resource where api.name = 'azure-dns-recordsets' AND json.rule = type contains CNAME and properties.CNAMERecord.cname contains ""web.core.windows.net"" as X; config from cloud.resource where api.name = 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.primaryEndpoints.web exists as Y; filter 'not ($.Y.properties.primaryEndpoints.web contains $.X.properties.CNAMERecord.cname) '; show X;```",Azure DNS Zone having dangling DNS Record vulnerable to subdomain takeover associated with Azure Storage account blob ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'acl.grants[*].grantee contains AuthenticatedUsers'```,AWS S3 buckets are accessible to any authenticated user "```config from cloud.resource where api.name = 'azure-devices-iot-hub-resource' AND json.rule = properties.provisioningState equal ignore case ""Succeeded"" as X; config from cloud.resource where api.name = 'azure-iot-security-solutions' AND json.rule = properties.status equal ignore case ""Enabled"" as Y; filter 'not $.Y.properties.iotHubs contains $.X.id'; show X;```",Azure Microsoft Defender for IoT Hub not enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and settings.databaseFlags[?(@.name=='log_min_error_statement')] does not exist""```",GCP PostgreSQL instance database flag log_min_error_statement is not set "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-service-fabric-cluster' AND json.rule = properties.provisioningState equal ignore case Succeeded and ((properties.fabricSettings[*].name does not equal ignore case ""Security"" or properties.fabricSettings[*].parameters[*].name does not equal ignore case ""ClusterProtectionLevel"") or (properties.fabricSettings[?any(name equal ignore case ""Security"" and parameters[?any(name equal ignore case ""ClusterProtectionLevel"" and value equal ignore case ""None"")] exists )] exists))```",Azure Service Fabric cluster not configured with cluster protection level security ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.powerState.code equal ignore case Running and properties.apiServerAccessProfile.enablePrivateCluster is false and (properties.apiServerAccessProfile.authorizedIPRanges does not exist or properties.apiServerAccessProfile.authorizedIPRanges is empty)```,Azure AKS cluster configured with overly permissive API server access "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = state equals ""RUNNABLE"" and ipAddresses[?any( type equal ignore case ""PRIMARY"" )] exists and settings.ipConfiguration.authorizedNetworks is empty```",GCP SQL Instance with public IP address does not have authorized network configured "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-image' AND json.rule = iamPolicy.bindings[?any( members contains ""allAuthenticatedUsers"" )] exists```",GCP OS Image is publicly accessible ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = properties.publicNetworkAccess equal ignore case Enabled and firewallRules.value[?any(properties.startIpAddress equals 0.0.0.0 and properties.endIpAddress equals 255.255.255.255)] exists```,Azure PostgreSQL Database Server Firewall rule allow access to all IPV4 address "```config from cloud.resource where api.name = 'gcloud-compute-target-https-proxies' as X; config from cloud.resource where api.name = 'gcloud-compute-ssl-policies' as Y; filter "" $.X.sslPolicy does not exist or ($.Y.profile equals COMPATIBLE and $.Y.selfLink contains $.X.sslPolicy) or ( ($.Y.profile equals MODERN or $.Y.profile equals CUSTOM) and $.Y.minTlsVersion does not equal TLS_1_2 and $.Y.selfLink contains $.X.sslPolicy ) or ( $.Y.profile equals CUSTOM and ( $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_128_GCM_SHA256 or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_256_GCM_SHA384 or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_128_CBC_SHA or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_AES_256_CBC_SHA or $.Y.enabledFeatures[*] contains TLS_RSA_WITH_3DES_EDE_CBC_SHA ) and $.Y.selfLink contains $.X.sslPolicy ) ""; show X;```",GCP Load Balancer HTTPS proxy permits SSL policies with weak cipher suites ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING and $.X.status.state does not contain TERMINATED and $.X.status.state does not contain TERMINATED_WITH_ERRORS) and ($.X.securityConfiguration equals $.Y.name) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.LocalDiskEncryptionConfiguration exists and $.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.LocalDiskEncryptionConfiguration.EncryptionKeyProviderType does not equal Custom)'; show X;```,AWS EMR cluster is not enabled with local disk encryption using Custom key provider "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-loadbalancer' AND json.rule = profile.family equal ignore case ""application"" and operating_status equal ignore case ""online"" and pools[?any( protocol does not equal ignore case ""https"" )] exists```",IBM Cloud Application Load Balancer for VPC uses HTTP backend pool instead of HTTPS (SSL & TLS) "```config from cloud.resource where api.name= 'aws-cloudtrail-describe-trails' AND json.rule = 'isMultiRegionTrail is true and includeGlobalServiceEvents is true' as X; config from cloud.resource where api.name= 'aws-cloudtrail-get-trail-status' AND json.rule = 'status.isLogging equals true' as Y; config from cloud.resource where api.name= 'aws-cloudtrail-get-event-selectors' AND json.rule = eventSelectors[?any( dataResources[?any( type contains ""AWS::S3::Object"" and values contains ""arn:aws:s3"")] exists and readWriteType is member of (""All"",""ReadOnly"") and includeManagementEvents is true)] exists as Z; filter '($.X.trailARN equals $.Z.trailARN) and ($.X.name equals $.Y.trail)'; show X; count(X) less than 1```",AWS S3 Buckets with Object-level logging for read events not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-apigateway-get-stages' AND json.rule = 'clientCertificateId does not exist or clientCertificateId equals None'```,AWS API Gateway endpoints without client certificate authentication "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any(tags does not exist and attributes[?any( value equal ignore case ""service"" and name equal ignore case ""serviceType"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name equal ignore case ""region"")] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for all Identity and Access enabled services ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-password-policy' AND json.rule = 'requireSymbols does not exist or requireSymbols is false'```,Alibaba Cloud RAM password policy does not have a symbol ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' as X; count(X) greater than 0```,GCP API key is created for a project "```config from cloud.resource where api.name = 'aws-glue-job' AND json.rule = Command.BucketName exists and Command.BucketName contains ""aws-glue-assets-"" as X; config from cloud.resource where api.name = 'aws-s3api-get-bucket-acl' AND json.rule = bucketName contains ""aws-glue-assets-"" as Y; filter 'not ($.X.Command.BucketName equals $.Y.bucketName)' ; show X;```",AWS Glue Job using the shadow resource bucket for script location ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-db-cluster' AND json.rule = status contains available and deletionProtection is false```,AWS RDS cluster delete protection is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sqs-get-queue-attributes' AND json.rule = attributes.KmsMasterKeyId does not exist and attributes.SqsManagedSseEnabled is false```,AWS SQS Queue not configured with server side encryption "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = powerState equal ignore case ""PowerState/running"" and ['properties.storageProfile'].['osDisk'].['osType'] contains ""Windows"" and ['properties.securityProfile'].['securityType'] equal ignore case ""TrustedLaunch"" and ['properties.securityProfile'].['uefiSettings'].['secureBootEnabled'] is false```",Azure Virtual Machine (Windows) secure boot feature is disabled "```config from cloud.resource where api.name = 'aws-neptune-db-cluster' AND json.rule = Status equals ""available"" as X; config from cloud.resource where api.name = 'aws-neptune-db-cluster-parameter-group' AND json.rule = parameters.neptune_enable_audit_log.ParameterValue exists and parameters.neptune_enable_audit_log.ParameterValue equals 0 as Y; filter '($.X.EnabledCloudwatchLogsExports.member does not contain ""audit"") or $.X.DBClusterParameterGroup equals $.Y.DBClusterParameterGroupName' ; show X;```",AWS Neptune DB cluster does not publish audit logs to CloudWatch Logs "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '($.Y.conditions[*].metricThresholdFilter contains $.X.name) and ($.X.filter contains ""resource.type ="" or $.X.filter contains ""resource.type="") and ($.X.filter does not contain ""resource.type !="" and $.X.filter does not contain ""resource.type!="") and $.X.filter contains ""iam_role"" and ($.X.filter contains ""protoPayload.methodName="" or $.X.filter contains ""protoPayload.methodName ="") and ($.X.filter does not contain ""protoPayload.methodName!="" and $.X.filter does not contain ""protoPayload.methodName !="") and $.X.filter contains ""google.iam.admin.v1.CreateRole"" and $.X.filter contains ""google.iam.admin.v1.DeleteRole"" and $.X.filter contains ""google.iam.admin.v1.UpdateRole""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for IAM custom role changes "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case Running and kind contains workflowapp and (config.minTlsVersion equals ""1.0"" or config.minTlsVersion equals ""1.1"")```",Azure Logic app using insecure TLS version ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-storage-account-list' AND json.rule = properties.supportsHttpsTrafficOnly is true and properties.minimumTlsVersion does not equal TLS1_2```,Azure Storage Account using insecure TLS version ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = processing is false and (nodeToNodeEncryptionOptions.enabled is false or nodeToNodeEncryptionOptions.enabled does not exist)```,AWS OpenSearch node-to-node encryption is disabled "```config from cloud.resource where api.name = 'gcloud-logging-metric' as X; config from cloud.resource where api.name = 'gcloud-monitoring-policies-list' as Y; filter '($.Y.conditions[*].metricThresholdFilter contains $.X.name) and ($.X.filter contains ""protoPayload.methodName ="" or $.X.filter contains ""protoPayload.methodName="") and ($.X.filter does not contain ""protoPayload.methodName !="" and $.X.filter does not contain ""protoPayload.methodName!="") and $.X.filter contains ""SetIamPolicy"" and $.X.filter contains ""protoPayload.serviceData.policyDelta.auditConfigDeltas:*""'; show X; count(X) less than 1```",GCP Log metric filter and alert does not exist for Audit Configuration Changes "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-automation-account' AND json.rule = identity does not exist or identity.type equal ignore case ""None""```",Azure Automation account is not configured with managed identity ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-redshift-describe-clusters' AND json.rule ='loggingStatus.loggingEnabled is false'```,Bobby Copy of AWS Redshift database does not have audit logging enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-lambda-list-functions' AND json.rule = authType equal ignore case NONE```,AWS Lambda function URL AuthType set to NONE "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy xzypd "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""logdnaat"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""logGroup"",""resourceType"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Activity Tracker Service "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ""(publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.blockPublicAcls is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.blockPublicAcls is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.ignorePublicAcls is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.blockPublicPolicy is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.blockPublicPolicy is false)) or ((publicAccessBlockConfiguration does not exist or publicAccessBlockConfiguration.restrictPublicBuckets is false) and (accountLevelPublicAccessBlockConfiguration does not exist or accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))""```",Copy of AWS S3 Buckets Block public access setting disabled "```config from cloud.resource where cloud.type = 'gcp' and api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as X; config from cloud.resource where api.name = 'gcloud-cloud-function-v2' AND json.rule = status equals ACTIVE and serviceConfig.serviceAccountEmail contains ""compute@developer.gserviceaccount.com"" as Y; filter ' $.X.user equals $.Y.serviceConfig.serviceAccountEmail '; show Y;```",GCP Cloud Run function is using default service account with editor role "```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-vpc-virtual-server-instance' AND json.rule = status equal ignore case ""running"" AND network_interfaces[?any( allow_ip_spoofing is true )] exists```",IBM Cloud Virtual Servers for VPC instance has interface with IP-spoofing enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,Critical - AWS S3 Object Versioning is disabled ```config from cloud.resource where cloud.type ='aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = '(access_key_1_active is true and ((access_key_1_last_used_date != N/A and _DateTime.ageInDays(access_key_1_last_used_date) > 90) or (access_key_1_last_used_date == N/A and access_key_1_last_rotated != N/A and _DateTime.ageInDays(access_key_1_last_rotated) > 90))) or (access_key_2_active is true and ((access_key_2_last_used_date != N/A and _DateTime.ageInDays(access_key_2_last_used_date) > 90) or (access_key_2_last_used_date == N/A and access_key_2_last_rotated != N/A and _DateTime.ageInDays(access_key_2_last_rotated) > 90)))'```,Critical - AWS access keys not used for more than 90 days ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-redis-instances-list' AND json.rule = state equal ignore case ready and not(customerManagedKey contains cryptoKeys)```,rgade-config-policy-01-28-2025 ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any((Condition.IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains ::/0) and Effect equals Allow and Action anyStartWith sagemaker:)] exists```,AWS SageMaker notebook instance IAM policy overly permissive to all traffic "```config from cloud.resource where api.name = 'ibm-event-streams-instance' AND json.rule = resource_plan_id is not member of ('ibm.eventstreams.lite', 'ibm.eventstreams.standard' ) as X; config from cloud.resource where api.name = 'ibm-key-protect-registration' as Y;filter 'not($.Y.resourceCrn equals $.X.crn)' ; show X;```",IBM Cloud Event Stream is not encrypted with customer-managed key ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function-v2' AND json.rule = state equals ACTIVE and serviceConfig.ingressSettings equals ALLOW_ALL```,GCP Cloud Function with overly permissive network ingress settings ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-storage-buckets-list' AND json.rule = iamConfiguration.uniformBucketLevelAccess.enabled contains false```,GCP cloud storage bucket with uniform bucket-level access disabled ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-msk-cluster' AND json.rule = state equal ignore case active and encryptionInfo.encryptionInTransit.clientBroker contains PLAINTEXT or encryptionInfo.encryptionInTransit.inCluster is false```,AWS MSK cluster encryption in transit is not enabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus contains available and dbclusterIdentifier does not exist and deletionProtection is false```,AWS RDS instance delete protection is disabled ```config from cloud.resource where cloud.type ='aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = 'password_enabled is true and (access_key_1_active is true or access_key_2_active is true)'```,AWS IAM user has both Console access and Access Keys ```config from cloud.resource where api.name = 'aws-cloudwatch-log-group' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyManager does not equal CUSTOMER or (keyMetadata.keyManager equals CUSTOMER and keyMetadata.keyState equals Disabled) as Y; filter '($.X.kmsKeyId does not exist ) or ($.X.kmsKeyId exists and $.X.kmsKeyId equals $.Y.keyMetadata.arn)'; show X;```,AWS CloudWatch Log groups not encrypted by Customer Managed Key (CMK) "```config from cloud.resource where cloud.type = 'azure' and api.name= 'azure-vm-list' AND json.rule = powerState contains ""PowerState/running"" and ['properties.networkProfile'].['networkInterfaces'][*].['publicIpAddressId'] exists and ['properties.diagnosticsProfile'].['bootDiagnostics'].['enabled'] is true```",Azure Virtual machine configured with public IP and serial console access ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains iam.gserviceaccount.com AND (roles[*] contains admin or roles[*] contains Admin or roles[*] contains roles/editor or roles[*] contains roles/owner)```,GCP IAM Service account has admin privileges "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = state equals RUNNABLE and databaseVersion contains POSTGRES and ( settings.databaseFlags[?any( name equals ""log_statement"" )] does not exist or settings.databaseFlags[?any( name equals ""log_statement"" and value equals ""all"" or value equals ""none"" )] exists)```",GCP PostgreSQL instance database flag log_statement is not set appropriately ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = '(roles[*] contains roles/iam.serviceAccountActor) or (roles[*] contains roles/iam.serviceAccountUser) or (roles[*] contains roles/iam.serviceAccountTokenCreator)'```,GCP IAM user with service account privileges "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-msk-cluster' AND json.rule = brokerNodeGroupInfo.connectivityInfo.publicAccess.type does not equal ""DISABLED""```",AWS MSK cluster public access is enabled "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy pkgmu "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" AND shieldedInstanceConfig.enableSecureBoot is false```",GCP Vertex AI Workbench Instance has Secure Boot disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-rds-describe-db-instances' AND json.rule= 'engine is not member of (""sqlserver-ex"") and dbinstanceStatus equals available and dbiResourceId does not equal null' as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' as Y; filter '$.X.storageEncrypted does not exist or $.X.storageEncrypted is false or ($.X.storageEncrypted is true and $.X.kmsKeyId exists and $.Y.keyMetadata.keyState equals Disabled and $.X.kmsKeyId equals $.Y.keyMetadata.arn)'; show X;```",AWS RDS instance is not encrypted ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-s3api-get-bucket-acl' AND json.rule = 'policyAvailable is true and denyUnencryptedUploadsPolicies[*] is empty and sseAlgorithm equals None'```,AWS S3 buckets do not have server side encryption "```config from cloud.resource where api.name = 'gcloud-kms-crypto-keys-list' AND json.rule = primary.state does not equal ""ENABLED"" as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' as Y; filter ' $.X.name equals $.Y.encryption.defaultKmsKeyName'; show Y;```",GCP Storage bucket using a disabled CMEK "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-step-functions-statemachine' AND json.rule = loggingConfiguration.level does not equal ignore case ""ALL""```",AWS Step Function state machines logging disabled "```config from cloud.resource where api.name = 'aws-connect-instance' AND json.rule = InstanceStatus equals ""ACTIVE"" and attributes[?any( AttributeType equals ""CONTACTFLOW_LOGS"" and Value equals ""false"" )] exists```",AWS Connect instance not configured with contact flow logs ```config from cloud.resource where api.name = 'gcloud-logging-sinks-list' AND json.rule = 'destination.bucket exists' as X; config from cloud.resource where api.name = 'gcloud-storage-buckets-list' AND json.rule = (retentionPolicy.isLocked does not exist or retentionPolicy.isLocked is false) as Y; filter '($.X.destination.bucket contains $.Y.name)'; show Y;```,GCP Log bucket retention policy is not configured using bucket lock ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-credential-report' AND json.rule = 'user does not equal and _DateTime.ageInDays(user_creation_time) > 30 and (password_last_used equals N/A or password_last_used equals no_information or _DateTime.ageInDays(password_last_used) > 30) and ((access_key_1_last_used_date equals N/A or _DateTime.ageInDays(access_key_1_last_used_date) > 30) and (access_key_2_last_used_date equals N/A or _DateTime.ageInDays(access_key_2_last_used_date) > 30))'```,AWS Inactive users for more than 30 days "```config from cloud.resource where cloud.type = 'gcp' AND api.name='gcloud-compute-firewall-rules-list' AND json.rule= 'sourceRanges[*] contains 0.0.0.0/0 and allowed[?any(ports contains _Port.inRange(25,25) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)) )] exists'```",harish-GCP Firewall rule allows all traffic on SMTP port (25) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-cdn-endpoint' AND json.rule = properties.customDomains[?any( properties.customHttpsProvisioningState does not equal Enabled )] exists```,Azure CDN Endpoint Custom domains is not configured with HTTPS "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-route53-domain' AND json.rule = statusList[*] does not contain ""clientTransferProhibited""```",AWS Route53 Domain transfer lock is not enabled "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(53,53)""```",Alibaba Cloud Security group allow internet traffic to DNS port (53) ```config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' as X; config from cloud.resource where api.name = 'aws-ec2-describe-subnets' as Y; filter 'not $.X.vpcId equals $.Y.vpcId'; show X;```,AWS VPC not in use ```config from cloud.resource where api.name = 'alibaba-cloud-action-trail' AND json.rule = ossBucketName equals 42```,Tamir policy "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-lightsail-instance' AND json.rule = state.name contains ""running"" and networking.ports[?any( accessDirection equals inbound and (cidrs contains ""0.0.0.0/0"" or ipv6Cidrs contains ""::/0"") and (((toPort == 22 or fromPort == 22) or (toPort > 22 and fromPort < 22)) or ((toPort == 3389 or fromPort == 3389) or (toPort > 3389 and fromPort < 3389))))] exists```",AWS Lightsail Instance does not restrict traffic on admin ports ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = 'processing is false and (elasticsearchClusterConfig.dedicatedMasterEnabled is false or elasticsearchClusterConfig.dedicatedMasterEnabled does not exist)'```,AWS Elasticsearch domain has Dedicated master set to disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-account-password-policy' AND json.rule = 'requireNumbers contains false and requireSymbols contains false and expirePasswords contains false and allowUsersToChangePassword contains false and requireLowercaseCharacters contains false and requireUppercaseCharacters contains false and maxPasswordAge does not exist and passwordReusePrevention does not exist and minimumPasswordLength==6'```,Copy of AWS IAM Password policy is unsecure ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'network equals default'```,GCP Kubernetes Engine Clusters using the default network ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.state'] equal ignore case Ready and ['sqlServer'].['properties.privateEndpointConnections'] is empty```,Azure SQL Database server not configured with private endpoint ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-projects-get-iam-user' AND json.rule = '(roles[*] contains roles/iam.serviceAccountAdmin) and (roles[*] contains roles/iam.serviceAccountUser)'```,GCP IAM Users have overly permissive service account privileges ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and properties.privateEndpointConnections[*] does not exist```,Azure Key vault Private endpoint connection is not configured ```config from cloud.resource where api.name = 'azure-sql-server-list' AND json.rule = '(serverBlobAuditingPolicy does not exist or serverBlobAuditingPolicy is empty or serverBlobAuditingPolicy.properties.state equals Disabled or serverBlobAuditingPolicy.properties.retentionDays does not exist or (serverBlobAuditingPolicy.properties.storageEndpoint is not empty and serverBlobAuditingPolicy.properties.state equals Enabled and serverBlobAuditingPolicy.properties.retentionDays does not equal 0 and serverBlobAuditingPolicy.properties.retentionDays less than 90))' as X; config from cloud.resource where api.name = 'azure-sql-db-list' AND json.rule = '(blobAuditPolicy does not exist or blobAuditPolicy is empty or blobAuditPolicy.properties.retentionDays does not exist or (blobAuditPolicy.properties.storageEndpoint is not empty and blobAuditPolicy.properties.state equals Enabled and blobAuditPolicy.properties.retentionDays does not equal 0 and blobAuditPolicy.properties.retentionDays less than 90))' as Y; filter '$.Y.blobAuditPolicy.id contains $.X.sqlServer.name'; show Y;```,Azure SQL Database with Auditing Retention less than 90 days ```config from cloud.resource where api.name = 'aws-eks-describe-cluster' as X; config from cloud.resource where api.name = 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[*].ipv4Ranges[*] contains 0.0.0.0/0 or ipPermissions[*].ipv6Ranges[*] contains ::/0) as Y; filter '$.X.resourcesVpcConfig.securityGroupIds contains $.Y.groupId or $.X.resourcesVpcConfig.clusterSecurityGroupId contains $.Y.groupId'; show Y;```,AWS EKS cluster security group overly permissive to all traffic ```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Outbound and (sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (destinationAddressPrefix equals * or destinationAddressPrefix equals Internet))] exists```,Azure Network Security Group with overly permissive outbound rule "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-recovery-service-vault' AND json.rule = properties.provisioningState equals Succeeded and (identity does not exist or identity.type equal ignore case ""None"")```",Azure Recovery Services vault is not configured with managed identity ```config from cloud.resource where api.name = 'aws-ecs-container-instance' AND json.rule = status equals ACTIVE as X; config from cloud.resource where api.name = 'aws-ec2-describe-volumes' AND json.rule = state contains in-use and encrypted is false as Y; filter '$.Y.attachments[*].instanceId contains $.X.ec2InstanceId'; show Y;```,AWS ECS Cluster instance volume encryption for data at rest is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_executor_stats or settings.databaseFlags[?any(name contains log_executor_stats and value contains on)] exists)""```",GCP PostgreSQL instance database flag log_executor_stats is not set to off ```config from cloud.resource where api.name = 'aws-ec2-describe-images' AND json.rule = image.blockDeviceMappings[*].deviceName exists```,haridemo ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = config.remoteDebuggingEnabled is true```,Azure App Services Remote debugging is enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(135,135) or destinationPortRanges[*] contains _Port.inRange(135,135) ))] exists```",Azure Network Security Group allows all traffic on Windows RPC (TCP Port 135) "```config from cloud.resource where api.name = 'aws-dms-replication-task' AND json.rule = ReplicationTaskSettings.Logging.EnableLogging is false or ReplicationTaskSettings.Logging.LogComponents[?any( Id is member of (""SOURCE_CAPTURE"",""SOURCE_UNLOAD"") and Severity is not member of (""LOGGER_SEVERITY_DEFAULT"",""LOGGER_SEVERITY_DEBUG"",""LOGGER_SEVERITY_DETAILED_DEBUG"") )] exists```",AWS DMS replication task for the source database have logging not set to the minimum severity level "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Security/securitySolutions/write"" as X; count(X) less than 1```",Azure Activity log alert for Create or update security solution does not exist "```config from cloud.resource where api.name = 'aws-code-build-project' AND json.rule = environment.environmentVariables[*].name exists and environment.environmentVariables[?any( (name contains ""AWS_ACCESS_KEY_ID"" or name contains ""AWS_SECRET_ACCESS_KEY"" or name contains ""PASSWORD"" ) and type equals ""PLAINTEXT"")] exists```",AWS CodeBuild project environment variables contain plaintext AWS credentials ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = 'versioningConfiguration.status!=Enabled'```,Informational - AWS S3 Object Versioning is disabled ```config from cloud.resource where api.name='aws-cloudtrail-describe-trails' AND cloud.type = 'aws' AND json.rule = 'kmsKeyId does not exist'```,AWS CloudTrail logs are not encrypted using Customer Master Keys (CMKs) ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = binaryAuthorization.evaluationMode does not exist or binaryAuthorization.evaluationMode equal ignore case EVALUATION_MODE_UNSPECIFIED or binaryAuthorization.evaluationMode equal ignore case DISABLED```,GCP Kubernetes Engine Clusters have binary authorization disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-virtual-machine-scale-set' AND json.rule = properties.virtualMachineProfile.storageProfile.osDisk.vhdContainers exists```,Azure Virtual machine scale sets are not utilising Managed Disks ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-event-hub-namespace' AND json.rule = authorizationRules[*].name exists and authorizationRules[?any(name does not equal RootManageSharedAccessKey)] exists```,Azure Event Hub Namespace having authorization rules except RootManageSharedAccessKey "```config from cloud.resource where api.name = 'azure-sql-db-list' AND json.rule = sqlDatabase.properties.status equals Online and (securityAlertPolicy.properties.state equals Disabled or securityAlertPolicy does not exist or securityAlertPolicy.[*] isEmpty) as X; config from cloud.resource where api.name = 'azure-sql-server-list' AND json.rule = ['sqlServer'].['properties.state'] equals Ready and (serverSecurityAlertPolicy.properties.state equals Disabled or serverSecurityAlertPolicy does not exist or serverSecurityAlertPolicy isEmpty) as Y; filter ""$.X.blobAuditPolicy.id contains $.Y.sqlServer.name""; show X;```",Azure SQL databases Defender setting is set to Off ```config from cloud.resource where api.name = 'aws-elb-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-iam-list-server-certificates' as Y; filter '($.X.description.listenerDescriptions[*].listener.sslcertificateId equals $.Y.arn and ((_DateTime.ageInDays($.Y.expiration) > -90 and (_DateTime.ageInDays($.Y.expiration) < 0 or _DateTime.ageInDays($.Y.expiration) == 0)) or (_DateTime.ageInDays($.Y.expiration) > 0)))'; show X;```,AWS Elastic Load Balancer (ELB) with IAM certificate expiring in 90 days "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ram-policy' AND json.rule = ""(policy.policyType does not contain System) and (defaultPolicyVersion.policyDocument.Statement[?(@.Resource == '*' && @.Effect== 'Allow')].Action equals *)""```",Alibaba Cloud RAM policy allows full administrative privileges ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = 'attributes.crossZoneLoadBalancing.enabled is false'```,AWS Elastic Load Balancer (Classic) with cross-zone load balancing disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = ""nodePools[*].config.metadata does not exist or nodePools[*].config.metadata does not contain disable-legacy-endpoints or nodePools[*].config.metadata.disable-legacy-endpoints does not contain true""```",GCP Kubernetes Engine Clusters have legacy compute engine metadata endpoints enabled "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-subnet-list' AND json.rule = networkSecurityGroupId does not exist and name does not equal ignore case ""GatewaySubnet"" and name does not equal ignore case ""RouteServerSubnet"" and name does not equal ignore case ""AzureFirewallSubnet"" and name does not equal ignore case ""AzureFirewallManagementSubnet"" and ['properties.delegations'][*].['properties.serviceName'] does not equal ""Microsoft.Netapp/volumes""```",Azure Virtual Network subnet is not configured with a Network Security Group ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-application-insights-component' AND json.rule = properties.provisioningState equals Succeeded and (properties.publicNetworkAccessForQuery equals Enabled or properties.publicNetworkAccessForIngestion equals Enabled)```,Azure Application Insights configured with overly permissive network access ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any( name equals SqlServers and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud is set to Off for Azure SQL Databases ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudtrail-describe-trails' as X; config from cloud.resource where api.name = 'aws-cloudtrail-get-trail-status' as Y; filter '(($.X.name == $.Y.trail) and ($.X.cloudWatchLogsLogGroupArn is not empty and $.X.cloudWatchLogsLogGroupArn exists) and $.X.isMultiRegionTrail is false and ($.Y.status.latestCloudWatchLogsDeliveryTime exists))'; show X;```,AWS CloudTrail logs should integrate with CloudWatch for all regions "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(1433,1433) or destinationPortRanges[*] contains _Port.inRange(1433,1433) ))] exists```",Azure Network Security Group allows all traffic on SQL Server (TCP Port 1433) "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (ReadAcp,Read,FullControl))] exists) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Get or Action contains s3:List) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",Medium of AWS S3 bucket publicly readable "```config from cloud.resource where api.name = 'oci-database-autonomous-database' AND json.rule = lifecycleState contains AVAILABLE AND whitelistedIps is member of (""null"") AND privateEndpoint is member of (""null"")```",OCI Oracle Autonomous Database (ADB) access is not restricted to allowed sources or deployed within a Virtual Cloud Network ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.powerState.code equal ignore case Running and properties.apiServerAccessProfile.enablePrivateCluster is false and (properties.apiServerAccessProfile.authorizedIPRanges does not exist or properties.apiServerAccessProfile.authorizedIPRanges is empty)```,aweawoie ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-mq-broker' AND json.rule = 'brokerState equals RUNNING and publiclyAccessible is true'```,AWS MQ is publicly accessible "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy vwptv ```config from cloud.resource where cloud.type = 'gcp' and api.name = 'gcloud-secretsmanager-secret' AND json.rule = expireTime does not exist```,GCP Secrets Manager secret has no expiration date ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_without_asset_type_finding_1 "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix does not equal 96.116.133.104/32 or sourceAddressPrefix does not equal 96.116.134.8/32 or sourceAddressPrefix does not equal 96.118.251.38/32 or sourceAddressPrefix does not equal 96.118.251.70/32 or sourceAddressPrefix does not equal 2001:558:fc0c::f816:3eff:fe2b:7e9f/128 or sourceAddressPrefix does not equal 2001:558:fc0c::f816:3eff:fe2d:f8c0/128 or sourceAddressPrefix does not equal 2001:558:fc18:2:f816:3eff:fea9:fec9/128 or sourceAddressPrefix does not equal 2001:558:fc18:2:f816:3eff:fe86:aa73/128) and (destinationPortRange contains _Port.inRange(22,22) or destinationPortRanges[*] contains _Port.inRange(22,22) ))] exists```",comcast-policy ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-service-bus-namespace' AND json.rule = authorizationRules[*] size greater than 1 and authorizationRules[?any(name does not equal RootManageSharedAccessKey and properties.rights contains Manage)] exists```,Azure Service bus namespace configured with overly permissive authorization rules ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = 'instancesAttached is false'```,AWS Elastic Load Balancer (ELB) not in use ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = backendType equals SECOND_GEN and ipAddresses[*].type contains PRIMARY```,GCP SQL database is assigned with public IP ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equals OpenSourceRelationalDatabases and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud set to Off for Open-Source Relational Databases ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' as X; config from cloud.resource where api.name = 'azure-active-directory-user' as Y; filter '((_DateTime.ageInDays($.X.properties.updatedOn) < 1) and (($.X.properties.principalId contains $.Y.id)))'; show X;```,llatorre - RoleAssigment v2 "```config from cloud.resource where api.name = ""aws-ec2-describe-instances"" AND json.rule = architecture contains ""foo""```",API automation policy pkifp ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-kms-get-key-rotation-status' AND json.rule = 'keyMetadata.keyState contains PendingDeletion'```,AWS KMS Key scheduled for deletion ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-elbv2-describe-load-balancers' AND json.rule = ['attributes'].['load_balancing.cross_zone.enabled'] is false```,AWS Elastic Load Balancer v2 (ELBv2) with cross-zone load balancing disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-network-watcher-list' AND json.rule = provisioningState equals Succeeded as X; count(X) less than 1```,Azure Network Watcher not enabled ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-load-balancer' AND json.rule = 'listenerPortsAndProtocal[*].listenerProtocal equals https and ([*].tlscipherPolicy equals tls_cipher_policy_1_0 or [*].tlscipherPolicy equals tls_cipher_policy_1_1)'```,Alibaba Cloud SLB listener is configured with SSL policy having TLS version 1.1 or lower ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = (securityContacts is empty or securityContacts[*].properties.email is empty or securityContacts[*].properties.alertsToAdmins equal ignore case Off) and pricings[?any(properties.pricingTier equal ignore case Standard)] exists```,Azure Microsoft Defender for Cloud email notification for subscription owner is not set ```config from cloud.resource where api.name = 'azure-frontdoor' AND json.rule = properties.provisioningState equals Succeeded as X; config from cloud.resource where api.name = 'azure-frontdoor-waf-policy' as Y; filter '$.X.properties.frontendEndpoints[*].properties.webApplicationFirewallPolicyLink.id does not exist or ($.X.properties.frontendEndpoints[*].properties.webApplicationFirewallPolicyLink.id equal ignore case $.Y.id and $.Y.properties.policySettings.enabledState equals Disabled)'; show X;```,Azure Front Door does not have the Azure Web application firewall (WAF) enabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'properties.state equal ignore case running and kind contains workflowapp and ((properties.publicNetworkAccess exists and properties.publicNetworkAccess equal ignore case Enabled) or (properties.publicNetworkAccess does not exist and (properties.privateLinkIdentifiers does not exist or properties.privateLinkIdentifiers is empty))) and config.ipSecurityRestrictions[?any((action equals Allow and ipAddress equals Any) or (action equals Allow and ipAddress equals 0.0.0.0/0))] exists'```,Azure Logic app configured with public network access ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-get-policy-version' AND json.rule = document.Statement[?any((Condition.IpAddress.aws:SourceIp contains 0.0.0.0/0 or Condition.IpAddress.aws:SourceIp contains ::/0) and Effect equals Allow and Action anyStartWith es:)] exists```,AWS Elasticsearch IAM policy overly permissive to all traffic "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""sysdig-monitor"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance"",""sysdigTeam""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Cloud Monitoring Service ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = 'processing is false and (logPublishingOptions does not exist or logPublishingOptions.SEARCH_SLOW_LOGS.enabled is false or logPublishingOptions.SEARCH_SLOW_LOGS.cloudWatchLogsLogGroupArn is empty)'```,AWS Elasticsearch domain has Search slow logs set to disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-bedrock-agent' AND json.rule = agentStatus is not member of ( ""DELETING"",""FAILED"") and guardrailConfiguration.guardrailIdentifier does not exist```",AWS Bedrock agent is not associated with Bedrock guardrails ```config from cloud.resource where api.name = 'gcloud-compute-external-backend-service' AND json.rule = logConfig.enable does not exist or logConfig.enable is false```,GCP Cloud Load Balancer HTTP(S) logging is not enabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-dms-replication-instance' AND json.rule = replicationInstanceStatus is not member of ('creating','deleted','deleting') and publiclyAccessible is true```",AWS DMS replication instance is publicly accessible "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-workbench-instance' AND json.rule = state equals ""ACTIVE"" AND shieldedInstanceConfig.enableVtpm is false```",GCP Vertex AI Workbench Instance has vTPM disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-apimanagement-apigateway' AND json.rule = lifecycleState equal ignore case ACTIVE and (networkSecurityGroupIds[*] is empty or networkSecurityGroupIds[*] does not exist)```,OCI API Gateway is not configured with Network Security Groups ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-armor-security-policy' AND json.rule = type does not equal ignore case CLOUD_ARMOR_EDGE and (rules[*].match.expr.expression does not contain cve-canary or rules[?any(match.expr.expression contains cve-canary and action equals allow)] exists)```,GCP Cloud Armor policy not configured with cve-canary rule ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-api-key' as X; count(X) greater than 0```,Copy of Copy of GCP API key is created for a project "```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule = ""((((acl.grants[?(@.grantee=='AllUsers')] size > 0) or policyStatus.isPublic is true) and publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration does not exist) or ((acl.grants[?(@.grantee=='AllUsers')] size > 0) and ((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false))) or (policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))))"" as X; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Y; filter'$.X.bucketName equals $.Y.s3BucketName'; show X;```",AWS CloudTrail bucket is publicly accessible "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-rds-describe-db-instances' AND json.rule = dbinstanceStatus contains available and dbclusterIdentifier does not exist and (engine contains postgres or engine contains mysql) and engineVersion is not member of (8.0.11, 8.0.13, 8.0.15, 9.6.1, 9.6.2, 9.6.3, 9.6.5, 9.6.6, 9.6.8, 9.6.9, 9.6.10, 10.1, 10.3, 10.4, 10.5) and iamdatabaseAuthenticationEnabled is false```",AWS RDS instance not configured with IAM authentication ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cognito-identity-pool' AND json.rule = allowUnauthenticatedIdentities is true```,AWS Cognito identity pool allows unauthenticated guest access "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(53,53) or destinationPortRanges[*] contains _Port.inRange(53,53) ))] exists```",Azure Network Security Group allows all traffic on NetBIOS DNS (TCP Port 53) ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or requireUppercaseCharacters is false or requireUppercaseCharacters does not exist'```,AWS IAM password policy does not have an uppercase character "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-vm-list' AND json.rule = powerState equal ignore case ""PowerState/running"" and ['properties.storageProfile'].['imageReference'].['publisher'] equal ignore case microsoftsqlserver and (['properties.osProfile'].['linuxConfiguration'] exists and ['properties.osProfile'].['linuxConfiguration'].['disablePasswordAuthentication'] is false)```",Azure SQL on Virtual Machine (Linux) with basic authentication "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(3389,3389) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on RDP port (3389) ```config from cloud.resource where finding.source = 'AWS Inspector' AND finding.type = 'AWS Inspector Security Best Practices'```,PCSUP-23654 "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-iam-service-accounts-list' AND json.rule = ( iamPolicy.bindings[*].members contains ""allUsers"" or iamPolicy.bindings[*].members contains ""allAuthenticatedUsers"" ) and ( disabled does not exist or disabled is false )```",GCP Service account is publicly accessible ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ecs-cluster' AND json.rule = status equals ACTIVE and settings[?any(name equals containerInsights and value equals disabled)] exists```,AWS ECS cluster with container insights feature disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = settings.backupConfiguration.enabled is false and instanceType is not member of (""READ_REPLICA_INSTANCE"",""ON_PREMISES_INSTANCE"")```",GCP SQL database instance is not configured with automated backups ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or requireSymbols equals null or requireSymbols is false or requireSymbols does not exist'```,AWS IAM password policy does not have a symbol ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'config.isPythonVersionLatest exists and config.isPythonVersionLatest equals false'```,Azure App Service Web app doesn't use latest Python version "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/networkSecurityGroups/delete"" as X; count(X) less than 1```",Azure Activity log alert for Delete network security group does not exist "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-vertex-ai-notebook-instance' AND json.rule = state equals ""ACTIVE"" and ( metadata.proxy-mode equals ""mail"" or metadata.proxy-user-mail exists )```",GCP Vertex AI Workbench user-managed notebook's JupyterLab interface access mode is set to single user "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_temp_files')] does not exist or settings.databaseFlags[?(@.name=='log_temp_files')].value does not equal 0)""```",GCP PostgreSQL instance database flag log_temp_files is not set to 0 ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-lambda-list-functions' AND json.rule = authType equal ignore case NONE```,Copy of PCSUP-16458-CLI-Test ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and Action contains sts:* and Resource equals * and Condition does not exist)] exists```,AWS IAM policy overly permissive to STS services ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-iam-list-ssh-public-keys' AND json.rule = '(_DateTime.ageInDays($.uploadDate) > 91) and status==Active'```,AWS IAM SSH keys for AWS CodeCommit have aged more than 90 days without being rotated ```config from cloud.resource where cloud.type = 'azure' and api.name= 'azure-storage-account-list' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.allowSharedKeyAccess is true and properties.sasPolicy does not exist```,Azure Storage account not configured with SAS expiration policy "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-cloud-function-v2' AND json.rule = state equals ""ACTIVE"" AND environment equals ""GEN_1"" AND serviceConfig.securityLevel exists AND serviceConfig.securityLevel does not equal ""SECURE_ALWAYS""```",GCP Cloud Function v1 is using unsecured HTTP trigger "```config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = user contains ""compute@developer.gserviceaccount.com"" and roles[*] contains ""roles/editor"" as X; config from cloud.resource where api.name = 'gcloud-cloud-run-services-list' AND json.rule = spec.template.spec.serviceAccountName contains ""compute@developer.gserviceaccount.com"" as Y; filter ' $.X.user equals $.Y.spec.template.spec.serviceAccountName '; show Y; ```",GCP Cloud Run service is using default service account with editor role "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = status equals RUNNING and name does not start with ""gke-"" and (shieldedInstanceConfig does not exist or shieldedInstanceConfig.enableSecureBoot is false )```",GCP VM instance with Shielded VM Secure Boot disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = shieldedNodes.enabled does not exist or shieldedNodes.enabled equals ""false""```",GCP Kubernetes cluster Shielded GKE Nodes feature disabled ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-sql-server-list' AND json.rule = vulnerabilityAssessments[*].properties.storageContainerPath exists and vulnerabilityAssessments[*].properties.recurringScans.emailSubscriptionAdmins is false```,Azure SQL Server ADS Vulnerability Assessment 'Also send email notifications to admins and subscription owners' is disabled ```config from cloud.resource where cloud.type = 'azure' AND cloud.accountgroup NOT IN ( 'PCF Azure') AND api.name = 'azure-vm-list' AND json.rule = ['properties.storageProfile'].['osDisk'].['vhd'].['uri'] exists```,RomanPolicy "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = (status equals RUNNING and name does not start with ""gke-"") and serviceAccounts[*].email contains ""-compute@developer.gserviceaccount.com"" and serviceAccounts[*].scopes[*] any equal ""https://www.googleapis.com/auth/cloud-platform""```",GCP VM instance using a default service account with Cloud Platform access scope ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-compute' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.properties.subnet.id does not exist```,Azure Machine Learning compute instance not configured inside virtual network ```config from cloud.resource where api.name = 'aws-waf-classic-global-web-acl-resource' as X; config from cloud.resource where api.name = 'aws-cloudfront-list-distributions' AND json.rule = webACLId is not empty as Y; filter '$.X.webACL.webACLId equals $.Y.webACLId'; show Y;```,AWS CloudFront not configured with AWS Web Application Firewall v2 (AWS WAFv2) "```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-s3api-get-bucket-acl' AND json.rule = (sseAlgorithm contains ""aws:kms"" or sseAlgorithm contains ""aws:kms:dsse"") and kmsMasterKeyID exists as X; config from cloud.resource where api.name = 'aws-kms-get-key-rotation-status' AND json.rule = keyMetadata.keyState equals Enabled and keyMetadata.keyManager equal ignore case CUSTOMER and keyMetadata.origin equals AWS_KMS and (rotation_status.keyRotationEnabled is false or rotation_status.keyRotationEnabled equals ""null"")as Y; filter '$.X.kmsMasterKeyID contains $.Y.key.keyArn'; show X;```",AWS S3 bucket encrypted with Customer Managed Key (CMK) is not enabled for regular rotation "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(4333,4333) or destinationPortRanges[*] contains _Port.inRange(4333,4333) ))] exists```",Azure Network Security Group allows all traffic on MSQL (TCP Port 4333) "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = ((((publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false) or (publicAccessBlockConfiguration.ignorePublicAcls is false and accountLevelPublicAccessBlockConfiguration.ignorePublicAcls is false)) and (acl.grantsAsList[?any(grantee equals AllUsers and permission is member of (WriteAcp,Write,FullControl))] exists or acl.grantsAsList[?any(grantee equals AuthenticatedUsers and permission is member of (WriteAcp,Write,FullControl))] exists)) or ((policyStatus.isPublic is true and ((publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration does not exist) or (publicAccessBlockConfiguration does not exist and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false) or (publicAccessBlockConfiguration.restrictPublicBuckets is false and accountLevelPublicAccessBlockConfiguration.restrictPublicBuckets is false))) and (policy.Statement[?any(Effect equals Allow and (Principal equals * or Principal.AWS equals *) and (Action contains s3:* or Action contains s3:Put or Action contains s3:Create or Action contains s3:Replicate or Action contains s3:Update or Action contains s3:Delete) and (Condition does not exist))] exists))) and websiteConfiguration does not exist```",AWS S3 bucket publicly writable "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(5900,5900) or destinationPortRanges[*] contains _Port.inRange(5900,5900) ))] exists```",Azure Network Security Group allows all traffic on VNC Server (TCP Port 5900) "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""state equals RUNNABLE and databaseVersion contains POSTGRES and (settings.databaseFlags[*].name does not contain log_statement_stats or settings.databaseFlags[?any(name contains log_statement_stats and value contains on)] exists)""```",GCP PostgreSQL instance database flag log_statement_stats is not set to off "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/publicIPAddresses/write"" as X; count(X) less than 1```",Azure Activity log alert for Create or update public IP address rule does not exist ```config from cloud.resource where api.name = 'aws-ec2-autoscaling-launch-configuration' and json.rule = blockDeviceMappings[*].ebs.encrypted exists and blockDeviceMappings[*].ebs.encrypted is false```,Enforce EBS Volume Encryption in EC2 Auto Scaling Configurations ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-kubernetes-cluster' AND json.rule = properties.addonProfiles.httpapplicationrouting.enabled is true or properties.addonProfiles.httpApplicationRouting.enabled is true```,Azure AKS cluster HTTP application routing enabled ```config from cloud.resource where cloud.type = 'azure' and api.name = 'azure-active-directory-group-settings' and json.rule = values[?any( name equals LockoutThreshold and (value greater than 10 or value does not exist))] exists```,Azure Microsoft Entra ID account lockout threshold greater than 10 ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equal ignore case Succeeded AND (properties.enableRbacAuthorization does not exist or properties.enableRbacAuthorization is false)```,Azure Key Vault Role Based Access control is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(10255,10255) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp or IPProtocol contains ""all"")))] exists as X; config from cloud.resource where api.name = 'gcloud-container-describe-clusters' AND json.rule = status equals RUNNING as Y; filter '$.X.network contains $.Y.networkConfig.network' ; show X;```",GCP Firewall rule exposes GKE clusters by allowing all traffic on read-only port (10255) "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(5500,5500) or destinationPortRanges[*] contains _Port.inRange(5500,5500) ))] exists```",Azure Network Security Group allows all traffic on VNC Listener (TCP Port 5500) ```config from cloud.resource where api.name = 'aws-elb-describe-load-balancers' as X; config from cloud.resource where api.name = 'aws-acm-describe-certificate' as Y; filter '($.X.description.listenerDescriptions[*].listener.sslcertificateId contains $.Y.certificateArn and ((_DateTime.ageInDays($.Y.notAfter) > -90 and (_DateTime.ageInDays($.Y.notAfter) < 0 or _DateTime.ageInDays($.Y.notAfter) == 0)) or (_DateTime.ageInDays($.Y.notAfter) > 0)))'; show X;```,AWS Elastic Load Balancer (ELB) with ACM certificate expired or expiring in 90 days ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-machine-learning-workspace' AND json.rule = properties.provisioningState equal ignore case Succeeded and properties.publicNetworkAccess equal ignore case Enabled and (properties.ipAllowlist does not exist or properties.ipAllowlist is empty) and properties.hbiWorkspace is true```,Azure Machine learning workspace configured with high business impact data have unrestricted network access "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-secretsmanager-describe-secret' AND json.rule = rotationEnabled is true and owningService is not member of (appflow, databrew, datasync, directconnect, events, opsworks-cm, rds, sqlworkbench) and rotationRules.automaticallyAfterDays exists and rotationRules.automaticallyAfterDays greater than 90```",AWS Secrets Manager secret not configured to rotate within 90 days ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-organization-asset-group-member' as X; config from cloud.resource where api.name = 'gcloud-projects-get-iam-user' AND json.rule = '(roles[*] contains roles/editor or roles[*] contains roles/owner or roles[*] contains roles/appengine.* or roles[*] contains roles/browser or roles[*] contains roles/compute.networkAdmin or roles[*] contains roles/cloudtpu.serviceAgent or roles[*] contains roles/composer.serviceAgent or roles[*] contains roles/composer.ServiceAgentV2Ext or roles[*] contains roles/container.serviceAgent or roles[*] contains roles/dataflow.serviceAgent)' as Y; filter '($.X.groupKey.id contains $.Y.user)'; show Y;```,pcsup-13966-ss-policy ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any((name equals SqlServers and properties.pricingTier does not equal Standard) or (name equals CosmosDbs and properties.pricingTier does not equal Standard) or (name equals OpenSourceRelationalDatabases and properties.pricingTier does not equal Standard) or (name equals SqlServerVirtualMachines and properties.pricingTier does not equal Standard))] exists```,Azure Microsoft Defender for Cloud set to Off for Databases ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-neptune-db-cluster' AND json.rule = Status contains available and DeletionProtection is false```,AWS Neptune cluster deletion protection is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains MYSQL and (settings.databaseFlags[?(@.name=='local_infile')] does not exist or settings.databaseFlags[?(@.name=='local_infile')].value equals on)""```",GCP MySQL instance with local_infile database flag is not disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-s3api-get-bucket-acl' AND json.rule = policy.Statement[*].Principal.AWS exists and policy.Statement[*].Effect contains ""Allow""```",priyanka tst ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_attack_path_policy_as_child_policies_ss_finding_2 "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-instances' AND json.rule = 'statusEvents[?any(_DateTime.ageInDays(notBefore) > -7 and (_DateTime.ageInDays(notBefore) < 0 or (description exists and description does not contain ""Completed"")))] exists'```",AWS EC2 Instance Scheduled Events "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_connections')] does not exist or settings.databaseFlags[?(@.name=='log_connections')].value equals off)""```",GCP PostgreSQL instance database flag log_connections is disabled ```config from cloud.resource where api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and policyName contains AWSCloudShellFullAccess and (entities.policyRoles[*].roleName exists or entities.policyUsers[*].userName exists or entities.policyGroups[*].groupName exists)```,"AWS IAM AWSCloudShellFullAccess policy is attached to IAM roles, users, or IAM groups" ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = 'properties.state equals Running and ((config.javaVersion exists and config.javaVersion does not equal 1.8 and config.javaVersion does not equal 11 and config.javaVersion does not equal 17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JAVA and (config.linuxFxVersion contains 8 or config.linuxFxVersion contains 11 or config.linuxFxVersion contains 17) and config.linuxFxVersion does not contain 8-jre8 and config.linuxFxVersion does not contain 11-java11 and config.linuxFxVersion does not contain 17-java17) or (config.linuxFxVersion is not empty and config.linuxFxVersion contains JBOSSEAP and config.linuxFxVersion does not contain 7-java8 and config.linuxFxVersion does not contain 7-java11 and config.linuxFxVersion does not contain 7-java17) or (config.linuxFxVersion contains TOMCAT and config.linuxFxVersion does not end with 10.0-jre8 and config.linuxFxVersion does not end with 9.0-jre8 and config.linuxFxVersion does not end with 8.5-jre8 and config.linuxFxVersion does not end with 10.0-java11 and config.linuxFxVersion does not end with 9.0-java11 and config.linuxFxVersion does not end with 8.5-java11 and config.linuxFxVersion does not end with 10.0-java17 and config.linuxFxVersion does not end with 9.0-java17 and config.linuxFxVersion does not end with 8.5-java17))'```,Bobby run and build ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and (Action equals lambda:* or Action[*] equals lambda:*) and (Resource equals * or Resource[*] equals *) and Condition does not exist)] exists```,AWS IAM policy overly permissive to Lambda service "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-key-vault-list' AND json.rule = properties.provisioningState equals Succeeded and diagnosticSettings.value[*].properties.workspaceId does not equal ignore case ""/subscriptions/8dff688e-d9b0-477c-b2b0-b0e729fb06bd/resourceGroups/rg-analytics-sh-prd-scus/providers/Microsoft.OperationalInsights/workspaces/log-sh-workspace""```",test again - delete it "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-composer-environment' AND json.rule = state equals ""RUNNING"" and config.webServerNetworkAccessControl.allowedIpRanges[?any( value equals ""0.0.0.0/0"" or value equals ""::0/0"" )] exists ```",GCP Composer environment web server network access control allows access from all IP addresses ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-s3api-get-bucket-acl' AND json.rule='loggingConfiguration.targetBucket equals null or loggingConfiguration.targetPrefix equals null'```,Copy 2 of Bobby Copy of AWS Access logging not enabled on S3 buckets ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-role-assignment' AND json.rule = '((_DateTime.ageInDays($.properties.updatedOn) < 60) and (properties.principalType contains User))'```,llatorre - RoleAssigment v5 ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = $.networkConfig.enableIntraNodeVisibility does not exist or $.networkConfig.enableIntraNodeVisibility is false```,GCP Kubernetes cluster intra-node visibility disabled "```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-neptune-db-cluster' AND json.rule = Status equals ""available"" and (BackupRetentionPeriod does not exist or BackupRetentionPeriod less than 7)```",AWS Neptune DB clusters have backup retention period less than 7 days "```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-security-group' AND json.rule = ""permissions is not empty and permissions[?(@.policy=='Accept' && @.direction=='ingress' && @.sourceCidrIp=='0.0.0.0/0')].portRange contains _Port.inRange(3389,3389)""```",Alibaba Cloud Security group allow internet traffic to RDP port (3389) ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-acm-describe-certificate' AND json.rule = 'status contains VALIDATION_TIMED_OUT or status contains FAILED'```,AWS Certificate Manager (ACM) has invalid or failed certificate ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-container-describe-clusters' AND json.rule = 'resourceLabels does not exist or resourceLabels.[*] is empty'```,GCP Kubernetes Engine Clusters without any label information ```config from cloud.resource where api.name = 'azure-sql-db-list' AND json.rule = blobAuditPolicy.properties.state equals Disabled or blobAuditPolicy does not exist or blobAuditPolicy is empty as X; config from cloud.resource where api.name = 'azure-sql-server-list' AND json.rule = serverBlobAuditingPolicy.properties.state equals Disabled or serverBlobAuditingPolicy does not exist or serverBlobAuditingPolicy is empty as Y; filter '$.X.blobAuditPolicy.id contains $.Y.sqlServer.name'; show X;```,Azure SQL database auditing is disabled ```config from cloud.resource where api.name = 'aws-ecs-cluster' and json.rule = configuration.executeCommandConfiguration.logConfiguration.cloudWatchEncryptionEnabled exists and configuration.executeCommandConfiguration.logConfiguration.cloudWatchEncryptionEnabled is false```,ECS Cluster CloudWatch Logs Encryption Disabled ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' and json.rule = terminationProtected exists and terminationProtected is false```,EMR Cluster Termination Protection Enforcement "```config from cloud.resource where api.name = 'ibm-iam-policy' AND json.rule = type equal ignore case ""access"" and roles[?any( role_id contains ""crn:v1:bluemix:public:iam::::role:Administrator"" )] exists and resources[?any( attributes[?any( name equal ignore case ""serviceName"" and value equal ignore case ""secrets-manager"" and operator is member of (""stringEquals"", ""stringMatch""))] exists and attributes[?any( name is member of (""region"",""resource"",""resourceGroupId"",""resourceType"",""serviceInstance""))] does not exist )] exists and subjects[?any( attributes[?any( name contains ""iam_id"" and value contains ""IBMid"")] exists )] exists as X;config from cloud.resource where api.name = 'ibm-iam-user' as Y; filter '$.X.subjects[*].attributes[*].value contains $.Y.iam_id'; show Y;```",IBM Cloud user with IAM policies provide administrative privileges for Secrets Manager service ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 445 or fromPort == 445) or (toPort > 445 and fromPort < 445)))] exists)```,AWS Security Group allows all ingress traffic on CIFS port (445) ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-mysql-deployment-info' AND json.rule = deployment.platform_options.disk_encryption_key_crn is empty```,IBM Cloud MySQL Database disk encryption is not enabled with customer managed keys "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-disk-list' AND json.rule = '(managedBy does not exist or managedBy is empty) and (encryptionSettings does not exist or encryptionSettings.enabled is false) and encryption.type is not member of (""EncryptionAtRestWithCustomerKey"", ""EncryptionAtRestWithPlatformAndCustomerKeys"")'```",Azure disk is unattached and is encrypted with the default encryption key instead of ADE/CMK ```config from cloud.resource where api.name = 'ibm-vpc-network-vpn-gateway' AND json.rule = status equal ignore case available as X; config from cloud.resource where api.name = 'ibm-vpc-network-vpn-ipsec-policy' AND json.rule = pfs equals disabled as Y; filter '$.X.connections[*].id contains $.Y.connections[*].id'; show X;```,IBM Cloud VPN Connections for VPC has an IPsec policy that have Perfect Forward Secrecy (PFS) disabled ```config from cloud.resource where api.name = 'azure-recovery-service-backup-protected-item' AND json.rule = properties.workloadType equal ignore case VM as X; config from cloud.resource where api.name = 'azure-vm-list' AND json.rule = powerState contains running as Y; filter 'not $.Y.id equal ignore case $.X.properties.virtualMachineId'; show Y;```,Azure Virtual Machine not protected with Azure Backup "```config from cloud.resource where api.name = 'aws-logs-describe-metric-filters' as X; config from cloud.resource where api.name = 'aws-cloudwatch-describe-alarms' as Y; config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as Z; filter '(($.Z.cloudWatchLogsLogGroupArn is not empty and $.Z.cloudWatchLogsLogGroupArn contains $.X.logGroupName and $.Z.isMultiRegionTrail is true and $.Z.includeGlobalServiceEvents is true) and ($.X.filterPattern does not contain ""userIdentity.type!="" or $.X.filterPattern does not contain ""userIdentity.type !="") and ($.X.filterPattern contains ""userIdentity.type ="" or $.X.filterPattern contains ""userIdentity.type="") and ($.X.filterPattern contains ""userIdentity.invokedBy NOT EXISTS"") and ($.X.filterPattern contains ""eventType!="" or $.X.filterPattern contains ""eventType !="") and ($.X.filterPattern contains root or $.X.filterPattern contains Root) and ($.X.filterPattern contains AwsServiceEvent) and ($.X.metricTransformations[*] contains $.Y.metricName))'; show X; count(X) less than 1```",AWS Log metric filter and alarm does not exist for usage of root account "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-containers-artifacts-kubernetes-cluster' AND json.rule = lifecycleState equal ignore case ACTIVE and endpointConfig exists and (endpointConfig.nsgIds does not exist or endpointConfig.nsgIds equal ignore case ""null"" or endpointConfig.nsgIds is empty)```",OCI Kubernetes Engine Cluster endpoint is not configured with Network Security Groups ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-block-storage-volume' as X; config from cloud.resource where api.name = 'oci-block-storage-volume-backup' as Y; filter 'not($.X.id equals $.Y.volumeId)'; show X;```,OCI Block Storage Block Volume is not restorable "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Sql/servers/firewallRules/write"" as X; count(X) less than 1```",Azure Activity log alert for Create or update SQL server firewall rule does not exist "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_disconnections')] does not exist or settings.databaseFlags[?(@.name=='log_disconnections')].value equals off)""```",GCP PostgreSQL instance database flag log_disconnections is disabled ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-iam-user' AND json.rule = lifecycleState equal ignore case ACTIVE and capabilities.canUseConsolePassword is true and isMfaActivated is false```,Copy of OCI MFA is disabled for IAM users ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-configservice-describe-configuration-recorders' AND json.rule = 'status.recording is true and status.lastStatus equals SUCCESS and recordingGroup.allSupported is true' as X; count(X) less than 1```,AWS Config Recording is disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-firewall-rules-list' AND json.rule = disabled is false and direction equals INGRESS and (sourceRanges[*] equals ::0 or sourceRanges[*] equals 0.0.0.0 or sourceRanges[*] equals 0.0.0.0/0 or sourceRanges[*] equals ::/0 or sourceRanges[*] equals ::) and allowed[?any(ports contains _Port.inRange(445,445) or (ports does not exist and (IPProtocol contains tcp or IPProtocol contains udp)))] exists```",GCP Firewall rule allows all traffic on Microsoft-DS port (445) ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-disk' AND json.rule = 'deleteAutoSnapshot is true'```,Alibaba Cloud data disk is configured with delete automatic snapshots feature ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-code-build-project' AND json.rule = not(logsConfig.cloudWatchLogs.status equal ignore case enabled or logsConfig.s3Logs.status equal ignore case enabled)```,AWS CodeBuild project not configured with logging configuration ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-app-engine-application' AND json.rule = servingStatus equals SERVING and (iap does not exist or iap.enabled does not exist or iap.enabled is false)```,GCP App Engine Identity-Aware Proxy is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-sqs-get-queue-attributes' AND json.rule = 'attributes.KmsMasterKeyId exists and attributes.KmsMasterKeyId contains alias/aws/sqs'```,AWS SQS queue encryption using default KMS key instead of CMK ```config from cloud.resource where api.name = 'aws-ec2-elastic-address' and resource.status = Deleted AND json.rule = domain exists```,Moses Policy Test 3 "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-postgresql-server' AND json.rule = ""configurations.value[?(@.name=='connection_throttling')].properties.value equals OFF or configurations.value[?(@.name=='connection_throttling')].properties.value equals off""```",Azure PostgreSQL database server with connection throttling parameter is disabled ```config from cloud.resource where cloud.type = 'aws' AND api.name='aws-iam-get-account-password-policy' AND json.rule='isDefaultPolicy is true or minimumPasswordLength < 14 or minimumPasswordLength does not exist'```,AWS IAM password policy does not have a minimum of 14 characters "```config from cloud.resource where api.name = 'azure-virtual-desktop-session-host' AND json.rule = session-hosts[*] is not empty and session-hosts[*].properties.resourceId exists as X; config from cloud.resource where api.name = 'azure-vm-list' AND json.rule = powerState equal ignore case ""PowerState/running"" as Y; filter '$.X.session-hosts[*].properties.resourceId equal ignore case $.Y.id and ($.Y.identity does not exist or $.Y.identity.type equal ignore case None)'; show Y;```",Azure Virtual Desktop session host is not configured with managed identity ```config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0) and ((toPort == 22 or fromPort == 22) or (toPort > 22 and fromPort < 22)))] exists)```,AWS Security Group allows all traffic on SSH port (22) "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Security/securitySolutions/delete"" as X; count(X) less than 1```",Azure Activity log alert for Delete security solution does not exist ```config from cloud.resource where api.name = 'aws-cloudtrail-describe-trails' as X; config from cloud.resource where api.name = 'aws-cloudtrail-get-trail-status' as Y; filter '$.X.name equals $.Y.trail and $.Y.status.isLogging is false'; show X;```,AWS CloudTrail logging is disabled ```config from cloud.resource where cloud.type = 'aws' and api.name='aws-iam-get-account-summary' AND json.rule='not AccountAccessKeysPresent equals 0'```,AWS Access key enabled on root account ```config from cloud.resource where cloud.type = 'ibm' AND api.name = 'ibm-kubernetes-cluster' AND json.rule = type equal ignore case openshift and state equal ignore case normal and features.pullSecretApplied is false```,IBM Cloud OpenShift cluster has Image pull secrets disabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = 'state equals RUNNABLE and databaseVersion contains SQLSERVER and (settings.databaseFlags[*].name does not contain ""external scripts enabled"" or settings.databaseFlags[?any(name contains ""external scripts enabled"" and value contains on)] exists)'```",GCP SQL server instance database flag external scripts enabled is not set to off "```config from cloud.resource where cloud.type = 'azure' AND api.name= 'azure-network-nsg-list' AND json.rule = securityRules[?any(access equals Allow and direction equals Inbound and (sourceAddressPrefix equals Internet or sourceAddressPrefix equals * or sourceAddressPrefix equals 0.0.0.0/0 or sourceAddressPrefix equals ::/0) and (protocol equals Tcp or protocol equals *) and (destinationPortRange contains _Port.inRange(23,23) or destinationPortRanges[*] contains _Port.inRange(23,23) ))] exists```",Azure Network Security Group allows all traffic on Telnet (TCP Port 23) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-security-center-settings' AND json.rule = pricings[?any(name equals Containers and properties.pricingTier does not equal Standard)] exists```,Azure Microsoft Defender for Cloud set to Off for Containers "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-app-service' AND json.rule = properties.state equal ignore case ""Running"" AND kind contains ""functionapp"" AND kind does not contain ""workflowapp"" AND kind does not equal ""app"" AND (identity.type does not exist or identity.principalId is empty)```",Azure Function App doesn't have a Managed Service Identity "```config from cloud.resource where api.name = 'aws-ec2-autoscaling-launch-configuration' AND json.rule = (metadataOptions.httpEndpoint does not exist) or (metadataOptions.httpEndpoint equals ""enabled"" and metadataOptions.httpTokens equals ""optional"") as X; config from cloud.resource where api.name = 'aws-describe-auto-scaling-groups' as Y; filter ' $.X.launchConfigurationName equal ignore case $.Y.launchConfigurationName'; show X;```",AWS Auto Scaling group launch configuration not configured with Instance Metadata Service v2 (IMDSv2) ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-active-directory-authorization-policy' AND json.rule = defaultUserRolePermissions.permissionGrantPoliciesAssigned[*] contains microsoft-user-default-legacy```,gvCopy of Azure AD Users can consent to apps accessing company data on their behalf is enabled "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-compute-instances-list' AND json.rule = name does not start with ""gke-"" and status equals RUNNING and (networkInterfaces[*].accessConfigs exists or networkInterfaces.ipv6AccessConfigs exists)```",GCP VM instance with the external IP address ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-es-describe-elasticsearch-domain' AND json.rule = processing is false and vpcoptions.vpcid does not exist```,AWS Elasticsearch domain publicly accessible ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-snapshots' AND json.rule = 'snapshot.state equals completed and createVolumePermissions[*].userId size != 0 and _AWSCloudAccount.isRedLockMonitored($.createVolumePermissions[*].userId) is false'```,AWS EBS Snapshot with access for unmonitored cloud accounts ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-oss-bucket-info' AND json.rule = 'cannedACL equals PublicRead or cannedACL equals PublicReadWrite'```,Alibaba Cloud OSS bucket accessible to public ```config from cloud.resource where cloud.type = 'alibaba_cloud' AND api.name = 'alibaba-cloud-ecs-instance' AND json.rule = status equals Running and instanceChargeType equals PostPaid and deletionProtection is false```,Alibaba Cloud ECS instance release protection is disabled ```config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-iam-get-policy-version' AND json.rule = isAttached is true and document.Statement[?any(Effect equals Allow and (Action contains iam:CreatePolicyVersion or Action contains iam:SetDefaultPolicyVersion or Action contains iam:PassRole or Action contains iam:CreateAccessKey or Action contains iam:CreateLoginProfile or Action contains iam:UpdateLoginProfile or Action contains iam:AttachUserPolicy or Action contains iam:AttachGroupPolicy or Action contains iam:AttachRolePolicy or Action contains iam:PutUserPolicy or Action contains iam:PutGroupPolicy or Action contains iam:PutRolePolicy or Action contains iam:AddUserToGroup or Action contains iam:UpdateAssumeRolePolicy or Action contains iam:*))] exists```,aws-test-policy "```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-block-storage-volume' AND json.rule = kmsKeyId is member of (""null"")```",OCI Block Storage Block Volumes are not encrypted with a Customer Managed Key (CMK) "```config from cloud.resource where api.name = 'gcloud-essential-contacts-organization-contact' AND json.rule = notificationCategorySubscriptions[] contains ""ALL"" or (notificationCategorySubscriptions[] contains ""LEGAL"" and notificationCategorySubscriptions[] contains ""SECURITY"" and notificationCategorySubscriptions[] contains ""SUSPENSION"" and notificationCategorySubscriptions[] contains ""TECHNICAL"" and notificationCategorySubscriptions[] contains ""TECHNICAL_INCIDENTS"") as X; count(X) less than 1```",GCP Organization not configured with essential contacts "```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-activity-log-alerts' AND json.rule = ""location equal ignore case Global and properties.enabled equals true and properties.scopes[*] does not contain resourceGroups and properties.condition.allOf[?(@.field=='operationName')].equals equals Microsoft.Network/networkSecurityGroups/securityRules/delete"" as X; count(X) less than 1```",chao test change saved search ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-events-rule' AND json.rule = '(isEnabled equals true) and (actions.actions[?any( actionType equals ONS and isEnabled equals true and lifecycleState equals ACTIVE)] exists) and (condition.eventType[*] contains com.oraclecloud.identitycontrolplane.createidpgroupmapping and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.deleteidpgroupmapping and condition.eventType[*] contains com.oraclecloud.identitycontrolplane.updateidpgroupmapping) and actions.actions[*].topicId exists' as X; count(X) less than 1```,OCI Event Rule and Notification does not exist for Identity Provider Group (IdP) group mapping changes ```config from cloud.resource where cloud.type = 'oci' AND api.name = 'oci-networking-nsg' AND json.rule = securityRules[?any( direction equals INGRESS and (isStateless does not exist or isStateless is false) )] exists```,OCI Network Security Groups (NSG) has stateful security rules ```config from cloud.resource where cloud.type = 'azure' AND api.name = 'azure-mysql-server' AND json.rule = properties.userVisibleState equal ignore case Ready and properties.privateEndpointConnections[*] is empty```,build information ```config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-cloudfront-list-distributions' AND json.rule = defaultRootObject is empty```,dnd_test_create_hyperion_policy_attack_path_policy_as_child_policies_ss_finding_1 ```config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' AND json.rule = default is true and shared is false and state equal ignore case available as X; config from cloud.resource where api.name = 'aws-ec2-describe-network-interfaces' AND json.rule = status equal ignore case in-use as Y; filter '$.X.vpcId equals $.Y.vpcId'; show X;```,AWS Default VPC is being used "```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-sql-instances-list' AND json.rule = ""databaseVersion contains POSTGRES and (settings.databaseFlags[?(@.name=='log_min_duration_statement')] does not exist or settings.databaseFlags[?(@.name=='log_min_duration_statement')].value does not equal -1)""```",GCP PostgreSQL instance database flag log_min_duration_statement is not set to -1 ```config from cloud.resource where cloud.type = 'gcp' AND api.name = 'gcloud-dns-managed-zone' AND json.rule = 'dnssecConfig.defaultKeySpecs[*].keyType contains zoneSigning and dnssecConfig.defaultKeySpecs[*].algorithm contains rsasha1'```,GCP Cloud DNS zones using RSASHA1 algorithm for DNSSEC zone-signing ```config from cloud.resource where api.name = 'aws-emr-describe-cluster' as X; config from cloud.resource where api.name = 'aws-emr-security-configuration' as Y; filter '($.X.status.state does not contain TERMINATING) and ($.X.securityConfiguration contains $.Y.name) and ($.Y.EncryptionConfiguration.EnableAtRestEncryption is true) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration exists) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration.EncryptionMode contains CSE) and ($.Y.EncryptionConfiguration.AtRestEncryptionConfiguration.S3EncryptionConfiguration.EncryptionMode does not contain Custom)' ; show X;```,AWS EMR cluster is not configured with CSE CMK for data at rest encryption (Amazon S3 with EMRFS)