Skip to content

Update codeql.yml (#470) #353

Update codeql.yml (#470)

Update codeql.yml (#470) #353

Workflow file for this run

name: CodeQL SAST
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "23 9 * * 3"
workflow_dispatch:
env:
BUILD_CONFIG: release
DOTNET_VERSION: 9
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["csharp", "actions"]
steps:
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Initialize CodeQL
uses: github/codeql-action/init@7e3036b9cd87fc26dd06747b7aa4b96c27aaef3a #v2.20.3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
packs: githubsecuritylab/codeql-csharp-queries
- name: Cache nuget
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
- name: Build Paprika
run: |
dotnet restore src/Paprika.sln
dotnet build src/Paprika.sln -c ${{ env.BUILD_CONFIG }} -v d
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7e3036b9cd87fc26dd06747b7aa4b96c27aaef3a #v2.20.3