Skip to content

Commit 1d48b08

Browse files
authored
tfsec ignores added (#136)
* tfsec ignores added * make github/init
1 parent 0d20a7a commit 1d48b08

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/complete/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ provider "aws" {
22
region = var.region
33
}
44

5+
#S3 access controls, policies and logging should be created as seperate terraform resources
6+
#tfsec:ignore:aws-s3-block-public-acls tfsec:ignore:aws-s3-block-public-policy tfsec:ignore:aws-s3-enable-bucket-encryption tfsec:ignore:aws-s3-encryption-customer-key tfsec:ignore:aws-s3-ignore-public-acls tfsec:ignore:aws-s3-no-public-buckets tfsec:ignore:aws-s3-enable-bucket-logging tfsec:ignore:aws-s3-enable-versioning tfsec:ignore:aws-s3-specify-public-access-block
57
resource "aws_s3_bucket" "default" {
68
count = module.this.enabled ? 1 : 0
79

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ data "aws_iam_policy_document" "prevent_unencrypted_uploads" {
141141
}
142142
}
143143

144+
#S3 access controls, policies and logging are defined as seperate terraform resources below
145+
#tfsec:ignore:aws-s3-block-public-acls tfsec:ignore:aws-s3-block-public-policy tfsec:ignore:aws-s3-enable-bucket-encryption tfsec:ignore:aws-s3-encryption-customer-key tfsec:ignore:aws-s3-ignore-public-acls tfsec:ignore:aws-s3-no-public-buckets tfsec:ignore:aws-s3-enable-bucket-logging tfsec:ignore:aws-s3-enable-versioning tfsec:ignore:aws-s3-specify-public-access-block
144146
resource "aws_s3_bucket" "default" {
145147
count = local.bucket_enabled ? 1 : 0
146148

@@ -241,7 +243,7 @@ resource "aws_dynamodb_table" "with_server_side_encryption" {
241243
# https://www.terraform.io/docs/backends/types/s3.html#dynamodb_table
242244
hash_key = "LockID"
243245

244-
server_side_encryption {
246+
server_side_encryption { #tfsec:ignore:aws-dynamodb-table-customer-key
245247
enabled = true
246248
}
247249

0 commit comments

Comments
 (0)