From 0ffe73b73adad6bed88901352105309aa167e262 Mon Sep 17 00:00:00 2001 From: Suresh Mandalapu <27204388+sureshhmrc@users.noreply.github.com> Date: Fri, 6 Nov 2026 20:37:47 +0000 Subject: [PATCH 1/3] Fix aws.ec2.gpu.idle family matching for Blackwell/H200 and demo Azure rule IDs --- cleancloud/demo/findings.py | 4 ++-- .../providers/aws/rules/ai/ec2_gpu_idle.py | 10 +++++++-- docs/example-outputs.md | 4 ++-- docs/specs/aws/ai/ec2_gpu_idle.md | 7 +++++-- .../providers/aws/ai/test_aws_ec2_gpu_idle.py | 21 +++++++++++++++++++ .../test_azure_scan_graceful_degradation.py | 2 +- 6 files changed, 39 insertions(+), 9 deletions(-) diff --git a/cleancloud/demo/findings.py b/cleancloud/demo/findings.py index b79c611..71df5f7 100644 --- a/cleancloud/demo/findings.py +++ b/cleancloud/demo/findings.py @@ -244,7 +244,7 @@ AZURE_FINDINGS: List[Finding] = [ Finding( provider="azure", - rule_id="azure.unattached_disk", + rule_id="azure.compute.disk.unattached", resource_type="azure.compute.disk", resource_id="data-disk-legacy-api", region="eastus", @@ -291,7 +291,7 @@ ), Finding( provider="azure", - rule_id="azure.vm_stopped_not_deallocated", + rule_id="azure.vm.stopped_not_deallocated", resource_type="azure.compute.vm", resource_id="vm-old-jumpbox", region="eastus", diff --git a/cleancloud/providers/aws/rules/ai/ec2_gpu_idle.py b/cleancloud/providers/aws/rules/ai/ec2_gpu_idle.py index 66e4dea..83d2752 100644 --- a/cleancloud/providers/aws/rules/ai/ec2_gpu_idle.py +++ b/cleancloud/providers/aws/rules/ai/ec2_gpu_idle.py @@ -24,15 +24,21 @@ "p4d.", "p4de.", "p5.", - "p5en.", # H100 + higher network bandwidth than p5 - "p6.", # NVIDIA B200 (Blackwell) + "p5e.", # NVIDIA H200 + "p5en.", # H200 + higher network bandwidth than p5e + # Blackwell families use hyphenated names (e.g. p6-b200.48xlarge), not "p6." + "p6-b200.", # NVIDIA B200 + "p6-b300.", # NVIDIA B300 + "p6e-gb200.", # NVIDIA GB200 (UltraServer nodes) "g4dn.", "g4ad.", "g5.", "g5g.", "g6.", "g6e.", + "g6f.", # NVIDIA L4 (fractional GPU) "gr6.", + "gr6f.", # NVIDIA L4 (fractional GPU, high memory) "trn1.", "trn1n.", "trn2.", diff --git a/docs/example-outputs.md b/docs/example-outputs.md index 2eb915e..0f9bef1 100644 --- a/docs/example-outputs.md +++ b/docs/example-outputs.md @@ -691,7 +691,7 @@ Found 7 hygiene issues: Confidence : Medium Resource : azure.compute.disk → data-disk-legacy-api Region : eastus - Rule : azure.unattached_disk + Rule : azure.compute.disk.unattached Reason : Managed disk not attached to any VM (age: 34 days) Detected : 2026-02-08T14:45:12+00:00 Details: @@ -1121,7 +1121,7 @@ Scanned at: 2026-02-08T14:45:19+00:00 "findings": [ { "provider": "azure", - "rule_id": "azure.unattached_disk", + "rule_id": "azure.compute.disk.unattached", "resource_type": "azure.compute.disk", "resource_id": "/subscriptions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resourceGroups/rg-legacy/providers/Microsoft.Compute/disks/data-disk-legacy-api", "region": "eastus", diff --git a/docs/specs/aws/ai/ec2_gpu_idle.md b/docs/specs/aws/ai/ec2_gpu_idle.md index a9877a5..d8743a5 100644 --- a/docs/specs/aws/ai/ec2_gpu_idle.md +++ b/docs/specs/aws/ai/ec2_gpu_idle.md @@ -118,8 +118,9 @@ Out of scope: The current rule targets these instance-type prefixes: -- `p2.`, `p3.`, `p3dn.`, `p4d.`, `p4de.`, `p5.`, `p5en.`, `p6.` -- `g4dn.`, `g4ad.`, `g5.`, `g5g.`, `g6.`, `g6e.`, `gr6.` +- `p2.`, `p3.`, `p3dn.`, `p4d.`, `p4de.`, `p5.`, `p5e.`, `p5en.` +- `p6-b200.`, `p6-b300.`, `p6e-gb200.` +- `g4dn.`, `g4ad.`, `g5.`, `g5g.`, `g6.`, `g6e.`, `g6f.`, `gr6.`, `gr6f.` - `trn1.`, `trn1n.`, `trn2.` - `inf1.`, `inf2.` - `dl1.`, `dl2q.` @@ -131,6 +132,8 @@ Notes: - Non-AI accelerated families such as `f1`, `f2`, and `vt1` are intentionally out of scope. - Future AWS family-name additions may require allowlist updates even when they are documented in the latest accelerated-computing pages. +- Blackwell families use hyphenated instance-type names (for example `p6-b200.48xlarge`), so each + must be listed with its full family prefix; a bare `p6.` prefix matches no AWS instance type. --- diff --git a/tests/cleancloud/providers/aws/ai/test_aws_ec2_gpu_idle.py b/tests/cleancloud/providers/aws/ai/test_aws_ec2_gpu_idle.py index b67cb64..751eb3a 100644 --- a/tests/cleancloud/providers/aws/ai/test_aws_ec2_gpu_idle.py +++ b/tests/cleancloud/providers/aws/ai/test_aws_ec2_gpu_idle.py @@ -163,6 +163,27 @@ def test_trn1_is_gpu(self): def test_inf2_is_gpu(self): assert _is_gpu_instance("inf2.xlarge") + def test_p5e_is_gpu(self): + assert _is_gpu_instance("p5e.48xlarge") + + def test_p5en_is_gpu(self): + assert _is_gpu_instance("p5en.48xlarge") + + def test_p6_b200_is_gpu(self): + assert _is_gpu_instance("p6-b200.48xlarge") + + def test_p6_b300_is_gpu(self): + assert _is_gpu_instance("p6-b300.48xlarge") + + def test_p6e_gb200_is_gpu(self): + assert _is_gpu_instance("p6e-gb200.36xlarge") + + def test_g6f_is_gpu(self): + assert _is_gpu_instance("g6f.xlarge") + + def test_gr6f_is_gpu(self): + assert _is_gpu_instance("gr6f.4xlarge") + def test_t3_is_not_gpu(self): assert not _is_gpu_instance("t3.large") diff --git a/tests/cleancloud/providers/azure/test_azure_scan_graceful_degradation.py b/tests/cleancloud/providers/azure/test_azure_scan_graceful_degradation.py index 6f0bf7b..79b08ab 100644 --- a/tests/cleancloud/providers/azure/test_azure_scan_graceful_degradation.py +++ b/tests/cleancloud/providers/azure/test_azure_scan_graceful_degradation.py @@ -17,7 +17,7 @@ def _make_finding(resource_id="disk-1"): return Finding( provider="azure", - rule_id="azure.unattached_disk", + rule_id="azure.compute.disk.unattached", resource_type="azure.compute.disk", resource_id=resource_id, region="eastus", From eca89eb2b61f42a097d4237f55e005f1af846b01 Mon Sep 17 00:00:00 2001 From: Suresh Mandalapu <27204388+sureshhmrc@users.noreply.github.com> Date: Fri, 6 Nov 2026 20:39:05 +0000 Subject: [PATCH 2/3] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ebcb08..7f37f10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "cleancloud" -version = "1.32.0" +version = "1.33.0" description = "Read-only cloud hygiene for AWS, Azure, and GCP. Multi-account org scanning, CI/CD enforcement, and deterministic cost modeling. No agents, no telemetry." readme = "README.md" requires-python = ">=3.10" From 2a50409bdca32215ca6340225a191ac77bffc349 Mon Sep 17 00:00:00 2001 From: Suresh Mandalapu <27204388+sureshhmrc@users.noreply.github.com> Date: Fri, 6 Nov 2026 20:53:47 +0000 Subject: [PATCH 3/3] Update vnet_gateway_idle.py --- cleancloud/providers/azure/rules/vnet_gateway_idle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cleancloud/providers/azure/rules/vnet_gateway_idle.py b/cleancloud/providers/azure/rules/vnet_gateway_idle.py index d356d72..bb579ab 100644 --- a/cleancloud/providers/azure/rules/vnet_gateway_idle.py +++ b/cleancloud/providers/azure/rules/vnet_gateway_idle.py @@ -53,7 +53,7 @@ from azure.core.exceptions import HttpResponseError, ServiceRequestError, ServiceResponseError from azure.mgmt.monitor import MonitorManagementClient from azure.mgmt.network import NetworkManagementClient -from azure.mgmt.resource import ResourceManagementClient +from azure.mgmt.resource.resources import ResourceManagementClient from cleancloud.core.confidence import ConfidenceLevel from cleancloud.core.evidence import Evidence