Compare commits

...

120 Commits

Author SHA1 Message Date
Michael B. Gale
3599b3baa1 Merge pull request #3161 from github/update-v3.30.5-0a67bd46a
Merge main into releases/v3
2025-09-26 18:30:21 +01:00
github-actions[bot]
2ca0085e58 Update changelog for v3.30.5 2025-09-26 17:09:07 +00:00
Michael B. Gale
0a67bd46a0 Merge pull request #3160 from github/mbg/fix/upload-sarif
Hotfix `upload-sarif` not uploading non-`.sarif` files
2025-09-26 18:06:08 +01:00
Michael B. Gale
8e34f2f3bf Add changelog 2025-09-26 17:52:17 +01:00
Michael B. Gale
0b7fc56648 Fix upload-sarif not uploading non-.sarif files 2025-09-26 17:47:59 +01:00
Michael B. Gale
94a9b7a110 Merge pull request #3155 from github/mbg/node/no-install-in-actions
Don't run `npm install` when in an Actions workflow
2025-09-25 22:47:04 +01:00
Michael B. Gale
a0ae9ba202 Log what the script is doing 2025-09-25 20:25:59 +01:00
Michael B. Gale
b27a8ef21f Exit if running in an Actions workflow 2025-09-25 20:25:59 +01:00
Henry Mercer
65925679a3 Merge pull request #3139 from github/henrymercer/fix-log-message
Fix `tools: linked` log message
2025-09-25 16:48:44 +01:00
Michael B. Gale
fa64a7dee6 Merge pull request #3154 from github/mbg/node/check-up-to-date-deps
Add script to check whether `npm i` needs to be run
2025-09-25 15:04:03 +01:00
Michael B. Gale
455038c8a7 Add script to check whether npm i needs to be run
and add it to the `build` command
2025-09-25 14:45:55 +01:00
Michael B. Gale
853decd26b Merge pull request #3152 from github/mbg/node/individual-test-cmd
Add `npm run ava` command, update instructions, and exclude files from VSCode search
2025-09-25 14:42:35 +01:00
Michael B. Gale
48be21c31e Use npm run ava in justfile 2025-09-25 14:22:38 +01:00
Michael B. Gale
77a9259761 Exclude transpiled code and dependencies from VSCode search 2025-09-25 14:22:38 +01:00
Michael B. Gale
e2e1db3e4e Update CONTRIBUTING.md with npm run ava 2025-09-25 14:22:38 +01:00
Michael B. Gale
a645d167d6 Add npm run ava command (for ava without a specific path) 2025-09-25 14:22:38 +01:00
Michael B. Gale
8fca38155e Merge pull request #3153 from github/mbg/ci/improve-unit-tests
Improve `pr-checks` workflow
2025-09-25 14:21:26 +01:00
Michael B. Gale
4e65cda8c2 Add generated workflow diff to job summary if changed 2025-09-25 13:30:00 +01:00
Michael B. Gale
b4db1860cd Reset working directory before failing in check-js.sh 2025-09-25 13:27:45 +01:00
Michael B. Gale
9cf3a96f63 Add transpiled JS to job summary if changed 2025-09-25 13:27:39 +01:00
Michael B. Gale
6a72568b19 Run more checks in unit-tests job, even when previous checks failed 2025-09-25 13:27:32 +01:00
Henry Mercer
b1d32cf356 Merge branch 'main' into henrymercer/fix-log-message 2025-09-25 13:06:54 +01:00
Henry Mercer
5235174f0e Merge pull request #3137 from github/henrymercer/slim-pr-checks
Only run PR checks on Ubuntu by default
2025-09-25 12:57:21 +01:00
Michael B. Gale
f3bf6463e1 Merge pull request #3151 from github/mbg/ci/rollback-test-triggers
Don't dry-run `rollback-release` workflow on release branches
2025-09-25 12:48:18 +01:00
Michael B. Gale
c5ce5e5d1c Don't dry-run rollback-release workflow on release branches 2025-09-25 12:12:42 +01:00
Henry Mercer
79dc6cc78c Merge pull request #3150 from github/mergeback/v3.30.4-to-main-303c0aef
Mergeback v3.30.4 refs/heads/releases/v3 into main
2025-09-25 12:08:26 +01:00
github-actions[bot]
4d32274da6 Rebuild 2025-09-25 10:50:17 +00:00
github-actions[bot]
0a3e31778d Update changelog and version after v3.30.4 2025-09-25 10:19:26 +00:00
Ian Lynagh
303c0aef88 Merge pull request #3149 from github/update-v3.30.4-e4b85ab65
Merge main into releases/v3
2025-09-25 11:18:49 +01:00
github-actions[bot]
333a673809 Update changelog for v3.30.4 2025-09-25 09:54:23 +00:00
Henry Mercer
5445d1a09c Merge branch 'main' into henrymercer/slim-pr-checks 2025-09-25 10:42:10 +01:00
Chuan-kai Lin
e4b85ab654 Merge pull request #3148 from github/cklin/just-test_file-serial
build: use --serial in 'just test_file'
2025-09-24 14:47:17 -07:00
Chuan-kai Lin
1e72556714 build: use --serial in 'just test_file'
Some tests require the --serial flag to pass.
2025-09-24 11:10:24 -07:00
Michael B. Gale
39842d8f83 Merge pull request #3146 from github/mbg/start-proxy/authenticate
Provide `Authorization` header when downloading `update-job-proxy`
2025-09-24 19:09:40 +01:00
Michael B. Gale
6ccec2ac14 Remove url from log messages 2025-09-24 18:54:49 +01:00
Henry Mercer
435f474d1e Merge pull request #3147 from github/dependabot/npm_and_yarn/npm-76d2ab1078
Bump @actions/cache from 4.0.5 to 4.1.0 in the npm group
2025-09-24 18:47:44 +01:00
Henry Mercer
a34e1cd60b Merge branch 'main' into henrymercer/slim-pr-checks 2025-09-24 19:29:32 +02:00
github-actions[bot]
f134e09015 Rebuild 2025-09-24 15:14:06 +00:00
dependabot[bot]
50a31df6ba Bump @actions/cache from 4.0.5 to 4.1.0 in the npm group
Bumps the npm group with 1 update: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache).


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

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

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


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

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

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

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

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


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

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

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

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


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

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

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

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
- name: Update git config
run: |
@@ -139,7 +139,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Generate token
uses: actions/create-github-app-token@v2.1.1
uses: actions/create-github-app-token@v2.1.4
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -15,6 +15,7 @@ defaults:
jobs:
unit-tests:
name: Unit Tests
if: github.triggering_actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
@@ -31,15 +32,15 @@ jobs:
run: git config --global core.autocrlf false
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20.x'
cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.11
@@ -54,13 +55,20 @@ jobs:
run: .github/workflows/script/check-js.sh
- name: Verify PR checks up to date
if: always()
run: .github/workflows/script/verify-pr-checks.sh
- name: Run unit tests
if: always()
run: npm test
- name: Run pr-checks tests
if: always()
working-directory: pr-checks
run: python -m unittest discover
- name: Lint
if: matrix.os != 'windows-latest'
if: always() && matrix.os != 'windows-latest'
run: npm run lint-ci
- name: Upload sarif
@@ -71,7 +79,7 @@ jobs:
category: eslint
check-node-version:
if: github.event.pull_request
if: github.event.pull_request && github.triggering_actor != 'dependabot[bot]'
name: Check Action Node versions
runs-on: ubuntu-latest
timeout-minutes: 45

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -39,7 +39,7 @@ jobs:
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
- name: Install Node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Checkout repository
uses: actions/checkout@v5

