name: CodeQL # Project-specific CodeQL (not the shared reusable workflow): the C# code is a WPF # (net10.0-windows) app that only builds on Windows from a .slnx solution. The workflows # themselves are analysed too (`actions` language). on: push: branches: [main] pull_request: branches: [main] schedule: - cron: '37 14 * * 1' # Mondays 14:37 UTC workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: analyze: name: Analyze (${{ matrix.language }}) runs-on: ${{ matrix.os }} timeout-minutes: 30 permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: include: - language: csharp os: windows-latest build-mode: manual - language: actions os: ubuntu-latest build-mode: none steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - if: matrix.language == 'csharp' uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: global-json-file: global.json - name: Initialize CodeQL uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} queries: security-extended - if: matrix.build-mode == 'manual' name: Build # Roslyn analyzers add nothing to CodeQL's extraction and slow the traced build down. run: dotnet build CommandForge.slnx -c Release -p:RunAnalyzers=false - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 with: category: "/language:${{ matrix.language }}"