Compare commits

..

5 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 4869139f44 Address code review feedback
- Remove awkward blank lines left after removing eslint-disable comments
- Add baseUrl to tsconfig.json for proper paths resolution

Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2026-01-28 18:51:48 +00:00
copilot-swe-agent[bot] 712b51a568 Also disable no-unsafe-argument rule
This rule is also triggered by stricter types in @actions/github v9

Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2026-01-28 18:46:47 +00:00
copilot-swe-agent[bot] 0d61442a70 Fix ESLint errors caused by @actions/github v9 upgrade
- Add @actions/github to ESLint import/ignore list to avoid parse errors
- Disable @typescript-eslint/no-unsafe-call and no-unsafe-return rules
- Add TypeScript paths mapping for @octokit/core/types
- Remove unused eslint-disable directives

Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2026-01-28 18:45:04 +00:00
copilot-swe-agent[bot] c4b6a67406 Initial plan 2026-01-28 18:38:23 +00:00
dependabot[bot] 90b2d28dad Bump @actions/github from 8.0.0 to 9.0.0
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 8.0.0 to 9.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 17:53:43 +00:00
322 changed files with 1419445 additions and 102647 deletions
@@ -41,38 +41,7 @@ runs:
git add . git add .
git commit -m "Update changelog and version after ${VERSION}" git commit -m "Update changelog and version after ${VERSION}"
# Update the build artifacts with the new version number git push origin "${NEW_BRANCH}"
- name: Rebuild the Action
shell: bash
run: |
set -exu
npm ci
npm run build
- name: Check for rebuild changes
id: rebuild_changes
shell: bash
run: |
set -exu
git add --all
if git diff --cached --quiet; then
echo "has_changes=false" >> "${GITHUB_OUTPUT}"
else
echo "has_changes=true" >> "${GITHUB_OUTPUT}"
fi
- name: Commit rebuild
if: steps.rebuild_changes.outputs.has_changes == 'true'
shell: bash
run: |
set -exu
git commit -m "Rebuild"
- name: Push mergeback branch
shell: bash
env:
NEW_BRANCH: "${{ inputs.branch }}"
run: git push origin "${NEW_BRANCH}"
- name: Create PR - name: Create PR
shell: bash shell: bash
@@ -91,6 +60,8 @@ runs:
Please do the following: Please do the following:
- [ ] Remove and re-add the "Rebuild" label to the PR to trigger just this workflow.
- [ ] Wait for the "Rebuild" workflow to push a commit updating the distribution files.
- [ ] Mark the PR as ready for review to trigger the full set of PR checks. - [ ] Mark the PR as ready for review to trigger the full set of PR checks.
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is - [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is
selected rather than "Squash and merge" or "Rebase and merge". selected rather than "Squash and merge" or "Rebase and merge".
@@ -103,6 +74,7 @@ runs:
--head "${NEW_BRANCH}" \ --head "${NEW_BRANCH}" \
--base "${BASE_BRANCH}" \ --base "${BASE_BRANCH}" \
--title "${pr_title}" \ --title "${pr_title}" \
--label "Rebuild" \
--body "${pr_body}" \ --body "${pr_body}" \
--assignee "${GITHUB_ACTOR}" \ --assignee "${GITHUB_ACTOR}" \
--draft --draft
+1 -2
View File
@@ -22,8 +22,7 @@ runs:
MAJOR_VERSION: ${{ inputs.major_version }} MAJOR_VERSION: ${{ inputs.major_version }}
LATEST_TAG: ${{ inputs.latest_tag }} LATEST_TAG: ${{ inputs.latest_tag }}
run: | run: |
npm ci python ${{ github.action_path }}/release-branches.py \
npx tsx ./pr-checks/release-branches.ts \
--major-version "$MAJOR_VERSION" \ --major-version "$MAJOR_VERSION" \
--latest-tag "$LATEST_TAG" --latest-tag "$LATEST_TAG"
shell: bash shell: bash
@@ -0,0 +1,55 @@
import argparse
import json
import os
import configparser
# Name of the remote
ORIGIN = 'origin'
script_dir = os.path.dirname(os.path.realpath(__file__))
grandparent_dir = os.path.dirname(os.path.dirname(script_dir))
config = configparser.ConfigParser()
with open(os.path.join(grandparent_dir, 'releases.ini')) as stream:
config.read_string('[default]\n' + stream.read())
OLDEST_SUPPORTED_MAJOR_VERSION = int(config['default']['OLDEST_SUPPORTED_MAJOR_VERSION'])
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--major-version", required=True, type=str, help="The major version of the release")
parser.add_argument("--latest-tag", required=True, type=str, help="The most recent tag published to the repository")
args = parser.parse_args()
major_version = args.major_version
latest_tag = args.latest_tag
print("major_version: " + major_version)
print("latest_tag: " + latest_tag)
# If this is a primary release, we backport to all supported branches,
# so we check whether the major_version taken from the package.json
# is greater than or equal to the latest tag pulled from the repo.
# For example...
# 'v1' >= 'v2' is False # we're operating from an older release branch and should not backport
# 'v2' >= 'v2' is True # the normal case where we're updating the current version
# 'v3' >= 'v2' is True # in this case we are making the first release of a new major version
consider_backports = ( major_version >= latest_tag.split(".")[0] )
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"backport_source_branch=releases/{major_version}\n")
backport_target_branches = []
if consider_backports:
for i in range(int(major_version.strip("v"))-1, 0, -1):
branch_name = f"releases/v{i}"
if i >= OLDEST_SUPPORTED_MAJOR_VERSION:
backport_target_branches.append(branch_name)
f.write("backport_target_branches="+json.dumps(backport_target_branches)+"\n")
if __name__ == "__main__":
main()
@@ -15,12 +15,6 @@ runs:
run: echo "$GITHUB_CONTEXT" run: echo "$GITHUB_CONTEXT"
shell: bash shell: bash
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
+1 -3
View File
@@ -1,5 +1,5 @@
name: "CodeQL config" name: "CodeQL config"
queries: queries:
- name: Run custom queries - name: Run custom queries
uses: ./queries uses: ./queries
# Run all extra query suites, both because we want to # Run all extra query suites, both because we want to
@@ -13,5 +13,3 @@ queries:
paths-ignore: paths-ignore:
- lib - lib
- tests - tests
- "**/*.test.ts"
- "**/testing-util.ts"
+1 -3
View File
@@ -1,9 +1,7 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: npm - package-ecosystem: npm
directories: directory: "/"
- "/"
- "/pr-checks"
schedule: schedule:
interval: weekly interval: weekly
cooldown: cooldown:
+2 -3
View File
@@ -23,13 +23,13 @@ For internal use only. Please select the risk level of this change:
Workflow types: Workflow types:
- **Advanced setup** - Impacts users who have custom CodeQL workflows. - **Advanced setup** - Impacts users who have custom CodeQL workflows.
- **Managed** - Impacts users with `dynamic` workflows (Default Setup, Code Quality, ...). - **Managed** - Impacts users with `dynamic` workflows (Default Setup, CCR, ...).
Products: Products:
- **Code Scanning** - The changes impact analyses when `analysis-kinds: code-scanning`. - **Code Scanning** - The changes impact analyses when `analysis-kinds: code-scanning`.
- **Code Quality** - The changes impact analyses when `analysis-kinds: code-quality`. - **Code Quality** - The changes impact analyses when `analysis-kinds: code-quality`.
- **Other first-party** - The changes impact other first-party analyses. - **CCR** - The changes impact analyses for Copilot Code Reviews.
- **Third-party analyses** - The changes affect the `upload-sarif` action. - **Third-party analyses** - The changes affect the `upload-sarif` action.
Environments: Environments:
@@ -54,7 +54,6 @@ Environments:
- **Feature flags** - All new or changed code paths can be fully disabled with corresponding feature flags. - **Feature flags** - All new or changed code paths can be fully disabled with corresponding feature flags.
- **Rollback** - Change can only be disabled by rolling back the release or releasing a new version with a fix. - **Rollback** - Change can only be disabled by rolling back the release or releasing a new version with a fix.
- **Development/testing only** - This change cannot cause any failures in production.
- **Other** - Please provide details. - **Other** - Please provide details.
#### How will you know if something goes wrong after this change is released? #### How will you know if something goes wrong after this change is released?
+1
View File
@@ -0,0 +1 @@
OLDEST_SUPPORTED_MAJOR_VERSION=3
+24 -69
View File
@@ -16,27 +16,12 @@ No user facing changes.
""" """
# NB: This exact commit message is used to find commits for reverting during backports. # NB: This exact commit message is used to find commits for reverting during backports.
# Changing it requires a transition period where both old and new versions are supported. # Changing it requires a transition period where both old and new versions are supported.
BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v' BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v'
# Commit message used for rebuild commits, both those produced by this script and those produced
# by the `Rebuild Action` workflow (`.github/workflows/rebuild.yml`).
REBUILD_COMMIT_MESSAGE = 'Rebuild'
# Name of the remote # Name of the remote
ORIGIN = 'origin' ORIGIN = 'origin'
# Environment variables to check for a GitHub API token.
TOKEN_ENVIRONMENT_VARIABLES = ('GH_TOKEN', 'GITHUB_TOKEN')
# Gets a GitHub API token from one of the supported environment variables.
def get_github_token():
for variable_name in TOKEN_ENVIRONMENT_VARIABLES:
token = os.environ.get(variable_name, '').strip()
if token:
return token
raise Exception('Missing GitHub token. Set GITHUB_TOKEN or GH_TOKEN.')
# Runs git with the given args and returns the stdout. # Runs git with the given args and returns the stdout.
# Raises an error if git does not exit successfully (unless passed # Raises an error if git does not exit successfully (unless passed
# allow_non_zero_exit_code=True). # allow_non_zero_exit_code=True).
@@ -47,28 +32,6 @@ def run_git(*args, allow_non_zero_exit_code=False):
raise Exception(f'Call to {" ".join(cmd)} exited with code {p.returncode} stderr: {p.stderr.decode("ascii")}.') raise Exception(f'Call to {" ".join(cmd)} exited with code {p.returncode} stderr: {p.stderr.decode("ascii")}.')
return p.stdout.decode('ascii') return p.stdout.decode('ascii')
# Runs the given command, streaming output to the console.
# Raises an error if the command does not exit successfully.
def run_command(*args):
cmd = list(args)
print(f'Running `{" ".join(cmd)}`.')
subprocess.run(cmd, check=True)
# Rebuilds the action and commits any changes.
def rebuild_action():
# For backports, the only source-level change vs the source branch is the new version number,
# so we just need to refresh the version embedded in `lib/`.
run_command('npm', 'ci')
run_command('npm', 'run', 'build')
run_git('add', '--all')
# `git diff --cached --quiet` exits 0 if there are no staged changes, 1 if there are.
if subprocess.run(['git', 'diff', '--cached', '--quiet']).returncode == 0:
print('Rebuild produced no changes; skipping Rebuild commit.')
else:
run_git('commit', '-m', REBUILD_COMMIT_MESSAGE)
print('Created Rebuild commit.')
# Returns true if the given branch exists on the origin remote # Returns true if the given branch exists on the origin remote
def branch_exists_on_remote(branch_name): def branch_exists_on_remote(branch_name):
return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != '' return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != ''
@@ -108,9 +71,8 @@ def open_pr(
body.append('') body.append('')
body.append('Contains the following pull requests:') body.append('Contains the following pull requests:')
for pr in pull_requests: for pr in pull_requests:
# Use PR author if they are GitHub staff, otherwise use the merger merger = get_merger_of_pr(repo, pr)
display_user = get_pr_author_if_staff(pr) or get_merger_of_pr(repo, pr) body.append(f'- #{pr.number} (@{merger})')
body.append(f'- #{pr.number} (@{display_user})')
# List all commits not part of a PR # List all commits not part of a PR
if len(commits_without_pull_requests) > 0: if len(commits_without_pull_requests) > 0:
@@ -124,11 +86,9 @@ def open_pr(
body.append('Please do the following:') body.append('Please do the following:')
if len(conflicted_files) > 0: if len(conflicted_files) > 0:
body.append(' - [ ] Ensure `package.json` file contains the correct version.') body.append(' - [ ] Ensure `package.json` file contains the correct version.')
body.append(' - [ ] Add a commit to this branch to resolve the merge conflicts ' + body.append(' - [ ] Add commits to this branch to resolve the merge conflicts ' +
'in the following files:') 'in the following files:')
body.extend([f' - `{file}`' for file in conflicted_files]) body.extend([f' - [ ] `{file}`' for file in conflicted_files])
body.append(' - [ ] Rebuild the Action locally (`npm run build`) and push any changes to the ' +
f'built output in `lib` as a separate commit named exactly `{REBUILD_COMMIT_MESSAGE}`.')
body.append(' - [ ] Ensure another maintainer has reviewed the additional commits you added to this ' + body.append(' - [ ] Ensure another maintainer has reviewed the additional commits you added to this ' +
'branch to resolve the merge conflicts.') 'branch to resolve the merge conflicts.')
body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.') body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.')
@@ -136,6 +96,10 @@ def open_pr(
body.append(f' - [ ] Check that there are not any unexpected commits being merged into the `{target_branch}` branch.') body.append(f' - [ ] Check that there are not any unexpected commits being merged into the `{target_branch}` branch.')
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.') body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
if not is_primary_release:
body.append(' - [ ] Remove and re-add the "Rebuild" label to the PR to trigger just this workflow.')
body.append(' - [ ] Wait for the "Rebuild" workflow to push a commit updating the distribution files.')
body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.') body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.')
body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.') body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.')
@@ -144,11 +108,13 @@ def open_pr(
body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.') body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.')
title = f'Merge {source_branch} into {target_branch}' title = f'Merge {source_branch} into {target_branch}'
labels = ['Rebuild'] if not is_primary_release else []
# Create the pull request # Create the pull request
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that
# a maintainer can take the PR out of draft, thereby triggering the PR checks. # a maintainer can take the PR out of draft, thereby triggering the PR checks.
pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch, draft=True) pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch, draft=True)
pr.add_to_labels(*labels)
print(f'Created PR #{str(pr.number)}') print(f'Created PR #{str(pr.number)}')
# Assign the conductor # Assign the conductor
@@ -202,14 +168,6 @@ def get_pr_for_commit(commit):
def get_merger_of_pr(repo, pr): def get_merger_of_pr(repo, pr):
return repo.get_commit(pr.merge_commit_sha).author.login return repo.get_commit(pr.merge_commit_sha).author.login
# Get the PR author if they are GitHub staff, otherwise None.
def get_pr_author_if_staff(pr):
if pr.user is None:
return None
if getattr(pr.user, 'site_admin', False):
return pr.user.login
return None
def get_current_version(): def get_current_version():
with open('package.json', 'r') as f: with open('package.json', 'r') as f:
return json.load(f)['version'] return json.load(f)['version']
@@ -223,9 +181,9 @@ def replace_version_package_json(prev_version, new_version):
print(line.replace(prev_version, new_version), end='') print(line.replace(prev_version, new_version), end='')
else: else:
prev_line_is_codeql = False prev_line_is_codeql = False
print(line, end='') print(line, end='')
if '\"name\": \"codeql\",' in line: if '\"name\": \"codeql\",' in line:
prev_line_is_codeql = True prev_line_is_codeql = True
def get_today_string(): def get_today_string():
today = datetime.datetime.today() today = datetime.datetime.today()
@@ -303,6 +261,12 @@ def update_changelog(version):
def main(): def main():
parser = argparse.ArgumentParser('update-release-branch.py') parser = argparse.ArgumentParser('update-release-branch.py')
parser.add_argument(
'--github-token',
type=str,
required=True,
help='GitHub token, typically from GitHub Actions.'
)
parser.add_argument( parser.add_argument(
'--repository-nwo', '--repository-nwo',
type=str, type=str,
@@ -340,7 +304,7 @@ def main():
target_branch = args.target_branch target_branch = args.target_branch
is_primary_release = args.is_primary_release is_primary_release = args.is_primary_release
repo = Github(get_github_token()).get_repo(args.repository_nwo) repo = Github(args.github_token).get_repo(args.repository_nwo)
# the target branch will be of the form releases/vN, where N is the major version number # the target branch will be of the form releases/vN, where N is the major version number
target_branch_major_version = target_branch.strip('releases/v') target_branch_major_version = target_branch.strip('releases/v')
@@ -407,9 +371,8 @@ def main():
# releases. # releases.
run_git('revert', vOlder_update_commits[0], '--no-edit') run_git('revert', vOlder_update_commits[0], '--no-edit')
# Also revert the "Rebuild" commit, whether created by this script or by the # Also revert the "Rebuild" commit created by Actions.
# `Rebuild Action` workflow. rebuild_commit = run_git('log', '--grep', '^Rebuild$', '--format=%H').split()[0]
rebuild_commit = run_git('log', '--grep', f'^{REBUILD_COMMIT_MESSAGE}$', '--format=%H').split()[0]
print(f' Reverting {rebuild_commit}') print(f' Reverting {rebuild_commit}')
run_git('revert', rebuild_commit, '--no-edit') run_git('revert', rebuild_commit, '--no-edit')
@@ -424,10 +387,9 @@ def main():
run_git('add', '.') run_git('add', '.')
run_git('commit', '--no-edit') run_git('commit', '--no-edit')
# Migrate the package version number from a vLatest version number to a vOlder version number. # Migrate the package version number from a vLatest version number to a vOlder version number
# `package-lock.json` is updated as part of the subsequent rebuild step (see `rebuild_action`).
print(f'Setting version number to {version} in package.json') print(f'Setting version number to {version} in package.json')
replace_version_package_json(get_current_version(), version) replace_version_package_json(get_current_version(), version) # We rely on the `Rebuild` workflow to update package-lock.json
run_git('add', 'package.json') run_git('add', 'package.json')
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers # Migrate the changelog notes from vLatest version numbers to vOlder version numbers
@@ -450,13 +412,6 @@ def main():
run_git('add', 'CHANGELOG.md') run_git('add', 'CHANGELOG.md')
run_git('commit', '-m', f'Update changelog for v{version}') run_git('commit', '-m', f'Update changelog for v{version}')
if not is_primary_release:
if len(conflicted_files) == 0:
print('Rebuilding the Action.')
rebuild_action()
else:
print(f'Skipping automatic rebuild because the merge produced conflicts in {conflicted_files}.')
run_git('push', ORIGIN, new_branch_name) run_git('push', ORIGIN, new_branch_name)
# Open a PR to update the branch # Open a PR to update the branch
+22 -24
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: all-platform-bundle-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
all-platform-bundle-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
all-platform-bundle: all-platform-bundle:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -91,10 +80,19 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'true' use-all-platform-bundle: 'true'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- id: init - id: init
uses: ./../action/init uses: ./../action/init
with: with:
# Swift is not supported on Ubuntu so we manually exclude it from the list here # Swift is not supported on Ubuntu so we manually exclude it from the list here
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
+40 -26
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: analyze-ref-input-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
analyze-ref-input-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
analyze-ref-input: analyze-ref-input:
strategy: strategy:
@@ -71,15 +79,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -87,16 +86,31 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }} config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code - name: Build code
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
+5 -8
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -65,10 +62,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -76,13 +69,17 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: csharp languages: csharp
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild - uses: ./../action/autobuild
env: env:
# Explicitly disable the CLR tracer. # Explicitly disable the CLR tracer.
COR_ENABLE_PROFILING: '' COR_ENABLE_PROFILING: ''
COR_PROFILER: '' COR_PROFILER: ''
COR_PROFILER_PATH_64: '' COR_PROFILER_PATH_64: ''
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -42,7 +39,8 @@ defaults:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: autobuild-direct-tracing-with-working-dir-${{github.ref}}-${{inputs.java-version}} group:
autobuild-direct-tracing-with-working-dir-${{github.ref}}-${{inputs.java-version}}
jobs: jobs:
autobuild-direct-tracing-with-working-dir: autobuild-direct-tracing-with-working-dir:
strategy: strategy:
@@ -67,11 +65,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Java
uses: actions/setup-java@v5
with:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -79,6 +72,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Java
uses: actions/setup-java@v5
with:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Test setup - name: Test setup
run: | run: |
# Make sure that Gradle build succeeds in autobuild-dir ... # Make sure that Gradle build succeeds in autobuild-dir ...
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
+8 -11
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -67,6 +64,13 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Java - name: Install Java
uses: actions/setup-java@v5 uses: actions/setup-java@v5
with: with:
@@ -80,13 +84,6 @@ jobs:
run: |- run: |-
gh release download --repo mikefarah/yq --pattern "yq_windows_amd64.exe" "$YQ_VERSION" -O "$YQ_PATH/yq.exe" gh release download --repo mikefarah/yq --pattern "yq_windows_amd64.exe" "$YQ_VERSION" -O "$YQ_PATH/yq.exe"
echo "$YQ_PATH" >> "$GITHUB_PATH" echo "$YQ_PATH" >> "$GITHUB_PATH"
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Set up Java test repo configuration - name: Set up Java test repo configuration
run: | run: |
mv * .github ../action/tests/multi-language-repo/ mv * .github ../action/tests/multi-language-repo/
@@ -97,7 +94,7 @@ jobs:
id: init id: init
with: with:
build-mode: autobuild build-mode: autobuild
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: java languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
+22 -24
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: build-mode-manual-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
build-mode-manual-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
build-mode-manual: build-mode-manual:
strategy: strategy:
@@ -71,15 +69,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -87,11 +76,20 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
id: init id: init
with: with:
build-mode: manual build-mode: manual
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: java languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
+2 -5
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -64,7 +61,7 @@ jobs:
id: init id: init
with: with:
build-mode: none build-mode: none
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: java languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -77,7 +74,7 @@ jobs:
exit 1 exit 1
fi fi
# The latest nightly supports omitting the autobuild Action when the build mode is specified. # The latest nightly supports omitting the autobuild Action when the build mode is specified.
- uses: ./../action/autobuild - uses: ./../action/autobuild
if: matrix.version != 'nightly-latest' if: matrix.version != 'nightly-latest'
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -68,7 +65,7 @@ jobs:
id: init id: init
with: with:
build-mode: none build-mode: none
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: java languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -59,7 +56,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install @actions/tool-cache - name: Install @actions/tool-cache
run: npm install @actions/tool-cache@3 run: npm install @actions/tool-cache
- name: Check toolcache contains CodeQL - name: Check toolcache contains CodeQL
continue-on-error: true continue-on-error: true
uses: actions/github-script@v8 uses: actions/github-script@v8
+3 -6
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -39,10 +36,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-latest
version: linked
- os: macos-latest - os: macos-latest
version: linked version: linked
- os: ubuntu-latest
version: linked
- os: windows-latest - os: windows-latest
version: linked version: linked
name: 'Bundle: Caching checks' name: 'Bundle: Caching checks'
@@ -71,7 +68,7 @@ jobs:
const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL');
fs.rmdirSync(codeqlPath, { recursive: true }); fs.rmdirSync(codeqlPath, { recursive: true });
- name: Install @actions/tool-cache - name: Install @actions/tool-cache
run: npm install @actions/tool-cache@3 run: npm install @actions/tool-cache
- name: Check toolcache does not contain CodeQL - name: Check toolcache does not contain CodeQL
uses: actions/github-script@v8 uses: actions/github-script@v8
with: with:
+3 -6
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -39,10 +36,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-latest
version: linked
- os: macos-latest - os: macos-latest
version: linked version: linked
- os: ubuntu-latest
version: linked
- os: windows-latest - os: windows-latest
version: linked version: linked
name: 'Bundle: Zstandard checks' name: 'Bundle: Zstandard checks'
@@ -82,7 +79,7 @@ jobs:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: ${{ matrix.os }}-zstd-bundle.sarif name: ${{ matrix.os }}-zstd-bundle.sarif
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
@@ -3,7 +3,7 @@
# pr-checks/sync.sh # pr-checks/sync.sh
# to regenerate this file. # to regenerate this file.
name: 'PR Check - Bundle: From nightly' name: PR Check - CCR
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto GO111MODULE: auto
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -32,16 +29,32 @@ defaults:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: bundle-from-nightly-${{github.ref}} group: ccr-${{github.ref}}
jobs: jobs:
bundle-from-nightly: ccr:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-v2.17.6
- os: ubuntu-latest
version: stable-v2.18.4
- os: ubuntu-latest
version: stable-v2.19.4
- os: ubuntu-latest
version: stable-v2.20.7
- os: ubuntu-latest
version: stable-v2.21.4
- os: ubuntu-latest
version: stable-v2.22.4
- os: ubuntu-latest
version: default
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: 'Bundle: From nightly' - os: ubuntu-latest
version: nightly-latest
name: CCR
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
@@ -58,15 +71,17 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- id: init - uses: ./../action/init
uses: ./../action/init id: init
env:
CODEQL_ACTION_FORCE_NIGHTLY: true
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: javascript languages: javascript
- name: Fail if the CodeQL version is not a nightly tools: ${{ steps.prepare-test.outputs.tools-url }}
if: ${{ !contains(steps.init.outputs.codeql-version, '+') }}
run: exit 1 - uses: ./../action/analyze
id: analysis
with:
upload-database: false
env: env:
CODEQL_ACTION_ANALYSIS_KEY: dynamic/copilot-pull-request-reviewer/codeql-action-test
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -67,7 +64,7 @@ jobs:
id: init id: init
with: with:
build-mode: none build-mode: none
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
+4 -7
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -67,18 +64,18 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json name: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: '${{ runner.temp }}/results/javascript.sarif' path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check config properties appear in SARIF - name: Check config properties appear in SARIF
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/javascript.sarif' SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
+4 -7
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -78,18 +75,18 @@ jobs:
--ready-for-status-page --ready-for-status-page
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: '${{ runner.temp }}/results/javascript.sarif' path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check diagnostics appear in SARIF - name: Check diagnostics appear in SARIF
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/javascript.sarif' SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
+24 -26
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: export-file-baseline-information-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
export-file-baseline-information-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
export-file-baseline-information: export-file-baseline-information:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -91,6 +80,15 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
id: init id: init
with: with:
@@ -100,12 +98,12 @@ jobs:
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: '${{ runner.temp }}/results/javascript.sarif' path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check results - name: Check results
run: | run: |
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
+21 -23
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: go-custom-queries-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
go-custom-queries-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
go-custom-queries: go-custom-queries:
strategy: strategy:
@@ -73,15 +71,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -89,6 +78,15 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -61,11 +58,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -73,11 +65,16 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
# Deliberately change Go after the `init` step # Deliberately change Go after the `init` step
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: '1.20' go-version: '1.20'
@@ -85,12 +82,12 @@ jobs:
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check diagnostic appears in SARIF - name: Check diagnostic appears in SARIF
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/go.sarif' SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -42,7 +39,8 @@ defaults:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: go-indirect-tracing-workaround-no-file-program-${{github.ref}}-${{inputs.go-version}} group:
go-indirect-tracing-workaround-no-file-program-${{github.ref}}-${{inputs.go-version}}
jobs: jobs:
go-indirect-tracing-workaround-no-file-program: go-indirect-tracing-workaround-no-file-program:
strategy: strategy:
@@ -61,11 +59,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -73,6 +66,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Remove `file` program - name: Remove `file` program
run: | run: |
echo $(which file) echo $(which file)
@@ -86,12 +84,12 @@ jobs:
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check diagnostic appears in SARIF - name: Check diagnostic appears in SARIF
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/go.sarif' SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
+5 -8
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -61,11 +58,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -73,6 +65,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
+23 -12
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -50,18 +47,32 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.17.6
- os: macos-latest
version: stable-v2.17.6
- os: ubuntu-latest
version: stable-v2.18.4
- os: macos-latest
version: stable-v2.18.4
- os: ubuntu-latest
version: stable-v2.19.4
- os: macos-latest
version: stable-v2.19.4 version: stable-v2.19.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.20.7 version: stable-v2.20.7
- os: macos-latest
version: stable-v2.20.7
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest
version: stable-v2.21.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.22.4 version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.23.9 version: default
- os: ubuntu-latest - os: macos-latest
version: stable-v2.24.3
- os: ubuntu-latest
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
@@ -81,11 +92,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -93,6 +99,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
+23 -12
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -50,18 +47,32 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.17.6
- os: macos-latest
version: stable-v2.17.6
- os: ubuntu-latest
version: stable-v2.18.4
- os: macos-latest
version: stable-v2.18.4
- os: ubuntu-latest
version: stable-v2.19.4
- os: macos-latest
version: stable-v2.19.4 version: stable-v2.19.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.20.7 version: stable-v2.20.7
- os: macos-latest
version: stable-v2.20.7
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest
version: stable-v2.21.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.22.4 version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.23.9 version: default
- os: ubuntu-latest - os: macos-latest
version: stable-v2.24.3
- os: ubuntu-latest
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
@@ -81,11 +92,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -93,6 +99,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
+23 -12
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -50,18 +47,32 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.17.6
- os: macos-latest
version: stable-v2.17.6
- os: ubuntu-latest
version: stable-v2.18.4
- os: macos-latest
version: stable-v2.18.4
- os: ubuntu-latest
version: stable-v2.19.4
- os: macos-latest
version: stable-v2.19.4 version: stable-v2.19.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.20.7 version: stable-v2.20.7
- os: macos-latest
version: stable-v2.20.7
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest
version: stable-v2.21.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.22.4 version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.23.9 version: default
- os: ubuntu-latest - os: macos-latest
version: stable-v2.24.3
- os: ubuntu-latest
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
@@ -81,11 +92,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -93,6 +99,11 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go
+6 -6
View File
@@ -10,16 +10,16 @@ env:
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
jobs: jobs:
go-custom-queries: go-custom-queries:
name: 'Go: Custom queries' name: 'Go: Custom queries'
@@ -28,8 +28,8 @@ jobs:
security-events: read security-events: read
uses: ./.github/workflows/__go-custom-queries.yml uses: ./.github/workflows/__go-custom-queries.yml
with: with:
dotnet-version: ${{ inputs.dotnet-version }}
go-version: ${{ inputs.go-version }} go-version: ${{ inputs.go-version }}
dotnet-version: ${{ inputs.dotnet-version }}
go-indirect-tracing-workaround-diagnostic: go-indirect-tracing-workaround-diagnostic:
name: 'Go: diagnostic when Go is changed after init step' name: 'Go: diagnostic when Go is changed after init step'
permissions: permissions:
+2 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -50,6 +47,7 @@ jobs:
permissions: permissions:
contents: read contents: read
packages: read packages: read
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@@ -65,7 +63,7 @@ jobs:
- name: Init with registries - name: Init with registries
uses: ./../action/init uses: ./../action/init
with: with:
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
config-file: ./.github/codeql/codeql-config-registries.yml config-file: ./.github/codeql/codeql-config-registries.yml
languages: javascript languages: javascript
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
+3 -6
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -65,12 +62,12 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json name: ${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: '${{ runner.temp }}/results/javascript.sarif' path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check results - name: Check results
run: | run: |
+3 -6
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -60,12 +57,12 @@ jobs:
setup-kotlin: 'true' setup-kotlin: 'true'
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: C#,java-kotlin,typescript languages: C#,java-kotlin,swift,typescript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: 'Check languages' - name: Check languages
run: | run: |
expected_languages="csharp,java,javascript" expected_languages="csharp,java,swift,javascript"
actual_languages=$(jq -r '.languages | join(",")' "$RUNNER_TEMP"/config) actual_languages=$(jq -r '.languages | join(",")' "$RUNNER_TEMP"/config)
if [ "$expected_languages" != "$actual_languages" ]; then if [ "$expected_languages" != "$actual_languages" ]; then
+37 -24
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: local-bundle-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
local-bundle-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
local-bundle: local-bundle:
strategy: strategy:
@@ -71,15 +79,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -87,13 +86,27 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Fetch latest CodeQL bundle - name: Fetch latest CodeQL bundle
run: | run: |
wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst
- id: init - id: init
uses: ./../action/init uses: ./../action/init
with: with:
# Swift is not supported on Ubuntu so we manually exclude it from the list here # Swift is not supported on Ubuntu so we manually exclude it from the list here
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ./codeql-bundle-linux64.tar.zst tools: ./codeql-bundle-linux64.tar.zst
- name: Build code - name: Build code
+58 -52
View File
@@ -18,82 +18,90 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: multi-language-autodetect-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
multi-language-autodetect-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
multi-language-autodetect: multi-language-autodetect:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: macos-latest
version: stable-v2.17.6
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.19.4 version: stable-v2.17.6
- os: macos-latest-xlarge - os: macos-latest
version: stable-v2.18.4
- os: ubuntu-latest
version: stable-v2.18.4
- os: macos-latest
version: stable-v2.19.4 version: stable-v2.19.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.20.7 version: stable-v2.19.4
- os: macos-latest-xlarge - os: macos-latest
version: stable-v2.20.7 version: stable-v2.20.7
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.21.4 version: stable-v2.20.7
- os: macos-latest-xlarge - os: macos-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.22.4 version: stable-v2.21.4
- os: macos-latest-xlarge - os: macos-latest
version: stable-v2.22.4 version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.23.9 version: stable-v2.22.4
- os: macos-latest-xlarge - os: macos-latest
version: stable-v2.23.9
- os: ubuntu-latest
version: stable-v2.24.3
- os: macos-latest-xlarge
version: stable-v2.24.3
- os: ubuntu-latest
version: default
- os: macos-latest-xlarge
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: default
- os: macos-latest-xlarge - os: macos-latest
version: linked version: linked
- os: ubuntu-latest - os: ubuntu-latest
version: linked
- os: macos-latest
version: nightly-latest version: nightly-latest
- os: macos-latest-xlarge - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Multi-language repository name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
@@ -105,15 +113,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -121,14 +120,20 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Python 3.13 for older CLI versions - name: Install Go
# We need Python 3.13 for older CLI versions because they are not compatible with Python 3.14 or newer. uses: actions/setup-go@v6
# See https://github.com/github/codeql-action/pull/3212 with:
if: matrix.version != 'nightly-latest' && matrix.version != 'linked' go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: '3.13' python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Use Xcode 16 - name: Use Xcode 16
if: runner.os == 'macOS' && matrix.version != 'nightly-latest' if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app" run: sudo xcode-select -s "/Applications/Xcode_16.app"
@@ -136,8 +141,9 @@ jobs:
- uses: ./../action/init - uses: ./../action/init
id: init id: init
with: with:
db-location: '${{ runner.temp }}/customDbLocation' db-location: ${{ runner.temp }}/customDbLocation
languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }} languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby'
|| '' }}
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: packaging-codescanning-config-inputs-js-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
packaging-codescanning-config-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
packaging-codescanning-config-inputs-js: packaging-codescanning-config-inputs-js:
strategy: strategy:
@@ -75,15 +83,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
@@ -98,9 +97,23 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
config-file: '.github/codeql/codeql-config-packaging3.yml' config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0 packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -108,14 +121,15 @@ jobs:
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check results - name: Check results
uses: ./../action/.github/actions/check-sarif uses: ./../action/.github/actions/check-sarif
with: with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
+25 -26
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: packaging-config-inputs-js-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
packaging-config-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
packaging-config-inputs-js: packaging-config-inputs-js:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
@@ -98,9 +87,18 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
config-file: '.github/codeql/codeql-config-packaging3.yml' config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0 packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -108,14 +106,15 @@ jobs:
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check results - name: Check results
uses: ./../action/.github/actions/check-sarif uses: ./../action/.github/actions/check-sarif
with: with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
+25 -26
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: packaging-config-js-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
packaging-config-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
packaging-config-js: packaging-config-js:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
@@ -98,23 +87,33 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
config-file: '.github/codeql/codeql-config-packaging.yml' config-file: .github/codeql/codeql-config-packaging.yml
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check results - name: Check results
uses: ./../action/.github/actions/check-sarif uses: ./../action/.github/actions/check-sarif
with: with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
+25 -26
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: packaging-inputs-js-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
packaging-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
packaging-inputs-js: packaging-inputs-js:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
@@ -98,9 +87,18 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
config-file: '.github/codeql/codeql-config-packaging2.yml' config-file: .github/codeql/codeql-config-packaging2.yml
languages: javascript languages: javascript
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -108,13 +106,14 @@ jobs:
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
- name: Check results - name: Check results
uses: ./../action/.github/actions/check-sarif uses: ./../action/.github/actions/check-sarif
with: with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
@@ -3,7 +3,7 @@
# pr-checks/sync.sh # pr-checks/sync.sh
# to regenerate this file. # to regenerate this file.
name: PR Check - Analysis kinds name: PR Check - Quality queries input
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto GO111MODULE: auto
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -32,9 +29,9 @@ defaults:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: analysis-kinds-${{github.ref}} group: quality-queries-${{github.ref}}
jobs: jobs:
analysis-kinds: quality-queries:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -48,9 +45,6 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
analysis-kinds: code-scanning,code-quality analysis-kinds: code-scanning,code-quality
- os: ubuntu-latest
version: linked
analysis-kinds: risk-assessment
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
analysis-kinds: code-scanning analysis-kinds: code-scanning
@@ -60,10 +54,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
analysis-kinds: code-scanning,code-quality analysis-kinds: code-scanning,code-quality
- os: ubuntu-latest name: Quality queries input
version: nightly-latest
analysis-kinds: risk-assessment
name: Analysis kinds
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
@@ -87,32 +78,38 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
post-processed-sarif-path: '${{ runner.temp }}/post-processed' post-processed-sarif-path: ${{ runner.temp }}/post-processed
- name: Upload security SARIF
- name: Upload SARIF files if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: | name: |
analysis-kinds-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }} quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
path: '${{ runner.temp }}/results/*.sarif' path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Upload quality SARIF
- name: Upload post-processed SARIF if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v6
with: with:
name: | name: |
post-processed-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }} quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.quality.sarif.json
path: '${{ runner.temp }}/post-processed' path: ${{ runner.temp }}/results/javascript.quality.sarif
retention-days: 7
- name: Upload post-processed SARIF
uses: actions/upload-artifact@v6
with:
name: |
post-processed-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
path: ${{ runner.temp }}/post-processed
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- name: Check quality query does not appear in security SARIF - name: Check quality query does not appear in security SARIF
if: contains(matrix.analysis-kinds, 'code-scanning') if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/javascript.sarif' SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
EXPECT_PRESENT: 'false' EXPECT_PRESENT: 'false'
with: with:
script: ${{ env.CHECK_SCRIPT }} script: ${{ env.CHECK_SCRIPT }}
@@ -120,12 +117,11 @@ jobs:
if: contains(matrix.analysis-kinds, 'code-quality') if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/github-script@v8 uses: actions/github-script@v8
env: env:
SARIF_PATH: '${{ runner.temp }}/results/javascript.quality.sarif' SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif
EXPECT_PRESENT: 'true' EXPECT_PRESENT: 'true'
with: with:
script: ${{ env.CHECK_SCRIPT }} script: ${{ env.CHECK_SCRIPT }}
env: env:
CODEQL_ACTION_RISK_ASSESSMENT_ID: 1
CHECK_SCRIPT: | CHECK_SCRIPT: |
const fs = require('fs'); const fs = require('fs');
+38 -24
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: remote-config-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
remote-config-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
remote-config: remote-config:
strategy: strategy:
@@ -73,15 +81,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -89,11 +88,26 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }} config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code - name: Build code
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
+4 -6
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -39,10 +36,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-latest
version: linked
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: ubuntu-latest
version: linked
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Resolve environment name: Resolve environment
@@ -84,7 +81,8 @@ jobs:
language: javascript-typescript language: javascript-typescript
- name: Fail if JavaScript/TypeScript configuration present - name: Fail if JavaScript/TypeScript configuration present
if: fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript if:
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
run: exit 1 run: exit 1
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -59,7 +56,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Install Code Scanning integration - name: Install Code Scanning integration
-3
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -40,7 +37,7 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.19.4 version: stable-v2.19.3
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.22.1 version: stable-v2.22.1
- os: ubuntu-latest - os: ubuntu-latest
+23 -26
View File
@@ -18,41 +18,38 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: split-workflow-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group: split-workflow-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
split-workflow: split-workflow:
strategy: strategy:
@@ -81,15 +78,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -97,9 +85,18 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
config-file: '.github/codeql/codeql-config-packaging3.yml' config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0 packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -108,7 +105,7 @@ jobs:
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
skip-queries: true skip-queries: true
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Assert No Results - name: Assert No Results
@@ -119,7 +116,7 @@ jobs:
fi fi
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: '${{ runner.temp }}/results' output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Assert Results - name: Assert Results
run: | run: |
+4 -22
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -71,17 +68,8 @@ jobs:
id: proxy id: proxy
uses: ./../action/start-proxy uses: ./../action/start-proxy
with: with:
registry_secrets: | registry_secrets: '[{ "type": "nuget_feed", "url": "https://api.nuget.org/v3/index.json"
[ }]'
{
"type": "maven_repository",
"url": "https://repo.maven.apache.org/maven2/"
},
{
"type": "maven_repository",
"url": "https://repo1.maven.org/maven2"
}
]
- name: Print proxy outputs - name: Print proxy outputs
run: | run: |
@@ -90,14 +78,8 @@ jobs:
echo "${{ steps.proxy.outputs.proxy_urls }}" echo "${{ steps.proxy.outputs.proxy_urls }}"
- name: Fail if proxy outputs are not set - name: Fail if proxy outputs are not set
if: (!steps.proxy.outputs.proxy_host) || (!steps.proxy.outputs.proxy_port) || (!steps.proxy.outputs.proxy_ca_certificate) || (!steps.proxy.outputs.proxy_urls) if: (!steps.proxy.outputs.proxy_host) || (!steps.proxy.outputs.proxy_port)
run: exit 1 || (!steps.proxy.outputs.proxy_ca_certificate) || (!steps.proxy.outputs.proxy_urls)
- name: Fail if proxy_urls does not contain all registries
if: |
join(fromJSON(steps.proxy.outputs.proxy_urls)[*].type, ',') != 'maven_repository,maven_repository'
|| !contains(steps.proxy.outputs.proxy_urls, 'https://repo.maven.apache.org/maven2/')
|| !contains(steps.proxy.outputs.proxy_urls, 'https://repo1.maven.org/maven2')
run: exit 1 run: exit 1
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
+15 -11
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -49,7 +46,8 @@ jobs:
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: write security-events: write # needed to upload the SARIF file
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@@ -68,20 +66,26 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Fail - name: Fail
# We want this job to pass if the Action correctly uploads the SARIF file for # We want this job to pass if the Action correctly uploads the SARIF file for
# the failed run. # the failed run.
# Setting this step to continue on error means that it is marked as completing # Setting this step to continue on error means that it is marked as completing
# successfully, so will not fail the job. # successfully, so will not fail the job.
continue-on-error: true continue-on-error: true
run: exit 1 run: exit 1
- uses: ./analyze - uses: ./analyze
# In a real workflow, this step wouldn't run. Since we used `continue-on-error` # In a real workflow, this step wouldn't run. Since we used `continue-on-error`
# above, we manually disable it with an `if` condition. # above, we manually disable it with an `if` condition.
if: false if: false
with: with:
category: '/test-codeql-version:${{ matrix.version }}' category: /test-codeql-version:${{ matrix.version }}
env: env:
# Internal-only environment variable used to indicate that the post-init Action
# should expect to upload a SARIF file for the failed run.
CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF: true CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF: true
# Make sure the uploading SARIF files feature is enabled.
CODEQL_ACTION_UPLOAD_FAILED_SARIF: true CODEQL_ACTION_UPLOAD_FAILED_SARIF: true
# Upload the failed SARIF file as an integration test of the API endpoint.
CODEQL_ACTION_TEST_MODE: false CODEQL_ACTION_TEST_MODE: false
# Mark telemetry for this workflow so it can be treated separately.
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
+1 -4
View File
@@ -18,9 +18,6 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
@@ -39,7 +36,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: macos-latest-xlarge - os: macos-latest
version: nightly-latest version: nightly-latest
name: Swift analysis using autobuild name: Swift analysis using autobuild
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
+21 -23
View File
@@ -18,41 +18,39 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: swift-custom-build-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
swift-custom-build-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}}
jobs: jobs:
swift-custom-build: swift-custom-build:
strategy: strategy:
@@ -75,15 +73,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -91,6 +80,15 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Use Xcode 16 - name: Use Xcode 16
if: runner.os == 'macOS' && matrix.version != 'nightly-latest' if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app" run: sudo xcode-select -s "/Applications/Xcode_16.app"
+37 -24
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: unset-environment-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
unset-environment-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
unset-environment: unset-environment:
strategy: strategy:
@@ -73,15 +81,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -89,11 +88,25 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
id: init id: init
with: with:
db-location: ${{ runner.temp }}/customDbLocation db-location: ${{ runner.temp }}/customDbLocation
# Swift is not supported on Ubuntu so we manually exclude it from the list here # Swift is not supported on Ubuntu so we manually exclude it from the list here
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
+43 -29
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: upload-ref-sha-input-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
upload-ref-sha-input-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
upload-ref-sha-input: upload-ref-sha-input:
strategy: strategy:
@@ -71,15 +79,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -87,22 +86,37 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }} config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code - name: Build code
run: ./build.sh run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step # Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never upload: never
- uses: ./../action/upload-sarif - uses: ./../action/upload-sarif
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
+56 -41
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: upload-sarif-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
upload-sarif-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
upload-sarif: upload-sarif:
strategy: strategy:
@@ -78,15 +86,6 @@ jobs:
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -94,6 +93,20 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
@@ -101,11 +114,11 @@ jobs:
analysis-kinds: ${{ matrix.analysis-kinds }} analysis-kinds: ${{ matrix.analysis-kinds }}
- name: Build code - name: Build code
run: ./build.sh run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step # Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never upload: never
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
@@ -114,15 +127,15 @@ jobs:
uses: ./../action/upload-sarif uses: ./../action/upload-sarif
id: upload-sarif id: upload-sarif
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results sarif_file: ${{ runner.temp }}/results
category: | category: |
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:all-files/ ${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:all-files/
- name: 'Fail for missing output from `upload-sarif` step for `code-scanning`' - name: Fail for missing output from `upload-sarif` step for `code-scanning`
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-scanning) if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-scanning)
run: exit 1 run: exit 1
- name: 'Fail for missing output from `upload-sarif` step for `code-quality`' - name: Fail for missing output from `upload-sarif` step for `code-quality`
if: contains(matrix.analysis-kinds, 'code-quality') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-quality) if: contains(matrix.analysis-kinds, 'code-quality') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-quality)
run: exit 1 run: exit 1
@@ -131,26 +144,28 @@ jobs:
id: upload-single-sarif-code-scanning id: upload-single-sarif-code-scanning
if: contains(matrix.analysis-kinds, 'code-scanning') if: contains(matrix.analysis-kinds, 'code-scanning')
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.sarif sarif_file: ${{ runner.temp }}/results/javascript.sarif
category: | category: |
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-scanning/ ${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-scanning/
- name: 'Fail for missing output from `upload-single-sarif-code-scanning` step' - name: Fail for missing output from `upload-single-sarif-code-scanning` step
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-single-sarif-code-scanning.outputs.sarif-ids).code-scanning) if: contains(matrix.analysis-kinds, 'code-scanning') &&
!(fromJSON(steps.upload-single-sarif-code-scanning.outputs.sarif-ids).code-scanning)
run: exit 1 run: exit 1
- name: Upload single SARIF file for Code Quality - name: Upload single SARIF file for Code Quality
uses: ./../action/upload-sarif uses: ./../action/upload-sarif
id: upload-single-sarif-code-quality id: upload-single-sarif-code-quality
if: contains(matrix.analysis-kinds, 'code-quality') if: contains(matrix.analysis-kinds, 'code-quality')
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.quality.sarif sarif_file: ${{ runner.temp }}/results/javascript.quality.sarif
category: | category: |
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-quality/ ${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:single-code-quality/
- name: 'Fail for missing output from `upload-single-sarif-code-quality` step' - name: Fail for missing output from `upload-single-sarif-code-quality` step
if: contains(matrix.analysis-kinds, 'code-quality') && !(fromJSON(steps.upload-single-sarif-code-quality.outputs.sarif-ids).code-quality) if: contains(matrix.analysis-kinds, 'code-quality') &&
!(fromJSON(steps.upload-single-sarif-code-quality.outputs.sarif-ids).code-quality)
run: exit 1 run: exit 1
- name: Change SARIF file extension - name: Change SARIF file extension
@@ -161,12 +176,12 @@ jobs:
id: upload-single-non-sarif id: upload-single-non-sarif
if: contains(matrix.analysis-kinds, 'code-scanning') if: contains(matrix.analysis-kinds, 'code-scanning')
with: with:
ref: 'refs/heads/main' ref: refs/heads/main
sha: '5e235361806c361d4d3f8859e3c897658025a9a2' sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.sarif.json sarif_file: ${{ runner.temp }}/results/javascript.sarif.json
category: | category: |
${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:non-sarif/ ${{ github.workflow }}:upload-sarif/analysis-kinds:${{ matrix.analysis-kinds }}/os:${{ matrix.os }}/version:${{ matrix.version }}/test:non-sarif/
- name: 'Fail for missing output from `upload-single-non-sarif` step' - name: Fail for missing output from `upload-single-non-sarif` step
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-single-non-sarif.outputs.sarif-ids).code-scanning) if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-single-non-sarif.outputs.sarif-ids).code-scanning)
run: exit 1 run: exit 1
env: env:
+39 -27
View File
@@ -18,41 +18,49 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types:
- checks_requested
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call: workflow_call:
inputs: inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
go-version: go-version:
type: string type: string
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults: defaults:
run: run:
shell: bash shell: bash
concurrency: concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: with-checkout-path-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} group:
with-checkout-path-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}}
jobs: jobs:
with-checkout-path: with-checkout-path:
strategy: strategy:
@@ -69,18 +77,8 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
# This ensures we don't accidentally use the original checkout for any part of the test.
- name: Check out repository - name: Check out repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -88,14 +86,28 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Delete original checkout - name: Delete original checkout
run: | run: |
# delete the original checkout so we don't accidentally use it. # delete the original checkout so we don't accidentally use it.
# Actions does not support deleting the current working directory, so we # Actions does not support deleting the current working directory, so we
# delete the contents of the directory instead. # delete the contents of the directory instead.
rm -rf ./* .github .git rm -rf ./* .github .git
# Check out the actions repo again, but at a different location. # Check out the actions repo again, but at a different location.
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main # choose an arbitrary SHA so that we can later test that the commit_oid is not from main
- uses: actions/checkout@v6 - uses: actions/checkout@v6
with: with:
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
@@ -104,7 +116,7 @@ jobs:
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
# it's enough to test one compiled language and one interpreted language # it's enough to test one compiled language and one interpreted language
languages: csharp,javascript languages: csharp,javascript
source-root: x/y/z/some-path/tests/multi-language-repo source-root: x/y/z/some-path/tests/multi-language-repo
@@ -9,10 +9,6 @@ on:
# by other workflows. # by other workflows.
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
shell: bash shell: bash
+21 -19
View File
@@ -7,8 +7,6 @@ on:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
merge_group:
types: [checks_requested]
schedule: schedule:
# Weekly on Sunday. # Weekly on Sunday.
- cron: '30 1 * * 0' - cron: '30 1 * * 0'
@@ -31,29 +29,34 @@ jobs:
permissions: permissions:
contents: read contents: read
# We currently need `security-events: read` to access feature flags.
security-events: read
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Set up default CodeQL bundle - name: Init with default CodeQL bundle from the VM image
id: setup-default id: init-default
uses: ./setup-codeql uses: ./init
- name: Set up linked CodeQL bundle with:
id: setup-linked languages: javascript
uses: ./setup-codeql - name: Remove empty database
# allows us to run init a second time
run: |
rm -rf "$RUNNER_TEMP/codeql_databases"
- name: Init with latest CodeQL bundle
id: init-latest
uses: ./init
with: with:
tools: linked tools: linked
- name: Compare default and linked CodeQL bundle versions languages: javascript
- name: Compare default and latest CodeQL bundle versions
id: compare id: compare
env: env:
CODEQL_DEFAULT: ${{ steps.setup-default.outputs.codeql-path }} CODEQL_DEFAULT: ${{ steps.init-default.outputs.codeql-path }}
CODEQL_LINKED: ${{ steps.setup-linked.outputs.codeql-path }} CODEQL_LATEST: ${{ steps.init-latest.outputs.codeql-path }}
run: | run: |
CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)" CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)"
CODEQL_VERSION_LINKED="$("$CODEQL_LINKED" version --format terse)" CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)"
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT" echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
echo "Linked CodeQL bundle version is $CODEQL_VERSION_LINKED" echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
# If we're running on a pull request, run with both bundles, even if `tools: linked` would # If we're running on a pull request, run with both bundles, even if `tools: linked` would
# be the same as `tools: null`. This allows us to make the job for each of the bundles a # be the same as `tools: null`. This allows us to make the job for each of the bundles a
@@ -61,7 +64,7 @@ jobs:
# #
# If we're running on push or schedule, then we can skip running with `tools: linked` when it would be # If we're running on push or schedule, then we can skip running with `tools: linked` when it would be
# the same as running with `tools: null`. # the same as running with `tools: null`.
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$GITHUB_EVENT_NAME" != "merge_group" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LINKED" ]]; then if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
VERSIONS_JSON='[null]' VERSIONS_JSON='[null]'
else else
VERSIONS_JSON='[null, "linked"]' VERSIONS_JSON='[null, "linked"]'
@@ -77,7 +80,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14-xlarge,macos-15-xlarge] os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14,macos-15]
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }} tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -105,7 +108,7 @@ jobs:
uses: ./analyze uses: ./analyze
with: with:
category: "/language:javascript" category: "/language:javascript"
upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && github.event_name != 'merge_group' && 'always' ) || 'never' }} upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }}
analyze-other: analyze-other:
if: github.triggering_actor != 'dependabot[bot]' if: github.triggering_actor != 'dependabot[bot]'
@@ -140,4 +143,3 @@ jobs:
uses: ./analyze uses: ./analyze
with: with:
category: "/language:${{ matrix.language }}" category: "/language:${{ matrix.language }}"
upload: ${{ (github.event_name != 'merge_group' && 'always') || 'never' }}
+27 -8
View File
@@ -6,6 +6,11 @@ env:
# Diff informed queries add an additional query filter which is not yet # Diff informed queries add an additional query filter which is not yet
# taken into account by these tests. # taken into account by these tests.
CODEQL_ACTION_DIFF_INFORMED_QUERIES: false CODEQL_ACTION_DIFF_INFORMED_QUERIES: false
# Specify overlay enablement manually to ensure stability around the exclude-from-incremental
# query filter. Here we only enable for the default code scanning suite.
CODEQL_ACTION_OVERLAY_ANALYSIS: true
CODEQL_ACTION_OVERLAY_ANALYSIS_JAVASCRIPT: false
CODEQL_ACTION_OVERLAY_ANALYSIS_CODE_SCANNING_JAVASCRIPT: true
on: on:
push: push:
@@ -18,15 +23,9 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types: [checks_requested]
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch: {}
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
@@ -76,13 +75,33 @@ jobs:
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- name: Empty file # On PRs, overlay analysis may change the config that is passed to the CLI.
# Therefore, we have two variants of the following test, one for PRs and one for other events.
- name: Empty file (non-PR)
if: github.event_name != 'pull_request'
uses: ./../action/.github/actions/check-codescanning-config uses: ./../action/.github/actions/check-codescanning-config
with: with:
expected-config-file-contents: "{}" expected-config-file-contents: "{}"
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Empty file (PR)
if: github.event_name == 'pull_request'
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"query-filters": [
{
"exclude": {
"tags": "exclude-from-incremental"
}
}
]
}
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Packs from input - name: Packs from input
if: success() || failure() if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config uses: ./../action/.github/actions/check-codescanning-config
@@ -14,15 +14,9 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types: [checks_requested]
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch: {}
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
@@ -45,8 +39,6 @@ jobs:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
permissions: permissions:
contents: read contents: read
# We currently need `security-events: read` to access feature flags.
security-events: read
timeout-minutes: 45 timeout-minutes: 45
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -70,7 +62,6 @@ jobs:
uses: ./../action/.github/actions/verify-debug-artifact-scan-completed uses: ./../action/.github/actions/verify-debug-artifact-scan-completed
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: cpp,csharp,go,java,javascript,python
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
debug: true debug: true
debug-artifact-name: my-debug-artifacts debug-artifact-name: my-debug-artifacts
@@ -94,7 +85,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v8 uses: actions/download-artifact@v7
- name: Check expected artifacts exist - name: Check expected artifacts exist
run: | run: |
LANGUAGES="cpp csharp go java javascript python" LANGUAGES="cpp csharp go java javascript python"
+2 -10
View File
@@ -13,15 +13,9 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types: [checks_requested]
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch: {}
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
@@ -44,8 +38,6 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
permissions: permissions:
contents: read contents: read
# We currently need `security-events: read` to access feature flags.
security-events: read
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository
@@ -87,7 +79,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v8 uses: actions/download-artifact@v7
- name: Check expected artifacts exist - name: Check expected artifacts exist
run: | run: |
VERSIONS="stable-v2.20.3 default linked nightly-latest" VERSIONS="stable-v2.20.3 default linked nightly-latest"
-106
View File
@@ -1,106 +0,0 @@
# Workflow runs on main, on a release branch, and that were triggered as part of a merge group have
# already passed CI before being merged. Therefore if they fail, we should make sure that there
# wasn't a transient failure by rerunning the failed jobs once before investigating further.
name: Deflake
on:
workflow_run:
types: [completed]
# Exclude workflows that have significant side effects, like publishing releases. It's OK to
# retry CodeQL analysis.
workflows:
- Check Expected Release Files
- Code-Scanning config CLI tests
- CodeQL action
- Manual Check - go
- "PR Check - All-platform bundle"
- "PR Check - Analysis kinds"
- "PR Check - Analyze: 'ref' and 'sha' from inputs"
- "PR Check - autobuild-action"
- "PR Check - Autobuild direct tracing (custom working directory)"
- "PR Check - Autobuild working directory"
- "PR Check - Build mode autobuild"
- "PR Check - Build mode manual"
- "PR Check - Build mode none"
- "PR Check - Build mode rollback"
- "PR Check - Bundle: Caching checks"
- "PR Check - Bundle: From nightly"
- "PR Check - Bundle: From toolcache"
- "PR Check - Bundle: Zstandard checks"
- "PR Check - C/C\\+\\+: autoinstalling dependencies (Linux)"
- "PR Check - C/C\\+\\+: autoinstalling dependencies is skipped (macOS)"
- "PR Check - C/C\\+\\+: disabling autoinstalling dependencies (Linux)"
- "PR Check - Clean up database cluster directory"
- "PR Check - CodeQL Bundle All"
- "PR Check - Config export"
- "PR Check - Config input"
- "PR Check - Custom source root"
- "PR Check - Debug artifact upload"
- "PR Check - Debug artifacts after failure"
- "PR Check - Diagnostic export"
- "PR Check - Export file baseline information"
- "PR Check - Extractor ram and threads options test"
- "PR Check - Go: Custom queries"
- "PR Check - Go: diagnostic when Go is changed after init step"
- "PR Check - Go: diagnostic when `file` is not installed"
- "PR Check - Go: tracing with autobuilder step"
- "PR Check - Go: tracing with custom build steps"
- "PR Check - Go: tracing with legacy workflow"
- "PR Check - Go: workaround for indirect tracing"
- "PR Check - Job run UUID added to SARIF"
- "PR Check - Language aliases"
- "PR Check - Local CodeQL bundle"
- "PR Check - Multi-language repository"
- "PR Check - Overlay database init fallback"
- "PR Check - Packaging: Action input"
- "PR Check - Packaging: Config and input"
- "PR Check - Packaging: Config and input passed to the CLI"
- "PR Check - Packaging: Config file"
- "PR Check - Packaging: Download using registries"
- "PR Check - Proxy test"
- "PR Check - Remote config file"
- "PR Check - Resolve environment"
- "PR Check - RuboCop multi-language"
- "PR Check - Ruby analysis"
- "PR Check - Rust analysis"
- "PR Check - Split workflow"
- "PR Check - Start proxy"
- "PR Check - Submit SARIF after failure"
- "PR Check - Swift analysis using a custom build command"
- "PR Check - Swift analysis using autobuild"
- "PR Check - Test different uses of `upload-sarif`"
- "PR Check - Test unsetting environment variables"
- "PR Check - Upload-sarif: ref and sha from inputs"
- "PR Check - Use a custom `checkout_path`"
- PR Checks
- Query filters tests
- Test that the workaround for python 3.12 on windows works
jobs:
rerun-on-failure:
name: Rerun failed jobs
if: >-
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.run_attempt == 1 &&
(
github.event.workflow_run.head_branch == 'main' ||
startsWith(github.event.workflow_run.head_branch, 'releases/') ||
github.event.workflow_run.event == 'merge_group'
)
runs-on: ubuntu-slim
permissions:
actions: write
steps:
- name: Rerun failed jobs in ${{ github.event.workflow_run.name }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RUN_ID: ${{ github.event.workflow_run.id }}
RUN_NAME: ${{ github.event.workflow_run.name }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
run: |
echo "Rerunning failed jobs for workflow run ${RUN_ID}"
gh run rerun "${RUN_ID}" --failed
echo "### Reran failed jobs :recycle:" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Workflow: [${RUN_NAME}](${RUN_URL})" >> "$GITHUB_STEP_SUMMARY"
-1
View File
@@ -17,7 +17,6 @@ jobs:
sizeup: sizeup:
name: Label PR with size name: Label PR with size
runs-on: ubuntu-slim runs-on: ubuntu-slim
if: github.event.pull_request.merged != true
steps: steps:
- name: Run sizeup - name: Run sizeup
+2 -5
View File
@@ -24,7 +24,7 @@ defaults:
jobs: jobs:
merge-back: merge-back:
runs-on: ubuntu-latest runs-on: ubuntu-slim
environment: Automation environment: Automation
if: github.repository == 'github/codeql-action' if: github.repository == 'github/codeql-action'
env: env:
@@ -48,9 +48,6 @@ jobs:
with: 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@v6 - uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- uses: actions/setup-python@v6 - uses: actions/setup-python@v6
with: with:
python-version: '3.12' python-version: '3.12'
@@ -134,7 +131,7 @@ jobs:
echo "::endgroup::" echo "::endgroup::"
- name: Generate token - name: Generate token
uses: actions/create-github-app-token@v3.2.0 uses: actions/create-github-app-token@v2.2.1
id: app-token id: app-token
with: with:
app-id: ${{ vars.AUTOMATION_APP_ID }} app-id: ${{ vars.AUTOMATION_APP_ID }}
+30 -139
View File
@@ -6,14 +6,8 @@ on:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
merge_group:
types: [checks_requested]
workflow_dispatch: workflow_dispatch:
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
shell: bash shell: bash
@@ -33,10 +27,6 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 45 timeout-minutes: 45
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: pr-checks-unit-tests-${{ github.ref }}-${{ github.event_name }}-${{ matrix.os }}-node${{ matrix['node-version'] }}
steps: steps:
- name: Prepare git (Windows) - name: Prepare git (Windows)
if: runner.os == 'Windows' if: runner.os == 'Windows'
@@ -50,6 +40,11 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Install dependencies - name: Install dependencies
run: | run: |
# Use the system Bash shell to ensure we can run commands like `npm ci` # Use the system Bash shell to ensure we can run commands like `npm ci`
@@ -60,10 +55,19 @@ jobs:
- name: Verify compiled JS up to date - name: Verify compiled JS up to date
run: .github/workflows/script/check-js.sh run: .github/workflows/script/check-js.sh
- name: Verify PR checks up to date
if: always()
run: .github/workflows/script/verify-pr-checks.sh
- name: Run unit tests - name: Run unit tests
if: always() if: always()
run: npm test run: npm test
- name: Run pr-checks tests
if: always()
working-directory: pr-checks
run: python -m unittest discover
- name: Lint - name: Lint
if: always() && matrix.os != 'windows-latest' if: always() && matrix.os != 'windows-latest'
run: npm run lint-ci run: npm run lint-ci
@@ -75,47 +79,23 @@ jobs:
sarif_file: eslint.sarif sarif_file: eslint.sarif
category: eslint category: eslint
# These checks do not need to be run as part of the same matrix that we use for the `unit-tests` check-node-version:
# job. if: github.event.pull_request && github.triggering_actor != 'dependabot[bot]'
other-checks: name: Check Action Node versions
name: Other checks runs-on: ubuntu-latest
if: github.triggering_actor != 'dependabot[bot]' timeout-minutes: 45
env:
BASE_REF: ${{ github.base_ref }}
permissions: permissions:
contents: read contents: read
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: pr-checks-pr-checks-${{ github.ref }}-${{ github.event_name }}
steps: steps:
- name: Checkout repository - uses: actions/checkout@v6
uses: actions/checkout@v6 - id: head-version
name: Verify all Actions use the same Node version
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- name: Install dependencies
id: install-deps
run: npm ci
- name: Verify PR checks up to date
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
run: .github/workflows/script/verify-pr-checks.sh
- name: Run pr-checks tests
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
working-directory: pr-checks
run: npx tsx --test
- name: Verify all Actions use the same Node version
id: head-version
run: | run: |
NODE_VERSION=$(find . -path "*/node_modules" -prune -o -name "action.yml" -exec yq -o=json '.runs.using' {} \; | jq -rs '[.[] | select(. != null and startswith("node"))] | unique | .[]') NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "NODE_VERSION: ${NODE_VERSION}" echo "NODE_VERSION: ${NODE_VERSION}"
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
echo "::error::More than one node version used in 'action.yml' files." echo "::error::More than one node version used in 'action.yml' files."
@@ -123,111 +103,22 @@ jobs:
fi fi
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
- name: Fetch base commit - id: checkout-base
id: fetch-base name: 'Backport: Check out base ref'
# Forks and Dependabot PRs don't have permission to write comments, so skip the repo size
# check in those cases.
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Compare against the merge base so the size delta reflects only the commits actually
# added by this PR, ignoring any changes that have landed on the base branch since the
# PR branched off.
merge_base=$(gh api "repos/$GITHUB_REPOSITORY/compare/$BASE_SHA...$HEAD_SHA" --jq '.merge_base_commit.sha')
echo "merge_base=$merge_base" >> "$GITHUB_OUTPUT"
git fetch --no-tags --depth=1 origin "$merge_base" "$HEAD_SHA"
- name: Check repo size
if: steps.fetch-base.outcome == 'success'
working-directory: pr-checks
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
BASE_SHA: ${{ steps.fetch-base.outputs.merge_base }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: npx tsx check-repo-size.ts --output-dir "$RUNNER_TEMP/repo-size"
- name: Upload repo size comment
if: steps.fetch-base.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: repo-size-comment
path: ${{ runner.temp }}/repo-size/
if-no-files-found: error
- name: 'Backport: Check out base ref'
id: checkout-base
if: ${{ startsWith(github.head_ref, 'backport-') }} if: ${{ startsWith(github.head_ref, 'backport-') }}
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
ref: ${{ github.base_ref }} ref: ${{ env.BASE_REF }}
- name: 'Backport: Verify Node versions unchanged' - name: 'Backport: Verify Node versions unchanged'
if: steps.checkout-base.outcome == 'success' if: steps.checkout-base.outcome == 'success'
env: env:
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }} HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
run: | run: |
BASE_VERSION=$(find . -path "*/node_modules" -prune -o -name "action.yml" -exec yq -o=json '.runs.using' {} \; | jq -rs '[.[] | select(. != null and startswith("node"))] | unique | .[]') BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "HEAD_VERSION: ${HEAD_VERSION}" echo "HEAD_VERSION: ${HEAD_VERSION}"
echo "BASE_VERSION: ${BASE_VERSION}" echo "BASE_VERSION: ${BASE_VERSION}"
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
echo "::error::Cannot change the Node version of an Action in a backport PR." echo "::error::Cannot change the Node version of an Action in a backport PR."
exit 1 exit 1
fi fi
post-repo-size-comment:
name: Post repo size comment
needs: other-checks
# Keep write permissions isolated from the job that checks out and tests PR code. This job only
# posts the candidate comment body produced by the read-only `pr-checks` job.
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]' &&
needs.other-checks.result == 'success'
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-slim
timeout-minutes: 10
concurrency:
cancel-in-progress: true
group: check-repo-size-${{ github.event.pull_request.number }}
steps:
- name: Download repo size comment
uses: actions/download-artifact@v8
with:
name: repo-size-comment
path: repo-size-comment
- name: Post repo size comment
env:
COMMENT_MARKER: "<!-- repo-size-diff-bot -->"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
significant=$(jq -r '.significant' repo-size-comment/metadata.json)
comment_id=$(
gh api "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \
--paginate \
--jq ".[] | select(.body | contains(\"$COMMENT_MARKER\")) | .id" \
| head -n 1
)
if [[ -n "$comment_id" ]]; then
echo "Updating existing comment $comment_id."
gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body=@repo-size-comment/body.md
elif [[ "$significant" == "true" ]]; then
echo "Creating new repo size comment."
gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body=@repo-size-comment/body.md
else
echo "Skipping repo size comment because the delta is below the threshold and no sticky comment exists."
fi
+1 -1
View File
@@ -29,7 +29,7 @@ defaults:
jobs: jobs:
prepare: prepare:
name: "Prepare release" name: "Prepare release"
runs-on: ubuntu-latest runs-on: ubuntu-slim
if: github.repository == 'github/codeql-action' if: github.repository == 'github/codeql-action'
permissions: permissions:
-8
View File
@@ -7,17 +7,11 @@ on:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
merge_group:
types: [checks_requested]
schedule: schedule:
# Weekly on Monday. # Weekly on Monday.
- cron: '0 0 * * 1' - cron: '0 0 * * 1'
workflow_dispatch: workflow_dispatch:
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
shell: bash shell: bash
@@ -30,8 +24,6 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
permissions: permissions:
contents: read contents: read
# We currently need `security-events: read` to access feature flags.
security-events: read
runs-on: windows-latest runs-on: windows-latest
steps: steps:
+1 -7
View File
@@ -11,15 +11,9 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types: [checks_requested]
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch: {}
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
+12 -20
View File
@@ -29,12 +29,6 @@ jobs:
fetch-depth: 0 fetch-depth: 0
ref: ${{ env.HEAD_REF }} ref: ${{ env.HEAD_REF }}
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- name: Remove label - name: Remove label
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
env: env:
@@ -55,18 +49,9 @@ jobs:
git fetch origin "$BASE_BRANCH" git fetch origin "$BASE_BRANCH"
# Allow merge conflicts in `lib`, since rebuilding should resolve them. # Allow merge conflicts in `lib`, since rebuilding should resolve them.
git merge "origin/$BASE_BRANCH" git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected, continuing."
MERGE_RESULT=$? MERGE_RESULT=$?
if [ "$MERGE_RESULT" -eq 0 ]; then
echo "Merge succeeded cleanly."
elif [ "$MERGE_RESULT" -eq 1 ]; then
echo "Merge conflicts detected (exit code $MERGE_RESULT), continuing."
else
echo "git merge failed with unexpected exit code $MERGE_RESULT."
exit 1
fi
if [ "$MERGE_RESULT" -ne 0 ]; then if [ "$MERGE_RESULT" -ne 0 ]; then
echo "merge-in-progress=true" >> $GITHUB_OUTPUT echo "merge-in-progress=true" >> $GITHUB_OUTPUT
@@ -88,17 +73,24 @@ jobs:
npm run lint -- --fix npm run lint -- --fix
npm run build npm run build
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Sync back version updates to generated workflows - name: Sync back version updates to generated workflows
# Only sync back versions on Dependabot update PRs # Only sync back versions on Dependabot update PRs
if: startsWith(env.HEAD_REF, 'dependabot/') if: startsWith(env.HEAD_REF, 'dependabot/')
working-directory: pr-checks working-directory: pr-checks
run: | run: |
npm ci python3 sync_back.py -v
npx tsx sync-back.ts --verbose
- name: Generate workflows - name: Generate workflows
working-directory: pr-checks working-directory: pr-checks
run: ./sync.sh run: |
python -m pip install --upgrade pip
pip install ruamel.yaml==0.17.31
python3 sync.py
- name: "Merge in progress: Finish merge and push" - name: "Merge in progress: Finish merge and push"
if: steps.merge.outputs.merge-in-progress == 'true' if: steps.merge.outputs.merge-in-progress == 'true'
@@ -119,7 +111,7 @@ jobs:
# Otherwise, just commit the changes. # Otherwise, just commit the changes.
if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then
echo "In progress merge detected, finishing it up." echo "In progress merge detected, finishing it up."
git commit --no-edit git merge --continue
else else
echo "No in-progress merge detected, committing changes." echo "No in-progress merge detected, committing changes."
git commit -m "Rebuild" git commit -m "Rebuild"
+1 -1
View File
@@ -136,7 +136,7 @@ jobs:
- name: Generate token - name: Generate token
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
uses: actions/create-github-app-token@v3.2.0 uses: actions/create-github-app-token@v2.2.1
id: app-token id: app-token
with: with:
app-id: ${{ vars.AUTOMATION_APP_ID }} app-id: ${{ vars.AUTOMATION_APP_ID }}
+64
View File
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
# Update the required checks based on the current branch.
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
REPO_DIR="$(dirname "$SCRIPT_DIR")"
GRANDPARENT_DIR="$(dirname "$REPO_DIR")"
source "$GRANDPARENT_DIR/releases.ini"
if ! gh auth status 2>/dev/null; then
gh auth status
echo "Failed: Not authorized. This script requires admin access to github/codeql-action through the gh CLI."
exit 1
fi
if [ "$#" -eq 1 ]; then
# If we were passed an argument, use that as the SHA
GITHUB_SHA="$1"
elif [ "$#" -gt 1 ]; then
echo "Usage: $0 [SHA]"
echo "Update the required checks based on the SHA, or main."
exit 1
elif [ -z "$GITHUB_SHA" ]; then
# If we don't have a SHA, use main
GITHUB_SHA="$(git rev-parse main)"
fi
echo "Getting checks for $GITHUB_SHA"
# Ignore any checks with "https://", CodeQL, LGTM, Update, and ESLint checks.
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("ESLint") or contains("update") or contains("test-setup-python-scripts") or . == "Agent" or . == "Cleanup artifacts" or . == "Prepare" or . == "Upload results" | not)] | unique | sort')"
echo "$CHECKS" | jq
# Fail if there are no checks
if [ -z "$CHECKS" ] || [ "$(echo "$CHECKS" | jq '. | length')" -eq 0 ]; then
echo "No checks found for $GITHUB_SHA"
exit 1
fi
echo "{\"contexts\": ${CHECKS}}" > checks.json
echo "Updating main"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/main/protection/required_status_checks" --input checks.json
# list all branchs on origin remote matching releases/v*
BRANCHES="$(git ls-remote --heads origin 'releases/v*' | sed 's?.*refs/heads/??' | sort -V)"
for BRANCH in $BRANCHES; do
# strip exact 'releases/v' prefix from $BRANCH using count of characters
VERSION="${BRANCH:10}"
if [ "$VERSION" -lt "$OLDEST_SUPPORTED_MAJOR_VERSION" ]; then
echo "Skipping $BRANCH"
continue
fi
echo "Updating $BRANCH"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json
done
rm checks.json
+1 -1
View File
@@ -19,7 +19,7 @@ if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention # If we get a fail here then the PR needs attention
git diff git diff
git status git status
>&2 echo "Failed: PR checks are not up to date. Run 'cd pr-checks && ./sync.sh' to update" >&2 echo "Failed: PR checks are not up to date. Run 'cd pr-checks && python3 sync.py' to update"
echo "### Generated workflows diff" >> $GITHUB_STEP_SUMMARY echo "### Generated workflows diff" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
+1 -8
View File
@@ -13,16 +13,9 @@ on:
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
merge_group:
types: [checks_requested]
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: workflow_dispatch: {}
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: ${{ github.workflow }}-${{ github.ref }}
defaults: defaults:
run: run:
shell: bash shell: bash
+1 -12
View File
@@ -20,7 +20,7 @@ defaults:
jobs: jobs:
update-bundle: update-bundle:
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-') if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
runs-on: ubuntu-latest runs-on: ubuntu-slim
permissions: permissions:
contents: write # needed to push commits contents: write # needed to push commits
pull-requests: write # needed to create pull requests pull-requests: write # needed to create pull requests
@@ -57,17 +57,6 @@ jobs:
- name: Update bundle - name: Update bundle
uses: ./.github/actions/update-bundle uses: ./.github/actions/update-bundle
- name: Set up CodeQL CLI from new bundle
id: setup-codeql
uses: ./setup-codeql
with:
tools: https://github.com/github/codeql-action/releases/download/${{ github.event.release.tag_name }}/codeql-bundle-linux64.tar.gz
- name: Update built-in languages
run: npx tsx pr-checks/update-builtin-languages.ts "$CODEQL_PATH"
env:
CODEQL_PATH: ${{ steps.setup-codeql.outputs.codeql-path }}
- name: Bump Action minor version if new CodeQL minor version series - name: Bump Action minor version if new CodeQL minor version series
id: bump-action-version id: bump-action-version
run: | run: |
+5 -7
View File
@@ -26,7 +26,7 @@ jobs:
update: update:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ubuntu-latest runs-on: ubuntu-slim
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
needs: [prepare] needs: [prepare]
env: env:
@@ -64,12 +64,11 @@ jobs:
- name: Update current release branch - name: Update current release branch
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
echo SOURCE_BRANCH=${REF_NAME} echo SOURCE_BRANCH=${REF_NAME}
echo TARGET_BRANCH=releases/${MAJOR_VERSION} echo TARGET_BRANCH=releases/${MAJOR_VERSION}
python .github/update-release-branch.py \ python .github/update-release-branch.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--repository-nwo ${{ github.repository }} \ --repository-nwo ${{ github.repository }} \
--source-branch '${{ env.REF_NAME }}' \ --source-branch '${{ env.REF_NAME }}' \
--target-branch 'releases/${{ env.MAJOR_VERSION }}' \ --target-branch 'releases/${{ env.MAJOR_VERSION }}' \
@@ -78,7 +77,7 @@ jobs:
backport: backport:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ubuntu-latest runs-on: ubuntu-slim
environment: Automation environment: Automation
needs: [prepare] needs: [prepare]
if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' }} if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' }}
@@ -94,7 +93,7 @@ jobs:
pull-requests: write # needed to create pull request pull-requests: write # needed to create pull request
steps: steps:
- name: Generate token - name: Generate token
uses: actions/create-github-app-token@v3.2.0 uses: actions/create-github-app-token@v2.2.1
id: app-token id: app-token
with: with:
app-id: ${{ vars.AUTOMATION_APP_ID }} app-id: ${{ vars.AUTOMATION_APP_ID }}
@@ -108,12 +107,11 @@ jobs:
- uses: ./.github/actions/release-initialise - uses: ./.github/actions/release-initialise
- name: Update older release branch - name: Update older release branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
echo SOURCE_BRANCH=${SOURCE_BRANCH} echo SOURCE_BRANCH=${SOURCE_BRANCH}
echo TARGET_BRANCH=${TARGET_BRANCH} echo TARGET_BRANCH=${TARGET_BRANCH}
python .github/update-release-branch.py \ python .github/update-release-branch.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--repository-nwo ${{ github.repository }} \ --repository-nwo ${{ github.repository }} \
--source-branch ${SOURCE_BRANCH} \ --source-branch ${SOURCE_BRANCH} \
--target-branch ${TARGET_BRANCH} \ --target-branch ${TARGET_BRANCH} \
-2
View File
@@ -11,5 +11,3 @@ build/
eslint.sarif eslint.sarif
# for local incremental compilation # for local incremental compilation
tsconfig.tsbuildinfo tsconfig.tsbuildinfo
# esbuild metadata file
meta.json
-30
View File
@@ -1,30 +0,0 @@
{
// Place your codeql-action workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Test Macro": {
"scope": "javascript, typescript",
"prefix": "testMacro",
"body": [
"const ${1:nameMacro} = makeMacro({",
" exec: async (t: ExecutionContext<unknown>) => {},",
"",
" title: (providedTitle = \"\") => `${2:common title} - \\${providedTitle}`,",
"});",
],
"description": "An Ava test macro",
},
}
-101
View File
@@ -6,107 +6,6 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
No user facing changes. No user facing changes.
## 4.36.0 - 22 May 2026
- _Breaking change_: Bump the minimum required CodeQL bundle version to 2.19.4. [#3894](https://github.com/github/codeql-action/pull/3894)
- Add support for SHA-256 Git object IDs. [#3893](https://github.com/github/codeql-action/pull/3893)
- Update default CodeQL bundle version to [2.25.5](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.5). [#3926](https://github.com/github/codeql-action/pull/3926)
## 4.35.5 - 15 May 2026
- 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)
- 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)
- 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)
- 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)
## 4.35.4 - 07 May 2026
- Update default CodeQL bundle version to [2.25.4](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.4). [#3881](https://github.com/github/codeql-action/pull/3881)
## 4.35.3 - 01 May 2026
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.19.3 and earlier. These versions of CodeQL were discontinued on 9 April 2026 alongside GitHub Enterprise Server 3.15, and will be unsupported by the next minor release of the CodeQL Action. [#3837](https://github.com/github/codeql-action/pull/3837)
- Configurations for private registries that use Cloudsmith or GCP OIDC are now accepted. [#3850](https://github.com/github/codeql-action/pull/3850)
- Best-effort connection tests for private registries now use `GET` requests instead of `HEAD` for better compatibility with various registry implementations. For NuGet feeds, the test is now always performed against the service index. [#3853](https://github.com/github/codeql-action/pull/3853)
- Fixed a bug where two diagnostics produced within the same millisecond could overwrite each other on disk, causing one of them to be lost. [#3852](https://github.com/github/codeql-action/pull/3852)
- Update default CodeQL bundle version to [2.25.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.3). [#3865](https://github.com/github/codeql-action/pull/3865)
## 4.35.2 - 15 Apr 2026
- The undocumented TRAP cache cleanup feature that could be enabled using the `CODEQL_ACTION_CLEANUP_TRAP_CACHES` environment variable is deprecated and will be removed in May 2026. If you are affected by this, we recommend disabling TRAP caching by passing the `trap-caching: false` input to the `init` Action. [#3795](https://github.com/github/codeql-action/pull/3795)
- The Git version 2.36.0 requirement for improved incremental analysis now only applies to repositories that contain submodules. [#3789](https://github.com/github/codeql-action/pull/3789)
- Python analysis on GHES no longer extracts the standard library, relying instead on models of the standard library. This should result in significantly faster extraction and analysis times, while the effect on alerts should be minimal. [#3794](https://github.com/github/codeql-action/pull/3794)
- Fixed a bug in the validation of OIDC configurations for private registries that was added in CodeQL Action 4.33.0 / 3.33.0. [#3807](https://github.com/github/codeql-action/pull/3807)
- Update default CodeQL bundle version to [2.25.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.2). [#3823](https://github.com/github/codeql-action/pull/3823)
## 4.35.1 - 27 Mar 2026
- Fix incorrect minimum required Git version for [improved incremental analysis](https://github.com/github/roadmap/issues/1158): it should have been 2.36.0, not 2.11.0. [#3781](https://github.com/github/codeql-action/pull/3781)
## 4.35.0 - 27 Mar 2026
- Reduced the minimum Git version required for [improved incremental analysis](https://github.com/github/roadmap/issues/1158) from 2.38.0 to 2.11.0. [#3767](https://github.com/github/codeql-action/pull/3767)
- Update default CodeQL bundle version to [2.25.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.1). [#3773](https://github.com/github/codeql-action/pull/3773)
## 4.34.1 - 20 Mar 2026
- Downgrade default CodeQL bundle version to [2.24.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3) due to issues with a small percentage of Actions and JavaScript analyses. [#3762](https://github.com/github/codeql-action/pull/3762)
## 4.34.0 - 20 Mar 2026
- Added an experimental change which disables TRAP caching when [improved incremental analysis](https://github.com/github/roadmap/issues/1158) is enabled, since improved incremental analysis supersedes TRAP caching. This will improve performance and reduce Actions cache usage. We expect to roll this change out to everyone in March. [#3569](https://github.com/github/codeql-action/pull/3569)
- We are rolling out improved incremental analysis to C/C++ analyses that use build mode `none`. We expect this rollout to be complete by the end of April 2026. [#3584](https://github.com/github/codeql-action/pull/3584)
- Update default CodeQL bundle version to [2.25.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.0). [#3585](https://github.com/github/codeql-action/pull/3585)
## 4.33.0 - 16 Mar 2026
- Upcoming change: Starting April 2026, the CodeQL Action will skip collecting file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses. Pull request analyses will log a warning about this upcoming change. [#3562](https://github.com/github/codeql-action/pull/3562)
To opt out of this change:
- **Repositories owned by an organization:** Create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository's settings. For more information, see [Managing custom properties for repositories in your organization](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). Alternatively, if you are using an advanced setup workflow, you can set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
- **User-owned repositories using default setup:** Switch to an advanced setup workflow and set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
- **User-owned repositories using advanced setup:** Set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
- Fixed [a bug](https://github.com/github/codeql-action/issues/3555) which caused the CodeQL Action to fail loading repository properties if a "Multi select" repository property was configured for the repository. [#3557](https://github.com/github/codeql-action/pull/3557)
- The CodeQL Action now loads [custom repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) on GitHub Enterprise Server, enabling the customization of features such as `github-codeql-disable-overlay` that was previously only available on GitHub.com. [#3559](https://github.com/github/codeql-action/pull/3559)
- Once [private package registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) can be configured with OIDC-based authentication for organizations, the CodeQL Action will now be able to accept such configurations. [#3563](https://github.com/github/codeql-action/pull/3563)
- Fixed the retry mechanism for database uploads. Previously this would fail with the error "Response body object should not be disturbed or locked". [#3564](https://github.com/github/codeql-action/pull/3564)
- A warning is now emitted if the CodeQL Action detects a repository property whose name suggests that it relates to the CodeQL Action, but which is not one of the properties recognised by the current version of the CodeQL Action. [#3570](https://github.com/github/codeql-action/pull/3570)
## 4.32.6 - 05 Mar 2026
- Update default CodeQL bundle version to [2.24.3](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3). [#3548](https://github.com/github/codeql-action/pull/3548)
## 4.32.5 - 02 Mar 2026
- Repositories owned by an organization can now set up the `github-codeql-disable-overlay` custom repository property to disable [improved incremental analysis for CodeQL](https://github.com/github/roadmap/issues/1158). First, create a custom repository property with the name `github-codeql-disable-overlay` and the type "True/false" in the organization's settings. Then in the repository's settings, set this property to `true` to disable improved incremental analysis. For more information, see [Managing custom properties for repositories in your organization](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization). This feature is not yet available on GitHub Enterprise Server. [#3507](https://github.com/github/codeql-action/pull/3507)
- Added an experimental change so that when [improved incremental analysis](https://github.com/github/roadmap/issues/1158) fails on a runner — potentially due to insufficient disk space — the failure is recorded in the Actions cache so that subsequent runs will automatically skip improved incremental analysis until something changes (e.g. a larger runner is provisioned or a new CodeQL version is released). We expect to roll this change out to everyone in March. [#3487](https://github.com/github/codeql-action/pull/3487)
- The minimum memory check for improved incremental analysis is now skipped for CodeQL 2.24.3 and later, which has reduced peak RAM usage. [#3515](https://github.com/github/codeql-action/pull/3515)
- Reduced log levels for best-effort private package registry connection check failures to reduce noise from workflow annotations. [#3516](https://github.com/github/codeql-action/pull/3516)
- Added an experimental change which lowers the minimum disk space requirement for [improved incremental analysis](https://github.com/github/roadmap/issues/1158), enabling it to run on standard GitHub Actions runners. We expect to roll this change out to everyone in March. [#3498](https://github.com/github/codeql-action/pull/3498)
- Added an experimental change which allows the `start-proxy` action to resolve the CodeQL CLI version from feature flags instead of using the linked CLI bundle version. We expect to roll this change out to everyone in March. [#3512](https://github.com/github/codeql-action/pull/3512)
- The previously experimental changes from versions 4.32.3, 4.32.4, 3.32.3 and 3.32.4 are now enabled by default. [#3503](https://github.com/github/codeql-action/pull/3503), [#3504](https://github.com/github/codeql-action/pull/3504)
## 4.32.4 - 20 Feb 2026
- Update default CodeQL bundle version to [2.24.2](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.2). [#3493](https://github.com/github/codeql-action/pull/3493)
- Added an experimental change which improves how certificates are generated for the authentication proxy that is used by the CodeQL Action in Default Setup when [private package registries are configured](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries). This is expected to generate more widely compatible certificates and should have no impact on analyses which are working correctly already. We expect to roll this change out to everyone in February. [#3473](https://github.com/github/codeql-action/pull/3473)
- When the CodeQL Action is run [with debugging enabled in Default Setup](https://docs.github.com/en/code-security/how-tos/scan-code-for-vulnerabilities/troubleshooting/troubleshooting-analysis-errors/logs-not-detailed-enough#creating-codeql-debugging-artifacts-for-codeql-default-setup) and [private package registries are configured](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries), the "Setup proxy for registries" step will output additional diagnostic information that can be used for troubleshooting. [#3486](https://github.com/github/codeql-action/pull/3486)
- Added a setting which allows the CodeQL Action to enable network debugging for Java programs. This will help GitHub staff support customers with troubleshooting issues in GitHub-managed CodeQL workflows, such as Default Setup. This setting can only be enabled by GitHub staff. [#3485](https://github.com/github/codeql-action/pull/3485)
- Added a setting which enables GitHub-managed workflows, such as Default Setup, to use a [nightly CodeQL CLI release](https://github.com/dsp-testing/codeql-cli-nightlies) instead of the latest, stable release that is used by default. This will help GitHub staff support customers whose analyses for a given repository or organization require early access to a change in an upcoming CodeQL CLI release. This setting can only be enabled by GitHub staff. [#3484](https://github.com/github/codeql-action/pull/3484)
## 4.32.3 - 13 Feb 2026
- Added experimental support for testing connections to [private package registries](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries). This feature is not currently enabled for any analysis. In the future, it may be enabled by default for Default Setup. [#3466](https://github.com/github/codeql-action/pull/3466)
## 4.32.2 - 05 Feb 2026
- Update default CodeQL bundle version to [2.24.1](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.1). [#3460](https://github.com/github/codeql-action/pull/3460)
## 4.32.1 - 02 Feb 2026
- A warning is now shown in Default Setup workflow logs if a [private package registry is configured](https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries) using a GitHub Personal Access Token (PAT), but no username is configured. [#3422](https://github.com/github/codeql-action/pull/3422)
- Fixed a bug which caused the CodeQL Action to fail when repository properties cannot successfully be retrieved. [#3421](https://github.com/github/codeql-action/pull/3421)
## 4.32.0 - 26 Jan 2026 ## 4.32.0 - 26 Jan 2026
- Update default CodeQL bundle version to [2.24.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.0). [#3425](https://github.com/github/codeql-action/pull/3425) - Update default CodeQL bundle version to [2.24.0](https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.0). [#3425](https://github.com/github/codeql-action/pull/3425)
+6 -8
View File
@@ -69,14 +69,12 @@ Once the mergeback and backport pull request have been merged, the release is co
## Keeping the PR checks up to date (admin access required) ## Keeping the PR checks up to date (admin access required)
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: 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 [update-required-checks.sh](.github/workflows/script/update-required-checks.sh) script:
- 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. - If you run the script without an argument, it will retrieve the set of workflows that ran for the latest commit on `main`. Make sure that your local `main` branch is up to date before running the script.
- 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. - You can specify a commit SHA as argument to retrieve the set of workflows for that commit instead. You will likely want to use this if you have a PR that removes or adds PR checks.
- If you run the script without any other arguments, it will retrieve the set of workflows that ran for the latest commit on `main`.
- 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.
After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v4`, and any other currently supported major versions have been updated. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v3`, and any other currently supported major versions have been updated.
Note that any updates to checks on `main` need to be backported to all currently supported major version branches, in order to maintain the same set of names for required checks. Note that any updates to checks on `main` need to be backported to all currently supported major version branches, in order to maintain the same set of names for required checks.
@@ -94,7 +92,7 @@ We typically deprecate a version of CodeQL when the GitHub Enterprise Server (GH
1. Remove support for the old version of CodeQL. 1. Remove support for the old version of CodeQL.
- Bump `CODEQL_MINIMUM_VERSION` in `src/codeql.ts` to the new minimum version of CodeQL. - Bump `CODEQL_MINIMUM_VERSION` in `src/codeql.ts` to the new minimum version of CodeQL.
- Remove any code that is only needed to support the old version of CodeQL. This is often behind a version guard, so look for instances of version numbers between the old minimum version and the new minimum version in the codebase. A good place to start is the list of version numbers in `src/codeql.ts`. - Remove any code that is only needed to support the old version of CodeQL. This is often behind a version guard, so look for instances of version numbers between the old minimum version and the new minimum version in the codebase. A good place to start is the list of version numbers in `src/codeql.ts`.
- Update the default set of CodeQL test versions in `pr-checks/sync.ts`. - Update the default set of CodeQL test versions in `pr-checks/sync.py`.
- Remove the old minimum version of CodeQL. - Remove the old minimum version of CodeQL.
- Add the latest patch release for any new CodeQL minor version series that have shipped in GHES. - Add the latest patch release for any new CodeQL minor version series that have shipped in GHES.
- Run the script to update the generated PR checks. - Run the script to update the generated PR checks.
@@ -124,7 +122,7 @@ To deprecate an older version of the Action:
- Implement an Actions warning for customers using the deprecated version. - Implement an Actions warning for customers using the deprecated version.
1. Wait for the deprecation period to pass. 1. Wait for the deprecation period to pass.
1. Upgrade the Actions warning for customers using the deprecated version to a non-fatal error, and mention that this version of the Action is no longer supported. 1. Upgrade the Actions warning for customers using the deprecated version to a non-fatal error, and mention that this version of the Action is no longer supported.
1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [config.ts](pr-checks/config.ts). Once this PR is merged, the release process will no longer backport changes to the deprecated release version. 1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [releases.ini](.github/releases.ini). Once this PR is merged, the release process will no longer backport changes to the deprecated release version.
## Resources ## Resources
+5 -12
View File
@@ -72,21 +72,14 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
| Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes | | Minimum CodeQL Action | Minimum CodeQL Bundle Version | GitHub Environment | Notes |
|-----------------------|-------------------------------|--------------------|-------| |-----------------------|-------------------------------|--------------------|-------|
| `v4.33.0` | `2.24.3` | Enterprise Server 3.21 | | | `v3.28.21` | `2.21.3` | Enterprise Server 3.18 | |
| `v4.31.10` | `2.23.9` | Enterprise Server 3.20 | | | `v3.28.12` | `2.20.7` | Enterprise Server 3.17 | |
| `v3.29.11` | `2.22.4` | Enterprise Server 3.19 | | | `v3.28.6` | `2.20.3` | Enterprise Server 3.16 | |
| `v3.28.21` | `2.21.3` | Enterprise Server 3.18 | | | `v3.28.6` | `2.20.3` | Enterprise Server 3.15 | |
| `v3.28.12` | `2.20.7` | Enterprise Server 3.17 | | | `v3.28.6` | `2.20.3` | Enterprise Server 3.14 | |
| `v3.28.6` | `2.20.3` | Enterprise Server 3.16 | |
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server). See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
## Keeping the CodeQL Action up to date in advanced setups
If you are using an [advanced setup](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning), we recommend referencing the CodeQL Action using a major version tag (e.g. `v4`) in your workflow file. This ensures your workflow automatically picks up the latest release within that major version, including bug fixes, new features, and updated CodeQL CLI versions.
If you pin to a specific commit SHA or patch version tag, ensure you keep it updated (e.g. via [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)). Some CodeQL Action features are enabled by server-side flags that may be removed over time, which can cause old versions to lose functionality.
## Troubleshooting ## Troubleshooting
Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning). Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning).
+2 -2
View File
@@ -95,5 +95,5 @@ outputs:
description: The ID of the uploaded SARIF file. description: The ID of the uploaded SARIF file.
runs: runs:
using: node24 using: node24
main: "../lib/analyze-entry.js" main: "../lib/analyze-action.js"
post: "../lib/analyze-post-entry.js" post: "../lib/analyze-action-post.js"
+1 -1
View File
@@ -16,4 +16,4 @@ inputs:
required: false required: false
runs: runs:
using: node24 using: node24
main: '../lib/autobuild-entry.js' main: '../lib/autobuild-action.js'
-9
View File
@@ -1,9 +0,0 @@
export default {
typescript: {
rewritePaths: {
"src/": "build/",
},
compile: false,
},
require: ["./ava.setup.mjs"],
};
-3
View File
@@ -1,3 +0,0 @@
import pkg from "./package.json" with { type: "json" };
globalThis.__CODEQL_ACTION_VERSION__ = pkg.version;
+8 -155
View File
@@ -1,12 +1,10 @@
import { copyFile, readFile, rm, writeFile } from "node:fs/promises"; import { copyFile, rm } from "node:fs/promises";
import { basename, dirname, join } from "node:path"; import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import * as esbuild from "esbuild"; import * as esbuild from "esbuild";
import { globSync } from "glob"; import { globSync } from "glob";
import pkg from "./package.json" with { type: "json" };
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename); const __dirname = dirname(__filename);
@@ -15,7 +13,7 @@ const OUT_DIR = join(__dirname, "lib");
/** /**
* Clean the output directory before building. * Clean the output directory before building.
* *
* @type {esbuild.Plugin} * @type {esbuild.Plugin}
*/ */
const cleanPlugin = { const cleanPlugin = {
@@ -29,7 +27,7 @@ const cleanPlugin = {
/** /**
* Copy defaults.json to the output directory since other projects depend on it. * Copy defaults.json to the output directory since other projects depend on it.
* *
* @type {esbuild.Plugin} * @type {esbuild.Plugin}
*/ */
const copyDefaultsPlugin = { const copyDefaultsPlugin = {
@@ -62,161 +60,16 @@ const onEndPlugin = {
}, },
}; };
/** The name of the virtual `entry-points` module. */
const SHARED_ENTRYPOINT = "entry-points";
/** The property name under which `upload-lib`'s namespace is exposed in `entry-points`. */
const UPLOAD_LIB_EXPORT = "uploadLib";
/** The relative source path of the `upload-lib` module that we re-export from `entry-points`. */
const UPLOAD_LIB_SRC = "./src/upload-lib";
/**
* This plugin finds all source files that contain Action entry points. It then generates the
* virtual `entry-points` module which imports all identified files, and re-exports their
* `runWrapper` functions with suitable aliases.
*
* The virtual module additionally re-exports `upload-lib` under the `uploadLib` namespace so that
* external consumers can access it via the small `lib/upload-lib.js` stub emitted below.
*
* A tiny stub file is emitted for each Action entrypoint, and one for `upload-lib`. Each stub
* imports the shared bundle and calls/re-exports from the respective entry point.
*
* @type {esbuild.Plugin}
*/
const entryPointsPlugin = {
name: "entry-points",
setup(build) {
const namespace = "actions";
const actions = [];
const toPascal = (s) =>
s.replace(/(^|-)([a-z0-9])/gi, (_, __, c) => c.toUpperCase());
// Find the source files containing Action entry points.
build.onStart(() => {
const actionFiles = globSync("src/*-action{,-post}.ts");
for (const actionFile of actionFiles) {
const match = basename(actionFile).match(/(.*)-action(-post)?/);
if (match.length < 2) {
throw new Error(`'${actionFile}' didn't match expected pattern.`);
}
const actionName = match[1];
const isPost = match[2] !== undefined;
actions.push({
path: actionFile,
name: actionName,
isPost,
pascalCaseName: `${toPascal(actionName)}${isPost ? "Post" : ""}Action`,
});
}
});
// Resolve the virtual `entry-points` file and set the corresponding namespace.
// Ideally, we'd `RegExp.escape` the entrypoint here, but that API isn't supported in Node 20.
// Since we're dealing with a hardcoded string, this isn't too much of a problem.
build.onResolve({ filter: new RegExp(`^${SHARED_ENTRYPOINT}$`) }, () => {
return { path: SHARED_ENTRYPOINT, namespace };
});
// Generate the virtual `entry-points` file based on the Actions we discovered.
// Restrict using the namespace. The path filter does not need to discriminate any further.
build.onLoad({ filter: /.*/, namespace }, async () => {
const wrapperTemplatePath = "entry-wrapper.js.tpl";
const wrapperTemplate = await readFile(
join(SRC_DIR, wrapperTemplatePath),
"utf-8",
);
const actionsSorted = actions.sort((a, b) =>
a.name.localeCompare(b.name),
);
const imports = actionsSorted
.map(
(action) =>
`import * as ${action.pascalCaseName} from "./src/${basename(action.path)}";`,
)
.join("\n");
const wrappers = actionsSorted
.map((action) =>
wrapperTemplate.replaceAll("__ACTION__", action.pascalCaseName),
)
.join("\n\n");
// Also re-export the `upload-lib` namespace so that external consumers can reach it
// via the `lib/upload-lib.js` stub without us having to bundle a second copy.
const uploadLibReExport = `export * as ${UPLOAD_LIB_EXPORT} from "${UPLOAD_LIB_SRC}";`;
return {
contents: `"use strict";\n${imports}\n\n${uploadLibReExport}\n\n${wrappers}\n`,
resolveDir: ".",
loader: "ts",
};
});
// Emit entry point stubs for each Action using the entry template.
build.onEnd(async () => {
const makeHeader = (templatePath, sourceFile) =>
`// Automatically generated from '${templatePath}' for 'src/${basename(sourceFile)}'.\n\n`;
// Read the entry point template.
const actionTemplatePath = "action-entry.js.tpl";
const actionTemplate = await readFile(
join(SRC_DIR, actionTemplatePath),
"utf-8",
);
// Write entry point stubs for each Action.
for (const action of actions) {
await writeFile(
join(
OUT_DIR,
`${action.name}${action.isPost ? "-post" : ""}-entry.js`,
),
makeHeader(actionTemplatePath, action.path) +
actionTemplate.replaceAll("__ACTION__", action.pascalCaseName),
);
}
// Write a small stub for `upload-lib` that re-exports it from the shared bundle.
// External callers (e.g. internal testing environments) `require("./lib/upload-lib")`
// and expect the same shape as before, so we expose the namespace as `module.exports`.
const uploadLibStubTemplatePath = "upload-lib-stub.js.tpl";
const uploadLibStubTemplate = await readFile(
join(SRC_DIR, uploadLibStubTemplatePath),
"utf-8",
);
await writeFile(
join(OUT_DIR, "upload-lib.js"),
makeHeader(uploadLibStubTemplatePath, `${UPLOAD_LIB_SRC}.ts`) +
uploadLibStubTemplate.replaceAll(
"__UPLOAD_LIB_EXPORT__",
UPLOAD_LIB_EXPORT,
),
);
});
},
};
const context = await esbuild.context({ const context = await esbuild.context({
entryPoints: [{ in: SHARED_ENTRYPOINT, out: SHARED_ENTRYPOINT }], // Include upload-lib.ts as an entry point for use in testing environments.
entryPoints: globSync([`${SRC_DIR}/*-action.ts`, `${SRC_DIR}/*-action-post.ts`, "src/upload-lib.ts"]),
bundle: true, bundle: true,
format: "cjs", format: "cjs",
outdir: OUT_DIR, outdir: OUT_DIR,
platform: "node", platform: "node",
external: ["./entry-points"], plugins: [cleanPlugin, copyDefaultsPlugin, onEndPlugin],
plugins: [cleanPlugin, copyDefaultsPlugin, entryPointsPlugin, onEndPlugin],
target: ["node20"], target: ["node20"],
define: {
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
},
metafile: true,
}); });
const result = await context.rebuild(); await context.rebuild();
await writeFile(join(__dirname, "meta.json"), JSON.stringify(result.metafile));
await context.dispose(); await context.dispose();
+43 -102
View File
@@ -1,18 +1,27 @@
import { fixupPluginRules } from "@eslint/compat"; // Automatically generated by running npx @eslint/migrate-config .eslintrc.json
import path from "node:path";
import { fileURLToPath } from "node:url";
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js"; import js from "@eslint/js";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import filenames from "eslint-plugin-filenames";
import github from "eslint-plugin-github"; import github from "eslint-plugin-github";
import { importX, createNodeResolver } from "eslint-plugin-import-x"; import _import from "eslint-plugin-import";
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
import noAsyncForeach from "eslint-plugin-no-async-foreach"; import noAsyncForeach from "eslint-plugin-no-async-foreach";
import jsdoc from "eslint-plugin-jsdoc"; import jsdoc from "eslint-plugin-jsdoc";
import tseslint from "typescript-eslint";
import globals from "globals"; import globals from "globals";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
const githubFlatConfigs = github.getFlatConfigs(); const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default [ export default [
{ {
@@ -23,35 +32,33 @@ export default [
"src/testdata/**/*", "src/testdata/**/*",
"tests/**/*", "tests/**/*",
"build.mjs", "build.mjs",
"ava.config.mjs",
"ava.setup.mjs",
"eslint.config.mjs", "eslint.config.mjs",
".github/**/*", ".github/**/*",
], ],
}, },
// eslint recommended config ...fixupConfigRules(
js.configs.recommended, compat.extends(
// Type-checked rules from typescript-eslint "eslint:recommended",
...tseslint.configs.recommendedTypeChecked, "plugin:@typescript-eslint/recommended",
...tseslint.configs.strict, "plugin:@typescript-eslint/recommended-requiring-type-checking",
// eslint-plugin-github recommended config "plugin:github/recommended",
githubFlatConfigs.recommended, "plugin:github/typescript",
// eslint-plugin-github typescript config "plugin:import/typescript",
...githubFlatConfigs.typescript, ),
// import-x TypeScript settings ),
// This is needed for import-x rules to properly parse TypeScript files.
{
settings: importX.flatConfigs.typescript.settings,
},
{ {
plugins: { plugins: {
"import-x": importX, "@typescript-eslint": fixupPluginRules(typescriptEslint),
"no-async-foreach": fixupPluginRules(noAsyncForeach), filenames: fixupPluginRules(filenames),
jsdoc: jsdoc, github: fixupPluginRules(github),
import: fixupPluginRules(_import),
"no-async-foreach": noAsyncForeach,
"jsdoc": jsdoc,
}, },
languageOptions: { languageOptions: {
ecmaVersion: "latest", parser: tsParser,
ecmaVersion: 5,
sourceType: "module", sourceType: "module",
globals: { globals: {
@@ -71,23 +78,11 @@ export default [
typescript: {}, typescript: {},
}, },
"import/ignore": [ "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "del", "get-folder-size", "@actions/github"],
"sinon",
"uuid",
"@octokit/plugin-retry",
"del",
"get-folder-size",
],
"import-x/resolver-next": [
createTypeScriptImportResolver(),
createNodeResolver({
extensions: [".ts", ".js", ".json"],
}),
],
}, },
rules: { rules: {
"github/filenames-match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"], "filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"],
"i18n-text/no-en": "off", "i18n-text/no-en": "off",
"import/extensions": [ "import/extensions": [
@@ -99,10 +94,7 @@ export default [
"import/no-amd": "error", "import/no-amd": "error",
"import/no-commonjs": "error", "import/no-commonjs": "error",
// import/no-cycle does not seem to work with ESLint 9. "import/no-cycle": "error",
// Use import-x/no-cycle from eslint-plugin-import-x instead.
"import/no-cycle": "off",
"import-x/no-cycle": "error",
"import/no-dynamic-require": "error", "import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": [ "import/no-extraneous-dependencies": [
@@ -140,20 +132,6 @@ export default [
"no-async-foreach/no-async-foreach": "error", "no-async-foreach/no-async-foreach": "error",
"no-sequences": "error", "no-sequences": "error",
"no-shadow": "off", "no-shadow": "off",
// A basic check that we don't use `exportVariable` from `@actions/core`. This rule depends on
// the module being imported as `core`, but that is a good enough check for us.
"no-restricted-syntax": [
"error",
{
selector:
"MemberExpression[object.name='core'][property.name='exportVariable']",
message: "Use `exportVariable` from `environment.ts` instead.",
},
],
// This is overly restrictive with unsetting `EnvVar`s
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-shadow": "error", "@typescript-eslint/no-shadow": "error",
"@typescript-eslint/prefer-optional-chain": "error", "@typescript-eslint/prefer-optional-chain": "error",
"one-var": ["error", "never"], "one-var": ["error", "never"],
@@ -165,27 +143,21 @@ export default [
// We don't currently require full JSDoc coverage, so this rule // We don't currently require full JSDoc coverage, so this rule
// should not error on missing @param annotations. // should not error on missing @param annotations.
disableMissingParamChecks: true, disableMissingParamChecks: true,
}, }
], ],
}, },
}, },
{
files: ["src/environment.ts"],
// We allow `exportVariable` from `@actions/core` to be used in this file
// since it defines the wrapper around it that other modules use.
rules: {
"no-restricted-syntax": "off",
},
},
{ {
files: ["**/*.ts", "**/*.js"], files: ["**/*.ts", "**/*.js"],
rules: { rules: {
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off", "@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-regexp-exec": "off", "@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off", "@typescript-eslint/require-await": "off",
@@ -193,41 +165,10 @@ export default [
"@typescript-eslint/no-unused-vars": [ "@typescript-eslint/no-unused-vars": [
"error", "error",
{ {
args: "all", "argsIgnorePattern": "^_",
argsIgnorePattern: "^_", }
},
], ],
"func-style": "off", "func-style": "off",
}, },
}, },
{
files: ["pr-checks/**/*.ts"],
languageOptions: {
parserOptions: {
// Use the correct `tsconfig.json` for `pr-checks`.
project: "./pr-checks/tsconfig.json",
},
},
rules: {
// The scripts in `pr-checks` are expected to output to the console.
"no-console": "off",
"import/no-extraneous-dependencies": [
"error",
{ packageDir: [__dirname, path.resolve(__dirname, "pr-checks")] },
],
"@typescript-eslint/no-floating-promises": [
"error",
{
allowForKnownSafeCalls: [
// Avoid needing explicit `void` in front of `describe` calls in test files.
{ from: "package", name: ["describe"], package: "node:test" },
],
},
],
},
},
]; ];
+2 -7
View File
@@ -159,11 +159,6 @@ inputs:
description: >- description: >-
Explicitly enable or disable caching of project build dependencies. Explicitly enable or disable caching of project build dependencies.
required: false required: false
check-run-id:
description: >-
[Internal] The ID of the check run, as provided by the Actions runtime environment. Do not set this value manually.
default: ${{ job.check_run_id }}
required: false
outputs: outputs:
codeql-path: codeql-path:
description: The path of the CodeQL binary used for analysis description: The path of the CodeQL binary used for analysis
@@ -171,5 +166,5 @@ outputs:
description: The version of the CodeQL binary used for analysis description: The version of the CodeQL binary used for analysis
runs: runs:
using: node24 using: node24
main: '../lib/init-entry.js' main: '../lib/init-action.js'
post: '../lib/init-post-entry.js' post: '../lib/init-action-post.js'
+147651
View File
File diff suppressed because one or more lines are too long
+114581
View File
File diff suppressed because one or more lines are too long
-6
View File
@@ -1,6 +0,0 @@
// Automatically generated from 'action-entry.js.tpl' for 'src/analyze-action.ts'.
"use strict";
const import_entry_points = require("./entry-points");
void (0, import_entry_points.runAnalyzeAction)();

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