From 4ba1d4e16742e4eafc1093a61d5a3b8c3f8d4b5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:23:41 +0000 Subject: [PATCH 1/2] build(deps): bump github/codeql-action/init from 4.39.3 to 4.39.4 Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.39.3 to 4.39.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/33d7b85da1a04171e211befe2c739303b9a4c066...1bd86f2fdb4b86187fa4059f16f31a3202acc9ea) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3cb3c53..dd3c602 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize CodeQL - uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4 + uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4 with: build-mode: none languages: javascript-typescript From 20514f50f8e2709aded4013b2b3b99fc78e6afc6 Mon Sep 17 00:00:00 2001 From: Anilkumar Reddy Date: Thu, 26 Nov 2026 10:19:29 -0600 Subject: [PATCH 2/2] ci: keep CodeQL action versions together --- .github/dependabot.yml | 4 ++++ .github/workflows/codeql.yml | 2 +- tests/codeql-workflow.test.mjs | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/codeql-workflow.test.mjs diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 73dc0ca..728f505 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,3 +17,7 @@ updates: schedule: interval: weekly day: monday + groups: + codeql: + patterns: + - 'github/codeql-action/*' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dd3c602..2247aae 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -32,4 +32,4 @@ jobs: languages: javascript-typescript - name: Analyze - uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4 + uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4 diff --git a/tests/codeql-workflow.test.mjs b/tests/codeql-workflow.test.mjs new file mode 100644 index 0000000..6b26119 --- /dev/null +++ b/tests/codeql-workflow.test.mjs @@ -0,0 +1,24 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { test } from 'node:test'; + +test('CodeQL initialization and analysis use the same immutable action version', () => { + const workflow = readFileSync( + new URL('../.github/workflows/codeql.yml', import.meta.url), + 'utf8', + ); + const actions = [ + ...workflow.matchAll( + /uses:\s*github\/codeql-action\/(init|analyze)@([a-f0-9]{40})\b/g, + ), + ]; + assert.deepEqual(actions.map((action) => action[1]).sort(), [ + 'analyze', + 'init', + ]); + assert.equal( + new Set(actions.map((action) => action[2])).size, + 1, + 'CodeQL rejects mismatched init and analyze versions', + ); +});