Compare commits

...

310 Commits

Author SHA1 Message Date
Henry Mercer
16140ae1a1 Merge pull request #3213 from github/update-v4.30.9-70205d3d1
Merge main into releases/v4
2025-10-17 16:22:48 +01:00
github-actions[bot]
30db5fee08 Update changelog for v4.30.9 2025-10-17 14:54:08 +00:00
Michael B. Gale
70205d3d12 Merge pull request #3211 from github/mbg/init/starting-partial-config
Make analysis kinds available for `starting` status report
2025-10-17 14:46:51 +01:00
Michael B. Gale
697c209bfc Merge remote-tracking branch 'origin/main' into mbg/init/starting-partial-config 2025-10-17 14:21:44 +01:00
Henry Mercer
1bd53ba38c Merge pull request #3205 from github/update-bundle/codeql-bundle-v2.23.3
Update default bundle to 2.23.3
2025-10-17 14:18:19 +01:00
github-actions[bot]
cac4df0c79 Rebuild 2025-10-17 12:59:18 +00:00
Henry Mercer
77e5c0d0a2 Merge branch 'main' into update-bundle/codeql-bundle-v2.23.3 2025-10-17 13:53:02 +01:00
Michael B. Gale
97a4f751be Merge pull request #3204 from github/mbg/setup-codeql
Add `setup-codeql` action
2025-10-17 13:47:42 +01:00
Michael B. Gale
2d5512b361 Merge remote-tracking branch 'origin/main' into mbg/init/starting-partial-config 2025-10-17 13:44:28 +01:00
Michael B. Gale
fa7bdf0559 Call getAnalysisKinds a second time, and ignore exceptions thrown during the first call 2025-10-17 13:40:18 +01:00
Michael B. Gale
57c7b0a884 Rename initAnalysisKinds to getAnalysisKinds and cache results 2025-10-17 13:33:55 +01:00
Michael B. Gale
4874f90a8d Merge branch 'main' into mbg/setup-codeql 2025-10-17 13:32:40 +01:00
Michael B. Gale
5a9e92afca Merge pull request #3212 from github/mbg/ci/pin-python
Install Python 3.13 to fix failing PR checks with older CLI versions
2025-10-17 13:31:26 +01:00
Michael B. Gale
9bd9b03572 Remove now unused qualityQueriesInput from InitConfigInputs 2025-10-17 13:22:41 +01:00
Michael B. Gale
3569065d7e Install Python 3.13, except for nightly-latest 2025-10-17 12:51:50 +01:00
Michael B. Gale
c0e8887d5a Throw a ConfigurationError if setup-codeql has run before init 2025-10-17 12:17:47 +01:00
Michael B. Gale
3c8d00aea0 Initialise analysis kinds before starting status report 2025-10-17 11:46:35 +01:00
Michael B. Gale
bc93b04b0c Add initAnalysisKinds for analysis-kinds enablement logic 2025-10-17 11:43:00 +01:00
Michael B. Gale
adf39dd33f Add function for starting status report 2025-10-17 11:16:00 +01:00
Michael B. Gale
000295122d Use failure instead of aborted 2025-10-16 19:05:03 +01:00
Michael B. Gale
2611d033d7 De-duplicate InitToolsDownloadFIelds definition 2025-10-16 19:03:46 +01:00
Michael B. Gale
ee753b4724 Merge pull request #3209 from github/mbg/code-quality/skip-failed-upload
Skip failed SARIF upload if Code Quality is the only analysis kind
2025-10-16 15:22:01 +01:00
Michael B. Gale
db6938a4d0 Change check to be restrictive by default 2025-10-16 15:06:19 +01:00
Michael B. Gale
d02f50ee62 Update changelog for setup-codeql 2025-10-16 14:50:16 +01:00
Michael B. Gale
f4237b7e76 Add setup-codeql to README 2025-10-16 14:48:35 +01:00
Michael B. Gale
302fc5e00d Update docs 2025-10-16 14:46:35 +01:00
Michael B. Gale
c77b3fb96e Skip failed SARIF upload if analysis-kinds: code-quality 2025-10-16 14:27:17 +01:00
Michael B. Gale
2a54ab5016 Fix init-action-post-helper tests using broken Configs 2025-10-16 14:18:51 +01:00
github-actions[bot]
a60e5ce8ec Add changelog note 2025-10-14 12:53:29 +00:00
github-actions[bot]
8d0251c1f7 Update default bundle to codeql-bundle-v2.23.3 2025-10-14 12:53:17 +00:00
Michael B. Gale
80220dcd46 Use setup-codeql action in bundle-from-toolcache check 2025-10-12 14:14:07 +01:00
Michael B. Gale
e72fd9acb1 Add initial setup-codeql action 2025-10-12 14:14:06 +01:00
Michael B. Gale
17783bfb99 Merge pull request #3199 from github/mergeback/v4.30.8-to-main-f443b600
Mergeback v4.30.8 refs/heads/releases/v4 into main
2025-10-10 18:16:14 +01:00
Henry Mercer
3c764cd93a Only create GitHub release if it doesn't already exist 2025-10-10 17:54:08 +01:00
Henry Mercer
e1968324ff Merge branch 'releases/v4' into mergeback/v4.30.8-to-main-f443b600 2025-10-10 17:53:24 +01:00
Henry Mercer
2a6736cca7 Merge pull request #3200 from github/henrymercer/backport-hotfix
Revert "Rebuild" commit rather than "Update dependencies"
2025-10-10 17:47:40 +01:00
Henry Mercer
c8765c966b Revert "Rebuild" commit rather than "Update dependencies" 2025-10-10 17:23:02 +01:00
github-actions[bot]
61789e2fdb Rebuild 2025-10-10 15:59:22 +00:00
github-actions[bot]
5cd2d139cb Update changelog and version after v4.30.8 2025-10-10 15:55:20 +00:00
Michael B. Gale
f443b600d9 Merge pull request #3198 from github/update-v4.30.8-527f0f324
Merge main into releases/v4
2025-10-10 16:54:36 +01:00
github-actions[bot]
7a2cb623ed Update changelog for v4.30.8 2025-10-10 14:34:56 +00:00
Henry Mercer
527f0f324a Merge pull request #3195 from github/dependabot/npm_and_yarn/npm-minor-37415c9066
Bump the npm-minor group with 3 updates
2025-10-10 15:22:52 +01:00
Henry Mercer
f402506f0f Merge pull request #3196 from github/dependabot/github_actions/dot-github/workflows/actions-minor-945aab589d
Bump ruby/setup-ruby from 1.263.0 to 1.265.0 in /.github/workflows in the actions-minor group across 1 directory
2025-10-10 15:20:16 +01:00
Henry Mercer
f5e53f9476 Merge pull request #3197 from github/dependabot/github_actions/dot-github/workflows/github/codeql-action-4
Bump github/codeql-action from 3 to 4 in /.github/workflows
2025-10-10 15:13:23 +01:00
Michael B. Gale
4e90a42a3e Merge pull request #3193 from github/mbg/ff/tools-toolcache
Gate `tools: toolcache` behind FF
2025-10-10 15:09:00 +01:00
github-actions[bot]
413a4a4df1 Rebuild 2025-10-10 13:49:43 +00:00
dependabot[bot]
452186448a Bump github/codeql-action from 3 to 4 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-10 13:48:11 +00:00
dependabot[bot]
eadf14bf6e Bump ruby/setup-ruby
Bumps the actions-minor group with 1 update in the /.github/workflows directory: [ruby/setup-ruby](https://github.com/ruby/setup-ruby).


Updates `ruby/setup-ruby` from 1.263.0 to 1.265.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](0481980f17...ab177d40ee)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.265.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-10 13:48:07 +00:00
github-actions[bot]
e1257b6fda Rebuild 2025-10-10 13:47:47 +00:00
dependabot[bot]
b516b1d4bc Bump the npm-minor group with 3 updates
Bumps the npm-minor group with 3 updates: [semver](https://github.com/npm/node-semver), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `semver` from 7.7.2 to 7.7.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.7.2...v7.7.3)

Updates `@typescript-eslint/eslint-plugin` from 8.45.0 to 8.46.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.46.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.45.0 to 8.46.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.46.0/packages/parser)

