github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/control/testdata/aws_dummy/cis_v130/section5.sp (about)

     1  locals {
     2    cis_v130_5_common_tags = merge(local.cis_v130_common_tags, {
     3      cis_section_id = "5"
     4    })
     5  }
     6  
     7  benchmark "cis_v130_5" {
     8    title = "5 Networking"
     9    #documentation = file("./cis_v130/docs/cis_v130_5.md")
    10    tags = local.cis_v130_5_common_tags
    11    children = [
    12      control.cis_v130_5_1,
    13      control.cis_v130_5_2,
    14      control.cis_v130_5_3,
    15      control.cis_v130_5_4
    16    ]
    17  }
    18  
    19  control "cis_v130_5_1" {
    20    title       = "5.1 Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports"
    21    description = "The Network Access Control List (NACL) function provide stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH to port 22 and RDP to port 3389."
    22    sql         = query.alarm.sql
    23    #documentation = file("./cis_v130/docs/cis_v130_5_1.md")
    24  
    25    tags = merge(local.cis_v130_5_common_tags, {
    26      cis_item_id  = "5.1"
    27      cis_type     = "automated"
    28      cis_levels   = "1"
    29      cis_controls = "9.2,12.4"
    30    })
    31  }
    32  
    33  control "cis_v130_5_2" {
    34    title       = "5.2 Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration ports"
    35    description = "Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH to port 22 and RDP to port 3389."
    36    sql         = query.alarm.sql
    37    #documentation = file("./cis_v130/docs/cis_v130_5_2.md")
    38  
    39    tags = merge(local.cis_v130_5_common_tags, {
    40      cis_item_id  = "5.2"
    41      cis_type     = "automated"
    42      cis_levels   = "1"
    43      cis_controls = "9.2,12.4"
    44    })
    45  }
    46  
    47  control "cis_v130_5_3" {
    48    title       = "5.3 Ensure the default security group of every VPC restricts all traffic"
    49    description = "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic."
    50    sql         = query.alarm.sql
    51    #documentation = file("./cis_v130/docs/cis_v130_5_3.md")
    52  
    53    tags = merge(local.cis_v130_5_common_tags, {
    54      cis_item_id  = "5.3"
    55      cis_type     = "automated"
    56      cis_levels   = "1"
    57      cis_controls = "14.6"
    58    })
    59  }
    60  
    61  control "cis_v130_5_4" {
    62    title       = "5.4 Ensure routing tables for VPC peering are 'least access'"
    63    description = "A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If you don't specify a security group when you launch an instance, the instance is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic."
    64    sql         = query.alarm.sql
    65    #documentation = file("./cis_v130/docs/cis_v130_5_4.md")
    66  
    67    tags = merge(local.cis_v130_5_common_tags, {
    68      cis_item_id  = "5.4"
    69      cis_type     = "manual"
    70      cis_levels   = "1"
    71      cis_controls = "14.6"
    72    })
    73  }