Skip to content

Commit bb4c0d0

Browse files
authored
Update version of CodeQL (#1620)
1 parent 07896d1 commit bb4c0d0

File tree

1 file changed

+38
-40
lines changed

1 file changed

+38
-40
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,60 @@
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.
61
name: "CodeQL"
72

83
on:
94
push:
10-
branches: [master]
5+
branches: [ master ]
116
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
1618

1719
jobs:
1820
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
1925
name: Analyze
2026
runs-on: ubuntu-latest
21-
27+
2228
strategy:
2329
fail-fast: false
2430
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+
3137
steps:
3238
- name: Checkout repository
33-
uses: actions/checkout@v2
39+
uses: actions/checkout@v4
3440

3541
# Initializes the CodeQL tools for scanning.
3642
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v1
43+
uses: github/codeql-action/init@v3
3844
with:
3945
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-
5046
# ℹ️ 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+
6157
- 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

Comments
 (0)