Project: KICS (Provisioning / Security & Compliance)
File: a14ad534-acbe-4a8e-9404-2f7e1045646e.md

title: HTTP Port Open To Internet hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: a14ad534-acbe-4a8e-9404-2f7e1045646e Query name: HTTP Port Open To Internet Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: The HTTP port is open to the internet in a Security Group<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="64 36 9 79 49 23 93" name: example ec2 group1 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 67 to_port: 82 cidr_ip: 0.0.0.0/0 name: example ec2 group2 amazon.aws.ec2_group: name: example2 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 cidr_ip: 0.0.0.0/0 name: example ec2 group3 amazon.aws.ec2_group: name: example3 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 79-90 cidr_ip: 0.0.0.0/0 name: example ec2 group4 amazon.aws.ec2_group: name: example4 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 100 70-90 cidr_ip: 0.0.0.0/0 name: example ec2 group5 amazon.aws.ec2_group: name: example5 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 30-31 cidr_ip: 0.0.0.0/0 name: example ec2 group6 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: -1 to_port: 82 cidr_ip: 0.0.0.0/0 name: example ec2 group7 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 67 to_port: -1 cidr_ip: 0.0.0.0/0 ``` ```yaml title="Negative test num. 1 - yaml file" name: example ec2 group1 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 67 to_port: 82 cidr_ip: 0.0.0.0/1 name: example ec2 group2 amazon.aws.ec2_group: name: example2 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 cidr_ip: 0.0.1.0/0 name: example ec2 group3 amazon.aws.ec2_group: name: example3 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 79-90 cidr_ip: 0.1.0.0/0 name: example ec2 group4 amazon.aws.ec2_group: name: example3 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 100 70-90 cidr_ip: 10.0.0.0/0 name: example ec2 group5 amazon.aws.ec2_group: name: example5 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 30-31 cidr_ip: 0.0.0.0/10 name: example ec2 group6 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: -1 to_port: 82 cidr_ip: 0.1.0.0/0 name: example ec2 group7 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 67 to_port: -1 cidr_ip: 1.0.0.0/0 ```