|
1 | | -# This workflow uses actions that are not certified by GitHub. |
2 | | -# They are provided by a third-party and are governed by |
3 | | -# separate terms of service, privacy policy, and support |
4 | | -# documentation. |
5 | | -# |
6 | | -# https://github.com/microsoft/action-psscriptanalyzer |
7 | | -# For more information on PSScriptAnalyzer in general, see |
8 | | -# https://github.com/PowerShell/PSScriptAnalyzer |
9 | | - |
10 | 1 | name: PSScriptAnalyzer |
11 | 2 |
|
12 | 3 | on: |
13 | 4 | push: |
14 | | - branches: [ "master" ] |
| 5 | + branches: |
| 6 | + - '**' |
15 | 7 | pull_request: |
16 | | - branches: [ "master" ] |
17 | | - schedule: |
18 | | - - cron: '20 3 * * 1' |
| 8 | + branches: |
| 9 | + - master |
19 | 10 |
|
20 | 11 | permissions: |
21 | 12 | contents: read |
22 | 13 |
|
23 | 14 | jobs: |
24 | | - build: |
| 15 | + analyze: |
25 | 16 | permissions: |
26 | | - contents: read # for actions/checkout to fetch code |
27 | | - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results |
28 | | - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status |
| 17 | + contents: read |
| 18 | + security-events: write |
29 | 19 | name: PSScriptAnalyzer |
30 | 20 | runs-on: ubuntu-latest |
31 | 21 | steps: |
32 | | - - uses: actions/checkout@v3 |
| 22 | + - uses: actions/checkout@v4 |
33 | 23 |
|
34 | 24 | - name: Run PSScriptAnalyzer |
35 | | - uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f |
| 25 | + uses: microsoft/psscriptanalyzer-action@v1.1 |
36 | 26 | with: |
37 | | - # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. |
38 | | - # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. |
39 | 27 | path: .\ |
40 | 28 | recurse: true |
41 | | - # Include your own basic security rules. Removing this option will run all the rules |
42 | | - includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"' |
43 | 29 | output: results.sarif |
44 | 30 |
|
45 | | - # Upload the SARIF file generated in the previous step |
46 | | - - name: Upload SARIF results file |
47 | | - uses: github/codeql-action/upload-sarif@v2 |
| 31 | + - name: Upload SARIF results |
| 32 | + uses: github/codeql-action/upload-sarif@v3 |
48 | 33 | with: |
49 | 34 | sarif_file: results.sarif |
0 commit comments