56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
id: vpc-endpoints-not-deployed
|
|
info:
|
|
name: VPC Endpoints Not Deployed
|
|
author: princechaddha
|
|
severity: medium
|
|
description: |
|
|
Ensures VPC endpoints are utilized for secure AWS service connectivity without needing an Internet Gateway, enhancing network security and efficiency.
|
|
impact: |
|
|
Avoids data exposure and reduces bandwidth use by ensuring AWS traffic remains within the AWS network, without public IP requirements for EC2 instances.
|
|
remediation: |
|
|
Implement VPC endpoints for supported AWS services to secure and optimize connectivity within your VPC, minimizing external access risks.
|
|
reference:
|
|
- https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html
|
|
tags: cloud,devops,aws,amazon,vpc,aws-cloud-config
|
|
|
|
variables:
|
|
region: "us-east-1"
|
|
|
|
flow: |
|
|
code(1)
|
|
for(let VpcIds of iterate(template.VpcId)){
|
|
set("vpc", VpcIds)
|
|
code(2)
|
|
}
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
aws ec2 describe-vpcs --region $region --query 'Vpcs[*].VpcId' --output json
|
|
|
|
extractors:
|
|
- type: json
|
|
name: VpcId
|
|
internal: true
|
|
json:
|
|
- '.[]'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
aws ec2 describe-vpc-endpoints --region $region --filters Name=vpc-id,Values=$vpc --query 'VpcEndpoints[*].VpcEndpointId'
|
|
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- "[]"
|
|
|
|
extractors:
|
|
- type: dsl
|
|
dsl:
|
|
- '"VPC Endpoints Not Deployed in the VPC network " + vpc'
|
|
# digest: 4a0a004730450220305c7cb9ef27a7249c71a3e30664db9f051b0f5438fe8ce42f2024ea91bfa24e022100e5b9e9b019adf2b1fcfd5121540efdbaf0c5fd39072523eacf41b5a50319666e:922c64590222798bb761d5b6d8e72950 |