Skip to content

Conversation

@kunaals
Copy link
Collaborator

@kunaals kunaals commented Feb 3, 2026

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • Other (please describe):

Summary

The unrestricted_all_ports rule was incorrectly placed in cis_aws_networking.py despite not being an actual CIS benchmark control:

  • It lacked a proper CIS control ID tag (e.g., cis:5.X) - only had cis:aws-5.0 (benchmark version)
  • The rule ID was unrestricted_all_ports instead of cis_aws_5_X_... naming convention
  • Comments explicitly marked it as "Additional: Unrestricted All Ports" (not a CIS control)
  • The existing CIS 5.1 (SSH) and CIS 5.2 (RDP) rules already catch protocol=-1 cases via their OR rule.protocol = '-1' clauses

This PR removes the rule to maintain accuracy of CIS benchmark mappings.

Related issues or links

Checklist

General

  • I have read the contributing guidelines.
  • The linter passes locally (make lint).
  • I have added/updated tests that prove my fix is effective or my feature works.

Proof of functionality

  • New or updated unit/integration tests.

N/A - This is a removal of a rule that had no tests. Existing tests continue to pass.

Notes for reviewers

The rule being removed checked for security groups with protocol = '-1' (all traffic) from 0.0.0.0/0. While this is a valid security concern, it's not a CIS benchmark control. The existing CIS 5.1 and 5.2 rules already catch this case through their OR rule.protocol = '-1' conditions.

🤖 Generated with Claude Code

The unrestricted_all_ports rule was incorrectly placed in cis_aws_networking.py
despite not being an actual CIS benchmark control. It lacked a proper CIS control
ID (e.g., cis:5.X tag) and was only marked as "Additional" in comments.

The existing CIS 5.1 (SSH) and CIS 5.2 (RDP) rules already catch protocol=-1
cases via their OR clauses, making this rule partially redundant.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Collaborator

@jychp jychp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jychp jychp enabled auto-merge (squash) February 3, 2026 22:59
@jychp jychp merged commit 9df549e into master Feb 3, 2026
9 checks passed
@jychp jychp deleted the remove-unrestricted-all-ports-rule branch February 3, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants