Просмотр исходного кода

Updates IMDS syntax & ECR encryption syntax | tfsec/chekov ignores

No actual changes are being made; I verified the console settings and hard coded the syntax in TF.

For IMDS, enabling the 'enforce' feature on most of the EC2 fleet will break Salt state that has a file source of s3://*. We'd definitely prefer to have imdsv2 if we could, but it's not safe to turn on in our environment at this time. Most changes concerning syntax placement for tfsec / checkov ignores.

aws_instance should activate session tokens for Instance Metadata Service. Instance does not require IMDS access to require a token

ID             - aws-ec2-enforce-http-token-imds
Severity   - High
Impact     - Instance metadata service can be interacted with freely
Resolution - Enable HTTP token requirement for IMDS

tfsec      - https://aquasecurity.github.io/tfsec/v1.26.3/checks/aws/ec2/enforce-http-token-imds/
checkov - https://docs.bridgecrew.io/docs/bc_aws_general_31
AWS       - https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/

**Verified that all ECR Repos are already encrypted; syntax updated in TF only.**

ECR Repository should use customer managed keys to allow more control. Repository is not encrypted using KMS.

ID         - aws-ecr-repository-customer-key
Severity   - Low
Impact     - Using AWS managed keys does not allow for fine grained control
Resolution - Use customer managed keys

tfsec   - https://aquasecurity.github.io/tfsec/v1.26.3/checks/aws/ecr/repository-customer-key/
checkov - https://docs.bridgecrew.io/docs/ensure-that-ecr-repositories-are-encrypted
AWS     - https://docs.aws.amazon.com/AmazonECR/latest/userguide/encryption-at-rest.html
Jeremy Cooper [AFS MBP] 3 лет назад
Родитель
Сommit
68335a946a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      test/aws-us-gov/mdr-test-c2/095-instance-sensu/terragrunt.hcl

+ 1 - 1
test/aws-us-gov/mdr-test-c2/095-instance-sensu/terragrunt.hcl

@@ -13,7 +13,7 @@ locals {
 # working directory, into a temporary folder, and execute your Terraform commands in that folder.
 terraform {
   # Double slash is intentional and required to show root of modules
-  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu?ref=v5.1.5"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/sensu?ref=v5.1.12"
 }
 
 dependency "vpc-system-services" {