Skip to content

Fix PSScriptAnalyzer CI job - use inline pwsh step#14

Merged
dgkanatsios merged 1 commit intomainfrom
fix-psscriptanalyzer-inline
Mar 10, 2026
Merged

Fix PSScriptAnalyzer CI job - use inline pwsh step#14
dgkanatsios merged 1 commit intomainfrom
fix-psscriptanalyzer-inline

Conversation

@dgkanatsios
Copy link
Collaborator

Replace third-party action + SARIF upload with inline pwsh step. The previous approach failed because:

  • microsoft/psscriptanalyzer-action has no version tags
  • codeql-action/upload-sarif needs security-events:write permission

The new approach runs Invoke-ScriptAnalyzer directly (pre-installed on GitHub runners), fails only on Error severity, and needs no special permissions.

Replace third-party action + SARIF upload with inline pwsh step.
The previous approach failed because:
- microsoft/psscriptanalyzer-action has no version tags
- codeql-action/upload-sarif needs security-events:write permission

The new approach runs Invoke-ScriptAnalyzer directly (pre-installed
on GitHub runners), fails only on Error severity, and needs no
special permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dgkanatsios dgkanatsios merged commit 1062053 into main Mar 10, 2026
2 checks passed
@dgkanatsios dgkanatsios deleted the fix-psscriptanalyzer-inline branch March 10, 2026 21:10
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.

1 participant