fix(powershell): bump Az.Accounts/Az.Resources floor in hub module manifest - #2260
Open
Michael Flanakin (flanakin) wants to merge 3 commits into
Open
fix(powershell): bump Az.Accounts/Az.Resources floor in hub module manifest#2260Michael Flanakin (flanakin) wants to merge 3 commits into
Michael Flanakin (flanakin) wants to merge 3 commits into
Conversation
Microsoft Open Source Security Bot (OssSecurityBot)
and others
added 3 commits
August 12, 2026 08:28
Co-authored-by: MSBrett <MSBrett@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
GitHub Actions should be referenced using a commit SHA (“pinned”) rather than a mutable tag
…nifest Deployment cmdlets (Deploy-FinOpsHub, New-FinOpsCostExport, etc.) declare a RequiredModules floor of Az.Accounts 2.17.0 / Az.Resources 6.5.1 in the generated FinOpsToolkit module manifest, well behind what's actually installed and tested in CI/dev, triggering a stale-version warning at import time. Raise the floor to Az.Accounts 5.4.0 / Az.Resources 9.1.0 -- the exact versions validated here via a full Unit+Lint Pester run (baseline vs. post-change), with zero regressions. Fixes #945 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Michael Flanakin (flanakin)
requested a review
from Brett Wilson (MSBrett)
as a code owner
August 14, 2026 01:37
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.
Summary
Fixes #945. The generated
FinOpsToolkitPowerShell module manifest (built by.build/BuildHelper/Build-PsModule.ps1) declares aRequiredModulesfloor ofAz.Accounts 2.17.0/Az.Resources 6.5.1. This is whatNew-FinOpsCostExport,Deploy-FinOpsHub, and the other FinOps toolkit deployment cmdlets depend on — and it's well behind what's actually installed/tested today, which is the source of the stale Az PowerShell version warning reported in #945.This PR raises the floor to
Az.Accounts 5.4.0/Az.Resources 9.1.0— the exact versions installed and genuinely testable in this environment (not a speculative bump to some newer, untested version).Scope note: per prior discussion on this issue (see #2250, which was rejected as off-target), this change touches only the FinOps hub PowerShell deployment surface. It does not touch CI workflow pins or the Optimization Engine.
Cmdlets validated (touch Az.Accounts/Az.Resources)
Private/Invoke-Rest.ps1—Get-AzAccessToken,Get-AzContextPrivate/Save-FinOpsHubTemplate.ps1—Get-AzContextPublic/Add-FinOpsHubScope.ps1—Get-AzResourcePublic/Add-FinOpsServicePrincipal.ps1—Get-AzContextPublic/Deploy-FinOpsHub.ps1—Get-AzResourceGroup,New-AzResourceGroup,New-AzResourceGroupDeploymentPublic/Get-FinOpsCostExport.ps1—Get-AzContextPublic/Get-FinOpsHub.ps1—Get-AzContext,Get-AzResourcePublic/New-FinOpsCostExport.ps1—Get-AzContext,Get-AzResourceProviderPublic/Register-FinOpsHubProviders.ps1—Get-AzResourceProviderPublic/Remove-FinOpsCostExport.ps1—Get-AzContextPublic/Remove-FinOpsHub.ps1—Get-AzContext,Get-AzResource,Remove-AzResourcePublic/Remove-FinOpsHubScope.ps1—Get-AzResourcePublic/Start-FinOpsCostExport.ps1—Get-AzContextValidation (differential, before/after)
Ran the full Unit + Lint Pester suite (
./src/scripts/Test-PowerShell.ps1 -Unit -Lint) againstAz.Accounts 5.4.0/Az.Resources 9.1.0(the actually-installed versions), once on unmodified HEAD (baseline) and once with this change applied.The 2 failures are identical in both runs (
Should checkout the PR branch,Should use changed-files actioninAction.UpdateMsLearnDates.Tests.ps1) — pre-existing, unrelated to Az.Accounts/Az.Resources, and out of scope for this fix.Also confirmed the module builds cleanly against the new floor (
Build-PsModulegenerates a manifest with the updatedRequiredModules).Integration tests were not run — they require live Azure authentication (
Connect-AzAccount) that isn't available in this environment, so they're out of scope for this validation pass.Test plan
RequiredModules🤖 Generated with Claude Code