Compare commits

..

272 Commits

Author SHA1 Message Date
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
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
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
Michael B. Gale
cec0b17b93 Skip PR checks for events triggered by Dependabot 2025-09-24 12:08:05 +01:00
Henry Mercer
86de17c44d Update Dependabot configuration for GitHub Actions 2025-09-24 11:54:39 +01: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
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
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
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
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
7f44048739 Merge pull request #3133 from github/dependabot/npm_and_yarn/npm-4684794bae
Bump the npm group with 5 updates
2025-09-23 09:34:15 +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
github-actions[bot]
8a84c17a9d Rebuild 2025-09-22 17:08:30 +00:00
dependabot[bot]
3837f2e205 Bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.35.0` | `9.36.0` |
| [@octokit/types](https://github.com/octokit/types.ts) | `14.1.0` | `15.0.0` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.43.0` | `8.44.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.43.0` | `8.44.0` |
| [esbuild](https://github.com/evanw/esbuild) | `0.25.9` | `0.25.10` |


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

Updates `@octokit/types` from 14.1.0 to 15.0.0
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v14.1.0...v15.0.0)

Updates `@typescript-eslint/eslint-plugin` from 8.43.0 to 8.44.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.44.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.43.0 to 8.44.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.44.0/packages/parser)

Updates `esbuild` from 0.25.9 to 0.25.10
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.9...v0.25.10)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@octokit/types"
  dependency-version: 15.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.44.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.44.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: esbuild
  dependency-version: 0.25.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 17:07:06 +00: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
Henry Mercer
b8806eca8c Merge pull request #3131 from github/henrymercer/required-checks-safety
CI: Improve safety of update required checks script
2025-09-22 15:37:35 +01:00
Henry Mercer
33da5f0b36 Use jq to check array length
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 15:21:20 +01:00
Henry Mercer
8a9ef89a8a Update required checks: Fail if no check runs found 2025-09-22 16:08:45 +02:00
Henry Mercer
6b6d1ddcf9 Update required checks: Fail on error 2025-09-22 16:08:31 +02:00
Henry Mercer
2b07444ab3 Merge pull request #3130 from github/henrymercer/request-nightly
Support requesting latest nightly with `tools: nightly`
2025-09-22 14:59:43 +01:00
Michael B. Gale
54746c8dad Fix expected-config-file-contents 2025-09-22 14:56:51 +01:00
Henry Mercer
5ab5aef079 Document nightly tools input in action.yml 2025-09-22 15:48:23 +02: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
Henry Mercer
4901f549de Lint 2025-09-22 14:01:09 +02:00
Michael B. Gale
d46a178adb Sort queries array in check-codescanning-config 2025-09-22 13:00:15 +01:00
Henry Mercer
e2e36b17af Add helper function for reserved tools values 2025-09-22 13:59:40 +02:00
Henry Mercer
bd516303e1 Specify bundle URL in local bundle PR check 2025-09-22 13:32:04 +02:00
Michael B. Gale
6117099fe1 Merge pull request #3127 from github/mbg/refactor/db-config-and-errors
Refactor database configuration from `config-utils` into its own file
2025-09-22 12:23:54 +01:00
Henry Mercer
79e0afb999 Run local CodeQL check using linked bundle 2025-09-22 13:21:11 +02:00
Henry Mercer
a25c57cebe Wrap API call to provide better error message 2025-09-22 13:20:16 +02:00
Henry Mercer
48017e960d Add changelog note 2025-09-22 12:57:53 +02:00
Henry Mercer
39be66afb0 Add log message 2025-09-22 12:54:42 +02:00
Henry Mercer
67427c612a Update prepare-test docs 2025-09-22 12:49:36 +02:00
Henry Mercer
9e8cbee7cb Process nightly CI runs using tools: nightly 2025-09-22 12:49:36 +02:00
Henry Mercer
0f4529ee05 Enable requesting latest nightly with "tools: nightly" 2025-09-22 12:49:35 +02:00
Michael B. Gale
0c4919df84 Merge pull request #3128 from github/mbg/ci/concurrency 2025-09-22 11:45:22 +01:00
Michael B. Gale
2d8d6395ef Add missing "not" in comment 2025-09-20 14:23:28 +01:00
Michael B. Gale
6fcf631e73 Add concurrency settings to PR checks 2025-09-20 14:19:07 +01:00
Michael B. Gale
a067418f51 Ava: Run all tests in src/ directory 2025-09-20 14:10:04 +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
Michael B. Gale
0337c4c06e Merge pull request #3123 from github/mbg/fix/upload-sarif-cq-only 2025-09-19 18:48:48 +01:00
Chuan-kai Lin
c22ae04dd3 Merge pull request #3125 from github/cklin/overlay-restore-timeout
Overlay: use restoreCache() timeout
2025-09-19 10:25:21 -07:00
Chuan-kai Lin
80273e2bc1 Overlay: use restoreCache() timeout
This commit changes overlay-base database download to pass the
segmentTimeoutInMs option to restoreCache(), so that restoreCache()
itself can properly abort slow downloads.

The waitForResultWithTimeLimit() wrapper around restoreCache() remains
as a second line of defense, but with a higher 10-minute time limit, to
guard against cache restore hangs outside segment downloads.
2025-09-19 09:40:09 -07:00
Michael B. Gale
dc1166cacb Move tests for functions now in db-config 2025-09-19 17:16:41 +01:00
Michael B. Gale
ddc6d540f0 Move AugmentationProperties out of config-utils 2025-09-19 17:08:17 +01:00
Michael B. Gale
6222edff53 Move error messages from config-utils to their own file 2025-09-19 17:08:09 +01:00
Michael B. Gale
3305d21389 Move UserConfig to its own file 2025-09-19 17:08:00 +01:00
Michael B. Gale
db37d924ee Fix condition 2025-09-19 16:17:34 +01:00
Michael B. Gale
6249793233 Disable cpp in upload-quality-sarif check 2025-09-19 16:17:33 +01:00
Michael B. Gale
e33b0ab3ac Update upload-quality-sarif check to only use code-quality 2025-09-19 16:17:33 +01:00
Michael B. Gale
7bea0e2e12 Fix outdated comment 2025-09-19 16:17:33 +01:00
Michael B. Gale
d378195403 Add new sarif-ids output to upload-sarif action
Unlike `sarif-id` which is for the single Code Scanning SARIF id, `sarif-ids` contains stringified JSON object with details of all SARIF ids.
2025-09-19 16:17:31 +01:00
Chuan-kai Lin
12dda79905 Merge pull request #3124 from github/cklin/rename-withtimeout
Rename withTimeout() to waitForResultWithTimeLimit()
2025-09-18 13:34:56 -07:00
Michael B. Gale
a2ce099060 Use findAndUpload for Code Scanning 2025-09-18 16:29:25 +01:00
Michael B. Gale
696b467654 Handle single file case in findAndUpload 2025-09-18 16:29:23 +01:00
Michael B. Gale
c8e017d3e7 Move isDirectory check into findAndUpload 2025-09-18 16:28:39 +01:00
Chuan-kai Lin
8185897cad Rename withTimeout() to waitForResultWithTimeLimit()
The name withTimeout() gives the impression that it would limit the
execution of the promise to the given time bound. But that is not the
case: it is only the _waiting_ that is limited, and the promise would
keep running beyond the time bound.

