Skip to content

deps: bump github/codeql-action/analyze from 4.37.6 to 4.37.7 #63

deps: bump github/codeql-action/analyze from 4.37.6 to 4.37.7

deps: bump github/codeql-action/analyze from 4.37.6 to 4.37.7 #63

Workflow file for this run

name: CodeQL
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "29 3 * * 2"
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: analyze-csharp
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
languages: csharp
queries: security-extended
- name: Set up .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
- name: Verify .NET 10 SDK selection
shell: bash
run: |
pinned_version="$(jq -r '.sdk.version' global.json)"
selected_version="$(dotnet --version)"
# global.json pins an exact SDK because the AOT toolchain packages it injects are recorded in
# packages.lock.json; any other SDK would fail the locked restore below with NU1004.
if [[ "${selected_version}" != "${pinned_version}" ]]; then
echo "global.json pins SDK ${pinned_version}, but dotnet selected ${selected_version}."
dotnet --info
exit 1
fi
- name: Restore
run: dotnet restore --locked-mode -p:NuGetAuditMode=all -warnaserror
- name: Build for CodeQL
run: dotnet build --no-restore --configuration Release -warnaserror
- name: Analyze
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
category: /language:csharp