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 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: 4b0a00483046022100cdf521a3643f23886dee5b78e9910dbd5137467596cffd6cf43641721bdd4c8f022100ada84927f32db8433b532c73902d578b91b0721574bb78b9a37b252df5cd8beb:922c64590222798bb761d5b6d8e72950 |