Skip to content

Bump github/codeql-action/init from 3.37.3 to 4.37.7 #1113

Bump github/codeql-action/init from 3.37.3 to 4.37.7

Bump github/codeql-action/init from 3.37.3 to 4.37.7 #1113

Workflow file for this run

name: CodeQL
on:
push:
branches:
- main
- pre-main-integration
paths-ignore:
- '**.md'
- 'doc/**'
- 'CLAUDE.md'
- 'LICENSE'
pull_request:
branches:
- main
- pre-main-integration
paths-ignore:
- '**.md'
- 'doc/**'
- 'CLAUDE.md'
- 'LICENSE'
schedule:
- cron: "0 18 * * 0"
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: read
strategy:
fail-fast: false
matrix:
language:
- csharp
- actions
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up .NET
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@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
languages: ${{ matrix.language }}
- name: Restore dependencies
if: ${{ matrix.language == 'csharp' }}
run: dotnet restore FolderDiffIL4DotNet.sln
- name: Build for CodeQL
if: ${{ matrix.language == 'csharp' }}
run: dotnet build FolderDiffIL4DotNet.sln --configuration Release --no-restore
- name: Analyze
uses: github/codeql-action/analyze@4187e74d05793876e9989daffde9c3e66b4acd07 # v3.37.3
with:
output: codeql-raw-results
post-processed-sarif-path: codeql-results
upload: never
upload-database: false
- name: Upload local CodeQL results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: CodeQL-SARIF-${{ matrix.language }}
if-no-files-found: error
path: codeql-results/**
upload-results:
name: Upload results
needs: analyze
runs-on: ubuntu-latest
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- csharp
- actions
steps:
- name: Download local CodeQL results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: CodeQL-SARIF-${{ matrix.language }}
path: codeql-results
- name: Upload CodeQL results
uses: github/codeql-action/upload-sarif@4187e74d05793876e9989daffde9c3e66b4acd07 # v3.37.3
with:
category: ".github/workflows/codeql.yml:analyze/language:${{ matrix.language }}/"
sarif_file: codeql-results