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

Standardized CIS rule IDs to include provider prefixes (e.g., AWS and Google Workspace), updated registry mappings, docs, and tests.

Rationale: CIS publishes separate benchmarks for many vendor product families, so control numbering is scoped to each benchmark. This causes collisions like "3.1" meaning different things across providers (AWS 3.1 is CloudTrail multi-Region logging, while GCP 3.1 is default network removal). Provider prefixes make rule IDs globally unambiguous for cross-provider filtering/reporting.

Breaking changes

Rule IDs now include provider prefixes. Downstream references to legacy rule IDs must be updated to the new prefixed IDs.

How was this tested?

  • make test

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

  • Screenshot showing the graph before and after changes.
  • New or updated unit/integration tests.

If you are adding or modifying a synced entity

  • Included Cartography sync logs from a real environment demonstrating successful synchronization of the new/modified entity. Logs should show:
    • The sync job starting and completing without errors
    • The number of nodes/relationships created or updated
    • Example:
      INFO:cartography.intel.aws.ec2:Loading 42 EC2 instances for region us-east-1
      INFO:cartography.intel.aws.ec2:Synced EC2 instances in 3.21 seconds
      

If you are changing a node or relationship

If you are implementing a new intel module

Notes for reviewers

Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
@kunaals kunaals changed the title Standardize CIS rule IDs with provider prefixes feat(rules): Standardize CIS rule IDs with provider prefixes Feb 3, 2026
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 9 files

Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
@kunaals kunaals requested a review from jychp February 3, 2026 21:51
Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
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.

1 non blockling comment

Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
@kunaals kunaals enabled auto-merge (squash) February 3, 2026 22:07
@kunaals kunaals merged commit 85219a7 into master Feb 3, 2026
9 checks passed
@kunaals kunaals deleted the codex/cis-rule-id-prefix branch February 3, 2026 22:10
jychp pushed a commit that referenced this pull request Feb 3, 2026
#2336)

### 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)
- [x] 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

- Related to #2334 (feat(rules): Standardize CIS rule IDs with provider
prefixes)


### Checklist

#### General
- [x] I have read the [contributing
guidelines](https://cartography-cncf.github.io/cartography/dev/developer-guide.html).
- [x] The linter passes locally (`make lint`).
- [x] I have added/updated tests that prove my fix is effective or my
feature works.

#### Proof of functionality
- [x] 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](https://claude.com/claude-code)

Signed-off-by: Kunaal Sikka <kunaal@subimage.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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