Policies

This section describes the policies you can use to have Code Pipes evaluate your Terraform for potential security misconfigurations and compliance violations prior to deployment.

When you use Terraform infrastructure-as-code, you can have Code Pipes evaluate your Terraform for potential security misconfigurations and compliance violations prior to deployment.

Alternatively, you can choose not to have Code Pipes evaluate your Terraform. This lets you deploy anything you want via Terraform.

  • To validate your Terraform, choose the Ollion Best Practice policy, whose rules are listed below.

  • To skip validation, choose the Unrestricted policy.

Ollion Best Practice rules

ProviderServiceRule NameRule Summary
AWSCloudTrailcloudtrail_log_file_validationCloudTrail log file validation should be enabled
AWSEBSebs_volume_encryptedEBS volume encryption should be enabled
AWSIAMiam_admin_policyIAM policies should not have full ":" administrative privileges
AWSIAMiam_user_attached_policyIAM policies should not be attached directly to users
AWSKMSkms_rotateKMS CMK rotation should be enabled
AWSVPCsecurity_group_ingress_anywhereVPC security group rules should not permit ingress from '0.0.0.0/0' except to ports 80 and 443
AWSVPCsecurity_group_ingress_anywhere_rdpVPC security group rules should not permit ingress from '0.0.0.0/0' to port 3389 (Remote Desktop Protocol)
AWSVPCsecurity_group_ingress_anywhere_sshVPC security group rules should not permit ingress from '0.0.0.0/0' to port 22 (SSH)
AWSVPCvpc_flow_logVPC flow logging should be enabled
GCPKMSkms_cryptokey_rotateKMS crypto keys should be rotated at least once every 365 days
GCPComputecompute_firewall_no_ingress_22VPC firewall rules should not permit ingress from '0.0.0.0/0' to port 22 (SSH)
GCPComputecompute_firewall_no_ingress_3389VPC firewall rules should not permit ingress from '0.0.0.0/0' to port 3389 (RDP)
GCPComputecompute_subnet_private_google_accessVPC subnet 'Private Google Access' should be enabled
GCPComputecompute_subnet_flow_log_enabledVPC subnet flow logging should be enabled
AzureStorage Accountstorage_account_deny_accessStorage accounts should deny access from all networks by default
AzureStorage Accountstorage_account_microsoft_servicesStorage accounts 'Trusted Microsoft Services' access should be enabled
AzureStorage Accontstorage_account_secure_transferStorage accounts 'Secure transfer required' should be enabled
AzureBlob Storagestorage_container_private_accessStorage containers should have access set to 'private'
AzureVirtual Networknetwork_security_group_no_inbound_22Network security group rules should not permit ingress from '0.0.0.0/0' to port 22 (SSH)
network_security_rule_no_inbound_22
AzureVirtual Networknetwork_security_group_no_inbound_3389Network security group rules should not permit ingress from '0.0.0.0/0' to port 3389 (RDP)
network_security_rule_no_inbound_3389
AzureSQL Serversql_server_firewall_no_inbound_allSQL Server firewall rules should not permit ingress from 0.0.0.0/0 to all ports and protocols