This commit renames withTimeout() to waitForResultWithTimeLimit() so
that developers are more likely to understand the actual behavior of
this function.
2025-09-18 08:27:36 -07:00
Michael B. Gale
a6161a8092 Call lstatSync on sarifPath earlier and check that the path exists then 2025-09-18 14:13:17 +01:00
Michael B. Gale
35454d39b2 Refactor CQ SARIF upload in upload-sarif into a function 2025-09-18 14:13:14 +01:00
Henry Mercer
b73659a4ff Merge pull request #3122 from felickz/main
Update ref description in action.ymls to include expected format for uploads
2025-09-18 09:52:36 +01:00
Chad Bentz
2f35a47982 Update upload-sarif/action.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-17 19:07:57 -04:00
Chad Bentz
242ca1c0a1 Update ref description in action.ymls to include expected format for uploads 2025-09-17 19:02:50 -04:00
Henry Mercer
573acd9552 Merge pull request #3115 from github/dependabot/npm_and_yarn/npm-75b7851ed5
Bump uuid from 12.0.0 to 13.0.0 in the npm group
2025-09-15 18:38:40 +01:00
github-actions[bot]
668f0f00da Rebuild 2025-09-15 17:18:08 +00:00
dependabot[bot]
0b263ec528 Bump uuid from 12.0.0 to 13.0.0 in the npm group
Bumps the npm group with 1 update: [uuid](https://github.com/uuidjs/uuid).


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

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 13.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
...

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

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


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

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

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

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

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

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

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

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

Note that I chose to leave CACHE_VERSION unchanged because the old and
the new cache keys are sufficiently different that there should be no
risk of confusion.
2025-09-04 14:13:15 -07:00
Michael B. Gale
2d2f57ed3a Merge pull request #3079 from github/mbg/proxy/accept-git-source
Accept `git_source` registry configurations for Go
2025-09-04 16:57:42 +01:00
Arthur Baars
b364f99409 Merge pull request #3077 from github/update-bundle/codeql-bundle-v2.23.0
Update default bundle to 2.23.0
2025-09-04 17:12:51 +02:00
Arthur Baars
5b8860ac11 Merge branch 'main' into update-bundle/codeql-bundle-v2.23.0 2025-09-04 16:57:04 +02:00
Michael B. Gale
8fe8b24202 Add git_source as supported registry type for Go 2025-09-04 14:06:50 +01:00
Michael B. Gale
6242bcbf1b Allow multiple registry types in LANGUAGE_TO_REGISTRY_TYPE 2025-09-04 13:54:49 +01:00
Michael B. Gale
38f1a70179 Add runInterpretResultsFor to de-duplicate code for interpret-results 2025-09-04 12:25:50 +01:00
Michael B. Gale
d08e9a2e04 Make conditions for interpret-results more robust 2025-09-04 12:14:12 +01:00
Michael B. Gale
ae2df70629 Make code that builds the list of queries for run-queries more robust in the event of future changes 2025-09-04 12:03:24 +01:00
Michael B. Gale
f4fca70590 Do not mutate originalUserInput 2025-09-04 11:56:48 +01:00
Michael B. Gale
51d74ac81c Remove default arguments from uploadSpecifiedFiles and validateUniqueCategory 2025-09-04 11:44:36 +01:00
Michael B. Gale
3ee9287c7a Update condition and comment for CQ-only config 2025-09-04 11:44:34 +01:00
Michael B. Gale
7baedbc3b8 Check if Code Scanning is enabled before uploading Code Scanning SARIF 2025-09-04 11:43:54 +01:00
Michael B. Gale
86275f6e9a Fix addSarifExtension and add tests 2025-09-04 11:43:54 +01:00
Michael B. Gale
01fe6a1120 Override query configuration for Code Quality only analyses 2025-09-04 11:43:51 +01:00
Michael B. Gale
811aef84cb Move isDefined from start-proxy to util 2025-09-04 11:39:22 +01:00
Michael B. Gale
244e04cc4a Add test with analysisKindsInput: code-quality 2025-09-04 11:39:22 +01:00
Michael B. Gale
8ea50b8f82 Add and use helpers for determining analysis config the DB is initialised with 2025-09-04 11:39:22 +01:00
Michael B. Gale
04bb07498c Add sarifExtension field to AnalysisConfig 2025-09-04 11:39:22 +01:00
Michael B. Gale
6d2d2042ff Add note for getPerQueryAlertCounts 2025-09-04 11:39:21 +01:00
Michael B. Gale
ff57bbf22c Handle different permutations of analysis kinds in analyze action 2025-09-04 11:39:21 +01:00
Michael B. Gale
e4ffe6f3e5 Only specify queries for run-queries if both analysis kinds are enabled 2025-09-04 11:39:21 +01:00
Michael B. Gale
cb8f28fbf7 Add kind property to AnalysisConfig and documentation 2025-09-04 11:39:21 +01:00
Michael B. Gale
01627081ff Rename UploadTarget to AnalysisConfig 2025-09-04 11:39:18 +01:00
Michael B. Gale
ca7dd4ad38 Move UploadTarget definitions to analyses.ts 2025-09-04 11:38:53 +01:00
Michael B. Gale
85a4853504 Add utility function to check if code scanning is enabled 2025-09-04 11:38:07 +01:00
Michael B. Gale
434df8e95c Update checks to use analysis-kinds instead of quality-queries 2025-09-04 11:38:06 +01:00
Michael B. Gale
dfb741d27f Merge pull request #3075 from github/mbg/remove-augmentation-properties
Remove `augmentationProperties` from `Config` type
2025-09-04 11:31:20 +01:00
Michael B. Gale
920bba1769 Add unit tests for createInitWithConfigStatusReport 2025-09-04 10:59:23 +01:00
Michael B. Gale
37ddb03e0d Add createInitWithConfigStatusReport function 2025-09-04 10:16:25 +01:00
Michael B. Gale
da9299646d Move InitStatusReport types to status-report.ts 2025-09-04 10:06:34 +01:00
Michael B. Gale
f2e20f52e0 Rename getDefaultConfig and update doc comment 2025-09-04 10:01:17 +01:00
Michael B. Gale
8d623f4184 Populate computedConfig in getDefaultConfig 2025-09-04 09:57:29 +01:00
Michael B. Gale
0fb047d929 Set user-provided UserConfig in getDefaultConfig 2025-09-04 09:55:00 +01:00
Michael B. Gale
1fd8a71a12 Merge pull request #3072 from github/mbg/refactor/augmentation-properties
Overlay databases: Use `Config` instead of `AugmentationProperties`
2025-09-03 16:40:50 +01:00
Michael B. Gale
87c5b58925 Remove augmentationProperties from Config 2025-09-03 12:56:58 +01:00
Michael B. Gale
d332aa98b6 Use computedConfig for pack telemetry 2025-09-03 12:56:22 +01:00
Michael B. Gale
7f81363b78 Mark result of appendExtraQueryExclusions as Readonly to prevent further modification 2025-09-03 12:21:31 +01:00
Michael B. Gale
e9fb72dd82 Move extraQueryExclusions out of AugmentationProperties 2025-09-03 12:13:58 +01:00
Henry Mercer
0df935330d Merge pull request #3078 from github/henrymercer-patch-1
Add retroactive changelog note for #3054
2025-09-02 20:53:10 +01:00
Henry Mercer
7076b2b468 Add retroactive changelog note for #3054 2025-09-02 20:36:12 +01:00
Henry Mercer
47454d979d Merge pull request #3076 from github/copilot/fix-e885529e-2505-445e-8390-e2c6c91256a4
Remove redundant @types packages that now ship their own TypeScript definitions
2025-09-02 19:17:23 +01:00
github-actions[bot]
fd7a1e18f9 Add changelog note 2025-09-02 18:16:47 +00:00
github-actions[bot]
d8532d6e0e Update default bundle to codeql-bundle-v2.23.0 2025-09-02 18:16:37 +00:00
copilot-swe-agent[bot]
e6103f56ce Remove redundant @types packages that ship their own types
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2025-09-02 17:38:29 +00:00
copilot-swe-agent[bot]
56649d3719 Initial plan 2025-09-02 17:29:52 +00:00
Michael B. Gale
ac9b91e745 Move overlay db settings from AugmentationProperties to Config 2025-09-02 18:02:12 +01:00
Michael B. Gale
c4d2772a75 Add computedConfig property to Config type 2025-09-02 18:01:49 +01:00
191 changed files with 9706 additions and 4049 deletions

View File

@@ -6,6 +6,16 @@ import * as assert from 'assert'
const actualConfig = loadActualConfig() 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() const rawExpectedConfig = process.argv[3].trim()
if (!rawExpectedConfig) { if (!rawExpectedConfig) {
core.setFailed('No expected configuration provided') core.setFailed('No expected configuration provided')
@@ -18,8 +28,8 @@ if (!rawExpectedConfig) {
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined; const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;
assert.deepStrictEqual( assert.deepStrictEqual(
actualConfig, sortConfigArrays(actualConfig),
expectedConfig, sortConfigArrays(expectedConfig),
'Expected configuration does not match actual configuration' 'Expected configuration does not match actual configuration'
); );

View File

@@ -2,7 +2,7 @@ name: "Prepare test"
description: Performs some preparation to run tests description: Performs some preparation to run tests
inputs: inputs:
version: version:
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z" description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly', 'nightly-latest', 'nightly-YYYYMMDD', or 'stable-vX.Y.Z"
required: true required: true
use-all-platform-bundle: use-all-platform-bundle:
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL" description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
@@ -35,7 +35,10 @@ runs:
run: | run: |
set -e # Fail this Action if `gh release list` fails. set -e # Fail this Action if `gh release list` fails.
if [[ "$VERSION" == "linked" ]]; then if [[ "$VERSION" == "nightly" || "$VERSION" == "nightly-latest" ]]; then
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
exit 0
elif [[ "$VERSION" == "linked" ]]; then
echo "tools-url=linked" >> "$GITHUB_OUTPUT" echo "tools-url=linked" >> "$GITHUB_OUTPUT"
exit 0 exit 0
elif [[ "$VERSION" == "default" ]]; then elif [[ "$VERSION" == "default" ]]; then
@@ -43,29 +46,20 @@ runs:
exit 0 exit 0
fi fi
if [[ "$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
extension="tar.zst"
else
extension="tar.gz"
fi
if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
artifact_name="codeql-bundle.$extension" artifact_name="codeql-bundle.tar.gz"
elif [[ "$RUNNER_OS" == "Linux" ]]; then elif [[ "$RUNNER_OS" == "Linux" ]]; then
artifact_name="codeql-bundle-linux64.$extension" artifact_name="codeql-bundle-linux64.tar.gz"
elif [[ "$RUNNER_OS" == "macOS" ]]; then elif [[ "$RUNNER_OS" == "macOS" ]]; then
artifact_name="codeql-bundle-osx64.$extension" artifact_name="codeql-bundle-osx64.tar.gz"
elif [[ "$RUNNER_OS" == "Windows" ]]; then elif [[ "$RUNNER_OS" == "Windows" ]]; then
artifact_name="codeql-bundle-win64.$extension" artifact_name="codeql-bundle-win64.tar.gz"
else else
echo "::error::Unrecognized OS $RUNNER_OS" echo "::error::Unrecognized OS $RUNNER_OS"
exit 1 exit 1
fi fi
if [[ "$VERSION" == "nightly-latest" ]]; then if [[ "$VERSION" == *"nightly"* ]]; then
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
elif [[ "$VERSION" == *"nightly"* ]]; then
version=`echo "$VERSION" | sed -e 's/^.*\-//'` version=`echo "$VERSION" | sed -e 's/^.*\-//'`
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
elif [[ "$VERSION" == *"stable"* ]]; then elif [[ "$VERSION" == *"stable"* ]]; then

View File

@@ -1,4 +0,0 @@
# Configuration for the CodeQL Actions Queries
name: "CodeQL Actions Queries config"
queries:
- uses: security-and-quality

View File

@@ -7,9 +7,9 @@ queries:
# we include both even though one is a superset of the # we include both even though one is a superset of the
# other, because we're testing the parsing logic and # other, because we're testing the parsing logic and
# that the suites exist in the codeql bundle. # that the suites exist in the codeql bundle.
- uses: security-and-quality
- uses: security-experimental - uses: security-experimental
- uses: security-extended - uses: security-extended
- uses: security-and-quality
paths-ignore: paths-ignore:
- tests
- lib - lib
- tests

View File

@@ -20,18 +20,14 @@ updates:
patterns: patterns:
- "*" - "*"
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: "/" directories:
- "/.github/workflows"
- "/.github/actions"
schedule: schedule:
interval: weekly interval: weekly
labels:
- Rebuild
groups: groups:
actions: actions:
patterns: patterns:
- "*" - "*"
- package-ecosystem: github-actions
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
schedule:
interval: weekly
groups:
actions-setup-swift:
patterns:
- "*"

View File

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

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
all-platform-bundle: all-platform-bundle:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: All-platform bundle name: All-platform bundle
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,7 +66,7 @@ jobs:
use-all-platform-bundle: 'true' use-all-platform-bundle: 'true'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -70,7 +77,6 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
analyze-ref-input: analyze-ref-input:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: default version: default
name: "Analyze: 'ref' and 'sha' from inputs" name: "Analyze: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,7 +70,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -74,7 +81,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }} github.sha }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-action: autobuild-action:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: linked version: linked
name: autobuild-action name: autobuild-action
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -67,7 +74,6 @@ jobs:
CORECLR_PROFILER_PATH_64: '' CORECLR_PROFILER_PATH_64: ''
- uses: ./../action/analyze - uses: ./../action/analyze
- name: Check database - name: Check database
shell: bash
run: | run: |
cd "$RUNNER_TEMP/codeql_databases" cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then if [[ ! -d csharp ]]; then

View File

@@ -34,6 +34,12 @@ on:
description: The version of Java to install description: The version of Java to install
required: false required: false
default: '17' default: '17'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-direct-tracing-with-working-dir: autobuild-direct-tracing-with-working-dir:
strategy: strategy:
@@ -49,6 +55,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Autobuild direct tracing (custom working directory) name: Autobuild direct tracing (custom working directory)
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -70,7 +77,6 @@ jobs:
java-version: ${{ inputs.java-version || '17' }} java-version: ${{ inputs.java-version || '17' }}
distribution: temurin distribution: temurin
- name: Test setup - name: Test setup
shell: bash
run: | run: |
# Make sure that Gradle build succeeds in autobuild-dir ... # Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir cp -a ../action/tests/java-repo autobuild-dir
@@ -82,7 +88,6 @@ jobs:
languages: java languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled - name: Check that indirect tracing is disabled
shell: bash
run: | run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \ echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -34,6 +34,12 @@ on:
description: The version of Java to install description: The version of Java to install
required: false required: false
default: '17' default: '17'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
autobuild-direct-tracing: autobuild-direct-tracing:
strategy: strategy:
@@ -49,6 +55,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Autobuild direct tracing name: Autobuild direct tracing
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -70,7 +77,6 @@ jobs:
java-version: ${{ inputs.java-version || '17' }} java-version: ${{ inputs.java-version || '17' }}
distribution: temurin distribution: temurin
- name: Set up Java test repo configuration - name: Set up Java test repo configuration
shell: bash
run: | run: |
mv * .github ../action/tests/multi-language-repo/ mv * .github ../action/tests/multi-language-repo/
mv ../action/tests/multi-language-repo/.github/workflows .github mv ../action/tests/multi-language-repo/.github/workflows .github
@@ -85,7 +91,6 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled - name: Check that indirect tracing is disabled
shell: bash
run: | run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \ echo "Expected indirect tracing to be disabled, but the" \

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-autobuild: build-mode-autobuild:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Build mode autobuild name: Build mode autobuild
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-manual: build-mode-manual:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Build mode manual name: Build mode manual
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,7 +66,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -81,7 +88,6 @@ jobs:
fi fi
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-none: build-mode-none:
strategy: strategy:
@@ -35,6 +41,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Build mode none name: Build mode none
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
build-mode-rollback: build-mode-rollback:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Build mode rollback name: Build mode rollback
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
bundle-toolcache: bundle-toolcache:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: linked version: linked
name: 'Bundle: Caching checks' name: 'Bundle: Caching checks'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -53,7 +60,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Remove CodeQL from toolcache - name: Remove CodeQL from toolcache
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
@@ -63,7 +70,7 @@ jobs:
- name: Install @actions/tool-cache - name: Install @actions/tool-cache
run: npm install @actions/tool-cache run: npm install @actions/tool-cache
- name: Check toolcache does not contain CodeQL - name: Check toolcache does not contain CodeQL
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: | script: |
const toolcache = require('@actions/tool-cache'); const toolcache = require('@actions/tool-cache');
@@ -82,7 +89,7 @@ jobs:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check CodeQL is installed within the toolcache - name: Check CodeQL is installed within the toolcache
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: | script: |
const toolcache = require('@actions/tool-cache'); const toolcache = require('@actions/tool-cache');

11
.github/workflows/__bundle-zstd.yml generated vendored
View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
bundle-zstd: bundle-zstd:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: linked version: linked
name: 'Bundle: Zstandard checks' name: 'Bundle: Zstandard checks'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -53,7 +60,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Remove CodeQL from toolcache - name: Remove CodeQL from toolcache
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: | script: |
const fs = require('fs'); const fs = require('fs');
@@ -78,7 +85,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check diagnostic with expected tools URL appears in SARIF - name: Check diagnostic with expected tools URL appears in SARIF
uses: actions/github-script@v7 uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cleanup-db-cluster-dir: cleanup-db-cluster-dir:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: Clean up database cluster directory name: Clean up database cluster directory
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
config-export: config-export:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Config export name: Config export
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -74,7 +81,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check config properties appear in SARIF - name: Check config properties appear in SARIF
uses: actions/github-script@v7 uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
config-input: config-input:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: Config input name: Config input
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -42,7 +49,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-disabled: cpp-deptrace-disabled:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: 'C/C++: disabling autoinstalling dependencies (Linux)' name: 'C/C++: disabling autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -53,7 +60,6 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Test setup - name: Test setup
shell: bash
run: | run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init - uses: ./../action/init
@@ -65,8 +71,7 @@ jobs:
working-directory: autobuild-dir working-directory: autobuild-dir
env: env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
- shell: bash - run: |
run: |
if ls /usr/bin/errno; then if ls /usr/bin/errno; then
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled." echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
exit 1 exit 1

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-enabled-on-macos: cpp-deptrace-enabled-on-macos:
strategy: strategy:
@@ -35,6 +41,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: 'C/C++: autoinstalling dependencies is skipped (macOS)' name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -51,7 +58,6 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Test setup - name: Test setup
shell: bash
run: | run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init - uses: ./../action/init
@@ -63,8 +69,7 @@ jobs:
working-directory: autobuild-dir working-directory: autobuild-dir
env: env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash - run: |
run: |
if ! ls /usr/bin/errno; then if ! ls /usr/bin/errno; then
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS" echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
else else

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
cpp-deptrace-enabled: cpp-deptrace-enabled:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: 'C/C++: autoinstalling dependencies (Linux)' name: 'C/C++: autoinstalling dependencies (Linux)'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -53,7 +60,6 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Test setup - name: Test setup
shell: bash
run: | run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init - uses: ./../action/init
@@ -65,8 +71,7 @@ jobs:
working-directory: autobuild-dir working-directory: autobuild-dir
env: env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash - run: |
run: |
if ! ls /usr/bin/errno; then if ! ls /usr/bin/errno; then
echo "Did not autoinstall errno" echo "Did not autoinstall errno"
exit 1 exit 1

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
diagnostics-export: diagnostics-export:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Diagnostic export name: Diagnostic export
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -64,7 +71,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Add test diagnostics - name: Add test diagnostics
shell: bash
env: env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: | run: |
@@ -86,7 +92,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check diagnostics appear in SARIF - name: Check diagnostics appear in SARIF
uses: actions/github-script@v7 uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
export-file-baseline-information: export-file-baseline-information:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Export file baseline information name: Export file baseline information
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,7 +70,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -73,7 +80,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -85,7 +91,6 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check results - name: Check results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
expected_baseline_languages="c csharp go java kotlin javascript python ruby" expected_baseline_languages="c csharp go java kotlin javascript python ruby"

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
extractor-ram-threads: extractor-ram-threads:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: Extractor ram and threads options test name: Extractor ram and threads options test
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -54,7 +61,6 @@ jobs:
ram: 230 ram: 230
threads: 1 threads: 1
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
if [ "${CODEQL_RAM}" != "230" ]; then if [ "${CODEQL_RAM}" != "230" ]; then
echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230" echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230"

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-custom-queries: go-custom-queries:
strategy: strategy:
@@ -45,6 +51,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: 'Go: Custom queries' name: 'Go: Custom queries'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -61,7 +68,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -71,7 +78,6 @@ jobs:
config-file: ./.github/codeql/custom-queries.yml config-file: ./.github/codeql/custom-queries.yml
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround-diagnostic: go-indirect-tracing-workaround-diagnostic:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
name: 'Go: diagnostic when Go is changed after init step' name: 'Go: diagnostic when Go is changed after init step'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,7 +66,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -68,18 +75,17 @@ jobs:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
# Deliberately change Go after the `init` step # Deliberately change Go after the `init` step
- uses: actions/setup-go@v5 - uses: actions/setup-go@v6
with: with:
go-version: '1.20' go-version: '1.20'
- name: Build code - name: Build code
shell: bash
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check diagnostic appears in SARIF - name: Check diagnostic appears in SARIF
uses: actions/github-script@v7 uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/go.sarif SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with: with:

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround-no-file-program: go-indirect-tracing-workaround-no-file-program:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
name: 'Go: diagnostic when `file` is not installed' name: 'Go: diagnostic when `file` is not installed'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,7 +66,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -73,14 +80,13 @@ jobs:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Check diagnostic appears in SARIF - name: Check diagnostic appears in SARIF
uses: actions/github-script@v7 uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/go.sarif SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with: with:

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-indirect-tracing-workaround: go-indirect-tracing-workaround:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
name: 'Go: workaround for indirect tracing' name: 'Go: workaround for indirect tracing'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,7 +66,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -68,11 +75,9 @@ jobs:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
- shell: bash - run: |
run: |
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \ echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \
"CODEQL_ACTION_GO_BINARY environment variable is not set." "CODEQL_ACTION_GO_BINARY environment variable is not set."

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-autobuilder: go-tracing-autobuilder:
strategy: strategy:
@@ -60,6 +66,10 @@ jobs:
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest - os: macos-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: ubuntu-latest
version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -73,6 +83,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: 'Go: tracing with autobuilder step' name: 'Go: tracing with autobuilder step'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -89,7 +100,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -99,8 +110,7 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild - uses: ./../action/autobuild
- uses: ./../action/analyze - uses: ./../action/analyze
- shell: bash - run: |
run: |
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
echo "Expected the Go autobuilder to be run, but the" \ echo "Expected the Go autobuilder to be run, but the" \
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true." "CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true."

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-custom-build-steps: go-tracing-custom-build-steps:
strategy: strategy:
@@ -60,6 +66,10 @@ jobs:
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest - os: macos-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: ubuntu-latest
version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -73,6 +83,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: 'Go: tracing with custom build steps' name: 'Go: tracing with custom build steps'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -89,7 +100,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -98,11 +109,9 @@ jobs:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: go build main.go run: go build main.go
- uses: ./../action/analyze - uses: ./../action/analyze
- shell: bash - run: |
run: |
# Once we start running Bash 4.2 in all environments, we can replace the # Once we start running Bash 4.2 in all environments, we can replace the
# `! -z` flag with the more elegant `-v` which confirms that the variable # `! -z` flag with the more elegant `-v` which confirms that the variable
# is actually unset and not potentially set to a blank value. # is actually unset and not potentially set to a blank value.

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
go-tracing-legacy-workflow: go-tracing-legacy-workflow:
strategy: strategy:
@@ -60,6 +66,10 @@ jobs:
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest - os: macos-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: ubuntu-latest
version: stable-v2.22.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -73,6 +83,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: 'Go: tracing with legacy workflow' name: 'Go: tracing with legacy workflow'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -89,7 +100,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -98,8 +109,7 @@ jobs:
languages: go languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
- shell: bash - run: |
run: |
cd "$RUNNER_TEMP/codeql_databases" cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d go ]]; then if [[ ! -d go ]]; then
echo "Did not find a Go database" echo "Did not find a Go database"

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
init-with-registries: init-with-registries:
strategy: strategy:
@@ -49,6 +55,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: 'Packaging: Download using registries' name: 'Packaging: Download using registries'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
packages: read packages: read
@@ -78,7 +85,6 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}" token: "${{ secrets.GITHUB_TOKEN }}"
- name: Verify packages installed - name: Verify packages installed
shell: bash
run: | run: |
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack" PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1" CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
@@ -100,7 +106,6 @@ jobs:
fi fi
- name: Verify qlconfig.yml file was created - name: Verify qlconfig.yml file was created
shell: bash
run: | run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH" echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
@@ -115,7 +120,6 @@ jobs:
- name: Verify contents of qlconfig.yml - name: Verify contents of qlconfig.yml
# yq is not available on windows # yq is not available on windows
if: runner.os != 'Windows' if: runner.os != 'Windows'
shell: bash
run: | run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")' cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
javascript-source-root: javascript-source-root:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Custom source root name: Custom source root
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -53,7 +60,6 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Move codeql-action - name: Move codeql-action
shell: bash
run: | run: |
mkdir ../new-source-root mkdir ../new-source-root
mv * ../new-source-root mv * ../new-source-root
@@ -66,7 +72,6 @@ jobs:
with: with:
skip-queries: true skip-queries: true
- name: Assert database exists - name: Assert database exists
shell: bash
run: | run: |
cd "$RUNNER_TEMP/codeql_databases" cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d javascript ]]; then if [[ ! -d javascript ]]; then

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
job-run-uuid-sarif: job-run-uuid-sarif:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Job run UUID added to SARIF name: Job run UUID added to SARIF
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,7 +70,6 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check results - name: Check results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif) actual=$(jq -r '.runs[0].properties.jobRunUuid' javascript.sarif)

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
language-aliases: language-aliases:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: Language aliases name: Language aliases
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
multi-language-autodetect: multi-language-autodetect:
strategy: strategy:
@@ -60,6 +66,10 @@ jobs:
version: stable-v2.21.4 version: stable-v2.21.4
- os: ubuntu-latest - os: ubuntu-latest
version: stable-v2.21.4 version: stable-v2.21.4
- os: macos-latest
version: stable-v2.22.4
- os: ubuntu-latest
version: stable-v2.22.4
- os: macos-latest - os: macos-latest
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
@@ -73,6 +83,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Multi-language repository name: Multi-language repository
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -89,12 +100,11 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Use Xcode 16 - name: Use Xcode 16
shell: bash
if: runner.os == 'macOS' && matrix.version != 'nightly-latest' if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app" run: sudo xcode-select -s "/Applications/Xcode_16.app"
@@ -107,7 +117,6 @@ jobs:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
@@ -116,7 +125,6 @@ jobs:
upload-database: false upload-database: false
- name: Check language autodetect for all languages excluding Swift - name: Check language autodetect for all languages excluding Swift
shell: bash
run: | run: |
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }} CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
@@ -156,7 +164,6 @@ jobs:
- name: Check language autodetect for Swift on macOS - name: Check language autodetect for Swift on macOS
if: runner.os == 'macOS' if: runner.os == 'macOS'
shell: bash
run: | run: |
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }} SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
@@ -164,4 +171,5 @@ jobs:
exit 1 exit 1
fi fi
env: env:
CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI: true
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
overlay-init-fallback: overlay-init-fallback:
strategy: strategy:
@@ -35,6 +41,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Overlay database init fallback name: Overlay database init fallback
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -61,7 +68,6 @@ jobs:
with: with:
upload-database: false upload-database: false
- name: Check database - name: Check database
shell: bash
run: | run: |
cd "$RUNNER_TEMP/codeql_databases/actions" cd "$RUNNER_TEMP/codeql_databases/actions"
if ! grep -q 'overlayBaseDatabase: false' codeql-database.yml ; then if ! grep -q 'overlayBaseDatabase: false' codeql-database.yml ; then

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-codescanning-config-inputs-js: packaging-codescanning-config-inputs-js:
strategy: strategy:
@@ -59,6 +65,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: 'Packaging: Config and input passed to the CLI' name: 'Packaging: Config and input passed to the CLI'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -68,7 +75,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm
@@ -82,7 +89,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -93,7 +100,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -109,7 +115,6 @@ jobs:
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules # We should have 4 hits from these rules

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-config-inputs-js: packaging-config-inputs-js:
strategy: strategy:
@@ -59,6 +65,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: 'Packaging: Config and input' name: 'Packaging: Config and input'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -68,7 +75,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm
@@ -82,7 +89,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -93,7 +100,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -109,7 +115,6 @@ jobs:
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules # We should have 4 hits from these rules

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-config-js: packaging-config-js:
strategy: strategy:
@@ -59,6 +65,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: 'Packaging: Config file' name: 'Packaging: Config file'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -68,7 +75,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm
@@ -82,7 +89,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -92,7 +99,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -108,7 +114,6 @@ jobs:
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules # We should have 4 hits from these rules

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
packaging-inputs-js: packaging-inputs-js:
strategy: strategy:
@@ -59,6 +65,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: 'Packaging: Action input' name: 'Packaging: Action input'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -68,7 +75,7 @@ jobs:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm
@@ -82,7 +89,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -93,7 +100,6 @@ jobs:
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -108,7 +114,6 @@ jobs:
queries-not-run: foo,bar queries-not-run: foo,bar
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules # We should have 4 hits from these rules

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
quality-queries: quality-queries:
strategy: strategy:
@@ -32,17 +38,60 @@ jobs:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
analysis-kinds: code-scanning
- os: ubuntu-latest
version: linked
analysis-kinds: code-quality
- os: ubuntu-latest
version: linked
analysis-kinds: code-scanning,code-quality
- os: macos-latest - os: macos-latest
version: linked 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 - os: windows-latest
version: linked 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 - os: ubuntu-latest
version: nightly-latest version: nightly-latest
analysis-kinds: code-scanning
- os: ubuntu-latest
version: nightly-latest
analysis-kinds: code-quality
- os: ubuntu-latest
version: nightly-latest
analysis-kinds: code-scanning,code-quality
- os: macos-latest - os: macos-latest
version: nightly-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 - os: windows-latest
version: nightly-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 name: Quality queries input
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -61,33 +110,39 @@ jobs:
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: javascript languages: javascript
quality-queries: code-quality analysis-kinds: ${{ matrix.analysis-kinds }}
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Upload security SARIF - name: Upload security SARIF
if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.sarif.json name: |
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Upload quality SARIF - name: Upload quality SARIF
if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: quality-queries-${{ matrix.os }}-${{ matrix.version }}.quality.sarif.json name: |
quality-queries-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.analysis-kinds }}.quality.sarif.json
path: ${{ runner.temp }}/results/javascript.quality.sarif path: ${{ runner.temp }}/results/javascript.quality.sarif
retention-days: 7 retention-days: 7
- name: Check quality query does not appear in security SARIF - name: Check quality query does not appear in security SARIF
uses: actions/github-script@v7 if: contains(matrix.analysis-kinds, 'code-scanning')
uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
EXPECT_PRESENT: 'false' EXPECT_PRESENT: 'false'
with: with:
script: ${{ env.CHECK_SCRIPT }} script: ${{ env.CHECK_SCRIPT }}
- name: Check quality query appears in quality SARIF - name: Check quality query appears in quality SARIF
uses: actions/github-script@v7 if: contains(matrix.analysis-kinds, 'code-quality')
uses: actions/github-script@v8
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.quality.sarif
EXPECT_PRESENT: 'true' EXPECT_PRESENT: 'true'

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
remote-config: remote-config:
strategy: strategy:
@@ -45,6 +51,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Remote config file name: Remote config file
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -61,7 +68,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -72,7 +79,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }} github.sha }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
resolve-environment-action: resolve-environment-action:
strategy: strategy:
@@ -49,6 +55,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: nightly-latest version: nightly-latest
name: Resolve environment name: Resolve environment
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
rubocop-multi-language: rubocop-multi-language:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
name: RuboCop multi-language name: RuboCop multi-language
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -49,17 +56,14 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0 uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Install Code Scanning integration - name: Install Code Scanning integration
shell: bash
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
- name: Install dependencies - name: Install dependencies
shell: bash
run: bundle install run: bundle install
- name: RuboCop run - name: RuboCop run
shell: bash
run: | run: |
bash -c " bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif

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

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
ruby: ruby:
strategy: strategy:
@@ -43,6 +49,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: Ruby analysis name: Ruby analysis
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -67,7 +74,6 @@ jobs:
with: with:
upload-database: false upload-database: false
- name: Check database - name: Check database
shell: bash
run: | run: |
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}" RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
if [[ ! -d "$RUBY_DB" ]]; then if [[ ! -d "$RUBY_DB" ]]; then

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

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
rust: rust:
strategy: strategy:
@@ -41,6 +47,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Rust analysis name: Rust analysis
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -65,7 +72,6 @@ jobs:
with: with:
upload-database: false upload-database: false
- name: Check database - name: Check database
shell: bash
run: | run: |
RUST_DB="${{ fromJson(steps.analysis.outputs.db-locations).rust }}" RUST_DB="${{ fromJson(steps.analysis.outputs.db-locations).rust }}"
if [[ ! -d "$RUST_DB" ]]; then if [[ ! -d "$RUST_DB" ]]; then

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
split-workflow: split-workflow:
strategy: strategy:
@@ -53,6 +59,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: Split workflow name: Split workflow
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -69,7 +76,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -80,7 +87,6 @@ jobs:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
@@ -89,7 +95,6 @@ jobs:
upload-database: false upload-database: false
- name: Assert No Results - name: Assert No Results
shell: bash
run: | run: |
if [ "$(ls -A $RUNNER_TEMP/results)" ]; then if [ "$(ls -A $RUNNER_TEMP/results)" ]; then
echo "Expected results directory to be empty after skipping query execution!" echo "Expected results directory to be empty after skipping query execution!"
@@ -100,7 +105,6 @@ jobs:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
upload-database: false upload-database: false
- name: Assert Results - name: Assert Results
shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules # We should have 4 hits from these rules

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
start-proxy: start-proxy:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: linked version: linked
name: Start proxy name: Start proxy
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
submit-sarif-failure: submit-sarif-failure:
strategy: strategy:
@@ -37,6 +43,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Submit SARIF after failure name: Submit SARIF after failure
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: write # needed to upload the SARIF file security-events: write # needed to upload the SARIF file

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
swift-autobuild: swift-autobuild:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: Swift analysis using autobuild name: Swift analysis using autobuild
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -55,7 +62,6 @@ jobs:
build-mode: autobuild build-mode: autobuild
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check working directory - name: Check working directory
shell: bash
run: pwd run: pwd
- uses: ./../action/autobuild - uses: ./../action/autobuild
timeout-minutes: 30 timeout-minutes: 30
@@ -64,7 +70,6 @@ jobs:
with: with:
upload-database: false upload-database: false
- name: Check database - name: Check database
shell: bash
run: | run: |
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}" SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
if [[ ! -d "$SWIFT_DB" ]]; then if [[ ! -d "$SWIFT_DB" ]]; then

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
swift-custom-build: swift-custom-build:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: macos-latest - os: macos-latest
version: nightly-latest version: nightly-latest
name: Swift analysis using a custom build command name: Swift analysis using a custom build command
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,12 +70,11 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Use Xcode 16 - name: Use Xcode 16
shell: bash
if: runner.os == 'macOS' && matrix.version != 'nightly-latest' if: runner.os == 'macOS' && matrix.version != 'nightly-latest'
run: sudo xcode-select -s "/Applications/Xcode_16.app" run: sudo xcode-select -s "/Applications/Xcode_16.app"
- uses: ./../action/init - uses: ./../action/init
@@ -77,17 +83,14 @@ jobs:
languages: swift languages: swift
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check working directory - name: Check working directory
shell: bash
run: pwd run: pwd
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
with: with:
upload-database: false upload-database: false
- name: Check database - name: Check database
shell: bash
run: | run: |
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}" SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
if [[ ! -d "$SWIFT_DB" ]]; then if [[ ! -d "$SWIFT_DB" ]]; then

View File

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-autobuild-working-dir: test-autobuild-working-dir:
strategy: strategy:
@@ -33,6 +39,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: linked version: linked
name: Autobuild working directory name: Autobuild working directory
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -49,7 +56,6 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Test setup - name: Test setup
shell: bash
run: | run: |
# Make sure that Gradle build succeeds in autobuild-dir ... # Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir cp -a ../action/tests/java-repo autobuild-dir
@@ -64,7 +70,6 @@ jobs:
working-directory: autobuild-dir working-directory: autobuild-dir
- uses: ./../action/analyze - uses: ./../action/analyze
- name: Check database - name: Check database
shell: bash
run: | run: |
cd "$RUNNER_TEMP/codeql_databases" cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d java ]]; then if [[ ! -d java ]]; then

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-local-codeql: test-local-codeql:
strategy: strategy:
@@ -41,8 +47,9 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: linked
name: Local CodeQL bundle name: Local CodeQL bundle
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -59,16 +66,13 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Fetch a CodeQL bundle - name: Fetch latest CodeQL bundle
shell: bash
env:
CODEQL_URL: ${{ steps.prepare-test.outputs.tools-url }}
run: | run: |
wget "$CODEQL_URL" wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst
- id: init - id: init
uses: ./../action/init uses: ./../action/init
with: with:
@@ -76,7 +80,6 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ./codeql-bundle-linux64.tar.zst tools: ./codeql-bundle-linux64.tar.zst
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:

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

@@ -24,6 +24,12 @@ on:
inputs: {} inputs: {}
workflow_call: workflow_call:
inputs: {} inputs: {}
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
test-proxy: test-proxy:
strategy: strategy:
@@ -35,6 +41,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Proxy test name: Proxy test
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
unset-environment: unset-environment:
strategy: strategy:
@@ -45,6 +51,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: Test unsetting environment variables name: Test unsetting environment variables
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -61,7 +68,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -73,14 +80,12 @@ jobs:
languages: cpp,csharp,go,java,javascript,python,ruby languages: cpp,csharp,go,java,javascript,python,ruby
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: env -i PATH="$PATH" HOME="$HOME" ./build.sh run: env -i PATH="$PATH" HOME="$HOME" ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
with: with:
upload-database: false upload-database: false
- shell: bash - run: |
run: |
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}" CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
echo "::error::Did not create a database for CPP, or created it in the wrong location." \ echo "::error::Did not create a database for CPP, or created it in the wrong location." \

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
upload-quality-sarif: upload-quality-sarif:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: default version: default
name: 'Upload-sarif: code quality endpoint' name: 'Upload-sarif: code quality endpoint'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,19 +70,16 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python languages: csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ analysis-kinds: code-quality
github.sha }}
quality-queries: code-quality
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step # Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze - uses: ./../action/analyze
@@ -84,8 +88,12 @@ jobs:
sha: 5e235361806c361d4d3f8859e3c897658025a9a2 sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never upload: never
- uses: ./../action/upload-sarif - uses: ./../action/upload-sarif
id: upload-sarif
with: with:
ref: refs/heads/main ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2 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: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
upload-ref-sha-input: upload-ref-sha-input:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: default version: default
name: "Upload-sarif: 'ref' and 'sha' from inputs" name: "Upload-sarif: 'ref' and 'sha' from inputs"
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,7 +70,7 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
@@ -74,7 +81,6 @@ jobs:
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }} github.sha }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step # Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze - uses: ./../action/analyze

View File

@@ -34,6 +34,12 @@ on:
description: The version of Go to install description: The version of Go to install
required: false required: false
default: '>=1.21.0' default: '>=1.21.0'
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
with-checkout-path: with-checkout-path:
strategy: strategy:
@@ -47,6 +53,7 @@ jobs:
- os: windows-latest - os: windows-latest
version: linked version: linked
name: Use a custom `checkout_path` name: Use a custom `checkout_path`
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -63,12 +70,11 @@ jobs:
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
setup-kotlin: 'true' setup-kotlin: 'true'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version: ${{ inputs.go-version || '>=1.21.0' }} go-version: ${{ inputs.go-version || '>=1.21.0' }}
cache: false cache: false
- name: Delete original checkout - name: Delete original checkout
shell: bash
run: | run: |
# delete the original checkout so we don't accidentally use it. # delete the original checkout so we don't accidentally use it.
# Actions does not support deleting the current working directory, so we # Actions does not support deleting the current working directory, so we
@@ -89,7 +95,6 @@ jobs:
source-root: x/y/z/some-path/tests/multi-language-repo source-root: x/y/z/some-path/tests/multi-language-repo
- name: Build code - name: Build code
shell: bash
working-directory: x/y/z/some-path/tests/multi-language-repo working-directory: x/y/z/some-path/tests/multi-language-repo
run: | run: |
./build.sh ./build.sh
@@ -101,7 +106,6 @@ jobs:
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
- name: Verify SARIF after upload - name: Verify SARIF after upload
shell: bash
run: | run: |
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
EXPECTED_REF="v1.1.0" EXPECTED_REF="v1.1.0"

View File

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

View File

@@ -13,12 +13,17 @@ on:
- cron: '30 1 * * 0' - cron: '30 1 * * 0'
workflow_dispatch: workflow_dispatch:
defaults:
run:
shell: bash
env: env:
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
jobs: jobs:
# Identify the CodeQL tool versions to use in the analysis job. # Identify the CodeQL tool versions to use in the analysis job.
check-codeql-versions: check-codeql-versions:
if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
versions: ${{ steps.compare.outputs.versions }} versions: ${{ steps.compare.outputs.versions }}
@@ -71,6 +76,7 @@ jobs:
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
analyze-javascript: analyze-javascript:
if: github.triggering_actor != 'dependabot[bot]'
needs: [check-codeql-versions] needs: [check-codeql-versions]
strategy: strategy:
fail-fast: false fail-fast: false
@@ -91,22 +97,30 @@ jobs:
id: init id: init
with: with:
languages: javascript languages: javascript
config-file: ./.github/codeql/codeql-config.yml config-file: ./.github/codeql/codeql-config-javascript.yml
tools: ${{ matrix.tools }} tools: ${{ matrix.tools }}
# confirm steps.init.outputs.codeql-path points to the codeql binary # confirm steps.init.outputs.codeql-path points to the codeql binary
- name: Print CodeQL Version - name: Print CodeQL Version
run: ${{steps.init.outputs.codeql-path}} version --format=json run: >
"$CODEQL" version --format=json
env:
CODEQL: ${{steps.init.outputs.codeql-path}}
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: ./analyze uses: ./analyze
with: with:
category: "/language:javascript" category: "/language:javascript"
upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }}
analyze-other:
analyze-actions: if: github.triggering_actor != 'dependabot[bot]'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix:
include:
- language: actions
- language: python
permissions: permissions:
contents: read contents: read
@@ -118,9 +132,15 @@ jobs:
- name: Initialize CodeQL - name: Initialize CodeQL
uses: ./init uses: ./init
with: with:
languages: actions languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-actions-config.yml build-mode: none
config: >
paths-ignore:
- lib
- tests
queries:
- uses: security-and-quality
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: ./analyze uses: ./analyze
with: with:
category: "/language:actions" category: "/language:${{ matrix.language }}"

