Skip to content

CodeQL Analysis

CodeQL Analysis #49

name: CodeQL Analysis
on:
push:
branches:
- main
paths:
- '**.cs'
- '**.csproj'
pull_request:
branches:
- main
paths:
- '**.cs'
- '**.csproj'
schedule:
- cron: '0 0 * * *'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on:
- ubuntu-22.04
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language:
- csharp
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src
- name: Build
uses: github/codeql-action/autobuild@v3
with:
working-directory: src
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'