Compare commits

...

118 Commits

Author SHA1 Message Date
Sam Robson
913e1bb775 Merge pull request #4283 from github/sam-robson/decode-diff-informed-sarif-uris
fix: decode SARIF location URIs in diff-informed alert filtering
2026-11-03 19:47:09 +00:00
Michael B. Gale
c5320e3a8a Merge pull request #4288 from github/dependabot/npm_and_yarn/node-forge-1.4.1
Bump node-forge from 1.4.0 to 1.4.1
2026-11-03 15:53:37 +00:00
Michael B. Gale
875ac0c36c Merge pull request #4287 from github/dependabot/npm_and_yarn/pr-checks/glob-14.0.3
Bump glob from 13.0.6 to 14.0.3 in /pr-checks
2026-11-03 15:49:12 +00:00
github-actions[bot]
d0468de4ad Rebuild 2026-11-03 15:38:38 +00:00
Michael B. Gale
6a39e2e9cd Merge branch 'main' into dependabot/npm_and_yarn/pr-checks/glob-14.0.3 2026-11-03 15:36:40 +00:00
Michael B. Gale
7c5ee8eaaf Merge branch 'main' into dependabot/npm_and_yarn/node-forge-1.4.1 2026-11-03 15:33:20 +00:00
Michael B. Gale
1f8cacc390 Merge pull request #4292 from github/mbg/ci/fix-sync-back
Maintain action versions by workflow in `sync-back.ts`
2026-11-03 14:27:13 +00:00
Michael B. Gale
8a05ce6067 Update JSDoc for scanGeneratedWorkflows 2026-11-03 13:41:11 +00:00
Michael B. Gale
de3ece651e Merge branch 'main' into mbg/ci/fix-sync-back 2026-11-03 12:58:27 +00:00
Michael B. Gale
cc88e02cc1 Update version of actions/download-artifact in unsupported-macos for consistency 2026-11-03 12:34:09 +00:00
Michael B. Gale
7b8e4ced67 Maintain action versions by workflow in sync-back.ts
This avoids failures on PRs where `sync-back.ts` is run as part of the "Rebuild" job if there are already version inconsistencies on the base branch.
2026-11-03 12:34:09 +00:00
Henry Mercer
093c0af4c3 Merge pull request #4290 from github/mergeback/v4.39.2-to-main-1fc58d04
Mergeback v4.39.2 refs/heads/releases/v4 into main
2026-11-03 11:09:56 +00:00
github-actions[bot]
30626207b6 Rebuild 2026-11-03 10:46:49 +00:00
github-actions[bot]
eb1e5bd7ab Update changelog and version after v4.39.2 2026-11-03 10:46:39 +00:00
Henry Mercer
1fc58d04a4 Merge pull request #4286 from github/update-v4.39.2-c05042115
Merge main into releases/v4
2026-11-03 10:45:07 +00:00
dependabot[bot]
dc4b73f464 Bump node-forge from 1.4.0 to 1.4.1
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.4.0 to 1.4.1.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.4.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-03 10:27:23 +00:00
dependabot[bot]
3b22011a97 Bump glob from 13.0.6 to 14.0.3 in /pr-checks
Bumps [glob](https://github.com/isaacs/node-glob) from 13.0.6 to 14.0.3.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v13.0.6...v14.0.3)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 14.0.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-03 10:27:18 +00:00
github-actions[bot]
d9984814e4 Update changelog for v4.39.2 2026-11-03 10:25:27 +00:00
Henry Mercer
0d5ac7a9b1 Merge pull request #4285 from github/henrymercer/automated-change-notes
Migrate bundle update workflow to new changenote tooling
2026-11-03 10:13:30 +00:00
Henry Mercer
39528452cf Remove unused updateChangelog from bundle-changelog.ts
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-02 17:40:43 +00:00
Henry Mercer
9bc74b13fb Create a changenote for bundle updates instead of editing the changelog
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-02 17:40:43 +00:00
Henry Mercer
c050421152 Merge pull request #4284 from github/update-bundle/codeql-bundle-v2.27.4
Update default bundle to 2.27.4
2026-11-02 16:43:58 +00:00
Henry Mercer
750fe8feea Merge branch 'main' into update-bundle/codeql-bundle-v2.27.4 2026-11-02 16:16:46 +00:00
github-actions[bot]
adfcd5ffb8 Add changelog note 2026-11-02 16:15:59 +00:00
github-actions[bot]
2ef3b62201 Update default bundle to codeql-bundle-v2.27.4 2026-11-02 16:15:52 +00:00
Sam Robson
b05fe69863 fix: decode SARIF location URIs in diff-informed alert filtering 2026-11-02 16:04:35 +00:00
Michael B. Gale
b35c6c6aae Merge pull request #4251 from github/mbg/refactor-util/errors
Refactor a few things out of `util.ts`
2026-11-02 16:00:32 +00:00
Michael B. Gale
ac9f257611 Merge remote-tracking branch 'origin/main' into mbg/refactor-util/errors 2026-11-02 14:28:50 +00:00
Michael B. Gale
52cf185226 Merge pull request #4278 from github/mbg/macos27/xcode-detection
Add `xcrun`-based fallback for Xcode version detection
2026-11-02 12:37:03 +00:00
Michael B. Gale
95dd6bfbc4 Fix new test not providing typical input 2026-11-02 12:24:01 +00:00
Michael B. Gale
120993f723 Convert diagnostic ID to kebab case 2026-10-30 18:06:04 +00:00
Henry Mercer
4f900f43bc Merge pull request #4281 from github/henrymercer/tar-path-in-extracttarzst
Run tar from its resolved path when extracting zstd bundles
2026-10-30 17:48:07 +00:00
Michael B. Gale
f1396bd6e2 Fix incorrect xcodeVer check 2026-10-30 17:47:22 +00:00
Michael B. Gale
5e9db0e82c Merge pull request #4272 from github/mbg/ci/typecheck
Add `typecheck` commands
2026-10-30 17:36:54 +00:00
Henry Mercer
8512f45c1a Fix stdout and stderr being swapped in tar extraction errors
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-30 17:10:42 +00:00
Henry Mercer
0b97d53711 Extract zstd bundles using the tar path found by getTarVersion
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-30 17:10:09 +00:00
Michael B. Gale
8d18caadc8 Distinguish between Xcode and SDK version in messages 2026-10-30 17:09:47 +00:00
Michael B. Gale
410d706e43 Combine product name and version into ProductVersion type 2026-10-30 16:58:46 +00:00
Michael B. Gale
fb9d45340b Merge remote-tracking branch 'origin/main' into mbg/refactor-util/errors 2026-10-30 16:50:30 +00:00
Michael B. Gale
ce1de8daea Run Xcode check on self-hosted runners 2026-10-30 16:44:04 +00:00
Michael B. Gale
a189728bdd Exclude more unused files in tsconfig.json 2026-10-30 16:37:57 +00:00
Michael B. Gale
8e175f388e Merge remote-tracking branch 'origin/main' into mbg/ci/typecheck 2026-10-30 16:24:52 +00:00
Michael B. Gale
9410c4a524 Merge remote-tracking branch 'origin/main' into mbg/macos27/xcode-detection 2026-10-30 16:22:57 +00:00
Michael B. Gale
80d7b74bf4 Rename xcodeVersionFromSdk and improve comments/log messages 2026-10-30 16:18:06 +00:00
Michael B. Gale
efea0445d3 Add xcodeVersionFromXcodeBuild 2026-10-30 16:14:50 +00:00
Michael B. Gale
8f2596eca1 Remove xcodeVersion and inline fallback logic in checkRunnerSupportsTracedAnalysis 2026-10-30 15:51:13 +00:00
Michael B. Gale
1fb93080c2 Fix test name 2026-10-30 15:38:28 +00:00
Michael B. Gale
be54d791a1 Add xcrun-based fallback for Xcode version detection 2026-10-30 14:59:05 +00:00
Michael B. Gale
255c50d4d6 Merge pull request #4275 from github/mbg/avoid-latest
Avoid using `-latest` runner labels in CI
2026-10-30 14:52:47 +00:00
Michael B. Gale
4a6767cdd0 Rename xcodeVersion to xcodeVersionFromLink 2026-10-30 14:47:45 +00:00
Michael B. Gale
104d2381d1 Update workflows 2026-10-30 14:23:48 +00:00
Michael B. Gale
ea41ba5518 Merge branch 'main' into mbg/avoid-latest 2026-10-30 14:08:07 +00:00
Michael B. Gale
b46c2ee59b Merge pull request #4221 from github/mbg/macos27/warn
Check for versions of macOS and Xcode that are unsupported for traced analysis
2026-10-30 13:18:49 +00:00
Michael B. Gale
c56bb9b85b Fix checks if FF is disabled test using the wrong predicate 2026-10-30 13:00:33 +00:00
Michael B. Gale
b5b3ef7c6a Fix Xcode skip on self-hosted runner test 2026-10-30 12:59:24 +00:00
Michael B. Gale
3ecc7a9b7d Add change note 2026-10-30 12:56:44 +00:00
Michael B. Gale
0aaf198c56 Seperate checks in pr-checks.yml 2026-10-30 11:43:19 +00:00
Michael B. Gale
99441b422c Merge pull request #4277 from github/dependabot/github_actions/dot-github/workflows/actions-minor-d87422eef0
Bump actions/setup-python from 7.0.0 to 7.1.0 in /.github/workflows in the actions-minor group across 1 directory
2026-10-30 11:40:43 +00:00
Michael B. Gale
690197ddd4 Replace macos-latest-xlarge with macos-26-xlarge 2026-10-30 11:39:57 +00:00
Michael B. Gale
f583e03df6 Remove unnecessary lstatSync call 2026-10-30 11:24:30 +00:00
Michael B. Gale
c6cc137b27 Fix assertions and features for tests 2026-10-30 11:10:38 +00:00
Michael B. Gale
251f480fa3 Use correct version constant in handleUnsupportedVersion baseMessage 2026-10-30 11:02:47 +00:00
Michael B. Gale
688c04ad4c Remove if option for validation jobs 2026-10-30 11:01:35 +00:00
Michael B. Gale
5bdb913da1 Rename FF to include "Abort" instead of "Skip" 2026-10-30 11:00:42 +00:00
Michael B. Gale
b2bb71bc61 Set tempDir in all createTestConfig calls in traced.test.ts
To avoid stray diagnostic files ending up in the working directory
2026-10-30 10:58:21 +00:00
Michael B. Gale
239b07849d Only skip Xcode check on self-hosted runners 2026-10-30 10:56:23 +00:00
Michael B. Gale
d37c3131f4 Improve comment/log message wording 2026-10-30 10:52:53 +00:00
Michael B. Gale
3da973862d Add debug-level log messages when checks are skipped 2026-10-29 16:35:49 +00:00
Michael B. Gale
019a5caccd Change log level of messages in xcodeVersion 2026-10-29 16:33:54 +00:00
Michael B. Gale
8cafec0756 Skip checks on self-hosted runners 2026-10-29 16:30:21 +00:00
Michael B. Gale
c8bf9adf8a Update hard-coded latest runner labels 2026-10-29 16:25:19 +00:00
Henry Mercer
2d7aeadbf0 Merge pull request #4276 from github/dependabot/npm_and_yarn/npm-minor-7af0a5998a
Bump the npm-minor group across 1 directory with 2 updates
2026-10-29 10:46:05 +00:00
github-actions[bot]
931fefa4bc Rebuild 2026-10-28 18:00:29 +00:00
dependabot[bot]
1b863a0649 Bump actions/setup-python
Bumps the actions-minor group with 1 update in the /.github/workflows directory: [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-python` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](5fda3b95a4...6d4fd22b20)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-28 17:57:49 +00:00
dependabot[bot]
1965df5d2e Bump the npm-minor group across 1 directory with 2 updates
Bumps the npm-minor group with 2 updates in the / directory: [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).


Updates `@types/sinon` from 22.0.0 to 22.0.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

Updates `eslint-plugin-jsdoc` from 65.3.15 to 65.4.0
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v65.3.15...v65.4.0)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-version: 22.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 65.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-28 17:54:58 +00:00
Michael B. Gale
b8e636781a Replace -latest with current, corresponding labels in DEFAULT_RUNNER_IMAGES 2026-10-28 16:02:23 +00:00
Michael B. Gale
4b0f575f5a Replace floating occurrences of ubuntu-latest 2026-10-28 16:00:58 +00:00
Michael B. Gale
2d85855366 Refactor defaultRunnerImages into DEFAULT_RUNNER_IMAGES map 2026-10-28 15:59:59 +00:00
Michael B. Gale
ad2b30ba0f Use new FF in e2e test 2026-10-28 13:29:20 +00:00
Michael B. Gale
99971dd136 Gate checks behind FF 2026-10-28 13:19:40 +00:00
Michael B. Gale
202d9f1a6b Add CheckUnsupportedTracedAnalysis FF 2026-10-28 13:13:15 +00:00
Michael B. Gale
17685f3eba Add e2e test 2026-10-28 13:01:50 +00:00
Michael B. Gale
87ef6f5834 Return early if we are not on macOS to avoid unnecessary work 2026-10-28 13:01:49 +00:00
Michael B. Gale
84e80cea7e Avoid producing the same-ish message twice 2026-10-28 13:01:49 +00:00
Michael B. Gale
5547a3567f Only create diagnostics for traced languages 2026-10-28 13:01:49 +00:00
Michael B. Gale
eff66e8fb1 Make Xcode regex more flexible 2026-10-28 13:01:49 +00:00
Michael B. Gale
97b90230e5 Clarify that we are looking at the Darwin version 2026-10-28 13:01:49 +00:00
Michael B. Gale
fe45268b48 Use lstat instead of stat 2026-10-28 13:01:48 +00:00
Michael B. Gale
7e5643a58e Accept paths containing only major version
Also fix unescaped dot patterns in regex
2026-10-28 13:01:48 +00:00
Michael B. Gale
156dc2ce18 Include URL to announcement in diagnostic and log messages 2026-10-28 13:01:48 +00:00
Michael B. Gale
86bb85349e Don't perform check for non-traced analyses 2026-10-28 13:01:48 +00:00
Michael B. Gale
7121af21e1 Check if Xcode version is unsupported 2026-10-28 13:01:48 +00:00
Michael B. Gale
242ea52c05 Add function to determine Xcode version based on symlink 2026-10-28 12:59:25 +00:00
Michael B. Gale
5f65e35fec Add FF to fail if macOS version is unsupported 2026-10-28 12:56:36 +00:00
Michael B. Gale
45b8586e1b Check if macOS version is unsupported 2026-10-28 12:44:59 +00:00
Michael B. Gale
a9623043dc Skip Swift checks if tools feature is enabled 2026-10-28 12:44:59 +00:00
Michael B. Gale
9271dd21d5 Add swiftSupportsAllPlatforms to ToolsFeature 2026-10-28 12:20:27 +00:00
Michael B. Gale
e0220172c9 Use macOSVersion in isSwiftCompatible 2026-10-28 12:20:27 +00:00
Michael B. Gale
570e438ccc Add macOSVersion helper 2026-10-28 12:20:27 +00:00
Michael B. Gale
f364105950 Add osRelease to BaseState 2026-10-28 12:20:27 +00:00
Michael B. Gale
0d774618aa Replace Env with ReadOnlyEnv in the runTool chain 2026-10-28 12:20:26 +00:00
Michael B. Gale
fe36f120df Run checks command for pr-checks in CI 2026-10-27 11:58:21 +00:00
Michael B. Gale
405433cc6d Add typecheck command to package.json 2026-10-27 11:58:21 +00:00
Michael B. Gale
9b9c8e25e2 Add check commands to pr-checks/package.json 2026-10-27 11:58:21 +00:00
Michael B. Gale
ab6209be6c Exclude main project tests from pr-checks/tsconfig.json 2026-10-27 11:58:21 +00:00
Michael B. Gale
5c1005e0ae Merge branch 'main' into mbg/refactor-util/errors 2026-10-21 16:58:03 +01:00
Michael B. Gale
c29909a87f Improve typing of resolveFunction 2026-10-21 16:57:16 +01:00
Michael B. Gale
44f1c73c56 Fix resolveFunction call 2026-10-21 16:57:16 +01:00
Michael B. Gale
7def52843a Move initializeEnvironment out of util.ts 2026-10-21 16:57:16 +01:00
Michael B. Gale
774bc191bf Remove unused type parameters from Env classes 2026-10-21 16:57:15 +01:00
Michael B. Gale
dc2ed81cc7 Remove InstanceURL from util.ts 2026-10-16 22:04:05 +01:00
Michael B. Gale
02283e9542 Move more GitHub-related definitions from util.ts to github.ts 2026-10-16 21:54:02 +01:00
Michael B. Gale
86bc4448d3 Mark additional imports in util.ts as type-only 2026-10-16 21:52:19 +01:00
Michael B. Gale
9c72af5b2b Move codeQlVersionAtLeast out of util.ts and into CodeQL 2026-10-16 21:50:31 +01:00
Michael B. Gale
929f5c0db4 Move isDiskConfigurationError out of codeql.ts 2026-10-16 21:50:09 +01:00
Michael B. Gale
a76419a632 Move wrapError and getErrorMessage out of util.ts 2026-10-16 21:46:16 +01:00
Michael B. Gale
071544a67a Move HTTPError out of util.ts 2026-10-16 21:40:48 +01:00
Michael B. Gale
8bdea824e2 Move ConfigurationError out of util.ts 2026-10-16 21:39:54 +01:00
130 changed files with 4129 additions and 1422 deletions

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: nightly-latest
- os: windows-latest
- os: windows-2025
version: nightly-latest
name: All-platform bundle
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,28 +34,28 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
analysis-kinds: code-scanning
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
analysis-kinds: code-quality
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
analysis-kinds: code-scanning,code-quality
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
analysis-kinds: risk-assessment
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
analysis-kinds: code-scanning
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
analysis-kinds: code-quality
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
analysis-kinds: code-scanning,code-quality
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
analysis-kinds: risk-assessment
name: Analysis kinds

View File

@@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
name: "Analyze: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,11 +44,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: windows-latest
- os: windows-2025
version: linked
name: autobuild-action
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,13 +44,13 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: windows-latest
- os: windows-2025
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: windows-latest
- os: windows-2025
version: nightly-latest
name: Autobuild direct tracing (custom working directory)
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Autobuild working directory
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,13 +44,13 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: windows-latest
- os: windows-2025
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: windows-latest
- os: windows-2025
version: nightly-latest
name: Build mode autobuild
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Build mode manual
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Build mode none
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Build mode rollback
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: 'Bundle: From nightly'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: toolcache
name: 'Bundle: From toolcache'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: windows-latest
- os: windows-2025
version: linked
name: 'Bundle: Caching checks'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Clean up database cluster directory
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Config export
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Config input
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'C/C++: disabling autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
- os: macos-26
version: linked
- os: macos-latest
- os: macos-26
version: nightly-latest
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'C/C++: autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Diagnostic export
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Diagnostic export without database
if: github.triggering_actor != 'dependabot[bot]'
@@ -108,7 +108,7 @@ jobs:
contents: read
security-events: read
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
- os: windows-latest
- os: windows-2025
version: nightly-latest
name: Export file baseline information
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Extractor ram and threads options test
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Proxy test
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,9 +54,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Go: Custom queries'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
name: 'Go: diagnostic when Go is changed after init step'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
name: 'Go: diagnostic when `file` is not installed'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
name: 'Go: workaround for indirect tracing'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -46,25 +46,25 @@ jobs:
include:
- os: ubuntu-24.04
version: stable-v2.20.7
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.21.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.22.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.23.9
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.24.3
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.25.6
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
name: 'Go: tracing with autobuilder step'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -46,25 +46,25 @@ jobs:
include:
- os: ubuntu-24.04
version: stable-v2.20.7
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.21.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.22.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.23.9
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.24.3
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.25.6
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
name: 'Go: tracing with custom build steps'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -46,25 +46,25 @@ jobs:
include:
- os: ubuntu-24.04
version: stable-v2.20.7
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.21.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.22.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.23.9
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.24.3
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.25.6
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
name: 'Go: tracing with legacy workflow'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Packaging: Download using registries'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Custom source root
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Job run UUID added to SARIF
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Language aliases
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Local CodeQL bundle
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -58,37 +58,37 @@ jobs:
version: stable-v2.20.7
- os: macos-15-xlarge
version: stable-v2.20.7
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.21.4
- os: macos-15-xlarge
version: stable-v2.21.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.22.4
- os: macos-15-xlarge
version: stable-v2.22.4
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.23.9
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: stable-v2.23.9
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.24.3
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: stable-v2.24.3
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.25.6
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: stable-v2.25.6
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: nightly-latest
name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]'
@@ -121,7 +121,7 @@ jobs:
# imports `importlib._bootstrap._ERR_MSG`, which those Python versions no longer define.
# See https://github.com/github/codeql-action/pull/3212
if: matrix.version != 'nightly-latest' && matrix.version != 'linked'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13.15'

View File

@@ -34,9 +34,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Overlay database init fallback
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Packaging: Config and input passed to the CLI'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Packaging: Config and input'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Packaging: Config file'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'Packaging: Action input'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -35,40 +35,40 @@ jobs:
matrix:
include:
- language: actions
os: ubuntu-latest
os: ubuntu-26.04
version: linked
expected-extractors: actions javascript
- language: cpp
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: manual
build-command: gcc -o main main.c
- language: csharp
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: none
- language: go
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: autobuild
- language: java
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: none
- language: javascript
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: python
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: ruby
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: rust
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: swift
os: macos-latest-xlarge
os: macos-26-xlarge
version: linked
build-mode: autobuild
name: Per-language bundles

View File

@@ -54,9 +54,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Remote config file
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Resolve environment
if: github.triggering_actor != 'dependabot[bot]'

12
.github/workflows/__ruby.yml generated vendored
View File

@@ -34,17 +34,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: macos-latest
- os: macos-26
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
name: Ruby analysis
if: github.triggering_actor != 'dependabot[bot]'

8
.github/workflows/__rust.yml generated vendored
View File

@@ -36,13 +36,13 @@ jobs:
include:
- os: ubuntu-24.04
version: stable-v2.20.7
- os: ubuntu-latest
- os: ubuntu-26.04
version: stable-v2.22.1
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Rust analysis
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,17 +54,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: macos-latest
- os: macos-26
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
- os: macos-latest
- os: macos-26
version: nightly-latest
name: Split workflow
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: macos-latest
- os: macos-26
version: linked
- os: windows-latest
- os: windows-2025
version: linked
name: Start proxy
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,11 +34,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Submit SARIF after failure
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: nightly-latest
name: Swift analysis using autobuild
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: linked
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: default
- os: macos-latest-xlarge
- os: macos-26-xlarge
version: nightly-latest
name: Swift analysis using a custom build command
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,9 +54,9 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: Test unsetting environment variables
if: github.triggering_actor != 'dependabot[bot]'

135
.github/workflows/__unsupported-macos.yml generated vendored Normal file
View File

@@ -0,0 +1,135 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: PR Check - Unsupported macOS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request: {}
merge_group:
types:
- checks_requested
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: unsupported-macos-${{github.ref}}
jobs:
unsupported-macos:
strategy:
fail-fast: false
matrix:
include:
- os: xcode-27
version: linked
- os: xcode-27
version: nightly-latest
name: Unsupported macOS
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 20.x
cache: npm
- name: Install newer npm
run: npm install -g npm@11.19.1
- name: Install dependencies
run: npm ci
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Check xcode_select_link
run: |
readlink /private/var/db/xcode_select_link
file -h /private/var/db/xcode_select_link
- uses: ./../action/init
id: init
continue-on-error: true
env:
CODEQL_ACTION_CHECK_UNSUPPORTED_TRACED_ANALYSIS: true
CODEQL_ACTION_ABORT_UNSUPPORTED_TRACED_ANALYSIS: true
with:
languages: swift
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Analyze
# We could run `analyze` here from `./../analyze`, but `getAnalyzeActionName` in `workflow.ts`
# can't cope with that unless we introduce a different testing environment. Since this step
# would just fail on `xcode-27` anyway, we just skip it instead.
if: false
uses: ./analyze
with:
category: '/test-codeql-version:${{ matrix.version }}'
env:
CODEQL_ACTION_SKIP_GENERATE_FAILED_SARIF: false
CODEQL_ACTION_SKIP_SARIF_UPLOAD: true
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
CODEQL_ACTION_TEST_MODE: true
unsupported-macos-sarif-checks:
if: github.triggering_actor != 'dependabot[bot]'
needs:
- unsupported-macos
permissions:
contents: read
security-events: read
timeout-minutes: 5
runs-on: ubuntu-26.04
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 20.x
cache: npm
- name: Install newer npm
run: npm install -g npm@11.19.1
- name: Install dependencies
run: npm ci
- name: Download workflow artifact
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: test-mode-sarif-*
path: sarif
- name: List artifact contents
run: ls -laR ./sarif
- name: Check diagnostics appear in SARIF
env:
SARIF_PATH: "./sarif/"
DIAGNOSTIC_ID: "codeql-action/unsupported-traced-analysis-macos"
DIAGNOSTIC_NAME: "Traced analysis is not supported on this version of macOS"
EXPECTED_LOCATIONS: "0"
EXPECTED_MESSAGE: |
Traced analysis is not supported on macOS 27 or above.
run: npx tsx ./pr-checks/check-diagnostics.ts
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
name: "Upload-sarif: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -54,13 +54,13 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
analysis-kinds: code-scanning
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
analysis-kinds: code-quality
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
analysis-kinds: code-scanning,code-quality
name: Test different uses of `upload-sarif`

View File

@@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
name: Use a custom `checkout_path`
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -22,7 +22,7 @@ jobs:
# Identify the CodeQL tool versions to use in the analysis job.
check-codeql-versions:
if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
outputs:
versions: ${{ steps.compare.outputs.versions }}
@@ -106,7 +106,7 @@ jobs:
analyze-other:
if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
strategy:
fail-fast: false

View File

@@ -41,11 +41,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: linked
- os: ubuntu-latest
- os: ubuntu-26.04
version: default
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
# Code-Scanning config not created because environment variable is not set

View File

@@ -47,7 +47,7 @@ jobs:
# stable-v2.20.7 requires an older version of Java than the default on `ubuntu-latest` (`ubuntu-26.04`).
# We could install that older version on the newer runners, or use the older runner.
# We do the latter here. This can be removed once we stop supporting `v2.20.7`.
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-latest') }}
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-26.04') }}
steps:
- name: Dump GitHub event
@@ -91,7 +91,7 @@ jobs:
timeout-minutes: 45
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- name: Download all artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2

View File

@@ -45,7 +45,7 @@ jobs:
# stable-v2.20.7 requires an older version of Java than the default on `ubuntu-latest` (`ubuntu-26.04`).
# We could install that older version on the newer runners, or use the older runner.
# We do the latter here. This can be removed once we stop supporting `v2.20.7`.
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-latest') }}
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-26.04') }}
steps:
- name: Check out repository
@@ -84,7 +84,7 @@ jobs:
timeout-minutes: 45
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
steps:
- name: Download all artifacts
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2

View File

@@ -10,7 +10,7 @@ on:
workflow_dispatch:
inputs:
baseBranch:
description: 'The base branch to merge into'
description: "The base branch to merge into"
default: main
required: false
@@ -24,7 +24,7 @@ defaults:
jobs:
merge-back:
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
environment: Automation
if: github.repository == 'github/codeql-action'
env:
@@ -41,16 +41,16 @@ jobs:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
GITHUB_CONTEXT: "${{ toJson(github) }}"
run: echo "${GITHUB_CONTEXT}"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # ensure we have all tags and can push commits
fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: 'npm'
cache: "npm"
- name: Install JavaScript dependencies
run: npm ci

View File

@@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-26.04, macos-26, windows-2025]
node-version: [20, 24]
permissions:
contents: read
@@ -71,7 +71,7 @@ jobs:
run: npm test
- name: Lint
if: always() && matrix.os != 'windows-latest'
if: always() && matrix.os != 'windows-2025'
run: npm run lint-ci
- name: Upload sarif
@@ -81,7 +81,7 @@ jobs:
# paired `push` run that the queue branch creates use that ref, so gate on the ref itself
# rather than the event. The same results are uploaded by the `pull_request` run and again
# by the `push` run on `main`.
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/')
if: matrix.os == 'ubuntu-26.04' && matrix.node-version == 24 && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/')
with:
sarif_file: eslint.sarif
category: eslint
@@ -93,7 +93,7 @@ jobs:
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
timeout-minutes: 10
concurrency:
@@ -126,10 +126,15 @@ jobs:
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
run: .github/workflows/script/verify-pr-checks.sh
- name: Typecheck pr-checks scripts
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
working-directory: pr-checks
run: npm run typecheck
- name: Run pr-checks tests
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
working-directory: pr-checks
run: npx tsx --test
run: npm run test
- name: Run `pr-checks/changenotes.ts` to ensure that all unreleased change notes are valid
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}

View File

@@ -29,7 +29,7 @@ defaults:
jobs:
prepare:
name: "Release info"
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
if: github.repository == 'github/codeql-action'
permissions:

View File

@@ -29,10 +29,10 @@ jobs:
contents: read
# We currently need `security-events: read` to access feature flags.
security-events: read
runs-on: windows-latest
runs-on: windows-2025
steps:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: 3.12

View File

@@ -25,7 +25,7 @@ jobs:
name: Query Filters Tests
if: github.triggering_actor != 'dependabot[bot]'
timeout-minutes: 45
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
permissions:
contents: read # This permission is needed to allow the GitHub Actions workflow to read the contents of the repository.
steps:

View File

@@ -12,7 +12,7 @@ defaults:
jobs:
rebuild:
name: Rebuild Action
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch'
env:
@@ -33,7 +33,7 @@ jobs:
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: 'npm'
cache: "npm"
- name: Remove label
if: github.event_name == 'pull_request'

View File

@@ -34,7 +34,7 @@ jobs:
rollback:
name: "Create rollback release"
if: github.repository == 'github/codeql-action'
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
timeout-minutes: 45
# Don't set the deployment environment for test runs

View File

@@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-26.04
version: nightly-latest
name: 'CodeQL Bundle All'
if: github.triggering_actor != 'dependabot[bot]'

View File

@@ -20,7 +20,7 @@ defaults:
jobs:
update-bundle:
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
permissions:
contents: write # needed to push commits
pull-requests: write # needed to create pull requests
@@ -113,11 +113,12 @@ jobs:
echo "CLI_VERSION=$cli_version" | tee -a "$GITHUB_ENV"
echo "PR_URL=$pr_url" | tee -a "$GITHUB_ENV"
- name: Create changelog note
- name: Create changenote
run: |
npx tsx pr-checks/bundle-changelog.ts
- name: Push changelog note
- name: Push changenote
run: |
git commit -am "Add changelog note"
git add unreleased-change-notes
git commit -m "Add changenote"
git push

View File

@@ -26,7 +26,7 @@ jobs:
update:
name: "Update release branch"
timeout-minutes: 45
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
if: github.event_name == 'workflow_dispatch'
needs: [prepare]
env:
@@ -79,7 +79,7 @@ jobs:
backport:
name: "Create backport"
timeout-minutes: 45
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
environment: Automation
needs: [prepare]
if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' }}

View File

@@ -6,6 +6,13 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
No user facing changes.
## 4.39.2 - 03 Nov 2026
- Update default CodeQL bundle version to [2.27.4](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.4). [#4284](https://github.com/github/codeql-action/pull/4284)
- _Upcoming breaking change_: CodeQL version 2.22.3 and earlier were discontinued on 16 October 2026 alongside GitHub Enterprise Server 3.18, and will be unsupported by the next minor release of the CodeQL Action. Added a deprecation warning for customers using these versions of CodeQL. [#4266](https://github.com/github/codeql-action/pull/4266)
- Starting with macOS 27 and Xcode 27, traced analyses are unsupported. See [this blog post for more information](https://github.blog/changelog/2026-10-19-codeql-changes-for-macos-27-xcode-27-and-swift-6-4/). The CodeQL Action will now try to identify if a workflow is about to perform a traced analysis on version 27 or above of macOS or Xcode. If so, the CodeQL Action will emit a corresponding warning that will also be visible on the [Tool Status Page](https://docs.github.com/en/code-security/how-tos/find-and-fix-code-vulnerabilities/manage-your-configuration/use-the-tools-status-page-for-code-scanning). This check will be rolled out following this release of the CodeQL Action. [#4221](https://github.com/github/codeql-action/pull/4221)
- The undocumented TRAP cache cleanup feature that could be enabled using the `CODEQL_ACTION_CLEANUP_TRAP_CACHES` environment variable has been removed, as announced in the release notes for CodeQL Action 4.35.2. The `analyze` Action now warns if this environment variable is set. If you used TRAP cache cleanup to limit Actions cache usage, we recommend disabling TRAP caching by passing the `trap-caching: false` input to the `init` Action. [#4243](https://github.com/github/codeql-action/pull/4243)
## 4.39.1 - 21 Oct 2026
- Update default CodeQL bundle version to [2.27.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.3). [#4256](https://github.com/github/codeql-action/pull/4256)

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.27.3",
"cliVersion": "2.27.3",
"priorBundleVersion": "codeql-bundle-v2.27.2",
"priorCliVersion": "2.27.2"
"bundleVersion": "codeql-bundle-v2.27.4",
"cliVersion": "2.27.4",
"priorBundleVersion": "codeql-bundle-v2.27.3",
"priorCliVersion": "2.27.3"
}

2018
lib/entry-points.js generated

File diff suppressed because it is too large Load Diff

184
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "4.39.2",
"version": "4.39.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "4.39.2",
"version": "4.39.3",
"license": "MIT",
"workspaces": [
"pr-checks"
@@ -33,7 +33,7 @@
"js-yaml": "^5.5.0",
"jsonschema": "1.5.0",
"long": "^5.3.2",
"node-forge": "^1.4.0",
"node-forge": "^1.4.1",
"semver": "^7.8.5",
"undici": "^7.30.1",
"uuid": "^14.0.3"
@@ -50,14 +50,14 @@
"@types/node-forge": "^1.3.14",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.8.0",
"@types/sinon": "^22.0.0",
"@types/sinon": "^22.0.1",
"ava": "^6.4.1",
"esbuild": "^0.28.2",
"eslint": "^9.39.5",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-github": "^6.1.2",
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jsdoc": "^65.3.15",
"eslint-plugin-jsdoc": "^65.4.0",
"eslint-plugin-no-async-foreach": "^0.1.1",
"glob": "^13.0.6",
"globals": "^17.13.0",
@@ -67,14 +67,6 @@
"typescript-eslint": "^8.72.0"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
"version": "1.2.6",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@actions/artifact": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-5.0.3.tgz",
@@ -958,18 +950,89 @@
"tslib": "^2.4.0"
}
},
"node_modules/@es-joy/escodegen": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@es-joy/escodegen/-/escodegen-4.2.0.tgz",
"integrity": "sha512-jWqqS3StW6vGwJeT8yu6alS4nipOBi3kD/pR63+9hG2NfGafCJ4viDME15mVf+fyupyptcUJDXfv63gFF5Gzfg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@es-joy/estraverse": "^7.1.1",
"@es-joy/jsdoccomment": "^0.62.0",
"esprima": "^4.0.1",
"esutils": "^2.0.3",
"optionator": "^0.9.4"
},
"bin": {
"escodegen": "bin/escodegen.js",
"esgenerate": "bin/esgenerate.js"
},
"engines": {
"node": ">=6.0"
},
"optionalDependencies": {
"source-map": "~0.7.6"
}
},
"node_modules/@es-joy/escodegen/node_modules/@es-joy/jsdoccomment": {
"version": "0.62.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.62.0.tgz",
"integrity": "sha512-yWi6sm7INEwnfS7IJvE0dU+RTrwzLPFcY7e7eGpu/l5Q9lWfQ2ROwZ0qVnc242jw2TUPsfHX3XMIISkGBv57RQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.8",
"@typescript-eslint/types": "^8.44.1",
"comment-parser": "1.4.1",
"esquery": "^1.6.0",
"jsdoc-type-pratt-parser": "~5.9.0"
},
"engines": {
"node": ">=20.11.0"
}
},
"node_modules/@es-joy/escodegen/node_modules/comment-parser": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz",
"integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 12.0.0"
}
},
"node_modules/@es-joy/escodegen/node_modules/jsdoc-type-pratt-parser": {
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-5.9.2.tgz",
"integrity": "sha512-TYzkACp/wPvDJLRY7qpHXtrhgwoAaojIOnLaaVNi+AbPU2u1kkjfKd9hXXTq0qSAGsyYXvwUXt99h9I5iCmjjw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@es-joy/estraverse": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/@es-joy/estraverse/-/estraverse-7.1.1.tgz",
"integrity": "sha512-h2d737iS0LFAqypZOmXizu54qAbHofI/RpD30Zom03O6BCXKHuFevWKPcGarZbGq82h7qSBb5G6kLdhTMO+caw==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
}
},
"node_modules/@es-joy/jsdoccomment": {
"version": "0.98.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.98.0.tgz",
"integrity": "sha512-QS+b7I2aaSM+gZfDz1b9E4B367JJ2qTjFXRKF289iKkh9sYdZ21Q5MiF/Duzouy3J0C4VhM3I/8f2F4+zT8gYQ==",
"version": "0.100.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.100.0.tgz",
"integrity": "sha512-QuIT5kMg3XWN22Wa1rcXmR/GkfSg6Ygs/ikMiHihdSpu+o3O59LygkFV9srKa5xHplBFwNd5ZCo3bywL4k7qMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.9",
"@typescript-eslint/types": "^8.70.0",
"@typescript-eslint/types": "^8.72.0",
"comment-parser": "1.4.9",
"esquery": "^1.7.0",
"jsdoc-type-pratt-parser": "~9.2.2"
"jsdoc-type-pratt-parser": "~9.3.0"
},
"engines": {
"node": "^22.22.2 || >=24.15.0"
@@ -2681,20 +2744,15 @@
"license": "MIT"
},
"node_modules/@types/sinon": {
"version": "22.0.0",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-22.0.0.tgz",
"integrity": "sha512-TDbVpbccc2HfiqHR09Argj3mHV1KMW7sCCKj52fsl8lbRLkEn7fB1966EWhOKWUBcqfBueZuPoA7/OK1CKiy3g==",
"version": "22.0.1",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-22.0.1.tgz",
"integrity": "sha512-MThluJXPmpBY+Z5S3565F2z+hjkCXnBrr36j2mitVQ7JUtxA+A+YQhs+0Q6J8jxb0SVJvydO+6NWfj9EBzpiBQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/sinonjs__fake-timers": "*"
"@sinonjs/fake-timers": "^15.4.0"
}
},
"node_modules/@types/sinonjs__fake-timers": {
"version": "8.1.2",
"dev": true,
"license": "MIT"
},
"node_modules/@types/unist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@@ -5366,15 +5424,16 @@
}
},
"node_modules/eslint-plugin-jsdoc": {
"version": "65.3.15",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-65.3.15.tgz",
"integrity": "sha512-cpU66X+daaX2X6cndE0grdLAIlodysI3KuUEdrJd6FvQHuuYOOvMRAdy8ToYjyJrsoUv0fXkMclA5RM5kaipMw==",
"version": "65.4.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-65.4.0.tgz",
"integrity": "sha512-bRiU6LfCFmLL7GuePKvA6ZIcXLonhZGCg2TgQLmkcExeVdAirQp2Hsf3xeSUTmlKwAAsREVEOLbZYD8F7oA69g==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"@es-joy/jsdoccomment": "~0.98.0",
"@es-joy/escodegen": "^4.2.0",
"@es-joy/jsdoccomment": "~0.100.0",
"@es-joy/resolve.exports": "1.2.0",
"@typescript-eslint/utils": "^8.70.1",
"@typescript-eslint/utils": "^8.72.0",
"are-docs-informative": "^0.1.1",
"comment-parser": "1.4.9",
"debug": "^4.4.3",
@@ -7170,36 +7229,18 @@
}
},
"node_modules/jsdoc-type-pratt-parser": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-9.2.2.tgz",
"integrity": "sha512-eFY7Rlscvv/BpY6UsVsjKwMhu1tJO/F4U/vC9g3yeRy/JqszuO1UP6Vdq+85G+3FP6fEw/sWR8a5ftPFY86csw==",
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-9.3.0.tgz",
"integrity": "sha512-JZ8lKMCZXDlM1jAjAK5tTmtFJtgv6iFQQfjE3Fza6jBRACUueaEXLY17n1u05JO1lcPkNxgP+ddEDtiPsk5ktg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.9",
"@types/node": "^26.4.0"
"@types/estree": "^1.0.9"
},
"engines": {
"node": "^22.22.2 || >=24.15.0"
}
},
"node_modules/jsdoc-type-pratt-parser/node_modules/@types/node": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.2.tgz",
"integrity": "sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~8.9.0"
}
},
"node_modules/jsdoc-type-pratt-parser/node_modules/undici-types": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
"integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
"dev": true,
"license": "MIT"
},
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
@@ -8157,9 +8198,9 @@
}
},
"node_modules/node-forge": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
"integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.1.tgz",
"integrity": "sha512-w5/MfWaeMrpR/5ba6fZyAUTLSuE6aYz7H/3cYrqwZEmf5eQS3IaaLgJt4MBv7HglGFWmV22K8h4U18RJQmw/ow==",
"license": "(BSD-3-Clause OR GPL-2.0)",
"engines": {
"node": ">= 6.13.0"
@@ -8360,16 +8401,18 @@
}
},
"node_modules/optionator": {
"version": "0.9.3",
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
"integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@aashutoshrathi/word-wrap": "^1.2.3",
"deep-is": "^0.1.3",
"fast-levenshtein": "^2.0.6",
"levn": "^0.4.1",
"prelude-ls": "^1.2.1",
"type-check": "^0.4.0"
"type-check": "^0.4.0",
"word-wrap": "^1.2.5"
},
"engines": {
"node": ">= 0.8.0"
@@ -9293,6 +9336,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/source-map": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
"integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"engines": {
"node": ">= 12"
}
},
"node_modules/spdx-exceptions": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
@@ -10326,6 +10380,16 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/word-wrap": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "4.39.2",
"version": "4.39.3",
"private": true,
"description": "CodeQL action",
"scripts": {
@@ -13,7 +13,8 @@
"test": "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
"transpile": "tsc --build --verbose tsconfig.json",
"update-pr-checks": "./pr-checks/sync.sh"
"update-pr-checks": "./pr-checks/sync.sh",
"typecheck": "tsc --noEmit"
},
"license": "MIT",
"workspaces": [
@@ -41,7 +42,7 @@
"js-yaml": "^5.5.0",
"jsonschema": "1.5.0",
"long": "^5.3.2",
"node-forge": "^1.4.0",
"node-forge": "^1.4.1",
"semver": "^7.8.5",
"undici": "^7.30.1",
"uuid": "^14.0.3"
@@ -58,14 +59,14 @@
"@types/node-forge": "^1.3.14",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.8.0",
"@types/sinon": "^22.0.0",
"@types/sinon": "^22.0.1",
"ava": "^6.4.1",
"esbuild": "^0.28.2",
"eslint": "^9.39.5",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-github": "^6.1.2",
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jsdoc": "^65.3.15",
"eslint-plugin-jsdoc": "^65.4.0",
"eslint-plugin-no-async-foreach": "^0.1.1",
"glob": "^13.0.6",
"globals": "^17.13.0",

View File

@@ -10,17 +10,13 @@ import { afterEach, beforeEach, describe, it } from "node:test";
import {
CLI_VERSION_ENV_VAR,
getChangenote,
getCLIVersion,
getPRNumber,
getPRUrl,
PR_URL_ENV_VAR,
updateChangelog,
} from "./bundle-changelog";
import {
EMPTY_CHANGELOG,
NO_CHANGES_STR,
UNRELEASED_PLACEHOLDER,
} from "./changelog";
import { isValidChangenoteContent } from "./changelog/validate";
let testDir: string;
@@ -85,58 +81,15 @@ describe("getPRNumber", async () => {
});
});
const testChangelog = `${EMPTY_CHANGELOG.trimEnd()}
## 4.23.7
- Other change
## 4.23.6
${NO_CHANGES_STR}`;
const expectedChangelog = `# CodeQL Action Changelog
## ${UNRELEASED_PLACEHOLDER}
- Update default CodeQL bundle version to
## 4.23.7
- Other change
## 4.23.6
${NO_CHANGES_STR}`;
describe("updateChangelog", async () => {
await it("removes `NO_CHANGES_STR` if present in [UNRELEASED] section", async () => {
const result = updateChangelog(EMPTY_CHANGELOG, "");
assert.ok(!result.includes(NO_CHANGES_STR));
});
await it("doesn't remove `NO_CHANGES_STR` if present in versioned section", async () => {
const result = updateChangelog(
EMPTY_CHANGELOG.replace(UNRELEASED_PLACEHOLDER, "1.2.3"),
"",
describe("getChangenote", async () => {
await it("returns a note linking to the bundle release and the PR", async () => {
assert.equal(
getChangenote("1.2.3", testPrUrl),
"- Update default CodeQL bundle version to [1.2.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v1.2.3). [#42](https://github.com/github/codeql-action/pulls/42)\n",
);
assert.ok(result.includes(NO_CHANGES_STR));
});
await it("throws if there are no sections", async () => {
assert.throws(() => {
updateChangelog(
"# CodeQL Action Changelog",
"- Update default CodeQL bundle version to",
);
});
});
await it("adds note at the end of the first section", async () => {
const result = updateChangelog(
testChangelog,
"- Update default CodeQL bundle version to",
);
assert.deepEqual(result, expectedChangelog);
await it("returns valid changenote content", async () => {
assert.ok(isValidChangenoteContent(getChangenote("1.2.3", testPrUrl)));
});
});

View File

@@ -1,17 +1,13 @@
#!/usr/bin/env npx tsx
/**
* Updates the changelog with a change note for an updated CodeQL CLI bundle.
* Creates a changenote file for an update to the default CodeQL CLI bundle.
*/
import * as fs from "node:fs";
import * as path from "node:path";
import {
parseChangelog,
renderChangelog,
UNRELEASED_PLACEHOLDER,
} from "./changelog";
import { CHANGELOG_FILE, CLI_BUNDLE_RELEASE_URL_PREFIX } from "./config";
import { CHANGENOTES_DIR, CLI_BUNDLE_RELEASE_URL_PREFIX } from "./config";
import { getErrorMessage } from "./util";
export const CLI_VERSION_ENV_VAR = "CLI_VERSION";
@@ -58,42 +54,19 @@ export function getPRNumber(prUrl: string) {
}
/**
* Updates `changelog` by adding `changelogNote` to the first section.
* Returns the contents of the changenote file for an update to the default
* CodeQL CLI bundle.
*
* @param contents The existing changelog contents.
* @param changelogNote The note to add to the first section.
* @param cliVersion The CodeQL CLI version of the new default bundle.
* @param prUrl The URL of the PR that updates the default bundle.
* @throws If the PR number can't be determined from `prUrl`.
*/
export function updateChangelog(contents: string, changelogNote: string) {
// If the "[UNRELEASED]" section starts with "no user facing changes", remove that line.
contents = contents.replace(
`## ${UNRELEASED_PLACEHOLDER}\n\nNo user facing changes.`,
`## ${UNRELEASED_PLACEHOLDER}\n`,
);
export function getChangenote(cliVersion: string, prUrl: string): string {
// The GitHub Release for the new bundle version.
const bundleReleaseUrl = `${CLI_BUNDLE_RELEASE_URL_PREFIX}${cliVersion}`;
const changelog = parseChangelog(contents);
if (changelog.sections.length === 0) {
throw new Error("The changelog contains no existing sections.");
}
// Add the changelog note to the bottom of the first section.
const firstSection = changelog.sections[0];
const lastLine = firstSection.bodyLines.pop();
if (lastLine !== undefined && lastLine.trim() !== "") {
// We expect the last line to be empty. If it isn't for some reason,
// add it back.
firstSection.bodyLines.push(lastLine);
}
firstSection.bodyLines.push(changelogNote);
// If the last line is empty as expected, then add it back in after the new note.
if (lastLine?.trim() === "") {
firstSection.bodyLines.push(lastLine);
}
return renderChangelog(changelog);
const prNumber = getPRNumber(prUrl);
return `- Update default CodeQL bundle version to [${cliVersion}](${bundleReleaseUrl}). [#${prNumber}](${prUrl})\n`;
}
function main() {
@@ -101,22 +74,19 @@ function main() {
const cliVersion = getCLIVersion();
const prUrl = getPRUrl();
// The GitHub Release for the new bundle version.
const bundleReleaseUrl = `${CLI_BUNDLE_RELEASE_URL_PREFIX}${cliVersion}`;
// Get the PR number from the PR URL.
const prNumber = getPRNumber(prUrl);
const changelogNote = `- Update default CodeQL bundle version to [${cliVersion}](${bundleReleaseUrl}). [#${prNumber}](${prUrl})`;
let changelog = fs.readFileSync(CHANGELOG_FILE, "utf-8");
changelog = updateChangelog(changelog, changelogNote);
fs.writeFileSync(CHANGELOG_FILE, changelog);
// Include the CLI version in the file name so that changenotes for
// different bundle updates don't conflict.
const changenotePath = path.join(
CHANGENOTES_DIR,
`update-bundle-${cliVersion}.md`,
);
fs.writeFileSync(changenotePath, getChangenote(cliVersion, prUrl));
return 0;
} catch (err) {
console.error(`Failed to bundle changelog: ${getErrorMessage(err)}`);
console.error(
`Failed to create changenote for bundle update: ${getErrorMessage(err)}`,
);
return -1;
}
}

View File

@@ -3,7 +3,7 @@ description: "Tests using an all-platform CodeQL Bundle"
operatingSystems:
- ubuntu
- os: macos
runner-image: macos-latest-xlarge
runner-image: macos-26-xlarge
- windows
versions:
- nightly-latest

View File

@@ -3,7 +3,7 @@ description: "An end-to-end integration test of a multi-language repository usin
operatingSystems:
- ubuntu
- os: macos
runner-image: macos-latest-xlarge
runner-image: macos-26-xlarge
# Older CodeQL CLI versions only support Swift up to 6.1, which requires Xcode 16. That is
# not available on macOS 26, so run these versions on macOS 15 where we select Xcode 16
# below. See https://github.com/actions/runner-images/issues/14167.
@@ -23,7 +23,7 @@ steps:
# imports `importlib._bootstrap._ERR_MSG`, which those Python versions no longer define.
# See https://github.com/github/codeql-action/pull/3212
if: matrix.version != 'nightly-latest' && matrix.version != 'linked'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13.15"

View File

@@ -3,41 +3,41 @@ description: Validates extraction and analysis using each per-language CodeQL bu
matrix:
include:
- language: actions
os: ubuntu-latest
os: ubuntu-26.04
version: linked
# Actions also needs the JavaScript extractor.
expected-extractors: actions javascript
- language: cpp
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: manual
build-command: gcc -o main main.c
- language: csharp
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: none
- language: go
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: autobuild
- language: java
os: ubuntu-latest
os: ubuntu-26.04
version: linked
build-mode: none
- language: javascript
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: python
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: ruby
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: rust
os: ubuntu-latest
os: ubuntu-26.04
version: linked
- language: swift
os: macos-latest-xlarge
os: macos-26-xlarge
version: linked
build-mode: autobuild
installNode: true

View File

@@ -4,7 +4,7 @@ versions:
- nightly-latest
operatingSystems:
- os: macos
runner-image: macos-latest-xlarge
runner-image: macos-26-xlarge
steps:
- uses: ./../action/init
id: init

View File

@@ -6,7 +6,7 @@ versions:
- nightly-latest
operatingSystems:
- os: macos
runner-image: macos-latest-xlarge
runner-image: macos-26-xlarge
installGo: true
installDotNet: true
env:

View File

@@ -0,0 +1,67 @@
name: "Unsupported macOS"
description: "Tests that unsupported macOS versions are detected and result in appropriate diagnostics."
versions:
- linked
- nightly-latest
installNode: true
operatingSystems:
- os: macos
runner-image: xcode-27
env:
# Allow the failed SARIF file to be generated.
CODEQL_ACTION_SKIP_GENERATE_FAILED_SARIF: false
# But don't actually upload it.
CODEQL_ACTION_SKIP_SARIF_UPLOAD: true
# Mark telemetry for this workflow so it can be treated separately.
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
steps:
- name: Check xcode_select_link
run: |
readlink /private/var/db/xcode_select_link
file -h /private/var/db/xcode_select_link
- uses: ./../action/init
id: init
continue-on-error: true
env:
CODEQL_ACTION_CHECK_UNSUPPORTED_TRACED_ANALYSIS: true
CODEQL_ACTION_ABORT_UNSUPPORTED_TRACED_ANALYSIS: true
with:
languages: swift
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Analyze
# We could run `analyze` here from `./../analyze`, but `getAnalyzeActionName` in `workflow.ts`
# can't cope with that unless we introduce a different testing environment. Since this step
# would just fail on `xcode-27` anyway, we just skip it instead.
if: false
uses: ./analyze
with:
category: "/test-codeql-version:${{ matrix.version }}"
validationJobs:
unsupported-macos-sarif-checks:
checkout: true
installNode: true
steps:
- name: Download workflow artifact
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: test-mode-sarif-*
path: sarif
- name: List artifact contents
run: ls -laR ./sarif
- name: Check diagnostics appear in SARIF
env:
SARIF_PATH: "./sarif/"
DIAGNOSTIC_ID: "codeql-action/unsupported-traced-analysis-macos"
DIAGNOSTIC_NAME: "Traced analysis is not supported on this version of macOS"
EXPECTED_LOCATIONS: "0"
EXPECTED_MESSAGE: |
Traced analysis is not supported on macOS 27 or above.
run: npx tsx ./pr-checks/check-diagnostics.ts

View File

@@ -2,6 +2,11 @@
"private": true,
"description": "Dependencies for codeql-action scripts",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"test": "npx tsx --test",
"checks": "npm run typecheck && npm run test"
},
"dependencies": {
"@actions/core": "^2.0.3",
"@actions/github": "^8.0.1",
@@ -9,7 +14,7 @@
"@octokit/core": "^7.0.8",
"@octokit/plugin-paginate-rest": ">=16.0.0",
"@octokit/plugin-rest-endpoint-methods": "^18.0.0",
"glob": "^13.0.6",
"glob": "^14.0.3",
"lite-matter": "^0.1.2",
"mdast-util-from-markdown": "^2.1.0",
"semver": "^7.8.5",

View File

@@ -56,9 +56,18 @@ jobs:
const result = scanGeneratedWorkflows(workflowDir);
assert.equal(result["actions/checkout"], "v4");
assert.equal(result["actions/setup-node"], "v5");
assert.equal(result["actions/setup-go"], "v6");
assert.deepEqual(
result.actionVersions["actions/checkout"],
new Set(["v4"]),
);
assert.deepEqual(
result.actionVersions["actions/setup-node"],
new Set(["v5"]),
);
assert.deepEqual(
result.actionVersions["actions/setup-go"],
new Set(["v6"]),
);
});
await it("scanning workflows with version comments", () => {
@@ -78,12 +87,18 @@ jobs:
const result = scanGeneratedWorkflows(workflowDir);
assert.equal(result["actions/checkout"], "v4");
assert.equal(
result["ruby/setup-ruby"],
"44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0",
assert.deepEqual(
result.actionVersions["actions/checkout"],
new Set(["v4"]),
);
assert.deepEqual(
result.actionVersions["ruby/setup-ruby"],
new Set(["44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0"]),
);
assert.deepEqual(
result.actionVersions["actions/setup-python"],
new Set(["v6 # Latest Python"]),
);
assert.equal(result["actions/setup-python"], "v6 # Latest Python");
});
await it("ignores local actions", () => {
@@ -103,9 +118,15 @@ jobs:
const result = scanGeneratedWorkflows(workflowDir);
assert.equal(result["actions/checkout"], "v4");
assert.equal("./.github/actions/local-action" in result, false);
assert.equal("./another-local-action" in result, false);
assert.deepEqual(
result.actionVersions["actions/checkout"],
new Set(["v4"]),
);
assert.equal(
"./.github/actions/local-action" in result.actionVersions,
false,
);
assert.equal("./another-local-action" in result.actionVersions, false);
});
});
@@ -128,8 +149,8 @@ const steps = [
fs.writeFileSync(syncTsPath, syncTsContent);
const actionVersions = {
"actions/setup-node": "v5",
"actions/setup-go": "v6",
"actions/setup-node": new Set(["v5"]),
"actions/setup-go": new Set(["v6"]),
};
const result = updateSyncTs(syncTsPath, actionVersions);
@@ -155,7 +176,7 @@ const steps = [
fs.writeFileSync(syncTsPath, syncTsContent);
const actionVersions = {
"actions/setup-node": "v5 # Latest version",
"actions/setup-node": new Set(["v5 # Latest version"]),
};
const result = updateSyncTs(syncTsPath, actionVersions);
@@ -182,7 +203,7 @@ const steps = [
fs.writeFileSync(syncTsPath, syncTsContent);
const actionVersions = {
"actions/setup-node": "v5",
"actions/setup-node": new Set(["v5"]),
};
const result = updateSyncTs(syncTsPath, actionVersions);
@@ -206,7 +227,9 @@ const steps = [
fs.writeFileSync(syncTsPath, syncTsContent);
const actionVersions = {
"actions/setup-node": "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0",
"actions/setup-node": new Set([
"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0",
]),
};
const result = updateSyncTs(syncTsPath, actionVersions);
@@ -244,8 +267,9 @@ steps:
"actions/checkout": "v4",
"actions/setup-node": "v5 # Latest",
};
const byWorkflow = { ["test.yml"]: actionVersions };
const result = updateTemplateFiles(checksDir, actionVersions);
const result = updateTemplateFiles(checksDir, byWorkflow);
assert.equal(result.length, 1);
assert.ok(result.includes(templatePath));
@@ -269,8 +293,9 @@ steps:
const actionVersions = {
"ruby/setup-ruby": "55511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0",
};
const byWorkflow = { ["test.yml"]: actionVersions };
const result = updateTemplateFiles(checksDir, actionVersions);
const result = updateTemplateFiles(checksDir, byWorkflow);
assert.equal(result.length, 1);
const updatedContent = fs.readFileSync(templatePath, "utf8");

View File

@@ -27,16 +27,39 @@ const CHECKS_DIR = path.join(PR_CHECKS_DIR, "checks");
const WORKFLOW_DIR = path.join(REPO_ROOT, ".github", "workflows");
const SYNC_TS_PATH = path.join(PR_CHECKS_DIR, "sync.ts");
/** Type alias for action names. */
type ActionName = string;
/** Type alias for action versions. May include a comment. */
type ActionVersion = string;
/** Mappings of {@link ActionName}s to {@link ActionVersion}s. */
type ActionVersions = Record<ActionName, ActionVersion>;
/** Mappings of workflow names to {@link ActionVersions}. */
type ActionVersionsByWorkflow = Record<string, ActionVersions>;
/** The result of {@link scanGeneratedWorkflows}. */
type ScanWorkflowResult = {
/** A mapping of {@link ActionName}s to all encountered {@link ActionVersion}s. */
actionVersions: Record<ActionName, Set<ActionVersion>>;
/** A mapping of workflow names to {@link ActionVersions}. */
actionVersionsByWorkflow: ActionVersionsByWorkflow;
};
/**
* Scan generated workflow files to extract the latest action versions.
*
* @param workflowDir - Path to .github/workflows directory
* @returns Map from action names to their latest versions (including comments)
*
* @returns A {@link ScanWorkflowResult} object containing information about the extracted action versions.
*/
export function scanGeneratedWorkflows(
workflowDir: string,
): Record<string, string> {
const actionVersions: Record<string, string> = {};
): ScanWorkflowResult {
const actionVersionsByWorkflow: ActionVersionsByWorkflow = {};
const actionVersions: Record<ActionName, Set<ActionVersion>> = {};
const generatedFiles = fs
.readdirSync(workflowDir)
@@ -46,6 +69,10 @@ export function scanGeneratedWorkflows(
for (const filePath of generatedFiles) {
const content = fs.readFileSync(filePath, "utf8");
// Get the basename of the workflow and drop the leading `__` from it.
const workflowName = path.basename(filePath).slice(2);
actionVersionsByWorkflow[workflowName] = {};
// Find all action uses in the file, including potential comments
// This pattern captures: action_name@version_with_possible_comment
const pattern = /uses:\s+([^/\s]+\/[^@\s]+)@([^@\n]+)/g;
@@ -57,13 +84,26 @@ export function scanGeneratedWorkflows(
// Only track non-local actions (those with / but not starting with ./)
if (!actionName.startsWith("./")) {
// Assume that version numbers are consistent (this should be the case on a Dependabot update PR)
actionVersions[actionName] = versionWithComment;
// Record the version of the action for this workflow.
actionVersionsByWorkflow[workflowName][actionName] = versionWithComment;
// Record this version for the action so that we can write it to `sync.ts` if needed.
// Usually we'd expect there to be exactly one version per action across all workflows,
// but sometimes these can go out-of-sync if e.g. a workflow is added in a branch and a
// Dependabot PR is merged in the meantime that changes the version of an action that is
// used in the new workflow. Different versions of the same action across different
// workflows is not fundamentally a problem, but we may need to pick one for `sync.ts`
// so we warn there if we have multiple versions of an action.
if (actionVersions[actionName] === undefined) {
actionVersions[actionName] = new Set([versionWithComment]);
} else if (!actionVersions[actionName].has(versionWithComment)) {
actionVersions[actionName].add(versionWithComment);
}
}
}
}
return actionVersions;
return { actionVersions, actionVersionsByWorkflow };
}
/**
@@ -79,7 +119,7 @@ export function scanGeneratedWorkflows(
*/
export function updateSyncTs(
syncTsPath: string,
actionVersions: Record<string, string>,
actionVersions: Record<ActionName, Set<ActionVersion>>,
): boolean {
if (!fs.existsSync(syncTsPath)) {
throw new Error(`Could not find ${syncTsPath}`);
@@ -89,9 +129,18 @@ export function updateSyncTs(
const originalContent = content;
// Update hardcoded action versions
for (const [actionName, versionWithComment] of Object.entries(
for (const [actionName, versionsWithComments] of Object.entries(
actionVersions,
)) {
// We usually expect `versionsWithComments` to contain one version. If there are multiple,
// we arbitrarily pick one and warn about it.
const versionsWithCommentsArray = Array.from(versionsWithComments);
const versionWithComment = versionsWithCommentsArray[0];
if (versionsWithComments.size > 1) {
console.warn(
`Inconsistent versions for ${actionName}. Arbitrarily picking '${versionWithComment}'. All found: ${versionsWithCommentsArray.join(", ")}`,
);
}
// Split the scanned value into the ref (e.g. a commit SHA) and the optional
// trailing version comment (e.g. `v6.0.3`).
const ref = versionWithComment.includes("#")
@@ -138,12 +187,12 @@ export function updateSyncTs(
* Update action versions in template files in pr-checks/checks/
*
* @param checksDir - Path to pr-checks/checks directory
* @param actionVersions - Map of action names to versions (may include comments)
* @param actionVersionsByWorkflow - Map of workflows to maps of action names to versions (may include comments)
* @returns List of files that were modified
*/
export function updateTemplateFiles(
checksDir: string,
actionVersions: Record<string, string>,
actionVersionsByWorkflow: ActionVersionsByWorkflow,
): string[] {
const modifiedFiles: string[] = [];
@@ -156,6 +205,16 @@ export function updateTemplateFiles(
let content = fs.readFileSync(filePath, "utf8");
const originalContent = content;
const workflowName = path.basename(filePath);
const actionVersions = actionVersionsByWorkflow[workflowName];
if (actionVersions === undefined) {
console.info(
`Found no action versions for workflow template '${filePath}'.`,
);
continue;
}
// Update action versions
for (const [actionName, versionWithComment] of Object.entries(
actionVersions,
@@ -191,12 +250,15 @@ function main(): number {
const verbose = values.verbose ?? false;
console.info("Scanning generated workflows for latest action versions...");
const actionVersions = scanGeneratedWorkflows(WORKFLOW_DIR);
const { actionVersions, actionVersionsByWorkflow } =
scanGeneratedWorkflows(WORKFLOW_DIR);
if (verbose) {
console.info("Found action versions:");
for (const [action, version] of Object.entries(actionVersions)) {
console.info(` ${action}@${version}`);
for (const [action, versions] of Object.entries(actionVersions)) {
for (const version of versions) {
console.info(` ${action}@${version}`);
}
}
}
@@ -215,7 +277,10 @@ function main(): number {
}
// Update template files
const templateModified = updateTemplateFiles(CHECKS_DIR, actionVersions);
const templateModified = updateTemplateFiles(
CHECKS_DIR,
actionVersionsByWorkflow,
);
modifiedFiles.push(...templateModified);
if (modifiedFiles.length > 0) {

View File

@@ -43,6 +43,13 @@ type WorkflowInputs = Partial<Record<KnownInputName, WorkflowInput>>;
/** An operating system identifier. */
type OperatingSystemIdentifier = "ubuntu" | "macos" | "windows";
/** Mapping from {@link OperatingSystemIdentifier} to default runner image labels. */
const DEFAULT_RUNNER_IMAGES: Record<OperatingSystemIdentifier, string> = {
ubuntu: "ubuntu-26.04",
macos: "macos-26",
windows: "windows-2025",
};
/**
* Represents an operating system matrix entry for a generated PR check workflow.
*
@@ -296,8 +303,8 @@ const languageSetups: LanguageSetups = {
name: "Install Python",
uses: pinnedUses(
"actions/setup-python",
"5fda3b95a4ea91299a34e894583c3862153e4b97",
"v7.0.0",
"6d4fd22b20465ccc0f7354476588e8df7c9ca0e0",
"v7.1.0",
),
with: {
"python-version": `\${{ inputs.python-version || '${defaultLanguageVersions.python}' }}`,
@@ -414,12 +421,6 @@ function generateJobMatrix(
);
}
const defaultRunnerImages = [
"ubuntu-latest",
"macos-latest",
"windows-latest",
];
for (const operatingSystemConfig of operatingSystems) {
const operatingSystem =
typeof operatingSystemConfig === "string"
@@ -449,7 +450,7 @@ function generateJobMatrix(
const runnerImagesForOs =
typeof operatingSystemConfig === "string" ||
operatingSystemConfig["runner-image"] === undefined
? defaultRunnerImages.filter((image) =>
? Object.values(DEFAULT_RUNNER_IMAGES).filter((image) =>
image.startsWith(operatingSystem),
)
: [operatingSystemConfig["runner-image"]];
@@ -462,7 +463,7 @@ function generateJobMatrix(
// is removed from `defaultTestVersions`.
const requiresOlderRunnerImage: DefaultTestVersion = "stable-v2.20.7";
if (
runnerImage === "ubuntu-latest" &&
runnerImage === DEFAULT_RUNNER_IMAGES["ubuntu"] &&
version === requiresOlderRunnerImage
) {
matrix.push({ os: "ubuntu-24.04", version });
@@ -666,16 +667,18 @@ function generateValidationJob(
// Add the generated steps in front of the ones from the specification.
specSteps.items.unshift(...checkoutStep, ...steps);
const baseCondition = "github.triggering_actor != 'dependabot[bot]'";
const validationJob: Record<string, any> = {
name: jobSpecification.name,
if: "github.triggering_actor != 'dependabot[bot]'",
if: baseCondition,
needs: [checkName],
permissions: {
contents: "read",
"security-events": "read",
},
"timeout-minutes": 5,
"runs-on": "ubuntu-latest",
"runs-on": DEFAULT_RUNNER_IMAGES["ubuntu"],
steps: specSteps,
};

View File

@@ -9,5 +9,12 @@
"noEmit": true
},
"include": ["./**/*.ts", "../src/**/*.ts"],
"exclude": ["node_modules"]
"exclude": [
"node_modules",
"../src/testdata/**",
"../src/**/*.test.ts",
"../src/testing-utils.ts",
"../src/json/testing-util.ts",
"../src/feature-flags/testing-util.ts"
]
}

View File

@@ -1,3 +1,5 @@
import * as os from "os";
import * as core from "@actions/core";
import { ActionsEnv, getActionsEnv } from "./actions-util";
@@ -13,6 +15,8 @@ import {
} from "./status-report";
import { getEnv, getErrorMessage, wrapError } from "./util";
export type { Logger } from "./logging";
/** Base state that is available to an Action on startup. */
export interface BaseState {
/** The name of the Action. */
@@ -23,6 +27,8 @@ export interface BaseState {
platform: NodeJS.Platform;
/** The architecture of the host. */
arch: NodeJS.Architecture;
/** The version of the operating system. */
osRelease: string;
}
/** Describes different state features that an Action may have. */
@@ -173,6 +179,7 @@ export async function runInActions(action: Action) {
startedAt,
platform: process.platform,
arch: process.arch,
osRelease: os.release(),
logger,
env,
actions: actionsEnv,

View File

@@ -11,8 +11,8 @@ import {
} from "./actions-util";
import { computeAutomationID } from "./api-client";
import { EnvVar } from "./environment";
import { RecordingLogger, setupTests } from "./testing-utils";
import { initializeEnvironment, withTmpDir } from "./util";
import { getTestEnv, RecordingLogger, setupTests } from "./testing-utils";
import { withTmpDir } from "./util";
setupTests(test);
@@ -227,8 +227,9 @@ test.serial(
);
test.serial("initializeEnvironment", (t) => {
initializeEnvironment("1.2.3");
t.deepEqual(process.env[EnvVar.VERSION], "1.2.3");
const env = getTestEnv();
env.initialise("1.2.3");
t.deepEqual(env.getOptional(EnvVar.VERSION), "1.2.3");
});
test.serial("fixCodeQualityCategory", (t) => {

View File

@@ -364,7 +364,7 @@ const MAX_STDERR_BUFFER_SIZE = 20000;
* @throws A {@link CommandInvocationError} if the tool exits with a non-zero status code.
*/
export async function runTool(
env: Env,
env: ReadOnlyEnv,
cmd: string,
args: string[] = [],
opts: { stdin?: string; noStreamStdout?: boolean } = {},

View File

@@ -233,7 +233,7 @@ async function run(action: ActionState<["Base", "Logger", "Env", "Actions"]>) {
let databaseUploadResults: DatabaseUploadResult[] = [];
try {
util.initializeEnvironment(actionsUtil.getActionVersion());
action.env.initialise(actionsUtil.getActionVersion());
// Make inputs accessible in the `post` step, details at
// https://github.com/github/codeql-action/issues/2553

View File

@@ -7,7 +7,7 @@ import { ProxyAgent } from "undici";
import * as actionsUtil from "./actions-util";
import * as api from "./api-client";
import { DO_NOT_RETRY_STATUSES } from "./api-client";
import { ActionsEnvVars, RegistryProxyVars } from "./environment";
import { ActionsEnvVars, RegistryProxyVars, getEnv } from "./environment";
import { GITHUB_DOTCOM_API_URL, GITHUB_DOTCOM_URL } from "./github";
import {
callee,
@@ -21,7 +21,7 @@ import * as util from "./util";
setupTests(test);
test.beforeEach(() => {
util.initializeEnvironment(actionsUtil.getActionVersion());
getEnv().initialise(actionsUtil.getActionVersion());
});
test.serial("getApiClient", async (t) => {

View File

@@ -10,7 +10,7 @@ import { getGitHubVersion } from "./api-client";
import { determineAutobuildLanguages, runAutobuild } from "./autobuild";
import { getCodeQL } from "./codeql";
import { Config, getConfig } from "./config-utils";
import { EnvVar } from "./environment";
import { EnvVar, type Env } from "./environment";
import { Language } from "./languages";
import { Logger } from "./logging";
import {
@@ -26,7 +26,6 @@ import {
checkDiskUsage,
checkGitHubVersionInRange,
ConfigurationError,
initializeEnvironment,
wrapError,
} from "./util";
@@ -38,6 +37,7 @@ interface AutobuildStatusReport extends StatusReportBase {
}
async function sendCompletedStatusReport(
env: Env,
config: Config | undefined,
logger: Logger,
startedAt: Date,
@@ -45,7 +45,7 @@ async function sendCompletedStatusReport(
failingLanguage?: string,
cause?: Error,
) {
initializeEnvironment(getActionVersion());
env.initialise(getActionVersion());
const status = getActionsStatus(cause, failingLanguage);
const statusReportBase = await createStatusReportBase(
@@ -129,6 +129,7 @@ async function run({
`We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error.message}`,
);
await sendCompletedStatusReport(
env,
config,
logger,
startedAt,
@@ -141,7 +142,13 @@ async function run({
env.export(EnvVar.AUTOBUILD_DID_COMPLETE_SUCCESSFULLY, "true");
await sendCompletedStatusReport(config, logger, startedAt, languages ?? []);
await sendCompletedStatusReport(
env,
config,
logger,
startedAt,
languages ?? [],
);
}
/** Defines the `autobuild` Action. */

View File

@@ -21,6 +21,7 @@ import {
import type { Config } from "./config-utils";
import * as defaults from "./defaults.json";
import { DocUrl } from "./doc-url";
import { getEnv } from "./environment";
import { BuiltInLanguage } from "./languages";
import { ToolsSource } from "./setup-codeql";
import {
@@ -38,14 +39,13 @@ import {
} from "./testing-utils";
import { ToolsDownloadStatusReport } from "./tools-download";
import * as util from "./util";
import { initializeEnvironment } from "./util";
setupTests(test);
let stubConfig: Config;
test.beforeEach(() => {
initializeEnvironment("1.2.3");
getEnv().initialise("1.2.3");
stubConfig = createTestConfig({
languages: [BuiltInLanguage.cpp],

View File

@@ -4,6 +4,7 @@ import * as path from "path";
import * as core from "@actions/core";
import * as toolrunner from "@actions/exec/lib/toolrunner";
import * as yaml from "js-yaml";
import * as semver from "semver";
import {
CommandInvocationError,
@@ -19,6 +20,7 @@ import type { ActionConfig } from "./config/action-config";
import { appendExtraQueryExclusions, type Config } from "./config-utils";
import { DocUrl } from "./doc-url";
import { EnvVar, getEnv, Env, ReadOnlyEnv } from "./environment";
import { getErrorMessage, isDiskConfigurationError } from "./errors";
import {
CodeQLDefaultVersionInfo,
Feature,
@@ -34,7 +36,9 @@ import { ToolsDownloadStatusReport } from "./tools-download";
import { ToolsFeature, isSupportedToolsFeature } from "./tools-features";
import { shouldEnableIndirectTracing } from "./tracer-config";
import * as util from "./util";
import { BuildMode, CleanupLevel, getErrorMessage } from "./util";
import { BuildMode, CleanupLevel } from "./util";
export { isDiskConfigurationError } from "./errors";
type Options = Array<string | number | boolean>;
@@ -70,6 +74,11 @@ export interface CodeQL {
* Get a string containing the semver version of the CodeQL executable.
*/
getVersion(): Promise<VersionInfo>;
/**
* Determines whether the CLI installation represented by this {@link CodeQL} instance
* has at least the {@link requiredVersion}.
*/
isVersionAtLeast(requiredVersion: string): Promise<boolean>;
/**
* Print version information about CodeQL.
*/
@@ -275,26 +284,6 @@ const GHES_MOST_RECENT_DEPRECATION_DATE = "2026-10-16";
/** The CLI verbosity level to use for extraction in debug mode. */
const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
/**
* Decides whether `e` is a disk-related error outside of our control
* that should be classified as a `ConfigurationError`.
*
* @param e The error to check.
* @returns True if the error should be treated as a `ConfigurationError` or false if not.
*/
export function isDiskConfigurationError(e: unknown): boolean {
if (!(e instanceof Error)) {
return false;
}
return (
// out of disk space
e.message.includes("ENOSPC") ||
// access denied
e.message.includes("EACCES")
);
}
/**
* Set up CodeQL CLI access.
*
@@ -403,9 +392,9 @@ export function setCodeQL(codeql: Partial<CodeQL>): void {
cachedCodeQL = createStubCodeQL(codeql);
}
function resolveFunction<T>(
function resolveFunction<K extends keyof CodeQL, T extends CodeQL[K]>(
partialCodeql: Partial<CodeQL>,
methodName: string,
methodName: K,
defaultImplementation?: T,
): T {
if (typeof partialCodeql[methodName] !== "function") {
@@ -415,7 +404,7 @@ function resolveFunction<T>(
const dummyMethod = () => {
throw new Error(`CodeQL ${methodName} method not correctly defined`);
};
return dummyMethod as T;
return dummyMethod as unknown as T;
}
return partialCodeql[methodName] as T;
}
@@ -432,6 +421,19 @@ export function createStubCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
getVersion: resolveFunction(partialCodeql, "getVersion", async () => ({
version: "1.0.0",
})),
isVersionAtLeast: resolveFunction(
partialCodeql,
"isVersionAtLeast",
async (requiredVersion) => {
return (
!!partialCodeql.getVersion &&
semver.gte(
(await partialCodeql.getVersion()).version,
requiredVersion,
)
);
},
),
printVersion: resolveFunction(partialCodeql, "printVersion"),
supportsFeature: resolveFunction(
partialCodeql,
@@ -525,6 +527,9 @@ export async function getCodeQLForCmd(
}
return result;
},
async isVersionAtLeast(requiredVersion: string) {
return semver.gte((await this.getVersion()).version, requiredVersion);
},
async printVersion() {
// Reuse the cached version information rather than invoking the CLI again.
core.info(JSON.stringify(await this.getVersion(), null, 2));
@@ -1062,7 +1067,7 @@ export async function getCodeQLForCmd(
// CodeQL object is created.
if (
checkVersion &&
!(await util.codeQlVersionAtLeast(codeql, CODEQL_MINIMUM_VERSION))
!(await codeql.isVersionAtLeast(CODEQL_MINIMUM_VERSION))
) {
throw new util.ConfigurationError(
`Expected a CodeQL CLI with version at least ${CODEQL_MINIMUM_VERSION} but got version ${
@@ -1072,7 +1077,7 @@ export async function getCodeQLForCmd(
} else if (
checkVersion &&
env.getOptional(EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING) !== "true" &&
!(await util.codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION))
!(await codeql.isVersionAtLeast(CODEQL_NEXT_MINIMUM_VERSION))
) {
const result = await codeql.getVersion();
core.warning(
@@ -1166,7 +1171,7 @@ export function getExtraOptions(
}
async function runCli(
env: Env,
env: ReadOnlyEnv,
cmd: string,
args: string[] = [],
opts: { stdin?: string; noStreamStdout?: boolean } = {},
@@ -1193,7 +1198,7 @@ async function runCli(
* @returns The parsed JSON output from the command.
*/
async function runCliJson<T>(
env: Env,
env: ReadOnlyEnv,
cmd: string,
args: string[] = [],
opts: { stdin?: string; noStreamStdout?: boolean } = {},

View File

@@ -82,7 +82,6 @@ import {
GitHubVersion,
ConfigurationError,
BuildMode,
codeQlVersionAtLeast,
cloneObject,
isDefined,
checkDiskUsage,
@@ -654,10 +653,7 @@ async function runnerHasSufficientMemory(
logger: Logger,
): Promise<boolean> {
if (
await codeQlVersionAtLeast(
codeql,
CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE,
)
await codeql.isVersionAtLeast(CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE)
) {
logger.debug(
`Skipping memory check for overlay analysis because CodeQL version is at least ${CODEQL_VERSION_REDUCED_OVERLAY_MEMORY_USAGE}.`,
@@ -901,7 +897,7 @@ async function validateOverlayDatabaseMode(
);
return new Failure(OverlayDisabledReason.IncompatibleBuildMode);
}
if (!(await codeQlVersionAtLeast(codeql, CODEQL_OVERLAY_MINIMUM_VERSION))) {
if (!(await codeql.isVersionAtLeast(CODEQL_OVERLAY_MINIMUM_VERSION))) {
logger.warning(
`Cannot build an ${overlayDatabaseMode} database because ` +
`the CodeQL CLI is older than ${CODEQL_OVERLAY_MINIMUM_VERSION}. ` +

View File

@@ -15,6 +15,7 @@ import {
cleanupAndUploadDatabases,
uploadBundledDatabase,
} from "./database-upload";
import { getEnv } from "./environment";
import { Feature } from "./feature-flags";
import * as gitUtils from "./git-utils";
import { BuiltInLanguage } from "./languages";
@@ -31,18 +32,12 @@ import {
setupActionsVars,
setupTests,
} from "./testing-utils";
import {
CleanupLevel,
GitHubVariant,
HTTPError,
initializeEnvironment,
withTmpDir,
} from "./util";
import { CleanupLevel, GitHubVariant, HTTPError, withTmpDir } from "./util";
setupTests(test);
test.beforeEach(() => {
initializeEnvironment("1.2.3");
getEnv().initialise("1.2.3");
});
const testRepoName: RepositoryNwo = { owner: "github", repo: "example" };

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.27.3",
"cliVersion": "2.27.3",
"priorBundleVersion": "codeql-bundle-v2.27.2",
"priorCliVersion": "2.27.2"
"bundleVersion": "codeql-bundle-v2.27.4",
"cliVersion": "2.27.4",
"priorBundleVersion": "codeql-bundle-v2.27.3",
"priorCliVersion": "2.27.3"
}

Some files were not shown because too many files have changed in this diff Show More