Compare commits

..

105 Commits

Author SHA1 Message Date
Mads Navntoft
2cdef7d057 hack: add python job to see if there are any alerts 2025-09-15 14:47:03 +02:00
Paolo Tranquilli
aa90e97ad2 Merge pull request #3091 from github/redsun82/fix-windows-ci
Set `shell: bash` by default on all workflows
2025-09-12 18:47:08 +02:00
Paolo Tranquilli
2b7d487cf8 Update .github/workflows/codeql.yml
Co-authored-by: Henry Mercer <henrymercer@github.com>
2025-09-12 18:20:44 +02:00
Paolo Tranquilli
f92cc3a0e7 Merge pull request #3065 from github/redsun82/update-brace-expansion
Use brace-expansion >2.0.1
2025-09-12 16:06:42 +02:00
Nick Rolfe
185266a022 Merge pull request #3107 from github/nickrolfe/minimize-jars
Add feature flag to roll out JAR minimization in the Java extractor
2025-09-12 13:09:42 +01:00
Paolo Tranquilli
a1244387b0 Merge branch 'main' into redsun82/update-brace-expansion 2025-09-12 13:44:46 +02:00
Michael B. Gale
dc9a47dceb Merge pull request #3110 from github/mbg/proxy/fetch-from-release
Fetch proxy binaries from `defaults.json` release
2025-09-12 12:38:15 +01:00
Nick Rolfe
3ca9525ddd Add changelog entry for Java dependency minimization rollout 2025-09-12 12:10:05 +01:00
Nick Rolfe
0abf548bb3 Add feature flag to roll out JAR minimization in the Java extractor 2025-09-12 12:09:34 +01:00
Michael B. Gale
e2636d2e4f Change "current release" to "linked release" 2025-09-12 11:15:03 +01:00
Henry Mercer
df1fe23118 Merge pull request #3083 from github/henrymercer/resolve-languages-default-queries
Resolve supported languages using CodeQL CLI
2025-09-12 10:12:15 +01:00
Chuan-kai Lin
0d33fd9f26 Merge pull request #3109 from github/cklin/init-save-updated-config
init-action: save updated config
2025-09-11 14:18:59 -07:00
Chuan-kai Lin
5c30ae46c1 Stop saving config in initConfig() 2025-09-11 12:31:29 -07:00
Michael B. Gale
9df23425dc Search release pointed at by defaults.json for registry proxy artifact 2025-09-11 18:56:19 +01:00
Paolo Tranquilli
4e1dadc5b3 Fix accidental removal of - shell: bash lines 2025-09-11 17:54:28 +02:00
Paolo Tranquilli
856e1e5c78 Address review 2025-09-11 17:54:00 +02:00
Paolo Tranquilli
d797efbb26 Merge branch 'main' into redsun82/fix-windows-ci 2025-09-11 17:41:08 +02:00
Chuan-kai Lin
4e2e64a92a init-action: save updated config
This commit updates the init action to save the config again at the end
of run(), so that config updates in run() are correctly propagated to
the analyze action.
2025-09-11 08:07:50 -07:00
Michael B. Gale
ffcbb4c0c1 Move UPDATEJOB_PROXY constants to start-proxy.ts 2025-09-11 15:34:29 +01:00
Michael B. Gale
148e76abb6 Merge pull request #3108 from github/mbg/changelog/workflow-validation
Add changelog entry for improved version consistency checks
2025-09-11 14:06:40 +01:00
Michael B. Gale
21a1feb391 Add changenote for improved version consistency checks 2025-09-11 12:03:09 +01:00
Michael B. Gale
1479235f5d Merge pull request #3100 from github/mbg/config-version
Store and check action version in `Config`
2025-09-11 11:56:05 +01:00
Michael B. Gale
0d058cdc59 Merge pull request #3099 from github/mbg/validate-action-version-in-workflow
Validate workflow to check that all `codeql-action` versions are the same
2025-09-11 11:53:14 +01:00
Chuan-kai Lin
25e54dffab Merge pull request #3105 from github/mergeback/v3.30.3-to-main-192325c8
Mergeback v3.30.3 refs/heads/releases/v3 into main
2025-09-10 10:55:01 -07:00
github-actions[bot]
25c32186df Rebuild 2025-09-10 17:35:23 +00:00
github-actions[bot]
191d3de659 Update changelog and version after v3.30.3 2025-09-10 17:32:56 +00:00
Chuan-kai Lin
192325c861 Merge pull request #3104 from github/update-v3.30.3-b660efdcf
Merge main into releases/v3
2025-09-10 10:32:26 -07:00
github-actions[bot]
e68956d90b Update changelog for v3.30.3 2025-09-10 15:34:46 +00:00
Michael B. Gale
b660efdcfd Merge pull request #3103 from github/mbg/fix/category-check
Fix `runInterpretResultsFor` using the wrong `AnalysisConfig` for Code Quality `category` fix
2025-09-10 16:30:12 +01:00
Michael B. Gale
e49458befe Fix runInterpretResultsFor using the wrong AnalysisConfig for category fix 2025-09-10 16:14:19 +01:00
Kasper Svendsen
f374a62c8b Merge pull request #3098 from github/kaspersv/increase-overlay-base-size-limit
Overlay: Increase size limit for cached overlay base database
2025-09-10 15:01:08 +02:00
Michael B. Gale
0487de31f2 Update src/config-utils.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-10 13:47:47 +01:00
Michael B. Gale
754f2e184f Simplify step.uses condition 2025-09-10 13:35:39 +01:00
Michael B. Gale
4f56152a48 Store and check action version in Config 2025-09-10 13:33:17 +01:00
Michael B. Gale
5efa438e92 Merge pull request #3101 from github/mbg/public-repo-notice-in-pr-template
Add a reminder to the PR template that this is a public repo
2025-09-10 13:29:04 +01:00
Michael B. Gale
bb98ff4838 Validate workflow to check that all codeql-action versions are the same 2025-09-10 13:02:28 +01:00
Kasper Svendsen
8a84a62542 Overlay: Increase size limit for cached overlay base database 2025-09-10 12:30:56 +02:00
Paolo Tranquilli
eb50a881d8 Merge pull request #3097 from github/redsun82/only-dump-sarif
Dump soon to be uploaded SARIF on request
2025-09-10 12:07:32 +02:00
Paolo Tranquilli
4c534612bf Tweak sarif dump log 2025-09-10 07:52:59 +02:00
Paolo Tranquilli
dae3742b0a Dump soon to be uploaded SARIF on request
This introduces a new internal environment variable flag
(`CODEQL_ACTION_SARIF_DUMP_DIR`) that, when set to `true`, causes the
SARIF file that will be uploaded to be dumped to the specified
directory. The filename will be `upload.sarif` or `upload.quality.sarif`
depending on the upload target.
2025-09-10 07:46:05 +02:00
Henry Mercer
31d3ae847e Merge pull request #3095 from github/copilot/fix-9c4e2e82-c57a-4af0-8336-b8b24b72dba3
Remove --intra-layer-parallelism flag from CodeQL CLI commands
2025-09-09 20:18:54 +01:00
Michael B. Gale
3bf58bb047 Merge branch 'main' into redsun82/fix-windows-ci 2025-09-09 19:35:16 +01:00
copilot-swe-agent[bot]
2a4630c7f1 Remove --intra-layer-parallelism flag from CodeQL CLI commands
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-09 16:53:28 +00:00
copilot-swe-agent[bot]
4366c13457 Initial plan 2025-09-09 16:33:51 +00:00
Henry Mercer
ed9d73bc6f Alphabetically order ToolsFeature 2025-09-09 14:42:39 +01:00
Paolo Tranquilli
c778749ed4 fix codeql.yml codeql invocation on windows 2025-09-09 14:08:29 +02:00
Paolo Tranquilli
0c065fa4cf Sort out windows CRLF mess 2025-09-09 14:00:28 +02:00
Michael B. Gale
52ddbe1e52 Merge pull request #3092 from github/mergeback/v3.30.2-to-main-d3678e23
Mergeback v3.30.2 refs/heads/releases/v3 into main
2025-09-09 12:10:43 +01:00
github-actions[bot]
6c261ed0c7 Rebuild 2025-09-09 10:36:55 +00:00
github-actions[bot]
deb055de7e Update changelog and version after v3.30.2 2025-09-09 10:34:25 +00:00
Michael B. Gale
d3678e237b Merge pull request #3090 from github/update-v3.30.2-d7a501da0
Merge main into releases/v3
2025-09-09 11:33:45 +01:00
Michael B. Gale
14bbb6a806 Add changelog entries 2025-09-09 11:20:20 +01:00
Paolo Tranquilli
1b8f0ffedf Set shell: bash by default on all workflows 2025-09-09 12:19:45 +02:00
github-actions[bot]
a879d03368 Update changelog for v3.30.2 2025-09-09 10:12:06 +00:00
Michael B. Gale
d7a501da01 Merge pull request #3085 from github/mbg/multi-language-repo/gitignore
Add C# artifacts to `.gitignore` for `multi-language-repo`
2025-09-09 11:10:03 +01:00
Henry Mercer
c90f0747e2 Merge pull request #3087 from github/dependabot/npm_and_yarn/npm-1cf7fedfcf
Bump the npm group with 5 updates
2025-09-08 18:46:27 +01:00
Michael B. Gale
d8df826a79 Merge pull request #3086 from github/mbg/docs/required-checks
Clarify instructions for updating PR checks to avoid emphasis on `main`
2025-09-08 18:41:00 +01:00
github-actions[bot]
23419de6bd Rebuild 2025-09-08 17:18:08 +00:00
dependabot[bot]
7d8e1e924f Bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [uuid](https://github.com/uuidjs/uuid) | `11.1.0` | `12.0.0` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.34.0` | `9.35.0` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.7.0` | `7.7.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.41.0` | `8.43.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.41.0` | `8.43.0` |


Updates `uuid` from 11.1.0 to 12.0.0
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v12.0.0)

Updates `@eslint/js` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.35.0/packages/js)

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

Updates `@typescript-eslint/eslint-plugin` from 8.41.0 to 8.43.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.41.0 to 8.43.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/parser)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@eslint/js"
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-version: 7.7.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 17:16:35 +00:00
Michael B. Gale
76a3cccaa4 Clarify instructions for updating PR checks for PRs 2025-09-08 17:35:54 +01:00
Michael B. Gale
01fd48d5b6 Remove comment about main from update-required-checks.sh 2025-09-08 17:29:49 +01:00
Michael B. Gale
ec4b36c090 Add C# artifacts to .gitignore for multi-language-repo 2025-09-08 16:19:57 +01:00
Michael B. Gale
0a56aada02 Merge pull request #3064 from github/mbg/cq/allow-cq-only-analysis
Allow Code Quality only analysis
2025-09-08 16:13:19 +01:00
Chuan-kai Lin
1c6bc389a1 Merge pull request #3080 from github/cklin/overlay-db-automation-id
Overlay: add automation ID to cache key
2025-09-08 06:33:55 -07:00
Paolo Tranquilli
d42097d387 Build 2025-09-08 14:05:29 +02:00
Paolo Tranquilli
16f15bc9a7 Merge branch 'main' into redsun82/update-brace-expansion 2025-09-08 14:03:32 +02:00
Michael B. Gale
144880b6f0 Merge pull request #3084 from github/mbg/fix/hasActionsWorkflows
Fix `hasActionsWorkflows` throwing an exception if the workflows folder doesn't exist
2025-09-08 09:54:45 +01:00
Paolo Tranquilli
f11caf4aad Override brace-expansion from 2.0.1 to 2.0.2 2025-09-08 10:53:44 +02:00
Michael B. Gale
e045f5eeb4 Fix hasActionsWorkflows throwing if workflows folder doesn't exist 2025-09-05 21:11:33 +01:00
Michael B. Gale
ab82675d3b Add test to check hasActionsWorkflows doesn't throw 2025-09-05 21:10:17 +01:00
Chuan-kai Lin
0e42ed405c build: refresh js files 2025-09-05 11:38:15 -07:00
Chuan-kai Lin
0a3d60d97c Overlay: clarify save vs restore keys 2025-09-05 11:37:03 -07:00
Chuan-kai Lin
fc5847810e Overlay: clarify componentsJson computation
This commit updates componentsJson computation to call JSON.stringify()
without the replacer array and documents why the result is stable.
2025-09-05 11:36:58 -07:00
Henry Mercer
71410c6e72 Enable feature in CI for testing 2025-09-05 16:56:51 +01:00
Henry Mercer
d981505040 Add log for supported languages 2025-09-05 16:56:15 +01:00
Henry Mercer
f8fb310547 Resolve supported languages using CodeQL CLI 2025-09-05 16:17:32 +01:00
Michael B. Gale
e75b5d3373 Fix: Include matrix.analysis-kinds in artifact names 2025-09-05 14:27:28 +01:00
Arthur Baars
aeaa720d65 Merge pull request #3082 from github/mergeback/v3.30.1-to-main-f1f6e5f6
Mergeback v3.30.1 refs/heads/releases/v3 into main
2025-09-05 14:26:13 +02:00
github-actions[bot]
6f2d6bb779 Rebuild 2025-09-05 11:59:47 +00:00
github-actions[bot]
b92db7e193 Update changelog and version after v3.30.1 2025-09-05 11:56:50 +00:00
Michael B. Gale
918e792ec9 Throw an error if query customisations are enabled for a code-quality-only analysis 2025-09-05 12:44:30 +01:00
Michael B. Gale
5d822f13cd Rename getDbAnalysisKind and getDbAnalysisConfig 2025-09-05 12:39:34 +01:00
Michael B. Gale
6d0bcea699 Matrix over analysis-kinds in quality-queries check 2025-09-05 12:35:53 +01:00
Chuan-kai Lin
4c82ae2356 Overlay: add automation ID to cache key
This commit adds automation ID to the overlay-base database cache key so
that we properly distinguish different analyses in the same repo for the
same language.

Since I am changing the cache key format, I also moved the CodeQL bundle
version to the end of the cache restore key, in case we want to remove
it from the restore key sometime in the future.

Note that I chose to leave CACHE_VERSION unchanged because the old and
the new cache keys are sufficiently different that there should be no
risk of confusion.
2025-09-04 14:13:15 -07:00
Michael B. Gale
38f1a70179 Add runInterpretResultsFor to de-duplicate code for interpret-results 2025-09-04 12:25:50 +01:00
Michael B. Gale
d08e9a2e04 Make conditions for interpret-results more robust 2025-09-04 12:14:12 +01:00
Michael B. Gale
ae2df70629 Make code that builds the list of queries for run-queries more robust in the event of future changes 2025-09-04 12:03:24 +01:00
Michael B. Gale
f4fca70590 Do not mutate originalUserInput 2025-09-04 11:56:48 +01:00
Michael B. Gale
51d74ac81c Remove default arguments from uploadSpecifiedFiles and validateUniqueCategory 2025-09-04 11:44:36 +01:00
Michael B. Gale
3ee9287c7a Update condition and comment for CQ-only config 2025-09-04 11:44:34 +01:00
Michael B. Gale
7baedbc3b8 Check if Code Scanning is enabled before uploading Code Scanning SARIF 2025-09-04 11:43:54 +01:00
Michael B. Gale
86275f6e9a Fix addSarifExtension and add tests 2025-09-04 11:43:54 +01:00
Michael B. Gale
01fe6a1120 Override query configuration for Code Quality only analyses 2025-09-04 11:43:51 +01:00
Michael B. Gale
811aef84cb Move isDefined from start-proxy to util 2025-09-04 11:39:22 +01:00
Michael B. Gale
244e04cc4a Add test with analysisKindsInput: code-quality 2025-09-04 11:39:22 +01:00
Michael B. Gale
8ea50b8f82 Add and use helpers for determining analysis config the DB is initialised with 2025-09-04 11:39:22 +01:00
Michael B. Gale
04bb07498c Add sarifExtension field to AnalysisConfig 2025-09-04 11:39:22 +01:00
Michael B. Gale
6d2d2042ff Add note for getPerQueryAlertCounts 2025-09-04 11:39:21 +01:00
Michael B. Gale
ff57bbf22c Handle different permutations of analysis kinds in analyze action 2025-09-04 11:39:21 +01:00
Michael B. Gale
e4ffe6f3e5 Only specify queries for run-queries if both analysis kinds are enabled 2025-09-04 11:39:21 +01:00
Michael B. Gale
cb8f28fbf7 Add kind property to AnalysisConfig and documentation 2025-09-04 11:39:21 +01:00
Michael B. Gale
01627081ff Rename UploadTarget to AnalysisConfig 2025-09-04 11:39:18 +01:00
Michael B. Gale
ca7dd4ad38 Move UploadTarget definitions to analyses.ts 2025-09-04 11:38:53 +01:00
Michael B. Gale
85a4853504 Add utility function to check if code scanning is enabled 2025-09-04 11:38:07 +01:00
Michael B. Gale
434df8e95c Update checks to use analysis-kinds instead of quality-queries 2025-09-04 11:38:06 +01:00
160 changed files with 4472 additions and 1252 deletions

View File

@@ -1,4 +1,4 @@
<!-- For GitHub staff: Remember that this is a public repository. -->
### Risk assessment

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
all-platform-bundle:
strategy:
@@ -70,7 +73,6 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
analyze-ref-input:
strategy:
@@ -74,7 +77,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
autobuild-action:
strategy:
@@ -67,7 +70,6 @@ jobs:
CORECLR_PROFILER_PATH_64: ''
- uses: ./../action/analyze
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then

View File

@@ -34,6 +34,9 @@ on:
description: The version of Java to install
required: false
default: '17'
defaults:
run:
shell: bash
jobs:
autobuild-direct-tracing-with-working-dir:
strategy:
@@ -70,7 +73,6 @@ jobs:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Test setup
shell: bash
run: |
# Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir
@@ -82,7 +84,6 @@ jobs:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
shell: bash
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -34,6 +34,9 @@ on:
description: The version of Java to install
required: false
default: '17'
defaults:
run:
shell: bash
jobs:
autobuild-direct-tracing:
strategy:
@@ -70,7 +73,6 @@ jobs:
java-version: ${{ inputs.java-version || '17' }}
distribution: temurin
- name: Set up Java test repo configuration
shell: bash
run: |
mv * .github ../action/tests/multi-language-repo/
mv ../action/tests/multi-language-repo/.github/workflows .github
@@ -85,7 +87,6 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
shell: bash
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
build-mode-autobuild:
strategy:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
build-mode-manual:
strategy:
@@ -81,7 +84,6 @@ jobs:
fi
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
build-mode-none:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
build-mode-rollback:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
bundle-toolcache:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
bundle-zstd:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
cleanup-db-cluster-dir:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
config-export:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
config-input:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
cpp-deptrace-disabled:
strategy:
@@ -53,7 +56,6 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -65,8 +67,7 @@ jobs:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
- shell: bash
run: |
- run: |
if ls /usr/bin/errno; then
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
exit 1

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
cpp-deptrace-enabled-on-macos:
strategy:
@@ -51,7 +54,6 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -63,8 +65,7 @@ jobs:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
- run: |
if ! ls /usr/bin/errno; then
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
else

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
cpp-deptrace-enabled:
strategy:
@@ -53,7 +56,6 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -65,8 +67,7 @@ jobs:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
- run: |
if ! ls /usr/bin/errno; then
echo "Did not autoinstall errno"
exit 1

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
diagnostics-export:
strategy:
@@ -64,7 +67,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Add test diagnostics
shell: bash
env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: |

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
export-file-baseline-information:
strategy:
@@ -73,7 +76,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -85,7 +87,6 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
expected_baseline_languages="c csharp go java kotlin javascript python ruby"

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
extractor-ram-threads:
strategy:
@@ -54,7 +57,6 @@ jobs:
ram: 230
threads: 1
- name: Assert Results
shell: bash
run: |
if [ "${CODEQL_RAM}" != "230" ]; then
echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230"

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-custom-queries:
strategy:
@@ -71,7 +74,6 @@ jobs:
config-file: ./.github/codeql/custom-queries.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-indirect-tracing-workaround-diagnostic:
strategy:
@@ -72,7 +75,6 @@ jobs:
with:
go-version: '1.20'
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-indirect-tracing-workaround-no-file-program:
strategy:
@@ -73,7 +76,6 @@ jobs:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-indirect-tracing-workaround:
strategy:
@@ -68,11 +71,9 @@ jobs:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
- shell: bash
run: |
- run: |
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \
"CODEQL_ACTION_GO_BINARY environment variable is not set."

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-tracing-autobuilder:
strategy:
@@ -99,8 +102,7 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
- uses: ./../action/analyze
- shell: bash
run: |
- run: |
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
echo "Expected the Go autobuilder to be run, but the" \
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true."

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-tracing-custom-build-steps:
strategy:
@@ -98,11 +101,9 @@ jobs:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
- shell: bash
run: |
- run: |
# Once we start running Bash 4.2 in all environments, we can replace the
# `! -z` flag with the more elegant `-v` which confirms that the variable
# is actually unset and not potentially set to a blank value.

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
go-tracing-legacy-workflow:
strategy:
@@ -98,8 +101,7 @@ jobs:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
- shell: bash
run: |
- run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d go ]]; then
echo "Did not find a Go database"

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
init-with-registries:
strategy:
@@ -78,7 +81,6 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Verify packages installed
shell: bash
run: |
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
@@ -100,7 +102,6 @@ jobs:
fi
- name: Verify qlconfig.yml file was created
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
@@ -115,7 +116,6 @@ jobs:
- name: Verify contents of qlconfig.yml
# yq is not available on windows
if: runner.os != 'Windows'
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
javascript-source-root:
strategy:
@@ -53,7 +56,6 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Move codeql-action
shell: bash
run: |
mkdir ../new-source-root
mv * ../new-source-root
@@ -66,7 +68,6 @@ jobs:
with:
skip-queries: true
- name: Assert database exists
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d javascript ]]; then

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
job-run-uuid-sarif:
strategy:
@@ -63,7 +66,6 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
language-aliases:
strategy:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
multi-language-autodetect:
strategy:
@@ -94,7 +97,6 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Use Xcode 16
shell: bash
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app"
@@ -107,7 +109,6 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
@@ -116,7 +117,6 @@ jobs:
upload-database: false
- name: Check language autodetect for all languages excluding Swift
shell: bash
run: |
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
@@ -156,7 +156,6 @@ jobs:
- name: Check language autodetect for Swift on macOS
if: runner.os == 'macOS'
shell: bash
run: |
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
@@ -164,4 +163,5 @@ jobs:
exit 1
fi
env:
CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI: true
CODEQL_ACTION_TEST_MODE: true

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
overlay-init-fallback:
strategy:
@@ -61,7 +64,6 @@ jobs:
with:
upload-database: false
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases/actions"
if ! grep -q 'overlayBaseDatabase: false' codeql-database.yml ; then

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
packaging-codescanning-config-inputs-js:
strategy:
@@ -93,7 +96,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -109,7 +111,6 @@ jobs:
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
packaging-config-inputs-js:
strategy:
@@ -93,7 +96,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -109,7 +111,6 @@ jobs:
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
packaging-config-js:
strategy:
@@ -92,7 +95,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -108,7 +110,6 @@ jobs:
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
packaging-inputs-js:
strategy:
@@ -93,7 +96,6 @@ jobs:
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -108,7 +110,6 @@ jobs:
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
quality-queries:
strategy:
@@ -32,16 +35,58 @@ jobs:
include:
- os: ubuntu-latest
version: linked
analysis-kinds: code-scanning
- os: ubuntu-latest
version: linked
analysis-kinds: code-quality
- 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
- os: ubuntu-latest
version: nightly-latest
analysis-kinds: code-quality
- 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
permissions:
contents: read
@@ -61,25 +106,30 @@ jobs:
- uses: ./../action/init
with:
languages: javascript
quality-queries: code-quality
analysis-kinds: ${{ matrix.analysis-kinds }}
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload security SARIF
if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/upload-artifact@v4
with:
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.sarif.json
name: |
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Upload quality SARIF
if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/upload-artifact@v4
with:
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.quality.sarif.json
name: |
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.quality.sarif.json
path: ${{ runner.temp }}/results/javascript.quality.sarif
retention-days: 7
- name: Check quality query does not appear in security SARIF
if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
@@ -87,6 +137,7 @@ jobs:
with:
script: ${{ env.CHECK_SCRIPT }}
- name: Check quality query appears in quality SARIF
if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
remote-config:
strategy:
@@ -72,7 +75,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
resolve-environment-action:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
rubocop-multi-language:
strategy:
@@ -53,13 +56,10 @@ jobs:
with:
ruby-version: 2.6
- name: Install Code Scanning integration
shell: bash
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
- name: Install dependencies
shell: bash
run: bundle install
- name: RuboCop run
shell: bash
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif

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

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
ruby:
strategy:
@@ -67,7 +70,6 @@ jobs:
with:
upload-database: false
- name: Check database
shell: bash
run: |
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
if [[ ! -d "$RUBY_DB" ]]; then

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

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
rust:
strategy:
@@ -65,7 +68,6 @@ jobs:
with:
upload-database: false
- name: Check database
shell: bash
run: |
RUST_DB="${{ fromJson(steps.analysis.outputs.db-locations).rust }}"
if [[ ! -d "$RUST_DB" ]]; then

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
split-workflow:
strategy:
@@ -80,7 +83,6 @@ jobs:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -89,7 +91,6 @@ jobs:
upload-database: false
- name: Assert No Results
shell: bash
run: |
if [ "$(ls -A $RUNNER_TEMP/results)" ]; then
echo "Expected results directory to be empty after skipping query execution!"
@@ -100,7 +101,6 @@ jobs:
output: ${{ runner.temp }}/results
upload-database: false
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
start-proxy:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
submit-sarif-failure:
strategy:

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
swift-autobuild:
strategy:
@@ -55,7 +58,6 @@ jobs:
build-mode: autobuild
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check working directory
shell: bash
run: pwd
- uses: ./../action/autobuild
timeout-minutes: 30
@@ -64,7 +66,6 @@ jobs:
with:
upload-database: false
- name: Check database
shell: bash
run: |
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
if [[ ! -d "$SWIFT_DB" ]]; then

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
swift-custom-build:
strategy:
@@ -68,7 +71,6 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Use Xcode 16
shell: bash
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app"
- uses: ./../action/init
@@ -77,17 +79,14 @@ jobs:
languages: swift
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check working directory
shell: bash
run: pwd
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- name: Check database
shell: bash
run: |
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
if [[ ! -d "$SWIFT_DB" ]]; then

View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
test-autobuild-working-dir:
strategy:
@@ -49,7 +52,6 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Test setup
shell: bash
run: |
# Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir
@@ -64,7 +66,6 @@ jobs:
working-directory: autobuild-dir
- uses: ./../action/analyze
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d java ]]; then

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
test-local-codeql:
strategy:
@@ -64,7 +67,6 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Fetch a CodeQL bundle
shell: bash
env:
CODEQL_URL: ${{ steps.prepare-test.outputs.tools-url }}
run: |
@@ -76,7 +78,6 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ./codeql-bundle-linux64.tar.zst
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:

3
.github/workflows/__test-proxy.yml generated vendored
View File

@@ -24,6 +24,9 @@ on:
inputs: {}
workflow_call:
inputs: {}
defaults:
run:
shell: bash
jobs:
test-proxy:
strategy:

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
unset-environment:
strategy:
@@ -73,14 +76,12 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- shell: bash
run: |
- run: |
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
echo "::error::Did not create a database for CPP, or created it in the wrong location." \

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
upload-quality-sarif:
strategy:
@@ -73,9 +76,8 @@ jobs:
languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
quality-queries: code-quality
analysis-kinds: code-scanning,code-quality
- name: Build code
shell: bash
run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
upload-ref-sha-input:
strategy:
@@ -74,7 +77,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze

View File

