Skip to content
New issue

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

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

Already on GitHub? # to your account

s3 public bucket creation should be "block new public access acls" #71

Closed
karthikeayan opened this issue Feb 4, 2019 · 2 comments
Closed

Comments

@karthikeayan
Copy link
Contributor

karthikeayan commented Feb 4, 2019

When creating S3 buckets via terraform, terraform-compliance should be able to identify if the bucket have policy enabled to "Block new public ACLs and uploading public objects"

new step needed for s3

@eerkunt
Copy link
Member

eerkunt commented Feb 4, 2019

Since the bucket policy is mostly defined as plain text, I think the tool requires a parser for IAM policy definition.

That is going to be slightly bigger than Security Group enhancement.

@eerkunt
Copy link
Member

eerkunt commented Jun 22, 2019

The scenario can be handled by a test similar as shown below ;

  Scenario Outline: AWS Credentials should not be hardcoded
    Given I have aws_s3_bucket_public_access_block resource configured
    Then it must contain <key>
    And its value must not match the "true" regex

    Examples:
    | key                      |
    | block_public_acls        |
    | block_public_policy      |
    | ignore_public_acls       |
    | restrict_public_buckets  |

I will also add this to examples on next release.

@eerkunt eerkunt closed this as completed Jun 22, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants