Support authenticating as GitHub Apps instead of using Personal Access Tokens #2205
Workflow file for this run
This file contains 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
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run PSScriptAnalyzer | |
uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f # v1.1 | |
with: | |
path: .\ | |
recurse: true | |
excludeRule: '"PSAvoidUsingInvokeExpression", "PSUseShouldProcessForStateChangingFunctions", "PSAvoidUsingWriteHost", "PSAvoidUsingCmdletAliases", "PSUseSingularNouns"' | |
output: results.sarif | |
# Upload the SARIF file generated in the previous step | |
- name: Upload SARIF results file | |
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1 | |
with: | |
sarif_file: results.sarif |