Skip to content

Update s3.tf - #37

Open
tomerBZ wants to merge 1 commit into
masterfrom
same-shit
Open

Update s3.tf#37
tomerBZ wants to merge 1 commit into
masterfrom
same-shit

Conversation

@tomerBZ

@tomerBZ tomerBZ commented Apr 30, 2024

Copy link
Copy Markdown
Owner

No description provided.

@bridgecrew-dev bridgecrew-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found errors in this PR ⬇️

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  Ensure S3 buckets should have event notifications enabled
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_LOGGING_36 | Checkov ID: CKV2_AWS_62

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  Ensure S3 Bucket has public access blocks
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_NETWORKING_52 | Checkov ID: CKV2_AWS_6

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM  Ensure that an S3 bucket has a lifecycle configuration
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_LOGGING_35 | Checkov ID: CKV2_AWS_61

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  Ensure S3 buckets are encrypted with KMS by default
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_GENERAL_56 | Checkov ID: CKV_AWS_145

How to Fix

resource "aws_s3_bucket" "bucket_name" {
  bucket = "bucket_good"
}

+ resource "aws_s3_bucket_server_side_encryption_configuration" "good_sse_1" {
+   bucket = aws_s3_bucket.bucket_name.bucket
+
+   rule {
+     apply_server_side_encryption_by_default {
+       kms_master_key_id = aws_kms_key.mykey.arn
+       sse_algorithm     = "aws:kms"
+     }
+   }
+ }

Description

Encrypting your data and resources with KMS helps protect your data from unauthorized access or tampering. By encrypting your data, you can ensure that only authorized users can access and decrypt the data, and that the data is protected while in storage or in transit. Such action can help protect against external threats such as hackers or malware, as well as internal threats such as accidental or unauthorized access.

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  Ensure S3 bucket has cross-region replication enabled
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_GENERAL_72 | Checkov ID: CKV_AWS_144

Comment thread terraform/aws/s3.tf
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
acl = "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW  Ensure AWS S3 object versioning is enabled
    Resource: aws_s3_bucket.financials | Bridgecrew ID: BC_AWS_S3_16 | Checkov ID: CKV_AWS_21

Benchmarks

  • PCI-DSS V3.2.1 10.5.3
  • FEDRAMP (MODERATE) CP-10, SI-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant