|
1 |
| -# For most projects, this workflow file will not need changing; you simply need |
2 |
| -# to commit it to your repository. |
3 |
| -# |
4 |
| -# You may wish to alter this file to override the set of languages analyzed, |
5 |
| -# or to provide custom queries or build logic. |
6 | 1 | name: "CodeQL"
|
7 | 2 |
|
8 | 3 | on:
|
9 | 4 | push:
|
10 |
| - branches: [master] |
| 5 | + branches: [ master ] |
11 | 6 | pull_request:
|
12 |
| - # The branches below must be a subset of the branches above |
13 |
| - branches: [master] |
14 |
| - #schedule: |
15 |
| - # - cron: '0 7 * * 0' |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +defaults: |
| 10 | + run: |
| 11 | + shell: pwsh |
| 12 | + |
| 13 | +env: |
| 14 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 |
| 15 | + |
| 16 | +permissions: |
| 17 | + contents: read |
16 | 18 |
|
17 | 19 | jobs:
|
18 | 20 | analyze:
|
| 21 | + permissions: |
| 22 | + actions: read # for github/codeql-action/init to get workflow details |
| 23 | + contents: read # for actions/checkout to fetch code |
| 24 | + security-events: write # for github/codeql-action/analyze to upload SARIF results |
19 | 25 | name: Analyze
|
20 | 26 | runs-on: ubuntu-latest
|
21 |
| - |
| 27 | + |
22 | 28 | strategy:
|
23 | 29 | fail-fast: false
|
24 | 30 | matrix:
|
25 |
| - # Override automatic language detection by changing the below list |
26 |
| - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
27 |
| - language: ['csharp'] |
28 |
| - # Learn more... |
29 |
| - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
30 |
| - |
| 31 | + include: |
| 32 | + - language: csharp |
| 33 | + build-mode: manual |
| 34 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 35 | + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages |
| 36 | + |
31 | 37 | steps:
|
32 | 38 | - name: Checkout repository
|
33 |
| - uses: actions/checkout@v2 |
| 39 | + uses: actions/checkout@v4 |
34 | 40 |
|
35 | 41 | # Initializes the CodeQL tools for scanning.
|
36 | 42 | - name: Initialize CodeQL
|
37 |
| - uses: github/codeql-action/init@v1 |
| 43 | + uses: github/codeql-action/init@v3 |
38 | 44 | with:
|
39 | 45 | languages: ${{ matrix.language }}
|
40 |
| - # If you wish to specify custom queries, you can do so here or in a config file. |
41 |
| - # By default, queries listed here will override any specified in a config file. |
42 |
| - # Prefix the list here with "+" to use these queries and those in the config file. |
43 |
| - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
44 |
| - |
45 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
46 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
47 |
| - - name: Autobuild |
48 |
| - uses: github/codeql-action/autobuild@v1 |
49 |
| - |
50 | 46 | # ℹ️ Command-line programs to run using the OS shell.
|
51 |
| - # 📚 https://git.io/JvXDl |
52 |
| - |
53 |
| - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
54 |
| - # and modify them (or add more) to build your code if your project |
55 |
| - # uses a compiled language |
56 |
| - |
57 |
| - #- run: | |
58 |
| - # make bootstrap |
59 |
| - # make release |
60 |
| - |
| 47 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 48 | + |
| 49 | + - run: | |
| 50 | + Get-ChildItem . |
| 51 | + name: Capture env |
| 52 | + |
| 53 | + - run: | |
| 54 | + .\build.ps1 -Clean -Build |
| 55 | + name: Build |
| 56 | + |
61 | 57 | - name: Perform CodeQL Analysis
|
62 |
| - uses: github/codeql-action/analyze@v1 |
| 58 | + uses: github/codeql-action/analyze@v3 |
| 59 | + with: |
| 60 | + category: "/language:${{matrix.language}}" |
0 commit comments