Skip to main content

More Info:

Your security groups should have descriptions associated with them to help you run your operations smoothly. It serves as a documentation and guidance in future.

Risk Level

Informational

Address

Operational Maturity

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration of security groups not having descriptions in AWS, you can follow the below steps:
  1. Log in to the AWS Management Console.
  2. Navigate to the EC2 service.
  3. Click on the “Security Groups” option from the left-hand menu.
  4. Identify the security group(s) that do not have descriptions.
  5. Click on the checkbox next to the security group(s) to select it.
  6. Click on the “Actions” dropdown menu and select “Edit description”.
  7. Enter a meaningful description for the security group.
  8. Click on the “Save” button to save the description.
Repeat the above steps for all the security groups that do not have descriptions. It is recommended to have a clear and concise description for each security group, which can help in identifying the purpose of the security group and its associated resources.

To remediate the misconfiguration “Security Groups Should Have Descriptions” in AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local machine.
  2. Run the following command to list all the security groups in your AWS account:
  1. Identify the security group that does not have a description.
  2. Run the following command to update the description of the security group:
Replace <security-group-id> with the ID of the security group that needs to be updated, <port-number> with the port number that needs to be opened, <ip-address> with the IP address that needs to be allowed, and <description> with the description of the security group.
  1. Run the following command to verify that the description has been updated:
The output should show the updated description for the security group.
  1. Repeat steps 3-5 for all the security groups that do not have descriptions.
To remediate the misconfiguration “Security Groups Should Have Descriptions” in AWS using Python, you can follow these steps:
  1. Import the necessary AWS SDK and libraries in your Python code.
  2. Use the describe_security_groups method of the AWS EC2 client to retrieve a list of all security groups in your AWS account.
  3. Loop through the list of security groups and check if each security group has a description.
  4. If a security group does not have a description, use the update_security_group_rule_descriptions_ingress method of the AWS EC2 client to add a description to the security group.
Here is the sample Python code to remediate the misconfiguration “Security Groups Should Have Descriptions” in AWS:
This code will loop through all the security groups in your AWS account and add a description to any security group that does not have one.
Updating description on the security group and on its rules is an in-place change and does not force replacement of the security group.Verification with terraform plan should show description being added or changed on the aws_security_group.EXAMPLE_SECURITY_GROUP resource and its ingress/egress blocks, with no -/+ replacement indicator for the resource.

Additional Reading: