Compare commits

..

2 Commits

Author SHA1 Message Date
Michael B. Gale
456086d251 Adjust retry configuration and add comment 2025-09-23 12:59:21 +01:00
Michael B. Gale
d71accc5fa Configure the API client to retry more often when in test mode 2025-09-23 10:18:39 +01:00
192 changed files with 3006 additions and 53035 deletions

View File

@@ -6,16 +6,6 @@ import * as assert from 'assert'
const actualConfig = loadActualConfig()
function sortConfigArrays(config) {
for (const key of Object.keys(config)) {
const value = config[key];
if (key === 'queries' && Array.isArray(value)) {
config[key] = value.sort();
}
}
return config;
}
const rawExpectedConfig = process.argv[3].trim()
if (!rawExpectedConfig) {
core.setFailed('No expected configuration provided')
@@ -28,8 +18,8 @@ if (!rawExpectedConfig) {
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;
assert.deepStrictEqual(
sortConfigArrays(actualConfig),
sortConfigArrays(expectedConfig),
actualConfig,
expectedConfig,
'Expected configuration does not match actual configuration'
);

View File

@@ -16,5 +16,5 @@ inputs:
Comma separated list of query ids that should NOT be included in this SARIF file.
runs:
using: node24
using: node20
main: index.js

View File

@@ -2,7 +2,7 @@ name: "Prepare test"
description: Performs some preparation to run tests
inputs:
version:
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'toolcache', 'nightly', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
required: true
use-all-platform-bundle:
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
@@ -41,9 +41,6 @@ runs:
elif [[ "$VERSION" == "linked" ]]; then
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
exit 0
elif [[ "$VERSION" == "toolcache" ]]; then
echo "tools-url=toolcache" >> "$GITHUB_OUTPUT"
exit 0
elif [[ "$VERSION" == "default" ]]; then
echo "tools-url=" >> "$GITHUB_OUTPUT"
exit 0

View File

@@ -16,24 +16,22 @@ updates:
- dependency-name: "eslint-plugin-import"
versions: [">=2.30.0"]
groups:
npm-minor:
npm:
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: github-actions
directories:
- "/.github/workflows"
- "/.github/actions"
directory: "/"
schedule:
interval: weekly
labels:
- Rebuild
groups:
actions-minor:
actions:
patterns:
- "*"
- package-ecosystem: github-actions
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
schedule:
interval: weekly
groups:
actions-setup-swift:
patterns:
- "*"
update-types:
- "minor"
- "patch"

View File

@@ -1,13 +1,4 @@
<!--
For GitHub staff: Remember that this is a public repository. Do not link to internal resources.
If necessary, link to this PR from an internal issue and include further details there.
Everyone: Include a summary of the context of this change, what it aims to accomplish, and why you
chose the approach you did if applicable. Indicate any open questions you want to answer
during the review process and anything you want reviewers to pay particular attention to.
See https://github.com/github/codeql-action/blob/main/CONTRIBUTING.md for additional information.
-->
<!-- For GitHub staff: Remember that this is a public repository. -->
### Risk assessment
@@ -16,44 +7,6 @@ For internal use only. Please select the risk level of this change:
- **Low risk:** Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.
- **High risk:** Changes are not fully under feature flags, have limited visibility and/or cannot be tested outside of production.
#### Which use cases does this change impact?
<!-- Delete options that don't apply. -->
- **Advanced setup** - Impacts users who have custom workflows.
- **Default setup** - Impacts users who use default setup.
- **Code Scanning** - Impacts Code Scanning (i.e. `analysis-kinds: code-scanning`).
- **Code Quality** - Impacts Code Quality (i.e. `analysis-kinds: code-quality`).
- **Third-party analyses** - Impacts third-party analyses (i.e. `upload-sarif`).
- **GHES** - Impacts GitHub Enterprise Server.
#### How did/will you validate this change?
<!-- Delete options that don't apply. -->
- **Test repository** - This change will be tested on a test repository before merging.
- **Unit tests** - I am depending on unit test coverage (i.e. tests in `.test.ts` files).
- **End-to-end tests** - I am depending on PR checks (i.e. tests in `pr-checks`).
- **Other** - Please provide details.
- **None** - I am not validating these changes.
#### If something goes wrong after this change is released, what are the mitigation and rollback strategies?
<!-- Delete strategies that don't apply. -->
- **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.
- **Other** - Please provide details.
#### How will you know if something goes wrong after this change is released?
<!-- Delete options that don't apply. -->
- **Telemetry** - I rely on existing telemetry or have made changes to the telemetry.
- **Dashboards** - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
- **Alerts** - New or existing monitors will trip if something goes wrong with this change.
- **Other** - Please provide details.
### Merge / deployment checklist
- Confirm this change is backwards compatible with existing workflows.

View File

@@ -371,10 +371,10 @@ def main():
# releases.
run_git('revert', vOlder_update_commits[0], '--no-edit')
# Also revert the "Rebuild" commit created by Actions.
rebuild_commit = run_git('log', '--grep', '^Rebuild$', '--format=%H').split()[0]
print(f' Reverting {rebuild_commit}')
run_git('revert', rebuild_commit, '--no-edit')
# Also revert the "Update checked-in dependencies" commit created by Actions.
update_dependencies_commit = run_git('log', '--grep', '^Update checked-in dependencies', '--format=%H').split()[0]
print(f' Reverting {update_dependencies_commit}')
run_git('revert', update_dependencies_commit, '--no-edit')
else:
print(' Nothing to revert.')

View File

@@ -48,12 +48,7 @@ jobs:
include:
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: All-platform bundle
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -70,7 +65,7 @@ jobs:
use-all-platform-bundle: 'true'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -48,8 +48,11 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
name: "Analyze: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +69,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -43,7 +43,6 @@ jobs:
- os: windows-latest
version: linked
name: autobuild-action
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -55,7 +55,6 @@ jobs:
- os: windows-latest
version: nightly-latest
name: Autobuild direct tracing (custom working directory)
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

103
.github/workflows/__autobuild-direct-tracing.yml generated vendored Normal file
View File

@@ -0,0 +1,103 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: PR Check - Autobuild direct tracing
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs:
java-version:
type: string
description: The version of Java to install
required: false
default: '17'
workflow_call:
inputs:
java-version:
type: string
description: The version of Java to install
required: false
default: '17'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
autobuild-direct-tracing:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Autobuild direct tracing
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- 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
uses: actions/setup-java@v5
with:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Set up Java test repo configuration
run: |
mv * .github ../action/tests/multi-language-repo/
mv ../action/tests/multi-language-repo/.github/workflows .github
mv ../action/tests/java-repo/* .
- uses: ./../action/init
id: init
with:
build-mode: autobuild
db-location: ${{ runner.temp }}/customDbLocation
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \
"CODEQL_RUNNER environment variable is set."
exit 1
fi
- uses: ./../action/analyze
env:
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
CODEQL_ACTION_TEST_MODE: true

View File

@@ -21,19 +21,9 @@ on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs:
java-version:
type: string
description: The version of Java to install
required: false
default: '17'
inputs: {}
workflow_call:
inputs:
java-version:
type: string
description: The version of Java to install
required: false
default: '17'
inputs: {}
defaults:
run:
shell: bash
@@ -47,15 +37,8 @@ jobs:
matrix:
include:
- os: ubuntu-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Build mode autobuild
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -71,11 +54,6 @@ jobs:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Java
uses: actions/setup-java@v5
with:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Set up Java test repo configuration
run: |
mv * .github ../action/tests/multi-language-repo/
@@ -90,11 +68,6 @@ jobs:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Install yq
if: runner.os == 'Windows'
run: |
choco install yq -y
- name: Validate database build mode
run: |
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
@@ -104,14 +77,6 @@ jobs:
exit 1
fi
- name: Check that indirect tracing is disabled
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \
"CODEQL_RUNNER environment variable is set."
exit 1
fi
- uses: ./../action/analyze
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -49,7 +49,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Build mode manual
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +65,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -41,7 +41,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Build mode none
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Build mode rollback
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -1,86 +0,0 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: 'PR Check - Bundle: From toolcache'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
bundle-from-toolcache:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: toolcache
name: 'Bundle: From toolcache'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- 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 @actions/tool-cache
run: npm install @actions/tool-cache
- name: Check toolcache contains CodeQL
continue-on-error: true
uses: actions/github-script@v8
with:
script: |
const toolcache = require('@actions/tool-cache');
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
if (allCodeqlVersions.length === 0) {
throw new Error(`CodeQL could not be found in the toolcache`);
}
- id: init
uses: ./../action/init
with:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check CodeQL is installed within the toolcache
uses: actions/github-script@v8
with:
script: |
const toolcache = require('@actions/tool-cache');
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
if (allCodeqlVersions.length === 0) {
throw new Error('CodeQL not found in toolcache');
}
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -43,7 +43,6 @@ jobs:
- os: windows-latest
version: linked
name: 'Bundle: Caching checks'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -60,7 +59,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Remove CodeQL from toolcache
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
@@ -70,7 +69,7 @@ jobs:
- name: Install @actions/tool-cache
run: npm install @actions/tool-cache
- name: Check toolcache does not contain CodeQL
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
script: |
const toolcache = require('@actions/tool-cache');
@@ -89,7 +88,7 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check CodeQL is installed within the toolcache
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
script: |
const toolcache = require('@actions/tool-cache');

View File

@@ -43,7 +43,6 @@ jobs:
- os: windows-latest
version: linked
name: 'Bundle: Zstandard checks'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -60,7 +59,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Remove CodeQL from toolcache
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
@@ -85,7 +84,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with:

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Clean up database cluster directory
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -38,10 +38,17 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Config export
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -73,7 +80,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check config properties appear in SARIF
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with:

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Config input
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -49,7 +48,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

View File

@@ -43,7 +43,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: 'C/C++: disabling autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -41,7 +41,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -43,7 +43,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: 'C/C++: autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -38,10 +38,17 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Diagnostic export
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -84,7 +91,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostics appear in SARIF
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with:

View File

@@ -53,7 +53,6 @@ jobs:
- os: windows-latest
version: nightly-latest
name: Export file baseline information
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -70,7 +69,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Extractor ram and threads options test
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -51,7 +51,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: 'Go: Custom queries'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -68,7 +67,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -49,7 +49,6 @@ jobs:
- os: ubuntu-latest
version: default
name: 'Go: diagnostic when Go is changed after init step'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +65,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
@@ -75,7 +74,7 @@ jobs:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
# Deliberately change Go after the `init` step
- uses: actions/setup-go@v6
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Build code
@@ -85,7 +84,7 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check diagnostic appears in SARIF
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with:

View File

@@ -49,7 +49,6 @@ jobs:
- os: ubuntu-latest
version: default
name: 'Go: diagnostic when `file` is not installed'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +65,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
@@ -86,7 +85,7 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check diagnostic appears in SARIF
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with:

View File

@@ -49,7 +49,6 @@ jobs:
- os: ubuntu-latest
version: default
name: 'Go: workaround for indirect tracing'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +65,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -83,7 +83,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with autobuilder step'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -100,7 +99,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -83,7 +83,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with custom build steps'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -100,7 +99,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -83,7 +83,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with legacy workflow'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -100,7 +99,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -38,12 +38,23 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Download using registries'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
packages: read
@@ -106,6 +117,8 @@ jobs:
fi
- name: Verify contents of qlconfig.yml
# yq is not available on windows
if: runner.os != 'Windows'
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'

View File

@@ -43,7 +43,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Custom source root
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Job run UUID added to SARIF
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Language aliases
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -83,7 +83,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -100,7 +99,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -41,7 +41,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Overlay database init fallback
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -48,12 +48,23 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config and input passed to the CLI'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -63,7 +74,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
@@ -77,7 +88,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -48,12 +48,23 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config and input'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -63,7 +74,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
@@ -77,7 +88,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -48,12 +48,23 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config file'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -63,7 +74,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
@@ -77,7 +88,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -48,12 +48,23 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Action input'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -63,7 +74,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
@@ -77,7 +88,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -45,6 +45,24 @@ jobs:
- os: ubuntu-latest
version: linked
analysis-kinds: code-scanning,code-quality
- os: macos-latest
version: linked
analysis-kinds: code-scanning
- os: macos-latest
version: linked
analysis-kinds: code-quality
- os: macos-latest
version: linked
analysis-kinds: code-scanning,code-quality
- os: windows-latest
version: linked
analysis-kinds: code-scanning
- os: windows-latest
version: linked
analysis-kinds: code-quality
- os: windows-latest
version: linked
analysis-kinds: code-scanning,code-quality
- os: ubuntu-latest
version: nightly-latest
analysis-kinds: code-scanning
@@ -54,8 +72,25 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
analysis-kinds: code-scanning,code-quality
- os: macos-latest
version: nightly-latest
analysis-kinds: code-scanning
- os: macos-latest
version: nightly-latest
analysis-kinds: code-quality
- os: macos-latest
version: nightly-latest
analysis-kinds: code-scanning,code-quality
- os: windows-latest
version: nightly-latest
analysis-kinds: code-scanning
- os: windows-latest
version: nightly-latest
analysis-kinds: code-quality
- os: windows-latest
version: nightly-latest
analysis-kinds: code-scanning,code-quality
name: Quality queries input
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -98,7 +133,7 @@ jobs:
retention-days: 7
- name: Check quality query does not appear in security SARIF
if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
EXPECT_PRESENT: 'false'
@@ -106,7 +141,7 @@ jobs:
script: ${{ env.CHECK_SCRIPT }}
- name: Check quality query appears in quality SARIF
if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/github-script@v8
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif
EXPECT_PRESENT: 'true'

View File

@@ -51,7 +51,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Remote config file
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -68,7 +67,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -38,12 +38,23 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Resolve environment
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: default
name: RuboCop multi-language
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -56,7 +55,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Set up Ruby
uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
with:
ruby-version: 2.6
- name: Install Code Scanning integration

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

@@ -49,7 +49,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: Ruby analysis
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

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

@@ -47,7 +47,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Rust analysis
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -59,7 +59,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: Split workflow
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -76,7 +75,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -43,7 +43,6 @@ jobs:
- os: windows-latest
version: linked
name: Start proxy
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -43,7 +43,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Submit SARIF after failure
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: write # needed to upload the SARIF file

View File

@@ -39,7 +39,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: Swift analysis using autobuild
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -53,7 +53,6 @@ jobs:
- os: macos-latest
version: nightly-latest
name: Swift analysis using a custom build command
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -70,7 +69,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -31,7 +31,7 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
autobuild-working-dir:
test-autobuild-working-dir:
strategy:
fail-fast: false
matrix:
@@ -39,7 +39,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Autobuild working directory
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -41,7 +41,7 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
local-bundle:
test-local-codeql:
strategy:
fail-fast: false
matrix:
@@ -49,7 +49,6 @@ jobs:
- os: ubuntu-latest
version: linked
name: Local CodeQL bundle
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +65,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

View File

@@ -31,7 +31,7 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
global-proxy:
test-proxy:
strategy:
fail-fast: false
matrix:
@@ -41,7 +41,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Proxy test
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read

View File

@@ -51,7 +51,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Test unsetting environment variables
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -68,7 +67,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

98
.github/workflows/__upload-quality-sarif.yml generated vendored Normal file
View File

@@ -0,0 +1,98 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: 'PR Check - Upload-sarif: code quality endpoint'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs:
go-version:
type: string
description: The version of Go to install
required: false
default: '>=1.21.0'
workflow_call:
inputs:
go-version:
type: string
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
upload-quality-sarif:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
name: 'Upload-sarif: code quality endpoint'
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- 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 Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: csharp,java,javascript,python
analysis-kinds: code-quality
- name: Build code
run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never
- uses: ./../action/upload-sarif
id: upload-sarif
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
- name: Check output from `upload-sarif` step
if: fromJSON(steps.upload-sarif.outputs.sarif-ids)[0].analysis != 'code-quality'
run: exit 1
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -48,8 +48,11 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
name: "Upload-sarif: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +69,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false

158
.github/workflows/__upload-sarif.yml generated vendored
View File

@@ -1,158 +0,0 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: PR Check - Test different uses of `upload-sarif`
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs:
go-version:
type: string
description: The version of Go to install
required: false
default: '>=1.21.0'
workflow_call:
inputs:
go-version:
type: string
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
upload-sarif:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: default
analysis-kinds: code-scanning
- os: ubuntu-latest
version: default
analysis-kinds: code-quality
- os: ubuntu-latest
version: default
analysis-kinds: code-scanning,code-quality
name: Test different uses of `upload-sarif`
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- 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 Go
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: csharp,java,javascript,python
analysis-kinds: ${{ matrix.analysis-kinds }}
- name: Build code
run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never
output: ${{ runner.temp }}/results
- name: |
Upload all SARIF files for `analysis-kinds: ${{ matrix.analysis-kinds }}`
uses: ./../action/upload-sarif
id: upload-sarif
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results
category: |
${{ 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`
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-sarif.outputs.sarif-ids).code-scanning)
run: exit 1
- 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)
run: exit 1
- name: Upload single SARIF file for Code Scanning
uses: ./../action/upload-sarif
id: upload-single-sarif-code-scanning
if: contains(matrix.analysis-kinds, 'code-scanning')
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.sarif
category: |
${{ 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
if: contains(matrix.analysis-kinds, 'code-scanning') &&
!(fromJSON(steps.upload-single-sarif-code-scanning.outputs.sarif-ids).code-scanning)
run: exit 1
- name: Upload single SARIF file for Code Quality
uses: ./../action/upload-sarif
id: upload-single-sarif-code-quality
if: contains(matrix.analysis-kinds, 'code-quality')
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.quality.sarif
category: |
${{ 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
if: contains(matrix.analysis-kinds, 'code-quality') &&
!(fromJSON(steps.upload-single-sarif-code-quality.outputs.sarif-ids).code-quality)
run: exit 1
- name: Change SARIF file extension
if: contains(matrix.analysis-kinds, 'code-scanning')
run: mv ${{ runner.temp }}/results/javascript.sarif ${{ runner.temp }}/results/javascript.sarif.json
- name: Upload single non-`.sarif` file
uses: ./../action/upload-sarif
id: upload-single-non-sarif
if: contains(matrix.analysis-kinds, 'code-scanning')
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
sarif_file: ${{ runner.temp }}/results/javascript.sarif.json
category: |
${{ 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
if: contains(matrix.analysis-kinds, 'code-scanning') && !(fromJSON(steps.upload-single-non-sarif.outputs.sarif-ids).code-scanning)
run: exit 1
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -48,8 +48,11 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
name: Use a custom `checkout_path`
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -66,7 +69,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
@@ -103,30 +106,29 @@ jobs:
- name: Verify SARIF after upload
run: |
PAYLOAD_FILE="$RUNNER_TEMP/payload-code-scanning.json"
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
EXPECTED_REF="v1.1.0"
EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo"
ACTUAL_COMMIT_OID="$(cat "$PAYLOAD_FILE" | jq -r .commit_oid)"
ACTUAL_REF="$(cat "$PAYLOAD_FILE" | jq -r .ref)"
ACTUAL_CHECKOUT_URI="$(cat "$PAYLOAD_FILE" | jq -r .checkout_uri)"
ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)"
ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)"
ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)"
if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then
echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID"
echo "$PAYLOAD_FILE"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then
echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'"
echo "$PAYLOAD_FILE"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then
echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI"
echo "$PAYLOAD_FILE"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
env:

View File

@@ -23,7 +23,6 @@ env:
jobs:
# Identify the CodeQL tool versions to use in the analysis job.
check-codeql-versions:
if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.compare.outputs.versions }}
@@ -76,7 +75,6 @@ jobs:
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
analyze-javascript:
if: github.triggering_actor != 'dependabot[bot]'
needs: [check-codeql-versions]
strategy:
fail-fast: false
@@ -112,7 +110,6 @@ jobs:
upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }}
analyze-other:
if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest
strategy:

View File

@@ -28,7 +28,6 @@ defaults:
jobs:
code-scanning-config-tests:
if: github.triggering_actor != 'dependabot[bot]'
continue-on-error: true
permissions:
@@ -42,10 +41,16 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
# Code-Scanning config not created because environment variable is not set
name: Code Scanning Configuration tests
@@ -56,9 +61,9 @@ jobs:
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 24
node-version: '20'
cache: 'npm'
- name: Install dependencies
@@ -175,13 +180,13 @@ jobs:
with:
expected-config-file-contents: |
{
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" },
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
],
"packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
},
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" },
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }
]
}
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql

View File

@@ -24,7 +24,6 @@ defaults:
jobs:
upload-artifacts:
if: github.triggering_actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
@@ -51,7 +50,7 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
- uses: actions/setup-go@v6
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- uses: ./../action/init
@@ -71,7 +70,6 @@ jobs:
expect-error: true
download-and-check-artifacts:
name: Download and check debug artifacts after failure in analyze
if: github.triggering_actor != 'dependabot[bot]'
needs: upload-artifacts
timeout-minutes: 45
permissions:

View File

@@ -23,7 +23,6 @@ defaults:
jobs:
upload-artifacts:
if: github.triggering_actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
@@ -47,7 +46,7 @@ jobs:
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
- uses: actions/setup-go@v6
- uses: actions/setup-go@v5
with:
go-version: ^1.13.1
- uses: ./../action/init
@@ -65,7 +64,6 @@ jobs:
id: analysis
download-and-check-artifacts:
name: Download and check debug artifacts
if: github.triggering_actor != 'dependabot[bot]'
needs: upload-artifacts
timeout-minutes: 45
permissions:

View File

@@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@v5
- uses: actions/setup-node@v4
- name: Update git config
run: |
@@ -139,14 +139,13 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Generate token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@v2.1.1
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
- name: Create the GitHub release
if: steps.check.outputs.exists != 'true'
env:
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
VERSION: "${{ steps.getVersion.outputs.version }}"

View File

@@ -15,12 +15,10 @@ defaults:
jobs:
unit-tests:
name: Unit Tests
if: github.triggering_actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [20, 24]
permissions:
contents: read
security-events: write # needed to upload ESLint results
@@ -33,15 +31,15 @@ jobs:
run: git config --global core.autocrlf false
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: '20.x'
cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v5
with:
python-version: 3.11
@@ -56,31 +54,24 @@ jobs:
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
if: always()
run: npm test
- name: Run pr-checks tests
if: always()
working-directory: pr-checks
run: python -m unittest discover
- name: Lint
if: always() && matrix.os != 'windows-latest'
if: matrix.os != 'windows-latest'
run: npm run lint-ci
- name: Upload sarif
uses: github/codeql-action/upload-sarif@v4
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24
uses: github/codeql-action/upload-sarif@v3
if: matrix.os == 'ubuntu-latest'
with:
sarif_file: eslint.sarif
category: eslint
check-node-version:
if: github.event.pull_request && github.triggering_actor != 'dependabot[bot]'
if: github.event.pull_request
name: Check Action Node versions
runs-on: ubuntu-latest
timeout-minutes: 45

View File

@@ -18,7 +18,6 @@ defaults:
jobs:
test-setup-python-scripts:
if: github.triggering_actor != 'dependabot[bot]'
env:
CODEQL_ACTION_TEST_MODE: true
timeout-minutes: 45
@@ -27,7 +26,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/setup-python@v6
- uses: actions/setup-python@v5
with:
python-version: 3.12

View File

@@ -22,7 +22,6 @@ defaults:
jobs:
query-filters:
name: Query Filters Tests
if: github.triggering_actor != 'dependabot[bot]'
timeout-minutes: 45
runs-on: ubuntu-latest
permissions:
@@ -32,9 +31,9 @@ jobs:
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 24
node-version: 20.x
cache: npm
- name: Install dependencies

View File

@@ -15,10 +15,6 @@ jobs:
runs-on: ubuntu-latest
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch'
env:
HEAD_REF: ${{ github.event.pull_request.head.ref || github.event.ref }}
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
permissions:
contents: write # needed to push rebuilt commit
pull-requests: write # needed to comment on the PR
@@ -27,7 +23,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ env.HEAD_REF }}
ref: ${{ github.event.pull_request.head.ref || github.event.ref }}
- name: Remove label
if: github.event_name == 'pull_request'
@@ -45,6 +41,8 @@ jobs:
- name: Merge in changes from base branch
id: merge
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
run: |
git fetch origin "$BASE_BRANCH"
@@ -74,20 +72,13 @@ jobs:
npm run build
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Sync back version updates to generated workflows
# Only sync back versions on Dependabot update PRs
if: startsWith(env.HEAD_REF, 'dependabot/')
working-directory: pr-checks
run: |
python3 sync_back.py -v
- name: Generate workflows
working-directory: pr-checks
run: |
cd pr-checks
python -m pip install --upgrade pip
pip install ruamel.yaml==0.17.31
python3 sync.py

View File

@@ -10,10 +10,6 @@ on:
required: true
# Only for dry-runs of changes to the workflow.
push:
# Don't run dry-run on release branches, to avoid an issue where the
# "new" tag determined by the "Prepare release" job already exists.
branches-ignore:
- releases/v*
paths:
- .github/workflows/rollback-release.yml
- .github/actions/prepare-mergeback-branch/**
@@ -137,7 +133,7 @@ jobs:
- name: Generate token
if: github.event_name == 'workflow_dispatch'
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@v2.1.1
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -16,18 +16,6 @@ if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
git status
echo "### Transpiled JS diff" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
git diff --output="$RUNNER_TEMP/js.diff"
cat "$RUNNER_TEMP/js.diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
# Reset bundled files to allow other checks to test for changes
git checkout lib
# Fail this check
exit 1
fi
echo "Success: JavaScript files are up to date"

View File

@@ -20,14 +20,6 @@ if [ ! -z "$(git status --porcelain)" ]; then
git diff
git status
>&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 "" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
git diff --output="$RUNNER_TEMP/workflows.diff"
cat "$RUNNER_TEMP/workflows.diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
fi
echo "Success: PR checks are up to date"
echo "Success: PR checks are up to date"

View File

@@ -28,7 +28,6 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: 'CodeQL Bundle All'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -47,7 +46,7 @@ jobs:
uses: ./../action/init
with:
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
languages: cpp,csharp,go,java,javascript,python,ruby
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
run: ./build.sh

View File

@@ -41,9 +41,9 @@ jobs:
git config --global user.name "github-actions[bot]"
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v4
with:
node-version: 24
node-version: '20.x'
cache: 'npm'
- name: Install dependencies

View File

@@ -0,0 +1,99 @@
name: Update dependency proxy release assets
on:
workflow_dispatch:
inputs:
tag:
description: "The tag of CodeQL Bundle release that contains the proxy binaries as release assets"
type: string
required: true
defaults:
run:
shell: bash
jobs:
update:
name: Update code and create PR
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: write # needed to push the updated files
pull-requests: write # needed to create the PR
env:
RELEASE_TAG: ${{ inputs.tag }}
steps:
- name: Check release tag format
id: checks
run: |
if ! [[ $RELEASE_TAG =~ ^codeql-bundle-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid release tag: expected a CodeQL bundle tag in the 'codeql-bundle-vM.N.P' format."
exit 1
fi
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
- name: Check that the release exists
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
- name: Install Node
uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # ensure we have all tags and can push commits
ref: main
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update release tag and version
run: |
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache
sed -i "s|https://github.com/github/codeql-action/releases/download/codeql-bundle-v[0-9.]\+/|https://github.com/github/codeql-action/releases/download/$RELEASE_TAG/|g" ./src/start-proxy-action.ts
sed -i "s/\"v2.0.[0-9]\+\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
- name: Compile TypeScript and commit changes
env:
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
run: |
set -exu
git checkout -b "$TARGET_BRANCH"
npm run build
git add ./src/start-proxy-action.ts
git add ./lib
git commit -m "Update release used by \`start-proxy\` action"
- name: Push changes and open PR
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
PR_FLAG: ${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
run: |
set -exu
pr_title="Update release used by \`start-proxy\` to \`$RELEASE_TAG\`"
pr_body=$(cat << EOF
This PR updates the \`start-proxy\` action to use the private registry proxy binaries that
are attached as release assets to the \`$RELEASE_TAG\` release.
Please do the following before merging:
- [ ] Verify that the changes to the code are correct.
- [ ] Mark the PR as ready for review to trigger the CI.
EOF
)
git push origin "$TARGET_BRANCH"
gh pr create \
--head "$TARGET_BRANCH" \
--base "main" \
--title "${pr_title}" \
--body "${pr_body}" \
$PR_FLAG

View File

@@ -93,7 +93,7 @@ jobs:
pull-requests: write # needed to create pull request
steps:
- name: Generate token
uses: actions/create-github-app-token@v2.1.4
uses: actions/create-github-app-token@v2.1.1
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Checkout CodeQL Action

View File

@@ -8,11 +8,6 @@
"build": true,
"lib": true,
},
"search.exclude": {
"**/node_modules": true,
"build": true,
"lib": true,
},
// Installing a new Node package often triggers VS Code's git limit warnings as there is typically
// an intermediate stage where many files are modified. This setting suppresses these warnings.
"git.ignoreLimitWarning": true,

View File

@@ -4,30 +4,9 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED]
No user facing changes.
## 4.30.8 - 10 Oct 2025
No user facing changes.
## 4.30.7 - 06 Oct 2025
- [v4+ only] The CodeQL Action now runs on Node.js v24. [#3169](https://github.com/github/codeql-action/pull/3169)
## 3.30.6 - 02 Oct 2025
- Update default CodeQL bundle version to 2.23.2. [#3168](https://github.com/github/codeql-action/pull/3168)
## 3.30.5 - 26 Sep 2025
- We fixed a bug that was introduced in `3.30.4` with `upload-sarif` which resulted in files without a `.sarif` extension not getting uploaded. [#3160](https://github.com/github/codeql-action/pull/3160)
## 3.30.4 - 25 Sep 2025
- We have improved the CodeQL Action's ability to validate that the workflow it is used in does not use different versions of the CodeQL Action for different workflow steps. Mixing different versions of the CodeQL Action in the same workflow is unsupported and can lead to unpredictable results. A warning will now be emitted from the `codeql-action/init` step if different versions of the CodeQL Action are detected in the workflow file. Additionally, an error will now be thrown by the other CodeQL Action steps if they load a configuration file that was generated by a different version of the `codeql-action/init` step. [#3099](https://github.com/github/codeql-action/pull/3099) and [#3100](https://github.com/github/codeql-action/pull/3100)
- We added support for reducing the size of dependency caches for Java analyses, which will reduce cache usage and speed up workflows. This will be enabled automatically at a later time. [#3107](https://github.com/github/codeql-action/pull/3107)
- You can now run the latest CodeQL nightly bundle by passing `tools: nightly` to the `init` action. In general, the nightly bundle is unstable and we only recommend running it when directed by GitHub staff. [#3130](https://github.com/github/codeql-action/pull/3130)
- Update default CodeQL bundle version to 2.23.1. [#3118](https://github.com/github/codeql-action/pull/3118)
## 3.30.3 - 10 Sep 2025

View File

@@ -13,14 +13,13 @@ Please note that this project is released with a [Contributor Code of Conduct][c
## Development and Testing
Before you start, ensure that you have a recent version of node (24 or higher) installed, along with a recent version of npm (9.2 or higher). You can see which version of node is used by the action in `init/action.yml`.
Before you start, ensure that you have a recent version of node (16 or higher) installed, along with a recent version of npm (9.2 or higher). You can see which version of node is used by the action in `init/action.yml`.
### Common tasks
* Transpile the TypeScript to JavaScript: `npm run build`. Note that the JavaScript files are committed to git.
* Run tests: `npm run test`. Youll need to ensure that the JavaScript files are up-to-date first by running the command above.
* Run the linter: `npm run lint`.
* Run tests for a specific path: `npm run ava -- ./src/filename.test.ts` or `npm run ava -- ./src/feature-flags/`
This project also includes configuration to run tests from VSCode (with support for breakpoints) - open the test file you wish to run and choose "Debug AVA test file" from the Run menu in the Run panel.

View File

@@ -62,8 +62,7 @@ For compiled languages:
The following versions of the CodeQL Action are currently supported:
- v4 (latest)
- v3
- v3 (latest)
## Supported versions of the CodeQL Bundle on GitHub Enterprise Server

View File

@@ -92,6 +92,6 @@ outputs:
sarif-id:
description: The ID of the uploaded SARIF file.
runs:
using: node24
using: node20
main: "../lib/analyze-action.js"
post: "../lib/analyze-action-post.js"

View File

@@ -15,5 +15,5 @@ inputs:
$GITHUB_WORKSPACE as its working directory.
required: false
runs:
using: node24
using: node20
main: '../lib/autobuild-action.js'

View File

@@ -146,12 +146,6 @@ export default [
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
}
],
"func-style": "off",
},
},

View File

@@ -165,6 +165,6 @@ outputs:
codeql-version:
description: The version of the CodeQL binary used for analysis
runs:
using: node24
using: node20
main: '../lib/init-action.js'
post: '../lib/init-action-post.js'

View File

@@ -22,7 +22,7 @@ test: build
# Run the tests for a single file
test_file filename: build
npm run ava {{filename}}
npx ava --verbose {{filename}}
[doc("Refresh the .js build artefacts in the lib directory")]
[confirm]

View File

@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
"use strict";
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") {
return a === b ? 0 : a < b ? -1 : 1;
}
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.major < other.major) {
return -1;
}
if (this.major > other.major) {
return 1;
}
if (this.minor < other.minor) {
return -1;
}
if (this.minor > other.minor) {
return 1;
}
if (this.patch < other.patch) {
return -1;
}
if (this.patch > other.patch) {
return 1;
}
return 0;
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
@@ -25142,8 +25121,8 @@ var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports2, module2) {
"use strict";
var SemVer = require_semver();
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare2;
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
@@ -25151,8 +25130,8 @@ var require_compare = __commonJS({
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var rcompare = (a, b, loose) => compare2(b, a, loose);
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
@@ -25161,8 +25140,8 @@ var require_rcompare = __commonJS({
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var compareLoose = (a, b) => compare2(a, b, true);
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
@@ -25205,8 +25184,8 @@ var require_rsort = __commonJS({
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
@@ -25215,8 +25194,8 @@ var require_gt = __commonJS({
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
@@ -25225,8 +25204,8 @@ var require_lt = __commonJS({
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
@@ -25235,8 +25214,8 @@ var require_eq = __commonJS({
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
@@ -25245,8 +25224,8 @@ var require_neq = __commonJS({
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gte5 = (a, b, loose) => compare2(a, b, loose) >= 0;
var compare = require_compare();
var gte5 = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte5;
}
});
@@ -25255,8 +25234,8 @@ var require_gte = __commonJS({
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
return result;
};
var parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], "");
debug2("comp", comp, options);
comp = replaceCarets(comp, options);
debug2("caret", comp);
@@ -26153,12 +26131,12 @@ var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
"use strict";
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set2 = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare2(a, b, options));
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies2(version, range, options);
if (included) {
@@ -26206,7 +26184,7 @@ var require_subset = __commonJS({
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
@@ -26266,7 +26244,7 @@ var require_subset = __commonJS({
}
let gtltComp;
if (gt && lt) {
gtltComp = compare2(gt.semver, lt.semver, options);
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -26346,14 +26324,14 @@ var require_subset = __commonJS({
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
@@ -26377,7 +26355,7 @@ var require_semver2 = __commonJS({
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare2 = require_compare();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
@@ -26415,7 +26393,7 @@ var require_semver2 = __commonJS({
minor,
patch,
prerelease,
compare: compare2,
compare,
rcompare,
compareLoose,
compareBuild,
@@ -26460,17 +26438,16 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.30.9",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
build: "npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26486,7 +26463,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.1.0",
"@actions/cache": "^4.0.5",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26495,7 +26472,6 @@ var require_package = __commonJS({
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/request-error": "^7.0.1",
"@schemastore/package": "0.0.10",
archiver: "^7.0.1",
"check-disk-space": "^3.4.0",
@@ -26509,14 +26485,14 @@ var require_package = __commonJS({
long: "^5.3.2",
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.3",
semver: "^7.7.2",
uuid: "^13.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.4.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3",
@@ -26527,7 +26503,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -26540,7 +26516,7 @@ var require_package = __commonJS({
glob: "^11.0.3",
nock: "^14.0.10",
sinon: "^21.0.0",
typescript: "^5.9.3"
typescript: "^5.9.2"
},
overrides: {
"@actions/tool-cache": {
@@ -28565,7 +28541,7 @@ var require_brace_expansion = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,(?!,).*\}/)) {
if (m.post.match(/,.*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2);
}
@@ -30284,13 +30260,13 @@ var require_semver3 = __commonJS({
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports2.compare = compare2;
function compare2(a, b, loose) {
exports2.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare2(a, b, true);
return compare(a, b, true);
}
exports2.compareBuild = compareBuild;
function compareBuild(a, b, loose) {
@@ -30300,7 +30276,7 @@ var require_semver3 = __commonJS({
}
exports2.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare2(b, a, loose);
return compare(b, a, loose);
}
exports2.sort = sort;
function sort(list, loose) {
@@ -30316,27 +30292,27 @@ var require_semver3 = __commonJS({
}
exports2.gt = gt;
function gt(a, b, loose) {
return compare2(a, b, loose) > 0;
return compare(a, b, loose) > 0;
}
exports2.lt = lt;
function lt(a, b, loose) {
return compare2(a, b, loose) < 0;
return compare(a, b, loose) < 0;
}
exports2.eq = eq;
function eq(a, b, loose) {
return compare2(a, b, loose) === 0;
return compare(a, b, loose) === 0;
}
exports2.neq = neq;
function neq(a, b, loose) {
return compare2(a, b, loose) !== 0;
return compare(a, b, loose) !== 0;
}
exports2.gte = gte5;
function gte5(a, b, loose) {
return compare2(a, b, loose) >= 0;
return compare(a, b, loose) >= 0;
}
exports2.lte = lte;
function lte(a, b, loose) {
return compare2(a, b, loose) <= 0;
return compare(a, b, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a, op, b, loose) {
@@ -67306,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.1.0",
version: "4.0.5",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72115,18 +72091,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "", message: "" };
const message = { ok: false, signedUploadUrl: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72145,10 +72114,6 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72165,8 +72130,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72272,18 +72235,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0", message: "" };
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72302,10 +72258,6 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72322,8 +72274,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73087,7 +73037,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path6 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73095,6 +73045,7 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73112,14 +73063,6 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73391,6 +73334,9 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73402,10 +73348,7 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
throw new Error("Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73422,9 +73365,6 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73434,8 +73374,6 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -95846,8 +95784,8 @@ var require_commonjs16 = __commonJS({
if (rootPath === this.root.name) {
return this.root;
}
for (const [compare2, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare2)) {
for (const [compare, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare)) {
return this.roots[rootPath] = root;
}
}
@@ -95856,9 +95794,9 @@ var require_commonjs16 = __commonJS({
/**
* @internal
*/
sameRoot(rootPath, compare2 = this.root.name) {
sameRoot(rootPath, compare = this.root.name) {
rootPath = rootPath.toUpperCase().replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
return rootPath === compare2;
return rootPath === compare;
}
};
exports2.PathWin32 = PathWin32;
@@ -99877,7 +99815,7 @@ var require_b4a = __commonJS({
function byteLength(string, encoding) {
return Buffer.byteLength(string, encoding);
}
function compare2(a, b) {
function compare(a, b) {
return Buffer.compare(a, b);
}
function concat(buffers, totalLength) {
@@ -99978,7 +99916,7 @@ var require_b4a = __commonJS({
allocUnsafe,
allocUnsafeSlow,
byteLength,
compare: compare2,
compare,
concat,
copy,
equals,
@@ -117138,6 +117076,9 @@ function getCachedCodeQlVersion() {
async function codeQlVersionAtLeast(codeql, requiredVersion) {
return semver.gte((await codeql.getVersion()).version, requiredVersion);
}
function isInTestMode() {
return process.env["CODEQL_ACTION_TEST_MODE" /* TEST_MODE */] === "true";
}
function wrapError(error2) {
return error2 instanceof Error ? error2 : new Error(String(error2));
}
@@ -117257,6 +117198,9 @@ var githubUtils = __toESM(require_utils4());
var retry = __toESM(require_dist_node15());
var import_console_log_level = __toESM(require_console_log_level());
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
function getRetryConfig() {
return isInTestMode() ? { retries: 10, retryAfterBaseValue: 1e4 } : { retries: 3, retryAfterBaseValue: 1e3 };
}
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
@@ -117264,7 +117208,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: (0, import_console_log_level.default)({ level: "debug" })
log: (0, import_console_log_level.default)({ level: "debug" }),
retry: getRetryConfig()
})
);
}
@@ -117756,7 +117701,7 @@ function withGroup(groupName, f) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -117828,11 +117773,6 @@ function isSafeArtifactUpload(codeQlVersion) {
// src/feature-flags.ts
var featureConfig = {
["allow_toolcache_input" /* AllowToolcacheInput */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
minimumVersion: void 0
},
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
@@ -117989,11 +117929,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -118699,7 +118634,7 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion
if (fs5.existsSync(baseTempDir)) {
const outputDirs = fs5.readdirSync(baseTempDir);
for (const outputDir of outputDirs) {
const sarifFiles = fs5.readdirSync(path5.resolve(baseTempDir, outputDir)).filter((f) => path5.extname(f) === ".sarif");
const sarifFiles = fs5.readdirSync(path5.resolve(baseTempDir, outputDir)).filter((f) => f.endsWith(".sarif"));
for (const sarifFile of sarifFiles) {
toUpload.push(path5.resolve(baseTempDir, outputDir, sarifFile));
}

461
lib/analyze-action.js generated

File diff suppressed because it is too large Load Diff

203
lib/autobuild-action.js generated
View File

@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
"use strict";
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") {
return a === b ? 0 : a < b ? -1 : 1;
}
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.major < other.major) {
return -1;
}
if (this.major > other.major) {
return 1;
}
if (this.minor < other.minor) {
return -1;
}
if (this.minor > other.minor) {
return 1;
}
if (this.patch < other.patch) {
return -1;
}
if (this.patch > other.patch) {
return 1;
}
return 0;
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
@@ -25142,8 +25121,8 @@ var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports2, module2) {
"use strict";
var SemVer = require_semver();
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare2;
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
@@ -25151,8 +25130,8 @@ var require_compare = __commonJS({
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var rcompare = (a, b, loose) => compare2(b, a, loose);
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
@@ -25161,8 +25140,8 @@ var require_rcompare = __commonJS({
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var compareLoose = (a, b) => compare2(a, b, true);
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
@@ -25205,8 +25184,8 @@ var require_rsort = __commonJS({
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
@@ -25215,8 +25194,8 @@ var require_gt = __commonJS({
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
@@ -25225,8 +25204,8 @@ var require_lt = __commonJS({
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
@@ -25235,8 +25214,8 @@ var require_eq = __commonJS({
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
@@ -25245,8 +25224,8 @@ var require_neq = __commonJS({
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gte5 = (a, b, loose) => compare2(a, b, loose) >= 0;
var compare = require_compare();
var gte5 = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte5;
}
});
@@ -25255,8 +25234,8 @@ var require_gte = __commonJS({
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
return result;
};
var parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], "");
debug3("comp", comp, options);
comp = replaceCarets(comp, options);
debug3("caret", comp);
@@ -26153,12 +26131,12 @@ var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
"use strict";
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set2 = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare2(a, b, options));
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies2(version, range, options);
if (included) {
@@ -26206,7 +26184,7 @@ var require_subset = __commonJS({
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
@@ -26266,7 +26244,7 @@ var require_subset = __commonJS({
}
let gtltComp;
if (gt && lt) {
gtltComp = compare2(gt.semver, lt.semver, options);
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -26346,14 +26324,14 @@ var require_subset = __commonJS({
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
@@ -26377,7 +26355,7 @@ var require_semver2 = __commonJS({
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare2 = require_compare();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
@@ -26415,7 +26393,7 @@ var require_semver2 = __commonJS({
minor,
patch,
prerelease,
compare: compare2,
compare,
rcompare,
compareLoose,
compareBuild,
@@ -26460,17 +26438,16 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.30.9",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
build: "npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26486,7 +26463,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.1.0",
"@actions/cache": "^4.0.5",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26495,7 +26472,6 @@ var require_package = __commonJS({
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/request-error": "^7.0.1",
"@schemastore/package": "0.0.10",
archiver: "^7.0.1",
"check-disk-space": "^3.4.0",
@@ -26509,14 +26485,14 @@ var require_package = __commonJS({
long: "^5.3.2",
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.3",
semver: "^7.7.2",
uuid: "^13.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.4.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3",
@@ -26527,7 +26503,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -26540,7 +26516,7 @@ var require_package = __commonJS({
glob: "^11.0.3",
nock: "^14.0.10",
sinon: "^21.0.0",
typescript: "^5.9.3"
typescript: "^5.9.2"
},
overrides: {
"@actions/tool-cache": {
@@ -28565,7 +28541,7 @@ var require_brace_expansion = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,(?!,).*\}/)) {
if (m.post.match(/,.*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2);
}
@@ -30284,13 +30260,13 @@ var require_semver3 = __commonJS({
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports2.compare = compare2;
function compare2(a, b, loose) {
exports2.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare2(a, b, true);
return compare(a, b, true);
}
exports2.compareBuild = compareBuild;
function compareBuild(a, b, loose) {
@@ -30300,7 +30276,7 @@ var require_semver3 = __commonJS({
}
exports2.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare2(b, a, loose);
return compare(b, a, loose);
}
exports2.sort = sort;
function sort(list, loose) {
@@ -30316,27 +30292,27 @@ var require_semver3 = __commonJS({
}
exports2.gt = gt;
function gt(a, b, loose) {
return compare2(a, b, loose) > 0;
return compare(a, b, loose) > 0;
}
exports2.lt = lt;
function lt(a, b, loose) {
return compare2(a, b, loose) < 0;
return compare(a, b, loose) < 0;
}
exports2.eq = eq;
function eq(a, b, loose) {
return compare2(a, b, loose) === 0;
return compare(a, b, loose) === 0;
}
exports2.neq = neq;
function neq(a, b, loose) {
return compare2(a, b, loose) !== 0;
return compare(a, b, loose) !== 0;
}
exports2.gte = gte5;
function gte5(a, b, loose) {
return compare2(a, b, loose) >= 0;
return compare(a, b, loose) >= 0;
}
exports2.lte = lte;
function lte(a, b, loose) {
return compare2(a, b, loose) <= 0;
return compare(a, b, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a, op, b, loose) {
@@ -67306,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.1.0",
version: "4.0.5",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72115,18 +72091,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "", message: "" };
const message = { ok: false, signedUploadUrl: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72145,10 +72114,6 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72165,8 +72130,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72272,18 +72235,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0", message: "" };
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72302,10 +72258,6 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72322,8 +72274,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73087,7 +73037,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path7 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73095,6 +73045,7 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73112,14 +73063,6 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73391,6 +73334,9 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73402,10 +73348,7 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
throw new Error("Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73422,9 +73365,6 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73434,8 +73374,6 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -77964,6 +77902,9 @@ function parseRepositoryNwo(input) {
// src/api-client.ts
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
function getRetryConfig() {
return isInTestMode() ? { retries: 10, retryAfterBaseValue: 1e4 } : { retries: 3, retryAfterBaseValue: 1e3 };
}
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
@@ -77971,7 +77912,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: (0, import_console_log_level.default)({ level: "debug" })
log: (0, import_console_log_level.default)({ level: "debug" }),
retry: getRetryConfig()
})
);
}
@@ -78318,8 +78260,8 @@ var path3 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.2";
var cliVersion = "2.23.2";
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
// src/overlay-database-utils.ts
var fs2 = __toESM(require("fs"));
@@ -78496,7 +78438,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -78566,11 +78508,6 @@ function isSupportedToolsFeature(versionInfo, feature) {
var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
var featureConfig = {
["allow_toolcache_input" /* AllowToolcacheInput */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
minimumVersion: void 0
},
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
@@ -78727,11 +78664,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -79840,7 +79772,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
action_ref: actionRef,
action_started_at: actionStartedAt.toISOString(),
action_version: getActionVersion(),
analysis_kinds: config?.analysisKinds?.join(","),
analysis_kinds: config?.analysisKinds.join(","),
analysis_key,
build_mode: config?.buildMode,
commit_oid: commitOid,
@@ -79863,7 +79795,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
logger.warning(`Could not determine the workflow event name: ${e}.`);
}
if (config) {
statusReport.languages = config.languages?.join(",");
statusReport.languages = config.languages.join(",");
}
if (diskInfo) {
statusReport.runner_available_disk_space_bytes = diskInfo.numAvailableBytes;
@@ -79900,9 +79832,6 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
logger.warning(
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
);
if (isInTestMode()) {
throw e;
}
return void 0;
}
}

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.23.2",
"cliVersion": "2.23.2",
"priorBundleVersion": "codeql-bundle-v2.23.1",
"priorCliVersion": "2.23.1"
"bundleVersion": "codeql-bundle-v2.23.0",
"cliVersion": "2.23.0",
"priorBundleVersion": "codeql-bundle-v2.22.4",
"priorCliVersion": "2.22.4"
}

506
lib/init-action-post.js generated

File diff suppressed because it is too large Load Diff

577
lib/init-action.js generated

File diff suppressed because it is too large Load Diff

View File

@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
"use strict";
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") {
return a === b ? 0 : a < b ? -1 : 1;
}
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.major < other.major) {
return -1;
}
if (this.major > other.major) {
return 1;
}
if (this.minor < other.minor) {
return -1;
}
if (this.minor > other.minor) {
return 1;
}
if (this.patch < other.patch) {
return -1;
}
if (this.patch > other.patch) {
return 1;
}
return 0;
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
@@ -25142,8 +25121,8 @@ var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports2, module2) {
"use strict";
var SemVer = require_semver();
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare2;
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
@@ -25151,8 +25130,8 @@ var require_compare = __commonJS({
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var rcompare = (a, b, loose) => compare2(b, a, loose);
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
@@ -25161,8 +25140,8 @@ var require_rcompare = __commonJS({
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var compareLoose = (a, b) => compare2(a, b, true);
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
@@ -25205,8 +25184,8 @@ var require_rsort = __commonJS({
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
@@ -25215,8 +25194,8 @@ var require_gt = __commonJS({
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
@@ -25225,8 +25204,8 @@ var require_lt = __commonJS({
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
@@ -25235,8 +25214,8 @@ var require_eq = __commonJS({
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
@@ -25245,8 +25224,8 @@ var require_neq = __commonJS({
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gte5 = (a, b, loose) => compare2(a, b, loose) >= 0;
var compare = require_compare();
var gte5 = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte5;
}
});
@@ -25255,8 +25234,8 @@ var require_gte = __commonJS({
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
return result;
};
var parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], "");
debug3("comp", comp, options);
comp = replaceCarets(comp, options);
debug3("caret", comp);
@@ -26153,12 +26131,12 @@ var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
"use strict";
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set2 = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare2(a, b, options));
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies2(version, range, options);
if (included) {
@@ -26206,7 +26184,7 @@ var require_subset = __commonJS({
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
@@ -26266,7 +26244,7 @@ var require_subset = __commonJS({
}
let gtltComp;
if (gt && lt) {
gtltComp = compare2(gt.semver, lt.semver, options);
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -26346,14 +26324,14 @@ var require_subset = __commonJS({
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
@@ -26377,7 +26355,7 @@ var require_semver2 = __commonJS({
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare2 = require_compare();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
@@ -26415,7 +26393,7 @@ var require_semver2 = __commonJS({
minor,
patch,
prerelease,
compare: compare2,
compare,
rcompare,
compareLoose,
compareBuild,
@@ -26460,17 +26438,16 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.30.9",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
build: "npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26486,7 +26463,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.1.0",
"@actions/cache": "^4.0.5",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26495,7 +26472,6 @@ var require_package = __commonJS({
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/request-error": "^7.0.1",
"@schemastore/package": "0.0.10",
archiver: "^7.0.1",
"check-disk-space": "^3.4.0",
@@ -26509,14 +26485,14 @@ var require_package = __commonJS({
long: "^5.3.2",
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.3",
semver: "^7.7.2",
uuid: "^13.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.4.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3",
@@ -26527,7 +26503,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -26540,7 +26516,7 @@ var require_package = __commonJS({
glob: "^11.0.3",
nock: "^14.0.10",
sinon: "^21.0.0",
typescript: "^5.9.3"
typescript: "^5.9.2"
},
overrides: {
"@actions/tool-cache": {
@@ -28565,7 +28541,7 @@ var require_brace_expansion = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,(?!,).*\}/)) {
if (m.post.match(/,.*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2);
}
@@ -30284,13 +30260,13 @@ var require_semver3 = __commonJS({
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports2.compare = compare2;
function compare2(a, b, loose) {
exports2.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare2(a, b, true);
return compare(a, b, true);
}
exports2.compareBuild = compareBuild;
function compareBuild(a, b, loose) {
@@ -30300,7 +30276,7 @@ var require_semver3 = __commonJS({
}
exports2.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare2(b, a, loose);
return compare(b, a, loose);
}
exports2.sort = sort;
function sort(list, loose) {
@@ -30316,27 +30292,27 @@ var require_semver3 = __commonJS({
}
exports2.gt = gt;
function gt(a, b, loose) {
return compare2(a, b, loose) > 0;
return compare(a, b, loose) > 0;
}
exports2.lt = lt;
function lt(a, b, loose) {
return compare2(a, b, loose) < 0;
return compare(a, b, loose) < 0;
}
exports2.eq = eq;
function eq(a, b, loose) {
return compare2(a, b, loose) === 0;
return compare(a, b, loose) === 0;
}
exports2.neq = neq;
function neq(a, b, loose) {
return compare2(a, b, loose) !== 0;
return compare(a, b, loose) !== 0;
}
exports2.gte = gte5;
function gte5(a, b, loose) {
return compare2(a, b, loose) >= 0;
return compare(a, b, loose) >= 0;
}
exports2.lte = lte;
function lte(a, b, loose) {
return compare2(a, b, loose) <= 0;
return compare(a, b, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a, op, b, loose) {
@@ -67306,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.1.0",
version: "4.0.5",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72115,18 +72091,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "", message: "" };
const message = { ok: false, signedUploadUrl: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72145,10 +72114,6 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72165,8 +72130,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72272,18 +72235,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0", message: "" };
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72302,10 +72258,6 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72322,8 +72274,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73087,7 +73037,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core13 = __importStar4(require_core());
var path5 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73095,6 +73045,7 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73112,14 +73063,6 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73391,6 +73334,9 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core13.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core13.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73402,10 +73348,7 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
if (response.message) {
core13.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
throw new Error("Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73422,9 +73365,6 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73434,8 +73374,6 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core13.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core13.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core13.error(`Failed to save: ${typedError.message}`);
@@ -77972,6 +77910,9 @@ function parseRepositoryNwo(input) {
// src/api-client.ts
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
function getRetryConfig() {
return isInTestMode() ? { retries: 10, retryAfterBaseValue: 1e4 } : { retries: 3, retryAfterBaseValue: 1e3 };
}
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
@@ -77979,7 +77920,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: (0, import_console_log_level.default)({ level: "debug" })
log: (0, import_console_log_level.default)({ level: "debug" }),
retry: getRetryConfig()
})
);
}
@@ -78489,7 +78431,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -78557,11 +78499,6 @@ function isSupportedToolsFeature(versionInfo, feature) {
// src/feature-flags.ts
var featureConfig = {
["allow_toolcache_input" /* AllowToolcacheInput */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
minimumVersion: void 0
},
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
@@ -78718,11 +78655,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -79467,7 +79399,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
action_ref: actionRef,
action_started_at: actionStartedAt.toISOString(),
action_version: getActionVersion(),
analysis_kinds: config?.analysisKinds?.join(","),
analysis_kinds: config?.analysisKinds.join(","),
analysis_key,
build_mode: config?.buildMode,
commit_oid: commitOid,
@@ -79490,7 +79422,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
logger.warning(`Could not determine the workflow event name: ${e}.`);
}
if (config) {
statusReport.languages = config.languages?.join(",");
statusReport.languages = config.languages.join(",");
}
if (diskInfo) {
statusReport.runner_available_disk_space_bytes = diskInfo.numAvailableBytes;
@@ -79527,9 +79459,6 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
logger.warning(
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
);
if (isInTestMode()) {
throw e;
}
return void 0;
}
}

View File

@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
"use strict";
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") {
return a === b ? 0 : a < b ? -1 : 1;
}
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.major < other.major) {
return -1;
}
if (this.major > other.major) {
return 1;
}
if (this.minor < other.minor) {
return -1;
}
if (this.minor > other.minor) {
return 1;
}
if (this.patch < other.patch) {
return -1;
}
if (this.patch > other.patch) {
return 1;
}
return 0;
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
@@ -25142,8 +25121,8 @@ var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports2, module2) {
"use strict";
var SemVer = require_semver();
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare2;
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
@@ -25151,8 +25130,8 @@ var require_compare = __commonJS({
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var rcompare = (a, b, loose) => compare2(b, a, loose);
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
@@ -25161,8 +25140,8 @@ var require_rcompare = __commonJS({
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var compareLoose = (a, b) => compare2(a, b, true);
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
@@ -25205,8 +25184,8 @@ var require_rsort = __commonJS({
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
@@ -25215,8 +25194,8 @@ var require_gt = __commonJS({
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
@@ -25225,8 +25204,8 @@ var require_lt = __commonJS({
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
@@ -25235,8 +25214,8 @@ var require_eq = __commonJS({
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
@@ -25245,8 +25224,8 @@ var require_neq = __commonJS({
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gte5 = (a, b, loose) => compare2(a, b, loose) >= 0;
var compare = require_compare();
var gte5 = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte5;
}
});
@@ -25255,8 +25234,8 @@ var require_gte = __commonJS({
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
return result;
};
var parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], "");
debug2("comp", comp, options);
comp = replaceCarets(comp, options);
debug2("caret", comp);
@@ -26153,12 +26131,12 @@ var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
"use strict";
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set2 = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare2(a, b, options));
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies2(version, range, options);
if (included) {
@@ -26206,7 +26184,7 @@ var require_subset = __commonJS({
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
@@ -26266,7 +26244,7 @@ var require_subset = __commonJS({
}
let gtltComp;
if (gt && lt) {
gtltComp = compare2(gt.semver, lt.semver, options);
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -26346,14 +26324,14 @@ var require_subset = __commonJS({
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
@@ -26377,7 +26355,7 @@ var require_semver2 = __commonJS({
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare2 = require_compare();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
@@ -26415,7 +26393,7 @@ var require_semver2 = __commonJS({
minor,
patch,
prerelease,
compare: compare2,
compare,
rcompare,
compareLoose,
compareBuild,
@@ -26460,17 +26438,16 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.30.9",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
build: "npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26486,7 +26463,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.1.0",
"@actions/cache": "^4.0.5",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26495,7 +26472,6 @@ var require_package = __commonJS({
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/request-error": "^7.0.1",
"@schemastore/package": "0.0.10",
archiver: "^7.0.1",
"check-disk-space": "^3.4.0",
@@ -26509,14 +26485,14 @@ var require_package = __commonJS({
long: "^5.3.2",
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.3",
semver: "^7.7.2",
uuid: "^13.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.4.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3",
@@ -26527,7 +26503,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -26540,7 +26516,7 @@ var require_package = __commonJS({
glob: "^11.0.3",
nock: "^14.0.10",
sinon: "^21.0.0",
typescript: "^5.9.3"
typescript: "^5.9.2"
},
overrides: {
"@actions/tool-cache": {
@@ -28565,7 +28541,7 @@ var require_brace_expansion = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,(?!,).*\}/)) {
if (m.post.match(/,.*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2);
}
@@ -30284,13 +30260,13 @@ var require_semver3 = __commonJS({
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports2.compare = compare2;
function compare2(a, b, loose) {
exports2.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare2(a, b, true);
return compare(a, b, true);
}
exports2.compareBuild = compareBuild;
function compareBuild(a, b, loose) {
@@ -30300,7 +30276,7 @@ var require_semver3 = __commonJS({
}
exports2.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare2(b, a, loose);
return compare(b, a, loose);
}
exports2.sort = sort;
function sort(list, loose) {
@@ -30316,27 +30292,27 @@ var require_semver3 = __commonJS({
}
exports2.gt = gt;
function gt(a, b, loose) {
return compare2(a, b, loose) > 0;
return compare(a, b, loose) > 0;
}
exports2.lt = lt;
function lt(a, b, loose) {
return compare2(a, b, loose) < 0;
return compare(a, b, loose) < 0;
}
exports2.eq = eq;
function eq(a, b, loose) {
return compare2(a, b, loose) === 0;
return compare(a, b, loose) === 0;
}
exports2.neq = neq;
function neq(a, b, loose) {
return compare2(a, b, loose) !== 0;
return compare(a, b, loose) !== 0;
}
exports2.gte = gte5;
function gte5(a, b, loose) {
return compare2(a, b, loose) >= 0;
return compare(a, b, loose) >= 0;
}
exports2.lte = lte;
function lte(a, b, loose) {
return compare2(a, b, loose) <= 0;
return compare(a, b, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a, op, b, loose) {
@@ -67306,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.1.0",
version: "4.0.5",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72115,18 +72091,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "", message: "" };
const message = { ok: false, signedUploadUrl: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72145,10 +72114,6 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72165,8 +72130,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72272,18 +72235,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0", message: "" };
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72302,10 +72258,6 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72322,8 +72274,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73087,7 +73037,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73095,6 +73045,7 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73112,14 +73063,6 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73391,6 +73334,9 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73402,10 +73348,7 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
throw new Error("Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73422,9 +73365,6 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73434,8 +73374,6 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -94506,8 +94444,8 @@ var require_commonjs16 = __commonJS({
if (rootPath === this.root.name) {
return this.root;
}
for (const [compare2, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare2)) {
for (const [compare, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare)) {
return this.roots[rootPath] = root;
}
}
@@ -94516,9 +94454,9 @@ var require_commonjs16 = __commonJS({
/**
* @internal
*/
sameRoot(rootPath, compare2 = this.root.name) {
sameRoot(rootPath, compare = this.root.name) {
rootPath = rootPath.toUpperCase().replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
return rootPath === compare2;
return rootPath === compare;
}
};
exports2.PathWin32 = PathWin32;
@@ -98537,7 +98475,7 @@ var require_b4a = __commonJS({
function byteLength(string, encoding) {
return Buffer.byteLength(string, encoding);
}
function compare2(a, b) {
function compare(a, b) {
return Buffer.compare(a, b);
}
function concat(buffers, totalLength) {
@@ -98638,7 +98576,7 @@ var require_b4a = __commonJS({
allocUnsafe,
allocUnsafeSlow,
byteLength,
compare: compare2,
compare,
concat,
copy,
equals,
@@ -117104,6 +117042,9 @@ var ConfigurationError = class extends Error {
super(message);
}
};
function isInTestMode() {
return process.env["CODEQL_ACTION_TEST_MODE" /* TEST_MODE */] === "true";
}
function getErrorMessage(error2) {
return error2 instanceof Error ? error2.message : String(error2);
}
@@ -117140,6 +117081,9 @@ var githubUtils = __toESM(require_utils4());
var retry = __toESM(require_dist_node15());
var import_console_log_level = __toESM(require_console_log_level());
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
function getRetryConfig() {
return isInTestMode() ? { retries: 10, retryAfterBaseValue: 1e4 } : { retries: 3, retryAfterBaseValue: 1e3 };
}
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
@@ -117147,7 +117091,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: (0, import_console_log_level.default)({ level: "debug" })
log: (0, import_console_log_level.default)({ level: "debug" }),
retry: getRetryConfig()
})
);
}
@@ -117228,7 +117173,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
@@ -117237,11 +117182,6 @@ var semver3 = __toESM(require_semver2());
// src/feature-flags.ts
var featureConfig = {
["allow_toolcache_input" /* AllowToolcacheInput */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
minimumVersion: void 0
},
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
@@ -117398,11 +117338,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

47637
lib/start-proxy-action.js generated

File diff suppressed because it is too large Load Diff

525
lib/upload-lib.js generated

File diff suppressed because it is too large Load Diff

View File

@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
"use strict";
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") {
return a === b ? 0 : a < b ? -1 : 1;
}
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
if (!(other instanceof _SemVer)) {
other = new _SemVer(other, this.options);
}
if (this.major < other.major) {
return -1;
}
if (this.major > other.major) {
return 1;
}
if (this.minor < other.minor) {
return -1;
}
if (this.minor > other.minor) {
return 1;
}
if (this.patch < other.patch) {
return -1;
}
if (this.patch > other.patch) {
return 1;
}
return 0;
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof _SemVer)) {
@@ -25142,8 +25121,8 @@ var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports2, module2) {
"use strict";
var SemVer = require_semver();
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare2;
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
@@ -25151,8 +25130,8 @@ var require_compare = __commonJS({
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var rcompare = (a, b, loose) => compare2(b, a, loose);
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
@@ -25161,8 +25140,8 @@ var require_rcompare = __commonJS({
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var compareLoose = (a, b) => compare2(a, b, true);
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
@@ -25205,8 +25184,8 @@ var require_rsort = __commonJS({
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
@@ -25215,8 +25194,8 @@ var require_gt = __commonJS({
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
@@ -25225,8 +25204,8 @@ var require_lt = __commonJS({
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
@@ -25235,8 +25214,8 @@ var require_eq = __commonJS({
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
@@ -25245,8 +25224,8 @@ var require_neq = __commonJS({
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var gte5 = (a, b, loose) => compare2(a, b, loose) >= 0;
var compare = require_compare();
var gte5 = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte5;
}
});
@@ -25255,8 +25234,8 @@ var require_gte = __commonJS({
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports2, module2) {
"use strict";
var compare2 = require_compare();
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
return result;
};
var parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], "");
debug2("comp", comp, options);
comp = replaceCarets(comp, options);
debug2("caret", comp);
@@ -26153,12 +26131,12 @@ var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
"use strict";
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set2 = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare2(a, b, options));
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies2(version, range, options);
if (included) {
@@ -26206,7 +26184,7 @@ var require_subset = __commonJS({
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies2 = require_satisfies();
var compare2 = require_compare();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
@@ -26266,7 +26244,7 @@ var require_subset = __commonJS({
}
let gtltComp;
if (gt && lt) {
gtltComp = compare2(gt.semver, lt.semver, options);
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -26346,14 +26324,14 @@ var require_subset = __commonJS({
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare2(a.semver, b.semver, options);
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
@@ -26377,7 +26355,7 @@ var require_semver2 = __commonJS({
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare2 = require_compare();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
@@ -26415,7 +26393,7 @@ var require_semver2 = __commonJS({
minor,
patch,
prerelease,
compare: compare2,
compare,
rcompare,
compareLoose,
compareBuild,
@@ -26460,17 +26438,16 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.30.9",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
build: "npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26486,7 +26463,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.1.0",
"@actions/cache": "^4.0.5",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26495,7 +26472,6 @@ var require_package = __commonJS({
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/request-error": "^7.0.1",
"@schemastore/package": "0.0.10",
archiver: "^7.0.1",
"check-disk-space": "^3.4.0",
@@ -26509,14 +26485,14 @@ var require_package = __commonJS({
long: "^5.3.2",
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.3",
semver: "^7.7.2",
uuid: "^13.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.4.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3",
@@ -26527,7 +26503,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -26540,7 +26516,7 @@ var require_package = __commonJS({
glob: "^11.0.3",
nock: "^14.0.10",
sinon: "^21.0.0",
typescript: "^5.9.3"
typescript: "^5.9.2"
},
overrides: {
"@actions/tool-cache": {
@@ -88590,8 +88566,8 @@ var require_commonjs16 = __commonJS({
if (rootPath === this.root.name) {
return this.root;
}
for (const [compare2, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare2)) {
for (const [compare, root] of Object.entries(this.roots)) {
if (this.sameRoot(rootPath, compare)) {
return this.roots[rootPath] = root;
}
}
@@ -88600,9 +88576,9 @@ var require_commonjs16 = __commonJS({
/**
* @internal
*/
sameRoot(rootPath, compare2 = this.root.name) {
sameRoot(rootPath, compare = this.root.name) {
rootPath = rootPath.toUpperCase().replace(/\//g, "\\").replace(uncDriveRegexp, "$1\\");
return rootPath === compare2;
return rootPath === compare;
}
};
exports2.PathWin32 = PathWin32;
@@ -92621,7 +92597,7 @@ var require_b4a = __commonJS({
function byteLength(string, encoding) {
return Buffer.byteLength(string, encoding);
}
function compare2(a, b) {
function compare(a, b) {
return Buffer.compare(a, b);
}
function concat(buffers, totalLength) {
@@ -92722,7 +92698,7 @@ var require_b4a = __commonJS({
allocUnsafe,
allocUnsafeSlow,
byteLength,
compare: compare2,
compare,
concat,
copy,
equals,
@@ -106389,7 +106365,7 @@ var require_brace_expansion3 = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) {
if (m.post.match(/,(?!,).*\}/)) {
if (m.post.match(/,.*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2);
}
@@ -108108,13 +108084,13 @@ var require_semver3 = __commonJS({
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports2.compare = compare2;
function compare2(a, b, loose) {
exports2.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare2(a, b, true);
return compare(a, b, true);
}
exports2.compareBuild = compareBuild;
function compareBuild(a, b, loose) {
@@ -108124,7 +108100,7 @@ var require_semver3 = __commonJS({
}
exports2.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare2(b, a, loose);
return compare(b, a, loose);
}
exports2.sort = sort;
function sort(list, loose) {
@@ -108140,27 +108116,27 @@ var require_semver3 = __commonJS({
}
exports2.gt = gt;
function gt(a, b, loose) {
return compare2(a, b, loose) > 0;
return compare(a, b, loose) > 0;
}
exports2.lt = lt;
function lt(a, b, loose) {
return compare2(a, b, loose) < 0;
return compare(a, b, loose) < 0;
}
exports2.eq = eq;
function eq(a, b, loose) {
return compare2(a, b, loose) === 0;
return compare(a, b, loose) === 0;
}
exports2.neq = neq;
function neq(a, b, loose) {
return compare2(a, b, loose) !== 0;
return compare(a, b, loose) !== 0;
}
exports2.gte = gte5;
function gte5(a, b, loose) {
return compare2(a, b, loose) >= 0;
return compare(a, b, loose) >= 0;
}
exports2.lte = lte;
function lte(a, b, loose) {
return compare2(a, b, loose) <= 0;
return compare(a, b, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a, op, b, loose) {
@@ -110008,7 +109984,7 @@ var require_package3 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.1.0",
version: "4.0.5",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -110591,18 +110567,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "", message: "" };
const message = { ok: false, signedUploadUrl: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110621,10 +110590,6 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -110641,8 +110606,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -110748,18 +110711,11 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0", message: "" };
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110778,10 +110734,6 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -110798,8 +110750,6 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -111563,7 +111513,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -111571,6 +111521,7 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config2();
var tar_1 = require_tar2();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -111588,14 +111539,6 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -111867,6 +111810,9 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -111878,10 +111824,7 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
throw new Error("Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -111898,9 +111841,6 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -111910,8 +111850,6 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -117104,6 +117042,9 @@ var ConfigurationError = class extends Error {
super(message);
}
};
function isInTestMode() {
return process.env["CODEQL_ACTION_TEST_MODE" /* TEST_MODE */] === "true";
}
function getErrorMessage(error2) {
return error2 instanceof Error ? error2.message : String(error2);
}
@@ -117144,6 +117085,9 @@ var githubUtils = __toESM(require_utils4());
var retry = __toESM(require_dist_node15());
var import_console_log_level = __toESM(require_console_log_level());
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
function getRetryConfig() {
return isInTestMode() ? { retries: 10, retryAfterBaseValue: 1e4 } : { retries: 3, retryAfterBaseValue: 1e3 };
}
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
@@ -117151,7 +117095,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: (0, import_console_log_level.default)({ level: "debug" })
log: (0, import_console_log_level.default)({ level: "debug" }),
retry: getRetryConfig()
})
);
}
@@ -117387,7 +117332,7 @@ function withGroup(groupName, f) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
@@ -117400,11 +117345,6 @@ function isSafeArtifactUpload(codeQlVersion) {
// src/feature-flags.ts
var featureConfig = {
["allow_toolcache_input" /* AllowToolcacheInput */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
minimumVersion: void 0
},
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
@@ -117561,11 +117501,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -117647,7 +117582,7 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion
if (fs.existsSync(baseTempDir)) {
const outputDirs = fs.readdirSync(baseTempDir);
for (const outputDir of outputDirs) {
const sarifFiles = fs.readdirSync(path.resolve(baseTempDir, outputDir)).filter((f) => path.extname(f) === ".sarif");
const sarifFiles = fs.readdirSync(path.resolve(baseTempDir, outputDir)).filter((f) => f.endsWith(".sarif"));
for (const sarifFile of sarifFiles) {
toUpload.push(path.resolve(baseTempDir, outputDir, sarifFile));
}

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