Files
ThreadPilot/.github/workflows/codeql.yml
T
PrimeBuild-pc f517b85571 ci: pin workflow actions to commit SHAs and narrow the release token
A repointed third-party tag could swap the installer during the release job,
which held a write token for every job. Actions are now pinned to commit SHAs
(Dependabot keeps them current), only the job that publishes the release can
write, workflow inputs reach pwsh through env instead of ${{ }} interpolation,
Inno Setup and the SBOM tool are version-pinned, and the gitleaks download is
checked against its published SHA256.
2026-10-22 10:54:37 +02:00

59 lines
1.3 KiB
YAML

name: CodeQL
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze C#
runs-on: windows-2022
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: manual
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: "8.0.x"
- name: Initialize CodeQL
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Restore
run: dotnet restore "ThreadPilot_1.sln"
- name: Build Release
run: dotnet build "ThreadPilot_1.sln" --configuration Release --no-restore
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
category: "/language:${{ matrix.language }}"