Skip to content

Update powershell.yaml #8

Update powershell.yaml

Update powershell.yaml #8

Workflow file for this run

# https://github.com/microsoft/action-psscriptanalyzer
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer
name: PSScriptAnalyzer
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
jobs:
build:
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run PSScriptAnalyzer
uses: microsoft/[email protected]
with:
path: .\
recurse: true
excludeRule: '"PSAvoidUsingInvokeExpression", "PSUseShouldProcessForStateChangingFunctions", "PSAvoidUsingWriteHost", "PSAvoidUsingCmdletAliases"'
output: results.sarif
- name: Upload SARIF as artifact
uses: actions/upload-artifact@v3
with:
name: Sarif
path: results.sarif
if-no-files-found: ignore
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif