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

Fix AccessControlListNotSupported: The bucket does not allow ACLs error #141

Merged
merged 21 commits into from
Apr 26, 2023

Conversation

georgepstaylor
Copy link
Member

@georgepstaylor georgepstaylor commented Apr 25, 2023

@georgepstaylor georgepstaylor requested a review from a team as a code owner April 25, 2023 16:20
@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             128.903µs
  parsing              13.055465ms
  adaptation           224.802µs
  checks               16.047203ms
  total                29.456373ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     41
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 79, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             230.402µs
  parsing              18.285243ms
  adaptation           348.303µs
  checks               32.942259ms
  total                51.806207ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     41
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 79, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             155.303µs
  parsing              13.418276ms
  adaptation           223.404µs
  checks               16.544841ms
  total                30.341824ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     41
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 79, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             133.616µs
  parsing              22.251379ms
  adaptation           279.13µs
  checks               12.664154ms
  total                35.328279ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     42
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 79, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

ewastempel
ewastempel previously approved these changes Apr 25, 2023
Copy link
Contributor

@ewastempel ewastempel left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             140.7µs
  parsing              13.09196ms
  adaptation           216.499µs
  checks               15.004854ms
  total                28.454013ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     42
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 75, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

@github-actions
Copy link
Contributor

TFSEC Scan Success

Show Output
*****************************

TFSEC will check the following folders:
.

*****************************

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018
  timings
  ──────────────────────────────────────────
  disk i/o             147.303µs
  parsing              19.603465ms
  adaptation           319.004µs
  checks               12.209065ms
  total                32.278837ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     42
  files read           4

  results
  ──────────────────────────────────────────
  passed               8
  ignored              4
  critical             0
  high                 0
  medium               0
  low                  0


No problems detected!

tfsec_exitcode=0

Checkov Scan Failed

Show Output
*****************************

Checkov will check the following folders:
.

*****************************

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

Passed checks: 75, Failed checks: 6, Skipped checks: 16

Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:1-9

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_AWS_300: "Ensure S3 lifecycle configuration sets period for aborting failed uploads"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket_lifecycle_configuration.default
	File: /main.tf:39-98
	Calling File: /test/unit-test/main.tf:11-20

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.default
	File: /main.tf:8-19

		8  | resource "aws_s3_bucket" "default" {
		9  |   #checkov:skip=CKV_AWS_144: "Replication handled in replication configuration resource"
		10 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		11 |   #checkov:skip=CKV_AWS_21: "Versioning handled in Versioning configuration resource"
		12 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		13 | 
		14 |   bucket        = var.bucket_name
		15 |   bucket_prefix = var.bucket_prefix
		16 |   force_destroy = var.force_destroy
		17 | 
		18 |   tags = var.tags
		19 | }

Check: CKV2_AWS_62: "Ensure S3 buckets should have event notifications enabled"
	FAILED for resource: module.s3_with_AES256.aws_s3_bucket.replication
	File: /main.tf:230-243

		230 | resource "aws_s3_bucket" "replication" {
		231 |   #checkov:skip=CKV_AWS_144: "Replication not required on replication bucket"
		232 |   #checkov:skip=CKV_AWS_18: "Logging handled in logging configuration resource"
		233 |   #checkov:skip=CKV_AWS_21: "Versioning handled in versioning configuration resource"
		234 |   #checkov:skip=CKV_AWS_145: "Encryption handled in encryption configuration resource"
		235 | 
		236 |   count = var.replication_enabled ? 1 : 0
		237 | 
		238 |   provider      = aws.bucket-replication
		239 |   bucket        = (var.bucket_name != null) ? "${var.bucket_name}-replication" : null
		240 |   bucket_prefix = (var.bucket_prefix != null) ? "${var.bucket_prefix}-replication" : null
		241 |   force_destroy = var.force_destroy
		242 |   tags          = var.tags
		243 | }

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing `terraform` plugin...
Installed `terraform` (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.2.1)
tflint will check the following folders:
.

*****************************

Running tflint in .
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
tflint_exitcode=0

Copy link
Contributor

@dms1981 dms1981 left a comment

Choose a reason for hiding this comment

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

LGTM - nice work @georgepstaylor !

@georgepstaylor georgepstaylor merged commit 189a156 into main Apr 26, 2023
@georgepstaylor georgepstaylor deleted the fix-acl-error branch April 26, 2023 09:13
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.

3 participants