Skip to content

Commit

Permalink
Improving Ensure EC2 instances use IMDSv2
Browse files Browse the repository at this point in the history
Signed-off-by: Hossein Rouhani <h_rouhani@hotmail.com>
  • Loading branch information
HRouhani committed Apr 18, 2024
1 parent c7d400c commit e51f99b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions core/mondoo-aws-security.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ queries:
aws.s3.bucket.publicAccessBlock.IgnorePublicAcls == true
aws.s3.bucket.publicAccessBlock.RestrictPublicBuckets == true
- uid: mondoo-aws-security-ec2-instance-no-public-ip
title: Ensures no instances have a public IP
title: Ensure No Public IP associated with EC2 Instances
impact: 80
variants:
- uid: mondoo-aws-security-ec2-instance-no-public-ip-all
Expand Down Expand Up @@ -1363,20 +1363,21 @@ queries:
title: AWS Documentation - IP addressing for your VPCs and subnets
- url: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance
title: Terraform Registry - aws_instance
- uid: mondoo-aws-security-ec2-imdsv2-check
title: Ensure EC2 instances use IMDSv2
impact: 80
variants:
- uid: mondoo-aws-security-ec2-imdsv2-check-all
- uid: mondoo-aws-security-ec2-imdsv2-check-single
- uid: mondoo-aws-security-ec2-imdsv2-check-all
filters: asset.platform == "aws"
mql: |
aws.ec2.instances.where(httpEndpoint != "disabled").all(httpTokens == "required")
aws.ec2.instances.where(state != /terminated|shutting-down/ && httpEndpoint == "enabled").all(httpTokens == "required")
- uid: mondoo-aws-security-ec2-imdsv2-check-single
filters: |
asset.platform == "aws-ec2-instance"
aws.ec2.instance.httpEndpoint != "disabled"
aws.ec2.instance.state != /terminated|shutting-down/
aws.ec2.instance.httpEndpoint == "enabled"
- uid: mondoo-aws-security-ec2-imdsv2-check
title: Ensure EC2 instances use IMDSv2
impact: 90
variants:
- uid: mondoo-aws-security-ec2-imdsv2-check-all
- uid: mondoo-aws-security-ec2-imdsv2-check-single
mql: |
aws.ec2.instance.httpTokens == "required"
docs:
Expand Down

0 comments on commit e51f99b

Please sign in to comment.