|
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 | | -# |
7 | | -# ******** NOTE ******** |
8 | | -# We have attempted to detect the languages in your repository. Please check |
9 | | -# the `language` matrix defined below to confirm you have the correct set of |
10 | | -# supported CodeQL languages. |
11 | | -# |
12 | 1 | name: "CodeQL" |
13 | 2 |
|
14 | 3 | on: |
15 | 4 | push: |
16 | 5 | branches: [ "main" ] |
17 | 6 | pull_request: |
18 | | - # The branches below must be a subset of the branches above |
19 | 7 | branches: [ "main" ] |
20 | | - schedule: |
21 | | - - cron: '0 0 * * 1' |
22 | 8 |
|
23 | 9 | jobs: |
24 | 10 | analyze: |
25 | | - name: Analyze |
| 11 | + name: Analyze (csharp) |
26 | 12 | runs-on: ubuntu-latest |
27 | | - permissions: |
28 | | - contents: read |
29 | | - security-events: write |
30 | | - pull-requests: read |
31 | | - |
32 | | - |
33 | | - steps: |
34 | | - - name: Checkout repository |
35 | | - uses: actions/checkout@v4 |
36 | | - |
37 | | - # Initializes the CodeQL tools for scanning. |
38 | | - - name: Initialize CodeQL |
39 | | - uses: github/codeql-action/init@v3 |
40 | | - with: |
41 | | - languages: csharp |
42 | | - |
43 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
44 | | - # If this step fails, then you should remove it and run the build manually (see below) |
45 | | - # - name: Autobuild |
46 | | - # uses: github/codeql-action/autobuild@v2 |
47 | | - |
48 | | - # ℹ️ Command-line programs to run using the OS shell. |
49 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
50 | 13 |
|
51 | | - # If the Autobuild fails above, remove it and uncomment the following three lines. |
52 | | - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
53 | | - |
54 | | - # - run: | |
55 | | - # echo "Run, Build Application using script" |
56 | | - # ./location_of_script_within_repo/buildscript.sh |
57 | | - - name: Setup .NET SDK |
58 | | - uses: actions/setup-dotnet@v5 |
59 | | - with: |
60 | | - dotnet-version: 10.0.x |
61 | | - |
62 | | - |
63 | | - - name: Restore dependencies |
64 | | - run: dotnet restore CleanArchitecture.Blazor.slnx |
65 | | - - name: Build |
66 | | - run: dotnet build CleanArchitecture.Blazor.slnx --configuration Debug --no-restore |
67 | | - |
68 | | - |
| 14 | + permissions: |
| 15 | + contents: read |
| 16 | + security-events: write |
| 17 | + actions: read |
| 18 | + packages: read |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout repository |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Initialize CodeQL |
| 25 | + uses: github/codeql-action/init@v4 |
| 26 | + with: |
| 27 | + languages: csharp |
| 28 | + build-mode: none |
| 29 | + queries: security-extended,security-and-quality |
| 30 | + |
| 31 | + - name: Perform CodeQL Analysis |
| 32 | + uses: github/codeql-action/analyze@v4 |
0 commit comments