From 256b47ea6e0a61542326277af878d27fefba4b96 Mon Sep 17 00:00:00 2001 From: Dawei Huang Date: Tue, 16 Jun 2026 17:02:02 -0500 Subject: [PATCH] [ci]: Update CodeQL action to v4 CodeQL action v2 is unsupported and v3 is deprecated. Bump github/codeql-action init/analyze from v2.1.29 to v4 so scans run on the current CodeQL engine and catch more types of issues, matching the newer scans that surfaced #694. Also bump the supporting actions/checkout steps from v3 to v4 since v4 runs on Node 24. Fixes #695 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Dawei Huang --- .github/workflows/codeql-analysis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 470a2e51d..47637d83f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -33,11 +33,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Checkout sonic-mgmt-common repository which is used by sonic-gnmi - name: Checkout sonic-mgmt-common repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: sonic-net/sonic-mgmt-common path: sonic-mgmt-common @@ -51,12 +51,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2.1.29 + uses: github/codeql-action/init@v4 with: config-file: ./.github/codeql/codeql-config.yml languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2.1.29 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{matrix.language}}"