Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tst #643

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

tst #643

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8e132b4
new s3
Winston1234567 Sep 23, 2022
16c3201
Prisma Cloud has found BC_AWS_GENERAL_56
prisma-cloud-devsecops[bot] Oct 6, 2022
63a8060
Merge pull request #6 from Winston1234567/bc-fix-04f903d9-17ca-4d4b-9…
Winston1234567 Oct 6, 2022
c41a73d
Merge pull request #5 from Winston1234567/Winston1234567-patch-5
Winston1234567 Oct 14, 2022
fa6658f
Prisma Cloud has found BC_AWS_S3_1
prisma-cloud-devsecops[bot] Nov 2, 2022
cf51f56
Merge pull request #7 from Winston1234567/bc-fix-08fd5980-bcd8-4e07-9…
Winston1234567 Nov 2, 2022
94e623c
Prisma Cloud has found BC_AWS_S3_13 and 1 other error(s)
prisma-cloud-devsecops[bot] Nov 2, 2022
69335de
Merge pull request #8 from Winston1234567/bc-fix-33f246bd-5dd0-4ac1-b…
Winston1234567 Nov 2, 2022
2413945
Prisma Cloud has found BC_AWS_S3_13
prisma-cloud-devsecops[bot] Nov 3, 2022
a912173
Merge pull request #10 from Winston1234567/bc-fix-222f2dbb-5413-429b-…
Winston1234567 Nov 3, 2022
dd2a738
Prisma Cloud has found BC_AWS_S3_14
prisma-cloud-devsecops[bot] Nov 9, 2022
dbe1c57
Merge pull request #12 from Winston1234567/bc-fix-29a9bd17-1371-4699-…
Winston1234567 Nov 9, 2022
84a59cd
new Commit terragoat
caswalker Nov 27, 2022
45f4c23
Delete ACL
caswalker Nov 27, 2022
ee43d7d
delete ACL Main
caswalker Nov 27, 2022
94e0a6e
consiststf
caswalker Nov 27, 2022
5d4ec9c
new
caswalker Nov 28, 2022
dee54c0
change 0225
caswalker Feb 25, 2023
3ff1ae8
new commit s3
caswalker Feb 25, 2023
96d41fe
Merge pull request #13 from Winston1234567/terragaot-local
Winston1234567 Feb 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions s3.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
NEW RESOURCE CHANGE 0225raaesource "aws_s3_bucket" "data" {
# bucket is public
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-data"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-data"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "fc8c2d7a-1997-4fc2-95c1-277cba5c2a38"
}
versioning {
enabled = "${var.versioning_enabled}"
}
}




resource "aws_s3_bucket" "data_log_bucket" {
bucket = "data-log-bucket"
}

resource "aws_s3_bucket_logging" "data" {
bucket = aws_s3_bucket.data.id

target_bucket = aws_s3_bucket.data_log_bucket.id
target_prefix = "log/"
}


resource "aws_s3_bucket_object" "data_object" {
bucket = aws_s3_bucket.data.id
key = "customer-master.xlsx"
source = "resources/customer-master.xlsx"
tags = {
Name = "${local.resource_prefix.value}-customer-master"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "b77af90c-712d-4209-90ad-d46815ab3eb7"
}
}

resource "aws_s3_bucket" "financials" {
# bucket is not encrypted
# bucket does not have access logs
# bucket does not have versioning
bucket = "${local.resource_prefix.value}-financials"
acl = "private"
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-financials"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "cecbef60-a2ea-4710-9d45-b865340e6095"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "financials" {
bucket = aws_s3_bucket.financials.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "operations" {
# bucket is not encrypted
# bucket does not have access logs
bucket = "${local.resource_prefix.value}-operations"
acl = "private"
versioning {
enabled = true
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-operations"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "e62dfbc0-cc44-408b-a26a-13938d22e2f0"
}

}


resource "aws_s3_bucket_server_side_encryption_configuration" "operations" {
bucket = aws_s3_bucket.operations.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}


resource "aws_s3_bucket" "data_science" {
# bucket is not encrypted
bucket = "${local.resource_prefix.value}-data-science"
acl = "private"
versioning {
enabled = true
}
logging {
target_bucket = "${aws_s3_bucket.logs.id}"
target_prefix = "log/"
}
force_destroy = true
tags = {
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "25565a41-2c9e-45f2-a9e9-6c15b7afcfb6"
}
}

resource "aws_s3_bucket" "logs" {
bucket = "${local.resource_prefix.value}-logs"
acl = "log-delivery-write"
versioning {
enabled = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = "${aws_kms_key.logs_key.arn}"
}
}
}
force_destroy = true
tags = {
Name = "${local.resource_prefix.value}-logs"
Environment = local.resource_prefix.value
git_commit = "d68d2897add9bc2203a5ed0632a5cdd8ff8cefb0"
git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
git_org = "try-bridgecrew"
git_repo = "terragoat"
yor_trace = "ce72f84f-4cb6-4f67-b540-54d7e998df19"
}
}
2 changes: 1 addition & 1 deletion terraform/aws/consts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ variable "password" {
default = "Aa1234321Bb"
}

variable "neptune-dbname" {
variable "neptundfaea
type = "string"
description = "Name of the Neptune graph database"
default = "neptunedb1"
Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/es.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_elasticsearch_domain" "monitoring-framework" {
a;lkdjfa;ldkresource "aws_elasticsearch_domain" "monitoring-framework" {
domain_name = "tg-${var.environment}-es"
elasticsearch_version = "2.3"

Expand Down
12 changes: 12 additions & 0 deletions terraform/aws/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ resource "aws_s3_bucket" "operations" {

}


resource "aws_s3_bucket_server_side_encryption_configuration" "operations" {
bucket = aws_s3_bucket.operations.bucket

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
}
}
}


resource "aws_s3_bucket" "data_science" {
# bucket is not encrypted
bucket = "${local.resource_prefix.value}-data-science"
Expand Down