---
updated-dependencies:
- dependency-name: semver
  dependency-version: 7.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.46.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.46.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-10 13:46:16 +00:00
Henry Mercer
168b2dee16 Merge pull request #3194 from github/henrymercer-patch-1
Dependabot: Only group minor and patch updates
2025-10-10 14:44:22 +01:00
Michael B. Gale
4704ab1869 Fix swapped log levels 2025-10-10 14:42:09 +01:00
Michael B. Gale
dc2ced8385 Add tests for scenarios where the feature is unavailable 2025-10-10 14:39:59 +01:00
Michael B. Gale
5c752c85dd Add test macro for fallback tests 2025-10-10 14:39:58 +01:00
Henry Mercer
e74435a1da Dependabot: Only group minor and patch updates
Major updates are likely to include breaking changes and are worth reviewing individually.
2025-10-10 14:28:32 +01:00
Michael B. Gale
524b9a00e8 Fix log message swap 2025-10-10 14:04:39 +01:00
Michael B. Gale
a512fe0868 Gate tools: toolcache behind FF
Mainly to allow us to disable it, if needed.
2025-10-10 13:49:06 +01:00
Michael B. Gale
62f0f21c3c Add AllowToolcacheInput feature 2025-10-10 13:27:50 +01:00
Paolo Tranquilli
a8440d08d5 Merge pull request #3185 from github/redsun82/skip-sarif-upload-tests
Add unit tests for `uploadPayload`
2025-10-10 14:00:05 +02:00
Paolo Tranquilli
610c7c68e3 Address review 2025-10-09 15:24:02 +02:00
Paolo Tranquilli
ff2fc66cc1 Simplify uploadPayload tests 2025-10-09 12:31:00 +02:00
Paolo Tranquilli
a841c540b7 Scratch uploadSpecifiedFiles tests, make uploadPayload tests instead 2025-10-09 12:18:14 +02:00
Paolo Tranquilli
aeb12f6eaa Merge branch 'main' into redsun82/skip-sarif-upload-tests 2025-10-09 11:38:10 +02:00
Henry Mercer
6fd4ceb7bb Merge pull request #3189 from github/henrymercer/download-codeql-rate-limit
Add configuration error for rate limited CodeQL download
2025-10-08 15:11:29 +01:00
Michael B. Gale
196a3e577b Merge pull request #3188 from github/mbg/telemetry/partial-config
Allow `Partial<Config>` for `createStatusReportBase`
2025-10-08 14:59:05 +01:00
Henry Mercer
98abb870dc Add configuration error for rate limited CodeQL download 2025-10-08 14:43:54 +01:00
Michael B. Gale
bdd2cdf891 Also include language in error status report for start-proxy, if available 2025-10-08 13:13:04 +01:00
Michael B. Gale
fb148789ab Include languages in start-proxy telemetry 2025-10-08 13:01:35 +01:00
Michael B. Gale
2ff418f28a Parse language before calling getCredentials 2025-10-08 13:01:35 +01:00
Michael B. Gale
527501d15d Allow createStatusReportBase to accept a Partial<Config> 2025-10-08 13:01:35 +01:00
Paolo Tranquilli
621809b239 Address copilot review 2025-10-08 12:24:49 +02:00
Paolo Tranquilli
8301b8b096 Merge pull request #3180 from github/redsun82/skip-sarif-upload
Introduce `CODEQL_ACTION_SKIP_SARIF_UPLOAD`
2025-10-08 12:09:54 +02:00
Nick Rolfe
7bdfa9736a Merge pull request #3184 from github/nickrolfe/go-overlay
Overlays: allow any build mode for Go
2025-10-08 10:48:40 +01:00
Paolo Tranquilli
a57997f2d2 Fix test after rebase 2025-10-08 09:34:48 +02:00
Paolo Tranquilli
4489a63a9d Add unit tests for uploadSpecifiedFiles 2025-10-08 09:34:48 +02:00
Paolo Tranquilli
1707898e5b Merge branch 'main' into redsun82/skip-sarif-upload 2025-10-08 09:34:05 +02:00
Paolo Tranquilli
d05f2255a0 Tweak comment 2025-10-08 09:34:01 +02:00
Nick Rolfe
7892cb2362 Overlays: allow any build mode for Go
We have a check that a traced language can only run overlay analysis
with build-mode: none, but Go does not currently declare support for
BMN, even though it has a similar autobuild mode that will work for
overlay analysis.

