| Severity | Count |
|---|---|
| Critical | 0 |
| High | 5 |
| Medium | 8 |
| Low | 0 |
| Warning | 0 |
| Unknown | 0 |
| N/a | 0 |
Total Linters: 3
Total Issues: 13
| LINTER | FILE | LINE | DESCRIPTION | SEVERITY | CONTEXT | LINKS |
|---|---|---|---|---|---|---|
| TFSec | main.tf | 38 | Unencrypted S3 bucket. | HIGH | Having an unencrypted S3 bucket is a serious security concern because it allows unauthorized users to potentially access, read, and extract the data stored inside. This can lead to data leaks and breaches, potentially compromising private and sensitive information. To resolve the issue, it's strongly recommended to enforce encryption on S3 buckets by utilizing the built-in server-side encryption (SSE) provided by AWS. This can be done with the 'aws_s3_bucket' resource in the Terraform script, by setting the 'server_side_encryption_configuration' argument to use 'AES256' or 'aws:kms'. This way, every object uploaded to the bucket will automatically get encrypted, securing the stored data from unauthorized access. | https://aquasecurity.github.io/tfsec/v1.28.11/checks/aws/s3/enable-bucket-encryption/ https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#enable-default-server-side-encryption |
| TFSec | main.tf | 38 | S3 encryption should use Customer Managed Keys | HIGH | The issue pertains to the need for added security in Amazon S3 storage service by leveraging encryption with Customer Managed Keys (CMKs). When S3 relied solely on default keys, someone with sufficient permissions could decrypt data. However, with CMKs, users exercise more control over who can leverage these keys to decrypt data, making the resources more secure. To resolve this, incorporate CMKs into the AWS policy. Generate a CMK in the AWS Key Management Service pre the S3 bucket setup and specify this key as the encryption key while creating the bucket in the Terraform script. Experience a significant reduction in data breach risk by implementing this practice. | https://aquasecurity.github.io/tfsec/v1.28.11/checks/aws/s3/encryption-customer-key/ https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#enable-default-server-side-encryption |
| Checkov | /main.tf | 38 - 41 | Ensure that S3 buckets are encrypted with KMS by default | HIGH | This high-severity issue refers to the fact that S3 buckets in the terraform framework are not encrypted with Key Management Service (KMS) by default. S3 buckets without default encryption, particularly using a secure method like KMS, pose a significant risk as they can be more easily accessed or leaked, leading to potential sensitive data exposure. To resolve this, it's recommended to make modifications in the terraform framework settings to ensure that all S3 buckets are automatically encrypted with KMS by default. This could typically involve setting the 'sse_algorithm' argument to 'aws:kms' and 'kms_master_key_id' argument to the ARN of the default S3 KMS key or a specialized KMS key for the bucket. This ensures that all new objects in the bucket are encrypted with KMS, bolstering security for your data. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-s3-buckets-are-encrypted-with-kms-by-default |
| Checkov | /main.tf | 38 - 41 | Ensure all data stored in the S3 bucket have versioning enabled | HIGH | The high-severity issue within the terraform framework, 'Ensure all data stored in the S3 bucket have versioning enabled', is a concern because versioning plays a critical role in data protection and recovery. If not enabled, it may compromise the management and accessibility of different versions of an object in the bucket, resulting in data loss in case of accidental deletions or modifications. The recommended resolution is to enable versioning for all S3 buckets in the terraform framework. This allows for easy recovery of various versions of the stored objects, thereby providing robust protection against human errors, programmatic errors, or other unforeseen issues. It can be achieved by adding the 'versioning' block within the 'resource' block of the S3 bucket in the terraform configuration and setting the 'enabled' argument to true. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/s3-policies/s3-16-enable-versioning |
| Checkov | /main.tf | 21 - 35 | Ensure an IAM role is attached to EC2 instance | HIGH | The issue is connected to the "Identity and Access Management" (IAM) of the EC2 instance, where a role hasn't been attached, thus increasing vulnerability to unauthorized access, and potential misuse of the instance. To counter such high-severity threats, you should assign an IAM role to every EC2 instance during their creation, defining the permissions and restricting unauthorized database operations. Doing this will help to optimize the security of your AWS environment, as you're limiting the potential for misuse by outlining precisely what each EC2 instance can and cannot do. Moreover, by using the terraform framework, you can automate the whole process, reducing the likelihood of human error during the setup and adding an extra layer of security to your infrastructure. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-iam-policies/ensure-an-iam-role-is-attached-to-ec2-instance |
| TFSec | main.tf | 38 | S3 Bucket does not have logging enabled. | MEDIUM | https://aquasecurity.github.io/tfsec/v1.28.11/checks/aws/s3/enable-bucket-logging/ https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket |
|
| TFSec | main.tf | 38 | S3 Data should be versioned | MEDIUM | https://aquasecurity.github.io/tfsec/v1.28.11/checks/aws/s3/enable-versioning/ https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#versioning |
|
| Checkov | /main.tf | 21 - 35 | Ensure that EC2 is EBS optimized | MEDIUM | This high-severity issue 'Ensure that EC2 is EBS optimized' pertains to an insufficiency in your EC2 instances not being optimized for Elastic Block Store (EBS), which can result in suboptimal performance. EC2 instances that are EBS-optimized are designed for workloads where the storage volume is frequently accessed and require high, consistent performance. To correct this, you must ensure that you select the option for EBS optimization when setting up your EC2 instances, which might entail deploying a new instance. This measure can also be retroactively applied by modifying the instance settings through the AWS Management console, AWS CLI, or SDKs, ensuring future compliance. This adjustment will guarantee that your EC2 instances are prepared to handle demanding EBS workloads, promoting better overall performance of your infrastructure. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-ec2-is-ebs-optimized |
| Checkov | /main.tf | 21 - 35 | Ensure that detailed monitoring is enabled for EC2 instances | MEDIUM | The issue 'Ensure that detailed monitoring is enabled for EC2 instances' pertains to the lack of comprehensive visibility into the performance and health status of EC2 instances. As a default, AWS provides basic monitoring metrics with granularity of 5 minutes. However, for crucial production workloads or critical systems, these granularities might not suffice. Detailed monitoring, which offers data granularity of one minute, enables faster detection and troubleshooting of issues potentially leading to a more reliable service. To resolve the high-severity issue, it's suggested to enable detailed monitoring for your EC2 instances. This can be done through setting the 'monitoring' argument in the instance configuration to 'True' when using Terraform to manage AWS resources. By doing so, you improve your infrastructure's accountability, optimize system performance, and effectively preempt potential risks. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/ensure-that-detailed-monitoring-is-enabled-for-ec2-instances |
| Checkov | /main.tf | 38 - 41 | Ensure S3 buckets should have event notifications enabled | MEDIUM | The high-severity issue revolves around S3 buckets within the terraform framework not having event notifications enabled. Without such notifications, it's challenging to monitor and manage data changes effectively, creating a significant security risk. To rectify this problem, it is crucial to enable event notifications for every S3 bucket. This configuration can alert administrators to event triggers such as 's3:ObjectCreated:*' or 's3:ObjectRemoved:*'. These notifications can be sent via various AWS services like Lambda, SNS, or SQS, which also need to be correctly set up for proper event handling. Additionally, remember to review and configure the access policies for these services correctly to avoid unintended exposure. This practice not only enhances data security but also augments overall infrastructure monitoring. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/bc-aws-2-62 |
| Checkov | /main.tf | 38 - 41 | Ensure the S3 bucket has access logging enabled | MEDIUM | The issue, 'Ensure the S3 bucket has access logging enabled', refers to the lack of logging capability set up for an Amazon S3 bucket being provisioned through Terraform. This is severe as the logging feature is crucial for auditability, security analysis, and troubleshooting purposes. Without it, you may lose the traceability of who has accessed or modified data in your bucket. As a resolution, it's recommended that access logging should be enabled for S3 buckets. This feature records each access request made to the bucket and could be implemented within the Terraform S3 bucket configuration by setting the 'logging' block with appropriate 'target_bucket' and 'target_prefix' parameters. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/s3-policies/s3-13-enable-logging |
| Checkov | /main.tf | 38 - 41 | Ensure that S3 bucket has cross-region replication enabled | MEDIUM | The high-severity issue in the Terraform framework, 'Ensure that S3 bucket has cross-region replication enabled', pertains to the absence of cross-region replication (CRR) in Amazon Simple Storage Service (S3) buckets, which impacts the redundancy and high availability of the data stored. This increases the risk of data loss in scenarios such as regional outages or disasters. To resolve this issue, it's recommended to enable CRR for S3 buckets. This can be achieved by modifying the bucket's configuration in Terraform to include replication_configuration block, indicating source and destination regions for replication, thereby ensuring data redundancy across different geographical locations, thus protecting against regional service disruptions. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-general-policies/ensure-that-s3-bucket-has-cross-region-replication-enabled |
| Checkov | /main.tf | 38 - 41 | Ensure that an S3 bucket has a lifecycle configuration | MEDIUM | The high-severity issue 'Ensure that an S3 bucket has a lifecycle configuration' revolves around the fact that AWS S3 buckets without a lifecycle configuration can continue storing objects indefinitely, potentially leading to increased storage costs and management complexity. It also increases the risk of data breach if sensitive information is unintentionally kept beyond its useful lifespan. To resolve this issue, implement a lifecycle policy for all S3 buckets, specifying actions that Amazon S3 should take for items when they reach a certain age. This approach automates moving data to lower-cost storage options, or archiving it to meet compliance requirements, and can even be setup to automatically delete the data at the end of its lifecycle, which can help in management of storage costs and securing data. | https://docs.prismacloud.io/en/enterprise-edition/policy-reference/aws-policies/aws-logging-policies/bc-aws-2-61 |