Skip to content

Commit 9eeb533

Browse files
authored
Merge pull request #5 from beer-sakthai/claude/branch-commit-merge-main-n5m9pm
Sync main with upstream github/codeql-action
2 parents f19a847 + f0064b2 commit 9eeb533

49 files changed

Lines changed: 3248 additions & 691 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/copilot-instructions.md‎

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
# CodeQL Action - Copilot Instructions
22

3+
The CodeQL Action is used in GitHub Actions workflows to run CodeQL scans using the CodeQL CLI.
4+
5+
## Overview
6+
7+
- The repository contains two TypeScript projects.
8+
- The main TypeScript codebase is in the `src` directory, with accompanying unit tests in `.test.ts` files in the same directory.
9+
- The main codebase is compiled to bundled JavaScript code, which is also contained in the repository in the `lib` directory.
10+
- A secondary TypeScript codebase with scripts that are only used for development purposes or by CI is in the `pr-checks` directory. This codebase is not compiled to bundled JavaScript. It is executed directly with `tsx`, which handles compilation internally.
11+
12+
## Review instructions
13+
14+
- When wording review comments, be helpful and friendly. Assume that the PR author has written the code with the best of intentions. Word your comments constructively as suggestions for improvements. Do not word suggestions as commands.
15+
- If you want to comment on a change that you believe will fail a CI check, do not present the CI failure you expect as a fact. Instead, write that you think a change "may" lead to a failure in CI. Suggest that, if such a failure manifests, the changes you are commenting on may be the place responsible for the failure and are worth looking at.
16+
- If a suggestion you make is suitable for a follow-up, such as a refactoring that doesn't change the behaviour or fixing a typo in a comment, mention that it can be addressed in a later PR rather than blocking this one.
17+
- If a change is a net improvement, for example because it improves on an existing limitation of existing code, do not complain about pre-existing problems that remain. You may comment on them, but you should make it clear that the thing you are commenting on is not new by writing e.g. "Not new in this PR, but [..]" followed by your description of the issue and a suggestion that it could be improved at the same time with e.g. "Consider whether this is worth addressing as part of this PR as well."
18+
319
## Generated code
420

5-
The CodeQL Action is written in TypeScript and compiled to JavaScript. Both the TypeScript sources and the **generated** JavaScript code are contained in this repository. The TypeScript sources are contained in the `src` directory and the JavaScript code is contained in the `lib` directory. A GitHub Actions workflow checks that the JavaScript code in `lib` is up-to-date. Therefore, you should not review any changes to the contents of the `lib` folder and it is expected that the JavaScript code in `lib` closely mirrors the TypeScript code it is generated from.
21+
The main codebase of the CodeQL Action is written in TypeScript and compiled to JavaScript. Both the TypeScript sources and the **generated** JavaScript code are contained in this repository. The TypeScript sources are contained in the `src` directory and the JavaScript code is contained in the `lib` directory. A GitHub Actions workflow checks that the JavaScript code in `lib` is up-to-date. Therefore, you should not review any changes to the contents of the `lib` folder and it is expected that the JavaScript code in `lib` closely mirrors the TypeScript code it is generated from. The secondary TypeScript codebase has sources in the `pr-checks` directory, which are executed directly with `tsx` and not compiled to JavaScript in the `lib` folder.
622

723
GitHub Actions workflows in the `.github/workflows` directory whose filenames start with two underscores (e.g. `__all-platform-bundle.yml`) are automatically generated using the `pr-checks/sync.sh` script from template files in the `pr-checks/checks` directory. Therefore, you do not need to review files in the `.github/workflows` directory that start with two underscores. However, you should review changes to the `pr-checks` directory as well as workflows in the `.github/workflows` directory that do not start with underscores.
824

925
## Release process
1026

27+
Changes that are merged to the `main` branch are not used in production straight away. Instead, changes from `main` must first be released using the release process, which has to be manually triggered by a staff member. Therefore, it is possible for further changes to be made to the code after some changes have been merged to `main` but before they are released. Once the release process automation is started, a series of PRs are automatically generated:
28+
1129
- A release-PR is a PR which matches all of the following patterns:
30+
1231
- PR title starts with the exact prefix: `Merge main into releases/v`
1332
- Equivalent regex: `^Merge main into releases\/v`
1433
- AND head (source) branch matches the update-branch pattern:
@@ -17,5 +36,5 @@ GitHub Actions workflows in the `.github/workflows` directory whose filenames st
1736
- Regex: `^releases\/v` (e.g. `releases/v3`)
1837

1938
- Consider all files in release-PRs to have already been reviewed and do not review them, except for the following two files:
20-
- `CHANGELOG.md`
21-
- `package.json`
39+
- `CHANGELOG.md`
40+
- `package.json`

‎.github/workflows/__bundle-toolcache.yml‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/__per-language-bundle-validation.yml‎

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/workflows/codescanning-config-cli.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ jobs:
7575
uses: ./../action/.github/actions/check-codescanning-config
7676
with:
7777
expected-config-file-contents: "{}"
78-
languages: javascript
78+
# Request multiple languages so later checks can reuse the combined bundle.
79+
languages: javascript,python
7980
tools: ${{ steps.prepare-test.outputs.tools-url }}
8081

8182
- name: Packs from input

‎.github/workflows/pr-checks.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ jobs:
114114
working-directory: pr-checks
115115
run: npx tsx --test
116116

117+
- name: Run `pr-checks/changenotes.mts` to ensure that all unreleased change notes are valid
118+
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
119+
run: npx tsx pr-checks/changenotes.mts validate
120+
117121
- name: Verify all Actions use the same Node version
118122
id: head-version
119123
run: |

‎CHANGELOG.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
44

55
## [UNRELEASED]
66

7-
No user facing changes.
7+
- Update default CodeQL bundle version to [2.27.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.1). [#4160](https://github.com/github/codeql-action/pull/4160)
8+
9+
## 4.38.1 - 18 Sept 2026
10+
11+
- The CodeQL Action now has experimental support for CodeQL releases for which per-language bundles are available. Per-language bundles support analysis for a single language and are therefore smaller than the combined bundles that allow analysis for all supported languages. As a result, per-language bundles take up less space on disk and are faster to download. We expect to roll this change out to everyone in the coming weeks. [#4146](https://github.com/github/codeql-action/pull/4146)
812

913
## 4.38.0 - 09 Sept 2026
1014

‎eslint.config.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export default [
158158
},
159159
},
160160
{
161-
files: ["**/*.ts", "**/*.js"],
161+
files: ["**/*.ts", "**/*.js", "**/*.mts"],
162162

163163
rules: {
164164
"@typescript-eslint/no-explicit-any": "off",

‎lib/defaults.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"bundleVersion": "codeql-bundle-v2.27.0",
3-
"cliVersion": "2.27.0",
4-
"priorBundleVersion": "codeql-bundle-v2.26.4",
5-
"priorCliVersion": "2.26.4"
2+
"bundleVersion": "codeql-bundle-v2.27.1",
3+
"cliVersion": "2.27.1",
4+
"priorBundleVersion": "codeql-bundle-v2.27.0",
5+
"priorCliVersion": "2.27.0"
66
}

0 commit comments

Comments
 (0)