This commit adds a hard-coded exception to that check, allowing any
build mode for Go. This is intended as a short-term solution until Go
declares BMN support. It should be safe, since we can choose not to
enable the feature flag for Go repos using traced builds.
2025-10-07 17:45:08 +01:00
Mario Campos
8a6b62bc2d Merge pull request #3186 from github/mergeback/v4.30.7-to-main-e296a935
Mergeback v4.30.7 refs/heads/releases/v4 into main
2025-10-07 11:20:49 -05:00
github-actions[bot]
d95a3b53f8 Rebuild 2025-10-07 16:01:48 +00:00
github-actions[bot]
257e42ce3d Merge remote-tracking branch 'origin/main' into mergeback/v4.30.7-to-main-e296a935 2025-10-07 16:01:00 +00:00
github-actions[bot]
074940162c Update changelog and version after v4.30.7 2025-10-07 15:22:00 +00:00
Mario Campos
e296a93559 Merge pull request #3183 from github/update-v4.30.7-55283843c
Merge main into releases/v4
2025-10-07 10:21:14 -05:00
Paolo Tranquilli
df65651d4f Merge branch 'main' into redsun82/skip-sarif-upload 2025-10-07 17:17:13 +02:00
Paolo Tranquilli
1b09eb4ccc Address review 2025-10-07 17:17:06 +02:00
Michael B. Gale
2f11c17b09 Merge pull request #3175 from github/mbg/setup/toolcache
Support requesting latest version from toolcache with `tools: toolcache`
2025-10-07 10:32:03 +01:00
Michael B. Gale
0ba4970165 Merge branch 'main' into mbg/setup/toolcache 2025-10-07 10:09:12 +01:00
Michael B. Gale
5431b6a308 Merge pull request #3176 from github/mbg/pr-template/tests
Add more questions to the PR template
2025-10-07 10:05:07 +01:00
Michael B. Gale
7f5db167b6 Merge branch 'main' into mbg/pr-template/tests 2025-10-07 09:48:29 +01:00
Michael B. Gale
239d7b286f Merge pull request #3181 from github/mbg/pr-checks/upload-sarif
Add more end-to-end tests for `upload-sarif`
2025-10-07 09:48:05 +01:00
Paolo Tranquilli
86b2ad6646 Remove unneeded comment 2025-10-07 10:36:45 +02:00
Paolo Tranquilli
5dfb610e99 Merge branch 'main' into redsun82/skip-sarif-upload 2025-10-07 10:36:12 +02:00
Henry Mercer
1491baa17e Merge branch 'main' into mbg/pr-checks/upload-sarif 2025-10-07 09:28:42 +01:00
Henry Mercer
db562a696f Merge pull request #3182 from github/dependabot/npm_and_yarn/npm-b02b6854f6
Bump the npm group with 4 updates
2025-10-07 09:16:58 +01:00
github-actions[bot]
93c16735fa Update changelog for v4.30.7 2025-10-06 18:19:26 +00:00
Mario Campos
55283843ca Merge pull request #3169 from github/mario-campos/node24
[v4] Upgrade Node.js runtime from v20 to v24
2025-10-06 12:52:46 -05:00
github-actions[bot]
6877465dc1 Rebuild 2025-10-06 17:03:52 +00:00
dependabot[bot]
ff23a55f4d Bump the npm group with 4 updates
Bumps the npm group with 4 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@eslint/js` from 9.36.0 to 9.37.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.37.0/packages/js)

Updates `@typescript-eslint/eslint-plugin` from 8.44.1 to 8.45.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.45.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.44.1 to 8.45.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.45.0/packages/parser)

Updates `typescript` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.2...v5.9.3)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.45.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.45.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 17:02:21 +00:00
Mario Campos
b66db86c84 Hoist CHANGELOG note back to "UNRELEASED" section. 2025-10-06 11:40:43 -05:00
Paolo Tranquilli
00a6e13cbf Tweak SARIF skipping logs 2025-10-06 17:03:29 +02:00
Paolo Tranquilli
25c8db918a Revert "Specify reason for skipping SARIF upload in logs"
This reverts commit 680b07003d.
2025-10-06 16:59:45 +02:00
Michael B. Gale
dabf6fc578 Adjust step names to be clearer 2025-10-06 15:40:35 +01:00
Michael B. Gale
14c5d77032 Fix: Update payload.json path in with-checkout-path test 2025-10-06 15:28:40 +01:00
Michael B. Gale
380e002752 Add explicit category values 2025-10-06 15:15:43 +01:00
Paolo Tranquilli
680b07003d Specify reason for skipping SARIF upload in logs 2025-10-06 15:39:29 +02:00
Michael B. Gale
22aba57acf Include analysis kind in payloadSaveFile path in uploadPayload 2025-10-06 14:30:30 +01:00
Paolo Tranquilli
11e4034414 Clarify comment about SKIP_SARIF_UPLOAD setting 2025-10-06 15:23:18 +02:00
Paolo Tranquilli
882667e383 Update src/util.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 15:22:34 +02:00
Michael B. Gale
6f964b7776 Cover more cases in upload-sarif check 2025-10-06 14:10:49 +01:00
Michael B. Gale
6bdf5d3d00 Run upload-sarif check for all analysis-kinds values 2025-10-06 13:56:19 +01:00
Michael B. Gale
9b3ade946d Rename upload-quality-sarif.yml workflow 2025-10-06 13:50:21 +01:00
Paolo Tranquilli
e0b9da7b0a Introduce CODEQL_ACTION_SKIP_SARIF_UPLOAD
This triggers a subset of the behavior of `CODEQL_ACTION_TEST_MODE`,
specifically just skipping the SARIF upload step. This is required for
our internal testing where we want the SARIF file (via
`CODEQL_ACTION_DUMP_SARIF_DIR`) but don't want to actually upload it,
but we don't want the rest of the behaviour of `CODEQL_ACTION_TEST_MODE`
that is specific for `codeql-action` own CI checks.
2025-10-06 14:38:32 +02:00
Michael B. Gale
726a341ed4 Restrict when tools: toolcache can be used 2025-10-06 13:16:16 +01:00
Michael B. Gale
1cc5eb6636 Use semver.compare instead of semver.lt 2025-10-06 12:58:00 +01:00
Michael B. Gale
43ce7ef399 Add isDynamicWorkflow function 2025-10-06 12:55:54 +01:00
Michael B. Gale
4d0c164f60 Remove toolcache option description from action.yml 2025-10-06 12:53:17 +01:00
Mario Campos
b2e22323e2 Merge remote-tracking branch 'origin/main' into mario-campos/node24
# Conflicts:
#	lib/analyze-action-post.js
#	lib/analyze-action.js
#	lib/autobuild-action.js
#	lib/init-action-post.js
#	lib/init-action.js
#	lib/resolve-environment-action.js
#	lib/start-proxy-action-post.js
#	lib/start-proxy-action.js
#	lib/upload-lib.js
#	lib/upload-sarif-action-post.js
#	lib/upload-sarif-action.js
#	package-lock.json
#	package.json
2025-10-03 12:59:21 -05:00
Michael B. Gale
dd9e24a8a4 Add more questions to the PR template 2025-10-03 16:27:36 +01:00
Michael B. Gale
13a3a6890f Add basic PR check for tools: toolcache 2025-10-03 15:49:29 +01:00
Michael B. Gale
7d468c931c Accept toolcache as version value for prepare-test 2025-10-03 15:48:04 +01:00
Michael B. Gale
425ef85595 Support requesting CLI from toolcache with tools: toolcache 2025-10-03 15:40:33 +01:00
Michael B. Gale
297313df79 Add getLatestToolcacheVersion with tests 2025-10-03 14:40:34 +01:00
Michael B. Gale
065c6cfb78 Merge pull request #3174 from github/mbg/fix/start-proxy-matrix
Make `matrix` available to `start-proxy` action
2025-10-03 12:26:10 +01:00
Michael B. Gale
7fb8378d93 Re-throw exception in createStatusReportBase when in test mode 2025-10-03 11:59:36 +01:00
Mario Campos
dddf033776 Revert changes to build.mjs 2025-10-02 14:32:40 -05:00
Mario Campos
54ae8ba5b1 Simplify PR check by reverting changes to @types/node. 2025-10-02 14:24:46 -05:00
Michael B. Gale
65e9e640ee Make matrix available to start-proxy action 2025-10-02 17:45:22 +01:00
Nick Rolfe
21a7ba37dd Merge pull request #3173 from github/mergeback/v3.30.6-to-main-64d10c13
Mergeback v3.30.6 refs/heads/releases/v3 into main
2025-10-02 15:15:57 +01:00
github-actions[bot]
70836b1ec4 Rebuild 2025-10-02 13:55:07 +00:00
github-actions[bot]
205744e04f Update changelog and version after v3.30.6 2025-10-02 13:53:03 +00:00
Nick Rolfe
64d10c1313 Merge pull request #3172 from github/update-v3.30.6-10feb5d2a
Merge main into releases/v3
2025-10-02 14:52:21 +01:00
github-actions[bot]
909610e8a8 Update changelog for v3.30.6 2025-10-02 13:28:36 +00:00
Henry Mercer
d899b2ed98 Merge branch 'main' into mario-campos/node24 2025-10-02 12:36:53 +01:00
Michael B. Gale
10feb5d2a2 Merge pull request #3167 from github/mbg/upload-sarif/find-then-filter
Find, then filter, SARIF files for `upload-sarif` Action
2025-10-02 11:51:47 +01:00
Nick Rolfe
4182ea3d4e Merge pull request #3168 from github/update-bundle/codeql-bundle-v2.23.2
Update default bundle to 2.23.2
2025-10-02 11:25:07 +01:00
Michael B. Gale
34afe5b7b1 Merge pull request #3171 from github/mbg/start-proxy/telemetry
Add basic telemetry for `start-proxy` Action
2025-10-02 11:23:10 +01:00
Nick Rolfe
096fe67f97 Merge branch 'main' into update-bundle/codeql-bundle-v2.23.2 2025-10-02 11:08:29 +01:00
Michael B. Gale
b4964014ad Merge pull request #3170 from github/mbg/start-proxy/remove-update-workflow
Remove `update-proxy-release` workflow
2025-10-02 11:05:22 +01:00
Michael B. Gale
d573787cca Report registry types that are configured for CodeQL in start-proxy telemetry 2025-10-01 16:00:05 +01:00
Michael B. Gale
15916800df Send a basic status report in start-proxy Action if it succeeds 2025-10-01 15:55:20 +01:00
Michael B. Gale
cb5a2849ac Send status report when start-proxy fails 2025-10-01 15:52:28 +01:00
Michael B. Gale
6de1d741f6 Move error handling from startProxy to runWrapper in start-proxy action 2025-10-01 15:43:43 +01:00
Michael B. Gale
a506145f31 Add StartProxy to ActionName enum 2025-10-01 15:42:08 +01:00
Michael B. Gale
aac66ec793 Remove update-proxy-release workflow 2025-10-01 15:30:18 +01:00
Michael B. Gale
91a63dc72c Remove undefined values from results of unsafeEntriesInvariant 2025-10-01 15:28:56 +01:00
Michael B. Gale
d25fa60a90 ESLint: Disable no-unused-vars for parameters starting with _ 2025-10-01 15:28:31 +01:00
Mario Campos
3adb1ff7b8 Reorder supported tags in descending order
Co-authored-by: Henry Mercer <henrymercer@github.com>
2025-10-01 09:04:18 -05:00
Mario Campos
d4b5380db4 Document Node.js 24 change in CHANGELOG.md. 2025-09-30 14:11:13 -05:00
Mario Campos
d4bbcb74ca Implement simultaneous PR checks for Node.js v20, v24.
Copied from #2006.
2025-09-30 14:11:13 -05:00
Mario Campos
180438161e Specify Node.js v24 in actions/setup-node steps. 2025-09-30 14:11:13 -05:00
Mario Campos
d7ada03e02 Downgrade upload-sarif@v4 -> v3
I got ahead of myself; v4 hasn't been tagged yet.
2025-09-30 14:11:13 -05:00
Mario Campos
30445af89f Rebuild JS after upgrading to Node.js 24. 2025-09-30 14:11:04 -05:00
Mario Campos
7434149006 Upgrade Node.js version to 24.
This requires creating a new major-version (v4) of codeql-action.
2025-09-30 13:56:31 -05:00
Michael B. Gale
9a0b46abff Rename keys and entries helpers and update docs 2025-09-30 12:52:04 +01:00
Michael B. Gale
b8c496644d Rename variables in getGroupedSarifFilePaths 2025-09-30 12:05:59 +01:00
Michael B. Gale
ad086e4d90 Use path.extname for some extension checks 2025-09-30 11:55:04 +01:00
github-actions[bot]
47b5ac77ee Add changelog note 2025-09-30 08:31:56 +00:00
github-actions[bot]
b5caf1196e Update default bundle to codeql-bundle-v2.23.2 2025-09-30 08:31:45 +00:00
Michael B. Gale
80cb6b56b9 Merge pull request #3136 from github/mbg/dep-caching/telemetry
Add telemetry for dependency caching
2025-09-29 16:01:30 +01:00
Michael B. Gale
d44c8b3e18 Fix comments 2025-09-29 15:45:07 +01:00
Michael B. Gale
93711d3d89 Print a warning when there are sarifFiles in getGroupedSarifFilePaths that don't belong to an analysis kind 2025-09-29 15:07:16 +01:00
Michael B. Gale
056fb86575 Call fixCategory in uploadSpecifiedFiles
Since `fixCategory` is now part of `AnalysisConfig`, we don't have to remember to do it at the call site for `uploadSpecifiedFiles` or `uploadFiles` anymore.
2025-09-29 15:07:16 +01:00
Michael B. Gale
63d1b25e97 Use getGroupedSarifFilePaths for upload-sarif Action 2025-09-29 15:07:16 +01:00
Michael B. Gale
717d581574 Add fixCategory to AnalysisConfig 2025-09-29 15:07:15 +01:00
Michael B. Gale
0417531633 Add keysTyped and entriesTyped helpers 2025-09-29 15:07:15 +01:00
Michael B. Gale
13ae3d4328 Add and use getAnalysisConfig 2025-09-29 15:07:14 +01:00
Michael B. Gale
fe0376ed1f Add getGroupedSarifFilePaths with tests 2025-09-29 15:07:13 +01:00
Michael B. Gale
36adfa7b0f Merge pull request #3166 from github/mbg/upload-sarif/add-tests
Add tests for `upload-sarif`
2025-09-29 15:06:31 +01:00
Michael B. Gale
97159624c3 Fix condition in test workflow 2025-09-29 14:34:50 +01:00
Óscar San José
f0a08a4bf5 Merge pull request #3159 from github/oscarsj/update-brace-expansion-dep
Update vulnerable dependency brace-expansion
2025-09-29 12:13:53 +02:00
Michael B. Gale
73fbfb0bbf Update src/upload-sarif.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 09:11:01 +01:00
Michael B. Gale
5fd2cfe1ef Fail if no SARIF files were uploaded 2025-09-29 09:04:44 +01:00
Michael B. Gale
2adc894410 Tests: ensure uploadSpecifiedFiles wasn't called if we don't expect it to be 2025-09-29 09:01:28 +01:00
Michael B. Gale
5b3f0ded91 Test that uploaded files match expectations for each analysis kind 2025-09-29 09:01:07 +01:00
Michael B. Gale
6e0b0872fa Add some tests for findAndUpload and uploadSarif 2025-09-29 09:01:02 +01:00
Michael B. Gale
9f452fad0f Move core upload-sarif logic to upload-sarif module
Note that this also fixes the format of the `sarif-ids` outputs to match what is documented
2025-09-29 08:57:52 +01:00
Michael B. Gale
5fc9e66105 Move findAndUpload to a new module 2025-09-29 08:44:44 +01:00
Michael B. Gale
e6768a18cf Merge branch 'main' into mbg/dep-caching/telemetry 2025-09-29 08:39:48 +01:00
Michael B. Gale
6a87ebe42b Merge pull request #3162 from github/mergeback/v3.30.5-to-main-3599b3ba
Mergeback v3.30.5 refs/heads/releases/v3 into main
2025-09-26 19:07:29 +01:00
github-actions[bot]
b66e847aaf Rebuild 2025-09-26 17:35:46 +00:00
github-actions[bot]
1733a23b20 Update changelog and version after v3.30.5 2025-09-26 17:30:55 +00:00
Michael B. Gale
3599b3baa1 Merge pull request #3161 from github/update-v3.30.5-0a67bd46a
Merge main into releases/v3
2025-09-26 18:30:21 +01:00
github-actions[bot]
2ca0085e58 Update changelog for v3.30.5 2025-09-26 17:09:07 +00:00
Michael B. Gale
0a67bd46a0 Merge pull request #3160 from github/mbg/fix/upload-sarif
Hotfix `upload-sarif` not uploading non-`.sarif` files
2025-09-26 18:06:08 +01:00
Michael B. Gale
8e34f2f3bf Add changelog 2025-09-26 17:52:17 +01:00
Michael B. Gale
0b7fc56648 Fix upload-sarif not uploading non-.sarif files 2025-09-26 17:47:59 +01:00
Óscar San José
2f0649510e Build lib 2025-09-26 16:45:21 +02:00
Óscar San José
f19a3e769f Update vulnerable dependencies brace-expansion 2025-09-26 16:41:06 +02:00
Michael B. Gale
31bfb99f0d Do not use stringified objects for dependency caching telemetry 2025-09-26 00:26:09 +01:00
Michael B. Gale
94a9b7a110 Merge pull request #3155 from github/mbg/node/no-install-in-actions
Don't run `npm install` when in an Actions workflow
2025-09-25 22:47:04 +01:00
Michael B. Gale
ed57767898 Don't measure size of downloaded cache 2025-09-25 21:02:43 +01:00
Michael B. Gale
2ff902e1f1 Rename CacheHitResult and hit 2025-09-25 20:53:23 +01:00
Michael B. Gale
a0ae9ba202 Log what the script is doing 2025-09-25 20:25:59 +01:00
Michael B. Gale
b27a8ef21f Exit if running in an Actions workflow 2025-09-25 20:25:59 +01:00
Henry Mercer
65925679a3 Merge pull request #3139 from github/henrymercer/fix-log-message
Fix `tools: linked` log message
2025-09-25 16:48:44 +01:00
Michael B. Gale
fa64a7dee6 Merge pull request #3154 from github/mbg/node/check-up-to-date-deps
Add script to check whether `npm i` needs to be run
2025-09-25 15:04:03 +01:00
Michael B. Gale
455038c8a7 Add script to check whether npm i needs to be run
and add it to the `build` command
2025-09-25 14:45:55 +01:00
Michael B. Gale
853decd26b Merge pull request #3152 from github/mbg/node/individual-test-cmd
Add `npm run ava` command, update instructions, and exclude files from VSCode search
2025-09-25 14:42:35 +01:00
Michael B. Gale
48be21c31e Use npm run ava in justfile 2025-09-25 14:22:38 +01:00
Michael B. Gale
77a9259761 Exclude transpiled code and dependencies from VSCode search 2025-09-25 14:22:38 +01:00
Michael B. Gale
e2e1db3e4e Update CONTRIBUTING.md with npm run ava 2025-09-25 14:22:38 +01:00
Michael B. Gale
a645d167d6 Add npm run ava command (for ava without a specific path) 2025-09-25 14:22:38 +01:00
Michael B. Gale
8fca38155e Merge pull request #3153 from github/mbg/ci/improve-unit-tests
Improve `pr-checks` workflow
2025-09-25 14:21:26 +01:00
Michael B. Gale
4e65cda8c2 Add generated workflow diff to job summary if changed 2025-09-25 13:30:00 +01:00
Michael B. Gale
b4db1860cd Reset working directory before failing in check-js.sh 2025-09-25 13:27:45 +01:00
Michael B. Gale
9cf3a96f63 Add transpiled JS to job summary if changed 2025-09-25 13:27:39 +01:00
Michael B. Gale
6a72568b19 Run more checks in unit-tests job, even when previous checks failed 2025-09-25 13:27:32 +01:00
Henry Mercer
b1d32cf356 Merge branch 'main' into henrymercer/fix-log-message 2025-09-25 13:06:54 +01:00
Henry Mercer
5235174f0e Merge pull request #3137 from github/henrymercer/slim-pr-checks
Only run PR checks on Ubuntu by default
2025-09-25 12:57:21 +01:00
Michael B. Gale
f3bf6463e1 Merge pull request #3151 from github/mbg/ci/rollback-test-triggers
Don't dry-run `rollback-release` workflow on release branches
2025-09-25 12:48:18 +01:00
Michael B. Gale
c5ce5e5d1c Don't dry-run rollback-release workflow on release branches 2025-09-25 12:12:42 +01:00
Henry Mercer
79dc6cc78c Merge pull request #3150 from github/mergeback/v3.30.4-to-main-303c0aef
Mergeback v3.30.4 refs/heads/releases/v3 into main
2025-09-25 12:08:26 +01:00
github-actions[bot]
4d32274da6 Rebuild 2025-09-25 10:50:17 +00:00
github-actions[bot]
0a3e31778d Update changelog and version after v3.30.4 2025-09-25 10:19:26 +00:00
Ian Lynagh
303c0aef88 Merge pull request #3149 from github/update-v3.30.4-e4b85ab65
Merge main into releases/v3
2025-09-25 11:18:49 +01:00
github-actions[bot]
333a673809 Update changelog for v3.30.4 2025-09-25 09:54:23 +00:00
Henry Mercer
5445d1a09c Merge branch 'main' into henrymercer/slim-pr-checks 2025-09-25 10:42:10 +01:00
Chuan-kai Lin
e4b85ab654 Merge pull request #3148 from github/cklin/just-test_file-serial
build: use --serial in 'just test_file'
2025-09-24 14:47:17 -07:00
Chuan-kai Lin
1e72556714 build: use --serial in 'just test_file'
Some tests require the --serial flag to pass.
2025-09-24 11:10:24 -07:00
Michael B. Gale
39842d8f83 Merge pull request #3146 from github/mbg/start-proxy/authenticate
Provide `Authorization` header when downloading `update-job-proxy`
2025-09-24 19:09:40 +01:00
Michael B. Gale
6ccec2ac14 Remove url from log messages 2025-09-24 18:54:49 +01:00
Henry Mercer
435f474d1e Merge pull request #3147 from github/dependabot/npm_and_yarn/npm-76d2ab1078
Bump @actions/cache from 4.0.5 to 4.1.0 in the npm group
2025-09-24 18:47:44 +01:00
Henry Mercer
a34e1cd60b Merge branch 'main' into henrymercer/slim-pr-checks 2025-09-24 19:29:32 +02:00
github-actions[bot]
f134e09015 Rebuild 2025-09-24 15:14:06 +00:00
dependabot[bot]
50a31df6ba Bump @actions/cache from 4.0.5 to 4.1.0 in the npm group
Bumps the npm group with 1 update: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache).


Updates `@actions/cache` from 4.0.5 to 4.1.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 15:12:49 +00:00
Henry Mercer
8e25b3435d Merge pull request #3144 from github/henrymercer/dependabot
Update Dependabot configuration for GitHub Actions
2025-09-24 16:09:27 +01:00
Michael B. Gale
4e820a4ca4 Apply review feedback 2025-09-24 15:50:19 +01:00
Michael B. Gale
5a9c44b3b2 Merge pull request #3145 from github/mbg/ci/skip-checks-for-dependabot
Skip PR checks for events triggered by Dependabot
2025-09-24 13:58:23 +01:00
Michael B. Gale
3183e6b8f9 Skip non-generated workflows for Dependabot 2025-09-24 12:49:31 +01:00
Michael B. Gale
d43f46c39c Set Authorization header for downloading update-job-proxy 2025-09-24 12:41:54 +01:00
Michael B. Gale
efcf614b5d Refactor assembling Authorization header value into its own function 2025-09-24 12:40:15 +01:00
Henry Mercer
4082f8c39f Install yq 2025-09-24 13:33:10 +02:00
Michael B. Gale
cec0b17b93 Skip PR checks for events triggered by Dependabot 2025-09-24 12:08:05 +01:00
Henry Mercer
83fdfaf3fc Merge branch 'main' into henrymercer/slim-pr-checks 2025-09-24 13:03:53 +02:00
Henry Mercer
86de17c44d Update Dependabot configuration for GitHub Actions 2025-09-24 11:54:39 +01:00
Henry Mercer
ba58de7d61 Run resolve environment test against Ubuntu only
There isn't really anything platform-specific at the moment.
2025-09-24 12:51:03 +02:00
Henry Mercer
8633a151d5 Remove unnecessary "test" prefix from check names 2025-09-24 12:45:10 +02:00
Henry Mercer
79bbb1744e Remove PR checks that are now duplicated
Direct tracing is now enabled by default.
2025-09-24 12:44:21 +02:00
Henry Mercer
67a0080933 Test all-platform bundle on all platforms 2025-09-24 12:36:35 +02:00
Henry Mercer
a8eeef9291 Merge pull request #3143 from github/dependabot/npm_and_yarn/npm-1a46694d8a
Bump the npm group with 3 updates
2025-09-24 11:31:35 +01:00
github-actions[bot]
f54c1c0b33 Rebuild 2025-09-24 10:14:58 +00:00
dependabot[bot]
c6674f9abd Bump the npm group with 3 updates
Bumps the npm group with 3 updates: [@eslint/compat](https://github.com/eslint/rewrite/tree/HEAD/packages/compat), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `@eslint/compat` from 1.3.2 to 1.4.0
- [Release notes](https://github.com/eslint/rewrite/releases)
- [Changelog](https://github.com/eslint/rewrite/blob/main/packages/compat/CHANGELOG.md)
- [Commits](https://github.com/eslint/rewrite/commits/compat-v1.4.0/packages/compat)

Updates `@typescript-eslint/eslint-plugin` from 8.44.0 to 8.44.1
- [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.44.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.44.0 to 8.44.1
- [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.44.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@eslint/compat"
  dependency-version: 1.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.44.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.44.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 10:13:41 +00:00
Henry Mercer
0890b56a8a Merge pull request #3140 from github/henrymercer/dependabot-rebuild-actions
Trigger sync back script automatically
2025-09-24 11:11:54 +01:00
Ian Lynagh
c6e30a2b5a Merge pull request #3118 from github/update-bundle/codeql-bundle-v2.23.1
Update default bundle to 2.23.1
2025-09-23 14:25:40 +01:00
Henry Mercer
1b12ed7ea8 Run resolve environment PR checks cross-platform 2025-09-23 15:15:15 +02:00
Henry Mercer
d92eef9c9e Merge pull request #3138 from github/dependabot/github_actions/actions-a14fb9fd22
Bump the actions group across 1 directory with 2 updates
2025-09-23 14:11:12 +01:00
Henry Mercer
d34e247444 Enable Dependabot updates for other Actions in .github/actions 2025-09-23 15:00:15 +02:00
Henry Mercer
78e8dc0161 Trigger sync back script automatically 2025-09-23 14:59:56 +02:00
github-actions[bot]
a29637ac01 Rebuild 2025-09-23 12:54:09 +00:00
Henry Mercer
50fc7e9236 Fix tools: linked log message 2025-09-23 14:53:29 +02:00
dependabot[bot]
1ba789f617 Bump the actions group across 1 directory with 2 updates
Bumps the actions group with 2 updates in the / directory: [ruby/setup-ruby](https://github.com/ruby/setup-ruby) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `ruby/setup-ruby` from 1.257.0 to 1.263.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](4451173596...0481980f17)

Updates `actions/create-github-app-token` from 2.1.1 to 2.1.4
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2.1.1...v2.1.4)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.263.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/create-github-app-token
  dependency-version: 2.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-23 12:52:28 +00:00
Henry Mercer
944aa7df3d Merge pull request #3088 from github/dependabot/github_actions/actions-f739f361ea
Bump the actions group with 4 updates
2025-09-23 13:48:16 +01:00
Henry Mercer
29a4b8731d Run code scanning config tests on Linux only 2025-09-23 14:40:02 +02:00
Henry Mercer
3df807292a Only run PR checks on Ubuntu by default 2025-09-23 14:38:33 +02:00
Henry Mercer
c656a2569b Merge pull request #3094 from github/copilot/stack-pr-3088
Sync Action version updates back to the source templates in the `pr-checks` directory
2025-09-23 13:31:55 +01:00
Michael B. Gale
eb05da905d Specify Accept header for toolcache.downloadTool 2025-09-23 13:27:06 +01:00
github-actions[bot]
e8921f7eff Add changelog note 2025-09-23 13:27:06 +01:00
github-actions[bot]
2bbfe979c3 Update default bundle to codeql-bundle-v2.23.1 2025-09-23 13:27:06 +01:00
Kasper Svendsen
5c8c613b75 Merge pull request #3062 from github/kaspersv/bump-minimum-overlay-codeql-version
Bump minimum CLI version for overlay analysis
2025-09-23 13:56:54 +02:00
Michael B. Gale
7dfbfdcb01 Report overall cache usage for CodeQL dependency caches 2025-09-23 12:28:42 +01:00
Michael B. Gale
3d7d7c978e Fix comment 2025-09-23 11:56:50 +01:00
Michael B. Gale
249a3cbb5c Add telemetry for storing dependency caches 2025-09-23 11:52:46 +01:00
Michael B. Gale
11480e326c Add telemetry for restoring dependency caches 2025-09-23 11:50:15 +01:00
Kasper Svendsen
e2f4bf692b Bump minimum CLI version for overlay analysis 2025-09-23 12:08:15 +02:00
Henry Mercer
2885255647 Only sync back versions on Dependabot update PRs 2025-09-23 11:29:23 +02:00
Michael B. Gale
665891b4f2 Merge pull request #3126 from github/mbg/add/properties-api
Add support for the repository properties API
2025-09-23 10:17:52 +01:00
Michael B. Gale
5a4aa83242 Always log when combining queries is disabled in the repo properties 2025-09-23 09:49:29 +01:00
Michael B. Gale
54bbe822cc Always log when queries are configured in the repository properties 2025-09-23 09:44:52 +01:00
Michael B. Gale
4178e15b0a Only disable loadPropertiesFromApi on GHES 2025-09-23 09:41:53 +01:00
Michael B. Gale
205b6ba838 Rebuild 2025-09-23 09:29:04 +01:00
Michael B. Gale
0a75581cde Check that we are on dotcom 2025-09-23 09:22:07 +01:00
Michael B. Gale
7f73f8c235 Add unit tests for properties module 2025-09-23 09:16:28 +01:00
Michael B. Gale
07920e84f8 Fix using keys instead of values
Also add `logger.debug` call with keys from API response
2025-09-23 09:12:16 +01:00
Michael B. Gale
40262b1861 Add getRepositoryProperties to api-client, for easier mocking 2025-09-23 09:11:10 +01:00
Michael B. Gale
b4f966a31a Add FF to control whether to fetch repository properties 2025-09-22 20:26:56 +01:00
Michael B. Gale
05310c6f55 Ignore repository property query config if CQ-only analysis 2025-09-22 16:32:28 +01:00
Michael B. Gale
889d482c54 Add logging to combineQueries 2025-09-22 16:32:26 +01:00
Henry Mercer
e9d7b2dd99 Remove unnecessary test cases 2025-09-22 16:49:11 +02:00
Henry Mercer
d9ad6a31c3 Error if sync.py not found 2025-09-22 16:49:11 +02:00
Henry Mercer
fbe415d86f Remove misleading test case 2025-09-22 16:49:11 +02:00
Henry Mercer
8df00436ea Remove half baked dry run functionality 2025-09-22 16:49:11 +02:00
Henry Mercer
bb07e07aff Remove trailing whitespace 2025-09-22 16:49:11 +02:00
Henry Mercer
86ed2117d5 Note limitation of looking for uses: in pattern 2025-09-22 16:49:11 +02:00
Henry Mercer
5065ea8eef Improve comment 2025-09-22 16:49:11 +02:00
Henry Mercer
ee37081d03 Remove docs about sync back workflow
In favour of docs in the script itself
2025-09-22 16:48:46 +02:00
Henry Mercer
5df1d6e0db Remove redundant check 2025-09-22 15:39:05 +01:00
Michael B. Gale
54746c8dad Fix expected-config-file-contents 2025-09-22 14:56:51 +01:00
Michael B. Gale
6bb4ad3009 Update .github/actions/check-codescanning-config/index.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 13:11:32 +01:00
Michael B. Gale
d46a178adb Sort queries array in check-codescanning-config 2025-09-22 13:00:15 +01:00
Michael B. Gale
c7eb488f8f Add tests 2025-09-20 14:09:08 +01:00
Michael B. Gale
d14a2122fd Include repo property queries in combineQueries 2025-09-20 14:09:08 +01:00
Michael B. Gale
1bfb67dae0 Refactor combining queries into its own function 2025-09-20 14:09:08 +01:00
Michael B. Gale
781a65ae32 Use appropriate error message in parseQueriesFromInput for repo property input 2025-09-20 14:09:08 +01:00
Michael B. Gale
ed216a06d2 Include queries from repo properties in AugmentationProperties 2025-09-20 14:09:07 +01:00
Michael B. Gale
6150aff57f Add and use QuerySpec type 2025-09-20 14:09:07 +01:00
Michael B. Gale
3b00d03019 Load repository properties and store them in the Config 2025-09-20 14:09:07 +01:00
Michael B. Gale
4f9b2f7f06 Add initial client for repository properties 2025-09-20 14:09:06 +01:00
Michael B. Gale
96ca55b157 Ava: Run all tests in src/ directory 2025-09-20 14:06:54 +01:00
Henry Mercer
c9d2739db2 Use more generic regexp for sync.py changes 2025-09-10 18:24:51 +01:00
Henry Mercer
d0f02ad683 Simplify import 2025-09-10 18:24:38 +01:00
Henry Mercer
1343eba2d0 Remove unused imports 2025-09-10 18:14:20 +01:00
Henry Mercer
cde0d796a6 Run sync back script separately 2025-09-10 18:14:08 +01:00
Henry Mercer
d08f929510 Run test script in CI 2025-09-10 18:12:29 +01:00
Henry Mercer
d9bc711b1c Rename script for consistency 2025-09-10 18:12:20 +01:00
copilot-swe-agent[bot]
f537110285 Add sync-back script execution to rebuild workflow
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-10 16:59:28 +00:00
copilot-swe-agent[bot]
5d79536231 Remove regular workflow file updates from sync-back script
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-10 16:53:17 +00:00
copilot-swe-agent[bot]
f77ed607fd Improve sync-back automation with automatic action detection, comment preservation, and tests
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-10 16:00:52 +00:00
copilot-swe-agent[bot]
8d31b533a2 Add sync-back automation for Dependabot action version updates
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-10 09:39:16 +00:00
copilot-swe-agent[bot]
436471d2fb Initial plan 2025-09-09 16:16:43 +00:00
dependabot[bot]
1a80c9b44e Bump the actions group with 4 updates
Bumps the actions group with 4 updates: [actions/setup-go](https://github.com/actions/setup-go), [actions/github-script](https://github.com/actions/github-script), [actions/setup-node](https://github.com/actions/setup-node) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-go` from 5 to 6
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

