Azure multi subscription scanning feature#112
Merged
Merged
Conversation
| # Multi-subscription — Azure only (optional) | ||
| --management-group ID Scan all subscriptions under a Management Group | ||
| --subscription ID Scan a single subscription (default: all accessible) | ||
|
|
Collaborator
There was a problem hiding this comment.
we have : Multi-Account Scanning (AWS only) section currently..
do we need a separate one for azure for parity ?
Collaborator
Author
There was a problem hiding this comment.
thanks for highlighting.. just added it
| def list_subscriptions_in_management_group(self, management_group_id: str) -> List[dict]: | ||
| """ | ||
| List all subscriptions under a Management Group. | ||
| Requires Microsoft.Management/managementGroups/read permission. |
Collaborator
There was a problem hiding this comment.
do we need to add this read perm to the docs: Microsoft.Management/managementGroups/read ?
Collaborator
Author
There was a problem hiding this comment.
It's already documented in docs/azure.md — in the Multi-Subscription Scanning section, so guess thats fine as is - no changed needed?
javvaji-devops
previously approved these changes
Mar 21, 2026
| "azure-identity>=1.19.0", | ||
| "azure-mgmt-resource>=23.0.0", | ||
| "azure-mgmt-subscription>=3.0.0", | ||
| "azure-mgmt-managementgroups>=1.0.0", |
Collaborator
There was a problem hiding this comment.
can you increase the release version too as we will be releasing a new version ?
Collaborator
Author
There was a problem hiding this comment.
thanks, just fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Azure Multi-Subscription Scanning — Implementation Highlights
What's new
CleanCloud now scans all Azure subscriptions in parallel with a single service principal. Findings are aggregated into one report with a per-subscription cost breakdown — same experience as AWS multi-account, but simpler architecture.
Architecture
No hub-and-spoke. One service principal with Reader at Management Group level inherits access to all subscriptions underneath. Same credential, different subscription_id per scan.
3 discovery modes:
Core changes
Reliability improvements (also in this PR)
scan-action
Added subscription and management-group inputs to cleancloud-io/scan-action.
Tests
9 new tests covering retry logic: transient retries, exhaustion, Retry-After header, exponential backoff, 60s cap, non-retryable errors (403, 404).