Skip to content

CodeQL

CodeQL #4046

# A CodeQL query for the UA .NET Standard project
name: "CodeQL"
on:
push:
branches: [ master, main, release/*, develop/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, main ]
paths:
- '**.cs'
schedule:
- cron: '30 6 * * 6'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#c-compiler-flags-injected-by-codeql-for-manual-builds
- name: Build Solution
run: |
dotnet build "UA.slnx" -c Release /p:UseSharedCompilation=false /p:EmitCompilerGeneratedFiles=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4