Updates `actions/github-script` from 7 to 8
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 17:54:44 +00:00
201 changed files with 141375 additions and 3034 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -48,11 +58,8 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
name: "Analyze: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -69,10 +76,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

85
.github/workflows/__bundle-from-toolcache.yml generated vendored Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -41,7 +51,7 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
test-local-codeql:
local-bundle:
strategy:
fail-fast: false
matrix:
@@ -49,6 +59,7 @@ jobs:
- os: ubuntu-latest
version: linked
name: Local CodeQL bundle
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -65,10 +76,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Fetch latest CodeQL bundle
run: |
wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -83,6 +93,7 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -99,10 +110,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Use Xcode 16
if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app"

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -48,23 +58,12 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config and input passed to the CLI'
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -74,7 +73,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 20.x
cache: npm
@@ -88,10 +87,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- uses: ./../action/init
with:
config-file: .github/codeql/codeql-config-packaging3.yml

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -51,6 +61,7 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Remote config file
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -67,10 +78,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}

View File

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

View File

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

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

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -51,6 +61,7 @@ jobs:
- os: ubuntu-latest
version: nightly-latest
name: Test unsetting environment variables
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -67,10 +78,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- uses: ./../action/init
id: init
with:

View File

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -48,11 +58,8 @@ jobs:
include:
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
name: "Upload-sarif: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -69,10 +76,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}

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

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

