Uh oh!
There was an error while loading. Please reload this page.
Install PSScriptAnalyzer directly instead of via psmodulecache - #3034
Closed
nohwnd wants to merge 1 commit into
Closed
Install PSScriptAnalyzer directly instead of via psmodulecache#3034nohwnd wants to merge 1 commit into
nohwnd wants to merge 1 commit into
Conversation
sha_pinning_required applies to actions referenced inside composite actions, not just to the ones in our own workflows. potatoqualitee/psmodulecache is a composite action and its own actions/cache reference is not pinned: v6.2.1 uses actions/cache@v4.2.0 and v6.3 uses @v5.0.5. So the job fails at "Set up job" with The action actions/cache@v4.2.0 is not allowed in pester/Pester because all actions must be pinned to a full-length commit SHA. Taking the Dependabot bump to v6.3 does not help, it just moves to a different unpinned reference. We cannot pin someone else's internals, so the dependency goes. The step only installed PSScriptAnalyzer and ConvertToSARIF. Two modules from PSGallery take seconds, so the cache was not buying much, and dropping it removes the last blocker to turning sha_pinning_required back on. It was the only action we use with unpinned nested references, the other six are clean. 🤖
nohwnd
marked this pull request as draft
September 5, 2026 09:53
nohwnd
commented
Sep 5, 2026
MemberAuthor
Parking this as a draft. The reason enforcement and psmodulecache cannot coexist is in the description above, and the upstream fix is potatoqualitee/psmodulecache#68. 🤖 |
nohwnd
commented
Sep 5, 2026
MemberAuthor
Closing in favour of #3036, where the reasoning and the options are written up. Removing the module cache is only one of four ways to handle this, and it is not obviously the right one until we know what the cache was solving. The policy is off, so nothing is blocked. 🤖 |
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 freeto 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.
Turning on
sha_pinning_requiredbroke the PSScriptAnalyzer check, which is a required check, so nothing can merge. This is the fix.The enforcement is transitive. It applies to actions referenced inside composite actions, not only to the ones in our own workflows.
potatoqualitee/psmodulecacheis a composite action and its ownactions/cachereference is not pinned:actions/cache@v4.2.0actions/cache@v5.0.5So the job fails at Set up job before running anything, and taking the Dependabot bump does not help, it just moves to a different unpinned reference. We cannot pin someone else's internals.
The step only installed PSScriptAnalyzer and ConvertToSARIF. Installing them straight from PSGallery takes seconds, so the cache was not buying much, and this removes a third-party composite action from the build entirely.
I checked the other six actions we use - checkout, setup-dotnet, upload-artifact, download-artifact, codecov-action, codeql-action - and none of them have unpinned nested references. psmodulecache was the only one, so this is the last blocker to turning
sha_pinning_requiredback on.🤖