View File

@@ -22,8 +22,13 @@ on:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: {} workflow_dispatch: {}
defaults:
run:
shell: bash
jobs: jobs:
code-scanning-config-tests: code-scanning-config-tests:
if: github.triggering_actor != 'dependabot[bot]'
continue-on-error: true continue-on-error: true
permissions: permissions:
@@ -57,7 +62,7 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: '20' node-version: '20'
cache: 'npm' cache: 'npm'
@@ -176,13 +181,13 @@ jobs:
with: with:
expected-config-file-contents: | 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": { "packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ] "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 languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql

View File

@@ -17,8 +17,14 @@ on:
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: {} workflow_dispatch: {}
defaults:
run:
shell: bash
jobs: jobs:
upload-artifacts: upload-artifacts:
if: github.triggering_actor != 'dependabot[bot]'
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -45,7 +51,7 @@ jobs:
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- uses: actions/setup-go@v5 - uses: actions/setup-go@v6
with: with:
go-version: ^1.13.1 go-version: ^1.13.1
- uses: ./../action/init - uses: ./../action/init
@@ -55,7 +61,6 @@ jobs:
debug-artifact-name: my-debug-artifacts debug-artifact-name: my-debug-artifacts
debug-database-name: my-db debug-database-name: my-db
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
@@ -66,6 +71,7 @@ jobs:
expect-error: true expect-error: true
download-and-check-artifacts: download-and-check-artifacts:
name: Download and check debug artifacts after failure in analyze name: Download and check debug artifacts after failure in analyze
if: github.triggering_actor != 'dependabot[bot]'
needs: upload-artifacts needs: upload-artifacts
timeout-minutes: 45 timeout-minutes: 45
permissions: permissions:
@@ -75,7 +81,6 @@ jobs:
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v5 uses: actions/download-artifact@v5
- name: Check expected artifacts exist - name: Check expected artifacts exist
shell: bash
run: | run: |
LANGUAGES="cpp csharp go java javascript python" LANGUAGES="cpp csharp go java javascript python"
for version in $VERSIONS; do for version in $VERSIONS; do

View File

@@ -16,8 +16,14 @@ on:
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: {} workflow_dispatch: {}
defaults:
run:
shell: bash
jobs: jobs:
upload-artifacts: upload-artifacts:
if: github.triggering_actor != 'dependabot[bot]'
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -41,7 +47,7 @@ jobs:
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- uses: actions/setup-go@v5 - uses: actions/setup-go@v6
with: with:
go-version: ^1.13.1 go-version: ^1.13.1
- uses: ./../action/init - uses: ./../action/init
@@ -54,12 +60,12 @@ jobs:
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu # 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
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
download-and-check-artifacts: download-and-check-artifacts:
name: Download and check debug artifacts name: Download and check debug artifacts
if: github.triggering_actor != 'dependabot[bot]'
needs: upload-artifacts needs: upload-artifacts
timeout-minutes: 45 timeout-minutes: 45
permissions: permissions:
@@ -69,7 +75,6 @@ jobs:
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v5 uses: actions/download-artifact@v5
- name: Check expected artifacts exist - name: Check expected artifacts exist
shell: bash
run: | run: |
VERSIONS="stable-v2.20.3 default linked nightly-latest" VERSIONS="stable-v2.20.3 default linked nightly-latest"
LANGUAGES="cpp csharp go java javascript python" LANGUAGES="cpp csharp go java javascript python"

View File

@@ -18,6 +18,10 @@ on:
branches: branches:
- releases/v* - releases/v*
defaults:
run:
shell: bash
jobs: jobs:
merge-back: merge-back:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -43,7 +47,7 @@ jobs:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 # ensure we have all tags and can push commits fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@v4 - uses: actions/setup-node@v5
- name: Update git config - name: Update git config
run: | run: |
@@ -135,7 +139,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}" token: "${{ secrets.GITHUB_TOKEN }}"
- name: Generate 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 id: app-token
with: with:
app-id: ${{ vars.AUTOMATION_APP_ID }} app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -8,9 +8,14 @@ on:
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch: workflow_dispatch:
defaults:
run:
shell: bash
jobs: jobs:
unit-tests: unit-tests:
name: Unit Tests name: Unit Tests
if: github.triggering_actor != 'dependabot[bot]'
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -22,16 +27,20 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- name: Prepare git (Windows)
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: '20.x' node-version: '20.x'
cache: 'npm' cache: 'npm'
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v6
with: with:
python-version: 3.11 python-version: 3.11
@@ -51,6 +60,10 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: npm test run: npm test
- name: Run pr-checks tests
working-directory: pr-checks
run: python -m unittest discover
- name: Lint - name: Lint
if: matrix.os != 'windows-latest' if: matrix.os != 'windows-latest'
run: npm run lint-ci run: npm run lint-ci
@@ -63,7 +76,7 @@ jobs:
category: eslint category: eslint
check-node-version: check-node-version:
if: github.event.pull_request if: github.event.pull_request && github.triggering_actor != 'dependabot[bot]'
name: Check Action Node versions name: Check Action Node versions
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45

View File

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

View File

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

View File

@@ -12,8 +12,13 @@ on:
- cron: '0 0 * * 1' - cron: '0 0 * * 1'
workflow_dispatch: workflow_dispatch:
defaults:
run:
shell: bash
jobs: jobs:
test-setup-python-scripts: test-setup-python-scripts:
if: github.triggering_actor != 'dependabot[bot]'
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
timeout-minutes: 45 timeout-minutes: 45
@@ -22,7 +27,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v6
with: with:
python-version: 3.12 python-version: 3.12

View File

@@ -15,9 +15,14 @@ on:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: {} workflow_dispatch: {}
defaults:
run:
shell: bash
jobs: jobs:
query-filters: query-filters:
name: Query Filters Tests name: Query Filters Tests
if: github.triggering_actor != 'dependabot[bot]'
timeout-minutes: 45 timeout-minutes: 45
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
@@ -27,7 +32,7 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Install Node.js - name: Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: 20.x node-version: 20.x
cache: npm cache: npm

View File

@@ -5,12 +5,20 @@ on:
types: [labeled] types: [labeled]
workflow_dispatch: workflow_dispatch:
defaults:
run:
shell: bash
jobs: jobs:
rebuild: rebuild:
name: Rebuild Action name: Rebuild Action
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch' 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: permissions:
contents: write # needed to push rebuilt commit contents: write # needed to push rebuilt commit
pull-requests: write # needed to comment on the PR pull-requests: write # needed to comment on the PR
@@ -19,7 +27,7 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.event.ref }} ref: ${{ env.HEAD_REF }}
- name: Remove label - name: Remove label
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
@@ -37,8 +45,6 @@ jobs:
- name: Merge in changes from base branch - name: Merge in changes from base branch
id: merge id: merge
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
run: | run: |
git fetch origin "$BASE_BRANCH" git fetch origin "$BASE_BRANCH"
@@ -68,13 +74,20 @@ jobs:
npm run build npm run build
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v6
with: with:
python-version: 3.11 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: | run: |
cd pr-checks
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install ruamel.yaml==0.17.31 pip install ruamel.yaml==0.17.31
python3 sync.py python3 sync.py

View File

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

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Update the required checks based on the current branch. # Update the required checks based on the current branch.
# Typically, this will be main.
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
REPO_DIR="$(dirname "$SCRIPT_DIR")" REPO_DIR="$(dirname "$SCRIPT_DIR")"
@@ -32,6 +33,12 @@ CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs -
echo "$CHECKS" | jq echo "$CHECKS" | jq
# Fail if there are no checks
if [ -z "$CHECKS" ] || [ "$(echo "$CHECKS" | jq '. | length')" -eq 0 ]; then
echo "No checks found for $GITHUB_SHA"
exit 1
fi
echo "{\"contexts\": ${CHECKS}}" > checks.json echo "{\"contexts\": ${CHECKS}}" > checks.json
echo "Updating main" echo "Updating main"

View File

@@ -16,6 +16,9 @@ on:
schedule: schedule:
- cron: '0 5 * * *' - cron: '0 5 * * *'
workflow_dispatch: {} workflow_dispatch: {}
defaults:
run:
shell: bash
jobs: jobs:
test-codeql-bundle-all: test-codeql-bundle-all:
strategy: strategy:
@@ -25,6 +28,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
version: nightly-latest version: nightly-latest
name: 'CodeQL Bundle All' name: 'CodeQL Bundle All'
if: github.triggering_actor != 'dependabot[bot]'
permissions: permissions:
contents: read contents: read
security-events: read security-events: read
@@ -43,10 +47,9 @@ jobs:
uses: ./../action/init uses: ./../action/init
with: with:
# We manually exclude Swift from the languages list here, as it is not supported on Ubuntu # 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 }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code - name: Build code
shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:

View File

@@ -13,6 +13,10 @@ on:
# to filter pre-release attribute. # to filter pre-release attribute.
types: [published] types: [published]
defaults:
run:
shell: bash
jobs: jobs:
update-bundle: update-bundle:
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-') if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
@@ -37,7 +41,7 @@ jobs:
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: '20.x' node-version: '20.x'
cache: 'npm' cache: 'npm'

View File

@@ -7,6 +7,10 @@ on:
type: string type: string
required: true required: true
defaults:
run:
shell: bash
jobs: jobs:
update: update:
name: Update code and create PR name: Update code and create PR
@@ -20,7 +24,6 @@ jobs:
steps: steps:
- name: Check release tag format - name: Check release tag format
id: checks id: checks
shell: bash
run: | run: |
if ! [[ $RELEASE_TAG =~ ^codeql-bundle-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 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." echo "Invalid release tag: expected a CodeQL bundle tag in the 'codeql-bundle-vM.N.P' format."
@@ -30,14 +33,13 @@ jobs:
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
- name: Check that the release exists - name: Check that the release exists
shell: bash
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: | run: |
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1 (gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
- name: Install Node - name: Install Node
uses: actions/setup-node@v4 uses: actions/setup-node@v5
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v5
@@ -46,20 +48,17 @@ jobs:
ref: main ref: main
- name: Update git config - name: Update git config
shell: bash
run: | run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
- name: Update release tag and version - name: Update release tag and version
shell: bash
run: | run: |
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache 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|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 sed -i "s/\"v2.0.[0-9]\+\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
- name: Compile TypeScript and commit changes - name: Compile TypeScript and commit changes
shell: bash
env: env:
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }} TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
run: | run: |
@@ -72,7 +71,6 @@ jobs:
git commit -m "Update release used by \`start-proxy\` action" git commit -m "Update release used by \`start-proxy\` action"
- name: Push changes and open PR - name: Push changes and open PR
shell: bash
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }} TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}

View File