@@ -34,6 +34,9 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
defaults:
run:
shell: bash
jobs:
with-checkout-path:
strategy:
@@ -68,7 +71,6 @@ jobs:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Delete original checkout
shell: bash
run: |
# delete the original checkout so we don't accidentally use it.
# Actions does not support deleting the current working directory, so we
@@ -89,7 +91,6 @@ jobs:
source-root: x/y/z/some-path/tests/multi-language-repo
- name: Build code
shell: bash
working-directory: x/y/z/some-path/tests/multi-language-repo
run: |
./build.sh
@@ -101,7 +102,6 @@ jobs:
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
- name: Verify SARIF after upload
shell: bash
run: |
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
EXPECTED_REF="v1.1.0"

View File

@@ -9,6 +9,10 @@ on:
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
defaults:
run:
shell: bash
jobs:
check-expected-release-files:
runs-on: ubuntu-latest

View File

@@ -13,6 +13,10 @@ on:
- cron: '30 1 * * 0'
workflow_dispatch:
defaults:
run:
shell: bash
env:
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
@@ -95,7 +99,10 @@ jobs:
tools: ${{ matrix.tools }}
# confirm steps.init.outputs.codeql-path points to the codeql binary
- name: Print CodeQL Version
run: ${{steps.init.outputs.codeql-path}} version --format=json
run: >
"$CODEQL" version --format=json
env:
CODEQL: ${{steps.init.outputs.codeql-path}}
- name: Perform CodeQL Analysis
uses: ./analyze
with:
@@ -124,3 +131,26 @@ jobs:
uses: ./analyze
with:
category: "/language:actions"
analyze-python:
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: ./init
with:
languages: python
config-file: ./.github/codeql/codeql-actions-config.yml
- name: Perform CodeQL Analysis
uses: ./analyze
with:
category: "/language:python"

View File

@@ -22,6 +22,10 @@ on:
- cron: '0 5 * * *'
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
code-scanning-config-tests:
continue-on-error: true

View File

@@ -17,6 +17,11 @@ on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
upload-artifacts:
strategy:
@@ -55,7 +60,6 @@ jobs:
debug-artifact-name: my-debug-artifacts
debug-database-name: my-db
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
@@ -75,7 +79,6 @@ jobs:
- name: Download all artifacts
uses: actions/download-artifact@v5
- name: Check expected artifacts exist
shell: bash
run: |
LANGUAGES="cpp csharp go java javascript python"
for version in $VERSIONS; do

View File

@@ -16,6 +16,11 @@ on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
upload-artifacts:
strategy:
@@ -54,7 +59,6 @@ jobs:
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu
languages: cpp,csharp,go,java,javascript,python,ruby
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
@@ -69,7 +73,6 @@ jobs:
- name: Download all artifacts
uses: actions/download-artifact@v5
- name: Check expected artifacts exist
shell: bash
run: |
VERSIONS="stable-v2.20.3 default linked nightly-latest"
LANGUAGES="cpp csharp go java javascript python"

View File

@@ -18,6 +18,10 @@ on:
branches:
- releases/v*
defaults:
run:
shell: bash
jobs:
merge-back:
runs-on: ubuntu-latest

View File

@@ -8,6 +8,10 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
unit-tests:
name: Unit Tests
@@ -22,6 +26,10 @@ jobs:
timeout-minutes: 45
steps:
- name: Prepare git (Windows)
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- uses: actions/checkout@v5
- name: Set up Node.js

View File

@@ -22,6 +22,10 @@ on:
paths:
- .github/workflows/prepare-release.yml
defaults:
run:
shell: bash
jobs:
prepare:
name: "Prepare release"

View File

@@ -4,6 +4,10 @@ on:
release:
types: [published]
defaults:
run:
shell: bash
jobs:
publish:
runs-on: ubuntu-latest

View File

@@ -12,6 +12,10 @@ on:
- cron: '0 0 * * 1'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
test-setup-python-scripts:
env:

View File

@@ -15,6 +15,10 @@ on:
- cron: '0 5 * * *'
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
query-filters:
name: Query Filters Tests

View File

@@ -5,6 +5,10 @@ on:
types: [labeled]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
rebuild:
name: Rebuild Action

View File

