Skip to content

Commit 05e8f28

Browse files
committed
Merge branch 'main' into henrymercer/require-codeql-2.19.4
2 parents 9c3aedb + b71f5ae commit 05e8f28

80 files changed

Lines changed: 77335 additions & 1091653 deletions

File tree

Some content is hidden

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

.github/update-release-branch.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@
1616
"""
1717

1818
# NB: This exact commit message is used to find commits for reverting during backports.
19-
# Changing it requires a transition period where both old and new versions are supported.
19+
# Changing it requires a transition period where both old and new versions are supported.
2020
BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v'
2121

2222
# Name of the remote
2323
ORIGIN = 'origin'
2424

25+
# Environment variables to check for a GitHub API token.
26+
TOKEN_ENVIRONMENT_VARIABLES = ('GH_TOKEN', 'GITHUB_TOKEN')
27+
28+
# Gets a GitHub API token from one of the supported environment variables.
29+
def get_github_token():
30+
for variable_name in TOKEN_ENVIRONMENT_VARIABLES:
31+
token = os.environ.get(variable_name, '').strip()
32+
if token:
33+
return token
34+
raise Exception('Missing GitHub token. Set GITHUB_TOKEN or GH_TOKEN.')
35+
2536
# Runs git with the given args and returns the stdout.
2637
# Raises an error if git does not exit successfully (unless passed
2738
# allow_non_zero_exit_code=True).
@@ -270,12 +281,6 @@ def update_changelog(version):
270281
def main():
271282
parser = argparse.ArgumentParser('update-release-branch.py')
272283

273-
parser.add_argument(
274-
'--github-token',
275-
type=str,
276-
required=True,
277-
help='GitHub token, typically from GitHub Actions.'
278-
)
279284
parser.add_argument(
280285
'--repository-nwo',
281286
type=str,
@@ -313,7 +318,7 @@ def main():
313318
target_branch = args.target_branch
314319
is_primary_release = args.is_primary_release
315320

316-
repo = Github(args.github_token).get_repo(args.repository_nwo)
321+
repo = Github(get_github_token()).get_repo(args.repository_nwo)
317322

318323
# the target branch will be of the form releases/vN, where N is the major version number
319324
target_branch_major_version = target_branch.strip('releases/v')

.github/workflows/__multi-language-autodetect.yml

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

.github/workflows/__swift-autobuild.yml

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

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
fail-fast: false
7979
matrix:
80-
os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14,macos-15]
80+
os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14-xlarge,macos-15-xlarge]
8181
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
8282
runs-on: ${{ matrix.os }}
8383

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

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ env:
66
# Diff informed queries add an additional query filter which is not yet
77
# taken into account by these tests.
88
CODEQL_ACTION_DIFF_INFORMED_QUERIES: false
9-
# Specify overlay enablement manually to ensure stability around the exclude-from-incremental
10-
# query filter. Here we only enable for the default code scanning suite.
11-
CODEQL_ACTION_OVERLAY_ANALYSIS: true
12-
CODEQL_ACTION_OVERLAY_ANALYSIS_JAVASCRIPT: false
13-
CODEQL_ACTION_OVERLAY_ANALYSIS_CODE_SCANNING_JAVASCRIPT: true
14-
CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK: false
15-
CODEQL_ACTION_OVERLAY_ANALYSIS_SKIP_RESOURCE_CHECKS: true
169

1710
on:
1811
push:
@@ -79,33 +72,13 @@ jobs:
7972
with:
8073
version: ${{ matrix.version }}
8174

82-
# On PRs, overlay analysis may change the config that is passed to the CLI.
83-
# Therefore, we have two variants of the following test, one for PRs and one for other events.
84-
- name: Empty file (non-PR)
85-
if: github.event_name != 'pull_request'
75+
- name: Empty file
8676
uses: ./../action/.github/actions/check-codescanning-config
8777
with:
8878
expected-config-file-contents: "{}"
8979
languages: javascript
9080
tools: ${{ steps.prepare-test.outputs.tools-url }}
9181

92-
- name: Empty file (PR)
93-
if: github.event_name == 'pull_request'
94-
uses: ./../action/.github/actions/check-codescanning-config
95-
with:
96-
expected-config-file-contents: |
97-
{
98-
"query-filters": [
99-
{
100-
"exclude": {
101-
"tags": "exclude-from-incremental"
102-
}
103-
}
104-
]
105-
}
106-
languages: javascript
107-
tools: ${{ steps.prepare-test.outputs.tools-url }}
108-
10982
- name: Packs from input
11083
if: success() || failure()
11184
uses: ./../action/.github/actions/check-codescanning-config

.github/workflows/post-release-mergeback.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
echo "::endgroup::"
132132
133133
- name: Generate token
134-
uses: actions/create-github-app-token@v3.1.1
134+
uses: actions/create-github-app-token@v3.2.0
135135
id: app-token
136136
with:
137137
app-id: ${{ vars.AUTOMATION_APP_ID }}

.github/workflows/rollback-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
137137
- name: Generate token
138138
if: github.event_name == 'workflow_dispatch'
139-
uses: actions/create-github-app-token@v3.1.1
139+
uses: actions/create-github-app-token@v3.2.0
140140
id: app-token
141141
with:
142142
app-id: ${{ vars.AUTOMATION_APP_ID }}

.github/workflows/update-release-branch.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ jobs:
6464
6565
- name: Update current release branch
6666
if: github.event_name == 'workflow_dispatch'
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6769
run: |
6870
echo SOURCE_BRANCH=${REF_NAME}
6971
echo TARGET_BRANCH=releases/${MAJOR_VERSION}
7072
python .github/update-release-branch.py \
71-
--github-token ${{ secrets.GITHUB_TOKEN }} \
7273
--repository-nwo ${{ github.repository }} \
7374
--source-branch '${{ env.REF_NAME }}' \
7475
--target-branch 'releases/${{ env.MAJOR_VERSION }}' \
@@ -93,7 +94,7 @@ jobs:
9394
pull-requests: write # needed to create pull request
9495
steps:
9596
- name: Generate token
96-
uses: actions/create-github-app-token@v3.1.1
97+
uses: actions/create-github-app-token@v3.2.0
9798
id: app-token
9899
with:
99100
app-id: ${{ vars.AUTOMATION_APP_ID }}
@@ -107,11 +108,12 @@ jobs:
107108
- uses: ./.github/actions/release-initialise
108109

109110
- name: Update older release branch
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110113
run: |
111114
echo SOURCE_BRANCH=${SOURCE_BRANCH}
112115
echo TARGET_BRANCH=${TARGET_BRANCH}
113116
python .github/update-release-branch.py \
114-
--github-token ${{ secrets.GITHUB_TOKEN }} \
115117
--repository-nwo ${{ github.repository }} \
116118
--source-branch ${SOURCE_BRANCH} \
117119
--target-branch ${TARGET_BRANCH} \

CHANGELOG.md

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

55
## [UNRELEASED]
66

7+
- Add support for SHA-256 Git object IDs. [#3893](https://github.com/github/codeql-action/pull/3893)
8+
9+
## 4.35.5 - 15 May 2026
10+
11+
- We have improved how the JavaScript bundles for the CodeQL Action are generated to avoid duplication across bundles and reduce the size of the repository by around 70%. This should have no effect on the runtime behaviour of the CodeQL Action. [#3899](https://github.com/github/codeql-action/pull/3899)
12+
- For performance and accuracy reasons, [improved incremental analysis](https://github.com/github/roadmap/issues/1158) will now only be enabled on a pull request when diff-informed analysis is also enabled for that run. If diff-informed analysis is unavailable (for example, because the PR diff ranges could not be computed), the action will fall back to a full analysis. [#3791](https://github.com/github/codeql-action/pull/3791)
13+
- If multiple inputs are provided for the GitHub-internal `analysis-kinds` input, only `code-scanning` will be enabled. The `analysis-kinds` input is experimental, for GitHub-internal use only, and may change without notice at any time. [#3892](https://github.com/github/codeql-action/pull/3892)
714
- Added an experimental change which, when running a Code Scanning analysis for a PR with [improved incremental analysis](https://github.com/github/roadmap/issues/1158) enabled, prefers CodeQL CLI versions that have a cached overlay-base database for the configured languages. This speeds up analysis for a repository when there is not yet a cached overlay-base database for the latest CLI version. We expect to roll this change out to everyone in May. [#3880](https://github.com/github/codeql-action/pull/3880)
815
- _Breaking change_: Bump the minimum required CodeQL bundle version to 2.19.4. [#3894](https://github.com/github/codeql-action/pull/3894)
916

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Once the mergeback and backport pull request have been merged, the release is co
7171

7272
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred required jobs that need to pass in order for a PR to turn green. It would be too tedious to maintain that list manually. You can regenerate the set of required checks automatically by running the [sync-checks.ts](pr-checks/sync-checks.ts) script:
7373

74-
- At a minimum, you must provide an argument for the `--token` input. For example, `--token "$(gh auth token)"` to use the same token that `gh` uses. If no token is provided or the token has insufficient permissions, the script will fail.
74+
- At a minimum, you must provide a token with permissions to update branch protection rules. For example, `gh auth token | pr-checks/sync-checks.ts --token-stdin` uses the same token that `gh` uses. You can also set the `GH_TOKEN` or `GITHUB_TOKEN` environment variable. If no token is provided or the token has insufficient permissions, the script will fail.
7575
- By default, the script performs a dry run and outputs information about the changes it would make to the branch protection rules. To actually apply the changes, specify the `--apply` flag.
7676
- If you run the script without any other arguments, it will retrieve the set of workflows that ran for the latest commit on `main`.
7777
- You can specify a different git ref with the `--ref` input. You will likely want to use this if you have a PR that removes or adds PR checks. For example, `--ref "some/branch/name"` to use the HEAD of the `some/branch/name` branch.

0 commit comments

Comments
 (0)