File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 psscriptanalyzer :
2222 name : PowerShell Code Quality Check
2323 runs-on : ubuntu-latest
24+ permissions :
25+ actions : write
26+ contents : read
27+ security-events : write
28+ statuses : write
2429
2530 steps :
2631 - name : 📦 Checkout Repository
2934 - name : 🔎 Run PSScriptAnalyzer and Export SARIF
3035 shell : pwsh
3136 run : |
32- Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser -ErrorAction Stop
37+ $ErrorActionPreference = 'Stop'
38+ Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
3339 $htPSA = @{
3440 Path = '.'
3541 Recurse = $true
7884 name : psscriptanalyzer-results
7985 path : psscriptanalyzer-results.sarif
8086 retention-days : 7
87+
88+ - name : 📤 Upload SARIF to GitHub
89+ if : always()
90+ uses : github/codeql-action/upload-sarif@v3
91+ with :
92+ sarif_file : psscriptanalyzer-results.sarif
8193
You can’t perform that action at this time.
0 commit comments