@@ -14,6 +14,10 @@ on:
- .github/workflows/rollback-release.yml
- .github/actions/prepare-mergeback-branch/**
defaults:
run:
shell: bash
jobs:
prepare:
name: "Prepare release"
@@ -53,7 +57,6 @@ jobs:
- name: Create tag for testing
if: github.event_name != 'workflow_dispatch'
shell: bash
run: git tag v0.0.0
# We start by preparing the mergeback branch, mainly so that we have the updated changelog
@@ -96,7 +99,6 @@ jobs:
echo "::endgroup::"
- name: Create tags
shell: bash
env:
# We usually expect to checkout `inputs.rollback-tag` (required for `workflow_dispatch`),
# but use `v0.0.0` for testing.
@@ -111,7 +113,6 @@ jobs:
- name: Push tags
# skip when testing
if: github.event_name == 'workflow_dispatch'
shell: bash
env:
RELEASE_TAG: ${{ needs.prepare.outputs.version }}
MAJOR_VERSION_TAG: ${{ needs.prepare.outputs.major_version }}
@@ -160,7 +161,6 @@ jobs:
echo "Created draft rollback release at $RELEASE_URL" >> $GITHUB_STEP_SUMMARY
- name: Update changelog
shell: bash
env:
NEW_CHANGELOG: "${{ runner.temp }}/new_changelog.md"
NEW_BRANCH: "${{ steps.mergeback-branch.outputs.new-branch }}"

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Update the required checks based on the current branch.
# Typically, this will be main.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
REPO_DIR="$(dirname "$SCRIPT_DIR")"

View File

@@ -16,6 +16,9 @@ on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
test-codeql-bundle-all:
strategy:
@@ -46,7 +49,6 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:

View File

@@ -13,6 +13,10 @@ on:
# to filter pre-release attribute.
types: [published]
defaults:
run:
shell: bash
jobs:
update-bundle:
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')

View File

@@ -7,6 +7,10 @@ on:
type: string
required: true
defaults:
run:
shell: bash
jobs:
update:
name: Update code and create PR
@@ -20,7 +24,6 @@ jobs:
steps:
- name: Check release tag format
id: checks
shell: bash
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."
@@ -30,7 +33,6 @@ jobs:
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
- name: Check that the release exists
shell: bash
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
@@ -46,20 +48,17 @@ jobs:
ref: main
- name: Update git config
shell: bash
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
shell: bash
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
shell: bash
env:
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
run: |
@@ -72,7 +71,6 @@ jobs:
git commit -m "Update release used by \`start-proxy\` action"
- name: Push changes and open PR
shell: bash
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}

View File

@@ -11,6 +11,10 @@ on:
branches:
- releases/*
defaults:
run:
shell: bash
jobs:
prepare:

View File

@@ -2,6 +2,20 @@
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
## [UNRELEASED]
- 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)
## 3.30.3 - 10 Sep 2025
No user facing changes.
## 3.30.2 - 09 Sep 2025
- Fixed a bug which could cause language autodetection to fail. [#3084](https://github.com/github/codeql-action/pull/3084)
- Experimental: The `quality-queries` input that was added in `3.29.2` as part of an internal experiment is now deprecated and will be removed in an upcoming version of the CodeQL Action. It has been superseded by a new `analysis-kinds` input, which is part of the same internal experiment. Do not use this in production as it is subject to change at any time. [#3064](https://github.com/github/codeql-action/pull/3064)
## 3.30.1 - 05 Sep 2025
- Update default CodeQL bundle version to 2.23.0. [#3077](https://github.com/github/codeql-action/pull/3077)

View File

@@ -60,7 +60,7 @@ Here are a few things you can do that will increase the likelihood of your pull
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
1. The workflow run will open a pull request titled "Merge main into releases/v3". Follow the steps on the checklist in the pull request. Once you've checked off all but the last two of these, approve the PR and automerge it.
1. When the "Merge main into releases/v3" pull request is merged into the `releases/v3` branch, a mergeback pull request to `main` will be automatically created. This mergeback pull request incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v3" pull request, and bumps the patch version of the CodeQL Action.
1. When the "Merge main into releases/v3" pull request is merged into the `releases/v3` branch, a mergeback pull request to `main` will be automatically created. This mergeback pull request incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v3" pull request, and bumps the patch version of the CodeQL Action.
1. If a backport to an older major version is required, a pull request targeting that version's branch will also be automatically created.
1. Approve the mergeback and backport pull request (if applicable) and automerge them.
@@ -68,11 +68,12 @@ Once the mergeback and backport pull request have been merged, the release is co
## Keeping the PR checks up to date (admin access required)
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred jobs that need to pass in order for a PR to turn green. You can regenerate the checks automatically by running the [update-required-checks.sh](.github/workflows/script/update-required-checks.sh) script:
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred required jobs that need to pass in order for a PR to turn green. It would be too tedious to maintain that list manually. You can regenerate the set of required checks automatically by running the [update-required-checks.sh](.github/workflows/script/update-required-checks.sh) script:
1. By default, this script retrieves the checks from the latest SHA on `main`, so make sure that your `main` branch is up to date.
2. Run the script. If there's a reason to, you can pass in a different SHA as a CLI argument.
3. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v3`, and any other currently supported major versions have been updated.
- If you run the script without an argument, it will retrieve the set of workflows that ran for the latest commit on `main`. Make sure that your local `main` branch is up to date before running the script.
- You can specify a commit SHA as argument to retrieve the set of workflows for that commit instead. You will likely want to use this if you have a PR that removes or adds PR checks.
After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v3`, and any other currently supported major versions have been updated.
Note that any updates to checks on `main` need to be backported to all currently supported major version branches, in order to maintain the same set of names for required checks.

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -26486,13 +26486,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -26501,9 +26501,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -26536,7 +26536,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -31821,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -31839,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -77685,7 +77686,7 @@ var require_brace_expansion2 = __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);
}
@@ -102910,7 +102911,7 @@ var require_dist_node16 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -102918,7 +102919,7 @@ var require_dist_node16 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -102928,12 +102929,12 @@ var require_dist_node16 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -102941,12 +102942,12 @@ var require_dist_node16 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -102961,7 +102962,7 @@ var require_dist_node16 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -117686,7 +117687,7 @@ function withGroup(groupName, f) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -117796,6 +117797,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117912,6 +117919,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
@@ -117960,7 +117972,18 @@ async function getConfig(tempDir, logger) {
const configString = fs3.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -118206,13 +118229,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -118251,7 +118277,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",

379
lib/analyze-action.js generated
View File

@@ -184,7 +184,7 @@ var require_file_command = __commonJS({
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs20 = __importStar4(require("fs"));
var os5 = __importStar4(require("os"));
var utils_1 = require_utils();
@@ -202,7 +202,7 @@ var require_file_command = __commonJS({
}
exports2.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${crypto.randomUUID()}`;
const delimiter = `ghadelimiter_${crypto2.randomUUID()}`;
const convertedValue = (0, utils_1.toCommandValue)(value);
if (key.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
@@ -3637,11 +3637,11 @@ var require_util2 = __commonJS({
var assert = require("assert");
var { isUint8Array } = require("util/types");
var supportedHashes = [];
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
supportedHashes = crypto.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2));
supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2));
} catch {
}
function responseURL(response) {
@@ -3918,7 +3918,7 @@ var require_util2 = __commonJS({
}
}
function bytesMatch(bytes, metadataList) {
if (crypto === void 0) {
if (crypto2 === void 0) {
return true;
}
const parsedMetadata = parseMetadata(metadataList);
@@ -3933,7 +3933,7 @@ var require_util2 = __commonJS({
for (const item of metadata) {
const algorithm = item.algo;
const expectedValue = item.hash;
let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64");
let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64");
if (actualValue[actualValue.length - 1] === "=") {
if (actualValue[actualValue.length - 2] === "=") {
actualValue = actualValue.slice(0, -2);
@@ -5279,8 +5279,8 @@ var require_body = __commonJS({
var { parseMIMEType, serializeAMimeType } = require_dataURL();
var random;
try {
const crypto = require("node:crypto");
random = (max) => crypto.randomInt(0, max);
const crypto2 = require("node:crypto");
random = (max) => crypto2.randomInt(0, max);
} catch {
random = (max) => Math.floor(Math.random(max));
}
@@ -16330,9 +16330,9 @@ var require_connection = __commonJS({
channels.open = diagnosticsChannel.channel("undici:websocket:open");
channels.close = diagnosticsChannel.channel("undici:websocket:close");
channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error");
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
} catch {
}
function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) {
@@ -16351,7 +16351,7 @@ var require_connection = __commonJS({
const headersList = new Headers(options.headers)[kHeadersList];
request.headersList = headersList;
}
const keyValue = crypto.randomBytes(16).toString("base64");
const keyValue = crypto2.randomBytes(16).toString("base64");
request.headersList.append("sec-websocket-key", keyValue);
request.headersList.append("sec-websocket-version", "13");
for (const protocol of protocols) {
@@ -16380,7 +16380,7 @@ var require_connection = __commonJS({
return;
}
const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64");
const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64");
if (secWSAccept !== digest) {
failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header.");
return;
@@ -16460,9 +16460,9 @@ var require_frame = __commonJS({
"node_modules/undici/lib/websocket/frame.js"(exports2, module2) {
"use strict";
var { maxUnsigned16Bit } = require_constants5();
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
} catch {
}
var WebsocketFrameSend = class {
@@ -16471,7 +16471,7 @@ var require_frame = __commonJS({
*/
constructor(data) {
this.frameData = data;
this.maskKey = crypto.randomBytes(4);
this.maskKey = crypto2.randomBytes(4);
}
createFrame(opcode) {
const bodyLength = this.frameData?.byteLength ?? 0;
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -32287,7 +32287,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -32335,13 +32335,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -32350,9 +32350,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -32385,7 +32385,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -36929,7 +36930,7 @@ var require_cacheUtils = __commonJS({
var exec2 = __importStar4(require_exec());
var glob2 = __importStar4(require_glob());
var io7 = __importStar4(require_io());
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs20 = __importStar4(require("fs"));
var path20 = __importStar4(require("path"));
var semver8 = __importStar4(require_semver3());
@@ -36953,7 +36954,7 @@ var require_cacheUtils = __commonJS({
}
tempDirectory = path20.join(baseLocation, "actions", "temp");
}
const dest = path20.join(tempDirectory, crypto.randomUUID());
const dest = path20.join(tempDirectory, crypto2.randomUUID());
yield io7.mkdirP(dest);
return dest;
});
@@ -37069,7 +37070,7 @@ var require_cacheUtils = __commonJS({
components.push("windows-only");
}
components.push(versionSalt);
return crypto.createHash("sha256").update(components.join("|")).digest("hex");
return crypto2.createHash("sha256").update(components.join("|")).digest("hex");
}
exports2.getCacheVersion = getCacheVersion;
function getRuntimeToken() {
@@ -37670,14 +37671,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -37688,7 +37689,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -48813,7 +48814,7 @@ var require_dist7 = __commonJS({
var coreXml = require_commonjs9();
var logger$1 = require_dist();
var abortController = require_commonjs10();
var crypto = require("crypto");
var crypto2 = require("crypto");
var coreTracing = require_commonjs4();
var stream2 = require("stream");
var coreLro = require_dist6();
@@ -50321,7 +50322,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
return crypto2.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
}
};
var AnonymousCredentialPolicy = class extends CredentialPolicy {
@@ -50519,7 +50520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
getHeaderValueToSign(request, HeaderConstants.RANGE)
].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request);
const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64");
const signature = crypto2.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64");
request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`);
}
function getHeaderValueToSign(request, headerName) {
@@ -64278,7 +64279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
return crypto2.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
}
};
function ipRangeToString(ipRange) {
@@ -79549,7 +79550,7 @@ var require_tool_cache = __commonJS({
exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0;
var core15 = __importStar4(require_core());
var io7 = __importStar4(require_io());
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs20 = __importStar4(require("fs"));
var mm = __importStar4(require_manifest());
var os5 = __importStar4(require("os"));
@@ -79574,7 +79575,7 @@ var require_tool_cache = __commonJS({
var userAgent = "actions/tool-cache";
function downloadTool2(url2, dest, auth, headers) {
return __awaiter4(this, void 0, void 0, function* () {
dest = dest || path20.join(_getTempDirectory(), crypto.randomUUID());
dest = dest || path20.join(_getTempDirectory(), crypto2.randomUUID());
yield io7.mkdirP(path20.dirname(dest));
core15.debug(`Downloading ${url2}`);
core15.debug(`Destination ${dest}`);
@@ -79955,7 +79956,7 @@ var require_tool_cache = __commonJS({
function _createExtractFolder(dest) {
return __awaiter4(this, void 0, void 0, function* () {
if (!dest) {
dest = path20.join(_getTempDirectory(), crypto.randomUUID());
dest = path20.join(_getTempDirectory(), crypto2.randomUUID());
}
yield io7.mkdirP(dest);
return dest;
@@ -81563,7 +81564,7 @@ var require_internal_hash_files = __commonJS({
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.hashFiles = void 0;
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var core15 = __importStar4(require_core());
var fs20 = __importStar4(require("fs"));
var stream2 = __importStar4(require("stream"));
@@ -81576,7 +81577,7 @@ var require_internal_hash_files = __commonJS({
const writeDelegate = verbose ? core15.info : core15.debug;
let hasMatch = false;
const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd();
const result = crypto.createHash("sha256");
const result = crypto2.createHash("sha256");
let count = 0;
try {
for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
@@ -81592,7 +81593,7 @@ var require_internal_hash_files = __commonJS({
writeDelegate(`Skip directory '${file}'.`);
continue;
}
const hash2 = crypto.createHash("sha256");
const hash2 = crypto2.createHash("sha256");
const pipeline = util.promisify(stream2.pipeline);
yield pipeline(fs20.createReadStream(file), hash2);
result.write(hash2.digest());
@@ -90113,12 +90114,6 @@ function fixCodeQualityCategory(logger, category) {
return category;
}
// src/analyze.ts
var fs15 = __toESM(require("fs"));
var path16 = __toESM(require("path"));
var import_perf_hooks2 = require("perf_hooks");
var io5 = __toESM(require_io());
// src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
AnalysisKind2["CodeScanning"] = "code-scanning";
@@ -90127,6 +90122,28 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
})(AnalysisKind || {});
var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
var codeQualityQueries = ["code-quality"];
var CodeScanning = {
kind: "code-scanning" /* CodeScanning */,
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifExtension: ".sarif",
sarifPredicate: (name) => name.endsWith(CodeScanning.sarifExtension) && !CodeQuality.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQuality = {
kind: "code-quality" /* CodeQuality */,
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifExtension: ".quality.sarif",
sarifPredicate: (name) => name.endsWith(CodeQuality.sarifExtension),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
// src/analyze.ts
var fs15 = __toESM(require("fs"));
var path16 = __toESM(require("path"));
var import_perf_hooks2 = require("perf_hooks");
var io5 = __toESM(require_io());
// src/api-client.ts
var core5 = __toESM(require_core());
@@ -90237,6 +90254,11 @@ async function getAnalysisKey() {
core5.exportVariable(analysisKeyEnvVar, analysisKey);
return analysisKey;
}
async function getAutomationID() {
const analysis_key = await getAnalysisKey();
const environment = getRequiredInput("matrix");
return computeAutomationID(analysis_key, environment);
}
function computeAutomationID(analysis_key, environment) {
let automationID = `${analysis_key}/`;
const matrix = parseMatrixInput(environment);
@@ -90561,6 +90583,7 @@ var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
// src/overlay-database-utils.ts
var crypto = __toESM(require("crypto"));
var fs6 = __toESM(require("fs"));
var path7 = __toESM(require("path"));
var actionsCache = __toESM(require_cache3());
@@ -90789,7 +90812,7 @@ function formatDuration(durationMs) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -90908,14 +90931,18 @@ async function uploadOverlayBaseDatabaseToCache(codeql, config, logger) {
}
const codeQlVersion = (await codeql.getVersion()).version;
const checkoutPath = getRequiredInput("checkout_path");
const cacheKey3 = await generateCacheKey(config, codeQlVersion, checkoutPath);
const cacheSaveKey = await getCacheSaveKey(
config,
codeQlVersion,
checkoutPath
);
logger.info(
`Uploading overlay-base database to Actions cache with key ${cacheKey3}`
`Uploading overlay-base database to Actions cache with key ${cacheSaveKey}`
);
try {
const cacheId = await withTimeout(
MAX_CACHE_OPERATION_MS,
actionsCache.saveCache([dbLocation], cacheKey3),
actionsCache.saveCache([dbLocation], cacheSaveKey),
() => {
}
);
@@ -90932,13 +90959,26 @@ async function uploadOverlayBaseDatabaseToCache(codeql, config, logger) {
logger.info(`Successfully uploaded overlay-base database from ${dbLocation}`);
return true;
}
async function generateCacheKey(config, codeQlVersion, checkoutPath) {
async function getCacheSaveKey(config, codeQlVersion, checkoutPath) {
const sha = await getCommitOid(checkoutPath);
return `${getCacheRestoreKey(config, codeQlVersion)}${sha}`;
const restoreKeyPrefix = await getCacheRestoreKeyPrefix(
config,
codeQlVersion
);
return `${restoreKeyPrefix}${sha}`;
}
function getCacheRestoreKey(config, codeQlVersion) {
async function getCacheRestoreKeyPrefix(config, codeQlVersion) {
const languages = [...config.languages].sort().join("_");
return `${CACHE_PREFIX}-${CACHE_VERSION}-${languages}-${codeQlVersion}-`;
const cacheKeyComponents = {
automationID: await getAutomationID()
// Add more components here as needed in the future
};
const componentsHash = createCacheKeyHash(cacheKeyComponents);
return `${CACHE_PREFIX}-${CACHE_VERSION}-${componentsHash}-${languages}-${codeQlVersion}-`;
}
function createCacheKeyHash(components) {
const componentsJson = JSON.stringify(components);
return crypto.createHash("sha256").update(componentsJson).digest("hex").substring(0, 16);
}
// src/tools-features.ts
@@ -90991,6 +91031,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -91107,6 +91153,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -91581,7 +91632,18 @@ async function getConfig(tempDir, logger) {
const configString = fs9.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -91601,9 +91663,18 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
}
return augmentedConfig;
}
function isCodeScanningEnabled(config) {
return config.analysisKinds.includes("code-scanning" /* CodeScanning */);
}
function isCodeQualityEnabled(config) {
return config.analysisKinds.includes("code-quality" /* CodeQuality */);
}
function getPrimaryAnalysisKind(config) {
return isCodeScanningEnabled(config) ? "code-scanning" /* CodeScanning */ : "code-quality" /* CodeQuality */;
}
function getPrimaryAnalysisConfig(config) {
return getPrimaryAnalysisKind(config) === "code-scanning" /* CodeScanning */ ? CodeScanning : CodeQuality;
}
// src/setup-codeql.ts
var fs12 = __toESM(require("fs"));
@@ -91612,7 +91683,7 @@ var toolcache3 = __toESM(require_tool_cache());
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver7 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js
// node_modules/uuid/dist/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1));
@@ -91621,27 +91692,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
// node_modules/uuid/dist/esm/rng.js
var import_crypto = require("crypto");
// node_modules/uuid/dist/rng.js
var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool);
(0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
// node_modules/uuid/dist/esm/native.js
var import_crypto2 = require("crypto");
var native_default = { randomUUID: import_crypto2.randomUUID };
// node_modules/uuid/dist/native.js
var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
// node_modules/uuid/dist/v4.js
function _v4(options, buf, offset) {
options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) {
@@ -91661,6 +91729,12 @@ function v4(options, buf, offset) {
}
return unsafeStringify(rnds);
}
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4;
// src/tar.ts
@@ -92718,13 +92792,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -92763,7 +92840,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",
@@ -93171,7 +93247,7 @@ function getDefaultCacheConfig() {
async function makeGlobber(patterns) {
return glob.create(patterns.join("\n"));
}
async function uploadDependencyCaches(config, logger) {
async function uploadDependencyCaches(config, logger, minimizeJavaJars) {
for (const language of config.languages) {
const cacheConfig = getDefaultCacheConfig()[language];
if (cacheConfig === void 0) {
@@ -93194,7 +93270,7 @@ async function uploadDependencyCaches(config, logger) {
);
continue;
}
const key = await cacheKey2(language, cacheConfig);
const key = await cacheKey2(language, cacheConfig, minimizeJavaJars);
logger.info(
`Uploading cache of size ${size} for ${language} with key ${key}...`
);
@@ -93212,17 +93288,20 @@ async function uploadDependencyCaches(config, logger) {
}
}
}
async function cacheKey2(language, cacheConfig) {
async function cacheKey2(language, cacheConfig, minimizeJavaJars = false) {
const hash2 = await glob.hashFiles(cacheConfig.hash.join("\n"));
return `${await cachePrefix2(language)}${hash2}`;
return `${await cachePrefix2(language, minimizeJavaJars)}${hash2}`;
}
async function cachePrefix2(language) {
async function cachePrefix2(language, minimizeJavaJars) {
const runnerOs = getRequiredEnvParam("RUNNER_OS");
const customPrefix = process.env["CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX" /* DEPENDENCY_CACHING_PREFIX */];
let prefix = CODEQL_DEPENDENCY_CACHE_PREFIX;
if (customPrefix !== void 0 && customPrefix.length > 0) {
prefix = `${prefix}-${customPrefix}`;
}
if (language === "java" /* java */ && minimizeJavaJars) {
prefix = `minify-${prefix}`;
}
return `${prefix}-${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`;
}
@@ -93560,6 +93639,9 @@ function resolveQuerySuiteAlias(language, maybeSuite) {
}
return maybeSuite;
}
function addSarifExtension(analysis, base) {
return `${base}${analysis.sarifExtension}`;
}
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, diffRangePackDir, automationDetailsId, codeql, config, logger, features) {
const statusReport = {};
const queryFlags = [memoryFlag, threadsFlag];
@@ -93579,14 +93661,16 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
incrementalMode.push("overlay");
}
const sarifRunPropertyFlag = incrementalMode.length > 0 ? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}` : void 0;
const dbAnalysisConfig = getPrimaryAnalysisConfig(config);
for (const language of config.languages) {
try {
const sarifFile = path16.join(sarifFolder, `${language}.sarif`);
const queries = [];
if (isCodeQualityEnabled(config)) {
if (config.analysisKinds.length > 1) {
queries.push(getGeneratedSuitePath(config, language));
for (const qualityQuery of codeQualityQueries) {
queries.push(resolveQuerySuiteAlias(language, qualityQuery));
if (isCodeQualityEnabled(config)) {
for (const qualityQuery of codeQualityQueries) {
queries.push(resolveQuerySuiteAlias(language, qualityQuery));
}
}
}
logger.startGroup(`Running queries for ${language}`);
@@ -93595,35 +93679,24 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
await codeql.databaseRunQueries(databasePath, queryFlags, queries);
logger.debug(`Finished running queries for ${language}.`);
statusReport[`analyze_builtin_queries_${language}_duration_ms`] = (/* @__PURE__ */ new Date()).getTime() - startTimeRunQueries;
logger.startGroup(`Interpreting results for ${language}`);
const startTimeInterpretResults = /* @__PURE__ */ new Date();
const analysisSummary = await runInterpretResults(
const { summary: analysisSummary, sarifFile } = await runInterpretResultsFor(
dbAnalysisConfig,
language,
void 0,
sarifFile,
config.debugMode,
automationDetailsId
config.debugMode
);
let qualityAnalysisSummary;
if (isCodeQualityEnabled(config)) {
logger.info(`Interpreting quality results for ${language}`);
const qualityCategory = fixCodeQualityCategory(
logger,
automationDetailsId
);
const qualitySarifFile = path16.join(
sarifFolder,
`${language}.quality.sarif`
);
qualityAnalysisSummary = await runInterpretResults(
if (config.analysisKinds.length > 1 && isCodeQualityEnabled(config)) {
const qualityResult = await runInterpretResultsFor(
CodeQuality,
language,
codeQualityQueries.map(
(i) => resolveQuerySuiteAlias(language, i)
),
qualitySarifFile,
config.debugMode,
qualityCategory
config.debugMode
);
qualityAnalysisSummary = qualityResult.summary;
}
const endTimeInterpretResults = /* @__PURE__ */ new Date();
statusReport[`interpret_results_${language}_duration_ms`] = endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
@@ -93659,6 +93732,25 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
}
}
return statusReport;
async function runInterpretResultsFor(analysis, language, queries, enableDebugLogging) {
logger.info(`Interpreting ${analysis.name} results for ${language}`);
let category = automationDetailsId;
if (analysis.kind === "code-quality" /* CodeQuality */) {
category = fixCodeQualityCategory(logger, automationDetailsId);
}
const sarifFile = path16.join(
sarifFolder,
addSarifExtension(analysis, language)
);
const summary = await runInterpretResults(
language,
queries,
sarifFile,
enableDebugLogging,
category
);
return { summary, sarifFile };
}
async function runInterpretResults(language, queries, sarifFile, enableDebugLogging, category) {
const databasePath = getCodeQLDatabasePath(config, language);
return await codeql.databaseInterpretResults(
@@ -95307,7 +95399,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
return JSON.parse(fs18.readFileSync(outputFile, "utf8"));
}
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
const automationID = getAutomationID(category, analysis_key, environment);
const automationID = getAutomationID2(category, analysis_key, environment);
if (automationID !== void 0) {
for (const run2 of sarif.runs || []) {
if (run2.automationDetails === void 0) {
@@ -95320,7 +95412,7 @@ function populateRunAutomationDetails(sarif, category, analysis_key, environment
}
return sarif;
}
function getAutomationID(category, analysis_key, environment) {
function getAutomationID2(category, analysis_key, environment) {
if (category !== void 0) {
let automationID = category;
if (!automationID.endsWith("/")) {
@@ -95498,18 +95590,6 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
}
return payloadObj;
}
var CodeScanningTarget = {
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifPredicate: (name) => name.endsWith(".sarif") && !CodeQualityTarget.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQualityTarget = {
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifPredicate: (name) => name.endsWith(".quality.sarif"),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
const sarifPaths = getSarifFilePaths(
inputSarifPath,
@@ -95524,7 +95604,7 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
uploadTarget
);
}
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget = CodeScanningTarget) {
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
@@ -95561,6 +95641,10 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
validateUniqueCategory(sarif, uploadTarget.sentinelPrefix);
logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif);
const dumpDir = process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (dumpDir) {
dumpSarifFile(sarifPayload, dumpDir, logger, uploadTarget);
}
logger.debug(`Compressing serialized SARIF`);
const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = url.pathToFileURL(checkoutPath).href;
@@ -95599,6 +95683,21 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
sarifID
};
}
function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
if (!fs18.existsSync(outputDir)) {
fs18.mkdirSync(outputDir, { recursive: true });
} else if (!fs18.lstatSync(outputDir).isDirectory()) {
throw new ConfigurationError(
`The path specified by the ${"CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */} environment variable exists and is not a directory: ${outputDir}`
);
}
const outputFile = path18.resolve(
outputDir,
`upload${uploadTarget.sarifExtension}`
);
logger.info(`Dumping processed SARIF file to ${outputFile}`);
fs18.writeFileSync(outputFile, sarifPayload);
}
var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3;
var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3;
async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
@@ -95695,7 +95794,7 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
assertNever(status);
}
}
function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.sentinelPrefix) {
function validateUniqueCategory(sarif, sentinelPrefix) {
const categories = {};
for (const run2 of sarif.runs) {
const id = run2?.automationDetails?.id;
@@ -95945,15 +96044,17 @@ async function run() {
core14.setOutput("sarif-output", import_path4.default.resolve(outputDir));
const uploadInput = getOptionalInput("upload");
if (runStats && getUploadValue(uploadInput) === "always") {
uploadResult = await uploadFiles(
outputDir,
getRequiredInput("checkout_path"),
getOptionalInput("category"),
features,
logger,
CodeScanningTarget
);
core14.setOutput("sarif-id", uploadResult.sarifID);
if (isCodeScanningEnabled(config)) {
uploadResult = await uploadFiles(
outputDir,
getRequiredInput("checkout_path"),
getOptionalInput("category"),
features,
logger,
CodeScanning
);
core14.setOutput("sarif-id", uploadResult.sarifID);
}
if (isCodeQualityEnabled(config)) {
const qualityUploadResult = await uploadFiles(
outputDir,
@@ -95964,7 +96065,7 @@ async function run() {
),
features,
logger,
CodeQualityTarget
CodeQuality
);
core14.setOutput("quality-sarif-id", qualityUploadResult.sarifID);
}
@@ -95982,7 +96083,11 @@ async function run() {
logger
);
if (shouldStoreCache(config.dependencyCachingEnabled)) {
await uploadDependencyCaches(config, logger);
const minimizeJavaJars = await features.getValue(
"java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */,
codeql
);
await uploadDependencyCaches(config, logger, minimizeJavaJars);
}
if (isInTestMode()) {
logger.debug("In test mode. Waiting for processing is disabled.");

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -26486,13 +26486,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -26501,9 +26501,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -26536,7 +26536,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -31821,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -31839,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -78426,7 +78427,7 @@ function getActionsLogger() {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -78534,6 +78535,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -78650,6 +78657,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -78962,7 +78974,18 @@ async function getConfig(tempDir, logger) {
const configString = fs4.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -79241,13 +79264,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -79286,7 +79312,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",

184
lib/init-action-post.js generated
View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context3, operator, key, modifier) {
var value = context3[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context3, operator, key, modifier) {
var value = context3[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -32287,7 +32287,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -32335,13 +32335,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -32350,9 +32350,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -32385,7 +32385,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -37670,14 +37671,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -37688,7 +37689,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -83534,7 +83535,7 @@ var require_brace_expansion2 = __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);
}
@@ -108759,7 +108760,7 @@ var require_dist_node16 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -108767,7 +108768,7 @@ var require_dist_node16 = __commonJS({
}
function getValues(context3, operator, key, modifier) {
var value = context3[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -108777,12 +108778,12 @@ var require_dist_node16 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -108790,12 +108791,12 @@ var require_dist_node16 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -108810,7 +108811,7 @@ var require_dist_node16 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -128754,6 +128755,22 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
return AnalysisKind2;
})(AnalysisKind || {});
var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
var CodeScanning = {
kind: "code-scanning" /* CodeScanning */,
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifExtension: ".sarif",
sarifPredicate: (name) => name.endsWith(CodeScanning.sarifExtension) && !CodeQuality.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQuality = {
kind: "code-quality" /* CodeQuality */,
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifExtension: ".quality.sarif",
sarifPredicate: (name) => name.endsWith(CodeQuality.sarifExtension),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
// src/caching-utils.ts
var core6 = __toESM(require_core());
@@ -129000,7 +129017,7 @@ function formatDuration(durationMs) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -129113,6 +129130,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -129229,6 +129252,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -129559,7 +129587,18 @@ async function getConfig(tempDir, logger) {
const configString = fs9.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -129587,7 +129626,7 @@ var toolcache3 = __toESM(require_tool_cache());
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver7 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js
// node_modules/uuid/dist/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1));
@@ -129596,27 +129635,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
// node_modules/uuid/dist/esm/rng.js
var import_crypto = require("crypto");
// node_modules/uuid/dist/rng.js
var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool);
(0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
// node_modules/uuid/dist/esm/native.js
var import_crypto2 = require("crypto");
var native_default = { randomUUID: import_crypto2.randomUUID };
// node_modules/uuid/dist/native.js
var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
// node_modules/uuid/dist/v4.js
function _v4(options, buf, offset) {
options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) {
@@ -129636,6 +129672,12 @@ function v4(options, buf, offset) {
}
return unsafeStringify(rnds);
}
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4;
// src/tar.ts
@@ -130660,13 +130702,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -130705,7 +130750,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",
@@ -132789,7 +132833,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
return JSON.parse(fs17.readFileSync(outputFile, "utf8"));
}
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
const automationID = getAutomationID(category, analysis_key, environment);
const automationID = getAutomationID2(category, analysis_key, environment);
if (automationID !== void 0) {
for (const run2 of sarif.runs || []) {
if (run2.automationDetails === void 0) {
@@ -132802,7 +132846,7 @@ function populateRunAutomationDetails(sarif, category, analysis_key, environment
}
return sarif;
}
function getAutomationID(category, analysis_key, environment) {
function getAutomationID2(category, analysis_key, environment) {
if (category !== void 0) {
let automationID = category;
if (!automationID.endsWith("/")) {
@@ -132980,18 +133024,6 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
}
return payloadObj;
}
var CodeScanningTarget = {
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifPredicate: (name) => name.endsWith(".sarif") && !CodeQualityTarget.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQualityTarget = {
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifPredicate: (name) => name.endsWith(".quality.sarif"),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
const sarifPaths = getSarifFilePaths(
inputSarifPath,
@@ -133006,7 +133038,7 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
uploadTarget
);
}
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget = CodeScanningTarget) {
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
@@ -133043,6 +133075,10 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
validateUniqueCategory(sarif, uploadTarget.sentinelPrefix);
logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif);
const dumpDir = process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (dumpDir) {
dumpSarifFile(sarifPayload, dumpDir, logger, uploadTarget);
}
logger.debug(`Compressing serialized SARIF`);
const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = url.pathToFileURL(checkoutPath).href;
@@ -133081,6 +133117,21 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
sarifID
};
}
function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
if (!fs17.existsSync(outputDir)) {
fs17.mkdirSync(outputDir, { recursive: true });
} else if (!fs17.lstatSync(outputDir).isDirectory()) {
throw new ConfigurationError(
`The path specified by the ${"CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */} environment variable exists and is not a directory: ${outputDir}`
);
}
const outputFile = path17.resolve(
outputDir,
`upload${uploadTarget.sarifExtension}`
);
logger.info(`Dumping processed SARIF file to ${outputFile}`);
fs17.writeFileSync(outputFile, sarifPayload);
}
var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3;
var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3;
async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
@@ -133177,7 +133228,7 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
assertNever(status);
}
}
function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.sentinelPrefix) {
function validateUniqueCategory(sarif, sentinelPrefix) {
const categories = {};
for (const run2 of sarif.runs) {
const id = run2?.automationDetails?.id;
@@ -133249,7 +133300,8 @@ function toCodedErrors(errors) {
}
var WorkflowErrors = toCodedErrors({
MissingPushHook: `Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.`,
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
InconsistentActionVersion: `Not all workflow steps that use \`github/codeql-action\` actions use the same version. Please ensure that all such steps use the same version to avoid compatibility issues.`
});
async function getWorkflow(logger) {
const maybeWorkflow = process.env["CODE_SCANNING_WORKFLOW_FILE"];
@@ -133402,7 +133454,7 @@ async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) {
category,
features,
logger,
CodeScanningTarget
CodeScanning
);
await waitForProcessing(
repositoryNwo,

305
lib/init-action.js generated
View File

@@ -184,7 +184,7 @@ var require_file_command = __commonJS({
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs18 = __importStar4(require("fs"));
var os5 = __importStar4(require("os"));
var utils_1 = require_utils();
@@ -202,7 +202,7 @@ var require_file_command = __commonJS({
}
exports2.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${crypto.randomUUID()}`;
const delimiter = `ghadelimiter_${crypto2.randomUUID()}`;
const convertedValue = (0, utils_1.toCommandValue)(value);
if (key.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
@@ -3637,11 +3637,11 @@ var require_util2 = __commonJS({
var assert = require("assert");
var { isUint8Array } = require("util/types");
var supportedHashes = [];
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
} catch {
}
function responseURL(response) {
@@ -3918,7 +3918,7 @@ var require_util2 = __commonJS({
}
}
function bytesMatch(bytes, metadataList) {
if (crypto === void 0) {
if (crypto2 === void 0) {
return true;
}
const parsedMetadata = parseMetadata(metadataList);
@@ -3933,7 +3933,7 @@ var require_util2 = __commonJS({
for (const item of metadata) {
const algorithm = item.algo;
const expectedValue = item.hash;
let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64");
let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64");
if (actualValue[actualValue.length - 1] === "=") {
if (actualValue[actualValue.length - 2] === "=") {
actualValue = actualValue.slice(0, -2);
@@ -5279,8 +5279,8 @@ var require_body = __commonJS({
var { parseMIMEType, serializeAMimeType } = require_dataURL();
var random;
try {
const crypto = require("node:crypto");
random = (max) => crypto.randomInt(0, max);
const crypto2 = require("node:crypto");
random = (max) => crypto2.randomInt(0, max);
} catch {
random = (max) => Math.floor(Math.random(max));
}
@@ -16330,9 +16330,9 @@ var require_connection = __commonJS({
channels.open = diagnosticsChannel.channel("undici:websocket:open");
channels.close = diagnosticsChannel.channel("undici:websocket:close");
channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error");
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
} catch {
}
function establishWebSocketConnection(url, protocols, ws, onEstablish, options) {
@@ -16351,7 +16351,7 @@ var require_connection = __commonJS({
const headersList = new Headers(options.headers)[kHeadersList];
request.headersList = headersList;
}
const keyValue = crypto.randomBytes(16).toString("base64");
const keyValue = crypto2.randomBytes(16).toString("base64");
request.headersList.append("sec-websocket-key", keyValue);
request.headersList.append("sec-websocket-version", "13");
for (const protocol of protocols) {
@@ -16380,7 +16380,7 @@ var require_connection = __commonJS({
return;
}
const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64");
const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64");
if (secWSAccept !== digest) {
failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header.");
return;
@@ -16460,9 +16460,9 @@ var require_frame = __commonJS({
"node_modules/undici/lib/websocket/frame.js"(exports2, module2) {
"use strict";
var { maxUnsigned16Bit } = require_constants5();
var crypto;
var crypto2;
try {
crypto = require("crypto");
crypto2 = require("crypto");
} catch {
}
var WebsocketFrameSend = class {
@@ -16471,7 +16471,7 @@ var require_frame = __commonJS({
*/
constructor(data) {
this.frameData = data;
this.maskKey = crypto.randomBytes(4);
this.maskKey = crypto2.randomBytes(4);
}
createFrame(opcode) {
const bodyLength = this.frameData?.byteLength ?? 0;
@@ -22196,7 +22196,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -22204,7 +22204,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -22216,14 +22216,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -22231,12 +22231,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -22251,7 +22251,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -22936,7 +22936,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -22944,7 +22944,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -22956,14 +22956,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -22971,12 +22971,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -22991,7 +22991,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -32287,7 +32287,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -32335,13 +32335,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -32350,9 +32350,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -32385,7 +32385,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -36929,7 +36930,7 @@ var require_cacheUtils = __commonJS({
var exec2 = __importStar4(require_exec());
var glob2 = __importStar4(require_glob());
var io7 = __importStar4(require_io());
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs18 = __importStar4(require("fs"));
var path19 = __importStar4(require("path"));
var semver9 = __importStar4(require_semver3());
@@ -36953,7 +36954,7 @@ var require_cacheUtils = __commonJS({
}
tempDirectory = path19.join(baseLocation, "actions", "temp");
}
const dest = path19.join(tempDirectory, crypto.randomUUID());
const dest = path19.join(tempDirectory, crypto2.randomUUID());
yield io7.mkdirP(dest);
return dest;
});
@@ -37069,7 +37070,7 @@ var require_cacheUtils = __commonJS({
components.push("windows-only");
}
components.push(versionSalt);
return crypto.createHash("sha256").update(components.join("|")).digest("hex");
return crypto2.createHash("sha256").update(components.join("|")).digest("hex");
}
exports2.getCacheVersion = getCacheVersion;
function getRuntimeToken() {
@@ -37670,14 +37671,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -37688,7 +37689,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -48813,7 +48814,7 @@ var require_dist7 = __commonJS({
var coreXml = require_commonjs9();
var logger$1 = require_dist();
var abortController = require_commonjs10();
var crypto = require("crypto");
var crypto2 = require("crypto");
var coreTracing = require_commonjs4();
var stream2 = require("stream");
var coreLro = require_dist6();
@@ -50321,7 +50322,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
return crypto2.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
}
};
var AnonymousCredentialPolicy = class extends CredentialPolicy {
@@ -50519,7 +50520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
getHeaderValueToSign(request, HeaderConstants.RANGE)
].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request);
const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64");
const signature = crypto2.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64");
request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`);
}
function getHeaderValueToSign(request, headerName) {
@@ -64278,7 +64279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`;
* @param stringToSign -
*/
computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
return crypto2.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
}
};
function ipRangeToString(ipRange) {
@@ -80223,7 +80224,7 @@ var require_internal_hash_files = __commonJS({
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.hashFiles = void 0;
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var core14 = __importStar4(require_core());
var fs18 = __importStar4(require("fs"));
var stream2 = __importStar4(require("stream"));
@@ -80236,7 +80237,7 @@ var require_internal_hash_files = __commonJS({
const writeDelegate = verbose ? core14.info : core14.debug;
let hasMatch = false;
const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd();
const result = crypto.createHash("sha256");
const result = crypto2.createHash("sha256");
let count = 0;
try {
for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
@@ -80252,7 +80253,7 @@ var require_internal_hash_files = __commonJS({
writeDelegate(`Skip directory '${file}'.`);
continue;
}
const hash = crypto.createHash("sha256");
const hash = crypto2.createHash("sha256");
const pipeline = util.promisify(stream2.pipeline);
yield pipeline(fs18.createReadStream(file), hash);
result.write(hash.digest());
@@ -80646,7 +80647,7 @@ var require_tool_cache = __commonJS({
exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0;
var core14 = __importStar4(require_core());
var io7 = __importStar4(require_io());
var crypto = __importStar4(require("crypto"));
var crypto2 = __importStar4(require("crypto"));
var fs18 = __importStar4(require("fs"));
var mm = __importStar4(require_manifest());
var os5 = __importStar4(require("os"));
@@ -80671,7 +80672,7 @@ var require_tool_cache = __commonJS({
var userAgent = "actions/tool-cache";
function downloadTool2(url, dest, auth, headers) {
return __awaiter4(this, void 0, void 0, function* () {
dest = dest || path19.join(_getTempDirectory(), crypto.randomUUID());
dest = dest || path19.join(_getTempDirectory(), crypto2.randomUUID());
yield io7.mkdirP(path19.dirname(dest));
core14.debug(`Downloading ${url}`);
core14.debug(`Destination ${dest}`);
@@ -81052,7 +81053,7 @@ var require_tool_cache = __commonJS({
function _createExtractFolder(dest) {
return __awaiter4(this, void 0, void 0, function* () {
if (!dest) {
dest = path19.join(_getTempDirectory(), crypto.randomUUID());
dest = path19.join(_getTempDirectory(), crypto2.randomUUID());
}
yield io7.mkdirP(dest);
return dest;
@@ -81686,7 +81687,7 @@ var core13 = __toESM(require_core());
var io6 = __toESM(require_io());
var semver8 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js
// node_modules/uuid/dist/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1));
@@ -81695,27 +81696,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
// node_modules/uuid/dist/esm/rng.js
var import_crypto = require("crypto");
// node_modules/uuid/dist/rng.js
var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool);
(0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
// node_modules/uuid/dist/esm/native.js
var import_crypto2 = require("crypto");
var native_default = { randomUUID: import_crypto2.randomUUID };
// node_modules/uuid/dist/native.js
var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
// node_modules/uuid/dist/v4.js
function _v4(options, buf, offset) {
options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) {
@@ -81735,6 +81733,12 @@ function v4(options, buf, offset) {
}
return unsafeStringify(rnds);
}
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4;
// src/actions-util.ts
@@ -85649,6 +85653,12 @@ function isHostedRunner() {
process.env["RUNNER_TOOL_CACHE"]?.includes("hostedtoolcache")
);
}
function parseMatrixInput(matrixInput) {
if (matrixInput === void 0 || matrixInput === "null") {
return void 0;
}
return JSON.parse(matrixInput);
}
function wrapError(error2) {
return error2 instanceof Error ? error2 : new Error(String(error2));
}
@@ -85778,6 +85788,9 @@ async function asyncSome(array, predicate) {
const results = await Promise.all(array.map(predicate));
return results.some((result) => result);
}
function isDefined(value) {
return value !== void 0 && value !== null;
}
// src/actions-util.ts
var pkg = require_package();
@@ -86096,6 +86109,25 @@ async function getAnalysisKey() {
core5.exportVariable(analysisKeyEnvVar, analysisKey);
return analysisKey;
}
async function getAutomationID() {
const analysis_key = await getAnalysisKey();
const environment = getRequiredInput("matrix");
return computeAutomationID(analysis_key, environment);
}
function computeAutomationID(analysis_key, environment) {
let automationID = `${analysis_key}/`;
const matrix = parseMatrixInput(environment);
if (matrix !== void 0) {
for (const entry of Object.entries(matrix).sort()) {
if (typeof entry[1] === "string") {
automationID += `${entry[0]}:${entry[1]}/`;
} else {
automationID += `${entry[0]}:/`;
}
}
}
return automationID;
}
// src/caching-utils.ts
var core6 = __toESM(require_core());
@@ -86167,6 +86199,7 @@ async function parseAnalysisKinds(input) {
new Set(components.map((component) => component))
);
}
var codeQualityQueries = ["code-quality"];
// src/feature-flags.ts
var fs7 = __toESM(require("fs"));
@@ -86178,6 +86211,7 @@ var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
// src/overlay-database-utils.ts
var crypto = __toESM(require("crypto"));
var fs6 = __toESM(require("fs"));
var path7 = __toESM(require("path"));
var actionsCache = __toESM(require_cache3());
@@ -86384,7 +86418,7 @@ function formatDuration(durationMs) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -86477,16 +86511,19 @@ async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
}
const dbLocation = config.dbLocation;
const codeQlVersion = (await codeql.getVersion()).version;
const restoreKey = getCacheRestoreKey(config, codeQlVersion);
const cacheRestoreKeyPrefix = await getCacheRestoreKeyPrefix(
config,
codeQlVersion
);
logger.info(
`Looking in Actions cache for overlay-base database with restore key ${restoreKey}`
`Looking in Actions cache for overlay-base database with restore key ${cacheRestoreKeyPrefix}`
);
let databaseDownloadDurationMs = 0;
try {
const databaseDownloadStart = performance.now();
const foundKey = await withTimeout(
MAX_CACHE_OPERATION_MS,
actionsCache.restoreCache([dbLocation], restoreKey),
actionsCache.restoreCache([dbLocation], cacheRestoreKeyPrefix),
() => {
logger.info("Timed out downloading overlay-base database from cache");
}
@@ -86529,9 +86566,18 @@ async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
databaseDownloadDurationMs
};
}
function getCacheRestoreKey(config, codeQlVersion) {
async function getCacheRestoreKeyPrefix(config, codeQlVersion) {
const languages = [...config.languages].sort().join("_");
return `${CACHE_PREFIX}-${CACHE_VERSION}-${languages}-${codeQlVersion}-`;
const cacheKeyComponents = {
automationID: await getAutomationID()
// Add more components here as needed in the future
};
const componentsHash = createCacheKeyHash(cacheKeyComponents);
return `${CACHE_PREFIX}-${CACHE_VERSION}-${componentsHash}-${languages}-${codeQlVersion}-`;
}
function createCacheKeyHash(components) {
const componentsJson = JSON.stringify(components);
return crypto.createHash("sha256").update(componentsJson).digest("hex").substring(0, 16);
}
// src/tools-features.ts
@@ -86584,6 +86630,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -86700,6 +86752,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -87151,11 +87208,22 @@ function getNoLanguagesError() {
function getUnknownLanguagesError(languages) {
return `Did not recognize the following languages: ${languages.join(", ")}`;
}
async function getSupportedLanguageMap(codeql) {
const resolveResult = await codeql.betterResolveLanguages();
async function getSupportedLanguageMap(codeql, features, logger) {
const resolveSupportedLanguagesUsingCli = await features.getValue(
"resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */,
codeql
);
const resolveResult = await codeql.betterResolveLanguages({
filterToLanguagesWithQueries: resolveSupportedLanguagesUsingCli
});
if (resolveSupportedLanguagesUsingCli) {
logger.debug(
`The CodeQL CLI supports the following languages: ${Object.keys(resolveResult.extractors).join(", ")}`
);
}
const supportedLanguages = {};
for (const extractor of Object.keys(resolveResult.extractors)) {
if (KnownLanguage[extractor] !== void 0) {
if (resolveSupportedLanguagesUsingCli || KnownLanguage[extractor] !== void 0) {
supportedLanguages[extractor] = extractor;
}
}
@@ -87169,7 +87237,7 @@ async function getSupportedLanguageMap(codeql) {
var baseWorkflowsPath = ".github/workflows";
function hasActionsWorkflows(sourceRoot) {
const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath);
const stats = fs9.lstatSync(workflowsPath);
const stats = fs9.lstatSync(workflowsPath, { throwIfNoEntry: false });
return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0;
}
async function getRawLanguagesInRepo(repository, sourceRoot, logger) {
@@ -87191,14 +87259,14 @@ async function getRawLanguagesInRepo(repository, sourceRoot, logger) {
logger.debug(`Raw languages in repository: ${result.join(", ")}`);
return result;
}
async function getLanguages(codeql, languagesInput, repository, sourceRoot, logger) {
async function getLanguages(codeql, languagesInput, repository, sourceRoot, features, logger) {
const { rawLanguages, autodetected } = await getRawLanguages(
languagesInput,
repository,
sourceRoot,
logger
);
const languageMap = await getSupportedLanguageMap(codeql);
const languageMap = await getSupportedLanguageMap(codeql, features, logger);
const languagesSet = /* @__PURE__ */ new Set();
const unknownLanguages = [];
for (const language of rawLanguages) {
@@ -87266,6 +87334,7 @@ async function initActionState({
languagesInput,
repository,
sourceRoot,
features,
logger
);
const buildMode = await parseBuildModeInput(
@@ -87290,6 +87359,7 @@ async function initActionState({
augmentationProperties
);
return {
version: getActionVersion(),
analysisKinds,
languages,
buildMode,
@@ -87578,6 +87648,9 @@ function dbLocationOrDefault(dbLocation, tempDir) {
function userConfigFromActionPath(tempDir) {
return path10.resolve(tempDir, "user-config-from-action.yml");
}
function hasQueryCustomisation(userConfig) {
return isDefined(userConfig["disable-default-queries"]) || isDefined(userConfig.queries) || isDefined(userConfig["query-filters"]);
}
async function initConfig(inputs) {
const { logger, tempDir } = inputs;
if (inputs.configInput) {
@@ -87603,6 +87676,17 @@ async function initConfig(inputs) {
);
}
const config = await initActionState(inputs, userConfig);
if (config.analysisKinds.length === 1 && isCodeQualityEnabled(config)) {
if (hasQueryCustomisation(config.computedConfig)) {
throw new ConfigurationError(
"Query customizations are unsupported, because only `code-quality` analysis is enabled."
);
}
const queries = codeQualityQueries.map((v) => ({ uses: v }));
config.computedConfig["disable-default-queries"] = true;
config.computedConfig.queries = queries;
config.computedConfig["query-filters"] = [];
}
const { overlayDatabaseMode, useOverlayDatabaseCaching } = await getOverlayDatabaseMode(
inputs.codeql,
inputs.repository,
@@ -87627,7 +87711,6 @@ async function initConfig(inputs) {
exclude: { tags: "exclude-from-incremental" }
});
}
await saveConfig(config, logger);
return config;
}
function parseRegistries(registriesInput) {
@@ -87836,6 +87919,9 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
}
return augmentedConfig;
}
function isCodeQualityEnabled(config) {
return config.analysisKinds.includes("code-quality" /* CodeQuality */);
}
// src/dependency-caching.ts
var os2 = __toESM(require("os"));
@@ -87888,7 +87974,7 @@ function getDefaultCacheConfig() {
async function makeGlobber(patterns) {
return glob.create(patterns.join("\n"));
}
async function downloadDependencyCaches(languages, logger) {
async function downloadDependencyCaches(languages, logger, minimizeJavaJars) {
const restoredCaches = [];
for (const language of languages) {
const cacheConfig = getDefaultCacheConfig()[language];
@@ -87905,8 +87991,10 @@ async function downloadDependencyCaches(languages, logger) {
);
continue;
}
const primaryKey = await cacheKey2(language, cacheConfig);
const restoreKeys = [await cachePrefix2(language)];
const primaryKey = await cacheKey2(language, cacheConfig, minimizeJavaJars);
const restoreKeys = [
await cachePrefix2(language, minimizeJavaJars)
];
logger.info(
`Downloading cache for ${language} with key ${primaryKey} and restore keys ${restoreKeys.join(
", "
@@ -87926,17 +88014,20 @@ async function downloadDependencyCaches(languages, logger) {
}
return restoredCaches;
}
async function cacheKey2(language, cacheConfig) {
async function cacheKey2(language, cacheConfig, minimizeJavaJars = false) {
const hash = await glob.hashFiles(cacheConfig.hash.join("\n"));
return `${await cachePrefix2(language)}${hash}`;
return `${await cachePrefix2(language, minimizeJavaJars)}${hash}`;
}
async function cachePrefix2(language) {
async function cachePrefix2(language, minimizeJavaJars) {
const runnerOs = getRequiredEnvParam("RUNNER_OS");
const customPrefix = process.env["CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX" /* DEPENDENCY_CACHING_PREFIX */];
let prefix = CODEQL_DEPENDENCY_CACHE_PREFIX;
if (customPrefix !== void 0 && customPrefix.length > 0) {
prefix = `${prefix}-${customPrefix}`;
}
if (language === "java" /* java */ && minimizeJavaJars) {
prefix = `minify-${prefix}`;
}
return `${prefix}-${CODEQL_DEPENDENCY_CACHE_VERSION}-${runnerOs}-${language}-`;
}
@@ -89301,13 +89392,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -89346,7 +89440,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",
@@ -90048,7 +90141,8 @@ function toCodedErrors(errors) {
}
var WorkflowErrors = toCodedErrors({
MissingPushHook: `Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.`,
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
InconsistentActionVersion: `Not all workflow steps that use \`github/codeql-action\` actions use the same version. Please ensure that all such steps use the same version to avoid compatibility issues.`
});
async function groupLanguagesByExtractor(languages, codeql) {
const resolveResult = await codeql.betterResolveLanguages();
@@ -90102,6 +90196,22 @@ async function getWorkflowErrors(doc, codeql) {
}
}
}
const codeqlStepRefs = [];
for (const job of Object.values(doc?.jobs || {})) {
if (Array.isArray(job.steps)) {
for (const step of job.steps) {
if (step.uses?.startsWith("github/codeql-action/")) {
const parts = step.uses.split("@");
if (parts.length >= 2) {
codeqlStepRefs.push(parts[parts.length - 1]);
}
}
}
}
}
if (codeqlStepRefs.length > 0 && !codeqlStepRefs.every((ref) => ref === codeqlStepRefs[0])) {
errors.push(WorkflowErrors.InconsistentActionVersion);
}
const hasPushTrigger = hasWorkflowTrigger("push", doc);
const hasPullRequestTrigger = hasWorkflowTrigger("pull_request", doc);
const hasWorkflowCallTrigger = hasWorkflowTrigger("workflow_call", doc);
@@ -90523,8 +90633,16 @@ exec ${goBinaryPath} "$@"`
core13.exportVariable(envVar, "false");
}
}
const minimizeJavaJars = await features.getValue(
"java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */,
codeql
);
if (shouldRestoreCache(config.dependencyCachingEnabled)) {
await downloadDependencyCaches(config.languages, logger);
await downloadDependencyCaches(
config.languages,
logger,
minimizeJavaJars
);
}
if (await codeQlVersionAtLeast(codeql, "2.17.1")) {
} else {
@@ -90557,6 +90675,16 @@ exec ${goBinaryPath} "$@"`
core13.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true");
}
}
if (process.env["CODEQL_EXTRACTOR_JAVA_OPTION_MINIMIZE_DEPENDENCY_JARS" /* JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS */]) {
logger.debug(
`${"CODEQL_EXTRACTOR_JAVA_OPTION_MINIMIZE_DEPENDENCY_JARS" /* JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS */} is already set to '${process.env["CODEQL_EXTRACTOR_JAVA_OPTION_MINIMIZE_DEPENDENCY_JARS" /* JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS */]}', so the Action will not override it.`
);
} else if (minimizeJavaJars && config.buildMode === "none" /* None */ && config.languages.includes("java" /* java */)) {
core13.exportVariable(
"CODEQL_EXTRACTOR_JAVA_OPTION_MINIMIZE_DEPENDENCY_JARS" /* JAVA_EXTRACTOR_MINIMIZE_DEPENDENCY_JARS */,
"true"
);
}
const { registriesAuthTokens, qlconfigFile } = await generateRegistries(
getOptionalInput("registries"),
config.tempDir,
@@ -90622,6 +90750,7 @@ exec ${goBinaryPath} "$@"`
} finally {
logUnwrittenDiagnostics();
}
await saveConfig(config, logger);
await sendCompletedStatusReport(
startedAt,
config,

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -26486,13 +26486,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -26501,9 +26501,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -26536,7 +26536,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -31821,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -31839,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -78419,7 +78420,7 @@ function getActionsLogger() {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -78525,6 +78526,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -78641,6 +78648,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
@@ -78689,7 +78701,18 @@ async function getConfig(tempDir, logger) {
const configString = fs3.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -78941,13 +78964,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -78986,7 +79012,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -26486,13 +26486,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -26501,9 +26501,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -26536,7 +26536,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -31821,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -31839,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -76345,7 +76346,7 @@ var require_brace_expansion2 = __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);
}
@@ -101570,7 +101571,7 @@ var require_dist_node16 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -101578,7 +101579,7 @@ var require_dist_node16 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -101588,12 +101589,12 @@ var require_dist_node16 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -101601,12 +101602,12 @@ var require_dist_node16 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -101621,7 +101622,7 @@ var require_dist_node16 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -117158,7 +117159,7 @@ function getActionsLogger() {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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;
// src/tools-features.ts
@@ -117205,6 +117206,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117321,6 +117328,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
@@ -117369,7 +117381,18 @@ async function getConfig(tempDir, logger) {
const configString = fs.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
// src/debug-artifacts.ts

1795
lib/start-proxy-action.js generated

File diff suppressed because it is too large Load Diff

158
lib/upload-lib.js generated
View File

@@ -21585,7 +21585,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21593,7 +21593,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21605,14 +21605,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21620,12 +21620,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21640,7 +21640,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -22325,7 +22325,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -22333,7 +22333,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -22345,14 +22345,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -22360,12 +22360,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -22380,7 +22380,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -33584,7 +33584,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -33632,13 +33632,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -33647,9 +33647,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -33682,7 +33682,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -38967,14 +38968,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -38985,7 +38986,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -84778,10 +84779,7 @@ var require_sarif_schema_2_1_0 = __commonJS({
// src/upload-lib.ts
var upload_lib_exports = {};
__export(upload_lib_exports, {
CodeQualityTarget: () => CodeQualityTarget,
CodeScanningTarget: () => CodeScanningTarget,
InvalidSarifUploadError: () => InvalidSarifUploadError,
SARIF_UPLOAD_ENDPOINT: () => SARIF_UPLOAD_ENDPOINT,
buildPayload: () => buildPayload,
findSarifFilesInDir: () => findSarifFilesInDir,
getSarifFilePaths: () => getSarifFilePaths,
@@ -89117,7 +89115,7 @@ function formatDuration(durationMs) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -89224,6 +89222,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -89340,6 +89344,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
@@ -89406,7 +89415,18 @@ async function getConfig(tempDir, logger) {
const configString = fs7.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -89434,7 +89454,7 @@ var toolcache3 = __toESM(require_tool_cache());
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver7 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js
// node_modules/uuid/dist/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1));
@@ -89443,27 +89463,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
// node_modules/uuid/dist/esm/rng.js
var import_crypto = require("crypto");
// node_modules/uuid/dist/rng.js
var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool);
(0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
// node_modules/uuid/dist/esm/native.js
var import_crypto2 = require("crypto");
var native_default = { randomUUID: import_crypto2.randomUUID };
// node_modules/uuid/dist/native.js
var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
// node_modules/uuid/dist/v4.js
function _v4(options, buf, offset) {
options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) {
@@ -89483,6 +89500,12 @@ function v4(options, buf, offset) {
}
return unsafeStringify(rnds);
}
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4;
// src/tar.ts
@@ -90507,13 +90530,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -90552,7 +90578,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",
@@ -92180,7 +92205,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
return JSON.parse(fs13.readFileSync(outputFile, "utf8"));
}
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
const automationID = getAutomationID(category, analysis_key, environment);
const automationID = getAutomationID2(category, analysis_key, environment);
if (automationID !== void 0) {
for (const run of sarif.runs || []) {
if (run.automationDetails === void 0) {
@@ -92193,7 +92218,7 @@ function populateRunAutomationDetails(sarif, category, analysis_key, environment
}
return sarif;
}
function getAutomationID(category, analysis_key, environment) {
function getAutomationID2(category, analysis_key, environment) {
if (category !== void 0) {
let automationID = category;
if (!automationID.endsWith("/")) {
@@ -92203,11 +92228,6 @@ function getAutomationID(category, analysis_key, environment) {
}
return computeAutomationID(analysis_key, environment);
}
var SARIF_UPLOAD_ENDPOINT = /* @__PURE__ */ ((SARIF_UPLOAD_ENDPOINT2) => {
SARIF_UPLOAD_ENDPOINT2["CODE_SCANNING"] = "PUT /repos/:owner/:repo/code-scanning/analysis";
SARIF_UPLOAD_ENDPOINT2["CODE_QUALITY"] = "PUT /repos/:owner/:repo/code-quality/analysis";
return SARIF_UPLOAD_ENDPOINT2;
})(SARIF_UPLOAD_ENDPOINT || {});
async function uploadPayload(payload, repositoryNwo, logger, target) {
logger.info("Uploading results");
if (isInTestMode()) {
@@ -92376,18 +92396,6 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
}
return payloadObj;
}
var CodeScanningTarget = {
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifPredicate: (name) => name.endsWith(".sarif") && !CodeQualityTarget.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQualityTarget = {
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifPredicate: (name) => name.endsWith(".quality.sarif"),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
const sarifPaths = getSarifFilePaths(
inputSarifPath,
@@ -92402,7 +92410,7 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
uploadTarget
);
}
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget = CodeScanningTarget) {
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
@@ -92439,6 +92447,10 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
validateUniqueCategory(sarif, uploadTarget.sentinelPrefix);
logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif);
const dumpDir = process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (dumpDir) {
dumpSarifFile(sarifPayload, dumpDir, logger, uploadTarget);
}
logger.debug(`Compressing serialized SARIF`);
const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = url.pathToFileURL(checkoutPath).href;
@@ -92477,6 +92489,21 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
sarifID
};
}
function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
if (!fs13.existsSync(outputDir)) {
fs13.mkdirSync(outputDir, { recursive: true });
} else if (!fs13.lstatSync(outputDir).isDirectory()) {
throw new ConfigurationError(
`The path specified by the ${"CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */} environment variable exists and is not a directory: ${outputDir}`
);
}
const outputFile = path14.resolve(
outputDir,
`upload${uploadTarget.sarifExtension}`
);
logger.info(`Dumping processed SARIF file to ${outputFile}`);
fs13.writeFileSync(outputFile, sarifPayload);
}
var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3;
var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3;
async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
@@ -92573,7 +92600,7 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
assertNever(status);
}
}
function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.sentinelPrefix) {
function validateUniqueCategory(sarif, sentinelPrefix) {
const categories = {};
for (const run of sarif.runs) {
const id = run?.automationDetails?.id;
@@ -92630,10 +92657,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CodeQualityTarget,
CodeScanningTarget,
InvalidSarifUploadError,
SARIF_UPLOAD_ENDPOINT,
buildPayload,
findSarifFilesInDir,
getSarifFilePaths,

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -26486,13 +26486,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -26501,9 +26501,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -26536,7 +26536,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -35658,14 +35659,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -35676,7 +35677,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -70467,7 +70468,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);
}
@@ -95692,7 +95693,7 @@ var require_dist_node16 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -95700,7 +95701,7 @@ var require_dist_node16 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -95710,12 +95711,12 @@ var require_dist_node16 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -95723,12 +95724,12 @@ var require_dist_node16 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -95743,7 +95744,7 @@ var require_dist_node16 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -117319,7 +117320,7 @@ function withGroup(groupName, f) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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;
// src/tools-features.ts
@@ -117370,6 +117371,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117486,6 +117493,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value;
}
}
function isDefined(value) {
function isDefined2(value) {
return value !== void 0 && value !== null;
}
function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
}
function getValues(context2, operator, key, modifier) {
var value = context2[key], result = [];
if (isDefined(value) && value !== "") {
if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else {
const tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) {
value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) {
if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
}
} else {
if (operator === ";") {
if (isDefined(value)) {
if (isDefined2(value)) {
result.push(encodeUnreserved(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
@@ -32287,7 +32287,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.1",
version: "3.30.4",
private: true,
description: "CodeQL action",
scripts: {
@@ -32335,13 +32335,13 @@ var require_package = __commonJS({
"node-forge": "^1.3.1",
octokit: "^5.0.3",
semver: "^7.7.2",
uuid: "^11.1.0"
uuid: "^12.0.0"
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -32350,9 +32350,9 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.9",
@@ -32385,7 +32385,8 @@ var require_package = __commonJS({
},
"eslint-plugin-jsx-a11y": {
semver: ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
};
}
@@ -37670,14 +37671,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined;
exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) {
function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null;
}
function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") {
if (!isDefined2(thing) || typeof thing !== "object") {
return false;
}
for (const property of properties) {
@@ -37688,7 +37689,7 @@ var require_typeGuards = __commonJS({
return true;
}
function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing;
return isDefined2(thing) && typeof thing === "object" && property in thing;
}
}
});
@@ -88718,6 +88719,30 @@ function fixCodeQualityCategory(logger, category) {
return category;
}
// src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
AnalysisKind2["CodeScanning"] = "code-scanning";
AnalysisKind2["CodeQuality"] = "code-quality";
return AnalysisKind2;
})(AnalysisKind || {});
var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
var CodeScanning = {
kind: "code-scanning" /* CodeScanning */,
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifExtension: ".sarif",
sarifPredicate: (name) => name.endsWith(CodeScanning.sarifExtension) && !CodeQuality.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQuality = {
kind: "code-quality" /* CodeQuality */,
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifExtension: ".quality.sarif",
sarifPredicate: (name) => name.endsWith(CodeQuality.sarifExtension),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
// src/api-client.ts
var core5 = __toESM(require_core());
var githubUtils = __toESM(require_utils4());
@@ -89084,7 +89109,7 @@ function formatDuration(durationMs) {
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 6e3;
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) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -89193,6 +89218,12 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -89309,6 +89340,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true,
minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
}
};
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -89585,14 +89621,6 @@ var fs8 = __toESM(require("fs"));
var path10 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
AnalysisKind2["CodeScanning"] = "code-scanning";
AnalysisKind2["CodeQuality"] = "code-quality";
return AnalysisKind2;
})(AnalysisKind || {});
var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts
var core8 = __toESM(require_core());
@@ -89661,7 +89689,18 @@ async function getConfig(tempDir, logger) {
const configString = fs8.readFileSync(configFile, "utf8");
logger.debug("Loaded config:");
logger.debug(configString);
return JSON.parse(configString);
const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
}
function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(cliConfig);
@@ -90116,7 +90155,7 @@ var toolcache3 = __toESM(require_tool_cache());
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver7 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js
// node_modules/uuid/dist/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1));
@@ -90125,27 +90164,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
// node_modules/uuid/dist/esm/rng.js
var import_crypto = require("crypto");
// node_modules/uuid/dist/rng.js
var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool);
(0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
// node_modules/uuid/dist/esm/native.js
var import_crypto2 = require("crypto");
var native_default = { randomUUID: import_crypto2.randomUUID };
// node_modules/uuid/dist/native.js
var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
// node_modules/uuid/dist/v4.js
function _v4(options, buf, offset) {
options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) {
@@ -90165,6 +90201,12 @@ function v4(options, buf, offset) {
}
return unsafeStringify(rnds);
}
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4;
// src/tar.ts
@@ -91189,13 +91231,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
);
}
},
async betterResolveLanguages() {
async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [
"resolve",
"languages",
"--format=betterjson",
"--extractor-options-verbosity=4",
"--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"])
];
const output = await runCli(cmd, codeqlArgs);
@@ -91234,7 +91279,6 @@ ${output}`
"run-queries",
...flags,
databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024",
// Try to leave at least 1GB free
"-v",
@@ -92862,7 +92906,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
return JSON.parse(fs14.readFileSync(outputFile, "utf8"));
}
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
const automationID = getAutomationID(category, analysis_key, environment);
const automationID = getAutomationID2(category, analysis_key, environment);
if (automationID !== void 0) {
for (const run2 of sarif.runs || []) {
if (run2.automationDetails === void 0) {
@@ -92875,7 +92919,7 @@ function populateRunAutomationDetails(sarif, category, analysis_key, environment
}
return sarif;
}
function getAutomationID(category, analysis_key, environment) {
function getAutomationID2(category, analysis_key, environment) {
if (category !== void 0) {
let automationID = category;
if (!automationID.endsWith("/")) {
@@ -93053,18 +93097,6 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
}
return payloadObj;
}
var CodeScanningTarget = {
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifPredicate: (name) => name.endsWith(".sarif") && !CodeQualityTarget.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQualityTarget = {
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifPredicate: (name) => name.endsWith(".quality.sarif"),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
const sarifPaths = getSarifFilePaths(
inputSarifPath,
@@ -93079,7 +93111,7 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
uploadTarget
);
}
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget = CodeScanningTarget) {
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
@@ -93116,6 +93148,10 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
validateUniqueCategory(sarif, uploadTarget.sentinelPrefix);
logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif);
const dumpDir = process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (dumpDir) {
dumpSarifFile(sarifPayload, dumpDir, logger, uploadTarget);
}
logger.debug(`Compressing serialized SARIF`);
const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = url.pathToFileURL(checkoutPath).href;
@@ -93154,6 +93190,21 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
sarifID
};
}
function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
if (!fs14.existsSync(outputDir)) {
fs14.mkdirSync(outputDir, { recursive: true });
} else if (!fs14.lstatSync(outputDir).isDirectory()) {
throw new ConfigurationError(
`The path specified by the ${"CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */} environment variable exists and is not a directory: ${outputDir}`
);
}
const outputFile = path15.resolve(
outputDir,
`upload${uploadTarget.sarifExtension}`
);
logger.info(`Dumping processed SARIF file to ${outputFile}`);
fs14.writeFileSync(outputFile, sarifPayload);
}
var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3;
var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3;
async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
@@ -93250,7 +93301,7 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
assertNever(status);
}
}
function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.sentinelPrefix) {
function validateUniqueCategory(sarif, sentinelPrefix) {
const categories = {};
for (const run2 of sarif.runs) {
const id = run2?.automationDetails?.id;
@@ -93359,13 +93410,13 @@ async function run() {
category,
features,
logger,
CodeScanningTarget
CodeScanning
);
core13.setOutput("sarif-id", uploadResult.sarifID);
if (fs15.lstatSync(sarifPath).isDirectory()) {
const qualitySarifFiles = findSarifFilesInDir(
sarifPath,
CodeQualityTarget.sarifPredicate
CodeQuality.sarifPredicate
);
if (qualitySarifFiles.length !== 0) {
await uploadSpecifiedFiles(
@@ -93374,7 +93425,7 @@ async function run() {
fixCodeQualityCategory(logger, category),
features,
logger,
CodeQualityTarget
CodeQuality
);
}
}

266
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "3.30.1",
"version": "3.30.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "3.30.1",
"version": "3.30.4",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^2.3.1",
@@ -34,26 +34,24 @@
"node-forge": "^1.3.1",
"octokit": "^5.0.3",
"semver": "^7.7.2",
"uuid": "^11.1.0"
"uuid": "^12.0.0"
},
"devDependencies": {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
"ava": "^6.4.1",
"esbuild": "^0.25.9",
@@ -1332,9 +1330,9 @@
}
},
"node_modules/@eslint/js": {
"version": "9.34.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz",
"integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==",
"version": "9.35.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz",
"integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2459,16 +2457,6 @@
"@types/node": "*"
}
},
"node_modules/@types/get-folder-size": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/get-folder-size/-/get-folder-size-3.0.4.tgz",
"integrity": "sha512-tSf/k7Undx6jKRwpChR9tl+0ZPf0BVwkjBRtJ5qSnz6iWm2ZRYMAS2MktC2u7YaTAFHmxpL/LBxI85M7ioJCSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/js-yaml": {
"version": "4.0.9",
"dev": true,
@@ -2510,10 +2498,11 @@
}
},
"node_modules/@types/semver": {
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
"integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
"dev": true
"version": "7.7.1",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/sinon": {
"version": "17.0.4",
@@ -2530,23 +2519,18 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/uuid": {
"version": "10.0.0",
"dev": true,
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz",
"integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.43.0.tgz",
"integrity": "sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.41.0",
"@typescript-eslint/type-utils": "8.41.0",
"@typescript-eslint/utils": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0",
"@typescript-eslint/scope-manager": "8.43.0",
"@typescript-eslint/type-utils": "8.43.0",
"@typescript-eslint/utils": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0",
"graphemer": "^1.4.0",
"ignore": "^7.0.0",
"natural-compare": "^1.4.0",
@@ -2560,20 +2544,20 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"@typescript-eslint/parser": "^8.41.0",
"@typescript-eslint/parser": "^8.43.0",
"eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz",
"integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.43.0.tgz",
"integrity": "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0"
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2584,9 +2568,9 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
"integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.43.0.tgz",
"integrity": "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2598,16 +2582,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz",
"integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.43.0.tgz",
"integrity": "sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.41.0",
"@typescript-eslint/tsconfig-utils": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0",
"@typescript-eslint/project-service": "8.43.0",
"@typescript-eslint/tsconfig-utils": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -2627,16 +2611,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz",
"integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.43.0.tgz",
"integrity": "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/typescript-estree": "8.41.0"
"@typescript-eslint/scope-manager": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/typescript-estree": "8.43.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2651,13 +2635,13 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
"integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.43.0.tgz",
"integrity": "sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/types": "8.43.0",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -2730,16 +2714,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz",
"integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.43.0.tgz",
"integrity": "sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/typescript-estree": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0",
"@typescript-eslint/scope-manager": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/typescript-estree": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0",
"debug": "^4.3.4"
},
"engines": {
@@ -2755,14 +2739,14 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz",
"integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.43.0.tgz",
"integrity": "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0"
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2773,9 +2757,9 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
"integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.43.0.tgz",
"integrity": "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2787,16 +2771,16 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz",
"integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.43.0.tgz",
"integrity": "sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.41.0",
"@typescript-eslint/tsconfig-utils": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0",
"@typescript-eslint/project-service": "8.43.0",
"@typescript-eslint/tsconfig-utils": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -2816,13 +2800,13 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
"integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.43.0.tgz",
"integrity": "sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/types": "8.43.0",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -2886,14 +2870,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz",
"integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.43.0.tgz",
"integrity": "sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.41.0",
"@typescript-eslint/types": "^8.41.0",
"@typescript-eslint/tsconfig-utils": "^8.43.0",
"@typescript-eslint/types": "^8.43.0",
"debug": "^4.3.4"
},
"engines": {
@@ -2908,9 +2892,9 @@
}
},
"node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
"integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.43.0.tgz",
"integrity": "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2940,9 +2924,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz",
"integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.43.0.tgz",
"integrity": "sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2957,15 +2941,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz",
"integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.43.0.tgz",
"integrity": "sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/typescript-estree": "8.41.0",
"@typescript-eslint/utils": "8.41.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/typescript-estree": "8.43.0",
"@typescript-eslint/utils": "8.43.0",
"debug": "^4.3.4",
"ts-api-utils": "^2.1.0"
},
@@ -2982,14 +2966,14 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz",
"integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.43.0.tgz",
"integrity": "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0"
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3000,9 +2984,9 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
"integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.43.0.tgz",
"integrity": "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3014,16 +2998,16 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz",
"integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.43.0.tgz",
"integrity": "sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.41.0",
"@typescript-eslint/tsconfig-utils": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/visitor-keys": "8.41.0",
"@typescript-eslint/project-service": "8.43.0",
"@typescript-eslint/tsconfig-utils": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/visitor-keys": "8.43.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -3043,16 +3027,16 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz",
"integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.43.0.tgz",
"integrity": "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.41.0",
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/typescript-estree": "8.41.0"
"@typescript-eslint/scope-manager": "8.43.0",
"@typescript-eslint/types": "8.43.0",
"@typescript-eslint/typescript-estree": "8.43.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3067,13 +3051,13 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.41.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
"integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
"version": "8.43.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.43.0.tgz",
"integrity": "sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.41.0",
"@typescript-eslint/types": "8.43.0",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -3180,9 +3164,9 @@
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7808,9 +7792,9 @@
}
},
"node_modules/readdir-glob/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
@@ -9092,16 +9076,16 @@
"license": "MIT"
},
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-12.0.0.tgz",
"integrity": "sha512-USe1zesMYh4fjCA8ZH5+X5WIVD0J4V1Jksm1bFTVBX2F/cwSXt0RO5w/3UXbdLKmZX65MiWV+hwhSS8p6oBTGA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
"uuid": "dist/bin/uuid"
}
},
"node_modules/webidl-conversions": {

View File

@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "3.30.1",
"version": "3.30.4",
"private": true,
"description": "CodeQL action",
"scripts": {
@@ -48,13 +48,13 @@
"node-forge": "^1.3.1",
"octokit": "^5.0.3",
"semver": "^7.7.2",
"uuid": "^11.1.0"
"uuid": "^12.0.0"
},
"devDependencies": {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0",
"@eslint/js": "^9.35.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0",
"@types/archiver": "^6.0.3",
@@ -63,9 +63,9 @@
"@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9",
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.41.0",
"ava": "^6.4.1",
"esbuild": "^0.25.9",
@@ -98,6 +98,7 @@
},
"eslint-plugin-jsx-a11y": {
"semver": ">=6.3.1"
}
},
"brace-expansion@2.0.1": "2.0.2"
}
}

View File

@@ -12,6 +12,5 @@ steps:
languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze

View File

@@ -9,7 +9,6 @@ steps:
languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:

View File

@@ -17,7 +17,6 @@ steps:
CORECLR_PROFILER_PATH_64: ""
- uses: ./../action/analyze
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then

View File

@@ -10,7 +10,6 @@ env:
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
steps:
- name: Test setup
shell: bash
run: |
# Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir
@@ -22,7 +21,6 @@ steps:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
shell: bash
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -7,7 +7,6 @@ env:
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
steps:
- name: Set up Java test repo configuration
shell: bash
run: |
mv * .github ../action/tests/multi-language-repo/
mv ../action/tests/multi-language-repo/.github/workflows .github
@@ -22,7 +21,6 @@ steps:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
shell: bash
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -22,7 +22,6 @@ steps:
fi
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze

View File

@@ -6,7 +6,6 @@ env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
steps:
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -18,8 +17,7 @@ steps:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
- shell: bash
run: |
- run: |
if ls /usr/bin/errno; then
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
exit 1

View File

@@ -6,7 +6,6 @@ env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
steps:
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -18,8 +17,7 @@ steps:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
- run: |
if ! ls /usr/bin/errno; then
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
else

View File

@@ -6,7 +6,6 @@ env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
steps:
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
@@ -18,8 +17,7 @@ steps:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
- run: |
if ! ls /usr/bin/errno; then
echo "Did not autoinstall errno"
exit 1

View File

@@ -10,7 +10,6 @@ steps:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Add test diagnostics
shell: bash
env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: |

View File

@@ -11,7 +11,6 @@ steps:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
@@ -23,7 +22,6 @@ steps:
path: "${{ runner.temp }}/results/javascript.sarif"
retention-days: 7
- name: Check results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
expected_baseline_languages="c csharp go java kotlin javascript python ruby"

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