View File

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

View File

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

View File

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

View File

@@ -2,11 +2,16 @@
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.5 - 26 Sep 2025
- We fixed a bug that was introduced in `3.30.4` with `upload-sarif` which resulted in files without a `.sarif` extension not getting uploaded. [#3160](https://github.com/github/codeql-action/pull/3160)
## 3.30.4 - 25 Sep 2025
- We have improved the CodeQL Action's ability to validate that the workflow it is used in does not use different versions of the CodeQL Action for different workflow steps. Mixing different versions of the CodeQL Action in the same workflow is unsupported and can lead to unpredictable results. A warning will now be emitted from the `codeql-action/init` step if different versions of the CodeQL Action are detected in the workflow file. Additionally, an error will now be thrown by the other CodeQL Action steps if they load a configuration file that was generated by a different version of the `codeql-action/init` step. [#3099](https://github.com/github/codeql-action/pull/3099) and [#3100](https://github.com/github/codeql-action/pull/3100)
- We added support for reducing the size of dependency caches for Java analyses, which will reduce cache usage and speed up workflows. This will be enabled automatically at a later time. [#3107](https://github.com/github/codeql-action/pull/3107)
- You can now run the latest CodeQL nightly bundle by passing `tools: nightly` to the `init` action. In general, the nightly bundle is unstable and we only recommend running it when directed by GitHub staff. [#3130](https://github.com/github/codeql-action/pull/3130)
- Update default CodeQL bundle version to 2.23.1. [#3118](https://github.com/github/codeql-action/pull/3118)
## 3.30.3 - 10 Sep 2025

View File

@@ -20,6 +20,7 @@ Before you start, ensure that you have a recent version of node (16 or higher) i
* Transpile the TypeScript to JavaScript: `npm run build`. Note that the JavaScript files are committed to git.
* Run tests: `npm run test`. Youll need to ensure that the JavaScript files are up-to-date first by running the command above.
* Run the linter: `npm run lint`.
* Run tests for a specific path: `npm run ava -- ./src/filename.test.ts` or `npm run ava -- ./src/feature-flags/`
This project also includes configuration to run tests from VSCode (with support for breakpoints) - open the test file you wish to run and choose "Debug AVA test file" from the Run menu in the Run panel.

View File

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

View File

@@ -26438,16 +26438,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26463,7 +26464,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26490,7 +26491,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -26503,7 +26504,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -67282,7 +67283,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72091,11 +72092,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72114,6 +72122,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72130,6 +72142,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72235,11 +72249,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72258,6 +72279,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72274,6 +72299,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73037,7 +73064,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path6 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73045,7 +73072,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73063,6 +73089,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73334,9 +73368,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73348,7 +73379,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73365,6 +73399,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73374,6 +73411,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -117694,7 +117733,7 @@ function withGroup(groupName, f) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -117922,6 +117961,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

117
lib/analyze-action.js generated
View File

@@ -32287,16 +32287,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -32312,7 +32313,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -32339,7 +32340,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -32352,7 +32353,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -73131,7 +73132,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -77940,11 +77941,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -77963,6 +77971,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -77979,6 +77991,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78084,11 +78098,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -78107,6 +78128,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -78123,6 +78148,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78886,7 +78913,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core15 = __importStar4(require_core());
var path20 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -78894,7 +78921,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -78912,6 +78938,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -79183,9 +79217,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core15.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;
core15.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -79197,7 +79228,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core15.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -79214,6 +79248,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core15.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -79223,6 +79260,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core15.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core15.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core15.error(`Failed to save: ${typedError.message}`);
@@ -90198,6 +90237,14 @@ function getApiDetails() {
function getApiClient() {
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;
async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -90587,8 +90634,8 @@ var path8 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var crypto = __toESM(require("crypto"));
@@ -90819,7 +90866,7 @@ function formatDuration(durationMs) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -91156,6 +91203,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -92214,17 +92266,6 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
toolsVersion: "local"
};
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
}
let cliVersion2;
let tagName;
let url2;
@@ -92234,9 +92275,18 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
);
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
cliVersion2 = cliVersion;
tagName = bundleVersion;
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
} else if (toolsInput !== void 0) {
tagName = tryGetTagNameFromUrl(toolsInput, logger);
url2 = toolsInput;
@@ -92386,11 +92436,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0;
if (searchParams.has("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 {
logger.debug("Downloading CodeQL tools without an authorization token.");
authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
}
const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion,

View File

@@ -26438,16 +26438,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26463,7 +26464,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26490,7 +26491,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -26503,7 +26504,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -67282,7 +67283,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72091,11 +72092,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72114,6 +72122,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72130,6 +72142,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72235,11 +72249,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72258,6 +72279,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72274,6 +72299,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73037,7 +73064,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path7 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73045,7 +73072,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73063,6 +73089,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73334,9 +73368,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73348,7 +73379,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73365,6 +73399,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73374,6 +73411,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -78256,8 +78295,8 @@ var path3 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var fs2 = __toESM(require("fs"));
@@ -78434,7 +78473,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -78660,6 +78699,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

View File

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

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

@@ -32287,16 +32287,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -32312,7 +32313,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -32339,7 +32340,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -32352,7 +32353,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -73131,7 +73132,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -77940,11 +77941,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -77963,6 +77971,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -77979,6 +77991,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78084,11 +78098,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -78107,6 +78128,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -78123,6 +78148,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78886,7 +78913,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core18 = __importStar4(require_core());
var path19 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -78894,7 +78921,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -78912,6 +78938,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -79183,9 +79217,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core18.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;
core18.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -79197,7 +79228,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core18.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -79214,6 +79248,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core18.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -79223,6 +79260,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core18.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core18.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core18.error(`Failed to save: ${typedError.message}`);
@@ -128417,6 +128456,14 @@ function getApiDetails() {
function getApiClient() {
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;
async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -128793,8 +128840,8 @@ var path8 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var fs6 = __toESM(require("fs"));
@@ -129024,7 +129071,7 @@ function formatDuration(durationMs) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -129255,6 +129302,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -130157,17 +130209,6 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
toolsVersion: "local"
};
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
}
let cliVersion2;
let tagName;
let url2;
@@ -130177,9 +130218,18 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
);
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
cliVersion2 = cliVersion;
tagName = bundleVersion;
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
} else if (toolsInput !== void 0) {
tagName = tryGetTagNameFromUrl(toolsInput, logger);
url2 = toolsInput;
@@ -130329,11 +130379,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0;
if (searchParams.has("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 {
logger.debug("Downloading CodeQL tools without an authorization token.");
authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
}
const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion,

260
lib/init-action.js generated
View File

@@ -32287,16 +32287,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -32312,7 +32313,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -32339,7 +32340,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -32352,7 +32353,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -73131,7 +73132,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -77940,11 +77941,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -77963,6 +77971,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -77979,6 +77991,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78084,11 +78098,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -78107,6 +78128,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -78123,6 +78148,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78886,7 +78913,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path20 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -78894,7 +78921,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -78912,6 +78938,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -79183,9 +79217,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -79197,7 +79228,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -79214,6 +79248,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -79223,6 +79260,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -86053,6 +86092,14 @@ function getApiClient() {
function getApiClientWithExternalAuth(apiDetails) {
return createApiClientWithDetails(apiDetails, { allowExternal: true });
}
function getAuthorizationHeaderFor(logger, apiDetails, url) {
if (url.startsWith(`${apiDetails.url}/`) || apiDetails.apiURL && url.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;
async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -86128,6 +86175,12 @@ function computeAutomationID(analysis_key, environment) {
}
return automationID;
}
async function getRepositoryProperties(repositoryNwo) {
return getApiClient().request("GET /repos/:owner/:repo/properties/values", {
owner: repositoryNwo.owner,
repo: repositoryNwo.repo
});
}
// src/caching-utils.ts
var core6 = __toESM(require_core());
@@ -86223,6 +86276,9 @@ function getConfigFileFormatInvalidMessage(configFile) {
function getConfigFileDirectoryGivenMessage(configFile) {
return `The configuration file "${configFile}" looks like a directory, not a file`;
}
function getEmptyCombinesError() {
return `A '+' was used to specify that you want to add extra arguments to the configuration, but no extra arguments were specified. Please either remove the '+' or specify some extra arguments.`;
}
function getConfigFilePropertyError(configFile, property, error2) {
if (configFile === void 0) {
return `The workflow property "${property}" is invalid: ${error2}`;
@@ -86230,6 +86286,9 @@ function getConfigFilePropertyError(configFile, property, error2) {
return `The configuration file "${configFile}" is invalid: property "${property}" ${error2}`;
}
}
function getRepoPropertyError(propertyName, error2) {
return `The repository property "${propertyName}" is invalid: ${error2}`;
}
function getPacksStrInvalid(packStr, configFile) {
return configFile ? getConfigFilePropertyError(
configFile,
@@ -86244,6 +86303,52 @@ function getUnknownLanguagesError(languages) {
return `Did not recognize the following languages: ${languages.join(", ")}`;
}
// src/feature-flags/properties.ts
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
return RepositoryPropertyName2;
})(RepositoryPropertyName || {});
async function loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo) {
if (gitHubVersion.type === 1 /* GHES */) {
return {};
}
try {
const response = await getRepositoryProperties(repositoryNwo);
const remoteProperties = response.data;
if (!Array.isArray(remoteProperties)) {
throw new Error(
`Expected repository properties API to return an array, but got: ${JSON.stringify(response.data)}`
);
}
logger.debug(
`Retrieved ${remoteProperties.length} repository properties: ${remoteProperties.map((p) => p.property_name).join(", ")}`
);
const knownProperties = new Set(Object.values(RepositoryPropertyName));
const properties = {};
for (const property of remoteProperties) {
if (property.property_name === void 0) {
throw new Error(
`Expected property object to have a 'property_name', but got: ${JSON.stringify(property)}`
);
}
if (knownProperties.has(property.property_name)) {
properties[property.property_name] = property.value;
}
}
logger.debug("Loaded the following values for the repository properties:");
for (const [property, value] of Object.entries(properties).sort(
([nameA], [nameB]) => nameA.localeCompare(nameB)
)) {
logger.debug(` ${property}: ${value}`);
}
return properties;
} catch (e) {
throw new Error(
`Encountered an error while trying to determine repository properties: ${e}`
);
}
}
// src/config/db-config.ts
function shouldCombine(inputValue) {
return !!inputValue?.trim().startsWith("+");
@@ -86336,7 +86441,7 @@ function parsePacksFromInput(rawPacksInput, languages, packsInputCombines) {
}, [])
};
}
async function calculateAugmentation(rawPacksInput, rawQueriesInput, languages) {
async function calculateAugmentation(rawPacksInput, rawQueriesInput, repositoryProperties, languages) {
const packsInputCombines = shouldCombine(rawPacksInput);
const packsInput = parsePacksFromInput(
rawPacksInput,
@@ -86348,19 +86453,38 @@ async function calculateAugmentation(rawPacksInput, rawQueriesInput, languages)
rawQueriesInput,
queriesInputCombines
);
const repoExtraQueries = repositoryProperties["github-codeql-extra-queries" /* EXTRA_QUERIES */];
const repoExtraQueriesCombines = shouldCombine(repoExtraQueries);
const repoPropertyQueries = {
combines: repoExtraQueriesCombines,
input: parseQueriesFromInput(
repoExtraQueries,
repoExtraQueriesCombines,
new ConfigurationError(
getRepoPropertyError(
"github-codeql-extra-queries" /* EXTRA_QUERIES */,
getEmptyCombinesError()
)
)
)
};
return {
packsInputCombines,
packsInput: packsInput?.[languages[0]],
queriesInput,
queriesInputCombines
queriesInputCombines,
repoPropertyQueries
};
}
function parseQueriesFromInput(rawQueriesInput, queriesInputCombines) {
function parseQueriesFromInput(rawQueriesInput, queriesInputCombines, errorToThrow) {
if (!rawQueriesInput) {
return void 0;
}
const trimmedInput = queriesInputCombines ? rawQueriesInput.trim().slice(1).trim() : rawQueriesInput?.trim() ?? "";
if (queriesInputCombines && trimmedInput.length === 0) {
if (errorToThrow) {
throw errorToThrow;
}
throw new ConfigurationError(
getConfigFilePropertyError(
void 0,
@@ -86371,17 +86495,43 @@ function parseQueriesFromInput(rawQueriesInput, queriesInputCombines) {
}
return trimmedInput.split(",").map((query) => ({ uses: query.trim() }));
}
function generateCodeScanningConfig(originalUserInput, augmentationProperties) {
const augmentedConfig = cloneObject(originalUserInput);
if (augmentationProperties.queriesInput) {
if (augmentationProperties.queriesInputCombines) {
augmentedConfig.queries = (augmentedConfig.queries || []).concat(
augmentationProperties.queriesInput
function combineQueries(logger, config, augmentationProperties) {
const result = [];
if (augmentationProperties.repoPropertyQueries && augmentationProperties.repoPropertyQueries.input) {
logger.info(
`Found query configuration in the repository properties (${"github-codeql-extra-queries" /* EXTRA_QUERIES */}): ${augmentationProperties.repoPropertyQueries.input.map((q) => q.uses).join(", ")}`
);
if (!augmentationProperties.repoPropertyQueries.combines) {
logger.info(
`The queries configured in the repository properties don't allow combining with other query settings. Any queries configured elsewhere will be ignored.`
);
return augmentationProperties.repoPropertyQueries.input;
} else {
augmentedConfig.queries = augmentationProperties.queriesInput;
result.push(...augmentationProperties.repoPropertyQueries.input);
}
}
if (augmentationProperties.queriesInput) {
if (!augmentationProperties.queriesInputCombines) {
return result.concat(augmentationProperties.queriesInput);
} else {
result.push(...augmentationProperties.queriesInput);
}
}
if (config.queries) {
result.push(...config.queries);
}
return result;
}
function generateCodeScanningConfig(logger, originalUserInput, augmentationProperties) {
const augmentedConfig = cloneObject(originalUserInput);
augmentedConfig.queries = combineQueries(
logger,
augmentedConfig,
augmentationProperties
);
logger.debug(
`Combined queries: ${augmentedConfig.queries?.map((q) => q.uses).join(",")}`
);
if (augmentedConfig.queries?.length === 0) {
delete augmentedConfig.queries;
}
@@ -86413,8 +86563,8 @@ var path9 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var crypto = __toESM(require("crypto"));
@@ -86623,7 +86773,7 @@ function formatDuration(durationMs) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -86983,6 +87133,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -87523,6 +87678,7 @@ async function initActionState({
sourceRoot,
githubVersion,
features,
repositoryProperties,
logger
}, userConfig) {
const analysisKinds = await parseAnalysisKinds(analysisKindsInput);
@@ -87546,8 +87702,18 @@ async function initActionState({
const augmentationProperties = await calculateAugmentation(
packsInput,
queriesInput,
repositoryProperties,
languages
);
if (analysisKinds.length === 1 && analysisKinds.includes("code-quality" /* CodeQuality */) && augmentationProperties.repoPropertyQueries.input) {
logger.info(
`Ignoring queries configured in the repository properties, because query customisations are not supported for Code Quality analyses.`
);
augmentationProperties.repoPropertyQueries = {
combines: false,
input: void 0
};
}
const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(
trapCachingEnabled,
codeql,
@@ -87555,6 +87721,7 @@ async function initActionState({
logger
);
const computedConfig = generateCodeScanningConfig(
logger,
userConfig,
augmentationProperties
);
@@ -87577,7 +87744,8 @@ async function initActionState({
dependencyCachingEnabled: getCachingKind(dependencyCachingEnabled),
extraQueryExclusions: [],
overlayDatabaseMode: "none" /* None */,
useOverlayDatabaseCaching: false
useOverlayDatabaseCaching: false,
repositoryProperties
};
}
async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logger) {
@@ -88870,17 +89038,6 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
toolsVersion: "local"
};
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
}
let cliVersion2;
let tagName;
let url;
@@ -88890,9 +89047,18 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
);
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
cliVersion2 = cliVersion;
tagName = bundleVersion;
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
} else if (toolsInput !== void 0) {
tagName = tryGetTagNameFromUrl(toolsInput, logger);
url = toolsInput;
@@ -89042,11 +89208,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0;
if (searchParams.has("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 {
logger.debug("Downloading CodeQL tools without an authorization token.");
authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
}
const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion,
@@ -90451,6 +90618,10 @@ async function run() {
getTemporaryDirectory(),
logger
);
const enableRepoProps = await features.getValue(
"use_repository_properties" /* UseRepositoryProperties */
);
const repositoryProperties = enableRepoProps ? await loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo) : {};
const jobRunUuid = v4_default();
logger.info(`Job run UUID is ${jobRunUuid}.`);
core13.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid);
@@ -90550,6 +90721,7 @@ async function run() {
githubVersion: gitHubVersion,
apiDetails,
features,
repositoryProperties,
logger
});
await checkInstallPython311(config.languages, codeql);

View File

@@ -26438,16 +26438,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26463,7 +26464,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26490,7 +26491,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -26503,7 +26504,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -67282,7 +67283,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72091,11 +72092,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72114,6 +72122,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72130,6 +72142,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72235,11 +72249,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72258,6 +72279,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72274,6 +72299,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73037,7 +73064,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core13 = __importStar4(require_core());
var path5 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73045,7 +73072,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73063,6 +73089,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73334,9 +73368,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core13.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core13.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73348,7 +73379,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core13.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73365,6 +73399,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73374,6 +73411,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core13.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core13.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core13.error(`Failed to save: ${typedError.message}`);
@@ -78427,7 +78466,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -78651,6 +78690,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

View File

@@ -26438,16 +26438,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26463,7 +26464,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26490,7 +26491,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -26503,7 +26504,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -67282,7 +67283,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -72091,11 +72092,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72114,6 +72122,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72130,6 +72142,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -72235,11 +72249,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -72258,6 +72279,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -72274,6 +72299,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -73037,7 +73064,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -73045,7 +73072,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants7();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -73063,6 +73089,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -73334,9 +73368,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -73348,7 +73379,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -73365,6 +73399,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -73374,6 +73411,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -117166,7 +117205,7 @@ function getActionsLogger() {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
@@ -117331,6 +117370,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

View File

@@ -44966,16 +44966,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -44991,7 +44992,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -45018,7 +45019,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -45031,7 +45032,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -49356,17 +49357,8 @@ var persistInputs = function() {
core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
};
// src/logging.ts
var core5 = __toESM(require_core());
function getActionsLogger() {
return core5;
}
// src/start-proxy.ts
var core7 = __toESM(require_core());
// src/api-client.ts
var core6 = __toESM(require_core());
var core5 = __toESM(require_core());
var githubUtils = __toESM(require_utils4());
var retry = __toESM(require_dist_node15());
var import_console_log_level = __toESM(require_console_log_level());
@@ -49391,10 +49383,27 @@ function getApiDetails() {
function getApiClient() {
return createApiClientWithDetails(getApiDetails());
}
function getAuthorizationHeaderFor(logger, apiDetails, url) {
if (url.startsWith(`${apiDetails.url}/`) || apiDetails.apiURL && url.startsWith(`${apiDetails.apiURL}/`)) {
logger.debug(`Providing an authorization token.`);
return `token ${apiDetails.auth}`;
}
logger.debug(`Not using an authorization token.`);
return void 0;
}
// src/logging.ts
var core6 = __toESM(require_core());
function getActionsLogger() {
return core6;
}
// src/start-proxy.ts
var core7 = __toESM(require_core());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/languages.ts
var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => {
@@ -49682,7 +49691,20 @@ async function getProxyBinaryPath(logger) {
const proxyInfo = await getDownloadUrl(logger);
let proxyBin = toolcache.find(proxyFileName, proxyInfo.version);
if (!proxyBin) {
const temp = await toolcache.downloadTool(proxyInfo.url);
const apiDetails = getApiDetails();
const authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
proxyInfo.url
);
const temp = await toolcache.downloadTool(
proxyInfo.url,
void 0,
authorization,
{
accept: "application/octet-stream"
}
);
const extracted = await toolcache.extractTar(temp);
proxyBin = await toolcache.cacheDir(
extracted,

117
lib/upload-lib.js generated
View File

@@ -33584,16 +33584,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -33609,7 +33610,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -33636,7 +33637,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -33649,7 +33650,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -74428,7 +74429,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -79237,11 +79238,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -79260,6 +79268,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -79276,6 +79288,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -79381,11 +79395,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -79404,6 +79425,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -79420,6 +79445,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -80183,7 +80210,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core12 = __importStar4(require_core());
var path15 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -80191,7 +80218,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -80209,6 +80235,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -80480,9 +80514,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
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;
core12.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -80494,7 +80525,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core12.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -80511,6 +80545,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core12.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -80520,6 +80557,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core12.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core12.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core12.error(`Failed to save: ${typedError.message}`);
@@ -88544,6 +88583,14 @@ function getApiDetails() {
function getApiClient() {
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;
async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -88902,8 +88949,8 @@ var path8 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var fs5 = __toESM(require("fs"));
@@ -89122,7 +89169,7 @@ function formatDuration(durationMs) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -89347,6 +89394,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -89985,17 +90037,6 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
toolsVersion: "local"
};
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
}
let cliVersion2;
let tagName;
let url2;
@@ -90005,9 +90046,18 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
);
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
cliVersion2 = cliVersion;
tagName = bundleVersion;
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
} else if (toolsInput !== void 0) {
tagName = tryGetTagNameFromUrl(toolsInput, logger);
url2 = toolsInput;
@@ -90157,11 +90207,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0;
if (searchParams.has("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 {
logger.debug("Downloading CodeQL tools without an authorization token.");
authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
}
const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion,

View File

@@ -26438,16 +26438,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -26463,7 +26464,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -26490,7 +26491,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -26503,7 +26504,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -109984,7 +109985,7 @@ var require_package3 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -110567,11 +110568,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110590,6 +110598,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -110606,6 +110618,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -110711,11 +110725,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -110734,6 +110755,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -110750,6 +110775,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -111513,7 +111540,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path2 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -111521,7 +111548,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config2();
var tar_1 = require_tar2();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -111539,6 +111565,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError2;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -111810,9 +111844,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -111824,7 +111855,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -111841,6 +111875,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -111850,6 +111887,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError2.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -117325,7 +117364,7 @@ function withGroup(groupName, f) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
@@ -117494,6 +117533,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

View File

@@ -32287,16 +32287,17 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "3.30.4",
version: "3.30.5",
private: true,
description: "CodeQL action",
scripts: {
_build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
build: "npm run transpile && node build.mjs",
build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
test: "npm run transpile && ava src/ --serial --verbose",
ava: "npm run transpile && ava --serial --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
},
@@ -32312,7 +32313,7 @@ var require_package = __commonJS({
dependencies: {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -32339,7 +32340,7 @@ var require_package = __commonJS({
},
devDependencies: {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -32352,7 +32353,7 @@ var require_package = __commonJS({
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
ava: "^6.4.1",
esbuild: "^0.25.10",
@@ -73131,7 +73132,7 @@ var require_package2 = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/cache",
version: "4.0.5",
version: "4.1.0",
preview: true,
description: "Actions cache lib",
keywords: [
@@ -77940,11 +77941,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 9
/*ScalarType.STRING*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -77963,6 +77971,10 @@ var require_cache2 = __commonJS({
2:
message.signedUploadUrl = reader.string();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -77979,6 +77991,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78084,11 +78098,18 @@ var require_cache2 = __commonJS({
kind: "scalar",
T: 3
/*ScalarType.INT64*/
},
{
no: 3,
name: "message",
kind: "scalar",
T: 9
/*ScalarType.STRING*/
}
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== void 0)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -78107,6 +78128,10 @@ var require_cache2 = __commonJS({
2:
message.entryId = reader.int64().toString();
break;
case /* string message */
3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -78123,6 +78148,8 @@ var require_cache2 = __commonJS({
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -78886,7 +78913,7 @@ var require_cache3 = __commonJS({
});
};
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0;
exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0;
var core14 = __importStar4(require_core());
var path16 = __importStar4(require("path"));
var utils = __importStar4(require_cacheUtils());
@@ -78894,7 +78921,6 @@ var require_cache3 = __commonJS({
var cacheTwirpClient = __importStar4(require_cacheTwirpClient());
var config_1 = require_config();
var tar_1 = require_tar();
var constants_1 = require_constants10();
var http_client_1 = require_lib();
var ValidationError = class _ValidationError extends Error {
constructor(message) {
@@ -78912,6 +78938,14 @@ var require_cache3 = __commonJS({
}
};
exports2.ReserveCacheError = ReserveCacheError;
var FinalizeCacheError = class _FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = "FinalizeCacheError";
Object.setPrototypeOf(this, _FinalizeCacheError.prototype);
}
};
exports2.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -79183,9 +79217,6 @@ var require_cache3 = __commonJS({
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core14.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
options.archiveSizeBytes = archiveFileSize;
core14.debug("Reserving Cache");
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
@@ -79197,7 +79228,10 @@ var require_cache3 = __commonJS({
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error("Response was not ok");
if (response.message) {
core14.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || "Response was not ok");
}
signedUploadUrl = response.signedUploadUrl;
} catch (error2) {
@@ -79214,6 +79248,9 @@ var require_cache3 = __commonJS({
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -79223,6 +79260,8 @@ var require_cache3 = __commonJS({
throw error2;
} else if (typedError.name === ReserveCacheError.name) {
core14.info(`Failed to save: ${typedError.message}`);
} else if (typedError.name === FinalizeCacheError.name) {
core14.warning(typedError.message);
} else {
if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) {
core14.error(`Failed to save: ${typedError.message}`);
@@ -88796,6 +88835,14 @@ function getApiDetails() {
function getApiClient() {
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;
async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
@@ -88885,8 +88932,8 @@ var path8 = __toESM(require("path"));
var semver3 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.23.0";
var cliVersion = "2.23.0";
var bundleVersion = "codeql-bundle-v2.23.1";
var cliVersion = "2.23.1";
// src/overlay-database-utils.ts
var fs5 = __toESM(require("fs"));
@@ -89108,7 +89155,7 @@ function formatDuration(durationMs) {
}
// src/overlay-database-utils.ts
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.3";
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 15e3;
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
@@ -89335,6 +89382,11 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
},
["use_repository_properties" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",
@@ -90686,17 +90738,6 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
toolsVersion: "local"
};
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
}
let cliVersion2;
let tagName;
let url2;
@@ -90706,9 +90747,18 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
);
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
if (forceShippedTools) {
cliVersion2 = cliVersion;
tagName = bundleVersion;
logger.info(
`'tools: ${toolsInput}' was requested, so using CodeQL version ${cliVersion2}, the version shipped with the Action.`
);
if (toolsInput === "latest") {
logger.warning(
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required."
);
}
} else if (toolsInput !== void 0) {
tagName = tryGetTagNameFromUrl(toolsInput, logger);
url2 = toolsInput;
@@ -90858,11 +90908,12 @@ var downloadCodeQL = async function(codeqlURL, compressionMethod, maybeBundleVer
let authorization = void 0;
if (searchParams.has("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 {
logger.debug("Downloading CodeQL tools without an authorization token.");
authorization = getAuthorizationHeaderFor(
logger,
apiDetails,
codeqlURL
);
}
const toolcacheInfo = getToolcacheDestinationInfo(
maybeBundleVersion,
@@ -93373,7 +93424,7 @@ async function findAndUpload(logger, features, sarifPath, pathStats, checkoutPat
sarifPath,
analysis.sarifPredicate
);
} else if (pathStats.isFile() && analysis.sarifPredicate(sarifPath)) {
} else if (pathStats.isFile() && (analysis.sarifPredicate(sarifPath) || analysis.kind === "code-scanning" /* CodeScanning */ && !CodeQuality.sarifPredicate(sarifPath))) {
sarifFiles = [sarifPath];
} else {
return void 0;

247
package-lock.json generated
View File

@@ -1,17 +1,17 @@
{
"name": "codeql",
"version": "3.30.4",
"version": "3.30.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "3.30.4",
"version": "3.30.5",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -38,7 +38,7 @@
},
"devDependencies": {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -51,7 +51,7 @@
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
"ava": "^6.4.1",
"esbuild": "^0.25.10",
@@ -284,9 +284,9 @@
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg=="
},
"node_modules/@actions/cache": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.5.tgz",
"integrity": "sha512-RjLz1/vvntOfp3FpkY3wB0MjVRbLq7bfQEuQG9UUTKwdtcYmFrKVmuD+9B6ADbzbkSfHM+dM4sMjdr3R4XIkFg==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.1.0.tgz",
"integrity": "sha512-z3Opg+P4Y7baq+g1dODXgdtsvPLSewr3ZKpp3U0HQR1A/vWCoJFS52XSezjdngo4SIOdR5oHtyK3a3Arar+X9A==",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
@@ -1248,11 +1248,14 @@
}
},
"node_modules/@eslint/compat": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.3.2.tgz",
"integrity": "sha512-jRNwzTbd6p2Rw4sZ1CgWRS8YMtqG15YyZf7zvb6gY2rB2u6n+2Z+ELW0GtL0fQgyl0pr4Y/BzBfng/BdsereRA==",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.0.tgz",
"integrity": "sha512-DEzm5dKeDBPm3r08Ixli/0cmxr8LkRdwxMRUIJBlSCpAwSrvFEJpVBzV+66JhDxiaqKxnRzCXhtiMiczF7Hglg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/core": "^0.16.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
@@ -1265,6 +1268,19 @@
}
}
},
"node_modules/@eslint/core": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz",
"integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/eslintrc": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
@@ -2631,6 +2647,13 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/json5": {
"version": "0.0.29",
"dev": true,
@@ -2689,17 +2712,17 @@
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.0.tgz",
"integrity": "sha512-EGDAOGX+uwwekcS0iyxVDmRV9HX6FLSM5kzrAToLTsr9OWCIKG/y3lQheCq18yZ5Xh78rRKJiEpP0ZaCs4ryOQ==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz",
"integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.44.0",
"@typescript-eslint/type-utils": "8.44.0",
"@typescript-eslint/utils": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0",
"@typescript-eslint/scope-manager": "8.44.1",
"@typescript-eslint/type-utils": "8.44.1",
"@typescript-eslint/utils": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1",
"graphemer": "^1.4.0",
"ignore": "^7.0.0",
"natural-compare": "^1.4.0",
@@ -2713,20 +2736,20 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"@typescript-eslint/parser": "^8.44.0",
"@typescript-eslint/parser": "^8.44.1",
"eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.0.tgz",
"integrity": "sha512-87Jv3E+al8wpD+rIdVJm/ItDBe/Im09zXIjFoipOjr5gHUhJmTzfFLuTJ/nPTMc2Srsroy4IBXwcTCHyRR7KzA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz",
"integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0"
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2737,9 +2760,9 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.0.tgz",
"integrity": "sha512-ZSl2efn44VsYM0MfDQe68RKzBz75NPgLQXuGypmym6QVOWL5kegTZuZ02xRAT9T+onqvM6T8CdQk0OwYMB6ZvA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz",
"integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2751,16 +2774,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.0.tgz",
"integrity": "sha512-lqNj6SgnGcQZwL4/SBJ3xdPEfcBuhCG8zdcwCPgYcmiPLgokiNDKlbPzCwEwu7m279J/lBYWtDYL+87OEfn8Jw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz",
"integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.44.0",
"@typescript-eslint/tsconfig-utils": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0",
"@typescript-eslint/project-service": "8.44.1",
"@typescript-eslint/tsconfig-utils": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -2780,16 +2803,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.0.tgz",
"integrity": "sha512-nktOlVcg3ALo0mYlV+L7sWUD58KG4CMj1rb2HUVOO4aL3K/6wcD+NERqd0rrA5Vg06b42YhF6cFxeixsp9Riqg==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz",
"integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/typescript-estree": "8.44.0"
"@typescript-eslint/scope-manager": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/typescript-estree": "8.44.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2804,13 +2827,13 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.0.tgz",
"integrity": "sha512-zaz9u8EJ4GBmnehlrpoKvj/E3dNbuQ7q0ucyZImm3cLqJ8INTc970B1qEqDX/Rzq65r3TvVTN7kHWPBoyW7DWw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz",
"integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/types": "8.44.1",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -2883,16 +2906,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.0.tgz",
"integrity": "sha512-VGMpFQGUQWYT9LfnPcX8ouFojyrZ/2w3K5BucvxL/spdNehccKhB4jUyB1yBCXpr2XFm0jkECxgrpXBW2ipoAw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz",
"integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/typescript-estree": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0",
"@typescript-eslint/scope-manager": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/typescript-estree": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1",
"debug": "^4.3.4"
},
"engines": {
@@ -2908,14 +2931,14 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.0.tgz",
"integrity": "sha512-87Jv3E+al8wpD+rIdVJm/ItDBe/Im09zXIjFoipOjr5gHUhJmTzfFLuTJ/nPTMc2Srsroy4IBXwcTCHyRR7KzA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz",
"integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0"
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2926,9 +2949,9 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.0.tgz",
"integrity": "sha512-ZSl2efn44VsYM0MfDQe68RKzBz75NPgLQXuGypmym6QVOWL5kegTZuZ02xRAT9T+onqvM6T8CdQk0OwYMB6ZvA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz",
"integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2940,16 +2963,16 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.0.tgz",
"integrity": "sha512-lqNj6SgnGcQZwL4/SBJ3xdPEfcBuhCG8zdcwCPgYcmiPLgokiNDKlbPzCwEwu7m279J/lBYWtDYL+87OEfn8Jw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz",
"integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.44.0",
"@typescript-eslint/tsconfig-utils": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0",
"@typescript-eslint/project-service": "8.44.1",
"@typescript-eslint/tsconfig-utils": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -2969,13 +2992,13 @@
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.0.tgz",
"integrity": "sha512-zaz9u8EJ4GBmnehlrpoKvj/E3dNbuQ7q0ucyZImm3cLqJ8INTc970B1qEqDX/Rzq65r3TvVTN7kHWPBoyW7DWw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz",
"integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/types": "8.44.1",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
@@ -3039,14 +3062,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.0.tgz",
"integrity": "sha512-ZeaGNraRsq10GuEohKTo4295Z/SuGcSq2LzfGlqiuEvfArzo/VRrT0ZaJsVPuKZ55lVbNk8U6FcL+ZMH8CoyVA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz",
"integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.44.0",
"@typescript-eslint/types": "^8.44.0",
"@typescript-eslint/tsconfig-utils": "^8.44.1",
"@typescript-eslint/types": "^8.44.1",
"debug": "^4.3.4"
},
"engines": {
@@ -3061,9 +3084,9 @@
}
},
"node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.0.tgz",
"integrity": "sha512-ZSl2efn44VsYM0MfDQe68RKzBz75NPgLQXuGypmym6QVOWL5kegTZuZ02xRAT9T+onqvM6T8CdQk0OwYMB6ZvA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz",
"integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3093,9 +3116,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.0.tgz",
"integrity": "sha512-x5Y0+AuEPqAInc6yd0n5DAcvtoQ/vyaGwuX5HE9n6qAefk1GaedqrLQF8kQGylLUb9pnZyLf+iEiL9fr8APDtQ==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz",
"integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3110,15 +3133,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.0.tgz",
"integrity": "sha512-9cwsoSxJ8Sak67Be/hD2RNt/fsqmWnNE1iHohG8lxqLSNY8xNfyY7wloo5zpW3Nu9hxVgURevqfcH6vvKCt6yg==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz",
"integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/typescript-estree": "8.44.0",
"@typescript-eslint/utils": "8.44.0",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/typescript-estree": "8.44.1",
"@typescript-eslint/utils": "8.44.1",
"debug": "^4.3.4",
"ts-api-utils": "^2.1.0"
},
@@ -3135,14 +3158,14 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.0.tgz",
"integrity": "sha512-87Jv3E+al8wpD+rIdVJm/ItDBe/Im09zXIjFoipOjr5gHUhJmTzfFLuTJ/nPTMc2Srsroy4IBXwcTCHyRR7KzA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz",
"integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0"
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3153,9 +3176,9 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.0.tgz",
"integrity": "sha512-ZSl2efn44VsYM0MfDQe68RKzBz75NPgLQXuGypmym6QVOWL5kegTZuZ02xRAT9T+onqvM6T8CdQk0OwYMB6ZvA==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz",
"integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3167,16 +3190,16 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.0.tgz",
"integrity": "sha512-lqNj6SgnGcQZwL4/SBJ3xdPEfcBuhCG8zdcwCPgYcmiPLgokiNDKlbPzCwEwu7m279J/lBYWtDYL+87OEfn8Jw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz",
"integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.44.0",
"@typescript-eslint/tsconfig-utils": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/visitor-keys": "8.44.0",
"@typescript-eslint/project-service": "8.44.1",
"@typescript-eslint/tsconfig-utils": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/visitor-keys": "8.44.1",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -3196,16 +3219,16 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.0.tgz",
"integrity": "sha512-nktOlVcg3ALo0mYlV+L7sWUD58KG4CMj1rb2HUVOO4aL3K/6wcD+NERqd0rrA5Vg06b42YhF6cFxeixsp9Riqg==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz",
"integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.44.0",
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/typescript-estree": "8.44.0"
"@typescript-eslint/scope-manager": "8.44.1",
"@typescript-eslint/types": "8.44.1",
"@typescript-eslint/typescript-estree": "8.44.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3220,13 +3243,13 @@
}
},
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.44.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.0.tgz",
"integrity": "sha512-zaz9u8EJ4GBmnehlrpoKvj/E3dNbuQ7q0ucyZImm3cLqJ8INTc970B1qEqDX/Rzq65r3TvVTN7kHWPBoyW7DWw==",
"version": "8.44.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz",
"integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.44.0",
"@typescript-eslint/types": "8.44.1",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {

View File

@@ -1,15 +1,16 @@
{
"name": "codeql",
"version": "3.30.4",
"version": "3.30.5",
"private": true,
"description": "CodeQL action",
"scripts": {
"_build_comment": "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
"build": "npm run transpile && node build.mjs",
"build": "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
"lint": "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
"test": "npm run transpile && ava src/ --serial --verbose",
"ava": "npm run transpile && ava --serial --verbose",
"test": "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
"transpile": "tsc --build --verbose"
},
@@ -25,7 +26,7 @@
"dependencies": {
"@actions/artifact": "^2.3.1",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
@@ -52,7 +53,7 @@
},
"devDependencies": {
"@ava/typescript": "6.0.0",
"@eslint/compat": "^1.3.2",
"@eslint/compat": "^1.4.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.36.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -65,7 +66,7 @@
"@types/node-forge": "^1.3.14",
"@types/semver": "^7.7.1",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.41.0",
"ava": "^6.4.1",
"esbuild": "^0.25.10",

View File

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

0
pr-checks/__init__.py Normal file
View File

View File

@@ -1,7 +1,7 @@
name: "All-platform bundle"
description: "Tests using an all-platform CodeQL Bundle"
operatingSystems: ["ubuntu", "macos", "windows"]
versions: ["nightly-latest"]
operatingSystems: ["ubuntu"]
useAllPlatformBundle: "true"
installGo: true
steps:

View File

@@ -1,5 +1,6 @@
name: "autobuild-action"
description: "Tests that the C# autobuild action works"
operatingSystems: ["ubuntu", "macos", "windows"]
versions: ["linked"]
steps:
- uses: ./../action/init

View File

@@ -1,31 +0,0 @@
name: "Autobuild direct tracing"
description: "An end-to-end integration test of a Java repository built using 'build-mode: autobuild', with direct tracing enabled"
operatingSystems: ["ubuntu", "windows"]
versions: ["linked", "nightly-latest"]
installJava: "true"
env:
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
steps:
- name: Set up Java test repo configuration
run: |
mv * .github ../action/tests/multi-language-repo/
mv ../action/tests/multi-language-repo/.github/workflows .github
mv ../action/tests/java-repo/* .
- uses: ./../action/init
id: init
with:
build-mode: autobuild
db-location: "${{ runner.temp }}/customDbLocation"
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \
"CODEQL_RUNNER environment variable is set."
exit 1
fi
- uses: ./../action/analyze

View File

@@ -1,7 +1,6 @@
name: "Autobuild working directory"
description: "Tests working-directory input of autobuild action"
versions: ["linked"]
operatingSystems: ["ubuntu"]
steps:
- name: Test setup
run: |

View File

@@ -1,7 +1,8 @@
name: "Build mode autobuild"
description: "An end-to-end integration test of a Java repository built using 'build-mode: autobuild'"
operatingSystems: ["ubuntu"]
versions: ["nightly-latest"]
operatingSystems: ["ubuntu", "windows"]
versions: ["linked", "nightly-latest"]
installJava: "true"
steps:
- name: Set up Java test repo configuration
run: |
@@ -17,6 +18,11 @@ steps:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Install yq
if: runner.os == 'Windows'
run: |
choco install yq -y
- name: Validate database build mode
run: |
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
@@ -26,4 +32,12 @@ steps:
exit 1
fi
- name: Check that indirect tracing is disabled
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \
"CODEQL_RUNNER environment variable is set."
exit 1
fi
- uses: ./../action/analyze

View File

@@ -1,6 +1,5 @@
name: "Build mode manual"
description: "An end-to-end integration test of a Java repository built using 'build-mode: manual'"
operatingSystems: ["ubuntu"]
versions: ["nightly-latest"]
installGo: true
steps:

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