View File

@@ -27,6 +27,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
workflow_call:
inputs:
go-version:
@@ -34,6 +39,11 @@ on:
description: The version of Go to install
required: false
default: '>=1.21.0'
python-version:
type: string
description: The version of Python to install
required: false
default: '3.13'
defaults:
run:
shell: bash
@@ -48,11 +58,8 @@ jobs:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
name: Use a custom `checkout_path`
if: github.triggering_actor != 'dependabot[bot]'
permissions:
contents: read
security-events: read
@@ -69,10 +76,15 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false
- name: Install Python
if: matrix.version != 'nightly-latest'
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.13' }}
- name: Delete original checkout
run: |
# delete the original checkout so we don't accidentally use it.
@@ -106,29 +118,30 @@ jobs:
- name: Verify SARIF after upload
run: |
PAYLOAD_FILE="$RUNNER_TEMP/payload-code-scanning.json"
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
EXPECTED_REF="v1.1.0"
EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo"
ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)"
ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)"
ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)"
ACTUAL_COMMIT_OID="$(cat "$PAYLOAD_FILE" | jq -r .commit_oid)"
ACTUAL_REF="$(cat "$PAYLOAD_FILE" | jq -r .ref)"
ACTUAL_CHECKOUT_URI="$(cat "$PAYLOAD_FILE" | jq -r .checkout_uri)"
if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then
echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID"
echo "$RUNNER_TEMP/payload.json"
echo "$PAYLOAD_FILE"
exit 1
fi
if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then
echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'"
echo "$RUNNER_TEMP/payload.json"
echo "$PAYLOAD_FILE"
exit 1
fi
if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then
echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI"
echo "$RUNNER_TEMP/payload.json"
echo "$PAYLOAD_FILE"
exit 1
fi
env:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -20,6 +20,14 @@ if [ ! -z "$(git status --porcelain)" ]; then
git diff
git status
>&2 echo "Failed: PR checks are not up to date. Run 'cd pr-checks && python3 sync.py' to update"
echo "### Generated workflows diff" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
git diff --output="$RUNNER_TEMP/workflows.diff"
cat "$RUNNER_TEMP/workflows.diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
fi
echo "Success: PR checks are up to date"
echo "Success: PR checks are up to date"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -34,6 +34,7 @@ Actions with special purposes and unlikely to be used directly:
- `autobuild`: Attempts to automatically build the code. Only used for analyzing languages that require a build. Use the `build-mode: autobuild` input in the `init` action instead. For information about input parameters, see the [autobuild action definition](https://github.com/github/codeql-action/blob/main/autobuild/action.yml).
- `resolve-environment`: [Experimental] Attempts to infer a build environment suitable for automatic builds. For information about input parameters, see the [resolve-environment action definition](https://github.com/github/codeql-action/blob/main/resolve-environment/action.yml).
- `start-proxy`: [Experimental] Start the HTTP proxy server. Internal use only and will change without notice. For information about input parameters, see the [start-proxy action definition](https://github.com/github/codeql-action/blob/main/start-proxy/action.yml).
- `setup-codeql`: [Experimental] Similar to `init`, except it only installs the CodeQL CLI and does not initialize a database.
### Workflow Permissions
@@ -62,7 +63,8 @@ For compiled languages:
The following versions of the CodeQL Action are currently supported:
- v3 (latest)
- v4 (latest)
- v3
## Supported versions of the CodeQL Bundle on GitHub Enterprise Server

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

455
lib/analyze-action.js generated

File diff suppressed because it is too large Load Diff

197
lib/autobuild-action.js generated
View File

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

View File

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

508
lib/init-action-post.js generated

File diff suppressed because it is too large Load Diff

687
lib/init-action.js generated

File diff suppressed because it is too large Load Diff

View File

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

87679
lib/setup-codeql-action.js generated Normal file

File diff suppressed because one or more lines are too long

View File

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

47636
lib/start-proxy-action.js generated

File diff suppressed because it is too large Load Diff

519
lib/upload-lib.js generated

File diff suppressed because it is too large Load Diff

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