@@ -11,6 +11,10 @@ on:
branches: branches:
- releases/* - releases/*
defaults:
run:
shell: bash
jobs: jobs:
prepare: prepare:
@@ -89,7 +93,7 @@ jobs:
pull-requests: write # needed to create pull request pull-requests: write # needed to create pull request
steps: steps:
- name: Generate token - name: Generate token
uses: actions/create-github-app-token@v2.1.1 uses: actions/create-github-app-token@v2.1.4
id: app-token id: app-token
with: with:
app-id: ${{ vars.AUTOMATION_APP_ID }} app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

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

View File

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

View File

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

View File

@@ -58,7 +58,7 @@ inputs:
# If changing this, make sure to update workflow.ts accordingly. # If changing this, make sure to update workflow.ts accordingly.
default: ${{ github.workspace }} default: ${{ github.workspace }}
ref: ref:
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is ignored for pull requests from forks." description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is ignored for pull requests from forks. Expected format: refs/heads/<branch name>, refs/tags/<tag>, refs/pull/<number>/merge, or refs/pull/<number>/head."
required: false required: false
sha: sha:
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is ignored for pull requests from forks." description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is ignored for pull requests from forks."

View File

@@ -12,6 +12,9 @@ inputs:
- The URL of a CodeQL Bundle tarball GitHub release asset, or - The URL of a CodeQL Bundle tarball GitHub release asset, or
- A special value `linked` which uses the version of the CodeQL tools - A special value `linked` which uses the version of the CodeQL tools
that the Action has been bundled with. that the Action has been bundled with.
- A special value `nightly` which uses the latest nightly version of the
CodeQL tools. Note that this is unstable and not recommended for
production use.
If not specified, the Action will check in several places until it finds If not specified, the Action will check in several places until it finds
the CodeQL tools. the CodeQL tools.

View File

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

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -26447,7 +26447,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -26463,7 +26463,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -26486,29 +26486,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -26538,7 +26536,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -31823,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -31841,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -67283,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -72092,11 +72091,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72115,6 +72121,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72131,6 +72141,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72236,11 +72248,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72259,6 +72278,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72275,6 +72298,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73038,7 +73063,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core14 = __importStar4(require_core());
var path6 = __importStar4(require("path")); var path6 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -73046,7 +73071,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config(); var config_1 = require_config();
var tar_1 = require_tar(); var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -73064,6 +73088,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError2; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73335,9 +73367,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`); 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; options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache"); core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73349,7 +73378,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { 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; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -73366,6 +73398,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -73375,6 +73410,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError2.name) { } else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`); core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`); core14.error(`Failed to save: ${typedError.message}`);
@@ -77687,7 +77724,7 @@ var require_brace_expansion2 = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence; var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0; var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) { if (!isSequence && !isOptions) {
if (m.post.match(/,.*\}/)) { if (m.post.match(/,(?!,).*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post; str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2); return expand(str2);
} }
@@ -94797,7 +94834,7 @@ var require_commonjs16 = __commonJS({
var TYPEMASK = 1023; var TYPEMASK = 1023;
var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN; var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
var normalizeCache = /* @__PURE__ */ new Map(); var normalizeCache = /* @__PURE__ */ new Map();
var normalize3 = (s) => { var normalize2 = (s) => {
const c = normalizeCache.get(s); const c = normalizeCache.get(s);
if (c) if (c)
return c; return c;
@@ -94810,7 +94847,7 @@ var require_commonjs16 = __commonJS({
const c = normalizeNocaseCache.get(s); const c = normalizeNocaseCache.get(s);
if (c) if (c)
return c; return c;
const n = normalize3(s.toLowerCase()); const n = normalize2(s.toLowerCase());
normalizeNocaseCache.set(s, n); normalizeNocaseCache.set(s, n);
return n; return n;
}; };
@@ -94979,7 +95016,7 @@ var require_commonjs16 = __commonJS({
*/ */
constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) { constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) {
this.name = name; this.name = name;
this.#matchName = nocase ? normalizeNocase(name) : normalize3(name); this.#matchName = nocase ? normalizeNocase(name) : normalize2(name);
this.#type = type2 & TYPEMASK; this.#type = type2 & TYPEMASK;
this.nocase = nocase; this.nocase = nocase;
this.roots = roots; this.roots = roots;
@@ -95072,7 +95109,7 @@ var require_commonjs16 = __commonJS({
return this.parent || this; return this.parent || this;
} }
const children = this.children(); const children = this.children();
const name = this.nocase ? normalizeNocase(pathPart) : normalize3(pathPart); const name = this.nocase ? normalizeNocase(pathPart) : normalize2(pathPart);
for (const p of children) { for (const p of children) {
if (p.#matchName === name) { if (p.#matchName === name) {
return p; return p;
@@ -95317,7 +95354,7 @@ var require_commonjs16 = __commonJS({
* directly. * directly.
*/ */
isNamed(n) { isNamed(n) {
return !this.nocase ? this.#matchName === normalize3(n) : this.#matchName === normalizeNocase(n); return !this.nocase ? this.#matchName === normalize2(n) : this.#matchName === normalizeNocase(n);
} }
/** /**
* Return the Path object corresponding to the target of a symbolic link. * Return the Path object corresponding to the target of a symbolic link.
@@ -95456,7 +95493,7 @@ var require_commonjs16 = __commonJS({
#readdirMaybePromoteChild(e, c) { #readdirMaybePromoteChild(e, c) {
for (let p = c.provisional; p < c.length; p++) { for (let p = c.provisional; p < c.length; p++) {
const pchild = c[p]; const pchild = c[p];
const name = this.nocase ? normalizeNocase(e.name) : normalize3(e.name); const name = this.nocase ? normalizeNocase(e.name) : normalize2(e.name);
if (name !== pchild.#matchName) { if (name !== pchild.#matchName) {
continue; continue;
} }
@@ -102912,7 +102949,7 @@ var require_dist_node16 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -102920,7 +102957,7 @@ var require_dist_node16 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -102930,12 +102967,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : "")); result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -102943,12 +102980,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -102963,7 +103000,7 @@ var require_dist_node16 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -103287,7 +103324,7 @@ var require_tr46 = __commonJS({
TRANSITIONAL: 0, TRANSITIONAL: 0,
NONTRANSITIONAL: 1 NONTRANSITIONAL: 1
}; };
function normalize3(str2) { function normalize2(str2) {
return str2.split("\0").map(function(s) { return str2.split("\0").map(function(s) {
return s.normalize("NFC"); return s.normalize("NFC");
}).join("\0"); }).join("\0");
@@ -103367,7 +103404,7 @@ var require_tr46 = __commonJS({
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
} }
var error2 = false; var error2 = false;
if (normalize3(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) { if (normalize2(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) {
error2 = true; error2 = true;
} }
var len = countSymbols(label); var len = countSymbols(label);
@@ -103385,7 +103422,7 @@ var require_tr46 = __commonJS({
} }
function processing(domain_name, useSTD3, processing_option) { function processing(domain_name, useSTD3, processing_option) {
var result = mapChars(domain_name, useSTD3, processing_option); var result = mapChars(domain_name, useSTD3, processing_option);
result.string = normalize3(result.string); result.string = normalize2(result.string);
var labels = result.string.split("."); var labels = result.string.split(".");
for (var i = 0; i < labels.length; ++i) { for (var i = 0; i < labels.length; ++i) {
try { try {
@@ -117488,7 +117525,6 @@ function wrapCliConfigurationError(cliError) {
// src/config-utils.ts // src/config-utils.ts
var fs3 = __toESM(require("fs")); var fs3 = __toESM(require("fs"));
var path3 = __toESM(require("path")); var path3 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts // src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
@@ -117501,8 +117537,17 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/feature-flags.ts // src/feature-flags.ts
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var fs2 = __toESM(require("fs")); var fs2 = __toESM(require("fs"));
@@ -117687,8 +117732,8 @@ function withGroup(groupName, f) {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) { async function writeBaseDatabaseOidsFile(config, sourceRoot) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -117748,13 +117793,13 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
} }
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
function isSupportedToolsFeature(versionInfo, feature) { function isSupportedToolsFeature(versionInfo, feature) {
return !!versionInfo.features && versionInfo.features[feature]; return !!versionInfo.features && versionInfo.features[feature];
} }
var SafeArtifactUploadVersion = "2.20.3"; var SafeArtifactUploadVersion = "2.20.3";
function isSafeArtifactUpload(codeQlVersion) { function isSafeArtifactUpload(codeQlVersion) {
return !codeQlVersion ? true : semver2.gte(codeQlVersion, SafeArtifactUploadVersion); return !codeQlVersion ? true : semver3.gte(codeQlVersion, SafeArtifactUploadVersion);
} }
// src/feature-flags.ts // src/feature-flags.ts
@@ -117798,6 +117843,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117909,11 +117960,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
@@ -117921,15 +117982,6 @@ var featureConfig = {
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -117954,12 +118006,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
function getPathToParsedConfigFile(tempDir) { function getPathToParsedConfigFile(tempDir) {
return path3.join(tempDir, "config"); return path3.join(tempDir, "config");
} }
@@ -117971,40 +118017,23 @@ async function getConfig(tempDir, logger) {
const configString = fs3.readFileSync(configFile, "utf8"); const configString = fs3.readFileSync(configFile, "utf8");
logger.debug("Loaded config:"); logger.debug("Loaded config:");
logger.debug(configString); logger.debug(configString);
return JSON.parse(configString); const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
} }
function generateCodeScanningConfig(originalUserInput, augmentationProperties) { function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(originalUserInput); const augmentedConfig = cloneObject(cliConfig);
if (augmentationProperties.queriesInput) { if (extraQueryExclusions.length === 0) {
if (augmentationProperties.queriesInputCombines) { return augmentedConfig;
augmentedConfig.queries = (augmentedConfig.queries || []).concat(
augmentationProperties.queriesInput
);
} else {
augmentedConfig.queries = augmentationProperties.queriesInput;
}
}
if (augmentedConfig.queries?.length === 0) {
delete augmentedConfig.queries;
}
if (augmentationProperties.packsInput) {
if (augmentationProperties.packsInputCombines) {
if (Array.isArray(augmentedConfig.packs)) {
augmentedConfig.packs = (augmentedConfig.packs || []).concat(
augmentationProperties.packsInput
);
} else if (!augmentedConfig.packs) {
augmentedConfig.packs = augmentationProperties.packsInput;
} else {
const language = Object.keys(augmentedConfig.packs)[0];
augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
}
} else {
augmentedConfig.packs = augmentationProperties.packsInput;
}
}
if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
delete augmentedConfig.packs;
} }
augmentedConfig["query-filters"] = [ augmentedConfig["query-filters"] = [
// Ordering matters. If the first filter is an inclusion, it implicitly // Ordering matters. If the first filter is an inclusion, it implicitly
@@ -118012,7 +118041,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) {
// it implicitly includes all queries that are not excluded. So user // it implicitly includes all queries that are not excluded. So user
// filters (if any) should always be first to preserve intent. // filters (if any) should always be first to preserve intent.
...augmentedConfig["query-filters"] || [], ...augmentedConfig["query-filters"] || [],
...augmentationProperties.extraQueryExclusions ...extraQueryExclusions
]; ];
if (augmentedConfig["query-filters"]?.length === 0) { if (augmentedConfig["query-filters"]?.length === 0) {
delete augmentedConfig["query-filters"]; delete augmentedConfig["query-filters"];
@@ -118134,7 +118163,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
await this.getVersion(), await this.getVersion(),
"forceOverwrite" /* ForceOverwrite */ "forceOverwrite" /* ForceOverwrite */
) ? "--force-overwrite" : "--overwrite"; ) ? "--force-overwrite" : "--overwrite";
const overlayDatabaseMode = config.augmentationProperties.overlayDatabaseMode; const overlayDatabaseMode = config.overlayDatabaseMode;
if (overlayDatabaseMode === "overlay" /* Overlay */) { if (overlayDatabaseMode === "overlay" /* Overlay */) {
const overlayChangesFile = await writeOverlayChangesFile( const overlayChangesFile = await writeOverlayChangesFile(
config, config,
@@ -118245,13 +118274,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
); );
} }
}, },
async betterResolveLanguages() { async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [ const codeqlArgs = [
"resolve", "resolve",
"languages", "languages",
"--format=betterjson", "--format=betterjson",
"--extractor-options-verbosity=4", "--extractor-options-verbosity=4",
"--extractor-include-aliases", "--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"]) ...getExtraOptionsFromEnv(["resolve", "languages"])
]; ];
const output = await runCli(cmd, codeqlArgs); const output = await runCli(cmd, codeqlArgs);
@@ -118290,7 +118322,6 @@ ${output}`
"run-queries", "run-queries",
...flags, ...flags,
databasePath, databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024", "--min-disk-free=1024",
// Try to leave at least 1GB free // Try to leave at least 1GB free
"-v", "-v",
@@ -118548,9 +118579,9 @@ async function runCli(cmd, args = [], opts = {}) {
} }
async function writeCodeScanningConfigFile(config, logger) { async function writeCodeScanningConfigFile(config, logger) {
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config); const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
const augmentedConfig = generateCodeScanningConfig( const augmentedConfig = appendExtraQueryExclusions(
config.originalUserInput, config.extraQueryExclusions,
config.augmentationProperties config.computedConfig
); );
logger.info( logger.info(
`Writing augmented user configuration file to ${codeScanningConfigFile}` `Writing augmented user configuration file to ${codeScanningConfigFile}`

617
lib/analyze-action.js generated

File diff suppressed because it is too large Load Diff

237
lib/autobuild-action.js generated
View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -26447,7 +26447,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -26463,7 +26463,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -26486,29 +26486,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -26538,7 +26536,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -31823,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -31841,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -67283,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -72092,11 +72091,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72115,6 +72121,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72131,6 +72141,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72236,11 +72248,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72259,6 +72278,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72275,6 +72298,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73038,7 +73063,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core14 = __importStar4(require_core());
var path7 = __importStar4(require("path")); var path7 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -73046,7 +73071,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config(); var config_1 = require_config();
var tar_1 = require_tar(); var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -73064,6 +73088,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73335,9 +73367,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`); 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; options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache"); core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73349,7 +73378,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { 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; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -73366,6 +73398,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -73375,6 +73410,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError.name) { } else if (typedError.name === ReserveCacheError.name) {
core14.info(`Failed to save: ${typedError.message}`); core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`); core14.error(`Failed to save: ${typedError.message}`);
@@ -78230,7 +78267,6 @@ function wrapCliConfigurationError(cliError) {
// src/config-utils.ts // src/config-utils.ts
var fs4 = __toESM(require("fs")); var fs4 = __toESM(require("fs"));
var path4 = __toESM(require("path")); var path4 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts // src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
@@ -78243,14 +78279,23 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/feature-flags.ts // src/feature-flags.ts
var fs3 = __toESM(require("fs")); var fs3 = __toESM(require("fs"));
var path3 = __toESM(require("path")); var path3 = __toESM(require("path"));
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/defaults.json // src/defaults.json
var bundleVersion = "codeql-bundle-v2.22.4"; var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.22.4"; var cliVersion = "2.23.1";
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var fs2 = __toESM(require("fs")); var fs2 = __toESM(require("fs"));
@@ -78427,8 +78472,8 @@ function getActionsLogger() {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) { async function writeBaseDatabaseOidsFile(config, sourceRoot) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -78488,7 +78533,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
} }
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
function isSupportedToolsFeature(versionInfo, feature) { function isSupportedToolsFeature(versionInfo, feature) {
return !!versionInfo.features && versionInfo.features[feature]; return !!versionInfo.features && versionInfo.features[feature];
} }
@@ -78536,6 +78581,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -78647,11 +78698,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json"; var FEATURE_FLAGS_FILE_NAME = "cached-feature-flags.json";
@@ -78760,7 +78821,7 @@ var GitHubFeatureFlags = class {
DEFAULT_VERSION_FEATURE_FLAG_PREFIX.length, DEFAULT_VERSION_FEATURE_FLAG_PREFIX.length,
f.length - DEFAULT_VERSION_FEATURE_FLAG_SUFFIX.length f.length - DEFAULT_VERSION_FEATURE_FLAG_SUFFIX.length
).replace(/_/g, "."); ).replace(/_/g, ".");
if (!semver3.valid(version)) { if (!semver4.valid(version)) {
this.logger.warning( this.logger.warning(
`Ignoring feature flag ${f} as it does not specify a valid CodeQL version.` `Ignoring feature flag ${f} as it does not specify a valid CodeQL version.`
); );
@@ -78923,15 +78984,6 @@ var GitHubFeatureFlags = class {
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -78956,12 +79008,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
function getPathToParsedConfigFile(tempDir) { function getPathToParsedConfigFile(tempDir) {
return path4.join(tempDir, "config"); return path4.join(tempDir, "config");
} }
@@ -78973,40 +79019,23 @@ async function getConfig(tempDir, logger) {
const configString = fs4.readFileSync(configFile, "utf8"); const configString = fs4.readFileSync(configFile, "utf8");
logger.debug("Loaded config:"); logger.debug("Loaded config:");
logger.debug(configString); logger.debug(configString);
return JSON.parse(configString); const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
} }
function generateCodeScanningConfig(originalUserInput, augmentationProperties) { function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(originalUserInput); const augmentedConfig = cloneObject(cliConfig);
if (augmentationProperties.queriesInput) { if (extraQueryExclusions.length === 0) {
if (augmentationProperties.queriesInputCombines) { return augmentedConfig;
augmentedConfig.queries = (augmentedConfig.queries || []).concat(
augmentationProperties.queriesInput
);
} else {
augmentedConfig.queries = augmentationProperties.queriesInput;
}
}
if (augmentedConfig.queries?.length === 0) {
delete augmentedConfig.queries;
}
if (augmentationProperties.packsInput) {
if (augmentationProperties.packsInputCombines) {
if (Array.isArray(augmentedConfig.packs)) {
augmentedConfig.packs = (augmentedConfig.packs || []).concat(
augmentationProperties.packsInput
);
} else if (!augmentedConfig.packs) {
augmentedConfig.packs = augmentationProperties.packsInput;
} else {
const language = Object.keys(augmentedConfig.packs)[0];
augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
}
} else {
augmentedConfig.packs = augmentationProperties.packsInput;
}
}
if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
delete augmentedConfig.packs;
} }
augmentedConfig["query-filters"] = [ augmentedConfig["query-filters"] = [
// Ordering matters. If the first filter is an inclusion, it implicitly // Ordering matters. If the first filter is an inclusion, it implicitly
@@ -79014,7 +79043,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) {
// it implicitly includes all queries that are not excluded. So user // it implicitly includes all queries that are not excluded. So user
// filters (if any) should always be first to preserve intent. // filters (if any) should always be first to preserve intent.
...augmentedConfig["query-filters"] || [], ...augmentedConfig["query-filters"] || [],
...augmentationProperties.extraQueryExclusions ...extraQueryExclusions
]; ];
if (augmentedConfig["query-filters"]?.length === 0) { if (augmentedConfig["query-filters"]?.length === 0) {
delete augmentedConfig["query-filters"]; delete augmentedConfig["query-filters"];
@@ -79169,7 +79198,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
await this.getVersion(), await this.getVersion(),
"forceOverwrite" /* ForceOverwrite */ "forceOverwrite" /* ForceOverwrite */
) ? "--force-overwrite" : "--overwrite"; ) ? "--force-overwrite" : "--overwrite";
const overlayDatabaseMode = config.augmentationProperties.overlayDatabaseMode; const overlayDatabaseMode = config.overlayDatabaseMode;
if (overlayDatabaseMode === "overlay" /* Overlay */) { if (overlayDatabaseMode === "overlay" /* Overlay */) {
const overlayChangesFile = await writeOverlayChangesFile( const overlayChangesFile = await writeOverlayChangesFile(
config, config,
@@ -79280,13 +79309,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
); );
} }
}, },
async betterResolveLanguages() { async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [ const codeqlArgs = [
"resolve", "resolve",
"languages", "languages",
"--format=betterjson", "--format=betterjson",
"--extractor-options-verbosity=4", "--extractor-options-verbosity=4",
"--extractor-include-aliases", "--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"]) ...getExtraOptionsFromEnv(["resolve", "languages"])
]; ];
const output = await runCli(cmd, codeqlArgs); const output = await runCli(cmd, codeqlArgs);
@@ -79325,7 +79357,6 @@ ${output}`
"run-queries", "run-queries",
...flags, ...flags,
databasePath, databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024", "--min-disk-free=1024",
// Try to leave at least 1GB free // Try to leave at least 1GB free
"-v", "-v",
@@ -79583,9 +79614,9 @@ async function runCli(cmd, args = [], opts = {}) {
} }
async function writeCodeScanningConfigFile(config, logger) { async function writeCodeScanningConfigFile(config, logger) {
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config); const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
const augmentedConfig = generateCodeScanningConfig( const augmentedConfig = appendExtraQueryExclusions(
config.originalUserInput, config.extraQueryExclusions,
config.augmentationProperties config.computedConfig
); );
logger.info( logger.info(
`Writing augmented user configuration file to ${codeScanningConfigFile}` `Writing augmented user configuration file to ${codeScanningConfigFile}`

View File

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

422
lib/init-action-post.js generated

File diff suppressed because it is too large Load Diff

1750
lib/init-action.js generated

File diff suppressed because it is too large Load Diff

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -26447,7 +26447,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -26463,7 +26463,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -26486,29 +26486,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -26538,7 +26536,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -31823,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -31841,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -67283,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -72092,11 +72091,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72115,6 +72121,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72131,6 +72141,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72236,11 +72248,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72259,6 +72278,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72275,6 +72298,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73038,7 +73063,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core13 = __importStar4(require_core());
var path5 = __importStar4(require("path")); var path5 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -73046,7 +73071,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config(); var config_1 = require_config();
var tar_1 = require_tar(); var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -73064,6 +73088,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73335,9 +73367,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core13.debug(`File Size: ${archiveFileSize}`); 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; options.archiveSizeBytes = archiveFileSize;
core13.debug("Reserving Cache"); core13.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73349,7 +73378,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { 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; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -73366,6 +73398,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -73375,6 +73410,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError.name) { } else if (typedError.name === ReserveCacheError.name) {
core13.info(`Failed to save: ${typedError.message}`); core13.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core13.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core13.error(`Failed to save: ${typedError.message}`); core13.error(`Failed to save: ${typedError.message}`);
@@ -78229,7 +78266,6 @@ function wrapCliConfigurationError(cliError) {
// src/config-utils.ts // src/config-utils.ts
var fs3 = __toESM(require("fs")); var fs3 = __toESM(require("fs"));
var path3 = __toESM(require("path")); var path3 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts // src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
@@ -78242,8 +78278,17 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/feature-flags.ts // src/feature-flags.ts
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var fs2 = __toESM(require("fs")); var fs2 = __toESM(require("fs"));
@@ -78420,8 +78465,8 @@ function getActionsLogger() {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) { async function writeBaseDatabaseOidsFile(config, sourceRoot) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -78481,7 +78526,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
} }
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
function isSupportedToolsFeature(versionInfo, feature) { function isSupportedToolsFeature(versionInfo, feature) {
return !!versionInfo.features && versionInfo.features[feature]; return !!versionInfo.features && versionInfo.features[feature];
} }
@@ -78527,6 +78572,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -78638,11 +78689,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
@@ -78650,15 +78711,6 @@ var featureConfig = {
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -78683,12 +78735,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
function getPathToParsedConfigFile(tempDir) { function getPathToParsedConfigFile(tempDir) {
return path3.join(tempDir, "config"); return path3.join(tempDir, "config");
} }
@@ -78700,40 +78746,23 @@ async function getConfig(tempDir, logger) {
const configString = fs3.readFileSync(configFile, "utf8"); const configString = fs3.readFileSync(configFile, "utf8");
logger.debug("Loaded config:"); logger.debug("Loaded config:");
logger.debug(configString); logger.debug(configString);
return JSON.parse(configString); const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
} }
function generateCodeScanningConfig(originalUserInput, augmentationProperties) { function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(originalUserInput); const augmentedConfig = cloneObject(cliConfig);
if (augmentationProperties.queriesInput) { if (extraQueryExclusions.length === 0) {
if (augmentationProperties.queriesInputCombines) { return augmentedConfig;
augmentedConfig.queries = (augmentedConfig.queries || []).concat(
augmentationProperties.queriesInput
);
} else {
augmentedConfig.queries = augmentationProperties.queriesInput;
}
}
if (augmentedConfig.queries?.length === 0) {
delete augmentedConfig.queries;
}
if (augmentationProperties.packsInput) {
if (augmentationProperties.packsInputCombines) {
if (Array.isArray(augmentedConfig.packs)) {
augmentedConfig.packs = (augmentedConfig.packs || []).concat(
augmentationProperties.packsInput
);
} else if (!augmentedConfig.packs) {
augmentedConfig.packs = augmentationProperties.packsInput;
} else {
const language = Object.keys(augmentedConfig.packs)[0];
augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
}
} else {
augmentedConfig.packs = augmentationProperties.packsInput;
}
}
if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
delete augmentedConfig.packs;
} }
augmentedConfig["query-filters"] = [ augmentedConfig["query-filters"] = [
// Ordering matters. If the first filter is an inclusion, it implicitly // Ordering matters. If the first filter is an inclusion, it implicitly
@@ -78741,7 +78770,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) {
// it implicitly includes all queries that are not excluded. So user // it implicitly includes all queries that are not excluded. So user
// filters (if any) should always be first to preserve intent. // filters (if any) should always be first to preserve intent.
...augmentedConfig["query-filters"] || [], ...augmentedConfig["query-filters"] || [],
...augmentationProperties.extraQueryExclusions ...extraQueryExclusions
]; ];
if (augmentedConfig["query-filters"]?.length === 0) { if (augmentedConfig["query-filters"]?.length === 0) {
delete augmentedConfig["query-filters"]; delete augmentedConfig["query-filters"];
@@ -78869,7 +78898,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
await this.getVersion(), await this.getVersion(),
"forceOverwrite" /* ForceOverwrite */ "forceOverwrite" /* ForceOverwrite */
) ? "--force-overwrite" : "--overwrite"; ) ? "--force-overwrite" : "--overwrite";
const overlayDatabaseMode = config.augmentationProperties.overlayDatabaseMode; const overlayDatabaseMode = config.overlayDatabaseMode;
if (overlayDatabaseMode === "overlay" /* Overlay */) { if (overlayDatabaseMode === "overlay" /* Overlay */) {
const overlayChangesFile = await writeOverlayChangesFile( const overlayChangesFile = await writeOverlayChangesFile(
config, config,
@@ -78980,13 +79009,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
); );
} }
}, },
async betterResolveLanguages() { async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [ const codeqlArgs = [
"resolve", "resolve",
"languages", "languages",
"--format=betterjson", "--format=betterjson",
"--extractor-options-verbosity=4", "--extractor-options-verbosity=4",
"--extractor-include-aliases", "--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"]) ...getExtraOptionsFromEnv(["resolve", "languages"])
]; ];
const output = await runCli(cmd, codeqlArgs); const output = await runCli(cmd, codeqlArgs);
@@ -79025,7 +79057,6 @@ ${output}`
"run-queries", "run-queries",
...flags, ...flags,
databasePath, databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024", "--min-disk-free=1024",
// Try to leave at least 1GB free // Try to leave at least 1GB free
"-v", "-v",
@@ -79283,9 +79314,9 @@ async function runCli(cmd, args = [], opts = {}) {
} }
async function writeCodeScanningConfigFile(config, logger) { async function writeCodeScanningConfigFile(config, logger) {
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config); const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
const augmentedConfig = generateCodeScanningConfig( const augmentedConfig = appendExtraQueryExclusions(
config.originalUserInput, config.extraQueryExclusions,
config.augmentationProperties config.computedConfig
); );
logger.info( logger.info(
`Writing augmented user configuration file to ${codeScanningConfigFile}` `Writing augmented user configuration file to ${codeScanningConfigFile}`

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -26447,7 +26447,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -26463,7 +26463,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -26486,29 +26486,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -26538,7 +26536,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -31823,14 +31822,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -31841,7 +31840,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -67283,7 +67282,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -72092,11 +72091,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72115,6 +72121,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72131,6 +72141,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72236,11 +72248,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72259,6 +72278,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -72275,6 +72298,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73038,7 +73063,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core14 = __importStar4(require_core());
var path2 = __importStar4(require("path")); var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -73046,7 +73071,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config(); var config_1 = require_config();
var tar_1 = require_tar(); var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -73064,6 +73088,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError2; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73335,9 +73367,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`); 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; options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache"); core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73349,7 +73378,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { 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; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -73366,6 +73398,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -73375,6 +73410,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError2.name) { } else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`); core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`); core14.error(`Failed to save: ${typedError.message}`);
@@ -76347,7 +76384,7 @@ var require_brace_expansion2 = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence; var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0; var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) { if (!isSequence && !isOptions) {
if (m.post.match(/,.*\}/)) { if (m.post.match(/,(?!,).*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post; str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2); return expand(str2);
} }
@@ -93457,7 +93494,7 @@ var require_commonjs16 = __commonJS({
var TYPEMASK = 1023; var TYPEMASK = 1023;
var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN; var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
var normalizeCache = /* @__PURE__ */ new Map(); var normalizeCache = /* @__PURE__ */ new Map();
var normalize2 = (s) => { var normalize = (s) => {
const c = normalizeCache.get(s); const c = normalizeCache.get(s);
if (c) if (c)
return c; return c;
@@ -93470,7 +93507,7 @@ var require_commonjs16 = __commonJS({
const c = normalizeNocaseCache.get(s); const c = normalizeNocaseCache.get(s);
if (c) if (c)
return c; return c;
const n = normalize2(s.toLowerCase()); const n = normalize(s.toLowerCase());
normalizeNocaseCache.set(s, n); normalizeNocaseCache.set(s, n);
return n; return n;
}; };
@@ -93639,7 +93676,7 @@ var require_commonjs16 = __commonJS({
*/ */
constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) { constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) {
this.name = name; this.name = name;
this.#matchName = nocase ? normalizeNocase(name) : normalize2(name); this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
this.#type = type2 & TYPEMASK; this.#type = type2 & TYPEMASK;
this.nocase = nocase; this.nocase = nocase;
this.roots = roots; this.roots = roots;
@@ -93732,7 +93769,7 @@ var require_commonjs16 = __commonJS({
return this.parent || this; return this.parent || this;
} }
const children = this.children(); const children = this.children();
const name = this.nocase ? normalizeNocase(pathPart) : normalize2(pathPart); const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
for (const p of children) { for (const p of children) {
if (p.#matchName === name) { if (p.#matchName === name) {
return p; return p;
@@ -93977,7 +94014,7 @@ var require_commonjs16 = __commonJS({
* directly. * directly.
*/ */
isNamed(n) { isNamed(n) {
return !this.nocase ? this.#matchName === normalize2(n) : this.#matchName === normalizeNocase(n); return !this.nocase ? this.#matchName === normalize(n) : this.#matchName === normalizeNocase(n);
} }
/** /**
* Return the Path object corresponding to the target of a symbolic link. * Return the Path object corresponding to the target of a symbolic link.
@@ -94116,7 +94153,7 @@ var require_commonjs16 = __commonJS({
#readdirMaybePromoteChild(e, c) { #readdirMaybePromoteChild(e, c) {
for (let p = c.provisional; p < c.length; p++) { for (let p = c.provisional; p < c.length; p++) {
const pchild = c[p]; const pchild = c[p];
const name = this.nocase ? normalizeNocase(e.name) : normalize2(e.name); const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name);
if (name !== pchild.#matchName) { if (name !== pchild.#matchName) {
continue; continue;
} }
@@ -101572,7 +101609,7 @@ var require_dist_node16 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -101580,7 +101617,7 @@ var require_dist_node16 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -101590,12 +101627,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : "")); result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -101603,12 +101640,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -101623,7 +101660,7 @@ var require_dist_node16 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -101947,7 +101984,7 @@ var require_tr46 = __commonJS({
TRANSITIONAL: 0, TRANSITIONAL: 0,
NONTRANSITIONAL: 1 NONTRANSITIONAL: 1
}; };
function normalize2(str2) { function normalize(str2) {
return str2.split("\0").map(function(s) { return str2.split("\0").map(function(s) {
return s.normalize("NFC"); return s.normalize("NFC");
}).join("\0"); }).join("\0");
@@ -102027,7 +102064,7 @@ var require_tr46 = __commonJS({
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
} }
var error2 = false; var error2 = false;
if (normalize2(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) { if (normalize(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) {
error2 = true; error2 = true;
} }
var len = countSymbols(label); var len = countSymbols(label);
@@ -102045,7 +102082,7 @@ var require_tr46 = __commonJS({
} }
function processing(domain_name, useSTD3, processing_option) { function processing(domain_name, useSTD3, processing_option) {
var result = mapChars(domain_name, useSTD3, processing_option); var result = mapChars(domain_name, useSTD3, processing_option);
result.string = normalize2(result.string); result.string = normalize(result.string);
var labels = result.string.split("."); var labels = result.string.split(".");
for (var i = 0; i < labels.length; ++i) { for (var i = 0; i < labels.length; ++i) {
try { try {
@@ -117128,7 +117165,6 @@ async function getGitHubVersion() {
// src/config-utils.ts // src/config-utils.ts
var fs = __toESM(require("fs")); var fs = __toESM(require("fs"));
var path = __toESM(require("path")); var path = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts // src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
@@ -117141,8 +117177,17 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/feature-flags.ts // src/feature-flags.ts
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var actionsCache = __toESM(require_cache3()); var actionsCache = __toESM(require_cache3());
@@ -117159,12 +117204,12 @@ function getActionsLogger() {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
// src/feature-flags.ts // src/feature-flags.ts
var featureConfig = { var featureConfig = {
@@ -117207,6 +117252,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117318,11 +117369,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
@@ -117330,15 +117391,6 @@ var featureConfig = {
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -117363,12 +117415,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
function getPathToParsedConfigFile(tempDir) { function getPathToParsedConfigFile(tempDir) {
return path.join(tempDir, "config"); return path.join(tempDir, "config");
} }
@@ -117380,7 +117426,18 @@ async function getConfig(tempDir, logger) {
const configString = fs.readFileSync(configFile, "utf8"); const configString = fs.readFileSync(configFile, "utf8");
logger.debug("Loaded config:"); logger.debug("Loaded config:");
logger.debug(configString); logger.debug(configString);
return JSON.parse(configString); const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
} }
// src/debug-artifacts.ts // src/debug-artifacts.ts

1850
lib/start-proxy-action.js generated

File diff suppressed because it is too large Load Diff

374
lib/upload-lib.js generated
View File

@@ -21585,7 +21585,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21593,7 +21593,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21605,14 +21605,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21620,12 +21620,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21640,7 +21640,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -22325,7 +22325,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -22333,7 +22333,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -22345,14 +22345,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -22360,12 +22360,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -22380,7 +22380,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -29019,7 +29019,7 @@ var require_pattern = __commonJS({
const absolute = []; const absolute = [];
const relative2 = []; const relative2 = [];
for (const pattern of patterns) { for (const pattern of patterns) {
if (isAbsolute3(pattern)) { if (isAbsolute2(pattern)) {
absolute.push(pattern); absolute.push(pattern);
} else { } else {
relative2.push(pattern); relative2.push(pattern);
@@ -29028,10 +29028,10 @@ var require_pattern = __commonJS({
return [absolute, relative2]; return [absolute, relative2];
} }
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
function isAbsolute3(pattern) { function isAbsolute2(pattern) {
return path15.isAbsolute(pattern); return path15.isAbsolute(pattern);
} }
exports2.isAbsolute = isAbsolute3; exports2.isAbsolute = isAbsolute2;
} }
}); });
@@ -33584,7 +33584,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -33593,7 +33593,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -33609,7 +33609,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -33632,29 +33632,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -33684,7 +33682,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -38969,14 +38968,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -38987,7 +38986,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -74429,7 +74428,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -79238,11 +79237,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -79261,6 +79267,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -79277,6 +79287,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -79382,11 +79394,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -79405,6 +79424,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -79421,6 +79444,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -80184,7 +80209,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core12 = __importStar4(require_core()); var core12 = __importStar4(require_core());
var path15 = __importStar4(require("path")); var path15 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -80192,7 +80217,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config(); var config_1 = require_config();
var tar_1 = require_tar(); var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -80210,6 +80234,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -80481,9 +80513,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core12.debug(`File Size: ${archiveFileSize}`); core12.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; options.archiveSizeBytes = archiveFileSize;
core12.debug("Reserving Cache"); core12.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -80495,7 +80524,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { if (!response.ok) {
throw new Error("Response was not ok"); if (response.message) {
core12.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
} }
signedUploadUrl = response.signedUploadUrl; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -80512,6 +80544,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core12.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core12.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -80521,6 +80556,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError.name) { } else if (typedError.name === ReserveCacheError.name) {
core12.info(`Failed to save: ${typedError.message}`); core12.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core12.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core12.error(`Failed to save: ${typedError.message}`); core12.error(`Failed to save: ${typedError.message}`);
@@ -84780,10 +84817,7 @@ var require_sarif_schema_2_1_0 = __commonJS({
// src/upload-lib.ts // src/upload-lib.ts
var upload_lib_exports = {}; var upload_lib_exports = {};
__export(upload_lib_exports, { __export(upload_lib_exports, {
CodeQualityTarget: () => CodeQualityTarget,
CodeScanningTarget: () => CodeScanningTarget,
InvalidSarifUploadError: () => InvalidSarifUploadError, InvalidSarifUploadError: () => InvalidSarifUploadError,
SARIF_UPLOAD_ENDPOINT: () => SARIF_UPLOAD_ENDPOINT,
buildPayload: () => buildPayload, buildPayload: () => buildPayload,
findSarifFilesInDir: () => findSarifFilesInDir, findSarifFilesInDir: () => findSarifFilesInDir,
getSarifFilePaths: () => getSarifFilePaths, getSarifFilePaths: () => getSarifFilePaths,
@@ -88548,6 +88582,14 @@ function getApiDetails() {
function getApiClient() { function getApiClient() {
return createApiClientWithDetails(getApiDetails()); return createApiClientWithDetails(getApiDetails());
} }
function getAuthorizationHeaderFor(logger, apiDetails, url2) {
if (url2.startsWith(`${apiDetails.url}/`) || apiDetails.apiURL && url2.startsWith(`${apiDetails.apiURL}/`)) {
logger.debug(`Providing an authorization token.`);
return `token ${apiDetails.auth}`;
}
logger.debug(`Not using an authorization token.`);
return void 0;
}
var cachedGitHubVersion = void 0; var cachedGitHubVersion = void 0;
async function getGitHubVersionFromApi(apiClient, apiDetails) { async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) { if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -88877,7 +88919,6 @@ function wrapCliConfigurationError(cliError) {
// src/config-utils.ts // src/config-utils.ts
var fs7 = __toESM(require("fs")); var fs7 = __toESM(require("fs"));
var path9 = __toESM(require("path")); var path9 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/analyses.ts // src/analyses.ts
var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => {
@@ -88890,16 +88931,25 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind));
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/diff-informed-analysis-utils.ts // src/diff-informed-analysis-utils.ts
var fs6 = __toESM(require("fs")); var fs6 = __toESM(require("fs"));
var path8 = __toESM(require("path")); var path8 = __toESM(require("path"));
// src/feature-flags.ts // src/feature-flags.ts
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/defaults.json // src/defaults.json
var bundleVersion = "codeql-bundle-v2.22.4"; var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.22.4"; var cliVersion = "2.23.1";
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var fs5 = __toESM(require("fs")); var fs5 = __toESM(require("fs"));
@@ -89118,8 +89168,8 @@ function formatDuration(durationMs) {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) { async function writeBaseDatabaseOidsFile(config, sourceRoot) {
const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -89179,7 +89229,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
} }
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
function isSupportedToolsFeature(versionInfo, feature) { function isSupportedToolsFeature(versionInfo, feature) {
return !!versionInfo.features && versionInfo.features[feature]; return !!versionInfo.features && versionInfo.features[feature];
} }
@@ -89226,6 +89276,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -89337,11 +89393,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
@@ -89367,15 +89433,6 @@ ${jsonContents}`
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -89400,12 +89457,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
function getPathToParsedConfigFile(tempDir) { function getPathToParsedConfigFile(tempDir) {
return path9.join(tempDir, "config"); return path9.join(tempDir, "config");
} }
@@ -89417,40 +89468,23 @@ async function getConfig(tempDir, logger) {
const configString = fs7.readFileSync(configFile, "utf8"); const configString = fs7.readFileSync(configFile, "utf8");
logger.debug("Loaded config:"); logger.debug("Loaded config:");
logger.debug(configString); logger.debug(configString);
return JSON.parse(configString); const config = JSON.parse(configString);
if (config.version === void 0) {
throw new ConfigurationError(
`Loaded configuration file, but it does not contain the expected 'version' field.`
);
}
if (config.version !== getActionVersion()) {
throw new ConfigurationError(
`Loaded a configuration file for version '${config.version}', but running version '${getActionVersion()}'`
);
}
return config;
} }
function generateCodeScanningConfig(originalUserInput, augmentationProperties) { function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
const augmentedConfig = cloneObject(originalUserInput); const augmentedConfig = cloneObject(cliConfig);
if (augmentationProperties.queriesInput) { if (extraQueryExclusions.length === 0) {
if (augmentationProperties.queriesInputCombines) { return augmentedConfig;
augmentedConfig.queries = (augmentedConfig.queries || []).concat(
augmentationProperties.queriesInput
);
} else {
augmentedConfig.queries = augmentationProperties.queriesInput;
}
}
if (augmentedConfig.queries?.length === 0) {
delete augmentedConfig.queries;
}
if (augmentationProperties.packsInput) {
if (augmentationProperties.packsInputCombines) {
if (Array.isArray(augmentedConfig.packs)) {
augmentedConfig.packs = (augmentedConfig.packs || []).concat(
augmentationProperties.packsInput
);
} else if (!augmentedConfig.packs) {
augmentedConfig.packs = augmentationProperties.packsInput;
} else {
const language = Object.keys(augmentedConfig.packs)[0];
augmentedConfig.packs[language] = augmentedConfig.packs[language].concat(augmentationProperties.packsInput);
}
} else {
augmentedConfig.packs = augmentationProperties.packsInput;
}
}
if (Array.isArray(augmentedConfig.packs) && !augmentedConfig.packs.length) {
delete augmentedConfig.packs;
} }
augmentedConfig["query-filters"] = [ augmentedConfig["query-filters"] = [
// Ordering matters. If the first filter is an inclusion, it implicitly // Ordering matters. If the first filter is an inclusion, it implicitly
@@ -89458,7 +89492,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) {
// it implicitly includes all queries that are not excluded. So user // it implicitly includes all queries that are not excluded. So user
// filters (if any) should always be first to preserve intent. // filters (if any) should always be first to preserve intent.
...augmentedConfig["query-filters"] || [], ...augmentedConfig["query-filters"] || [],
...augmentationProperties.extraQueryExclusions ...extraQueryExclusions
]; ];
if (augmentedConfig["query-filters"]?.length === 0) { if (augmentedConfig["query-filters"]?.length === 0) {
delete augmentedConfig["query-filters"]; delete augmentedConfig["query-filters"];
@@ -89473,7 +89507,7 @@ var toolcache3 = __toESM(require_tool_cache());
var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver7 = __toESM(require_semver2()); var semver7 = __toESM(require_semver2());
// node_modules/uuid/dist/esm/stringify.js // node_modules/uuid/dist-node/stringify.js
var byteToHex = []; var byteToHex = [];
for (let i = 0; i < 256; ++i) { for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).slice(1)); byteToHex.push((i + 256).toString(16).slice(1));
@@ -89482,27 +89516,24 @@ function unsafeStringify(arr, offset = 0) {
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
} }
// node_modules/uuid/dist/esm/rng.js // node_modules/uuid/dist-node/rng.js
var import_crypto = require("crypto"); var import_node_crypto = require("node:crypto");
var rnds8Pool = new Uint8Array(256); var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length; var poolPtr = rnds8Pool.length;
function rng() { function rng() {
if (poolPtr > rnds8Pool.length - 16) { if (poolPtr > rnds8Pool.length - 16) {
(0, import_crypto.randomFillSync)(rnds8Pool); (0, import_node_crypto.randomFillSync)(rnds8Pool);
poolPtr = 0; poolPtr = 0;
} }
return rnds8Pool.slice(poolPtr, poolPtr += 16); return rnds8Pool.slice(poolPtr, poolPtr += 16);
} }
// node_modules/uuid/dist/esm/native.js // node_modules/uuid/dist-node/native.js
var import_crypto2 = require("crypto"); var import_node_crypto2 = require("node:crypto");
var native_default = { randomUUID: import_crypto2.randomUUID }; var native_default = { randomUUID: import_node_crypto2.randomUUID };
// node_modules/uuid/dist/esm/v4.js // node_modules/uuid/dist-node/v4.js
function v4(options, buf, offset) { function _v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
options = options || {}; options = options || {};
const rnds = options.random ?? options.rng?.() ?? rng(); const rnds = options.random ?? options.rng?.() ?? rng();
if (rnds.length < 16) { if (rnds.length < 16) {
@@ -89522,6 +89553,12 @@ function v4(options, buf, offset) {
} }
return unsafeStringify(rnds); return unsafeStringify(rnds);
} }
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options) {
return native_default.randomUUID();
}
return _v4(options, buf, offset);
}
var v4_default = v4; var v4_default = v4;
// src/tar.ts // src/tar.ts
@@ -89838,7 +89875,10 @@ function sanitizeUrlForStatusReport(url2) {
// src/setup-codeql.ts // src/setup-codeql.ts
var CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action"; var CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action";
var CODEQL_NIGHTLIES_REPOSITORY_OWNER = "dsp-testing";
var CODEQL_NIGHTLIES_REPOSITORY_NAME = "codeql-cli-nightlies";
var CODEQL_BUNDLE_VERSION_ALIAS = ["linked", "latest"]; var CODEQL_BUNDLE_VERSION_ALIAS = ["linked", "latest"];
var CODEQL_NIGHTLY_TOOLS_INPUTS = ["nightly", "nightly-latest"];
function getCodeQLBundleExtension(compressionMethod) { function getCodeQLBundleExtension(compressionMethod) {
switch (compressionMethod) { switch (compressionMethod) {
case "gzip": case "gzip":
@@ -89981,7 +90021,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
return void 0; return void 0;
} }
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) { async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
if (toolsInput && !CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput) && !toolsInput.startsWith("http")) { if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
logger.info(`Using CodeQL CLI from local path ${toolsInput}`); logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
const compressionMethod2 = inferCompressionMethod(toolsInput); const compressionMethod2 = inferCompressionMethod(toolsInput);
if (compressionMethod2 === void 0) { if (compressionMethod2 === void 0) {
@@ -90010,6 +90050,12 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
let cliVersion2; let cliVersion2;
let tagName; let tagName;
let url2; let url2;
if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) {
logger.info(
`Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
);
toolsInput = await getNightlyToolsUrl(logger);
}
if (forceShippedTools) { if (forceShippedTools) {
cliVersion2 = cliVersion; cliVersion2 = cliVersion;
tagName = bundleVersion; tagName = bundleVersion;
@@ -90162,11 +90208,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0; let authorization = void 0;
if (searchParams.has("token")) { if (searchParams.has("token")) {
logger.debug("CodeQL tools URL contains an authorization token."); logger.debug("CodeQL tools URL contains an authorization token.");
} else if (codeqlURL.startsWith(`${apiDetails.url}/`) || apiDetails.apiURL && codeqlURL.startsWith(`${apiDetails.apiURL}/`)) {
logger.debug("Providing an authorization token to download CodeQL tools.");
authorization = `token ${apiDetails.auth}`;
} else { } else {
logger.debug("Downloading CodeQL tools without an authorization token."); authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
} }
const toolcacheInfo = getToolcacheDestinationInfo( const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion, maybeBundleVersion,
@@ -90293,6 +90340,34 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) {
function getTempExtractionDir(tempDir) { function getTempExtractionDir(tempDir) {
return path11.join(tempDir, v4_default()); return path11.join(tempDir, v4_default());
} }
async function getNightlyToolsUrl(logger) {
const zstdAvailability = await isZstdAvailable(logger);
const compressionMethod = await useZstdBundle(
CODEQL_VERSION_ZSTD_BUNDLE,
zstdAvailability.available
) ? "zstd" : "gzip";
try {
const release = await getApiClient().rest.repos.listReleases({
owner: CODEQL_NIGHTLIES_REPOSITORY_OWNER,
repo: CODEQL_NIGHTLIES_REPOSITORY_NAME,
per_page: 1,
page: 1,
prerelease: true
});
const latestRelease = release.data[0];
if (!latestRelease) {
throw new Error("Could not find the latest nightly release.");
}
return `https://github.com/${CODEQL_NIGHTLIES_REPOSITORY_OWNER}/${CODEQL_NIGHTLIES_REPOSITORY_NAME}/releases/download/${latestRelease.tag_name}/${getCodeQLBundleName(compressionMethod)}`;
} catch (e) {
throw new Error(
`Failed to retrieve the latest nightly release: ${wrapError(e)}`
);
}
}
function isReservedToolsValue(tools) {
return CODEQL_BUNDLE_VERSION_ALIAS.includes(tools) || CODEQL_NIGHTLY_TOOLS_INPUTS.includes(tools);
}
// src/tracer-config.ts // src/tracer-config.ts
async function shouldEnableIndirectTracing(codeql, config) { async function shouldEnableIndirectTracing(codeql, config) {
@@ -90435,7 +90510,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
await this.getVersion(), await this.getVersion(),
"forceOverwrite" /* ForceOverwrite */ "forceOverwrite" /* ForceOverwrite */
) ? "--force-overwrite" : "--overwrite"; ) ? "--force-overwrite" : "--overwrite";
const overlayDatabaseMode = config.augmentationProperties.overlayDatabaseMode; const overlayDatabaseMode = config.overlayDatabaseMode;
if (overlayDatabaseMode === "overlay" /* Overlay */) { if (overlayDatabaseMode === "overlay" /* Overlay */) {
const overlayChangesFile = await writeOverlayChangesFile( const overlayChangesFile = await writeOverlayChangesFile(
config, config,
@@ -90546,13 +90621,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
); );
} }
}, },
async betterResolveLanguages() { async betterResolveLanguages({
filterToLanguagesWithQueries
} = { filterToLanguagesWithQueries: false }) {
const codeqlArgs = [ const codeqlArgs = [
"resolve", "resolve",
"languages", "languages",
"--format=betterjson", "--format=betterjson",
"--extractor-options-verbosity=4", "--extractor-options-verbosity=4",
"--extractor-include-aliases", "--extractor-include-aliases",
...filterToLanguagesWithQueries ? ["--filter-to-languages-with-queries"] : [],
...getExtraOptionsFromEnv(["resolve", "languages"]) ...getExtraOptionsFromEnv(["resolve", "languages"])
]; ];
const output = await runCli(cmd, codeqlArgs); const output = await runCli(cmd, codeqlArgs);
@@ -90591,7 +90669,6 @@ ${output}`
"run-queries", "run-queries",
...flags, ...flags,
databasePath, databasePath,
"--intra-layer-parallelism",
"--min-disk-free=1024", "--min-disk-free=1024",
// Try to leave at least 1GB free // Try to leave at least 1GB free
"-v", "-v",
@@ -90849,9 +90926,9 @@ async function runCli(cmd, args = [], opts = {}) {
} }
async function writeCodeScanningConfigFile(config, logger) { async function writeCodeScanningConfigFile(config, logger) {
const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config); const codeScanningConfigFile = getGeneratedCodeScanningConfigPath(config);
const augmentedConfig = generateCodeScanningConfig( const augmentedConfig = appendExtraQueryExclusions(
config.originalUserInput, config.extraQueryExclusions,
config.augmentationProperties config.computedConfig
); );
logger.info( logger.info(
`Writing augmented user configuration file to ${codeScanningConfigFile}` `Writing augmented user configuration file to ${codeScanningConfigFile}`
@@ -92219,7 +92296,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
return JSON.parse(fs13.readFileSync(outputFile, "utf8")); return JSON.parse(fs13.readFileSync(outputFile, "utf8"));
} }
function populateRunAutomationDetails(sarif, category, analysis_key, environment) { function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
const automationID = getAutomationID(category, analysis_key, environment); const automationID = getAutomationID2(category, analysis_key, environment);
if (automationID !== void 0) { if (automationID !== void 0) {
for (const run of sarif.runs || []) { for (const run of sarif.runs || []) {
if (run.automationDetails === void 0) { if (run.automationDetails === void 0) {
@@ -92232,7 +92309,7 @@ function populateRunAutomationDetails(sarif, category, analysis_key, environment
} }
return sarif; return sarif;
} }
function getAutomationID(category, analysis_key, environment) { function getAutomationID2(category, analysis_key, environment) {
if (category !== void 0) { if (category !== void 0) {
let automationID = category; let automationID = category;
if (!automationID.endsWith("/")) { if (!automationID.endsWith("/")) {
@@ -92242,11 +92319,6 @@ function getAutomationID(category, analysis_key, environment) {
} }
return computeAutomationID(analysis_key, environment); return computeAutomationID(analysis_key, environment);
} }
var SARIF_UPLOAD_ENDPOINT = /* @__PURE__ */ ((SARIF_UPLOAD_ENDPOINT2) => {
SARIF_UPLOAD_ENDPOINT2["CODE_SCANNING"] = "PUT /repos/:owner/:repo/code-scanning/analysis";
SARIF_UPLOAD_ENDPOINT2["CODE_QUALITY"] = "PUT /repos/:owner/:repo/code-quality/analysis";
return SARIF_UPLOAD_ENDPOINT2;
})(SARIF_UPLOAD_ENDPOINT || {});
async function uploadPayload(payload, repositoryNwo, logger, target) { async function uploadPayload(payload, repositoryNwo, logger, target) {
logger.info("Uploading results"); logger.info("Uploading results");
if (isInTestMode()) { if (isInTestMode()) {
@@ -92415,18 +92487,6 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
} }
return payloadObj; return payloadObj;
} }
var CodeScanningTarget = {
name: "code scanning",
target: "PUT /repos/:owner/:repo/code-scanning/analysis" /* CODE_SCANNING */,
sarifPredicate: (name) => name.endsWith(".sarif") && !CodeQualityTarget.sarifPredicate(name),
sentinelPrefix: "CODEQL_UPLOAD_SARIF_"
};
var CodeQualityTarget = {
name: "code quality",
target: "PUT /repos/:owner/:repo/code-quality/analysis" /* CODE_QUALITY */,
sarifPredicate: (name) => name.endsWith(".quality.sarif"),
sentinelPrefix: "CODEQL_UPLOAD_QUALITY_SARIF_"
};
async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) { async function uploadFiles(inputSarifPath, checkoutPath, category, features, logger, uploadTarget) {
const sarifPaths = getSarifFilePaths( const sarifPaths = getSarifFilePaths(
inputSarifPath, inputSarifPath,
@@ -92441,7 +92501,7 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
uploadTarget uploadTarget
); );
} }
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget = CodeScanningTarget) { async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`); logger.startGroup(`Uploading ${uploadTarget.name} results`);
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`); logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion(); const gitHubVersion = await getGitHubVersion();
@@ -92478,6 +92538,10 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
validateUniqueCategory(sarif, uploadTarget.sentinelPrefix); validateUniqueCategory(sarif, uploadTarget.sentinelPrefix);
logger.debug(`Serializing SARIF for upload`); logger.debug(`Serializing SARIF for upload`);
const sarifPayload = JSON.stringify(sarif); const sarifPayload = JSON.stringify(sarif);
const dumpDir = process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (dumpDir) {
dumpSarifFile(sarifPayload, dumpDir, logger, uploadTarget);
}
logger.debug(`Compressing serialized SARIF`); logger.debug(`Compressing serialized SARIF`);
const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64");
const checkoutURI = url.pathToFileURL(checkoutPath).href; const checkoutURI = url.pathToFileURL(checkoutPath).href;
@@ -92516,6 +92580,21 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
sarifID sarifID
}; };
} }
function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) {
if (!fs13.existsSync(outputDir)) {
fs13.mkdirSync(outputDir, { recursive: true });
} else if (!fs13.lstatSync(outputDir).isDirectory()) {
throw new ConfigurationError(
`The path specified by the ${"CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */} environment variable exists and is not a directory: ${outputDir}`
);
}
const outputFile = path14.resolve(
outputDir,
`upload${uploadTarget.sarifExtension}`
);
logger.info(`Dumping processed SARIF file to ${outputFile}`);
fs13.writeFileSync(outputFile, sarifPayload);
}
var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3; var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3;
var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3; var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3;
async function waitForProcessing(repositoryNwo, sarifID, logger, options = { async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
@@ -92612,7 +92691,7 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
assertNever(status); assertNever(status);
} }
} }
function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.sentinelPrefix) { function validateUniqueCategory(sarif, sentinelPrefix) {
const categories = {}; const categories = {};
for (const run of sarif.runs) { for (const run of sarif.runs) {
const id = run?.automationDetails?.id; const id = run?.automationDetails?.id;
@@ -92669,10 +92748,7 @@ function filterAlertsByDiffRange(logger, sarif) {
} }
// Annotate the CommonJS export names for ESM import in node: // Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = { 0 && (module.exports = {
CodeQualityTarget,
CodeScanningTarget,
InvalidSarifUploadError, InvalidSarifUploadError,
SARIF_UPLOAD_ENDPOINT,
buildPayload, buildPayload,
findSarifFilesInDir, findSarifFilesInDir,
getSarifFilePaths, getSarifFilePaths,

View File

@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push( result.push(
encodeValue(operator, value2, isKeyOperator(operator) ? key : "") encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
); );
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -26438,7 +26438,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) { "package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "codeql", name: "codeql",
version: "3.30.1", version: "3.30.4",
private: true, private: true,
description: "CodeQL action", description: "CodeQL action",
scripts: { scripts: {
@@ -26447,7 +26447,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .", 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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/**.test.ts --serial --verbose", test: "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose" transpile: "tsc --build --verbose"
}, },
@@ -26463,7 +26463,7 @@ var require_package = __commonJS({
dependencies: { dependencies: {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -26486,29 +26486,27 @@ var require_package = __commonJS({
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
octokit: "^5.0.3", octokit: "^5.0.3",
semver: "^7.7.2", semver: "^7.7.2",
uuid: "^11.1.0" uuid: "^13.0.0"
}, },
devDependencies: { devDependencies: {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1", ava: "^6.4.1",
esbuild: "^0.25.9", esbuild: "^0.25.10",
eslint: "^8.57.1", eslint: "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -26538,7 +26536,8 @@ var require_package = __commonJS({
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
semver: ">=6.3.1" semver: ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
}; };
} }
@@ -35660,14 +35659,14 @@ var require_typeGuards = __commonJS({
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
"use strict"; "use strict";
Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isDefined = isDefined; exports2.isDefined = isDefined2;
exports2.isObjectWithProperties = isObjectWithProperties; exports2.isObjectWithProperties = isObjectWithProperties;
exports2.objectHasProperty = objectHasProperty; exports2.objectHasProperty = objectHasProperty;
function isDefined(thing) { function isDefined2(thing) {
return typeof thing !== "undefined" && thing !== null; return typeof thing !== "undefined" && thing !== null;
} }
function isObjectWithProperties(thing, properties) { function isObjectWithProperties(thing, properties) {
if (!isDefined(thing) || typeof thing !== "object") { if (!isDefined2(thing) || typeof thing !== "object") {
return false; return false;
} }
for (const property of properties) { for (const property of properties) {
@@ -35678,7 +35677,7 @@ var require_typeGuards = __commonJS({
return true; return true;
} }
function objectHasProperty(thing, property) { function objectHasProperty(thing, property) {
return isDefined(thing) && typeof thing === "object" && property in thing; return isDefined2(thing) && typeof thing === "object" && property in thing;
} }
} }
}); });
@@ -70469,7 +70468,7 @@ var require_brace_expansion = __commonJS({
var isSequence = isNumericSequence || isAlphaSequence; var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(",") >= 0; var isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions) { if (!isSequence && !isOptions) {
if (m.post.match(/,.*\}/)) { if (m.post.match(/,(?!,).*\}/)) {
str2 = m.pre + "{" + m.body + escClose + m.post; str2 = m.pre + "{" + m.body + escClose + m.post;
return expand(str2); return expand(str2);
} }
@@ -95694,7 +95693,7 @@ var require_dist_node16 = __commonJS({
return value; return value;
} }
} }
function isDefined(value) { function isDefined2(value) {
return value !== void 0 && value !== null; return value !== void 0 && value !== null;
} }
function isKeyOperator(operator) { function isKeyOperator(operator) {
@@ -95702,7 +95701,7 @@ var require_dist_node16 = __commonJS({
} }
function getValues(context2, operator, key, modifier) { function getValues(context2, operator, key, modifier) {
var value = context2[key], result = []; var value = context2[key], result = [];
if (isDefined(value) && value !== "") { if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString(); value = value.toString();
if (modifier && modifier !== "*") { if (modifier && modifier !== "*") {
@@ -95712,12 +95711,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
if (modifier === "*") { if (modifier === "*") {
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : "")); result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
result.push(encodeValue(operator, value[k], k)); result.push(encodeValue(operator, value[k], k));
} }
}); });
@@ -95725,12 +95724,12 @@ var require_dist_node16 = __commonJS({
} else { } else {
const tmp = []; const tmp = [];
if (Array.isArray(value)) { if (Array.isArray(value)) {
value.filter(isDefined).forEach(function(value2) { value.filter(isDefined2).forEach(function(value2) {
tmp.push(encodeValue(operator, value2)); tmp.push(encodeValue(operator, value2));
}); });
} else { } else {
Object.keys(value).forEach(function(k) { Object.keys(value).forEach(function(k) {
if (isDefined(value[k])) { if (isDefined2(value[k])) {
tmp.push(encodeUnreserved(k)); tmp.push(encodeUnreserved(k));
tmp.push(encodeValue(operator, value[k].toString())); tmp.push(encodeValue(operator, value[k].toString()));
} }
@@ -95745,7 +95744,7 @@ var require_dist_node16 = __commonJS({
} }
} else { } else {
if (operator === ";") { if (operator === ";") {
if (isDefined(value)) { if (isDefined2(value)) {
result.push(encodeUnreserved(key)); result.push(encodeUnreserved(key));
} }
} else if (value === "" && (operator === "&" || operator === "?")) { } else if (value === "" && (operator === "&" || operator === "?")) {
@@ -109985,7 +109984,7 @@ var require_package3 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "4.0.5", version: "4.1.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -110568,11 +110567,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 9 T: 9
/*ScalarType.STRING*/ /*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110591,6 +110597,10 @@ var require_cache2 = __commonJS({
2: 2:
message.signedUploadUrl = reader.string(); message.signedUploadUrl = reader.string();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -110607,6 +110617,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "") if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -110712,11 +110724,18 @@ var require_cache2 = __commonJS({
kind: "scalar", kind: "scalar",
T: 3 T: 3
/*ScalarType.INT64*/ /*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
} }
]); ]);
} }
create(value) { 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 }); globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0) if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value); (0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110735,6 +110754,10 @@ var require_cache2 = __commonJS({
2: 2:
message.entryId = reader.int64().toString(); message.entryId = reader.int64().toString();
break; break;
case /* string message */
3:
message.message = reader.string();
break;
default: default:
let u = options.readUnknownField; let u = options.readUnknownField;
if (u === "throw") if (u === "throw")
@@ -110751,6 +110774,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0") if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); 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; let u = options.writeUnknownFields;
if (u !== false) if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -111514,7 +111539,7 @@ var require_cache3 = __commonJS({
}); });
}; };
Object.defineProperty(exports2, "__esModule", { value: true }); 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 core14 = __importStar4(require_core());
var path2 = __importStar4(require("path")); var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils()); var utils = __importStar4(require_cacheUtils());
@@ -111522,7 +111547,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config2(); var config_1 = require_config2();
var tar_1 = require_tar2(); var tar_1 = require_tar2();
var constants_1 = require_constants10();
var http_client_1 = require_lib(); var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error { var ValidationError = class _ValidationError extends Error {
constructor(message) { constructor(message) {
@@ -111540,6 +111564,14 @@ var require_cache3 = __commonJS({
} }
}; };
exports2.ReserveCacheError = ReserveCacheError2; 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) { function checkPaths(paths) {
if (!paths || paths.length === 0) { if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -111811,9 +111843,6 @@ var require_cache3 = __commonJS({
} }
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`); 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; options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache"); core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -111825,7 +111854,10 @@ var require_cache3 = __commonJS({
try { try {
const response = yield twirpClient.CreateCacheEntry(request); const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) { 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; signedUploadUrl = response.signedUploadUrl;
} catch (error2) { } catch (error2) {
@@ -111842,6 +111874,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!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.`); throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
} }
cacheId = parseInt(finalizeResponse.entryId); cacheId = parseInt(finalizeResponse.entryId);
@@ -111851,6 +111886,8 @@ var require_cache3 = __commonJS({
throw error2; throw error2;
} else if (typedError.name === ReserveCacheError2.name) { } else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`); core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else { } else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`); core14.error(`Failed to save: ${typedError.message}`);
@@ -117288,14 +117325,20 @@ var cliErrorsConfig = {
} }
}; };
// src/config-utils.ts
var semver4 = __toESM(require_semver2());
// src/caching-utils.ts // src/caching-utils.ts
var core6 = __toESM(require_core()); var core6 = __toESM(require_core());
// src/config/db-config.ts
var semver2 = __toESM(require_semver2());
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/feature-flags.ts // src/feature-flags.ts
var semver3 = __toESM(require_semver2()); var semver4 = __toESM(require_semver2());
// src/overlay-database-utils.ts // src/overlay-database-utils.ts
var actionsCache = __toESM(require_cache3()); var actionsCache = __toESM(require_cache3());
@@ -117320,15 +117363,15 @@ function withGroup(groupName, f) {
} }
// src/overlay-database-utils.ts // 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 = 6e3; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
// src/tools-features.ts // src/tools-features.ts
var semver2 = __toESM(require_semver2()); var semver3 = __toESM(require_semver2());
var SafeArtifactUploadVersion = "2.20.3"; var SafeArtifactUploadVersion = "2.20.3";
function isSafeArtifactUpload(codeQlVersion) { function isSafeArtifactUpload(codeQlVersion) {
return !codeQlVersion ? true : semver2.gte(codeQlVersion, SafeArtifactUploadVersion); return !codeQlVersion ? true : semver3.gte(codeQlVersion, SafeArtifactUploadVersion);
} }
// src/feature-flags.ts // src/feature-flags.ts
@@ -117372,6 +117415,12 @@ var featureConfig = {
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
}, },
["resolve_supported_languages_using_cli" /* ResolveSupportedLanguagesUsingCli */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI",
minimumVersion: void 0,
toolsFeature: "builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
},
["overlay_analysis" /* OverlayAnalysis */]: { ["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS", envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -117483,11 +117532,21 @@ var featureConfig = {
minimumVersion: void 0, minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */ toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
}, },
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false, defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY", envVar: "CODEQL_ACTION_QA_TELEMETRY",
legacyApi: true, legacyApi: true,
minimumVersion: void 0 minimumVersion: void 0
},
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
minimumVersion: "2.23.0"
} }
}; };
@@ -117495,15 +117554,6 @@ var featureConfig = {
var actionsCache2 = __toESM(require_cache3()); var actionsCache2 = __toESM(require_cache3());
// src/config-utils.ts // src/config-utils.ts
var defaultAugmentationProperties = {
queriesInputCombines: false,
packsInputCombines: false,
packsInput: void 0,
queriesInput: void 0,
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
};
var OVERLAY_ANALYSIS_FEATURES = { var OVERLAY_ANALYSIS_FEATURES = {
actions: "overlay_analysis_actions" /* OverlayAnalysisActions */, actions: "overlay_analysis_actions" /* OverlayAnalysisActions */,
cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */, cpp: "overlay_analysis_cpp" /* OverlayAnalysisCpp */,
@@ -117528,12 +117578,6 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = {
rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */, rust: "overlay_analysis_code_scanning_rust" /* OverlayAnalysisCodeScanningRust */,
swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */
}; };
var PACK_IDENTIFIER_PATTERN = (function() {
const alphaNumeric = "[a-z0-9]";
const alphaNumericDash = "[a-z0-9-]";
const component = `${alphaNumeric}(${alphaNumericDash}*${alphaNumeric})?`;
return new RegExp(`^${component}/${component}$`);
})();
// src/setup-codeql.ts // src/setup-codeql.ts
var toolcache3 = __toESM(require_tool_cache()); var toolcache3 = __toESM(require_tool_cache());

File diff suppressed because it is too large Load Diff

719
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "codeql", "name": "codeql",
"version": "3.30.1", "version": "3.30.4",
"private": true, "private": true,
"description": "CodeQL action", "description": "CodeQL action",
"scripts": { "scripts": {
@@ -9,7 +9,7 @@
"lint": "eslint --report-unused-disable-directives --max-warnings=0 .", "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-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", "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
"test": "npm run transpile && ava src/**.test.ts --serial --verbose", "test": "npm run transpile && ava src/ --serial --verbose",
"test-debug": "npm run test -- --timeout=20m", "test-debug": "npm run test -- --timeout=20m",
"transpile": "tsc --build --verbose" "transpile": "tsc --build --verbose"
}, },
@@ -25,7 +25,7 @@
"dependencies": { "dependencies": {
"@actions/artifact": "^2.3.1", "@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@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/core": "^1.11.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
@@ -48,29 +48,27 @@
"node-forge": "^1.3.1", "node-forge": "^1.3.1",
"octokit": "^5.0.3", "octokit": "^5.0.3",
"semver": "^7.7.2", "semver": "^7.7.2",
"uuid": "^11.1.0" "uuid": "^13.0.0"
}, },
"devDependencies": { "devDependencies": {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2", "@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1", "@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.34.0", "@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0", "@microsoft/eslint-formatter-sarif": "^3.1.0",
"@octokit/types": "^14.1.0", "@octokit/types": "^15.0.0",
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/console-log-level": "^1.4.5", "@types/console-log-level": "^1.4.5",
"@types/follow-redirects": "^1.14.4", "@types/follow-redirects": "^1.14.4",
"@types/get-folder-size": "^3.0.4",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "20.19.9", "@types/node": "20.19.9",
"@types/node-forge": "^1.3.14", "@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4", "@types/sinon": "^17.0.4",
"@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0", "@typescript-eslint/parser": "^8.41.0",
"ava": "^6.4.1", "ava": "^6.4.1",
"esbuild": "^0.25.9", "esbuild": "^0.25.10",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-import-resolver-typescript": "^3.8.7", "eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-filenames": "^1.3.2", "eslint-plugin-filenames": "^1.3.2",
@@ -100,6 +98,7 @@
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
"semver": ">=6.3.1" "semver": ">=6.3.1"
} },
"brace-expansion@2.0.1": "2.0.2"
} }
} }

View File

@@ -1 +1,3 @@
env env
__pycache__/
*.pyc

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