Compare commits

...

628 Commits

Author SHA1 Message Date
Henry Mercer
b7bf0a3ed3 Merge pull request #2099 from github/update-v3.23.2-61bf02577
Merge main into releases/v3
2024-01-26 14:32:31 +00:00
Henry Mercer
33e354b34b Changelog: Add missing PR link 2024-01-26 13:34:02 +00:00
github-actions[bot]
f4cfe8904c Update changelog for v3.23.2 2024-01-26 13:17:25 +00:00
Angela P Wen
61bf02577c Send overall job status in init-post status report (#2097)
Co-authored-by: Henry Mercer <henry@henrymercer.name>
2024-01-26 05:11:46 -08:00
Henry Mercer
16150320c5 Merge pull request #2096 from github/update-bundle/codeql-bundle-v2.16.1
Update default bundle to 2.16.1
2024-01-25 13:53:32 +00:00
Henry Mercer
bd67d8d6b2 Merge pull request #2098 from github/henrymercer/update-internal-queries
Internal queries: Replace deprecated predicates
2024-01-24 13:08:34 +00:00
Henry Mercer
a2619f68c8 Internal queries: Replace deprecated predicates 2024-01-24 12:14:58 +00:00
Henry Mercer
666e2f9edf Internal queries: Replace deprecated predicates 2024-01-24 00:20:18 +00:00
github-actions[bot]
d43ae36a63 Add changelog note 2024-01-24 00:03:09 +00:00
github-actions[bot]
75af1f5948 Update default bundle to codeql-bundle-v2.16.1 2024-01-24 00:02:56 +00:00
Angela P Wen
65c74964a9 Respect Linux cgroup CPU number for --threads value (#2083)
We want to respect cgroup constraints so that when we run in a container, we respect the limits set for the container rather than use the host OS's number of cores.

We check both `/sys/fs/cgroup/cpuset.cpus.effective` (`cgroup v2`) and `/sys/fs/cgroup/cpuset.cpus` (`cgroup v1`) to find the number of cores available. We also check `sys/fs/cgroup/cpu.max` (v1, v2) to calculate the number of cores from the limits set in this file.

The max threads value is set to the minimum of these values, and if no values were found in these files, we default to the original value of the host OS.
2024-01-23 14:50:06 +00:00
Henry Mercer
2eaf0149ef Merge pull request #2095 from github/dependabot/npm_and_yarn/npm-52a54e8561
Bump the npm group with 2 updates
2024-01-22 18:46:02 +00:00
github-actions[bot]
f03430628f Update checked-in dependencies 2024-01-22 17:53:57 +00:00
dependabot[bot]
baaf7d5247 Bump the npm group with 2 updates
Bumps the npm group with 2 updates: [@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 `@typescript-eslint/eslint-plugin` from 6.19.0 to 6.19.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/v6.19.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.19.0 to 6.19.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/v6.19.1/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 17:51:51 +00:00
Alexandre Boulgakov
c6fd1aa12c Merge pull request #2087 from github/sashabu/cpp-trap-caching
C++: Add feature flag for TRAP caching.
2024-01-22 14:25:34 +00:00
Alexandre Boulgakov
d0c5ea08fd C++: Set minimum version for CppTrapCachingEnabled FF. 2024-01-22 13:04:01 +00:00
Alexandre Boulgakov
a246aaa40c C++: Make C++ TRAP caching conditional on TRAP caching being enabled in general. 2024-01-22 13:03:40 +00:00
Alexandre Boulgakov
f1915cce98 C++: Map C++ TRAP caching flag to env var. 2024-01-22 13:02:45 +00:00
Alexandre Boulgakov
2949ab83fb C++: Add feature flag for TRAP caching. 2024-01-22 13:01:47 +00:00
Ian Lynagh
b96e5e1158 Merge pull request #2088 from github/igfoo/remove_lombok_ff
Remove the Lombok feature flag
2024-01-22 10:25:29 +00:00
Ian Lynagh
545bf65803 Run "npm run build" 2024-01-19 16:52:23 +00:00
Ian Lynagh
42edda9026 Add a comment 2024-01-19 16:51:36 +00:00
Ian Lynagh
bd00f23331 Remove the lombok feature flag code
We still set the env var for 2.14.0 - 2.14.3, as they defaulted to not
enabling Lombok support but had support enabled by the feature flag.
2024-01-19 16:50:33 +00:00
Nick Fyson
d0c848438b Merge pull request #2092 from github/nickfyson/v2-deprecation-warning 2024-01-19 15:30:02 +00:00
nickfyson
e86ee7f7b4 fix typo in comment 2024-01-19 15:03:13 +00:00
nickfyson
4f9fb97304 update wording of deprecation warning 2024-01-19 15:01:15 +00:00
nickfyson
a854253aca ensure deprecation warning is only shown once per job 2024-01-19 14:55:54 +00:00
nickfyson
f72cffc780 add v2 deprecation warning 2024-01-18 20:51:16 +00:00
Alexander Eyers-Taylor
d13ca047ae Merge pull request #2090 from github/mergeback/v3.23.1-to-main-0b21cf24
Mergeback v3.23.1 refs/heads/releases/v3 into main
2024-01-17 17:36:08 +00:00
github-actions[bot]
475e2aff08 Update checked-in dependencies 2024-01-17 16:55:22 +00:00
github-actions[bot]
4d7889a2f1 Update changelog and version after v3.23.1 2024-01-17 16:23:28 +00:00
Alexander Eyers-Taylor
0b21cf2492 Merge pull request #2089 from github/update-v3.23.1-f65ecd09c
Merge main into releases/v3
2024-01-17 16:21:56 +00:00
github-actions[bot]
ae616145ed Update changelog for v3.23.1 2024-01-17 15:46:52 +00:00
Angela P Wen
f65ecd09c7 Only delete SARIF in PR check if not running on a fork (#2084) 2024-01-16 16:07:58 -08:00
Alexander Eyers-Taylor
4d75a10efa Merge pull request #2073 from github/update-bundle/codeql-bundle-v2.16.0
Update default bundle to 2.16.0
2024-01-16 12:58:39 +00:00
Stephan Brandauer
e65c5d92f7 Merge pull request #2086 from github/dependabot/npm_and_yarn/npm-c0441c84d9
Bump the npm group with 4 updates
2024-01-16 13:39:34 +01:00
github-actions[bot]
6b12e3d9d9 Update checked-in dependencies 2024-01-15 17:41:40 +00:00
dependabot[bot]
e292db6207 Bump the npm group with 4 updates
Bumps the npm group with 4 updates: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [nock](https://github.com/nock/nock).


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

Updates `@typescript-eslint/eslint-plugin` from 6.18.1 to 6.19.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.19.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.18.1 to 6.19.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.19.0/packages/parser)

Updates `nock` from 13.4.0 to 13.5.0
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.4.0...v13.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 17:40:05 +00:00
Alexander Eyers-Taylor
1fea7a57e7 Merge branch 'main' into update-bundle/codeql-bundle-v2.16.0 2024-01-15 15:55:29 +00:00
Angela P Wen
96531062ba Stop setting CODEQL_RUNNER environment variable if CLI already sets it (#2081)
* Check `setsCodeqlRunnerEnvVar` is set in the CLI with `ToolsFeatures`

* Stop setting `CODEQL_RUNNER` env var when CLI does

* Add optional `features` parameter in test utils

* Test that `CODEQL_RUNNER` is not set if CLI sets it
2024-01-12 09:41:07 -08:00
Henry Mercer
eb14aeb61d Merge pull request #2080 from github/henrymercer/fix-unconditional-warning
Fix `paths`/`paths-ignore` warning that would appear unconditionally
2024-01-11 12:34:53 +00:00
Henry Mercer
30597e33ea Handle empty lists as well as undefined ones 2024-01-11 12:07:18 +00:00
Henry Mercer
94e68911d7 Fix paths/paths-ignore warning that would appear unconditionally 2024-01-11 11:54:24 +00:00
Andrew Eisenberg
cd94990cfe Merge pull request #2079 from github/aeisenberg/artifact-storage
Add a retention period of 7 days
2024-01-10 14:36:34 -08:00
Andrew Eisenberg
f5a82188bc Add a retention period of 7 days
For debug artifacts. Ensures they don't stick around
too long since these can be large.
2024-01-10 13:31:52 -08:00
Andrew Eisenberg
3b54300140 Merge pull request #2078 from github/dependabot/npm_and_yarn/npm-261f9f0017
Bump the npm group with 3 updates
2024-01-10 10:17:02 -08:00
github-actions[bot]
6e496528ad Update checked-in dependencies 2024-01-10 17:39:48 +00:00
dependabot[bot]
ccdb046177 Bump the npm group with 3 updates
Bumps the npm group with 3 updates: [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon), [@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 `@types/sinon` from 17.0.2 to 17.0.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

Updates `@typescript-eslint/eslint-plugin` from 6.18.0 to 6.18.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/v6.18.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.18.0 to 6.18.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/v6.18.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 17:38:00 +00:00
Andrew Eisenberg
6d223f97ab Merge pull request #2077 from github/aeisenberg/dependabot-shield
Dependabot alerts for shield only
2024-01-10 09:34:52 -08:00
Andrew Eisenberg
0395410277 Dependabot alerts for shield only 2024-01-10 08:34:15 -08:00
Angela P Wen
b8e349d982 Remove Node 16 deprecation note (#2076) 2024-01-09 21:19:07 -08:00
Andrew Eisenberg
3516b7f18a Merge pull request #2071 from github/dependabot/npm_and_yarn/npm-61afffbee9
Bump the npm group with 2 updates
2024-01-08 15:28:14 -08:00
Andrew Eisenberg
6693d13c0d Merge pull request #2072 from github/dependabot/github_actions/dot-github/actions/setup-swift/actions-setup-swift-71a5d23140
Bump the actions-setup-swift group in /.github/actions/setup-swift with 1 update
2024-01-08 15:25:20 -08:00
github-actions[bot]
8e8de28ef8 Add changelog note 2024-01-08 18:58:10 +00:00
github-actions[bot]
72e5036933 Update default bundle to codeql-bundle-v2.16.0 2024-01-08 18:58:06 +00:00
Henry Mercer
e6a47e2565 Merge pull request #2070 from github/henrymercer/remove-ghae
Remove code specific to GitHub AE
2024-01-08 17:42:55 +00:00
dependabot[bot]
e26ddc04a8 Bump the actions-setup-swift group
Bumps the actions-setup-swift group in /.github/actions/setup-swift with 1 update: [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift).


Updates `swift-actions/setup-swift` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](f51889efb5...cdbe0f7f4c)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 17:06:06 +00:00
github-actions[bot]
bff178d0fa Update checked-in dependencies 2024-01-08 17:04:33 +00:00
dependabot[bot]
ab07ded31d Bump the npm group with 2 updates
Bumps the npm group with 2 updates: [@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 `@typescript-eslint/eslint-plugin` from 6.17.0 to 6.18.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.18.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.17.0 to 6.18.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.18.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 17:02:44 +00:00
Henry Mercer
415881f4cf Remove code specific to GitHub AE 2024-01-08 13:28:39 +00:00
Henry Mercer
e2d39049b6 Merge pull request #2067 from github/mergeback/v3.23.0-to-main-e5f05b81
Mergeback v3.23.0 refs/heads/releases/v3 into main
2024-01-08 13:15:15 +00:00
github-actions[bot]
bb812eb7c0 Update checked-in dependencies 2024-01-08 12:50:53 +00:00
github-actions[bot]
f674cff945 Update changelog and version after v3.23.0 2024-01-08 12:11:40 +00:00
Henry Mercer
e5f05b81d5 Merge pull request #2066 from github/update-v3.23.0-fd55bb0b0
Merge main into releases/v3
2024-01-08 12:10:08 +00:00
github-actions[bot]
48e7b8b751 Update changelog for v3.23.0 2024-01-08 11:14:38 +00:00
Henry Mercer
fd55bb0b00 Merge pull request #2065 from github/henrymercer/further-run-queries-cleanup
Clean up running queries some more
2024-01-08 11:11:42 +00:00
Henry Mercer
838a022982 Clean up running queries workflow now that the queries are determined by the CLI 2024-01-05 19:11:02 +00:00
Henry Mercer
8516954d60 Merge pull request #2062 from github/henrymercer/remove-action-config-parsing
Remove config parsing logic that is now implemented in the CLI
2024-01-05 18:49:50 +00:00
Henry Mercer
a533ec62b3 Merge branch 'main' into henrymercer/remove-action-config-parsing 2024-01-05 16:14:49 +00:00
Henry Mercer
08ae9bf4d0 Merge pull request #2063 from github/henrymercer/remove-ml-powered-queries-repo
Remove unused test example code
2024-01-05 10:34:52 +00:00
Rasmus Wriedt Larsen
58ff74adc3 Merge pull request #2031 from github/rasmuswl/no-dep-inst-default
Python: Don't install deps by default for all users
2024-01-05 11:18:05 +01:00
Rasmus Wriedt Larsen
9926570d4c Generate JS 2024-01-05 10:32:41 +01:00
Rasmus Wriedt Larsen
2e27b3c56b Create helper isPythonDependencyInstallationDisabled 2024-01-05 10:23:04 +01:00
Rasmus Wriedt Larsen
afef25e1e7 Add comment for force enabling dependency extraction 2024-01-05 10:21:34 +01:00
Henry Mercer
f114e1d137 Remove unused test example 2024-01-04 18:30:27 +00:00
Henry Mercer
d7437a2202 Remove deprecated CODEQL_PASS_CONFIG_TO_CLI env var from PR checks 2024-01-04 16:41:50 +00:00
Henry Mercer
67be7bc713 Remove unused status report fields 2024-01-04 16:38:53 +00:00
Henry Mercer
4feb32a7ef Remove code to download packs 2024-01-04 16:29:49 +00:00
Henry Mercer
f65fc6a926 Remove parsing of queries, packs, paths, and pathsIgnore 2024-01-04 16:27:05 +00:00
Henry Mercer
f934b28e51 Populate path filters env variables using the CLI 2024-01-04 15:17:20 +00:00
Henry Mercer
b30262ccb4 Remove functionality for checking out external repos 2024-01-04 15:09:24 +00:00
Rasmus Wriedt Larsen
d98234a500 Update changelog wording
To make it more clear what feature is being removed in the future
2024-01-04 16:06:18 +01:00
Rasmus Wriedt Larsen
aa95d4deab Update changelog wording to include january instead of now 2024-01-04 16:05:36 +01:00
Henry Mercer
b683173003 Remove unused arguments 2024-01-04 15:05:15 +00:00
Henry Mercer
f53698be43 Remove Action-config code path in runQueries 2024-01-04 14:45:16 +00:00
Henry Mercer
fa98ec0c7a Remove CliConfigFileEnabled feature flag 2024-01-04 14:39:36 +00:00
Rasmus Wriedt Larsen
ce9d281924 Merge branch 'main' into rasmuswl/no-dep-inst-default 2024-01-04 15:28:16 +01:00
Henry Mercer
216127f34a Merge pull request #1994 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2024-01-04 13:27:56 +00:00
Henry Mercer
7963a60016 Merge pull request #2009 from github/henrymercer/drop-codeql-v2.11.5
Remove support for CodeQL v2.11.5 and earlier
2024-01-04 13:27:31 +00:00
Henry Mercer
6ebbf452bb Merge branch 'main' into update-supported-enterprise-server-versions 2024-01-02 19:13:58 +00:00
Henry Mercer
e345646da5 Merge pull request #2058 from github/dependabot/github_actions/actions-970b8d0e10
Bump the actions group with 1 update
2024-01-02 18:04:42 +00:00
Henry Mercer
35b10b5ff7 Merge branch 'main' into henrymercer/drop-codeql-v2.11.5 2024-01-02 18:03:32 +00:00
Henry Mercer
ee9b8ab1f1 Merge pull request #2057 from github/dependabot/npm_and_yarn/npm-1688eb420c
Bump the npm group with 2 updates
2024-01-02 12:54:53 +00:00
Henry Mercer
fb410e7156 Update PR check source 2024-01-02 12:18:35 +00:00
dependabot[bot]
fab3a43f69 Bump the actions group with 1 update
Bumps the actions group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).


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

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 17:34:12 +00:00
github-actions[bot]
01e47d0430 Update checked-in dependencies 2024-01-01 17:32:33 +00:00
dependabot[bot]
ecbf80ad80 Bump the npm group with 2 updates
Bumps the npm group with 2 updates: [@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 `@typescript-eslint/eslint-plugin` from 6.15.0 to 6.17.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.17.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.15.0 to 6.17.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.17.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 17:30:58 +00:00
dependabot[bot]
596b173a4e Bump the actions group with 2 updates (#2056)
* Bump the actions group with 2 updates

Bumps the actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-go](https://github.com/actions/setup-go).


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

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

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump `setup-python` and `setup-go` to v5

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-12-27 17:12:00 -08:00
dependabot[bot]
e01299bd9c Bump the npm group with 2 updates (#2055)
* Bump the npm group with 2 updates

Bumps the npm group with 2 updates: [@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 `@typescript-eslint/eslint-plugin` from 6.14.0 to 6.15.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.15.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.14.0 to 6.15.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.15.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-27 14:05:35 -08:00
Aditya Sharad
6f5223db54 Merge pull request #2053 from github/mergeback/v3.22.12-to-main-012739e5
Mergeback v3.22.12 refs/heads/releases/v3 into main
2023-12-21 19:33:14 -08:00
github-actions[bot]
710aa2dfc8 Update checked-in dependencies 2023-12-22 00:49:29 +00:00
github-actions[bot]
ad5035bbd9 Update changelog and version after v3.22.12 2023-12-22 00:46:03 +00:00
Aditya Sharad
012739e508 Merge pull request #2052 from github/update-v3.22.12-40cb08c12
Merge main into releases/v3
2023-12-21 16:44:41 -08:00
github-actions[bot]
c1cf794881 Update changelog for v3.22.12 2023-12-22 00:19:06 +00:00
Aditya Sharad
40cb08c121 Merge pull request #2051 from github/angelapwen/patch-release-script
Fix type error in `Update release branch` workflow
2023-12-21 14:04:47 -08:00
Angela P Wen
0be9290508 Typecast OLDEST_SUPPORTED_MAJOR_VERSION when defined 2023-12-21 13:43:00 -08:00
Angela P Wen
658e3c6619 Fix type error 2023-12-21 13:38:16 -08:00
Nick Fyson
49812ec6b6 Merge pull request #2050 from github/nickfyson/add-releases-ini 2023-12-20 20:18:01 +00:00
nickfyson
9ed5fc7131 add note about backporting check changes to v2 branch 2023-12-20 20:00:52 +00:00
nickfyson
a42c9a2634 update required checks script to handle release branches 2023-12-20 17:23:05 +00:00
Aditya Sharad
a110746c60 Merge pull request #2047 from github/update-bundle/codeql-bundle-v2.15.5
Update default bundle to 2.15.5
2023-12-20 08:47:39 -08:00
github-actions[bot]
a99bd84dff Add changelog note 2023-12-19 15:27:07 +00:00
github-actions[bot]
fe1e55feb0 Update default bundle to codeql-bundle-v2.15.5 2023-12-19 15:27:01 +00:00
Nick Fyson
7e187e1c52 Merge pull request #2044 from github/nickfyson/update-changelog 2023-12-18 22:02:22 +00:00
nickfyson
26036736ba clarify comment on versions in the changelog 2023-12-18 20:19:04 +00:00
nickfyson
8478e2a840 clarify comment on versions in the changelog 2023-12-18 19:59:26 +00:00
Nick Fyson
09783967a0 Merge pull request #2041 from github/nickfyson/fix-changelog-backports
improve handling of changelog processing for backports
2023-12-18 19:23:51 +00:00
dependabot[bot]
144b7d5b16 Bump the npm group with 2 updates (#2045)
* Bump the npm group with 2 updates

Bumps the npm group with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import).


Updates `eslint` from 8.55.0 to 8.56.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0)

Updates `eslint-plugin-import` from 2.29.0 to 2.29.1
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.0...v2.29.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-18 10:52:32 -08:00
nickfyson
cda785ef94 add note on versioning approach to changelog 2023-12-18 13:39:34 +00:00
nickfyson
8e086df084 raise explicit exception if EOF found when looking for changelog sections 2023-12-18 10:38:11 +00:00
nickfyson
0724061f76 preserve trailing whitespace when transforming CHANGELOG 2023-12-18 10:27:45 +00:00
nickfyson
fda1796670 rename regex for clarity 2023-12-15 18:45:36 +00:00
Nick Fyson
ee53012610 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-15 18:44:26 +00:00
nickfyson
e0c2b0a8a0 change version numbers inside processing function as well 2023-12-15 17:02:32 +00:00
nickfyson
8e4a6c7a90 improve handling of changelog processing for backports 2023-12-15 16:50:38 +00:00
Rasmus Wriedt Larsen
dd207935b5 Merge branch 'main' into rasmuswl/no-dep-inst-default 2023-12-13 20:29:44 +01:00
Rasmus Wriedt Larsen
77f4e07231 Safer wording of CHANGELOG entry
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-12-13 20:28:56 +01:00
Henry Mercer
511f073971 Merge pull request #2033 from github/dependabot/npm_and_yarn/npm-0a98872b3d
Bump the npm group with 4 updates
2023-12-13 16:21:28 +00:00
Nick Fyson
ebf5a83713 Merge pull request #2035 from github/mergeback/v3.22.11-to-main-b374143c
Mergeback v3.22.11 refs/heads/releases/v3 into main
2023-12-13 16:21:08 +00:00
github-actions[bot]
7813bda958 Update checked-in dependencies 2023-12-13 15:27:55 +00:00
github-actions[bot]
2b2fb6b1dc Update changelog and version after v3.22.11 2023-12-13 15:21:13 +00:00
Nick Fyson
b374143c11 Merge pull request #2034 from github/update-v3.22.11-64e61baea
Merge main into releases/v3
2023-12-13 15:19:46 +00:00
Henry Mercer
95591babe8 Merge branch 'main' into dependabot/npm_and_yarn/npm-0a98872b3d 2023-12-13 14:56:05 +00:00
github-actions[bot]
e2b5cc75ce Update changelog for v3.22.11 2023-12-13 14:39:53 +00:00
Nick Fyson
64e61baeac Merge pull request #2006 from github/nickfyson/node-20
change to node20 for all actions
2023-12-13 14:36:55 +00:00
Nick Fyson
c757f9f6de Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-13 12:47:00 +00:00
nickfyson
7898bc2041 add pr check for node version consistency 2023-12-13 11:54:57 +00:00
nickfyson
6b5b958063 remove dedundant single quotes from node version strings 2023-12-13 11:38:14 +00:00
Nick Fyson
ea1e72c669 Update .github/workflows/pr-checks.yml
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-13 11:37:06 +00:00
Rasmus Wriedt Larsen
1e69b89bc7 build 2023-12-13 12:27:17 +01:00
Rasmus Wriedt Larsen
a13f4b8aed prettier 2023-12-13 12:26:59 +01:00
Rasmus Wriedt Larsen
bc36e6cfae Add missing logic to force enable lib extraction 2023-12-13 12:26:59 +01:00
Rasmus Wriedt Larsen
84a9fc4402 Did create feature-flag 2023-12-13 12:26:59 +01:00
Nick Fyson
b974542e9f Merge branch 'main' into nickfyson/node-20 2023-12-13 11:26:45 +00:00
github-actions[bot]
0d8f348775 Update checked-in dependencies 2023-12-13 11:12:49 +00:00
dependabot[bot]
dcf89a7576 Bump the npm group with 4 updates
Bumps the npm group with 4 updates: [@octokit/types](https://github.com/octokit/types.ts), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [typescript](https://github.com/Microsoft/TypeScript).


Updates `@octokit/types` from 12.3.0 to 12.4.0
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v12.3.0...v12.4.0)

Updates `@typescript-eslint/eslint-plugin` from 6.13.2 to 6.14.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.14.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.13.2 to 6.14.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.14.0/packages/parser)

Updates `typescript` from 5.3.2 to 5.3.3
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 11:05:48 +00:00
Rasmus Wriedt Larsen
1e69962471 Update changelog 2023-12-13 11:34:52 +01:00
Rasmus Wriedt Larsen
2f93dd472e Python: Don't install deps by default for all users 2023-12-13 11:33:21 +01:00
dependabot[bot]
b995212303 Bump the actions group with 2 updates (#2024)
* Bump the actions group with 2 updates

Bumps the actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-go](https://github.com/actions/setup-go).


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

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

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rebuild

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-12 21:18:31 +00:00
Chuan-kai Lin
3c1878d8f9 Merge pull request #2029 from github/mergeback/v2.22.10-to-main-305f6546
Mergeback v2.22.10 refs/heads/releases/v2 into main
2023-12-12 09:32:02 -08:00
github-actions[bot]
1bca5bfcf5 Update checked-in dependencies 2023-12-12 17:01:14 +00:00
github-actions[bot]
691226ecb5 Update changelog and version after v2.22.10 2023-12-12 16:58:02 +00:00
Chuan-kai Lin
305f654631 Merge pull request #2028 from github/update-v2.22.10-fe23b5a3e
Merge main into releases/v2
2023-12-12 08:56:03 -08:00
github-actions[bot]
31e94d8cb1 Update changelog for v2.22.10 2023-12-12 16:16:38 +00:00
Nick Fyson
1de8705f6b Merge branch 'main' into nickfyson/node-20 2023-12-12 13:01:04 +00:00
Chuan-kai Lin
fe23b5a3e1 Merge pull request #2016 from github/update-bundle/codeql-bundle-v2.15.4
Update default bundle to 2.15.4
2023-12-11 08:22:58 -08:00
nickfyson
0bc194ee69 switch check sarif action to node20 2023-12-11 14:08:35 +00:00
nickfyson
95be4b277c add not about continuing testing on node 16 2023-12-07 17:04:27 +00:00
github-actions[bot]
bf51594343 Update checked-in dependencies 2023-12-07 16:21:44 +00:00
nickfyson
303dec0fbd fix choice of older node version to test 2023-12-07 16:03:07 +00:00
nickfyson
3a9f6a89e0 update javascript files 2023-12-07 16:00:04 +00:00
nickfyson
cc4fead714 update version in various hardcoded locations 2023-12-07 15:44:56 +00:00
Chuan-kai Lin
183559cea8 Merge branch 'main' into update-bundle/codeql-bundle-v2.15.4 2023-12-07 06:34:56 -08:00
nickfyson
5b52b36d41 reintroduce PR check that confirm action can be still be compiled on node16 2023-12-07 14:10:26 +00:00
nickfyson
5b19bef41e change to node20 for all actions 2023-12-07 14:10:12 +00:00
nickfyson
f2d0c2e7ae upgrade node type definitions 2023-12-07 14:09:14 +00:00
nickfyson
d651fbc494 change to node20 for all actions 2023-12-07 14:07:26 +00:00
Nick Fyson
382a50a028 Merge pull request #2021 from github/mergeback/v2.22.9-to-main-c0d1daa7
Mergeback v2.22.9 refs/heads/releases/v2 into main
2023-12-07 11:59:25 +00:00
github-actions[bot]
458b4226ad Update checked-in dependencies 2023-12-07 11:37:26 +00:00
github-actions[bot]
5e0f9dbc48 Update changelog and version after v2.22.9 2023-12-07 11:33:23 +00:00
Nick Fyson
c0d1daa7f7 Merge pull request #2020 from github/update-v2.22.9-e1d1fad1b
Merge main into releases/v2
2023-12-07 11:31:16 +00:00
github-actions[bot]
c6e24c94be Update changelog for v2.22.9 2023-12-07 10:49:40 +00:00
Nick Fyson
e1d1fad1b8 Merge pull request #2014 from github/nickfyson/update-release-process
update release process to support multiple version
2023-12-07 10:46:32 +00:00
nickfyson
0e9a210226 update workflows to run on all release branches 2023-12-06 15:57:43 +00:00
Nick Fyson
47e90f23ea Merge branch 'main' into nickfyson/update-release-process 2023-12-06 12:31:25 +00:00
nickfyson
ee748cf360 respond to more review comments 2023-12-06 12:22:12 +00:00
nickfyson
57932be6d4 remove unused function 2023-12-06 11:49:17 +00:00
nickfyson
a6ea3c5a45 define backport commit message in constant 2023-12-06 11:41:27 +00:00
Nick Fyson
3537bea580 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-12-06 11:40:07 +00:00
Chuan-kai Lin
3675be0110 Merge pull request #2017 from cklin/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-12-05 13:56:00 -08:00
Chuan-kai Lin
784783de17 Update supported GitHub Enterprise Server versions 2023-12-05 13:08:58 -08:00
github-actions[bot]
b6dc4ba94b Add changelog note 2023-12-05 20:47:47 +00:00
github-actions[bot]
1c3b8c867b Update default bundle to codeql-bundle-v2.15.4 2023-12-05 20:47:43 +00:00
Nick Fyson
65a2bb528e Merge branch 'main' into nickfyson/update-release-process 2023-12-04 22:16:03 +00:00
nickfyson
2dbffae187 add note in CONTRIBUTING.md on how to deprecate an action version 2023-12-04 22:15:47 +00:00
dependabot[bot]
bc50092bdb Bump the npm group with 4 updates (#2015)
* Bump the npm group with 4 updates

Bumps the npm group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint](https://github.com/eslint/eslint) and [nock](https://github.com/nock/nock).


Updates `@typescript-eslint/eslint-plugin` from 6.13.0 to 6.13.2
- [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/v6.13.2/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.13.0 to 6.13.2
- [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/v6.13.2/packages/parser)

Updates `eslint` from 8.54.0 to 8.55.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.54.0...v8.55.0)

Updates `nock` from 13.3.8 to 13.4.0
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.8...v13.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-04 19:22:11 +00:00
nickfyson
b7f289ef4d update release process to support multiple version 2023-12-04 14:28:55 +00:00
Henry Mercer
a16ac98583 Merge pull request #2013 from github/henrymercer/index-traceless-dbs
Extract scanned languages using `--index-traceless-dbs`
2023-12-04 10:34:56 +00:00
Henry Mercer
cc940d75b2 Extract scanned languages using --index-traceless-dbs 2023-12-01 18:58:40 +00:00
Henry Mercer
b929cca357 Merge pull request #2012 from github/henrymercer/categorize-configuration-errors
Report configuration errors more accurately
2023-12-01 18:34:53 +00:00
Henry Mercer
1d367b0bec Improve error categorizations 2023-12-01 17:54:38 +00:00
Henry Mercer
db40ac46b9 Merge pull request #2011 from github/henrymercer/exclude-dependabot-required-checks
Exclude Dependabot updates workflow from required PR checks
2023-11-28 10:19:21 +00:00
Henry Mercer
77605c75e4 Remove LGTM 2023-11-27 19:16:50 +00:00
Henry Mercer
773bd9bef6 Exclude Dependabot updates workflow from required PR checks
This runs on `main` and is not relevant to PRs.
2023-11-27 19:08:29 +00:00
dependabot[bot]
4712487dc3 Bump the npm group with 5 updates (#2010)
* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/adm-zip](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/adm-zip) | `0.5.4` | `0.5.5` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.5` | `7.5.6` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `17.0.1` | `17.0.2` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.12.0` | `6.13.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.12.0` | `6.13.0` |


Updates `@types/adm-zip` from 0.5.4 to 0.5.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/adm-zip)

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

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

Updates `@typescript-eslint/eslint-plugin` from 6.12.0 to 6.13.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.12.0 to 6.13.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@types/adm-zip"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-27 19:00:06 +00:00
Henry Mercer
5dc8134adc Hyperlink corresponding changelog entry 2023-11-27 18:12:00 +00:00
Henry Mercer
0240eaf5cb Add changelog note 2023-11-27 13:00:55 +00:00
Henry Mercer
fdea2a523d Remove result pruning for CodeQL 2.11.2 2023-11-27 12:58:49 +00:00
Henry Mercer
a36fc67ec3 Remove CodeQL version guards for 2.11.5 and earlier 2023-11-27 12:56:32 +00:00
Henry Mercer
649145214e Update PR checks
Stop testing `stable-20220908` bundle as this is no longer supported.
2023-11-27 12:41:44 +00:00
Henry Mercer
d1166e6d60 Bump minimum CodeQL version to 2.11.6 2023-11-27 12:36:48 +00:00
Henry Mercer
c7f4ea5281 Bump the minor version number of the Action 2023-11-27 12:36:18 +00:00
Arthur Baars
2da9ad5070 Merge pull request #2008 from github/mergeback/v2.22.8-to-main-407ffafa
Mergeback v2.22.8 refs/heads/releases/v2 into main
2023-11-23 12:29:13 +01:00
github-actions[bot]
3b5bd49a74 Update checked-in dependencies 2023-11-23 11:06:30 +00:00
github-actions[bot]
8a1e474ed1 Update changelog and version after v2.22.8 2023-11-23 11:04:37 +00:00
Arthur Baars
407ffafae6 Merge pull request #2007 from github/update-v2.22.8-192ad9bd5
Merge main into releases/v2
2023-11-23 12:02:44 +01:00
github-actions[bot]
4af462f4ba Update changelog for v2.22.8 2023-11-23 10:36:46 +00:00
Henry Mercer
192ad9bd5f Merge pull request #2001 from github/update-bundle/codeql-bundle-v2.15.3
Update default bundle to 2.15.3
2023-11-22 11:44:34 +00:00
Arthur Baars
77c1abbd83 Merge branch 'main' into update-bundle/codeql-bundle-v2.15.3 2023-11-22 10:37:42 +01:00
dependabot[bot]
9f150ba795 Bump the actions group with 1 update (#2004)
* Bump the actions group with 1 update

Bumps the actions group with 1 update: [actions/github-script](https://github.com/actions/github-script).

- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump `github-script` version to v7

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-11-20 15:32:23 -08:00
dependabot[bot]
e75de4cd73 Bump typescript from 5.2.2 to 5.3.2 (#2002)
* Bump typescript from 5.2.2 to 5.3.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

* Rebuild

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-11-20 15:31:58 -08:00
dependabot[bot]
80150c2141 Bump the npm group with 12 updates (#2003)
* Bump the npm group with 12 updates

Bumps the npm group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [@octokit/types](https://github.com/octokit/types.ts) | `12.1.1` | `12.3.0` |
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) | `9.0.6` | `9.0.7` |
| [@types/adm-zip](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/adm-zip) | `0.5.3` | `0.5.4` |
| [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml) | `4.0.8` | `4.0.9` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.4` | `7.5.5` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.9.1` | `6.12.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.9.1` | `6.12.0` |
| [eslint](https://github.com/eslint/eslint) | `8.52.0` | `8.54.0` |
| [nock](https://github.com/nock/nock) | `13.3.7` | `13.3.8` |
| [sinon](https://github.com/sinonjs/sinon) | `17.0.0` | `17.0.1` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `10.0.20` | `17.0.1` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.2.2` | `5.3.2` |


Updates `@octokit/types` from 12.1.1 to 12.3.0
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v12.1.1...v12.3.0)

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

Updates `@types/adm-zip` from 0.5.3 to 0.5.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/adm-zip)

Updates `@types/js-yaml` from 4.0.8 to 4.0.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml)

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

Updates `@typescript-eslint/eslint-plugin` from 6.9.1 to 6.12.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.12.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.9.1 to 6.12.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.12.0/packages/parser)

Updates `eslint` from 8.52.0 to 8.54.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v8.54.0)

Updates `nock` from 13.3.7 to 13.3.8
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.7...v13.3.8)

Updates `sinon` from 17.0.0 to 17.0.1
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.0...v17.0.1)

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

Updates `typescript` from 5.2.2 to 5.3.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/uuid"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/adm-zip"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/js-yaml"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

* Rebuild

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-20 14:35:28 -08:00
github-actions[bot]
4d999a4f27 Add changelog note 2023-11-19 10:01:05 +00:00
github-actions[bot]
83267d5070 Update default bundle to codeql-bundle-v2.15.3 2023-11-19 10:01:00 +00:00
Henry Mercer
4b6aa0b07d Merge pull request #1997 from github/mergeback/v2.22.7-to-main-66b90a5d
Mergeback v2.22.7 refs/heads/releases/v2 into main
2023-11-16 14:10:31 +00:00
github-actions[bot]
4618cbd952 Update checked-in dependencies 2023-11-16 13:45:59 +00:00
github-actions[bot]
bab3adbf38 Update changelog and version after v2.22.7 2023-11-16 13:26:41 +00:00
Henry Mercer
66b90a5db1 Merge pull request #1995 from github/update-v2.22.7-10f05151c
Merge main into releases/v2
2023-11-16 13:24:42 +00:00
github-actions[bot]
bc9ddc2841 Update changelog for v2.22.7 2023-11-16 12:58:42 +00:00
Andrew Eisenberg
10f05151c5 Merge pull request #1981 from github/aeisenberg/delete-analysis-after-upload
Delete analysis after uploading
2023-11-16 04:32:07 -08:00
github-actions[bot]
6111b7c004 Update supported GitHub Enterprise Server versions 2023-11-16 00:11:21 +00:00
Andrew Eisenberg
4e80a80354 Use delay instead of wait
Need to also change the signature of delay to allow this to happen.
2023-11-15 13:14:19 -08:00
Andrew Eisenberg
df9b50ee5f Address comments from review
- Change error messages.
- Use logger instead of core
- throw Error instead of write error message
2023-11-15 12:54:26 -08:00
Andrew Eisenberg
0d0a53cb13 Merge pull request #1993 from github/henrymercer/deprecation-changenote
Add changelog note for CodeQL v2.10.5 deprecation
2023-11-15 12:51:22 -08:00
Henry Mercer
df6aced528 Update CHANGELOG.md 2023-11-15 20:24:19 +00:00
Henry Mercer
0cd63ca7a5 Add changelog note for CodeQL v2.10.5 deprecation 2023-11-15 19:54:48 +00:00
Henry Mercer
b9e85da0b5 Merge pull request #1992 from github/henrymercer/ghes-3.7-deprecation
Prepare for CodeQL v2.10.5 deprecation
2023-11-15 19:17:42 +00:00
Henry Mercer
779838b849 Prepare for CodeQL v2.10.* deprecation
Warn users of CodeQL v2.11.5 and earlier that the next minor release of
the CodeQL Action will require CodeQL v2.11.6 or later.
2023-11-15 17:52:32 +00:00
Chris Smowton
ab6dd28b80 Merge pull request #1991 from github/mergeback/v2.22.6-to-main-689fdc51
Mergeback v2.22.6 refs/heads/releases/v2 into main
2023-11-14 14:26:03 +00:00
github-actions[bot]
9326971847 Update checked-in dependencies 2023-11-14 12:54:27 +00:00
github-actions[bot]
9968bdfba4 Update changelog and version after v2.22.6 2023-11-14 12:52:33 +00:00
Chris Smowton
689fdc5193 Merge pull request #1990 from github/update-v2.22.6-8c8c7b4d8
Merge main into releases/v2
2023-11-14 12:50:22 +00:00
github-actions[bot]
33bfd1de92 Update changelog for v2.22.6 2023-11-14 12:16:13 +00:00
Henry Mercer
8c8c7b4d80 Merge pull request #1979 from github/aeisenberg/python-on-mac
Add changenote for Python 3.12 incompatibility on MacOS
2023-11-13 18:40:02 +00:00
Henry Mercer
64981bbb5a Merge branch 'main' into aeisenberg/python-on-mac 2023-11-13 18:11:17 +00:00
Chris Smowton
e280207df7 Merge pull request #1978 from github/update-bundle/codeql-bundle-v2.15.2
Update default bundle to 2.15.2
2023-11-13 12:14:57 +00:00
Chris Smowton
e46740a99e Merge branch 'main' into update-bundle/codeql-bundle-v2.15.2 2023-11-13 11:42:59 +00:00
Henry Mercer
6abf8569a1 Merge pull request #1984 from github/aeisenberg/fix-debug-integration-tests
Fix failing workflows
2023-11-13 11:42:48 +00:00
Chris Smowton
59252d9bfb Update setup-swift deficiency compensation 2023-11-13 11:33:19 +00:00
Chris Smowton
dcf348a0d3 Merge branch 'main' into update-bundle/codeql-bundle-v2.15.2 2023-11-13 11:06:34 +00:00
Andrew Eisenberg
04451e072f Delete analysis after uploading
The analysis is purposefully failing. We don't want a failed analysis
sitting in the security center since this can cause some internal
checks to erroneously fail.
2023-11-10 13:26:01 -08:00
Andrew Eisenberg
82284f1b28 Fix failing workflows
Ensure that pythion 3.11 is used for older CLIs on windows.
2023-11-10 13:19:40 -08:00
Andrew Eisenberg
ed686ed4b3 Update CHANGELOG.md
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-11-02 10:51:37 -07:00
Andrew Eisenberg
137a1e070d Merge pull request #1963 from github/aeisenberg/fix-source-root
Use the correct action input parameter
2023-11-02 08:18:02 -07:00
Andrew Eisenberg
6dd4605060 Add changenote for Python 3.12 incompatibility on MacOS 2023-11-02 08:03:28 -07:00
Andrew Eisenberg
91733ada76 Remove reference to CODEQL_RUNNER 2023-11-02 07:50:32 -07:00
Andrew Eisenberg
7c60ff7ad6 Use setup-python@v4 2023-11-02 07:49:59 -07:00
Andrew Eisenberg
9ef69a2c7a Be more precise about when to use python 3.11
Only run use 3.11 on versions of of the CLI that we know don't support
3.12.
2023-11-01 18:10:09 -07:00
Andrew Eisenberg
bd4005aa6a Force python 3.11 for macos
3.12 does not work.
2023-11-01 16:01:27 -07:00
Andrew Eisenberg
da4c46015a Use the correct action input parameter 2023-10-31 17:15:51 -07:00
github-actions[bot]
45a6ff4660 Add changelog note 2023-10-31 12:46:42 +00:00
github-actions[bot]
793adb79ac Update default bundle to codeql-bundle-v2.15.2 2023-10-31 12:46:37 +00:00
dependabot[bot]
c73d8a69e1 Bump the npm group with 5 updates (#1977)
* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@octokit/types](https://github.com/octokit/types.ts) | `12.0.0` | `12.1.1` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `10.0.19` | `10.0.20` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.9.0` | `6.9.1` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.9.0` | `6.9.1` |
| [nock](https://github.com/nock/nock) | `13.3.6` | `13.3.7` |


Updates `@octokit/types` from 12.0.0 to 12.1.1
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v12.0.0...v12.1.1)

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

Updates `@typescript-eslint/eslint-plugin` from 6.9.0 to 6.9.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/v6.9.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.9.0 to 6.9.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/v6.9.1/packages/parser)

Updates `nock` from 13.3.6 to 13.3.7
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.6...v13.3.7)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-30 18:27:47 +00:00
Nick Rolfe
df32e39913 Merge pull request #1975 from github/nickrolfe/vscode-formatter
VSCode settings: set default formatter for TS
2023-10-30 10:49:04 +00:00
Nick Rolfe
88d03c647b VSCode settings: set default formatter for TS
Tell VSCode to format code with Prettier, since that's the same tool we
use to check the format with `npm run lint`.
2023-10-27 17:21:58 +01:00
Henry Mercer
a3795eb30d Merge pull request #1973 from github/mergeback/v2.22.5-to-main-74483a38
Mergeback v2.22.5 refs/heads/releases/v2 into main
2023-10-27 11:22:12 +01:00
github-actions[bot]
3d77e8a7ee Update checked-in dependencies 2023-10-27 09:36:42 +00:00
github-actions[bot]
58157f1d4c Update changelog and version after v2.22.5 2023-10-27 09:31:34 +00:00
Henry Mercer
74483a38d3 Merge pull request #1972 from github/update-v2.22.5-2d5ffa777
Merge main into releases/v2
2023-10-27 10:29:36 +01:00
github-actions[bot]
2ba6829f2b Update changelog for v2.22.5 2023-10-27 08:34:59 +00:00
Henry Mercer
2d5ffa7773 Merge pull request #1970 from github/henrymercer/clean-up-init-logs
Validate workflow within new log group
2023-10-27 09:32:26 +01:00
Henry Mercer
14d0fa93b4 Merge pull request #1967 from github/henrymercer/enable-features-on-ghes
Enable analysis summary v2 and sub-language file coverage information on GHES
2023-10-27 09:29:30 +01:00
Henry Mercer
5744b13b66 Rebuild Action 2023-10-26 19:56:46 +01:00
Henry Mercer
f3b55862ea Check out the right branch in rebuild.yml 2023-10-26 19:56:04 +01:00
Henry Mercer
95c219819d Add a log in the OK case 2023-10-26 19:52:37 +01:00
Henry Mercer
e8e83c3a56 Merge branch 'main' into henrymercer/enable-features-on-ghes 2023-10-26 19:47:56 +01:00
Henry Mercer
c7abe9ca5f Merge pull request #1971 from github/henrymercer/bot-rebuild
Add workflow to rebuild the Action on a label
2023-10-26 19:46:25 +01:00
Henry Mercer
3fc281e079 Add workflow to rebuild the Action on a label 2023-10-26 14:01:43 +01:00
Nick Rolfe
4888104fe9 Merge pull request #1940 from github/nickrolfe/rename_fgp_flag
Rename feature flag for evaluator fine-grained parallelism
2023-10-26 12:34:26 +01:00
Nick Rolfe
06d8f4f7f8 Rename feature flag for evaluator fine-grained parallelism 2023-10-26 11:45:37 +01:00
Henry Mercer
06662f546c Validate workflow within new log group
This cleans up the logs for `init`.
2023-10-26 11:17:05 +01:00
Henry Mercer
25a3829e6e Fix comment 2023-10-26 11:09:28 +01:00
Paolo Tranquilli
dad0ebd6ca Merge pull request #1969 from github/redsun82/pre-commit
Add pre-commit configuration
2023-10-26 12:07:09 +02:00
Paolo Tranquilli
7f7aa09c9a Add pre-commit configuration
[pre-commit](https://pre-commit.com/) is a framework for easy set-up
of pre-commit hooks.

This adds configuration for it to run:
* ts compilation
* ts linting
* pr-checks synchronization

The latter required the `sync.py` to be callable from the project root.

`pre-commit` can be enabled with
```
python3 -m pip install pre-commit
pre-commit install
```
2023-10-26 11:03:40 +02:00
Henry Mercer
5e3a6935e7 Stub CodeQL version 2023-10-25 20:33:07 +01:00
Henry Mercer
d2b37ba145 Remove feature flag for uploading failed SARIF 2023-10-25 19:51:19 +01:00
Henry Mercer
c8e99083da Remove feature flag for sub-language file coverage information 2023-10-25 19:51:19 +01:00
Henry Mercer
2cbabeaa72 Remove feature flag for analysis summary v2 2023-10-25 19:51:18 +01:00
Paolo Tranquilli
edb8265ab8 Merge pull request #1964 from github/redsun82/cpp-deptrace-pr-checks
C++: add deptrace pr-checks
2023-10-25 14:54:15 +02:00
Henry Mercer
dbe5586d6e Merge pull request #1966 from github/dependabot/npm_and_yarn/npm-0014e83eb7
Bump the npm group with 10 updates
2023-10-25 13:23:49 +01:00
Paolo Tranquilli
f1b64d85e4 Sync PR checks 2023-10-25 13:34:17 +02:00
Paolo Tranquilli
e3f5f833da Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-10-25 12:23:32 +02:00
Paolo Tranquilli
838be48ce0 C++: tweak deptrace checks 2023-10-24 11:31:04 +02:00
Paolo Tranquilli
8779d91384 Merge branch 'main' into redsun82/cpp-deptrace-pr-checks 2023-10-24 11:27:38 +02:00
Paolo Tranquilli
959337a156 C++: fix autobuild pr-checks for macOS 2023-10-24 11:10:13 +02:00
dependabot[bot]
9734ecd5b5 Bump the actions group with 1 update (#1965)
Bumps the actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).

- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 11:55:44 -07:00
github-actions[bot]
9c3b394d7f Update checked-in dependencies 2023-10-23 18:03:04 +00:00
dependabot[bot]
79817eb679 Bump the npm group with 10 updates
Bumps the npm group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) | `9.0.5` | `9.0.6` |
| [@types/adm-zip](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/adm-zip) | `0.5.2` | `0.5.3` |
| [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml) | `4.0.7` | `4.0.8` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.3` | `7.5.4` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.8.0` | `6.9.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.8.0` | `6.9.0` |
| [eslint](https://github.com/eslint/eslint) | `8.51.0` | `8.52.0` |
| [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | `2.28.1` | `2.29.0` |
| [nock](https://github.com/nock/nock) | `13.3.4` | `13.3.6` |
| [sinon](https://github.com/sinonjs/sinon) | `16.1.0` | `17.0.0` |


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

Updates `@types/adm-zip` from 0.5.2 to 0.5.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/adm-zip)

Updates `@types/js-yaml` from 4.0.7 to 4.0.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml)

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

Updates `@typescript-eslint/eslint-plugin` from 6.8.0 to 6.9.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.8.0 to 6.9.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.0/packages/parser)

Updates `eslint` from 8.51.0 to 8.52.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

Updates `eslint-plugin-import` from 2.28.1 to 2.29.0
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0)

Updates `nock` from 13.3.4 to 13.3.6
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.4...v13.3.6)

Updates `sinon` from 16.1.0 to 17.0.0
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v16.1.0...v17.0.0)

---
updated-dependencies:
- dependency-name: "@types/uuid"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/adm-zip"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/js-yaml"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 18:01:32 +00:00
Paolo Tranquilli
54e4af648d C++: fix autobuild pr-checks to latest codeql-cli version 2023-10-23 17:42:59 +02:00
Paolo Tranquilli
d53a59d051 C++: add deptrace pr-checks 2023-10-23 10:57:55 +02:00
Dave Bartolomeo
a291b7c6a3 Merge pull request #1962 from github/mergeback/v2.22.4-to-main-49abf0ba
Mergeback v2.22.4 refs/heads/releases/v2 into main
2023-10-20 12:52:08 -04:00
github-actions[bot]
64f799d15e Update checked-in dependencies 2023-10-20 16:22:27 +00:00
github-actions[bot]
1e9b364483 Update changelog and version after v2.22.4 2023-10-20 16:21:06 +00:00
Dave Bartolomeo
49abf0ba24 Merge pull request #1961 from github/update-v2.22.4-63470275e
Merge main into releases/v2
2023-10-20 12:18:49 -04:00
github-actions[bot]
907abca61b Update changelog for v2.22.4 2023-10-20 15:24:21 +00:00
Dave Bartolomeo
63470275e7 Merge pull request #1953 from github/update-bundle/codeql-bundle-v2.15.1
Update default bundle to 2.15.1
2023-10-19 11:34:45 -04:00
Dave Bartolomeo
b98a636a6b Merge branch 'main' into update-bundle/codeql-bundle-v2.15.1 2023-10-19 10:38:22 -04:00
Angela P Wen
4a368f64ad Add announcement on Node 16 deprecation (#1960) 2023-10-18 23:00:03 +00:00
dependabot[bot]
77bbb99abd Bump urllib3 in /python-setup/tests/poetry/python-3.8 (#1957)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.17...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 15:34:08 -07:00
dependabot[bot]
a75a0d5716 Bump urllib3 in /python-setup/tests/poetry/requests-3 (#1956)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.17...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 15:33:48 -07:00
dependabot[bot]
aa55b87f87 Bump urllib3 in /python-setup/tests/pipenv/requests-3 (#1955)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.6...2.0.7)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 14:33:37 -07:00
dependabot[bot]
b6b0833c3d Bump urllib3 in /python-setup/tests/pipenv/python-3.8 (#1954)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.6...2.0.7)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 14:33:15 -07:00
github-actions[bot]
0132448784 Add changelog note 2023-10-17 20:52:46 +00:00
github-actions[bot]
070e92e8fd Update default bundle to codeql-bundle-v2.15.1 2023-10-17 20:52:41 +00:00
Angela P Wen
bad341350a Add workflow_dispatch manual trigger (#1952) 2023-10-17 19:56:42 +00:00
dependabot[bot]
1d83e52e9a Bump the npm group with 5 updates (#1951)
* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml) | `4.0.6` | `4.0.7` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `10.0.17` | `10.0.19` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.7.5` | `6.8.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.7.5` | `6.8.0` |
| [nock](https://github.com/nock/nock) | `13.3.3` | `13.3.4` |


Updates `@types/js-yaml` from 4.0.6 to 4.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml)

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

Updates `@typescript-eslint/eslint-plugin` from 6.7.5 to 6.8.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.8.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.7.5 to 6.8.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.8.0/packages/parser)

Updates `nock` from 13.3.3 to 13.3.4
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.3...v13.3.4)

---
updated-dependencies:
- dependency-name: "@types/js-yaml"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-17 19:41:41 +00:00
Michael B. Gale
d859d17bdb Merge pull request #1946 from github/mbg/unconditioal-go-warning
Make Go path warning unconditional
2023-10-13 16:37:25 +01:00
Henry Mercer
7e7f0cc085 Merge pull request #1948 from github/mergeback/v2.22.3-to-main-0116bc2d
Mergeback v2.22.3 refs/heads/releases/v2 into main
2023-10-13 15:22:36 +01:00
github-actions[bot]
1d83a6387b Update checked-in dependencies 2023-10-13 13:39:33 +00:00
github-actions[bot]
8e460e9e00 Update changelog and version after v2.22.3 2023-10-13 13:02:57 +00:00
Henry Mercer
0116bc2df5 Merge pull request #1947 from github/update-v2.22.3-82ba90b1d
Merge main into releases/v2
2023-10-13 14:01:05 +01:00
github-actions[bot]
f5a984b113 Update changelog for v2.22.3 2023-10-13 12:31:28 +00:00
Michael B. Gale
325a0b06e9 Make Go binary path check unconditional 2023-10-13 10:26:39 +01:00
Michael B. Gale
632d58cb60 Update Go path documentation in analyze Action 2023-10-13 10:14:22 +01:00
Henry Mercer
82ba90b1d9 Merge pull request #1945 from github/henrymercer/authenticate-api-url
Authenticate when downloading CodeQL Bundle from GHES API
2023-10-12 19:02:05 +01:00
Henry Mercer
34f97d7a16 Merge pull request #1944 from github/henrymercer/sublanguage-file-coverage-fixes
Enable sub-language file coverage during interpretation and update PR check
2023-10-12 19:01:47 +01:00
Henry Mercer
74442e0a95 Add changelog note 2023-10-12 17:26:51 +01:00
Henry Mercer
bd32fab74f Provide token when downloading from GHES API 2023-10-12 17:26:42 +01:00
Nora
b584cf8321 Merge pull request #1922 from github/nora/add-commit-sha-to-database-upload
Add commit sha to database upload
2023-10-12 17:50:48 +02:00
Henry Mercer
761255a4a3 Merge pull request #1943 from github/mergeback/v2.22.2-to-main-d90b8d79
Mergeback v2.22.2 refs/heads/releases/v2 into main
2023-10-12 12:12:03 +01:00
Henry Mercer
346d5c4b07 Test sub-language file coverage in file baseline information check
We can do this now that the nightly has a version number starting with
2.15.0.
2023-10-12 11:58:09 +01:00
Henry Mercer
5950d13564 Enable sub-language file coverage in interpret-results too 2023-10-12 11:57:23 +01:00
github-actions[bot]
c1a0ad9a04 Update checked-in dependencies 2023-10-12 10:44:16 +00:00
github-actions[bot]
76a9f5c431 Update changelog and version after v2.22.2 2023-10-12 10:38:34 +00:00
Henry Mercer
d90b8d79de Merge pull request #1942 from github/update-v2.22.2-8a2cbabd4
Merge main into releases/v2
2023-10-12 11:36:04 +01:00
github-actions[bot]
175f696a4d Update changelog for v2.22.2 2023-10-12 10:09:51 +00:00
Henry Mercer
8a2cbabd43 Merge pull request #1938 from github/update-bundle/codeql-bundle-v2.15.0
Update default bundle to 2.15.0
2023-10-11 13:14:25 +01:00
Henry Mercer
a5cf70c3f1 Merge branch 'main' into update-bundle/codeql-bundle-v2.15.0 2023-10-11 12:23:42 +01:00
Henry Mercer
a67b110795 Merge pull request #1937 from github/henrymercer/new-analysis-summary-bump
Bump CLI version for new analysis summaries to v2.15.0
2023-10-10 18:32:33 +01:00
Henry Mercer
0eb279015c Merge branch 'main' into update-bundle/codeql-bundle-v2.15.0 2023-10-10 17:20:48 +01:00
github-actions[bot]
275f994944 Add changelog note 2023-10-10 16:18:35 +00:00
github-actions[bot]
d5d445b7af Update default bundle to codeql-bundle-v2.15.0 2023-10-10 16:18:31 +00:00
Henry Mercer
2a7218bdef Bump CLI version for new analysis summaries to v2.15.0
Earlier versions support new analysis summaries, but v2.15.0 improves
the quality of the summary messages.
2023-10-10 16:42:34 +01:00
Henry Mercer
78bfd29301 Merge pull request #1935 from github/henrymercer/ref-sha-input-reduce-ci-load
Remove 42 CI jobs by only running `ref` and `sha` input checks against a single CLI version
2023-10-10 16:32:56 +01:00
Henry Mercer
dfb913f660 Merge pull request #1936 from github/dependabot/npm_and_yarn/npm-07540147dc
Bump the npm group with 5 updates
2023-10-10 14:42:19 +01:00
Nora
e62d946796 Add new param to test 2023-10-10 08:48:53 +00:00
github-actions[bot]
026e833827 Update checked-in dependencies 2023-10-09 17:38:29 +00:00
dependabot[bot]
5d6442e87d Bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) | `9.0.4` | `9.0.5` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.7.3` | `6.7.5` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.7.3` | `6.7.5` |
| [eslint](https://github.com/eslint/eslint) | `8.50.0` | `8.51.0` |
| [sinon](https://github.com/sinonjs/sinon) | `16.0.0` | `16.1.0` |


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

Updates `@typescript-eslint/eslint-plugin` from 6.7.3 to 6.7.5
- [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/v6.7.5/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.7.3 to 6.7.5
- [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/v6.7.5/packages/parser)

Updates `eslint` from 8.50.0 to 8.51.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.50.0...v8.51.0)

Updates `sinon` from 16.0.0 to 16.1.0
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v16.0.0...v16.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 17:35:49 +00:00
Henry Mercer
4ab92370dd Merge pull request #1927 from github/henrymercer/reduce-log-duplication
Reduce duplication in the logs when errors occur in CLI commands
2023-10-09 13:30:24 +01:00
Henry Mercer
83d1db3366 Merge branch 'main' into henrymercer/reduce-log-duplication 2023-10-09 12:53:58 +01:00
Henry Mercer
2125352e3e Merge pull request #1934 from github/mergeback/v2.22.1-to-main-fdcae64e
Mergeback v2.22.1 refs/heads/releases/v2 into main
2023-10-09 12:37:17 +01:00
Henry Mercer
d52a751f8f Only run ref and sha input checks against a single CLI version
These checks aren't affected by the CLI version, so just run them with
the default CLI.
2023-10-09 12:09:21 +01:00
github-actions[bot]
947b43a6b6 Update checked-in dependencies 2023-10-09 11:06:11 +00:00
github-actions[bot]
788783aba5 Update changelog and version after v2.22.1 2023-10-09 11:04:27 +00:00
Henry Mercer
fdcae64e14 Merge pull request #1932 from github/update-v2.22.1-18e6c398c
Merge main into releases/v2
2023-10-09 12:02:20 +01:00
github-actions[bot]
8554648f41 Update changelog for v2.22.1 2023-10-09 09:46:39 +00:00
Henry Mercer
18e6c398ce Merge pull request #1930 from github/aeisenberg-patch-1
Update CHANGELOG.md
2023-10-09 10:30:49 +01:00
Henry Mercer
5e34d08d9e Link PR and fix case of Python 2023-10-09 09:55:04 +01:00
Michael B. Gale
faf91ca6bd Merge pull request #1926 from github/mbg/suppress-go-workaround-warning
Suppress Go workaround warning if autobuilder ran
2023-10-09 09:42:25 +01:00
Nora
8193a92e41 Await commitOid 2023-10-09 07:43:35 +00:00
Michael B. Gale
ffaea6c837 Merge branch 'main' into mbg/suppress-go-workaround-warning 2023-10-08 18:07:40 +01:00
Andrew Eisenberg
0a0988c4b2 Update CHANGELOG.md
Add missing work and make it clear that failure only applies when trying to downgrade to 3.11.
2023-10-07 09:30:52 -07:00
Andrew Eisenberg
0d5c2e0228 Merge pull request #1928 from github/aeisenberg/fix-python312
Add a fix for python 3.12
2023-10-06 16:42:31 -07:00
Andrew Eisenberg
94b6970619 Update CHANGELOG.md 2023-10-06 14:49:04 -07:00
Andrew Eisenberg
669c61022c Add a feature flag to turn this off for newer versions of codeql 2023-10-06 14:17:01 -07:00
Andrew Eisenberg
028bacb8e9 Add integration test
Also:

- Update changelog
- Fix comments in check_python script
2023-10-06 13:52:34 -07:00
Andrew Eisenberg
d0916526cd Add a fix for python 3.12
The python extractor does not yet support 3.12. Check for this and
instead make sure we run python 3.11. Only need to check on windows
since we are extremely unlikely to be running 3.12 on linux or macos.
2023-10-06 13:05:18 -07:00
Henry Mercer
102a12bba4 Add changelog note 2023-10-06 16:00:36 +01:00
Henry Mercer
8295705640 Reduce duplication in the logs when errors occur in CLI commands 2023-10-06 15:53:22 +01:00
Michael B. Gale
4eccc6dac4 Suppress Go workaround warning if autobuilder ran 2023-10-06 15:11:31 +01:00
Nora
aed2e7f47f Add commit id to params 2023-10-06 13:16:13 +00:00
Henry Mercer
a2dc5ffaff Merge pull request #1925 from github/mergeback/v2.22.0-to-main-2cb752a8
Mergeback v2.22.0 refs/heads/releases/v2 into main
2023-10-06 12:36:34 +01:00
github-actions[bot]
b6ea09e3e4 Update checked-in dependencies 2023-10-06 11:12:35 +00:00
github-actions[bot]
fd3d78671c Update changelog and version after v2.22.0 2023-10-06 10:47:42 +00:00
Henry Mercer
2cb752a87e Merge pull request #1924 from github/update-v2.22.0-3f7850a17
Merge main into releases/v2
2023-10-06 11:45:52 +01:00
Henry Mercer
e50f53baa1 Add changelog note for tracing Go 1.21 2023-10-06 11:20:43 +01:00
github-actions[bot]
0a65c007f6 Update changelog for v2.22.0 2023-10-06 09:45:48 +00:00
hoshino tsuyoshi
3f7850a179 Improve downloading log message (#1920)
Previously, a trailing `.` character was recognized as part of the URL in GitHub Actions log output. We add an additional space before it to distinguish.
2023-10-05 21:21:52 +00:00
Henry Mercer
27235304e0 Merge pull request #1923 from github/henrymercer/fix-resolve-environment-aliases
Fix using the `resolve-environment` Action with language aliases
2023-10-05 18:48:18 +01:00
Henry Mercer
8f0e8b0890 Tweak language parsing to improve clarity 2023-10-05 16:26:47 +01:00
Henry Mercer
f243294ab7 Extend PR check to test resolve-environment works with language alias 2023-10-05 15:57:53 +01:00
Nora
075eb6aaea Use getCommitOid to get the id 2023-10-05 14:47:51 +00:00
Michael B. Gale
1ea6a10947 Merge pull request #1909 from github/mbg/go-1.21-workaround 2023-10-05 15:31:48 +01:00
Henry Mercer
e26ed57a22 Defer language aliasing to CLI when appropriate 2023-10-05 15:27:51 +01:00
Henry Mercer
0ac7669167 Fix using resolve-environment Action with language aliases
This impacted default setup configurations that analyzed Go alongside at
least one of the following languages:
- C/C++
- Java/Kotlin
- JavaScript/TypeScript
2023-10-05 14:54:24 +01:00
Michael B. Gale
235bdca565 Use markdownMessage 2023-10-05 14:27:34 +01:00
Michael B. Gale
94f3e9b563 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-10-05 14:27:09 +01:00
Michael B. Gale
3b2fee487e Include mkdirSync in try/catch 2023-10-05 13:48:56 +01:00
Michael B. Gale
a144bf5d7f Store diagnostics in language-specific database 2023-10-05 13:39:58 +01:00
Michael B. Gale
4154eb799b Fix: workflow name and description 2023-10-05 13:29:18 +01:00
Michael B. Gale
7f4a9481a7 Fix: create codeql-action diagnostics directory 2023-10-05 13:20:34 +01:00
Michael B. Gale
faf7528b44 Add integration test for Go workaround diagnostic 2023-10-05 13:11:37 +01:00
Michael B. Gale
2b193c5ab5 Store diagnostics in a codeql-action directory 2023-10-05 13:05:46 +01:00
Michael B. Gale
eb71a60380 Emit diagnostic when Go was changed after init 2023-10-05 12:52:06 +01:00
Michael B. Gale
36777d2236 Add utilities to produce diagnostics 2023-10-05 12:50:19 +01:00
Nora
1727de39fe Add commit sha to database upload 2023-10-05 09:49:13 +00:00
Michael B. Gale
c8dd2bc90f Add integration test for workaround 2023-10-05 10:46:10 +01:00
Michael B. Gale
db9f2c5968 Add test for isSupportedToolsFeature 2023-10-05 10:33:33 +01:00
Michael B. Gale
738030674f Trim file output 2023-10-05 10:25:31 +01:00
Michael B. Gale
68d0b65ee5 Add another level to tempBinPath 2023-10-04 20:03:32 +01:00
Igwe Kalu
517782a2a0 Improve description of codeql-action/init languages input (#1919) 2023-10-04 12:01:23 -07:00
Michael B. Gale
bb70bab648 Add comment explaining workaround 2023-10-04 19:57:11 +01:00
Michael B. Gale
41a13ec084 Fix comment in analyse Action 2023-10-04 19:53:23 +01:00
Michael B. Gale
9a5a628613 Improve getFileType
- Change parameter name
- Add more documentation
2023-10-04 19:50:02 +01:00
Michael B. Gale
8ac187720c Allow other patch versions of Go in workflows 2023-10-04 19:46:36 +01:00
Michael B. Gale
f6d9b6bcfa Improve/add log messages 2023-10-04 19:45:09 +01:00
Michael B. Gale
7b0b42afec Remove FeaturesInVersionResult 2023-10-04 19:45:08 +01:00
Michael B. Gale
abb71f14cf Add CLI feature flag to disable Go workaround 2023-10-04 19:45:08 +01:00
Michael B. Gale
604448043e Add which go output in warning 2023-10-04 19:45:08 +01:00
Michael B. Gale
4cee553ea6 Output stdout upon error in getFileType 2023-10-04 19:45:08 +01:00
Michael B. Gale
df098abd11 Set DID_AUTOBUILD_GOLANG in runAutobuild 2023-10-04 19:45:08 +01:00
Michael B. Gale
4611ff9b23 Cross-check Go binary in analyze Action 2023-10-04 19:45:04 +01:00
Michael B. Gale
2bd75f528c Install Go wrapper script if necessary 2023-10-04 17:23:52 +01:00
Michael B. Gale
3c15d2383b Add utility function to run file command 2023-10-04 17:23:52 +01:00
Michael B. Gale
c08086a26a Add new environment variable for Go binary path 2023-10-04 17:23:52 +01:00
Michael B. Gale
d718153f0a Use Go 1.21 for Go tracing checks 2023-10-04 17:23:51 +01:00
Michael B. Gale
3fb6719bea Merge pull request #1918 from github/mbg/support-version-features
Support `features` key in `version` JSON output
2023-10-04 17:23:13 +01:00
Michael B. Gale
bcbb900532 Rename VersionOutput to VersionInfo 2023-10-04 15:54:34 +01:00
Michael B. Gale
49b94f1a2d Remove unused properties from VersionOutput 2023-10-04 15:51:26 +01:00
Michael B. Gale
bb67eddd77 Wrap JSON parsing in try/catch 2023-10-04 15:49:25 +01:00
Michael B. Gale
e827ad5b71 Move makeVersionOutput to testing-utils.js 2023-10-04 15:49:04 +01:00
Michael B. Gale
a402be8739 Fix linter error 2023-10-04 11:43:14 +01:00
Michael B. Gale
74b46628c3 Support features key in version JSON output 2023-10-04 11:28:28 +01:00
dependabot[bot]
3dd4ad872b Bump the actions-setup-swift group (#1912)
Bumps the actions-setup-swift group in /.github/actions/setup-swift with 1 update: [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift).

- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](cdcbe8e35d...f51889efb5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-10-03 15:21:00 -07:00
dependabot[bot]
b686e07c2b Bump urllib3 in /python-setup/tests/pipenv/python-3.8 (#1917)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.4...2.0.6)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 17:49:02 +00:00
dependabot[bot]
7de46310d9 Bump urllib3 in /python-setup/tests/poetry/python-3.8 (#1916)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.7 to 1.26.17.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.7...1.26.17)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:25:36 -07:00
dependabot[bot]
896a68d162 Bump urllib3 in /python-setup/tests/poetry/requests-3 (#1915)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.7 to 1.26.17.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.7...1.26.17)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:25:17 -07:00
dependabot[bot]
5f88bb1ffa Bump urllib3 in /python-setup/tests/pipenv/requests-3 (#1914)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.4...2.0.6)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:24:54 -07:00
dependabot[bot]
90f8ed12cc Bump the npm group with 3 updates (#1911)
* Bump the npm group with 3 updates

Bumps the npm group with 3 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `@typescript-eslint/eslint-plugin` from 6.7.2 to 6.7.3
- [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/v6.7.3/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.7.2 to 6.7.3
- [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/v6.7.3/packages/parser)

Updates `eslint-plugin-github` from 4.10.0 to 4.10.1
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.10.0...v4.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-10-02 16:31:08 -07:00
Aditya Sharad
ed2a90b161 Merge pull request #1910 from github/henrymercer/remove-ml-powered-queries
Remove ML-powered queries
2023-10-02 14:40:55 -07:00
Henry Mercer
7b16c0dad0 Improve method name for addQueriesFromWorkflow. 2023-10-02 17:35:03 +01:00
Henry Mercer
37a2d1fe3c Remove ML-powered queries PR checks 2023-10-02 17:29:54 +01:00
Henry Mercer
5dac60ecef Add changelog note 2023-10-02 17:20:58 +01:00
Henry Mercer
ebbadee09e Remove ML-powered queries 2023-10-02 17:20:50 +01:00
Aditya Sharad
a370ce344f Merge pull request #1898 from Panquesito7/checkout_v4
Use `actions/checkout@v4` in test helper
2023-09-28 15:59:34 -07:00
David Leal
66572c69b0 Merge branch 'main' into checkout_v4 2023-09-28 14:31:04 -06:00
David Leal
e0103eab17 Use actions/checkout@v4 2023-09-28 20:30:31 +00:00
Henry Mercer
e7a6fa9589 Merge pull request #1907 from github/henrymercer/deprecate-codeql-2.9
Bump minimum CodeQL version to 2.10.5
2023-09-27 21:36:22 +01:00
Henry Mercer
f59bf3c458 Fix expected artifact directory name for semver versions 2023-09-27 19:44:41 +01:00
Henry Mercer
6e3f5b0184 Prompt maintainers to start process when GHES version deprecated 2023-09-27 19:40:26 +01:00
Henry Mercer
1d70a98580 Document CodeQL deprecation process 2023-09-27 19:10:31 +01:00
Henry Mercer
e4ef094279 Merge branch 'main' into henrymercer/deprecate-codeql-2.9 2023-09-27 17:18:42 +01:00
Henry Mercer
2cc1651ead Merge pull request #1906 from github/mergeback/v2.21.9-to-main-ddccb873
Mergeback v2.21.9 refs/heads/releases/v2 into main
2023-09-27 17:14:03 +01:00
Henry Mercer
a6484fa0f6 Merge pull request #1896 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-09-27 16:44:20 +01:00
Henry Mercer
9ef3267030 Merge pull request #1904 from github/henrymercer/tweak-cgroup-ram-logging
Don't log invalid cgroup memory limits
2023-09-27 16:43:26 +01:00
Henry Mercer
219066c343 Fix error in generated workflow 2023-09-27 16:41:29 +01:00
Henry Mercer
a9a0f3b4c0 Add changelog note 2023-09-27 16:23:10 +01:00
Henry Mercer
467bfa1cff Update CodeQL versions tested in PR checks 2023-09-27 16:21:16 +01:00
Henry Mercer
1d5eed8d40 Remove deprecated functionality 2023-09-27 16:16:13 +01:00
Henry Mercer
96fa24c6ba Bump minimum CodeQL version to 2.10.5 2023-09-27 16:08:27 +01:00
Henry Mercer
f1752b0b55 Bump minor version 2023-09-27 16:07:45 +01:00
github-actions[bot]
7efe1c9625 Update checked-in dependencies 2023-09-27 15:01:27 +00:00
github-actions[bot]
0dd2eafff0 Update changelog and version after v2.21.9 2023-09-27 14:58:13 +00:00
Alexander Eyers-Taylor
ddccb87388 Merge pull request #1905 from github/update-v2.21.9-27cb1e1de
Merge main into releases/v2
2023-09-27 15:56:30 +01:00
github-actions[bot]
d8cb5a2a0f Update changelog for v2.21.9 2023-09-27 14:21:29 +00:00
Henry Mercer
378bbcd274 Don't log invalid cgroup memory limits 2023-09-27 13:56:20 +01:00
dependabot[bot]
27cb1e1de5 Bump the npm group with 6 updates (#1902)
* Bump the npm group with 6 updates

Bumps the npm group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@octokit/types](https://github.com/octokit/types.ts) | `11.1.0` | `12.0.0` |
| [@types/adm-zip](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/adm-zip) | `0.5.1` | `0.5.2` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.2` | `7.5.3` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `10.0.16` | `10.0.17` |
| [eslint](https://github.com/eslint/eslint) | `8.49.0` | `8.50.0` |
| [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `3.6.0` | `3.6.1` |


Updates `@octokit/types` from 11.1.0 to 12.0.0
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v11.1.0...v12.0.0)

Updates `@types/adm-zip` from 0.5.1 to 0.5.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/adm-zip)

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

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

Updates `eslint` from 8.49.0 to 8.50.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0)

Updates `eslint-import-resolver-typescript` from 3.6.0 to 3.6.1
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.6.0...v3.6.1)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@types/adm-zip"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-26 10:34:03 -07:00
Henry Mercer
4818fdd8ec Merge pull request #1903 from github/henrymercer/sublanguage-file-coverage
Enable sub-language file coverage behind a feature flag
2023-09-26 17:30:08 +01:00
Alexander Eyers-Taylor
e548601be3 Merge pull request #1897 from github/update-bundle/codeql-bundle-v2.14.6
Update default bundle to 2.14.6
2023-09-26 14:03:58 +01:00
Alexander Eyers-Taylor
cc6542087a Merge branch 'main' into update-bundle/codeql-bundle-v2.14.6 2023-09-26 13:37:33 +01:00
Henry Mercer
c95737bb43 Add changelog note 2023-09-26 11:38:39 +01:00
Henry Mercer
41d2ffad87 Enable sub-language file coverage behind a ff 2023-09-26 11:38:39 +01:00
Henry Mercer
650a85ef6d Merge pull request #1901 from github/henrymercer/check-for-duplicated-languages
Warn when workflow analyzes the same language twice
2023-09-25 14:25:34 +01:00
Henry Mercer
0de36d4594 Merge branch 'main' into henrymercer/check-for-duplicated-languages 2023-09-22 19:14:37 +01:00
Henry Mercer
0dfaf4ef65 Add a changelog note 2023-09-22 19:13:56 +01:00
Henry Mercer
d1a917f445 Test that workflow with two different languages doesn't produce an error 2023-09-22 19:08:38 +01:00
Henry Mercer
431174f620 Factor out groupLanguagesByExtractor 2023-09-22 18:55:52 +01:00
Nick Rolfe
3078f51bf0 Merge pull request #1900 from github/nickrolfe/fine-grained-version
Bump min. version for evaluator parallelism feature flag
2023-09-22 17:44:44 +01:00
Henry Mercer
d0c18ba23e Warn when workflow analyzes the same language twice 2023-09-22 14:54:03 +01:00
Nick Rolfe
724d64319a Bump min. version for evaluator parallelism feature flag
Since we suspect fine-grained parallelism may make the OOM issues worse,
we don't want to enable it on 2.14.0-2.14.5, even though they support
it.
2023-09-22 14:43:03 +01:00
Paolo Tranquilli
49aaa9a420 Merge pull request #1889 from github/redsun82/cpp-autoinstall-dependencies
C++: introduce automatic installation of dependencies in the autobuilder
2023-09-21 16:49:24 +02:00
Paolo Tranquilli
c21e1dd0da Lint and build 2023-09-21 16:23:27 +02:00
Paolo Tranquilli
53bed11e0b Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-09-21 16:11:21 +02:00
Paolo Tranquilli
ab8159054c Add changelog entry 2023-09-20 16:33:46 +02:00
Paolo Tranquilli
765807bee7 Add RUNNER_ENVIRONMENT to the list of known default setup variables 2023-09-20 14:08:00 +02:00
Paolo Tranquilli
bf2187592f C++: simplify CppDependencyInstallation interface 2023-09-20 14:05:12 +02:00
Paolo Tranquilli
c4c06786f2 C++: introduce automatic installation of dependencies in the autobuilder
This introduces the possibility to automatically install dependencies
when running the C++ autobuilder on an Ubuntu runner, that will be
available with upcoming version 2.15.0.

An experimental `cpp-autoinstall-dependencies` input is added to the
`autobuild` action. When not set, the default is driven by a feature
flag.
2023-09-20 14:05:12 +02:00
github-actions[bot]
59aaff8718 Add changelog note 2023-09-20 10:53:17 +00:00
github-actions[bot]
5897cf73c4 Update default bundle to codeql-bundle-v2.14.6 2023-09-20 10:53:12 +00:00
github-actions[bot]
d467036438 Update supported GitHub Enterprise Server versions 2023-09-20 00:10:40 +00:00
Angela P Wen
8e0b1c74b1 Add continueOnError: true for debug artifact upload (#1895) 2023-09-19 15:10:13 -07:00
Henry Mercer
01b8760f90 Merge pull request #1894 from github/mergeback/v2.21.8-to-main-6a28655e
Mergeback v2.21.8 refs/heads/releases/v2 into main
2023-09-19 12:07:52 +01:00
github-actions[bot]
74e25cdac8 Update checked-in dependencies 2023-09-19 10:40:42 +00:00
github-actions[bot]
eac8f8cd93 Update changelog and version after v2.21.8 2023-09-19 10:19:21 +00:00
Henry Mercer
6a28655e3d Merge pull request #1893 from github/update-v2.21.8-dd1128f4f
Merge main into releases/v2
2023-09-19 11:17:36 +01:00
github-actions[bot]
2ca983a793 Update changelog for v2.21.8 2023-09-19 09:31:44 +00:00
dependabot[bot]
dd1128f4f1 Bump the npm group with 11 updates (#1892)
* Bump the npm group with 11 updates

Bumps the npm group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `1.1.1` | `1.1.2` |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.0` | `1.10.1` |
| [uuid](https://github.com/uuidjs/uuid) | `9.0.0` | `9.0.1` |
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) | `9.0.3` | `9.0.4` |
| [@types/adm-zip](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/adm-zip) | `0.5.0` | `0.5.1` |
| [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml) | `4.0.5` | `4.0.6` |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.1` | `7.5.2` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.5.0` | `6.7.2` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.6.0` | `6.7.2` |
| [eslint](https://github.com/eslint/eslint) | `8.48.0` | `8.49.0` |
| [sinon](https://github.com/sinonjs/sinon) | `15.2.0` | `16.0.0` |


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

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

Updates `uuid` from 9.0.0 to 9.0.1
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1)

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

Updates `@types/adm-zip` from 0.5.0 to 0.5.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/adm-zip)

Updates `@types/js-yaml` from 4.0.5 to 4.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml)

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

Updates `@typescript-eslint/eslint-plugin` from 6.5.0 to 6.7.2
- [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/v6.7.2/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.6.0 to 6.7.2
- [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/v6.7.2/packages/parser)

Updates `eslint` from 8.48.0 to 8.49.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.49.0)

Updates `sinon` from 15.2.0 to 16.0.0
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.2.0...v16.0.0)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/uuid"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/adm-zip"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/js-yaml"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-18 20:01:16 +00:00
Henry Mercer
f3a128e0fe Merge pull request #1891 from github/henrymercer/fix-cgroup-limits
Fix reading `cgroup` limits on `ubuntu-20.04`
2023-09-18 17:25:00 +01:00
Henry Mercer
6846be007d Address review comments 2023-09-18 16:00:59 +01:00
Henry Mercer
0e74cd1660 Handle cgroup file containing MAX_INT on ubuntu-20.04 2023-09-18 13:44:02 +01:00
Henry Mercer
379f89dc53 Log cgroup RAM limits 2023-09-18 13:05:29 +01:00
Henry Mercer
253d9cf358 Matrix CodeQL CI job over all runner images 2023-09-18 12:56:35 +01:00
Henry Mercer
4254f3a4c1 Merge pull request #1888 from github/henrymercer/constrained-ram
Respect RAM constraints imposed by Linux cgroups
2023-09-18 10:40:41 +01:00
Henry Mercer
9bfb9ba527 Handle files that exist but whose contents are not integers 2023-09-15 18:23:25 +01:00
Henry Mercer
d4c26876d3 Improve docs 2023-09-15 18:17:13 +01:00
Henry Mercer
d6f9faae0d Respect RAM constraints imposed by Linux cgroups 2023-09-15 18:09:37 +01:00
Henry Mercer
c459726691 Merge pull request #1884 from github/henrymercer/deprecation-warning-for-codeql-2.10.x
Add a deprecation warning for CodeQL 2.10.*
2023-09-15 17:47:36 +01:00
Henry Mercer
a087b01cdd Merge branch 'main' into henrymercer/deprecation-warning-for-codeql-2.10.x 2023-09-15 12:04:01 +01:00
Henry Mercer
f3051ed54e Merge pull request #1883 from github/henrymercer/language-aliasing
Add support for aliasing languages like C/C++, Java/Kotlin, and JS/TS
2023-09-15 12:00:12 +01:00
Henry Mercer
860e98cc4a Update changelog note 2023-09-15 11:16:37 +01:00
Henry Mercer
3ffd6c071a Update PR check description 2023-09-15 11:12:41 +01:00
Henry Mercer
2d646a3990 Merge pull request #1887 from github/henrymercer/add-token-to-update-dependencies
Add GitHub token to update dependencies workflow
2023-09-15 10:23:49 +01:00
Henry Mercer
a9313c9016 Merge pull request #1881 from github/henrymercer/fix-update-ghes-versions
Update ignored version number in GHES versions automation
2023-09-15 10:21:57 +01:00
Chuan-kai Lin
5f18c9ab80 Merge pull request #1886 from github/mergeback/v2.21.7-to-main-04daf014
Mergeback v2.21.7 refs/heads/releases/v2 into main
2023-09-14 10:37:27 -07:00
Henry Mercer
2c22b37a68 Add GitHub token to update dependencies workflow 2023-09-14 18:14:24 +01:00
github-actions[bot]
c07fd68e12 Update checked-in dependencies 2023-09-14 17:03:42 +00:00
github-actions[bot]
c33f0b4fc7 Update changelog and version after v2.21.7 2023-09-14 16:58:59 +00:00
Chuan-kai Lin
04daf014b5 Merge pull request #1885 from github/update-v2.21.7-e982de4fb
Merge main into releases/v2
2023-09-14 09:56:54 -07:00
github-actions[bot]
bb3bc25861 Update changelog for v2.21.7 2023-09-14 16:10:20 +00:00
Henry Mercer
ac4145f467 Add a deprecation warning for CodeQL 2.10.* 2023-09-14 16:34:07 +01:00
Henry Mercer
87a64c9c4c Add changelog note 2023-09-14 16:11:20 +01:00
Henry Mercer
897ddf2662 Add PR check 2023-09-14 16:11:20 +01:00
Henry Mercer
74714a34ca Implement support for language aliasing 2023-09-14 16:11:20 +01:00
Chuan-kai Lin
e982de4fb4 Merge pull request #1882 from github/update-bundle/codeql-bundle-v2.14.5
Update default bundle to 2.14.5
2023-09-14 08:04:05 -07:00
github-actions[bot]
19c02a4d16 Add changelog note 2023-09-14 14:29:33 +00:00
github-actions[bot]
71c7e82837 Update default bundle to codeql-bundle-v2.14.5 2023-09-14 14:29:25 +00:00
Henry Mercer
8b733e71a6 Update ignored version number in GHES versions automation 2023-09-14 12:27:25 +01:00
Chuan-kai Lin
c6c77c8c2d Merge pull request #1877 from cklin/update-dependencies
Remove --pr in update-dependencies.yml
2023-09-13 11:46:02 -07:00
Chuan-kai Lin
8efd40b126 Merge pull request #1876 from github/mergeback/v2.21.6-to-main-701f152f
Mergeback v2.21.6 refs/heads/releases/v2 into main
2023-09-13 10:20:39 -07:00
Chuan-kai Lin
77a54b68d4 Remove --pr in update-dependencies.yml 2023-09-13 09:49:02 -07:00
github-actions[bot]
f664957aa4 Update checked-in dependencies 2023-09-13 16:41:51 +00:00
github-actions[bot]
70c4c0fc21 Update changelog and version after v2.21.6 2023-09-13 16:39:21 +00:00
Chuan-kai Lin
701f152f28 Merge pull request #1875 from github/update-v2.21.6-6a6a82470
Merge main into releases/v2
2023-09-13 09:36:35 -07:00
Chuan-kai Lin
1b6299040a Fix misplaced changelog entry 2023-09-13 08:43:19 -07:00
github-actions[bot]
5462f69153 Update changelog for v2.21.6 2023-09-13 14:39:25 +00:00
Chuan-kai Lin
6a6a824702 Merge pull request #1873 from github/update-bundle/codeql-bundle-v2.14.4
Update default bundle to 2.14.4
2023-09-12 07:18:14 -07:00
github-actions[bot]
88c7a5c4cc Add changelog note 2023-09-08 22:29:07 +00:00
github-actions[bot]
da65035498 Update default bundle to codeql-bundle-v2.14.4 2023-09-08 22:29:04 +00:00
Henry Mercer
43750fe4fc Merge pull request #1872 from github/henrymercer/user-errors-for-upload-sarif
Mark invalid SARIF errors as user errors in the `upload-sarif` Action
2023-09-07 22:46:29 +01:00
Henry Mercer
a7c12a5225 Address PR comments 2023-09-07 20:44:15 +01:00
Henry Mercer
7218de5369 Merge branch 'main' into henrymercer/user-errors-for-upload-sarif 2023-09-07 19:40:15 +01:00
Henry Mercer
4764dce02f Merge pull request #1866 from github/henrymercer/enable-scaling-reserved-ram-ghes
Enable scaling reserved RAM on GHES
2023-09-07 19:38:36 +01:00
Henry Mercer
077672fa88 Merge branch 'main' into henrymercer/enable-scaling-reserved-ram-ghes 2023-09-06 18:16:42 +01:00
Henry Mercer
583a1019cc Mark invalid SARIF errors as user errors in the upload-sarif Action 2023-09-06 18:14:30 +01:00
Henry Mercer
45d66afb31 Merge pull request #1870 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-09-06 17:57:07 +01:00
github-actions[bot]
f4683e88f3 Update supported GitHub Enterprise Server versions 2023-09-06 00:10:35 +00:00
Henry Mercer
798e74c57d Merge pull request #1867 from github/henrymercer/remove-language-baseline-ff
Enable language-specific baseline configuration on GHES
2023-09-05 18:25:33 +01:00
Henry Mercer
37d8d03606 Merge pull request #1868 from github/henrymercer/improve-dependency-update
Improve usability of update dependencies workflow
2023-09-05 16:38:52 +01:00
Tom Bolton
7bffcb42ec Merge pull request #1864 from github/dependabot/npm_and_yarn/npm-18a1c3fa4c
Bump the npm group with 3 updates
2023-09-05 16:22:51 +01:00
Tom Bolton
94293438d4 Merge pull request #1865 from github/dependabot/github_actions/actions-8a9da2b879
Bump the actions group with 1 update
2023-09-05 16:04:22 +01:00
Henry Mercer
e6cb4feff9 Improve usability of update dependencies workflow 2023-09-05 16:36:41 +02:00
tombolton
85cd5ad8b4 update checkout version in pr-checks/checks 2023-09-05 15:16:58 +01:00
tombolton
d5d81f40c6 bump checkout to v4 in sync.py 2023-09-05 13:54:16 +01:00
Henry Mercer
bec071acb9 Add changelog note 2023-09-05 14:48:21 +02:00
Henry Mercer
5150b5c6ab Add changelog note 2023-09-05 14:45:00 +02:00
Henry Mercer
270788d6fd Remove language-specific baseline configuration flag 2023-09-05 14:36:51 +02:00
Henry Mercer
10389f671b Remove scaling reserved RAM feature flag 2023-09-05 14:30:56 +02:00
Henry Mercer
574dbbc517 Allow customizing the scaling threshold with an environment variable 2023-09-05 13:14:55 +02:00
Henry Mercer
466ed42568 Enable scaling reserved RAM on GHES 2023-09-05 12:50:34 +02:00
dependabot[bot]
321d3e057d Bump the actions group with 1 update
Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).

- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:00:31 +00:00
github-actions[bot]
3115e0f9c4 Update checked-in dependencies 2023-09-04 17:19:10 +00:00
dependabot[bot]
7aafc67ccf Bump the npm group with 3 updates
Bumps the npm group with 3 updates: [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


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

Updates `@typescript-eslint/parser` from 6.5.0 to 6.6.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.6.0/packages/parser)

Updates `eslint-plugin-github` from 4.9.2 to 4.10.0
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.9.2...v4.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 17:15:55 +00:00
Angela P Wen
07d42ec34e Improve logging for Go autobuild when invoked in analyze step (#1862) 2023-08-31 11:39:07 +00:00
Andrew Eisenberg
c5acfe3b0d Merge pull request #1860 from github/aeisenberg/better-error-messages
Add better error messages when determining merge-base
2023-08-29 13:51:10 -07:00
Andrew Eisenberg
469786860d Address more comments from PR 2023-08-29 13:20:55 -07:00
Andrew Eisenberg
e603106d1a Add change note 2023-08-29 13:11:48 -07:00
Andrew Eisenberg
09940b4bb9 Address comments from PR 2023-08-29 12:11:32 -07:00
dependabot[bot]
8ecc33d259 Bump the npm group with 5 updates (#1856)
* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.0` | `7.5.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.4.1` | `6.5.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.4.1` | `6.5.0` |
| [eslint](https://github.com/eslint/eslint) | `8.47.0` | `8.48.0` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.1.6` | `5.2.2` |


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

Updates `@typescript-eslint/eslint-plugin` from 6.4.1 to 6.5.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.4.1 to 6.5.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/parser)

Updates `eslint` from 8.47.0 to 8.48.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

Updates `typescript` from 5.1.6 to 5.2.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.6...v5.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-29 04:47:41 -07:00
Andrew Eisenberg
d721f69753 Add better error messages when determining merge-base
Avoid printing scary error messages to console when the current
directory is not a git repo. Instead provide a better reason for the git
failure and continue on.
2023-08-28 15:50:30 -07:00
Dave Bartolomeo
b88b5503aa Merge pull request #1859 from github/mergeback/v2.21.5-to-main-00e563ea
Mergeback v2.21.5 refs/heads/releases/v2 into main
2023-08-28 15:18:47 -04:00
github-actions[bot]
f644ffe4b2 Update checked-in dependencies 2023-08-28 18:54:38 +00:00
github-actions[bot]
7cd044345e Update changelog and version after v2.21.5 2023-08-28 18:37:27 +00:00
Dave Bartolomeo
00e563ead9 Merge pull request #1858 from github/update-v2.21.5-100912429
Merge main into releases/v2
2023-08-28 14:35:05 -04:00
github-actions[bot]
7323c2ac6b Update changelog for v2.21.5 2023-08-28 17:51:24 +00:00
Dave Bartolomeo
100912429f Merge pull request #1845 from github/update-bundle/codeql-bundle-v2.14.3
Update default bundle to 2.14.3
2023-08-25 11:40:49 -04:00
Dave Bartolomeo
a2d14d32b8 Merge branch 'main' into update-bundle/codeql-bundle-v2.14.3 2023-08-25 10:54:01 -04:00
Ian Lynagh
ff9cb435df Merge pull request #1853 from github/igfoo/kot1.9.10
Kotlin: CodeQL >= 2.13.4 supports 1.9.10.
2023-08-24 19:10:19 +01:00
Ian Lynagh
2f913c1249 npm run build 2023-08-24 17:57:40 +01:00
Ian Lynagh
7dab60079b Put upper limit on the CodeQL versions for which we override the Kotlin limit
Otherwise it'll be lower than the default at some point in the future.
2023-08-24 17:56:31 +01:00
Ian Lynagh
862b2cf102 Add a changelog entry for the Kotlin 1.9.10 support 2023-08-24 17:49:56 +01:00
Ian Lynagh
070dd05edd npm run build 2023-08-24 15:15:12 +01:00
Ian Lynagh
ff95d147d6 Kotlin: Fix lint 2023-08-24 15:14:49 +01:00
Ian Lynagh
30fe0c4907 npm run build 2023-08-24 14:57:53 +01:00
Ian Lynagh
e5813484cd Kotlin: CodeQL >= 2.13.4 supports 1.9.10. 2023-08-24 14:57:05 +01:00
Henry Mercer
9a53fd0577 Merge pull request #1848 from sabrowning1/main
Update docs links in the README
2023-08-23 15:47:06 +01:00
Sam Browning
dfb560cac1 Merge branch 'github:main' into main 2023-08-23 08:13:29 -04:00
Sam Browning
5c8be669de Merge pull request #1 from sabrowning1/sabrowning1/update-README-links
Update docs links in the README
2023-08-23 08:13:16 -04:00
Henry Mercer
14877a1345 Merge pull request #1847 from github/dependabot/npm_and_yarn/npm-522ac6628f
Bump the npm group with 4 updates
2023-08-21 19:21:24 +01:00
Henry Mercer
bc08098689 Merge pull request #1846 from github/dependabot/github_actions/dot-github/actions/setup-swift/actions-setup-swift-487d23c2d8
Bump the actions-setup-swift group in /.github/actions/setup-swift with 1 update
2023-08-21 19:00:04 +01:00
github-actions[bot]
02c45745e3 Update checked-in dependencies 2023-08-21 17:52:18 +00:00
dependabot[bot]
67f7ac2add Bump the npm group with 4 updates
Bumps the npm group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) and [nock](https://github.com/nock/nock).


Updates `@typescript-eslint/eslint-plugin` from 6.4.0 to 6.4.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/v6.4.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.4.0 to 6.4.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/v6.4.1/packages/parser)

Updates `eslint-plugin-import` from 2.28.0 to 2.28.1
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.0...v2.28.1)

Updates `nock` from 13.3.2 to 13.3.3
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.2...v13.3.3)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 17:48:12 +00:00
dependabot[bot]
fbb8195699 Bump the actions-setup-swift group
Bumps the actions-setup-swift group in /.github/actions/setup-swift with 1 update: [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift).

- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](65540b95f5...cdcbe8e35d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 17:39:22 +00:00
Sam Browning
66572f0900 Update README.md 2023-08-21 11:37:17 -04:00
github-actions[bot]
e755a052f0 Add changelog note 2023-08-18 23:37:40 +00:00
github-actions[bot]
37628e79a4 Update default bundle to codeql-bundle-v2.14.3 2023-08-18 23:37:35 +00:00
Ian Lynagh
e4262713b5 Merge pull request #1844 from github/igfoo/lombok_no_overwrite
Lombok: Don't set env var if it's already set
2023-08-18 19:57:50 +01:00
Ian Lynagh
ddf2bd2495 Tweak CHANGELOG.md
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-08-18 19:04:05 +01:00
Ian Lynagh
c34b59d32f Add a changenote for the Lombok change 2023-08-18 12:31:32 +01:00
Ian Lynagh
b557ee7090 npm run build 2023-08-18 12:31:32 +01:00
Ian Lynagh
d5b5e18245 Lombok: Don't set env var if it's already set
If the user has manually configured it, then we let their setting stand.
2023-08-18 12:31:12 +01:00
Henry Mercer
e683046da1 Merge pull request #1840 from github/dependabot/npm_and_yarn/npm-4335ac1f11
Bump the npm group with 5 updates
2023-08-14 20:42:14 +01:00
Henry Mercer
af18655ef9 Merge branch 'main' into dependabot/npm_and_yarn/npm-4335ac1f11 2023-08-14 20:05:13 +01:00
Henry Mercer
314b271ce0 Merge pull request #1841 from github/henrymercer/remove-actions-cache-overrides
Update `@actions/cache` and remove overrides
2023-08-14 19:56:39 +01:00
Henry Mercer
4db827f313 Update @actions/cache and remove overrides
Now that `@actions/cache` has been updated, we can remove our manual
overrides for vulnerable dependencies.
2023-08-14 18:59:06 +01:00
github-actions[bot]
6a54608e14 Update checked-in dependencies 2023-08-14 17:46:13 +00:00
dependabot[bot]
3f55ff1327 Bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `3.2.1` | `3.2.2` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.2.1` | `6.4.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.2.1` | `6.4.0` |
| [eslint](https://github.com/eslint/eslint) | `8.46.0` | `8.47.0` |
| [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `3.5.5` | `3.6.0` |


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

Updates `@typescript-eslint/eslint-plugin` from 6.2.1 to 6.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.2.1 to 6.4.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.0/packages/parser)

Updates `eslint` from 8.46.0 to 8.47.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

Updates `eslint-import-resolver-typescript` from 3.5.5 to 3.6.0
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.5.5...v3.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 17:43:22 +00:00
Henry Mercer
3ecf990cd2 Merge pull request #1839 from github/mergeback/v2.21.4-to-main-a09933a1
Mergeback v2.21.4 refs/heads/releases/v2 into main
2023-08-14 16:04:17 +01:00
github-actions[bot]
96f00f2adf Update checked-in dependencies 2023-08-14 14:37:28 +00:00
github-actions[bot]
2760c3e6c4 Update changelog and version after v2.21.4 2023-08-14 14:09:37 +00:00
Henry Mercer
a09933a12a Merge pull request #1838 from github/update-v2.21.4-492a68c32
Merge main into releases/v2
2023-08-14 15:06:52 +01:00
Henry Mercer
37116fb629 Fix positioning of bundle update changelog note 2023-08-14 14:16:49 +01:00
github-actions[bot]
c613917766 Update changelog for v2.21.4 2023-08-14 13:13:56 +00:00
Henry Mercer
492a68c323 Merge pull request #1836 from github/henrymercer/analysis-summary-v2-ff
Enable language specific baselines via feature flag
2023-08-14 12:57:51 +01:00
Henry Mercer
ac49314877 Merge pull request #1834 from github/henrymercer/analysis-summary-v2-ff
Rename new analysis summary feature flag
2023-08-14 10:57:25 +01:00
Henry Mercer
ac35d7a02d Merge pull request #1835 from github/henrymercer/language-baseline-config
Enable language specific baselines via feature flag
2023-08-14 10:57:22 +01:00
Henry Mercer
d03c744ad6 Don't pass --no- flag as it doesn't exist yet 2023-08-11 17:31:20 +01:00
Henry Mercer
a0407a8c60 Add changelog note for rollout 2023-08-11 17:20:49 +01:00
Henry Mercer
8a7b2e9c9b Enable language specific baselines via feature flag 2023-08-11 17:20:42 +01:00
Henry Mercer
9a510d9b07 Rename new analysis summary feature flag 2023-08-11 15:51:44 +01:00
Henry Mercer
2160dd3b55 Merge pull request #1831 from github/update-bundle/codeql-bundle-v2.14.2
Update default bundle to 2.14.2
2023-08-11 12:08:16 +01:00
Henry Mercer
1e14fd9e7a Merge branch 'main' into update-bundle/codeql-bundle-v2.14.2 2023-08-11 11:15:43 +01:00
Henry Mercer
2ec74e3c0e Merge pull request #1833 from github/henrymercer/print-commands
Log commands manually before executing them
2023-08-10 16:26:15 +01:00
Henry Mercer
25a42462f9 Add changelog note 2023-08-10 15:35:54 +01:00
Henry Mercer
f5920c85ab Log commands manually before executing them 2023-08-10 15:35:54 +01:00
Henry Mercer
6ed1ccdc9a Merge pull request #1832 from github/henrymercer/nicer-toolcache-version-numbers
Simplify toolcache version number for semantically versioned bundles
2023-08-10 15:32:53 +01:00
Henry Mercer
ceb4b69c73 Add changelog note 2023-08-10 14:40:20 +01:00
Henry Mercer
76584bd0a0 Simplify toolcache version number for semantically versioned bundles 2023-08-10 14:36:04 +01:00
github-actions[bot]
fba32955a0 Add changelog note 2023-08-10 10:18:25 +00:00
github-actions[bot]
f4eba74c80 Update default bundle to codeql-bundle-v2.14.2 2023-08-10 10:18:20 +00:00
Henry Mercer
9e4932e291 Merge pull request #1825 from github/henrymercer/disk-telemetry
Add runner disk info and image version to status report
2023-08-09 16:05:09 +01:00
Henry Mercer
bd20e2b607 Add changelog note 2023-08-09 11:52:21 +01:00
Henry Mercer
c93877b070 Merge branch 'main' into henrymercer/disk-telemetry 2023-08-09 11:50:50 +01:00
Henry Mercer
4e9f8a2be4 Merge pull request #1830 from github/mergeback/v2.21.3-to-main-5b6282e0
Mergeback v2.21.3 refs/heads/releases/v2 into main
2023-08-08 14:29:33 +01:00
github-actions[bot]
a07ea2da0c Update checked-in dependencies 2023-08-08 13:07:22 +00:00
github-actions[bot]
9a202d29ad Update changelog and version after v2.21.3 2023-08-08 13:05:38 +00:00
Henry Mercer
5b6282e01c Merge pull request #1829 from github/update-v2.21.3-f9a7c6738
Merge main into releases/v2
2023-08-08 14:03:24 +01:00
Ian Lynagh
f0f7a35b85 Add changenote for Lombok rollout 2023-08-08 13:25:26 +01:00
github-actions[bot]
dda4ed3db4 Update changelog for v2.21.3 2023-08-08 11:53:34 +00:00
Henry Mercer
834f08becb Merge branch 'main' into henrymercer/disk-telemetry 2023-08-07 17:56:50 +01:00
Henry Mercer
97ce1b094a Ignore test files in env vars query 2023-08-07 17:31:09 +01:00
Henry Mercer
ba5812e64f Add ImageVersion to safe env vars for default setup 2023-08-07 17:29:12 +01:00
Henry Mercer
3b25789080 Add runner image version to status report 2023-08-07 16:27:56 +01:00
Henry Mercer
7dcb3e5276 Include runner disk info in status report 2023-08-07 16:27:56 +01:00
Henry Mercer
09ce3dbf90 Sort interfaces and enums 2023-08-07 16:27:56 +01:00
Henry Mercer
c6d284324b Pull out a dedicated status report file 2023-08-07 16:13:59 +01:00
Henry Mercer
c55207f0a2 Use vendored TypeScript version for VS Code 2023-08-07 15:08:32 +01:00
Henry Mercer
45e889b4b3 Install check-disk-space Node package 2023-08-07 15:08:26 +01:00
Henry Mercer
131cb1abb1 Suppress VS Code git limit warnings during package install 2023-08-07 11:46:47 +01:00
2137 changed files with 289598 additions and 272178 deletions

View File

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

View File

@@ -0,0 +1,25 @@
name: 'Release branches'
description: 'Determine branches for release & backport'
inputs:
major_version:
description: 'The version as extracted from the package.json file'
required: true
latest_tag:
description: 'The most recent tag published to the repository'
required: true
outputs:
backport_source_branch:
description: "The release branch for the given tag"
value: ${{ steps.branches.outputs.backport_source_branch }}
backport_target_branches:
description: "JSON encoded list of branches to target with backports"
value: ${{ steps.branches.outputs.backport_target_branches }}
runs:
using: "composite"
steps:
- id: branches
run: |
python ${{ github.action_path }}/release-branches.py \
--major-version ${{ inputs.major_version }} \
--latest-tag ${{ inputs.latest_tag }}
shell: bash

View File

@@ -0,0 +1,55 @@
import argparse
import json
import os
import configparser
# Name of the remote
ORIGIN = 'origin'
script_dir = os.path.dirname(os.path.realpath(__file__))
grandparent_dir = os.path.dirname(os.path.dirname(script_dir))
config = configparser.ConfigParser()
with open(os.path.join(grandparent_dir, 'releases.ini')) as stream:
config.read_string('[default]\n' + stream.read())
OLDEST_SUPPORTED_MAJOR_VERSION = int(config['default']['OLDEST_SUPPORTED_MAJOR_VERSION'])
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--major-version", required=True, type=str, help="The major version of the release")
parser.add_argument("--latest-tag", required=True, type=str, help="The most recent tag published to the repository")
args = parser.parse_args()
major_version = args.major_version
latest_tag = args.latest_tag
print("major_version: " + major_version)
print("latest_tag: " + latest_tag)
# If this is a primary release, we backport to all supported branches,
# so we check whether the major_version taken from the package.json
# is greater than or equal to the latest tag pulled from the repo.
# For example...
# 'v1' >= 'v2' is False # we're operating from an older release branch and should not backport
# 'v2' >= 'v2' is True # the normal case where we're updating the current version
# 'v3' >= 'v2' is True # in this case we are making the first release of a new major version
consider_backports = ( major_version >= latest_tag.split(".")[0] )
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"backport_source_branch=releases/{major_version}\n")
backport_target_branches = []
if consider_backports:
for i in range(int(major_version.strip("v"))-1, 0, -1):
branch_name = f"releases/v{i}"
if i >= OLDEST_SUPPORTED_MAJOR_VERSION:
backport_target_branches.append(branch_name)
f.write("backport_target_branches="+json.dumps(backport_target_branches)+"\n")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,33 @@
name: 'Prepare release job'
description: 'Prepare for updating a release branch'
runs:
using: "composite"
steps:
- name: Dump environment
run: env
shell: bash
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "$GITHUB_CONTEXT"
shell: bash
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub==1.55 requests
shell: bash
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
shell: bash

View File

@@ -24,14 +24,16 @@ runs:
VERSION="5.7.0" VERSION="5.7.0"
elif [ $VERSION = "5.8" ]; then elif [ $VERSION = "5.8" ]; then
VERSION="5.8.0" VERSION="5.8.0"
# setup-swift does not yet support v5.8.1 Remove this when it does. elif [ $VERSION = "5.9" ]; then
elif [ $VERSION = "5.8.1" ]; then VERSION="5.9.0"
VERSION="5.8.0" # setup-swift does not yet support v5.9.1 Remove this when it does.
elif [ $VERSION = "5.9.1" ]; then
VERSION="5.9.0"
fi fi
fi fi
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test. - uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null' if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
with: with:
swift-version: "${{ steps.get_swift_version.outputs.version }}" swift-version: "${{ steps.get_swift_version.outputs.version }}"

View File

@@ -2,6 +2,8 @@ version: 2
updates: updates:
- package-ecosystem: npm - package-ecosystem: npm
directory: "/" directory: "/"
reviewers:
- "github/codeql-production-shield"
schedule: schedule:
interval: weekly interval: weekly
labels: labels:
@@ -20,6 +22,8 @@ updates:
- "*" - "*"
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: "/" directory: "/"
reviewers:
- "github/codeql-production-shield"
schedule: schedule:
interval: weekly interval: weekly
groups: groups:
@@ -28,6 +32,8 @@ updates:
- "*" - "*"
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included. directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
reviewers:
- "github/codeql-production-shield"
schedule: schedule:
interval: weekly interval: weekly
groups: groups:

1
.github/releases.ini vendored Normal file
View File

@@ -0,0 +1 @@
OLDEST_SUPPORTED_MAJOR_VERSION=2

View File

@@ -1,5 +1,6 @@
import argparse import argparse
import datetime import datetime
import re
from github import Github from github import Github
import json import json
import os import os
@@ -13,8 +14,9 @@ No user facing changes.
""" """
SOURCE_BRANCH = 'main' # NB: This exact commit message is used to find commits for reverting during backports.
TARGET_BRANCH = 'releases/v2' # Changing it requires a transition period where both old and new versions are supported.
BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v'
# Name of the remote # Name of the remote
ORIGIN = 'origin' ORIGIN = 'origin'
@@ -34,7 +36,9 @@ def branch_exists_on_remote(branch_name):
return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != '' return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != ''
# Opens a PR from the given branch to the target branch # Opens a PR from the given branch to the target branch
def open_pr(repo, all_commits, source_branch_short_sha, new_branch_name, conductor): def open_pr(
repo, all_commits, source_branch_short_sha, new_branch_name, source_branch, target_branch,
conductor, is_primary_release, conflicted_files):
# Sort the commits into the pull requests that introduced them, # Sort the commits into the pull requests that introduced them,
# and any commits that don't have a pull request # and any commits that don't have a pull request
pull_requests = [] pull_requests = []
@@ -56,7 +60,7 @@ def open_pr(repo, all_commits, source_branch_short_sha, new_branch_name, conduct
# Start constructing the body text # Start constructing the body text
body = [] body = []
body.append(f'Merging {source_branch_short_sha} into {TARGET_BRANCH}.') body.append(f'Merging {source_branch_short_sha} into {target_branch}.')
body.append('') body.append('')
body.append(f'Conductor for this PR is @{conductor}.') body.append(f'Conductor for this PR is @{conductor}.')
@@ -79,20 +83,38 @@ def open_pr(repo, all_commits, source_branch_short_sha, new_branch_name, conduct
body.append('') body.append('')
body.append('Please do the following:') body.append('Please do the following:')
if len(conflicted_files) > 0:
body.append(' - [ ] Ensure `package.json` file contains the correct version.')
body.append(' - [ ] Add commits to this branch to resolve the merge conflicts ' +
'in the following files:')
body.extend([f' - [ ] `{file}`' for file in conflicted_files])
body.append(' - [ ] Ensure another maintainer has reviewed the additional commits you added to this ' +
'branch to resolve the merge conflicts.')
body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.') body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.')
body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.') body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.')
body.append(f' - [ ] Check that there are not any unexpected commits being merged into the {TARGET_BRANCH} branch.') body.append(f' - [ ] Check that there are not any unexpected commits being merged into the {target_branch} branch.')
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.') body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.')
body.append(' - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.')
title = f'Merge {SOURCE_BRANCH} into {TARGET_BRANCH}' if not is_primary_release:
body.append(' - [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.')
body.append(' - [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.')
body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.')
body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.')
if is_primary_release:
body.append(' - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.')
body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.')
title = f'Merge {source_branch} into {target_branch}'
labels = ['Update dependencies'] if not is_primary_release else []
# Create the pull request # Create the pull request
# PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that
# a maintainer can take the PR out of draft, thereby triggering the PR checks. # a maintainer can take the PR out of draft, thereby triggering the PR checks.
pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=TARGET_BRANCH, draft=True) pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch, draft=True)
print(f'Created PR #{pr.number}') pr.add_to_labels(*labels)
print(f'Created PR #{str(pr.number)}')
# Assign the conductor # Assign the conductor
pr.add_to_assignees(conductor) pr.add_to_assignees(conductor)
@@ -102,10 +124,10 @@ def open_pr(repo, all_commits, source_branch_short_sha, new_branch_name, conduct
# since the last release to the target branch. # since the last release to the target branch.
# This will not include any commits that exist on the target branch # This will not include any commits that exist on the target branch
# that aren't on the source branch. # that aren't on the source branch.
def get_commit_difference(repo): def get_commit_difference(repo, source_branch, target_branch):
# Passing split nothing means that the empty string splits to nothing: compare `''.split() == []` # Passing split nothing means that the empty string splits to nothing: compare `''.split() == []`
# to `''.split('\n') == ['']`. # to `''.split('\n') == ['']`.
commits = run_git('log', '--pretty=format:%H', f'{ORIGIN}/{TARGET_BRANCH}..{ORIGIN}/{SOURCE_BRANCH}').strip().split() commits = run_git('log', '--pretty=format:%H', f'{ORIGIN}/{target_branch}..{ORIGIN}/{source_branch}').strip().split()
# Convert to full-fledged commit objects # Convert to full-fledged commit objects
commits = [repo.get_commit(c) for c in commits] commits = [repo.get_commit(c) for c in commits]
@@ -153,6 +175,60 @@ def get_today_string():
today = datetime.datetime.today() today = datetime.datetime.today()
return '{:%d %b %Y}'.format(today) return '{:%d %b %Y}'.format(today)
def process_changelog_for_backports(source_branch_major_version, target_branch_major_version):
# changelog entries can use the following format to indicate
# that they only apply to newer versions
some_versions_only_regex = re.compile(r'\[v(\d+)\+ only\]')
output = ''
with open('CHANGELOG.md', 'r') as f:
# until we find the first section, just duplicate all lines
while True:
line = f.readline()
if not line:
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
output += line
if line.startswith('## '):
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
# we have found the first section, so now handle things differently
break
# found_content tracks whether we hit two headings in a row
found_content = False
output += '\n'
while True:
line = f.readline()
if not line:
break # EOF
line = line.rstrip('\n')
# filter out changenote entries that apply only to newer versions
match = some_versions_only_regex.search(line)
if match:
if int(target_branch_major_version) < int(match.group(1)):
continue
if line.startswith('## '):
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
if found_content == False:
# we have found two headings in a row, so we need to add the placeholder message.
output += 'No user facing changes.\n'
found_content = False
output += f'\n{line}\n\n'
else:
if line.strip() != '':
found_content = True
# we use the original line here, rather than the stripped version
# so that we preserve indentation
output += line + '\n'
with open('CHANGELOG.md', 'w') as f:
f.write(output)
def update_changelog(version): def update_changelog(version):
if (os.path.exists('CHANGELOG.md')): if (os.path.exists('CHANGELOG.md')):
content = '' content = ''
@@ -182,6 +258,24 @@ def main():
required=True, required=True,
help='The nwo of the repository, for example github/codeql-action.' help='The nwo of the repository, for example github/codeql-action.'
) )
parser.add_argument(
'--source-branch',
type=str,
required=True,
help='Source branch for release branch update.'
)
parser.add_argument(
'--target-branch',
type=str,
required=True,
help='Target branch for release branch update.'
)
parser.add_argument(
'--is-primary-release',
action='store_true',
default=False,
help='Whether this update is the primary release for the current major version.'
)
parser.add_argument( parser.add_argument(
'--conductor', '--conductor',
type=str, type=str,
@@ -191,24 +285,38 @@ def main():
args = parser.parse_args() args = parser.parse_args()
source_branch = args.source_branch
target_branch = args.target_branch
is_primary_release = args.is_primary_release
repo = Github(args.github_token).get_repo(args.repository_nwo) repo = Github(args.github_token).get_repo(args.repository_nwo)
version = get_current_version()
# the target branch will be of the form releases/vN, where N is the major version number
target_branch_major_version = target_branch.strip('releases/v')
# split version into major, minor, patch
_, v_minor, v_patch = get_current_version().split('.')
version = f"{target_branch_major_version}.{v_minor}.{v_patch}"
# Print what we intend to go # Print what we intend to go
print(f'Considering difference between {SOURCE_BRANCH} and {TARGET_BRANCH}...') print(f'Considering difference between {source_branch} and {target_branch}...')
source_branch_short_sha = run_git('rev-parse', '--short', f'{ORIGIN}/{SOURCE_BRANCH}').strip() source_branch_short_sha = run_git('rev-parse', '--short', f'{ORIGIN}/{source_branch}').strip()
print(f'Current head of {SOURCE_BRANCH} is {source_branch_short_sha}.') print(f'Current head of {source_branch} is {source_branch_short_sha}.')
# See if there are any commits to merge in # See if there are any commits to merge in
commits = get_commit_difference(repo=repo) commits = get_commit_difference(repo=repo, source_branch=source_branch, target_branch=target_branch)
if len(commits) == 0: if len(commits) == 0:
print(f'No commits to merge from {SOURCE_BRANCH} to {TARGET_BRANCH}.') print(f'No commits to merge from {source_branch} to {target_branch}.')
return return
# define distinct prefix in order to support specific pr checks on backports
branch_prefix = 'update' if is_primary_release else 'backport'
# The branch name is based off of the name of branch being merged into # The branch name is based off of the name of branch being merged into
# and the SHA of the branch being merged from. Thus if the branch already # and the SHA of the branch being merged from. Thus if the branch already
# exists we can assume we don't need to recreate it. # exists we can assume we don't need to recreate it.
new_branch_name = f'update-v{version}-{source_branch_short_sha}' new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}'
print(f'Branch name is {new_branch_name}.') print(f'Branch name is {new_branch_name}.')
# Check if the branch already exists. If so we can abort as this script # Check if the branch already exists. If so we can abort as this script
@@ -220,17 +328,74 @@ def main():
# Create the new branch and push it to the remote # Create the new branch and push it to the remote
print(f'Creating branch {new_branch_name}.') print(f'Creating branch {new_branch_name}.')
# If we're performing a standard release, there won't be any new commits on the target branch, # The process of creating the v{Older} release can run into merge conflicts. We commit the unresolved
# as these will have already been merged back into the source branch. Therefore we can just # conflicts so a maintainer can easily resolve them (vs erroring and requiring maintainers to
# start from the source branch. # reconstruct the release manually)
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{SOURCE_BRANCH}') conflicted_files = []
print('Updating changelog') if not is_primary_release:
update_changelog(version)
# Create a commit that updates the CHANGELOG # the source branch will be of the form releases/vN, where N is the major version number
run_git('add', 'CHANGELOG.md') source_branch_major_version = source_branch.strip('releases/v')
run_git('commit', '-m', f'Update changelog for v{version}')
# If we're performing a backport, start from the target branch
print(f'Creating {new_branch_name} from the {ORIGIN}/{target_branch} branch')
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{target_branch}')
# Revert the commit that we made as part of the last release that updated the version number and
# changelog to refer to {older}.x.x variants. This avoids merge conflicts in the changelog and
# package.json files when we merge in the v{latest} branch.
# This commit will not exist the first time we release the v{N-1} branch from the v{N} branch, so we
# use `git log --grep` to conditionally revert the commit.
print('Reverting the version number and changelog updates from the last release to avoid conflicts')
vOlder_update_commits = run_git('log', '--grep', f'^{BACKPORT_COMMIT_MESSAGE}', '--format=%H').split()
if len(vOlder_update_commits) > 0:
print(f' Reverting {vOlder_update_commits[0]}')
# Only revert the newest commit as older ones will already have been reverted in previous
# releases.
run_git('revert', vOlder_update_commits[0], '--no-edit')
# Also revert the "Update checked-in dependencies" commit created by Actions.
update_dependencies_commit = run_git('log', '--grep', '^Update checked-in dependencies', '--format=%H').split()[0]
print(f' Reverting {update_dependencies_commit}')
run_git('revert', update_dependencies_commit, '--no-edit')
else:
print(' Nothing to revert.')
print(f'Merging {ORIGIN}/{source_branch} into the release prep branch')
# Commit any conflicts (see the comment for `conflicted_files`)
run_git('merge', f'{ORIGIN}/{source_branch}', allow_non_zero_exit_code=True)
conflicted_files = run_git('diff', '--name-only', '--diff-filter', 'U').splitlines()
if len(conflicted_files) > 0:
run_git('add', '.')
run_git('commit', '--no-edit')
# Migrate the package version number from a vLatest version number to a vOlder version number
print(f'Setting version number to {version}')
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
run_git('add', 'package.json', 'package-lock.json')
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')
process_changelog_for_backports(source_branch_major_version, target_branch_major_version)
# Amend the commit generated by `npm version` to update the CHANGELOG
run_git('add', 'CHANGELOG.md')
run_git('commit', '-m', f'{BACKPORT_COMMIT_MESSAGE}{version}')
else:
# If we're performing a standard release, there won't be any new commits on the target branch,
# as these will have already been merged back into the source branch. Therefore we can just
# start from the source branch.
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{source_branch}')
print('Updating changelog')
update_changelog(version)
# Create a commit that updates the CHANGELOG
run_git('add', 'CHANGELOG.md')
run_git('commit', '-m', f'Update changelog for v{version}')
run_git('push', ORIGIN, new_branch_name) run_git('push', ORIGIN, new_branch_name)
@@ -240,7 +405,11 @@ def main():
commits, commits,
source_branch_short_sha, source_branch_short_sha,
new_branch_name, new_branch_name,
source_branch=source_branch,
target_branch=target_branch,
conductor=args.conductor, conductor=args.conductor,
is_primary_release=is_primary_release,
conflicted_files=conflicted_files
) )
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'true' use-all-platform-bundle: 'true'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- id: init - id: init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,48 +25,12 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: windows-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: windows-latest
version: stable-20230418
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
version: default version: default
- os: windows-latest - os: windows-latest
version: default version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: "Analyze: 'ref' and 'sha' from inputs" name: "Analyze: 'ref' and 'sha' from inputs"
permissions: permissions:
contents: read contents: read
@@ -74,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -83,11 +61,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -38,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -47,11 +61,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -44,8 +44,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -53,11 +67,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
@@ -76,7 +86,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check config properties appear in SARIF - name: Check config properties appear in SARIF
uses: actions/github-script@v6 uses: actions/github-script@v7
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:
@@ -102,5 +112,4 @@ jobs:
} }
core.info('Finished config export tests.'); core.info('Finished config export tests.');
env: env:
CODEQL_PASS_CONFIG_TO_CLI: true
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

88
.github/workflows/__cpp-deptrace-disabled.yml generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: 'PR Check - C/C++: disabling autoinstalling dependencies (Linux)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
cpp-deptrace-disabled:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: nightly-latest
name: 'C/C++: disabling autoinstalling dependencies (Linux)'
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
with:
languages: cpp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
with:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
- shell: bash
run: |
if ls /usr/bin/errno; then
echo "C/C++ autobuild installed errno, but it should not have since auto-install dependencies is disabled."
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

86
.github/workflows/__cpp-deptrace-enabled-on-macos.yml generated vendored Normal file
View File

@@ -0,0 +1,86 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: 'PR Check - C/C++: autoinstalling dependencies is skipped (macOS)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
cpp-deptrace-enabled-on-macos:
strategy:
matrix:
include:
- os: macos-latest
version: nightly-latest
name: 'C/C++: autoinstalling dependencies is skipped (macOS)'
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
with:
languages: cpp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
with:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
if ! ls /usr/bin/errno; then
echo "As expected, CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES is a no-op on macOS"
else
echo "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES should not have had any effect on macOS"
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

88
.github/workflows/__cpp-deptrace-enabled.yml generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: 'PR Check - C/C++: autoinstalling dependencies (Linux)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
cpp-deptrace-enabled:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: nightly-latest
name: 'C/C++: autoinstalling dependencies (Linux)'
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Test setup
shell: bash
run: |
cp -a ../action/tests/cpp-autobuild autobuild-dir
- uses: ./../action/init
with:
languages: cpp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
with:
working-directory: autobuild-dir
env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: true
- shell: bash
run: |
if ! ls /usr/bin/errno; then
echo "Did not autoinstall errno"
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -50,8 +50,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -59,11 +73,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
@@ -98,7 +108,7 @@ jobs:
path: ${{ runner.temp }}/results/javascript.sarif path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7 retention-days: 7
- name: Check diagnostics appear in SARIF - name: Check diagnostics appear in SARIF
uses: actions/github-script@v6 uses: actions/github-script@v7
env: env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with: with:

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -38,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -47,11 +61,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
@@ -59,8 +69,6 @@ jobs:
with: with:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
env:
CODEQL_FILE_BASELINE_INFORMATION: true
- uses: ./../action/.github/actions/setup-swift - uses: ./../action/.github/actions/setup-swift
with: with:
codeql-path: ${{ steps.init.outputs.codeql-path }} codeql-path: ${{ steps.init.outputs.codeql-path }}
@@ -70,8 +78,6 @@ jobs:
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
output: ${{ runner.temp }}/results output: ${{ runner.temp }}/results
env:
CODEQL_FILE_BASELINE_INFORMATION: true
- name: Upload SARIF - name: Upload SARIF
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
@@ -82,13 +88,13 @@ jobs:
shell: bash shell: bash
run: | run: |
cd "$RUNNER_TEMP/results" cd "$RUNNER_TEMP/results"
expected_baseline_languages="cpp cs go java js py rb" expected_baseline_languages="c csharp go java kotlin javascript python ruby"
if [[ $RUNNER_OS != "Windows" ]]; then if [[ $RUNNER_OS != "Windows" ]]; then
expected_baseline_languages+=" swift" expected_baseline_languages+=" swift"
fi fi
for lang in ${expected_baseline_languages}; do for lang in ${expected_baseline_languages}; do
rule_name="${lang}/baseline/expected-extracted-files" rule_name="cli/expected-extracted-files/${lang}"
found_notification=$(jq --arg rule_name "${rule_name}" '[.runs[0].tool.driver.notifications | found_notification=$(jq --arg rule_name "${rule_name}" '[.runs[0].tool.driver.notifications |
select(. != null) | flatten | .[].id] | any(. == $rule_name)' javascript.sarif) select(. != null) | flatten | .[].id] | any(. == $rule_name)' javascript.sarif)
if [[ "${found_notification}" != "true" ]]; then if [[ "${found_notification}" != "true" ]]; then
@@ -99,4 +105,5 @@ jobs:
fi fi
done done
env: env:
CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,18 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -49,6 +37,18 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: windows-latest - os: windows-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: windows-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: windows-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -74,8 +74,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -83,11 +97,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -0,0 +1,106 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: 'PR Check - Go: diagnostic when Go is changed after init step'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
go-indirect-tracing-workaround-diagnostic:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-v2.14.6
name: 'Go: diagnostic when Go is changed after init step'
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
# We need a Go version that ships with statically linked binaries on Linux
go-version: '>=1.21.0'
- uses: ./../action/init
with:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
# Deliberately change Go after the `init` step
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check diagnostic appears in SARIF
uses: actions/github-script@v7
env:
SARIF_PATH: ${{ runner.temp }}/results/go.sarif
with:
script: |
const fs = require('fs');
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
const run = sarif.runs[0];
const toolExecutionNotifications = run.invocations[0].toolExecutionNotifications;
const statusPageNotifications = toolExecutionNotifications.filter(n =>
n.descriptor.id === 'go/workflow/go-installed-after-codeql-init' && n.properties?.visibility?.statusPage
);
if (statusPageNotifications.length !== 1) {
core.setFailed(
'Expected exactly one status page reporting descriptor for this diagnostic in the ' +
`'runs[].invocations[].toolExecutionNotifications[]' SARIF property, but found ` +
`${statusPageNotifications.length}. All notification reporting descriptors: ` +
`${JSON.stringify(toolExecutionNotifications)}.`
);
}
env:
CODEQL_ACTION_TEST_MODE: true

104
.github/workflows/__go-indirect-tracing-workaround.yml generated vendored Normal file
View File

@@ -0,0 +1,104 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: 'PR Check - Go: workaround for indirect tracing'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
go-indirect-tracing-workaround:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-v2.14.6
name: 'Go: workaround for indirect tracing'
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
# We need a Go version that ships with statically linked binaries on Linux
go-version: '>=1.21.0'
- uses: ./../action/init
with:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
echo "Expected the workaround for indirect tracing of static binaries to trigger, but the" \
"CODEQL_ACTION_GO_BINARY environment variable is not set."
exit 1
fi
if [[ ! -f "${CODEQL_ACTION_GO_BINARY}" ]]; then
echo "CODEQL_ACTION_GO_BINARY is set, but the corresponding script does not exist."
exit 1
fi
# Once we start running Bash 4.2 in all environments, we can replace the
# `! -z` flag with the more elegant `-v` which confirms that the variable
# is actually unset and not potentially set to a blank value.
if [[ ! -z "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" ]]; then
echo "Expected the Go autobuilder not to be run, but the" \
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was set."
exit 1
fi
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d go ]]; then
echo "Did not find a Go database"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -41,6 +33,14 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: macos-latest - os: macos-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -60,8 +60,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -69,13 +83,12 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ~1.21.1
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -41,6 +33,14 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: macos-latest - os: macos-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -60,8 +60,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -69,13 +83,12 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ~1.21.1
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -41,6 +33,14 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: macos-latest - os: macos-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -60,8 +60,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -69,13 +83,12 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ~1.21.1
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: go

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -51,8 +51,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -60,11 +74,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Init with registries - name: Init with registries

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -38,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -47,11 +61,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Move codeql-action - name: Move codeql-action

79
.github/workflows/__language-aliases.yml generated vendored Normal file
View File

@@ -0,0 +1,79 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: PR Check - Language aliases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
language-aliases:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
name: Language aliases
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: runner.os != 'Windows' && matrix.version == '20221211'
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init
with:
languages: C#,java-kotlin,swift,typescript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check languages
run: |
expected_languages="csharp,java,swift,javascript"
actual_languages=$(jq -r '.languages | join(",")' "$RUNNER_TEMP"/config)
if [ "$expected_languages" != "$actual_languages" ]; then
echo "Resolved languages did not match expected list. " \
"Expected languages: $expected_languages. Actual languages: $actual_languages."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -1,147 +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:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: PR Check - ML-powered queries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
ml-powered-queries:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: windows-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: windows-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: ML-powered queries
permissions:
contents: read
security-events: write
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement
if: >-
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init
with:
languages: javascript
queries: security-extended
source-root: ./../action/tests/ml-powered-queries-repo
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
with:
name: ml-powered-queries-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check sarif
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run:
js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss
queries-not-run: foo,bar
- name: Check results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should run at least the ML-powered queries in `expected_rules`.
expected_rules="js/ml-powered/nosql-injection js/ml-powered/path-injection js/ml-powered/sql-injection js/ml-powered/xss"
for rule in ${expected_rules}; do
found_rule=$(jq --arg rule "${rule}" '[.runs[0].tool.extensions[].rules | select(. != null) |
flatten | .[].id] | any(. == $rule)' javascript.sarif)
echo "Did find rule '${rule}': ${found_rule}"
if [[ "${found_rule}" != "true" ]]; then
echo "Expected SARIF output to contain rule '${rule}', but found no such rule."
exit 1
fi
done
# We should have at least one alert from an ML-powered query.
num_alerts=$(jq '[.runs[0].results[] |
select(.properties.score != null and (.rule.id | startswith("js/ml-powered/")))] | length' \
javascript.sarif)
echo "Found ${num_alerts} alerts from ML-powered queries.";
if [[ "${num_alerts}" -eq 0 ]]; then
echo "Expected to find at least one alert from an ML-powered query but found ${num_alerts}."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -41,6 +33,14 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: macos-latest - os: macos-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -60,8 +60,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -69,11 +83,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -50,8 +50,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -59,11 +73,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
@@ -103,6 +113,4 @@ jobs:
exit 1 exit 1
fi fi
env: env:
CODEQL_PASS_CONFIG_TO_CLI: true
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -50,8 +50,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -59,11 +73,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -50,8 +50,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -59,11 +73,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -50,8 +50,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -59,11 +73,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,18 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -49,6 +37,18 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: windows-latest - os: windows-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: windows-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: windows-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -74,8 +74,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -83,11 +97,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -31,6 +31,24 @@ jobs:
version: stable-v2.13.4 version: stable-v2.13.4
- os: windows-latest - os: windows-latest
version: stable-v2.13.4 version: stable-v2.13.4
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Resolve environment name: Resolve environment
permissions: permissions:
contents: read contents: read
@@ -38,8 +56,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -47,25 +79,35 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: go languages: ${{ matrix.version == 'stable-v2.13.4' && 'go' || 'go,javascript-typescript'
}}
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/resolve-environment - name: Resolve environment for Go
id: resolve-environment uses: ./../action/resolve-environment
id: resolve-environment-go
with: with:
language: go language: go
- name: Fail if no Go configuration was returned - name: Fail if Go configuration missing
if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go) if: (!fromJSON(steps.resolve-environment-go.outputs.environment).configuration.go)
run: exit 1
- name: Resolve environment for JavaScript/TypeScript
if: matrix.version != 'stable-v2.13.4'
uses: ./../action/resolve-environment
id: resolve-environment-js
with:
language: javascript-typescript
- name: Fail if JavaScript/TypeScript configuration present
if: matrix.version != 'stable-v2.13.4' &&
fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript
run: exit 1 run: exit 1
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Set up Ruby - name: Set up Ruby

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

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -44,8 +44,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -53,11 +67,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -41,6 +33,14 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: macos-latest - os: macos-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -60,8 +60,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -69,11 +83,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -44,8 +44,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -53,11 +67,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -38,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -47,14 +61,10 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./init - uses: ./init
with: with:
languages: javascript languages: javascript

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -44,8 +44,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -53,11 +67,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Test setup - name: Test setup

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- name: Fetch a CodeQL bundle - name: Fetch a CodeQL bundle

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

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -34,8 +34,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -43,11 +57,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,14 +25,14 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: ubuntu-latest - os: ubuntu-latest
@@ -46,8 +46,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -55,11 +69,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,48 +25,12 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: windows-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: windows-latest
version: stable-20230418
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
version: default version: default
- os: windows-latest - os: windows-latest
version: default version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: "Upload-sarif: 'ref' and 'sha' from inputs" name: "Upload-sarif: 'ref' and 'sha' from inputs"
permissions: permissions:
contents: read contents: read
@@ -74,8 +38,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -83,11 +61,7 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init

View File

@@ -12,7 +12,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,18 +25,6 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: ubuntu-latest
version: stable-20220615
- os: macos-latest
version: stable-20220615
- os: windows-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: macos-latest
version: stable-20220908
- os: windows-latest
version: stable-20220908
- os: ubuntu-latest - os: ubuntu-latest
version: stable-20221211 version: stable-20221211
- os: macos-latest - os: macos-latest
@@ -49,6 +37,18 @@ jobs:
version: stable-20230418 version: stable-20230418
- os: windows-latest - os: windows-latest
version: stable-20230418 version: stable-20230418
- os: ubuntu-latest
version: stable-v2.13.5
- os: macos-latest
version: stable-v2.13.5
- os: windows-latest
version: stable-v2.13.5
- os: ubuntu-latest
version: stable-v2.14.6
- os: macos-latest
version: stable-v2.14.6
- os: windows-latest
version: stable-v2.14.6
- os: ubuntu-latest - os: ubuntu-latest
version: default version: default
- os: macos-latest - os: macos-latest
@@ -74,8 +74,22 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: >-
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -83,34 +97,37 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
use-all-platform-bundle: 'false' use-all-platform-bundle: 'false'
- name: Set environment variable for Swift enablement - name: Set environment variable for Swift enablement
if: >- if: runner.os != 'Windows' && matrix.version == '20221211'
runner.os != 'Windows' && (
matrix.version == '20220908' ||
matrix.version == '20221211'
)
shell: bash shell: bash
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
- uses: actions/checkout@v3 - name: Delete original checkout
shell: bash
run: |
# delete the original checkout so we don't accidentally use it.
# Actions does not support deleting the current working directory, so we
# delete the contents of the directory instead.
rm -rf ./* .github .git
# Check out the actions repo again, but at a different location.
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main
- uses: actions/checkout@v4
with: with:
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
path: x/y/z/some-path path: x/y/z/some-path
- uses: ./../action/init - uses: ./../action/init
with: with:
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
# it's enough to test one compiled language and one interpreted language # it's enough to test one compiled language and one interpreted language
languages: csharp,javascript languages: csharp,javascript
source-path: x/y/z/some-path/tests/multi-language-repo source-root: x/y/z/some-path/tests/multi-language-repo
debug: true debug: true
- name: Build code (non-windows)
- name: Build code
shell: bash shell: bash
if: ${{ runner.os != 'Windows' }} working-directory: x/y/z/some-path/tests/multi-language-repo
run: | run: |
$CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh ./build.sh
- name: Build code (windows)
shell: bash
if: ${{ runner.os == 'Windows' }}
run: |
x/y/z/some-path/tests/multi-language-repo/build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
with: with:
checkout_path: x/y/z/some-path/tests/multi-language-repo checkout_path: x/y/z/some-path/tests/multi-language-repo

View File

@@ -15,7 +15,7 @@ jobs:
steps: steps:
- name: Checkout CodeQL Action - name: Checkout CodeQL Action
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Check Expected Release Files - name: Check Expected Release Files
run: | run: |
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")" bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"

View File

@@ -2,15 +2,16 @@ name: "CodeQL action"
on: on:
push: push:
branches: [main, releases/v2] branches: [main, releases/v*]
pull_request: pull_request:
branches: [main, releases/v2] branches: [main, releases/v*]
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
schedule: schedule:
# Weekly on Sunday. # Weekly on Sunday.
- cron: '30 1 * * 0' - cron: '30 1 * * 0'
workflow_dispatch:
env: env:
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
@@ -26,7 +27,7 @@ jobs:
security-events: write security-events: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Init with default CodeQL bundle from the VM image - name: Init with default CodeQL bundle from the VM image
id: init-default id: init-default
uses: ./init uses: ./init
@@ -73,7 +74,7 @@ jobs:
needs: [check-codeql-versions] needs: [check-codeql-versions]
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest,windows-latest,macos-latest] os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-11,macos-12,macos-13]
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }} tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -82,7 +83,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Initialize CodeQL - name: Initialize CodeQL
uses: ./init uses: ./init
id: init id: init

View File

@@ -3,13 +3,12 @@
name: Code-Scanning config CLI tests name: Code-Scanning config CLI tests
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODEQL_PASS_CONFIG_TO_CLI: true
on: on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -44,7 +43,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -204,15 +203,3 @@ jobs:
packs: + codeql/javascript-queries packs: + codeql/javascript-queries
config-file-test: .github/codeql/other-config-properties.yml config-file-test: .github/codeql/other-config-properties.yml
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Config not generated when env var is not set
if: success() || failure()
env:
CODEQL_PASS_CONFIG_TO_CLI: false
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: ""
languages: javascript
packs: + codeql/javascript-queries
config-file-test: .github/codeql/other-config-properties.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}

View File

@@ -10,7 +10,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -33,13 +33,13 @@ jobs:
- name: Dump GitHub event - name: Dump GitHub event
run: cat "${GITHUB_EVENT_PATH}" run: cat "${GITHUB_EVENT_PATH}"
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
with: with:
version: latest version: latest
- uses: actions/setup-go@v4 - uses: actions/setup-go@v5
with: with:
go-version: ^1.13.1 go-version: ^1.13.1
- uses: ./../action/init - uses: ./../action/init
@@ -52,7 +52,7 @@ jobs:
shell: bash shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
with: with:
expect-error: true expect-error: true
ram: 1 ram: 1

View File

@@ -9,7 +9,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -25,10 +25,10 @@ jobs:
- ubuntu-latest - ubuntu-latest
- macos-latest - macos-latest
version: version:
- stable-20220615
- stable-20220908
- stable-20221211 - stable-20221211
- stable-20230418 - stable-20230418
- stable-v2.13.5
- stable-v2.14.6
- default - default
- latest - latest
- nightly-latest - nightly-latest
@@ -39,15 +39,25 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- uses: actions/setup-go@v4 - uses: actions/setup-go@v5
with: with:
go-version: ^1.13.1 go-version: ^1.13.1
- name: Setup Python on MacOS
uses: actions/setup-python@v5
if: |
matrix.os == 'macos-latest' && (
matrix.version == 'stable-20221211' ||
matrix.version == 'stable-20230418' ||
matrix.version == 'stable-v2.13.5' ||
matrix.version == 'stable-v2.14.6')
with:
python-version: '3.11'
- uses: ./../action/init - uses: ./../action/init
id: init id: init
with: with:
@@ -62,7 +72,7 @@ jobs:
shell: bash shell: bash
run: ./build.sh run: ./build.sh
- uses: ./../action/analyze - uses: ./../action/analyze
id: analysis id: analysis
download-and-check-artifacts: download-and-check-artifacts:
name: Download and check debug artifacts name: Download and check debug artifacts
needs: upload-artifacts needs: upload-artifacts
@@ -74,11 +84,11 @@ jobs:
- name: Check expected artifacts exist - name: Check expected artifacts exist
shell: bash shell: bash
run: | run: |
VERSIONS="stable-20220615 stable-20220908 stable-20221211 stable-20230418 default latest nightly-latest" VERSIONS="stable-20221211 stable-20230418 stable-v2.13.5 stable-v2.14.6 default latest nightly-latest"
LANGUAGES="cpp csharp go java javascript python" LANGUAGES="cpp csharp go java javascript python"
for version in $VERSIONS; do for version in $VERSIONS; do
for os in ubuntu-latest macos-latest; do for os in ubuntu-latest macos-latest; do
pushd "./my-debug-artifacts-$os-$version" pushd "./my-debug-artifacts-$os-${version//./}"
echo "Artifacts from version $version on $os:" echo "Artifacts from version $version on $os:"
for language in $LANGUAGES; do for language in $LANGUAGES; do
echo "- Checking $language" echo "- Checking $language"

View File

@@ -4,7 +4,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test

View File

@@ -1,9 +1,9 @@
# This workflow runs after a release of the action. It: # This workflow runs after a merge to any release branch of the action. It:
# 1. Merges any changes from the release back into the main branch. Typically, this is just a single # 1. Tags the merge commit on the release branch that represents the new release with an `vN.x.y`
# commit that updates the changelog.
# 2. Tags the merge commit on the release branch that represents the new release with an `v2.x.y`
# tag # tag
# 3. Updates the `v2` tag to refer to this merge commit. # 2. Updates the `vN` tag to refer to this merge commit.
# 3. Iff vN == vLatest, merges any changes from the release back into the main branch.
# Typically, this is two commits one to update the version number and one to update dependencies.
name: Tag release and merge back name: Tag release and merge back
on: on:
@@ -16,7 +16,7 @@ on:
push: push:
branches: branches:
- releases/v2 - releases/v*
jobs: jobs:
merge-back: merge-back:
@@ -35,8 +35,10 @@ jobs:
GITHUB_CONTEXT: '${{ toJson(github) }}' GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "${GITHUB_CONTEXT}" run: echo "${GITHUB_CONTEXT}"
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 with:
fetch-depth: 0 # ensure we have all tags and can push commits
- uses: actions/setup-node@v4
- name: Update git config - name: Update git config
run: | run: |
@@ -51,6 +53,8 @@ jobs:
short_sha="${GITHUB_SHA:0:8}" short_sha="${GITHUB_SHA:0:8}"
NEW_BRANCH="mergeback/${VERSION}-to-${BASE_BRANCH}-${short_sha}" NEW_BRANCH="mergeback/${VERSION}-to-${BASE_BRANCH}-${short_sha}"
echo "newBranch=${NEW_BRANCH}" >> $GITHUB_OUTPUT echo "newBranch=${NEW_BRANCH}" >> $GITHUB_OUTPUT
LATEST_RELEASE_BRANCH=$(git branch -r | grep -E "origin/releases/v[0-9]+$" | sed 's/origin\///g' | sort -V | tail -1 | xargs)
echo "latest_release_branch=${LATEST_RELEASE_BRANCH}" >> $GITHUB_OUTPUT
- name: Dump branches - name: Dump branches
env: env:
@@ -59,6 +63,8 @@ jobs:
echo "BASE_BRANCH ${BASE_BRANCH}" echo "BASE_BRANCH ${BASE_BRANCH}"
echo "HEAD_BRANCH ${HEAD_BRANCH}" echo "HEAD_BRANCH ${HEAD_BRANCH}"
echo "NEW_BRANCH ${NEW_BRANCH}" echo "NEW_BRANCH ${NEW_BRANCH}"
echo "LATEST_RELEASE_BRANCH ${LATEST_RELEASE_BRANCH}"
echo "GITHUB_REF ${GITHUB_REF}"
- name: Create mergeback branch - name: Create mergeback branch
env: env:
@@ -89,8 +95,6 @@ jobs:
env: env:
VERSION: ${{ steps.getVersion.outputs.version }} VERSION: ${{ steps.getVersion.outputs.version }}
run: | run: |
# Unshallow the repo in order to allow pushes
git fetch --unshallow
# Create the `vx.y.z` tag # Create the `vx.y.z` tag
git tag --annotate "${VERSION}" --message "${VERSION}" git tag --annotate "${VERSION}" --message "${VERSION}"
# Update the `vx` tag # Update the `vx` tag
@@ -99,13 +103,13 @@ jobs:
git tag --annotate "${major_version_tag}" --message "${major_version_tag}" --force git tag --annotate "${major_version_tag}" --message "${major_version_tag}" --force
# Push the tags, using: # Push the tags, using:
# - `--atomic` to make sure we either update both tags or neither (an intermediate state, # - `--atomic` to make sure we either update both tags or neither (an intermediate state,
# e.g. where we update the v2.x.y tag on the remote but not the v2 tag, could result in # e.g. where we update the vN.x.y tag on the remote but not the vN tag, could result in
# unwanted Dependabot updates, e.g. from v2 to v2.x.y) # unwanted Dependabot updates, e.g. from vN to vN.x.y)
# - `--force` since we're overwriting the `vx` tag # - `--force` since we're overwriting the `vN` tag
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}" git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
- name: Create mergeback branch - name: Create mergeback branch
if: steps.check.outputs.exists != 'true' if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
env: env:
VERSION: "${{ steps.getVersion.outputs.version }}" VERSION: "${{ steps.getVersion.outputs.version }}"
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}" NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
@@ -129,8 +133,8 @@ jobs:
# Update the version number ready for the next release # Update the version number ready for the next release
npm version patch --no-git-tag-version npm version patch --no-git-tag-version
# Update the changelog # Update the changelog, adding a new version heading directly above the most recent existing one
perl -i -pe 's/^/## \[UNRELEASED\]\n\nNo user facing changes.\n\n/ if($.==5)' CHANGELOG.md awk '!f && /##/{print "'"## [UNRELEASED]\n\nNo user facing changes.\n"'"; f=1}1' CHANGELOG.md > temp && mv temp CHANGELOG.md
git add . git add .
git commit -m "Update changelog and version after ${VERSION}" git commit -m "Update changelog and version after ${VERSION}"

View File

@@ -2,7 +2,7 @@ name: PR Checks
on: on:
push: push:
branches: [main, releases/v2] branches: [main, releases/v*]
pull_request: pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
@@ -15,13 +15,39 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45
strategy:
matrix:
node-types-version: [16.11, current] # run tests on 16.11 while CodeQL Action v2 is still supported
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Lint - name: Lint
run: npm run-script lint run: npm run-script lint
- name: Update version of @types/node
if: matrix.node-types-version != 'current'
env:
NODE_TYPES_VERSION: ${{ matrix.node-types-version }}
run: |
# Export `NODE_TYPES_VERSION` so it's available to jq
export NODE_TYPES_VERSION="${NODE_TYPES_VERSION}"
contents=$(jq '.devDependencies."@types/node" = env.NODE_TYPES_VERSION' package.json)
echo "${contents}" > package.json
# Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
# However we're not checking in the updated lockfile here, so it's fine to run
# `npm install` on Linux.
npm install
if [ ! -z "$(git status --porcelain)" ]; then
git config --global user.email "github-actions@github.com"
git config --global user.name "github-actions[bot]"
# The period in `git add --all .` ensures that we stage deleted files too.
git add --all .
git commit -m "Use @types/node=${NODE_TYPES_VERSION}"
fi
- name: Check generated JS - name: Check generated JS
run: .github/workflows/script/check-js.sh run: .github/workflows/script/check-js.sh
@@ -31,7 +57,7 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Check node modules up to date - name: Check node modules up to date
run: .github/workflows/script/check-node-modules.sh run: .github/workflows/script/check-node-modules.sh
@@ -42,10 +68,10 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.11 python-version: 3.11
@@ -69,10 +95,51 @@ jobs:
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: npm test - name: npm test
run: | run: |
# Run any commands referenced in package.json using Bash, otherwise # Run any commands referenced in package.json using Bash, otherwise
# we won't be able to find them on Windows. # we won't be able to find them on Windows.
npm config set script-shell bash npm config set script-shell bash
npm test npm test
check-node-version:
if: ${{ github.event.pull_request }}
name: Check Action Node versions
runs-on: ubuntu-latest
timeout-minutes: 45
env:
BASE_REF: ${{ github.base_ref }}
steps:
- uses: actions/checkout@v4
- id: head-version
name: Verify all Actions use the same Node version
run: |
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "NODE_VERSION: ${NODE_VERSION}"
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
echo "::error::More than one node version used in 'action.yml' files."
exit 1
fi
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
- id: checkout-base
name: 'Backport: Check out base ref'
if: ${{ startsWith(github.head_ref, 'backport-') }}
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}
- name: 'Backport: Verify Node versions unchanged'
if: steps.checkout-base.outcome == 'success'
env:
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
run: |
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
echo "HEAD_VERSION: ${HEAD_VERSION}"
echo "BASE_VERSION: ${BASE_VERSION}"
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
echo "::error::Cannot change the Node version of an Action in a backport PR."
exit 1
fi

View File

@@ -2,7 +2,7 @@ name: Test Python Package Installation
on: on:
push: push:
branches: [main, releases/v2] branches: [main, releases/v*]
pull_request: pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
@@ -37,7 +37,7 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Initialize CodeQL - name: Initialize CodeQL
uses: ./init uses: ./init
@@ -84,7 +84,7 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Initialize CodeQL - name: Initialize CodeQL
uses: ./init uses: ./init
@@ -137,9 +137,9 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python_version }} python-version: ${{ matrix.python_version }}

42
.github/workflows/python312-windows.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Test that the workaround for python 3.12 on windows works
on:
push:
branches: [main, releases/v*]
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
schedule:
# Weekly on Monday.
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
test-setup-python-scripts:
timeout-minutes: 45
runs-on: windows-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: actions/checkout@v4
- name: Prepare test
uses: ./.github/actions/prepare-test
with:
version: default
- name: Initialize CodeQL
uses: ./../action/init
with:
tools: latest
languages: python
- name: Analyze
uses: ./../action/analyze
with:
upload: false
upload-database: false

View File

@@ -4,7 +4,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test

60
.github/workflows/rebuild.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Rebuild Action
on:
pull_request:
types: [labeled]
jobs:
rebuild:
name: Rebuild Action
runs-on: ubuntu-latest
if: github.event.label.name == 'Rebuild'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Remove label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
gh pr edit --repo github/codeql-action "$PR_NUMBER" \
--remove-label "Rebuild"
- name: Compile TypeScript
run: |
npm install
npm run lint -- --fix
npm run build
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Generate workflows
run: |
cd pr-checks
python -m pip install --upgrade pip
pip install ruamel.yaml==0.17.31
python3 sync.py
- name: Check for changes and push
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
if [ ! -z "$(git status --porcelain)" ]; then
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "Rebuild"
git push origin "HEAD:$BRANCH"
echo "Pushed a commit to rebuild the Action." \
"Please mark the PR as ready for review to trigger PR checks." |
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER"
fi

View File

@@ -2,6 +2,11 @@
# Update the required checks based on the current branch. # Update the required checks based on the current branch.
# Typically, this will be main. # Typically, this will be main.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
REPO_DIR="$(dirname "$SCRIPT_DIR")"
GRANDPARENT_DIR="$(dirname "$REPO_DIR")"
source "$GRANDPARENT_DIR/releases.ini"
if ! gh auth status 2>/dev/null; then if ! gh auth status 2>/dev/null; then
gh auth status gh auth status
echo "Failed: Not authorized. This script requires admin access to github/codeql-action through the gh CLI." echo "Failed: Not authorized. This script requires admin access to github/codeql-action through the gh CLI."
@@ -23,13 +28,28 @@ fi
echo "Getting checks for $GITHUB_SHA" echo "Getting checks for $GITHUB_SHA"
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks. # Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')" CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
echo "$CHECKS" | jq echo "$CHECKS" | jq
echo "{\"contexts\": ${CHECKS}}" > checks.json echo "{\"contexts\": ${CHECKS}}" > checks.json
for BRANCH in main releases/v2; do echo "Updating main"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/main/protection/required_status_checks" --input checks.json
# list all branchs on origin remote matching releases/v*
BRANCHES="$(git ls-remote --heads origin 'releases/v*' | sed 's?.*refs/heads/??' | sort -V)"
for BRANCH in $BRANCHES; do
# strip exact 'releases/v' prefix from $BRANCH using count of characters
VERSION="${BRANCH:10}"
if [ "$VERSION" -lt "$OLDEST_SUPPORTED_MAJOR_VERSION" ]; then
echo "Skipping $BRANCH"
continue
fi
echo "Updating $BRANCH" echo "Updating $BRANCH"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json
done done

View File

@@ -9,7 +9,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/v2 - releases/v*
pull_request: pull_request:
types: types:
- opened - opened
@@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Prepare test - name: Prepare test
id: prepare-test id: prepare-test
uses: ./.github/actions/prepare-test uses: ./.github/actions/prepare-test
@@ -53,4 +53,4 @@ jobs:
with: with:
upload-database: false upload-database: false
env: env:
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true

View File

@@ -26,7 +26,7 @@ jobs:
GITHUB_CONTEXT: '${{ toJson(github) }}' GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "$GITHUB_CONTEXT" run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Update git config - name: Update git config
run: | run: |

View File

@@ -11,19 +11,20 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action') if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action')
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Remove PR label - name: Remove PR label
env: env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
REPOSITORY: '${{ github.repository }}' REPOSITORY: '${{ github.repository }}'
PR_NUMBER: '${{ github.event.pull_request.number }}' PR_NUMBER: '${{ github.event.pull_request.number }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: | run: |
gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
- name: Push updated dependencies - name: Push updated dependencies
env: env:
BRANCH: '${{ github.head_ref }}' BRANCH: '${{ github.head_ref }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: | run: |
git fetch origin "$BRANCH" --depth=1 git fetch origin "$BRANCH" --depth=1
git checkout "origin/$BRANCH" git checkout "origin/$BRANCH"
@@ -34,4 +35,8 @@ jobs:
git add node_modules git add node_modules
git commit -am "Update checked-in dependencies" git commit -am "Update checked-in dependencies"
git push origin "HEAD:$BRANCH" git push origin "HEAD:$BRANCH"
echo "Pushed a commit to update the checked-in dependencies." \
"Please mark the PR as ready for review to trigger PR checks." |
gh pr comment --body-file - --repo github/codeql-action "${{ github.event.pull_request.number }}"
gh pr ready --undo --repo github/codeql-action "${{ github.event.pull_request.number }}"
fi fi

View File

@@ -1,46 +1,131 @@
name: Update release branch name: Update release branch
on: on:
# You can trigger this workflow via workflow dispatch to start a release. # You can trigger this workflow via workflow dispatch to start a release.
# This will open a PR to update the v2 release branch. # This will open a PR to update the latest release branch.
workflow_dispatch: workflow_dispatch:
# When a release is complete this workflow will open up backport PRs to older release branches.
# NB while it will trigger on any release branch update, the backport job will not proceed for
# anything other than than releases/v{latest}
push:
branches:
- releases/*
jobs: jobs:
prepare:
runs-on: ubuntu-latest
if: github.repository == 'github/codeql-action'
outputs:
version: ${{ steps.versions.outputs.version }}
major_version: ${{ steps.versions.outputs.major_version }}
latest_tag: ${{ steps.versions.outputs.latest_tag }}
backport_source_branch: ${{ steps.branches.outputs.backport_source_branch }}
backport_target_branches: ${{ steps.branches.outputs.backport_target_branches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for calculation of diffs
- uses: ./.github/actions/release-initialise
- name: Get version tags
id: versions
run: |
VERSION="v$(jq '.version' -r 'package.json')"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
MAJOR_VERSION=$(cut -d '.' -f1 <<< "${VERSION}")
echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT
LATEST_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
echo "latest_tag=${LATEST_TAG}" >> $GITHUB_OUTPUT
- id: branches
name: Determine older release branches
uses: ./.github/actions/release-branches
with:
major_version: ${{ steps.versions.outputs.major_version }}
latest_tag: ${{ steps.versions.outputs.latest_tag }}
- name: debug logging
run: |
echo 'version: ${{ steps.versions.outputs.version }}'
echo 'major_version: ${{ steps.versions.outputs.major_version }}'
echo 'latest_tag: ${{ steps.versions.outputs.latest_tag }}'
echo 'backport_source_branch: ${{ steps.branches.outputs.backport_source_branch }}'
echo 'backport_target_branches: ${{ steps.branches.outputs.backport_target_branches }}'
update: update:
timeout-minutes: 45 timeout-minutes: 45
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'github/codeql-action' if: github.event_name == 'workflow_dispatch'
needs: [prepare]
env:
REF_NAME: "${{ github.ref_name }}"
REPOSITORY: "${{ github.repository }}"
MAJOR_VERSION: "${{ needs.prepare.outputs.major_version }}"
LATEST_TAG: "${{ needs.prepare.outputs.latest_tag }}"
steps: steps:
- name: Dump environment - uses: actions/checkout@v4
run: env
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
with: with:
# Need full history so we calculate diffs fetch-depth: 0 # Need full history for calculation of diffs
fetch-depth: 0 - uses: ./.github/actions/release-initialise
- name: Set up Python # when the workflow has been manually triggered on main,
uses: actions/setup-python@v4 # we know that we definitely want the release branch to exist
with: - name: Ensure release branch exists
python-version: 3.8
- name: Install dependencies
run: | run: |
python -m pip install --upgrade pip echo "MAJOR_VERSION ${MAJOR_VERSION}"
pip install PyGithub==1.55 requests RELEASE_BRANCH=releases/${MAJOR_VERSION}
if git checkout $RELEASE_BRANCH > /dev/null 2>&1; then
echo "Branch $RELEASE_BRANCH already exists"
echo ""
else
echo "Creating $RELEASE_BRANCH branch"
git checkout -b ${RELEASE_BRANCH} ${LATEST_TAG}
git push --set-upstream origin ${RELEASE_BRANCH}
git branch --show-current
echo ""
fi
echo "Returning to branch: ${REF_NAME}"
git checkout ${REF_NAME}
- name: Update git config - name: Update current release branch
run: | if: github.event_name == 'workflow_dispatch'
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update release branch
run: | run: |
echo SOURCE_BRANCH=${REF_NAME}
echo TARGET_BRANCH=releases/${MAJOR_VERSION}
python .github/update-release-branch.py \ python .github/update-release-branch.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \ --github-token ${{ secrets.GITHUB_TOKEN }} \
--repository-nwo ${{ github.repository }} \ --repository-nwo ${{ github.repository }} \
--source-branch '${{ env.REF_NAME }}' \
--target-branch 'releases/${{ env.MAJOR_VERSION }}' \
--is-primary-release \
--conductor ${GITHUB_ACTOR}
backport:
timeout-minutes: 45
runs-on: ubuntu-latest
needs: [prepare]
if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' }}
strategy:
fail-fast: false
matrix:
target_branch: ${{ fromJson(needs.prepare.outputs.backport_target_branches) }}
env:
SOURCE_BRANCH: ${{ needs.prepare.outputs.backport_source_branch }}
TARGET_BRANCH: ${{ matrix.target_branch }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for calculation of diffs
- uses: ./.github/actions/release-initialise
- name: Update older release branch
run: |
echo SOURCE_BRANCH=${SOURCE_BRANCH}
echo TARGET_BRANCH=${TARGET_BRANCH}
python .github/update-release-branch.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--repository-nwo ${{ github.repository }} \
--source-branch ${SOURCE_BRANCH} \
--target-branch ${TARGET_BRANCH} \
--conductor ${GITHUB_ACTOR} --conductor ${GITHUB_ACTOR}

View File

@@ -14,13 +14,13 @@ jobs:
steps: steps:
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: "3.7" python-version: "3.7"
- name: Checkout CodeQL Action - name: Checkout CodeQL Action
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Checkout Enterprise Releases - name: Checkout Enterprise Releases
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
repository: github/enterprise-releases repository: github/enterprise-releases
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }} ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
@@ -52,5 +52,13 @@ jobs:
git add . git add .
git commit --message "Update supported GitHub Enterprise Server versions" git commit --message "Update supported GitHub Enterprise Server versions"
git push origin update-supported-enterprise-server-versions git push origin update-supported-enterprise-server-versions
gh pr create --fill --draft
body="This PR updates the list of supported GitHub Enterprise Server versions, either because a new "
body+="version is about to be feature frozen, or because an old release has been deprecated.\n\n"
body+="If an old release has been deprecated, please follow the instructions in CONTRIBUTING.md to "
body+="deprecate the corresponding version of CodeQL."
gh pr create --draft \
--title "Update supported GitHub Enterprise Server versions" \
--body "$body"
fi fi

View File

@@ -17,8 +17,8 @@ def main():
releases = json.loads(_RELEASE_FILE_PATH.read_text()) releases = json.loads(_RELEASE_FILE_PATH.read_text())
# Remove GHES version using a previous version numbering scheme. # Remove GHES version using a previous version numbering scheme.
if "11.10.340" in releases: if "11.10" in releases:
del releases["11.10.340"] del releases["11.10"]
oldest_supported_release = None oldest_supported_release = None
newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0") newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0")

20
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,20 @@
repos:
- repo: local
hooks:
- id: compile-ts
name: Compile typescript
files: \.[tj]s$
language: system
entry: npm run build
pass_filenames: false
- id: lint-ts
name: Lint typescript code
files: \.ts$
language: system
entry: npm run lint -- --fix
- id: pr-checks-sync
name: Synchronize PR check workflows
files: ^.github/workflows/__.*\.yml$|^pr-checks
language: system
entry: python3 pr-checks/sync.py
pass_filenames: false

11
.vscode/settings.json vendored
View File

@@ -6,5 +6,14 @@
// transpiled JavaScript // transpiled JavaScript
"lib": 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,
// Use the vendored TypeScript version to have a consistent development experience across
// machines.
"typescript.tsdk": "node_modules/typescript/lib",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
} }

View File

@@ -2,9 +2,128 @@
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
## [UNRELEASED] Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
## 3.23.2 - 26 Jan 2024
- On Linux, the maximum possible value for the `--threads` option now respects the CPU count as specified in `cgroup` files to more accurately reflect the number of available cores when running in containers. [#2083](https://github.com/github/codeql-action/pull/2083)
- Update default CodeQL bundle version to 2.16.1. [#2096](https://github.com/github/codeql-action/pull/2096)
## 3.23.1 - 17 Jan 2024
- Update default CodeQL bundle version to 2.16.0. [#2073](https://github.com/github/codeql-action/pull/2073)
- Change the retention period for uploaded debug artifacts to 7 days. Previously, this was whatever the repository default was. [#2079](https://github.com/github/codeql-action/pull/2079)
## 3.23.0 - 08 Jan 2024
- We are rolling out a feature in January 2024 that will disable Python dependency installation by default for all users. This improves the speed of analysis while having only a very minor impact on results. You can override this behavior by setting `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false` in your workflow, however we plan to remove this ability in future versions of the CodeQL Action. [#2031](https://github.com/github/codeql-action/pull/2031)
- The CodeQL Action now requires CodeQL version 2.11.6 or later. For more information, see [the corresponding changelog entry for CodeQL Action version 2.22.7](#2227---16-nov-2023). [#2009](https://github.com/github/codeql-action/pull/2009)
## 3.22.12 - 22 Dec 2023
- Update default CodeQL bundle version to 2.15.5. [#2047](https://github.com/github/codeql-action/pull/2047)
## 3.22.11 - 13 Dec 2023
- [v3+ only] The CodeQL Action now runs on Node.js v20. [#2006](https://github.com/github/codeql-action/pull/2006)
## 2.22.10 - 12 Dec 2023
- Update default CodeQL bundle version to 2.15.4. [#2016](https://github.com/github/codeql-action/pull/2016)
## 2.22.9 - 07 Dec 2023
No user facing changes.
## 2.22.8 - 23 Nov 2023
- Update default CodeQL bundle version to 2.15.3. [#2001](https://github.com/github/codeql-action/pull/2001)
## 2.22.7 - 16 Nov 2023
- Add a deprecation warning for customers using CodeQL version 2.11.5 and earlier. These versions of CodeQL were discontinued on 8 November 2023 alongside GitHub Enterprise Server 3.7, and will be unsupported by CodeQL Action v2.23.0 and later. [#1993](https://github.com/github/codeql-action/pull/1993)
- If you are using one of these versions, please update to CodeQL CLI version 2.11.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.10.5 and 2.11.5, you can replace `github/codeql-action/*@v2` by `github/codeql-action/*@v2.22.7` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
## 2.22.6 - 14 Nov 2023
- Customers running Python analysis on macOS using version 2.14.6 or earlier of the CodeQL CLI should upgrade to CodeQL CLI version 2.15.0 or later. If you do not wish to upgrade the CodeQL CLI, ensure that you are using Python version 3.11 or earlier, as CodeQL version 2.14.6 and earlier do not support Python 3.12. You can achieve this by adding a [`setup-python`](https://github.com/actions/setup-python) step to your code scanning workflow before the step that invokes `github/codeql-action/init`.
- Update default CodeQL bundle version to 2.15.2. [#1978](https://github.com/github/codeql-action/pull/1978)
## 2.22.5 - 27 Oct 2023
No user facing changes.
## 2.22.4 - 20 Oct 2023
- Update default CodeQL bundle version to 2.15.1. [#1953](https://github.com/github/codeql-action/pull/1953)
- Users will begin to see warnings on Node.js 16 deprecation in their Actions logs on code scanning runs starting October 23, 2023.
- All code scanning workflows should continue to succeed regardless of the warning.
- The team at GitHub maintaining the CodeQL Action is aware of the deprecation timeline and actively working on creating another version of the CodeQL Action, v3, that will bump us to Node 20.
- For more information, and to communicate with the maintaining team, please use [this issue](https://github.com/github/codeql-action/issues/1959).
## 2.22.3 - 13 Oct 2023
- Provide an authentication token when downloading the CodeQL Bundle from the API of a GitHub Enterprise Server instance. [#1945](https://github.com/github/codeql-action/pull/1945)
## 2.22.2 - 12 Oct 2023
- Update default CodeQL bundle version to 2.15.0. [#1938](https://github.com/github/codeql-action/pull/1938)
- Improve the log output when an error occurs in an invocation of the CodeQL CLI. [#1927](https://github.com/github/codeql-action/pull/1927)
## 2.22.1 - 09 Oct 2023
- Add a workaround for Python 3.12, which is not supported in CodeQL CLI version 2.14.6 or earlier. If you are running an analysis on Windows and using Python 3.12 or later, the CodeQL Action will switch to running Python 3.11. In this case, if Python 3.11 is not found, then the workflow will fail. [#1928](https://github.com/github/codeql-action/pull/1928)
## 2.22.0 - 06 Oct 2023
- The CodeQL Action now requires CodeQL version 2.10.5 or later. For more information, see the corresponding changelog entry for CodeQL Action version 2.21.8. [#1907](https://github.com/github/codeql-action/pull/1907)
- The CodeQL Action no longer runs ML-powered queries. For more information, including details on our investment in AI-powered security technology, see ["CodeQL code scanning deprecates ML-powered alerts."](https://github.blog/changelog/2023-09-29-codeql-code-scanning-deprecates-ml-powered-alerts/) [#1910](https://github.com/github/codeql-action/pull/1910)
- Fix a bug which prevented tracing of projects using Go 1.21 and above on Linux. [#1909](https://github.com/github/codeql-action/pull/1909)
## 2.21.9 - 27 Sep 2023
- Update default CodeQL bundle version to 2.14.6. [#1897](https://github.com/github/codeql-action/pull/1897)
- We are rolling out a feature in October 2023 that will improve the success rate of C/C++ autobuild. [#1889](https://github.com/github/codeql-action/pull/1889)
- We are rolling out a feature in October 2023 that will provide specific file coverage information for C and C++, Java and Kotlin, and JavaScript and TypeScript. Currently file coverage information for each of these pairs of languages is grouped together. [#1903](https://github.com/github/codeql-action/pull/1903)
- Add a warning to help customers avoid inadvertently analyzing the same CodeQL language in multiple matrix jobs. [#1901](https://github.com/github/codeql-action/pull/1901)
## 2.21.8 - 19 Sep 2023
- Add a deprecation warning for customers using CodeQL version 2.10.4 and earlier. These versions of CodeQL were discontinued on 12 September 2023 alongside GitHub Enterprise Server 3.6, and will be unsupported by the next minor release of the CodeQL Action. [#1884](https://github.com/github/codeql-action/pull/1884)
- If you are using one of these versions, please update to CodeQL CLI version 2.10.5 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.9.5 and 2.10.4, you can replace `github/codeql-action/*@v2` by `github/codeql-action/*@v2.21.7` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
- Enable the following language aliases when using CodeQL 2.14.4 and later: `c-cpp` for C/C++ analysis, `java-kotlin` for Java/Kotlin analysis, and `javascript-typescript` for JavaScript/TypeScript analysis. [#1883](https://github.com/github/codeql-action/pull/1883)
## 2.21.7 - 14 Sep 2023
- Update default CodeQL bundle version to 2.14.5. [#1882](https://github.com/github/codeql-action/pull/1882)
## 2.21.6 - 13 Sep 2023
- Better error message when there is a failure to determine the merge base of the code to analysis. [#1860](https://github.com/github/codeql-action/pull/1860)
- Improve the calculation of default amount of RAM used for query execution on GitHub Enterprise Server. This now reduces in proportion to the runner's total memory to better account for system memory usage, helping to avoid out-of-memory failures on larger runners. This feature is already available to GitHub.com users. [#1866](https://github.com/github/codeql-action/pull/1866)
- Enable improved file coverage information for GitHub Enterprise Server users. This feature is already available to GitHub.com users. [#1867](https://github.com/github/codeql-action/pull/1867)
- Update default CodeQL bundle version to 2.14.4. [#1873](https://github.com/github/codeql-action/pull/1873)
## 2.21.5 - 28 Aug 2023
- Update default CodeQL bundle version to 2.14.3. [#1845](https://github.com/github/codeql-action/pull/1845)
- Fixed a bug in CodeQL Action 2.21.3 onwards that affected beta support for [Project Lombok](https://projectlombok.org/) when analyzing Java. The environment variable `CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS` will now be respected if it was manually configured in the workflow. [#1844](https://github.com/github/codeql-action/pull/1844)
- Enable support for Kotlin 1.9.20 when running with CodeQL CLI v2.13.4 through v2.14.3. [#1853](https://github.com/github/codeql-action/pull/1853)
## 2.21.4 - 14 Aug 2023
- Update default CodeQL bundle version to 2.14.2. [#1831](https://github.com/github/codeql-action/pull/1831)
- Log a warning if the amount of available disk space runs low during a code scanning run. [#1825](https://github.com/github/codeql-action/pull/1825)
- When downloading CodeQL bundle version 2.13.4 and later, cache these bundles in the Actions tool cache using a simpler version number. [#1832](https://github.com/github/codeql-action/pull/1832)
- Fix an issue that first appeared in CodeQL Action v2.21.2 that prevented CodeQL invocations from being logged. [#1833](https://github.com/github/codeql-action/pull/1833)
- We are rolling out a feature in August 2023 that will improve the quality of file coverage information. [#1835](https://github.com/github/codeql-action/pull/1835)
## 2.21.3 - 08 Aug 2023
- We are rolling out a feature in August 2023 that will improve multi-threaded performance on larger runners. [#1817](https://github.com/github/codeql-action/pull/1817) - We are rolling out a feature in August 2023 that will improve multi-threaded performance on larger runners. [#1817](https://github.com/github/codeql-action/pull/1817)
- We are rolling out a feature in August 2023 that adds beta support for [Project Lombok](https://projectlombok.org/) when analyzing Java. [#1809](https://github.com/github/codeql-action/pull/1809)
- Reduce disk space usage when downloading the CodeQL bundle. [#1820](https://github.com/github/codeql-action/pull/1820) - Reduce disk space usage when downloading the CodeQL bundle. [#1820](https://github.com/github/codeql-action/pull/1820)
## 2.21.2 - 28 Jul 2023 ## 2.21.2 - 28 Jul 2023

View File

@@ -76,7 +76,45 @@ Since the `codeql-action` runs most of its testing through individual Actions wo
1. By default, this script retrieves the checks from the latest SHA on `main`, so make sure that your `main` branch is up to date. 1. By default, this script retrieves the checks from the latest SHA on `main`, so make sure that your `main` branch is up to date.
2. Run the script. If there's a reason to, you can pass in a different SHA as a CLI argument. 2. Run the script. If there's a reason to, you can pass in a different SHA as a CLI argument.
3. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v1`, and `v2` have been updated. 3. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v2`, and `v3` have been updated.
Note that any updates to checks need to be backported to the `releases/v2` branch, in order to maintain the same set of names for required checks.
## Deprecating a CodeQL version (write access required)
We typically deprecate a version of CodeQL when the GitHub Enterprise Server (GHES) version that it first shipped in is deprecated.
1. Work out the next minimum version of CodeQL. This is the version that shipped in the version of GHES after the one that has just been deprecated.
1. Notify users using the old version of CodeQL about the deprecation.
- Update `CODEQL_NEXT_MINIMUM_VERSION`, `GHES_VERSION_MOST_RECENTLY_DEPRECATED`, and `GHES_MOST_RECENT_DEPRECATION_DATE` in `src/codeql.ts` to reflect the new minimum version of CodeQL and the GHES version that has just been deprecated.
- Add a changelog note announcing the deprecation.
- Example PR: https://github.com/github/codeql-action/pull/1884
1. Release the Action, or wait for the next scheduled release of the Action, then wait at least a week so users have time to see and act on the deprecation warning.
1. Remove support for the old version of CodeQL.
- Bump `CODEQL_MINIMUM_VERSION` in `src/codeql.ts` to the new minimum version of CodeQL.
- Remove any code that is only needed to support the old version of CodeQL. This is often behind a version guard, so look for instances of version numbers between the old minimum version and the new minimum version in the codebase. A good place to start is the list of version numbers in `src/codeql.ts`.
- Update the default set of CodeQL test versions in `pr-checks/sync.py`.
- Remove the old minimum version of CodeQL.
- Add the latest patch release for any new CodeQL minor version series that have shipped in GHES.
- Run the script to update the generated PR checks.
- Do the same for PR checks that aren't auto-generated.
- Add a changelog note announcing the new minimum version of CodeQL that is now required.
- Example PR: https://github.com/github/codeql-action/pull/1907
## Deprecating a CodeQL Action version (write access required)
We sometimes maintain multiple versions of the CodeQL Action to enable customers on older but still supported versions of GitHub Enterprise Server (GHES) to continue to benefit from the latest CodeQL improvements. To accomplish this, the release process automation listens to updates to the release branch for the newest supported version. When this branch is updated, the release process automatically opens backport PRs to update the release branches for older versions.
We typically deprecate older versions of the Action once all supported GHES versions are compatible with the version of Node.js we are using on `main`.
To deprecate an older version of the Action:
1. Notify any users who are still pinned to the `vN` tag of the deprecated version of the Action, giving as much notice as is practical.
- Add a changelog note announcing the deprecation.
- Implement an Actions warning for customers using the deprecated version.
1. Wait for the deprecation period to pass.
1. Upgrade the Actions warning for customers using the deprecated version to a non-fatal error, and mention that this version of the Action is no longer supported.
1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [releases.ini](.github/releases.ini). Once this PR is merged, the release process will no longer backport changes to the deprecated release version.
## Resources ## Resources

View File

@@ -12,9 +12,9 @@ The underlying CodeQL CLI, used in this action, is licensed under the [GitHub Co
## Usage ## Usage
We recommend using default setup to configure CodeQL analysis for your repository. For more information, see "[Configuring default setup for code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-default-setup-for-code-scanning)." We recommend using default setup to configure CodeQL analysis for your repository. For more information, see "[Configuring default setup for code scanning](https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)."
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-advanced-setup-for-code-scanning)" and "[Customizing code scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning)." You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
## Troubleshooting ## Troubleshooting

View File

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

View File

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

View File

@@ -7,7 +7,8 @@ inputs:
required: false required: false
# If not specified the Action will check in several places until it finds the CodeQL tools. # If not specified the Action will check in several places until it finds the CodeQL tools.
languages: languages:
description: The languages to be analysed description: |
A comma-separated value of the languages to be analysed e.g. python,javascript
required: false required: false
token: token:
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input. description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
@@ -44,7 +45,7 @@ inputs:
db-location: db-location:
description: Path where CodeQL databases should be created. If not specified, a temporary directory will be used. description: Path where CodeQL databases should be created. If not specified, a temporary directory will be used.
required: false required: false
config: config:
description: Configuration passed as a YAML string in the same format as the config-file input. This takes precedence over the config-file input. description: Configuration passed as a YAML string in the same format as the config-file input. This takes precedence over the config-file input.
required: false required: false
queries: queries:
@@ -108,6 +109,6 @@ outputs:
codeql-path: codeql-path:
description: The path of the CodeQL binary used for analysis description: The path of the CodeQL binary used for analysis
runs: runs:
using: 'node16' using: node20
main: '../lib/init-action.js' main: '../lib/init-action.js'
post: '../lib/init-action-post.js' post: '../lib/init-action-post.js'

73
lib/actions-util.js generated
View File

@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result; return result;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getWorkflowRunAttempt = exports.getWorkflowRunID = exports.getUploadValue = exports.printDebugLogs = exports.isAnalyzingDefaultBranch = exports.getRelativeScriptPath = exports.isRunningLocalAction = exports.getWorkflowEventName = exports.getActionVersion = exports.getActionsStatus = exports.getRef = exports.determineMergeBaseCommitOid = exports.getCommitOid = exports.getTemporaryDirectory = exports.getOptionalInput = exports.getRequiredInput = void 0; exports.getFileType = exports.getWorkflowRunAttempt = exports.getWorkflowRunID = exports.getUploadValue = exports.printDebugLogs = exports.isAnalyzingDefaultBranch = exports.getRelativeScriptPath = exports.isRunningLocalAction = exports.getWorkflowEventName = exports.getActionVersion = exports.getRef = exports.determineMergeBaseCommitOid = exports.getCommitOid = exports.getTemporaryDirectory = exports.getOptionalInput = exports.getRequiredInput = void 0;
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path = __importStar(require("path")); const path = __importStar(require("path"));
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
@@ -75,6 +75,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
// the merge commit, which must mean that git is available. // the merge commit, which must mean that git is available.
// Even if this does go wrong, it's not a huge problem for the alerts to // Even if this does go wrong, it's not a huge problem for the alerts to
// reported on the merge commit. // reported on the merge commit.
let stderr = "";
try { try {
let commitOid = ""; let commitOid = "";
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], { await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], {
@@ -84,7 +85,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
commitOid += data.toString(); commitOid += data.toString();
}, },
stderr: (data) => { stderr: (data) => {
process.stderr.write(data); stderr += data.toString();
}, },
}, },
cwd: checkoutPath, cwd: checkoutPath,
@@ -92,9 +93,13 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") {
return commitOid.trim(); return commitOid.trim();
} }
catch (e) { catch (e) {
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment."); if (stderr.includes("not a git repository")) {
core.debug(`Reason: ${e.message}`); core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment. " +
core.debug(e.stack || "NO STACK"); "The checkout path provided to the action does not appear to be a git repository.");
}
else {
core.info(`Could not determine current commit SHA using git. Continuing with data from user input or environment. ${stderr}`);
}
return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
} }
}; };
@@ -103,12 +108,13 @@ exports.getCommitOid = getCommitOid;
* If the action was triggered by a pull request, determine the commit sha of the merge base. * If the action was triggered by a pull request, determine the commit sha of the merge base.
* Returns undefined if run by other triggers or the merge base cannot be determined. * Returns undefined if run by other triggers or the merge base cannot be determined.
*/ */
const determineMergeBaseCommitOid = async function () { const determineMergeBaseCommitOid = async function (checkoutPathOverride) {
if (getWorkflowEventName() !== "pull_request") { if (getWorkflowEventName() !== "pull_request") {
return undefined; return undefined;
} }
const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
const checkoutPath = (0, exports.getOptionalInput)("checkout_path"); const checkoutPath = checkoutPathOverride ?? (0, exports.getOptionalInput)("checkout_path");
let stderr = "";
try { try {
let commitOid = ""; let commitOid = "";
let baseOid = ""; let baseOid = "";
@@ -130,7 +136,7 @@ const determineMergeBaseCommitOid = async function () {
} }
}, },
stderr: (data) => { stderr: (data) => {
process.stderr.write(data); stderr += data.toString();
}, },
}, },
cwd: checkoutPath, cwd: checkoutPath,
@@ -144,8 +150,14 @@ const determineMergeBaseCommitOid = async function () {
return undefined; return undefined;
} }
catch (e) { catch (e) {
core.info(`Failed to call git to determine merge base. Continuing with data from environment: ${e}`); if (stderr.includes("not a git repository")) {
core.info(e.stack || "NO STACK"); core.info("The checkout path provided to the action does not appear to be a git repository. " +
"Will calculate the merge base on the server.");
}
else {
core.info(`Failed to call git to determine merge base. Will calculate the merge base on ` +
`the server. Reason: ${stderr}`);
}
return undefined; return undefined;
} }
}; };
@@ -165,7 +177,7 @@ async function getRef() {
const hasShaInput = !!shaInput; const hasShaInput = !!shaInput;
// If one of 'ref' or 'sha' are provided, both are required // If one of 'ref' or 'sha' are provided, both are required
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) { if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
throw new Error("Both 'ref' and 'sha' are required if one of them is provided."); throw new util_1.UserError("Both 'ref' and 'sha' are required if one of them is provided.");
} }
const ref = refInput || getRefFromEnv(); const ref = refInput || getRefFromEnv();
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
@@ -220,15 +232,6 @@ function getRefFromEnv() {
} }
return refEnv; return refEnv;
} }
function getActionsStatus(error, otherFailureCause) {
if (error || otherFailureCause) {
return error instanceof util_1.UserError ? "user-error" : "failure";
}
else {
return "success";
}
}
exports.getActionsStatus = getActionsStatus;
function getActionVersion() { function getActionVersion() {
return pkg.version; return pkg.version;
} }
@@ -377,4 +380,34 @@ function getWorkflowRunAttempt() {
return workflowRunAttempt; return workflowRunAttempt;
} }
exports.getWorkflowRunAttempt = getWorkflowRunAttempt; exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
/**
* Tries to obtain the output of the `file` command for the file at the specified path.
* The output will vary depending on the type of `file`, which operating system we are running on, etc.
*/
const getFileType = async (filePath) => {
let stderr = "";
let stdout = "";
try {
// The `file` command will output information about the type of file pointed at by `filePath`.
// For binary files, this may include e.g. whether they are static of dynamic binaries.
// The `-L` switch instructs the command to follow symbolic links.
await new toolrunner.ToolRunner(await safeWhich.safeWhich("file"), ["-L", filePath], {
silent: true,
listeners: {
stdout: (data) => {
stdout += data.toString();
},
stderr: (data) => {
stderr += data.toString();
},
},
}).exec();
return stdout.trim();
}
catch (e) {
core.info(`Could not determine type of ${filePath} from ${stdout}. ${stderr}`);
throw e;
}
};
exports.getFileType = getFileType;
//# sourceMappingURL=actions-util.js.map //# sourceMappingURL=actions-util.js.map

File diff suppressed because one or more lines are too long

View File

@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path = __importStar(require("path")); const path = __importStar(require("path"));
const core = __importStar(require("@actions/core"));
const ava_1 = __importDefault(require("ava")); const ava_1 = __importDefault(require("ava"));
const sinon = __importStar(require("sinon")); const sinon = __importStar(require("sinon"));
const actionsUtil = __importStar(require("./actions-util")); const actionsUtil = __importStar(require("./actions-util"));
@@ -213,37 +214,32 @@ const util_1 = require("./util");
getAdditionalInputStub.restore(); getAdditionalInputStub.restore();
}); });
}); });
(0, ava_1.default)("createStatusReportBase", async (t) => { (0, ava_1.default)("determineMergeBaseCommitOid non-pullrequest", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => { const infoStub = sinon.stub(core, "info");
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); process.env["GITHUB_EVENT_NAME"] = "hucairz";
process.env["GITHUB_REF"] = "refs/heads/main"; process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
process.env["GITHUB_SHA"] = "a".repeat(40); const result = await actionsUtil.determineMergeBaseCommitOid(__dirname);
process.env["GITHUB_RUN_ID"] = "100"; t.deepEqual(result, undefined);
process.env["GITHUB_RUN_ATTEMPT"] = "2"; t.deepEqual(0, infoStub.callCount);
process.env["GITHUB_REPOSITORY"] = "octocat/HelloWorld"; infoStub.restore();
process.env["CODEQL_ACTION_ANALYSIS_KEY"] = "analysis-key"; });
process.env["RUNNER_OS"] = "macOS"; (0, ava_1.default)("determineMergeBaseCommitOid no error", async (t) => {
const getRequiredInput = sinon.stub(actionsUtil, "getRequiredInput"); const infoStub = sinon.stub(core, "info");
getRequiredInput.withArgs("matrix").resolves("input/matrix"); process.env["GITHUB_EVENT_NAME"] = "pull_request";
const statusReport = await (0, api_client_1.createStatusReportBase)("init", "failure", new Date("May 19, 2023 05:19:00"), "failure cause", "exception stack trace"); process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
t.assert(typeof statusReport.job_run_uuid === "string"); await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../.."));
t.assert(statusReport.workflow_run_id === 100); t.deepEqual(1, infoStub.callCount);
t.assert(statusReport.workflow_run_attempt === 2); t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository."));
t.assert(statusReport.workflow_name === (process.env["GITHUB_WORKFLOW"] || "")); infoStub.restore();
t.assert(statusReport.job_name === (process.env["GITHUB_JOB"] || "")); });
t.assert(statusReport.analysis_key === "analysis-key"); (0, ava_1.default)("determineMergeBaseCommitOid other error", async (t) => {
t.assert(statusReport.commit_oid === process.env["GITHUB_SHA"]); const infoStub = sinon.stub(core, "info");
t.assert(statusReport.ref === process.env["GITHUB_REF"]); process.env["GITHUB_EVENT_NAME"] = "pull_request";
t.assert(statusReport.action_name === "init"); process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a";
t.assert(statusReport.action_oid === "unknown"); const result = await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../../i-dont-exist"));
t.assert(statusReport.started_at === process.env[environment_1.EnvVar.WORKFLOW_STARTED_AT]); t.deepEqual(result, undefined);
t.assert(statusReport.action_started_at === t.deepEqual(1, infoStub.callCount);
new Date("May 19, 2023 05:19:00").toISOString()); t.assert(infoStub.firstCall.args[0].startsWith("Failed to call git to determine merge base."));
t.assert(statusReport.status === "failure"); infoStub.restore();
t.assert(statusReport.cause === "failure cause");
t.assert(statusReport.exception === "exception stack trace");
t.assert(statusReport.runner_os === process.env["RUNNER_OS"]);
t.assert(typeof statusReport.action_version === "string");
});
}); });
//# sourceMappingURL=actions-util.test.js.map //# sourceMappingURL=actions-util.test.js.map

File diff suppressed because one or more lines are too long

84
lib/analysis-paths.js generated
View File

@@ -1,84 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.includeAndExcludeAnalysisPaths = exports.printPathFiltersWarning = exports.legalWindowsPathCharactersRegex = void 0;
const path = __importStar(require("path"));
function isInterpretedLanguage(language) {
return (language === "javascript" || language === "python" || language === "ruby");
}
// Matches a string containing only characters that are legal to include in paths on windows.
exports.legalWindowsPathCharactersRegex = /^[^<>:"|?]*$/;
// Builds an environment variable suitable for LGTM_INDEX_INCLUDE or LGTM_INDEX_EXCLUDE
function buildIncludeExcludeEnvVar(paths) {
// Ignore anything containing a *
paths = paths.filter((p) => p.indexOf("*") === -1);
// Some characters are illegal in path names in windows
if (process.platform === "win32") {
paths = paths.filter((p) => p.match(exports.legalWindowsPathCharactersRegex));
}
return paths.join("\n");
}
function printPathFiltersWarning(config, logger) {
// Index include/exclude/filters only work in javascript/python/ruby.
// If any other languages are detected/configured then show a warning.
if ((config.paths.length !== 0 || config.pathsIgnore.length !== 0) &&
!config.languages.every(isInterpretedLanguage)) {
logger.warning('The "paths"/"paths-ignore" fields of the config only have effect for JavaScript, Python, and Ruby');
}
}
exports.printPathFiltersWarning = printPathFiltersWarning;
function includeAndExcludeAnalysisPaths(config) {
// The 'LGTM_INDEX_INCLUDE' and 'LGTM_INDEX_EXCLUDE' environment variables
// control which files/directories are traversed when scanning.
// This allows including files that otherwise would not be scanned, or
// excluding and not traversing entire file subtrees.
// It does not understand globs or double-globs because that would require it to
// traverse the entire file tree to determine which files are matched.
// Any paths containing "*" are not included in these.
if (config.paths.length !== 0) {
process.env["LGTM_INDEX_INCLUDE"] = buildIncludeExcludeEnvVar(config.paths);
}
// If the temporary or tools directory is in the working directory ignore that too.
const tempRelativeToWorking = path.relative(process.cwd(), config.tempDir);
let pathsIgnore = config.pathsIgnore;
if (!tempRelativeToWorking.startsWith("..") &&
!path.isAbsolute(tempRelativeToWorking)) {
pathsIgnore = pathsIgnore.concat(tempRelativeToWorking);
}
if (pathsIgnore.length !== 0) {
process.env["LGTM_INDEX_EXCLUDE"] = buildIncludeExcludeEnvVar(pathsIgnore);
}
// The 'LGTM_INDEX_FILTERS' environment variable controls which files are
// extracted or ignored. It does not control which directories are traversed.
// This does understand the glob and double-glob syntax.
const filters = [];
filters.push(...config.paths.map((p) => `include:${p}`));
filters.push(...config.pathsIgnore.map((p) => `exclude:${p}`));
if (filters.length !== 0) {
process.env["LGTM_INDEX_FILTERS"] = filters.join("\n");
}
}
exports.includeAndExcludeAnalysisPaths = includeAndExcludeAnalysisPaths;
//# sourceMappingURL=analysis-paths.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"analysis-paths.js","sourceRoot":"","sources":["../src/analysis-paths.ts"],"names":[],"mappings":"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"}

View File

@@ -1,124 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava"));
const analysisPaths = __importStar(require("./analysis-paths"));
const testing_utils_1 = require("./testing-utils");
const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default);
(0, ava_1.default)("emptyPaths", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const config = {
languages: [],
queries: {},
pathsIgnore: [],
paths: [],
originalUserInput: {},
tempDir: tmpDir,
codeQLCmd: "",
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
dbLocation: path.resolve(tmpDir, "codeql_databases"),
packs: {},
debugMode: false,
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
augmentationProperties: {
injectedMlQueries: false,
packsInputCombines: false,
queriesInputCombines: false,
},
trapCaches: {},
trapCacheDownloadTime: 0,
};
analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
t.is(process.env["LGTM_INDEX_EXCLUDE"], undefined);
t.is(process.env["LGTM_INDEX_FILTERS"], undefined);
});
});
(0, ava_1.default)("nonEmptyPaths", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const config = {
languages: [],
queries: {},
paths: ["path1", "path2", "**/path3"],
pathsIgnore: ["path4", "path5", "path6/**"],
originalUserInput: {},
tempDir: tmpDir,
codeQLCmd: "",
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
dbLocation: path.resolve(tmpDir, "codeql_databases"),
packs: {},
debugMode: false,
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
augmentationProperties: {
injectedMlQueries: false,
packsInputCombines: false,
queriesInputCombines: false,
},
trapCaches: {},
trapCacheDownloadTime: 0,
};
analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], "path1\npath2");
t.is(process.env["LGTM_INDEX_EXCLUDE"], "path4\npath5");
t.is(process.env["LGTM_INDEX_FILTERS"], "include:path1\ninclude:path2\ninclude:**/path3\nexclude:path4\nexclude:path5\nexclude:path6/**");
});
});
(0, ava_1.default)("exclude temp dir", async (t) => {
const tempDir = path.join(process.cwd(), "codeql-runner-temp");
const config = {
languages: [],
queries: {},
pathsIgnore: [],
paths: [],
originalUserInput: {},
tempDir,
codeQLCmd: "",
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
dbLocation: path.resolve(tempDir, "codeql_databases"),
packs: {},
debugMode: false,
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
augmentationProperties: {
injectedMlQueries: false,
packsInputCombines: false,
queriesInputCombines: false,
},
trapCaches: {},
trapCacheDownloadTime: 0,
};
analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
t.is(process.env["LGTM_INDEX_EXCLUDE"], "codeql-runner-temp");
t.is(process.env["LGTM_INDEX_FILTERS"], undefined);
});
//# sourceMappingURL=analysis-paths.test.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"analysis-paths.test.js","sourceRoot":"","sources":["../src/analysis-paths.test.ts"],"names":[],"mappings":"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"}

View File

@@ -32,6 +32,7 @@ const actionsUtil = __importStar(require("./actions-util"));
const analyze = __importStar(require("./analyze")); const analyze = __importStar(require("./analyze"));
const api = __importStar(require("./api-client")); const api = __importStar(require("./api-client"));
const configUtils = __importStar(require("./config-utils")); const configUtils = __importStar(require("./config-utils"));
const statusReport = __importStar(require("./status-report"));
const testing_utils_1 = require("./testing-utils"); const testing_utils_1 = require("./testing-utils");
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default); (0, testing_utils_1.setupTests)(ava_1.default);
@@ -47,9 +48,9 @@ const util = __importStar(require("./util"));
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
process.env["GITHUB_API_URL"] = "https://api.github.com"; process.env["GITHUB_API_URL"] = "https://api.github.com";
sinon sinon
.stub(api, "createStatusReportBase") .stub(statusReport, "createStatusReportBase")
.resolves({}); .resolves({});
sinon.stub(api, "sendStatusReport").resolves(true); sinon.stub(statusReport, "sendStatusReport").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true); sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
const gitHubVersion = { const gitHubVersion = {
type: util.GitHubVariant.DOTCOM, type: util.GitHubVariant.DOTCOM,

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":"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"} {"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":"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"}

View File

@@ -32,6 +32,7 @@ const actionsUtil = __importStar(require("./actions-util"));
const analyze = __importStar(require("./analyze")); const analyze = __importStar(require("./analyze"));
const api = __importStar(require("./api-client")); const api = __importStar(require("./api-client"));
const configUtils = __importStar(require("./config-utils")); const configUtils = __importStar(require("./config-utils"));
const statusReport = __importStar(require("./status-report"));
const testing_utils_1 = require("./testing-utils"); const testing_utils_1 = require("./testing-utils");
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default); (0, testing_utils_1.setupTests)(ava_1.default);
@@ -47,9 +48,9 @@ const util = __importStar(require("./util"));
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
process.env["GITHUB_API_URL"] = "https://api.github.com"; process.env["GITHUB_API_URL"] = "https://api.github.com";
sinon sinon
.stub(api, "createStatusReportBase") .stub(statusReport, "createStatusReportBase")
.resolves({}); .resolves({});
sinon.stub(api, "sendStatusReport").resolves(true); sinon.stub(statusReport, "sendStatusReport").resolves(true);
const gitHubVersion = { const gitHubVersion = {
type: util.GitHubVariant.DOTCOM, type: util.GitHubVariant.DOTCOM,
}; };

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":"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"} {"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":"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"}

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action-post-helper.js","sourceRoot":"","sources":["../src/analyze-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAA2C;AAC3C,uCAA6C;AAEtC,KAAK,UAAU,GAAG,CAAC,wBAAkC;IAC1D,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;KACH;IAED,+CAA+C;IAC/C,IAAI,MAAM,EAAE,SAAS,EAAE;QACrB,IAAI,CAAC,IAAI,CACP,oFAAoF,CACrF,CAAC;QACF,MAAM,SAAS,GAAG,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACzD,MAAM,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACnD;AACH,CAAC;AAlBD,kBAkBC"} {"version":3,"file":"analyze-action-post-helper.js","sourceRoot":"","sources":["../src/analyze-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAA2C;AAC3C,uCAA6C;AAEtC,KAAK,UAAU,GAAG,CAAC,wBAAkC;IAC1D,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;IACJ,CAAC;IAED,+CAA+C;IAC/C,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,CACP,oFAAoF,CACrF,CAAC;QACF,MAAM,SAAS,GAAG,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACzD,MAAM,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;AACH,CAAC;AAlBD,kBAkBC"}

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;KAC5E;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;KACH;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} {"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

65
lib/analyze-action.js generated
View File

@@ -26,54 +26,50 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.runPromise = exports.sendStatusReport = void 0; exports.runPromise = void 0;
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path_1 = __importDefault(require("path")); const path_1 = __importDefault(require("path"));
const perf_hooks_1 = require("perf_hooks"); const perf_hooks_1 = require("perf_hooks");
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const safe_which_1 = require("@chrisgavin/safe-which");
const actionsUtil = __importStar(require("./actions-util")); const actionsUtil = __importStar(require("./actions-util"));
const analyze_1 = require("./analyze"); const analyze_1 = require("./analyze");
const api_client_1 = require("./api-client"); const api_client_1 = require("./api-client");
const api = __importStar(require("./api-client"));
const autobuild_1 = require("./autobuild"); const autobuild_1 = require("./autobuild");
const codeql_1 = require("./codeql"); const codeql_1 = require("./codeql");
const config_utils_1 = require("./config-utils"); const config_utils_1 = require("./config-utils");
const database_upload_1 = require("./database-upload"); const database_upload_1 = require("./database-upload");
const diagnostics_1 = require("./diagnostics");
const environment_1 = require("./environment"); const environment_1 = require("./environment");
const feature_flags_1 = require("./feature-flags"); const feature_flags_1 = require("./feature-flags");
const languages_1 = require("./languages"); const languages_1 = require("./languages");
const logging_1 = require("./logging"); const logging_1 = require("./logging");
const repository_1 = require("./repository"); const repository_1 = require("./repository");
const statusReport = __importStar(require("./status-report"));
const status_report_1 = require("./status-report");
const trap_caching_1 = require("./trap-caching"); const trap_caching_1 = require("./trap-caching");
const uploadLib = __importStar(require("./upload-lib")); const uploadLib = __importStar(require("./upload-lib"));
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
const util_1 = require("./util");
async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger) { async function sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, logger) {
const status = actionsUtil.getActionsStatus(error, stats?.analyze_failure_language); const status = (0, status_report_1.getActionsStatus)(error, stats?.analyze_failure_language);
const statusReportBase = await api.createStatusReportBase("finish", status, startedAt, error?.message, error?.stack); const statusReportBase = await (0, status_report_1.createStatusReportBase)("finish", status, startedAt, await util.checkDiskUsage(), error?.message, error?.stack);
const statusReport = { const report = {
...statusReportBase, ...statusReportBase,
...(config
? {
ml_powered_javascript_queries: (0, config_utils_1.getMlPoweredJsQueriesStatus)(config),
}
: {}),
...(stats || {}), ...(stats || {}),
...(dbCreationTimings || {}), ...(dbCreationTimings || {}),
}; };
if (config && didUploadTrapCaches) { if (config && didUploadTrapCaches) {
const trapCacheUploadStatusReport = { const trapCacheUploadStatusReport = {
...statusReport, ...report,
trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0), trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0),
trap_cache_upload_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)), trap_cache_upload_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
}; };
await api.sendStatusReport(trapCacheUploadStatusReport); await statusReport.sendStatusReport(trapCacheUploadStatusReport);
} }
else { else {
await api.sendStatusReport(statusReport); await statusReport.sendStatusReport(report);
} }
} }
exports.sendStatusReport = sendStatusReport;
// `expect-error` should only be set to a non-false value by the CodeQL Action PR checks. // `expect-error` should only be set to a non-false value by the CodeQL Action PR checks.
function hasBadExpectErrorInput() { function hasBadExpectErrorInput() {
return (actionsUtil.getOptionalInput("expect-error") !== "false" && return (actionsUtil.getOptionalInput("expect-error") !== "false" &&
@@ -133,6 +129,7 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) {
} }
return; return;
} }
logger.debug("Running Go autobuild because extraction output (TRAP files) for Go code has not been found.");
await (0, autobuild_1.runAutobuild)(languages_1.Language.go, config, logger); await (0, autobuild_1.runAutobuild)(languages_1.Language.go, config, logger);
} }
async function run() { async function run() {
@@ -146,7 +143,7 @@ async function run() {
util.initializeEnvironment(actionsUtil.getActionVersion()); util.initializeEnvironment(actionsUtil.getActionVersion());
const logger = (0, logging_1.getActionsLogger)(); const logger = (0, logging_1.getActionsLogger)();
try { try {
if (!(await api.sendStatusReport(await api.createStatusReportBase("finish", "starting", startedAt)))) { if (!(await statusReport.sendStatusReport(await (0, status_report_1.createStatusReportBase)("finish", "starting", startedAt, await util.checkDiskUsage(logger))))) {
return; return;
} }
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger); config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
@@ -154,15 +151,39 @@ async function run() {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
} }
if (hasBadExpectErrorInput()) { if (hasBadExpectErrorInput()) {
throw new Error("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork."); throw new util.UserError("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.");
} }
const apiDetails = (0, api_client_1.getApiDetails)(); const apiDetails = (0, api_client_1.getApiDetails)();
const outputDir = actionsUtil.getRequiredInput("output"); const outputDir = actionsUtil.getRequiredInput("output");
const threads = util.getThreadsFlag(actionsUtil.getOptionalInput("threads") || process.env["CODEQL_THREADS"], logger); const threads = util.getThreadsFlag(actionsUtil.getOptionalInput("threads") || process.env["CODEQL_THREADS"], logger);
const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")); const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
const gitHubVersion = await (0, api_client_1.getGitHubVersion)(); const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
util.checkActionVersion(actionsUtil.getActionVersion(), gitHubVersion);
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger); const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled)); const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
// Check that `which go` still points at the same path it did when the `init` Action ran to ensure that no steps
// in-between performed any setup. We encourage users to perform all setup tasks before initializing CodeQL so that
// the setup tasks do not interfere with our analysis.
// Furthermore, if we installed a wrapper script in the `init` Action, we need to ensure that there isn't a step
// in the workflow after the `init` step which installs a different version of Go and takes precedence in the PATH,
// thus potentially circumventing our workaround that allows tracing to work.
const goInitPath = process.env[environment_1.EnvVar.GO_BINARY_LOCATION];
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] !== "true" &&
goInitPath !== undefined) {
const goBinaryPath = await (0, safe_which_1.safeWhich)("go");
if (goInitPath !== goBinaryPath) {
core.warning(`Expected \`which go\` to return ${goInitPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`);
(0, diagnostics_1.addDiagnostic)(config, languages_1.Language.go, (0, diagnostics_1.makeDiagnostic)("go/workflow/go-installed-after-codeql-init", "Go was installed after the `codeql-action/init` Action was run", {
markdownMessage: "To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",
visibility: {
statusPage: true,
telemetry: true,
cliSummaryTable: true,
},
severity: "warning",
}));
}
}
await runAutobuildIfLegacyGoWorkflow(config, logger); await runAutobuildIfLegacyGoWorkflow(config, logger);
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features); dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features);
if (actionsUtil.getRequiredInput("skip-queries") !== "true") { if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
@@ -179,7 +200,7 @@ async function run() {
core.setOutput("sarif-output", path_1.default.resolve(outputDir)); core.setOutput("sarif-output", path_1.default.resolve(outputDir));
const uploadInput = actionsUtil.getOptionalInput("upload"); const uploadInput = actionsUtil.getOptionalInput("upload");
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") { if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger); uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: false });
core.setOutput("sarif-id", uploadResult.sarifID); core.setOutput("sarif-id", uploadResult.sarifID);
} }
else { else {
@@ -207,7 +228,7 @@ async function run() {
core.exportVariable(environment_1.EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY, "true"); core.exportVariable(environment_1.EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY, "true");
} }
catch (unwrappedError) { catch (unwrappedError) {
const error = (0, util_1.wrapError)(unwrappedError); const error = util.wrapError(unwrappedError);
if (actionsUtil.getOptionalInput("expect-error") !== "true" || if (actionsUtil.getOptionalInput("expect-error") !== "true" ||
hasBadExpectErrorInput()) { hasBadExpectErrorInput()) {
core.setFailed(error.message); core.setFailed(error.message);
@@ -240,9 +261,9 @@ async function runWrapper() {
await exports.runPromise; await exports.runPromise;
} }
catch (error) { catch (error) {
core.setFailed(`analyze action failed: ${(0, util_1.wrapError)(error).message}`); core.setFailed(`analyze action failed: ${util.wrapError(error).message}`);
} }
await (0, util_1.checkForTimeout)(); await util.checkForTimeout();
} }
void runWrapper(); void runWrapper();
//# sourceMappingURL=analyze-action.js.map //# sourceMappingURL=analyze-action.js.map

File diff suppressed because one or more lines are too long

187
lib/analyze.js generated
View File

@@ -26,16 +26,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.validateQueryFilters = exports.runCleanup = exports.runFinalize = exports.createQuerySuiteContents = exports.convertPackToQuerySuiteEntry = exports.runQueries = exports.dbIsFinalized = exports.createdDBForScannedLanguages = exports.CodeQLAnalysisError = void 0; exports.runCleanup = exports.runFinalize = exports.runQueries = exports.dbIsFinalized = exports.createdDBForScannedLanguages = exports.CodeQLAnalysisError = void 0;
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path = __importStar(require("path")); const path = __importStar(require("path"));
const perf_hooks_1 = require("perf_hooks"); const perf_hooks_1 = require("perf_hooks");
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
const del_1 = __importDefault(require("del")); const del_1 = __importDefault(require("del"));
const yaml = __importStar(require("js-yaml")); const yaml = __importStar(require("js-yaml"));
const analysisPaths = __importStar(require("./analysis-paths"));
const codeql_1 = require("./codeql"); const codeql_1 = require("./codeql");
const configUtils = __importStar(require("./config-utils"));
const feature_flags_1 = require("./feature-flags"); const feature_flags_1 = require("./feature-flags");
const languages_1 = require("./languages"); const languages_1 = require("./languages");
const tracer_config_1 = require("./tracer-config"); const tracer_config_1 = require("./tracer-config");
@@ -55,7 +53,7 @@ async function setupPythonExtractor(logger, features, codeql) {
// If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything // If CODEQL_PYTHON is not set, no dependencies were installed, so we don't need to do anything
return; return;
} }
if (await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) { if (await (0, feature_flags_1.isPythonDependencyInstallationDisabled)(codeql, features)) {
logger.warning("We recommend that you remove the CODEQL_PYTHON environment variable from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies." + logger.warning("We recommend that you remove the CODEQL_PYTHON environment variable from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies." +
"\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'."); "\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'.");
return; return;
@@ -78,9 +76,6 @@ async function setupPythonExtractor(logger, features, codeql) {
process.env["LGTM_PYTHON_SETUP_VERSION"] = output; process.env["LGTM_PYTHON_SETUP_VERSION"] = output;
} }
async function createdDBForScannedLanguages(codeql, config, logger, features) { async function createdDBForScannedLanguages(codeql, config, logger, features) {
// Insert the LGTM_INDEX_X env vars at this point so they are set when
// we extract any scanned languages.
analysisPaths.includeAndExcludeAnalysisPaths(config);
for (const language of config.languages) { for (const language of config.languages) {
if ((0, languages_1.isScannedLanguage)(language) && if ((0, languages_1.isScannedLanguage)(language) &&
!dbIsFinalized(config, language, logger)) { !dbIsFinalized(config, language, logger)) {
@@ -133,88 +128,30 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
const statusReport = {}; const statusReport = {};
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd); const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
const queryFlags = [memoryFlag, threadsFlag]; const queryFlags = [memoryFlag, threadsFlag];
await (0, feature_flags_1.logCodeScanningConfigInCli)(codeql, features, logger);
for (const language of config.languages) { for (const language of config.languages) {
const queries = config.queries[language];
const queryFilters = validateQueryFilters(config.originalUserInput["query-filters"]);
const packsWithVersion = config.packs[language] || [];
try { try {
const sarifFile = path.join(sarifFolder, `${language}.sarif`); const sarifFile = path.join(sarifFolder, `${language}.sarif`);
let startTimeInterpretResults; // The work needed to generate the query suites
let endTimeInterpretResults; // is done in the CLI. We just need to make a single
if (await (0, feature_flags_1.useCodeScanningConfigInCli)(codeql, features)) { // call to run all the queries for each language and
// If we are using the code scanning config in the CLI, // another to interpret the results.
// much of the work needed to generate the query suites logger.startGroup(`Running queries for ${language}`);
// is done in the CLI. We just need to make a single const startTimeRunQueries = new Date().getTime();
// call to run all the queries for each language and const databasePath = util.getCodeQLDatabasePath(config, language);
// another to interpret the results. await codeql.databaseRunQueries(databasePath, queryFlags, features);
logger.startGroup(`Running queries for ${language}`); logger.debug(`Finished running queries for ${language}.`);
const startTimeBuiltIn = new Date().getTime(); // TODO should not be using `builtin` here. We should be using `all` instead.
await runQueryGroup(language, "all", undefined, undefined, true); // The status report does not support `all` yet.
// TODO should not be using `builtin` here. We should be using `all` instead. statusReport[`analyze_builtin_queries_${language}_duration_ms`] =
// The status report does not support `all` yet. new Date().getTime() - startTimeRunQueries;
statusReport[`analyze_builtin_queries_${language}_duration_ms`] = logger.startGroup(`Interpreting results for ${language}`);
new Date().getTime() - startTimeBuiltIn; const startTimeInterpretResults = new Date();
logger.startGroup(`Interpreting results for ${language}`); const analysisSummary = await runInterpretResults(language, undefined, sarifFile, config.debugMode);
startTimeInterpretResults = new Date(); const endTimeInterpretResults = new Date();
const analysisSummary = await runInterpretResults(language, undefined, sarifFile, config.debugMode); statusReport[`interpret_results_${language}_duration_ms`] =
endTimeInterpretResults = new Date(); endTimeInterpretResults.getTime() - startTimeInterpretResults.getTime();
statusReport[`interpret_results_${language}_duration_ms`] = logger.endGroup();
endTimeInterpretResults.getTime() - logger.info(analysisSummary);
startTimeInterpretResults.getTime();
logger.endGroup();
logger.info(analysisSummary);
}
else {
// config was generated by the action, so must be interpreted by the action.
const hasBuiltinQueries = queries?.builtin.length > 0;
const hasCustomQueries = queries?.custom.length > 0;
const hasPackWithCustomQueries = packsWithVersion.length > 0;
if (!hasBuiltinQueries &&
!hasCustomQueries &&
!hasPackWithCustomQueries) {
throw new Error(`Unable to analyze ${language} as no queries were selected for this language`);
}
const customQueryIndices = [];
for (let i = 0; i < queries.custom.length; ++i) {
if (queries.custom[i].queries.length > 0) {
customQueryIndices.push(i);
}
}
logger.startGroup(`Running queries for ${language}`);
const querySuitePaths = [];
if (queries.builtin.length > 0) {
const startTimeBuiltIn = new Date().getTime();
querySuitePaths.push((await runQueryGroup(language, "builtin", createQuerySuiteContents(queries.builtin, queryFilters), undefined, customQueryIndices.length === 0 && packsWithVersion.length === 0)));
statusReport[`analyze_builtin_queries_${language}_duration_ms`] =
new Date().getTime() - startTimeBuiltIn;
}
const startTimeCustom = new Date().getTime();
let ranCustom = false;
for (const i of customQueryIndices) {
querySuitePaths.push((await runQueryGroup(language, `custom-${i}`, createQuerySuiteContents(queries.custom[i].queries, queryFilters), queries.custom[i].searchPath, i === customQueryIndices[customQueryIndices.length - 1] &&
packsWithVersion.length === 0)));
ranCustom = true;
}
if (packsWithVersion.length > 0) {
querySuitePaths.push(await runQueryPacks(language, "packs", packsWithVersion, queryFilters, true));
ranCustom = true;
}
if (ranCustom) {
statusReport[`analyze_custom_queries_${language}_duration_ms`] =
new Date().getTime() - startTimeCustom;
}
logger.endGroup();
logger.startGroup(`Interpreting results for ${language}`);
startTimeInterpretResults = new Date();
const analysisSummary = await runInterpretResults(language, querySuitePaths, sarifFile, config.debugMode);
endTimeInterpretResults = new Date();
statusReport[`interpret_results_${language}_duration_ms`] =
endTimeInterpretResults.getTime() -
startTimeInterpretResults.getTime();
logger.endGroup();
logger.info(analysisSummary);
}
if (await features.getValue(feature_flags_1.Feature.QaTelemetryEnabled)) { if (await features.getValue(feature_flags_1.Feature.QaTelemetryEnabled)) {
const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile, logger); const perQueryAlertCounts = getPerQueryAlertCounts(sarifFile, logger);
const perQueryAlertCountEventReport = { const perQueryAlertCountEventReport = {
@@ -232,17 +169,13 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
} }
statusReport["event_reports"].push(perQueryAlertCountEventReport); statusReport["event_reports"].push(perQueryAlertCountEventReport);
} }
if (!(await features.getValue(feature_flags_1.Feature.NewAnalysisSummaryEnabled, codeql))) { if (!(await util.codeQlVersionAbove(codeql, codeql_1.CODEQL_VERSION_ANALYSIS_SUMMARY_V2))) {
await runPrintLinesOfCode(language); await runPrintLinesOfCode(language);
} }
} }
catch (e) { catch (e) {
logger.info(String(e));
if (e instanceof Error) {
logger.info(e.stack);
}
statusReport.analyze_failure_language = language; statusReport.analyze_failure_language = language;
throw new CodeQLAnalysisError(statusReport, `Error running analysis for ${language}: ${e}`); throw new CodeQLAnalysisError(statusReport, `Error running analysis for ${language}: ${util.wrapError(e).message}`);
} }
} }
return statusReport; return statusReport;
@@ -274,54 +207,8 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
const databasePath = util.getCodeQLDatabasePath(config, language); const databasePath = util.getCodeQLDatabasePath(config, language);
return await codeql.databasePrintBaseline(databasePath); return await codeql.databasePrintBaseline(databasePath);
} }
async function runQueryGroup(language, type, querySuiteContents, searchPath, optimizeForLastQueryRun) {
const databasePath = util.getCodeQLDatabasePath(config, language);
// Pass the queries to codeql using a file instead of using the command
// line to avoid command line length restrictions, particularly on windows.
const querySuitePath = querySuiteContents
? `${databasePath}-queries-${type}.qls`
: undefined;
if (querySuiteContents && querySuitePath) {
fs.writeFileSync(querySuitePath, querySuiteContents);
logger.debug(`Query suite file for ${language}-${type}...\n${querySuiteContents}`);
}
await codeql.databaseRunQueries(databasePath, searchPath, querySuitePath, queryFlags, optimizeForLastQueryRun, features);
logger.debug(`BQRS results produced for ${language} (queries: ${type})"`);
return querySuitePath;
}
async function runQueryPacks(language, type, packs, queryFilters, optimizeForLastQueryRun) {
const databasePath = util.getCodeQLDatabasePath(config, language);
for (const pack of packs) {
logger.debug(`Running query pack for ${language}-${type}: ${pack}`);
}
// combine the list of packs into a query suite in order to run them all simultaneously.
const querySuite = packs.map(convertPackToQuerySuiteEntry).concat(queryFilters);
const querySuitePath = `${databasePath}-queries-${type}.qls`;
fs.writeFileSync(querySuitePath, yaml.dump(querySuite));
logger.debug(`BQRS results produced for ${language} (queries: ${type})"`);
await codeql.databaseRunQueries(databasePath, undefined, querySuitePath, queryFlags, optimizeForLastQueryRun, features);
return querySuitePath;
}
} }
exports.runQueries = runQueries; exports.runQueries = runQueries;
function convertPackToQuerySuiteEntry(packStr) {
const pack = configUtils.parsePacksSpecification(packStr);
return {
qlpack: !pack.path ? pack.name : undefined,
from: pack.path ? pack.name : undefined,
version: pack.version,
query: pack.path?.endsWith(".ql") ? pack.path : undefined,
queries: !pack.path?.endsWith(".ql") && !pack.path?.endsWith(".qls")
? pack.path
: undefined,
apply: pack.path?.endsWith(".qls") ? pack.path : undefined,
};
}
exports.convertPackToQuerySuiteEntry = convertPackToQuerySuiteEntry;
function createQuerySuiteContents(queries, queryFilters) {
return yaml.dump(queries.map((q) => ({ query: q })).concat(queryFilters));
}
exports.createQuerySuiteContents = createQuerySuiteContents;
async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger, features) { async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger, features) {
try { try {
await (0, del_1.default)(outputDir, { force: true }); await (0, del_1.default)(outputDir, { force: true });
@@ -353,28 +240,4 @@ async function runCleanup(config, cleanupLevel, logger) {
logger.endGroup(); logger.endGroup();
} }
exports.runCleanup = runCleanup; exports.runCleanup = runCleanup;
// exported for testing
function validateQueryFilters(queryFilters) {
if (!queryFilters) {
return [];
}
if (!Array.isArray(queryFilters)) {
throw new Error(`Query filters must be an array of "include" or "exclude" entries. Found ${typeof queryFilters}`);
}
const errors = [];
for (const qf of queryFilters) {
const keys = Object.keys(qf);
if (keys.length !== 1) {
errors.push(`Query filter must have exactly one key: ${JSON.stringify(qf)}`);
}
if (!["exclude", "include"].includes(keys[0])) {
errors.push(`Only "include" or "exclude" filters are allowed:\n${JSON.stringify(qf)}`);
}
}
if (errors.length) {
throw new Error(`Invalid query filter.\n${errors.join("\n")}`);
}
return queryFilters;
}
exports.validateQueryFilters = validateQueryFilters;
//# sourceMappingURL=analyze.js.map //# sourceMappingURL=analyze.js.map

File diff suppressed because one or more lines are too long

372
lib/analyze.test.js generated
View File

@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path = __importStar(require("path")); const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava")); const ava_1 = __importDefault(require("ava"));
const yaml = __importStar(require("js-yaml"));
const sinon = __importStar(require("sinon")); const sinon = __importStar(require("sinon"));
const analyze_1 = require("./analyze"); const analyze_1 = require("./analyze");
const codeql_1 = require("./codeql"); const codeql_1 = require("./codeql");
@@ -40,31 +39,23 @@ const testing_utils_1 = require("./testing-utils");
const uploadLib = __importStar(require("./upload-lib")); const uploadLib = __importStar(require("./upload-lib"));
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default); (0, testing_utils_1.setupTests)(ava_1.default);
/** Checks that the duration fields are populated for the correct language /**
* and correct case of builtin or custom. Also checks the correct search * Checks the status report produced by the analyze Action.
* paths are set in the database analyze invocation.
* *
* Mocks the QA telemetry feature flag and checks the appropriate status report * - Checks that the duration fields are populated for the correct language.
* fields. * - Checks that the QA telemetry status report fields are populated when the QA feature flag is enabled.
*/ */
(0, ava_1.default)("status report fields and search path setting", async (t) => { (0, ava_1.default)("status report fields", async (t) => {
let searchPathsUsed = [];
return await util.withTmpDir(async (tmpDir) => { return await util.withTmpDir(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const memoryFlag = ""; const memoryFlag = "";
const addSnippetsFlag = ""; const addSnippetsFlag = "";
const threadsFlag = ""; const threadsFlag = "";
const packs = {
[languages_1.Language.cpp]: ["a/b@1.0.0"],
[languages_1.Language.java]: ["c/d@2.0.0"],
};
sinon.stub(uploadLib, "validateSarifFileSchema"); sinon.stub(uploadLib, "validateSarifFileSchema");
for (const language of Object.values(languages_1.Language)) { for (const language of Object.values(languages_1.Language)) {
(0, codeql_1.setCodeQL)({ (0, codeql_1.setCodeQL)({
databaseRunQueries: async () => { },
packDownload: async () => ({ packs: [] }), packDownload: async () => ({ packs: [] }),
databaseRunQueries: async (_db, searchPath) => {
searchPathsUsed.push(searchPath);
},
databaseInterpretResults: async (_db, _queriesRun, sarifFile) => { databaseInterpretResults: async (_db, _queriesRun, sarifFile) => {
fs.writeFileSync(sarifFile, JSON.stringify({ fs.writeFileSync(sarifFile, JSON.stringify({
runs: [ runs: [
@@ -104,12 +95,8 @@ const util = __importStar(require("./util"));
}, },
databasePrintBaseline: async () => "", databasePrintBaseline: async () => "",
}); });
searchPathsUsed = [];
const config = { const config = {
languages: [language], languages: [language],
queries: {},
pathsIgnore: [],
paths: [],
originalUserInput: {}, originalUserInput: {},
tempDir: tmpDir, tempDir: tmpDir,
codeQLCmd: "", codeQLCmd: "",
@@ -117,12 +104,10 @@ const util = __importStar(require("./util"));
type: util.GitHubVariant.DOTCOM, type: util.GitHubVariant.DOTCOM,
}, },
dbLocation: path.resolve(tmpDir, "codeql_databases"), dbLocation: path.resolve(tmpDir, "codeql_databases"),
packs,
debugMode: false, debugMode: false,
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME, debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME, debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
augmentationProperties: { augmentationProperties: {
injectedMlQueries: false,
packsInputCombines: false, packsInputCombines: false,
queriesInputCombines: false, queriesInputCombines: false,
}, },
@@ -132,343 +117,18 @@ const util = __importStar(require("./util"));
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), { fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
recursive: true, recursive: true,
}); });
config.queries[language] = { const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
builtin: ["foo.ql"], t.deepEqual(Object.keys(statusReport).sort(), [
custom: [], `analyze_builtin_queries_${language}_duration_ms`,
}; "event_reports",
const builtinStatusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled])); `interpret_results_${language}_duration_ms`,
const hasPacks = language in packs; ]);
const statusReportKeys = Object.keys(builtinStatusReport).sort(); for (const eventReport of statusReport.event_reports) {
if (hasPacks) { t.deepEqual(eventReport.event, "codeql database interpret-results");
t.deepEqual(statusReportKeys.length, 4, statusReportKeys.toString()); t.true("properties" in eventReport);
t.deepEqual(statusReportKeys[0], `analyze_builtin_queries_${language}_duration_ms`); t.true("alertCounts" in eventReport.properties);
t.deepEqual(statusReportKeys[1], `analyze_custom_queries_${language}_duration_ms`);
t.deepEqual(statusReportKeys[2], "event_reports");
t.deepEqual(statusReportKeys[3], `interpret_results_${language}_duration_ms`);
}
else {
t.deepEqual(statusReportKeys[0], `analyze_builtin_queries_${language}_duration_ms`);
t.deepEqual(statusReportKeys[1], "event_reports");
t.deepEqual(statusReportKeys[2], `interpret_results_${language}_duration_ms`);
}
if (builtinStatusReport.event_reports) {
for (const eventReport of builtinStatusReport.event_reports) {
t.deepEqual(eventReport.event, "codeql database interpret-results");
t.true("properties" in eventReport);
t.true("alertCounts" in eventReport.properties);
}
}
config.queries[language] = {
builtin: [],
custom: [
{
queries: ["foo.ql"],
searchPath: "/1",
},
{
queries: ["bar.ql"],
searchPath: "/2",
},
],
};
const customStatusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
t.deepEqual(Object.keys(customStatusReport).length, 3);
t.true(`analyze_custom_queries_${language}_duration_ms` in customStatusReport);
const expectedSearchPathsUsed = hasPacks
? [undefined, undefined, "/1", "/2", undefined]
: [undefined, "/1", "/2"];
t.deepEqual(searchPathsUsed, expectedSearchPathsUsed);
t.true(`interpret_results_${language}_duration_ms` in customStatusReport);
t.true("event_reports" in customStatusReport);
if (customStatusReport.event_reports) {
for (const eventReport of customStatusReport.event_reports) {
t.deepEqual(eventReport.event, "codeql database interpret-results");
t.true("properties" in eventReport);
t.true("alertCounts" in eventReport.properties);
}
} }
} }
verifyQuerySuites(tmpDir);
}); });
function verifyQuerySuites(tmpDir) {
const qlsContent = [
{
query: "foo.ql",
},
];
const qlsContent2 = [
{
query: "bar.ql",
},
];
for (const lang of Object.values(languages_1.Language)) {
t.deepEqual(readContents(`${lang}-queries-builtin.qls`), qlsContent);
t.deepEqual(readContents(`${lang}-queries-custom-0.qls`), qlsContent);
t.deepEqual(readContents(`${lang}-queries-custom-1.qls`), qlsContent2);
}
function readContents(name) {
const x = fs.readFileSync(path.join(tmpDir, "codeql_databases", name), "utf8");
console.log(x);
return yaml.load(fs.readFileSync(path.join(tmpDir, "codeql_databases", name), "utf8"));
}
}
});
function mockCodeQL() {
return {
getVersion: async () => "2.12.2",
databaseRunQueries: sinon.spy(),
databaseInterpretResults: async () => "",
databasePrintBaseline: async () => "",
};
}
function createBaseConfig(tmpDir) {
return {
languages: [],
queries: {},
pathsIgnore: [],
paths: [],
originalUserInput: {},
tempDir: "tempDir",
codeQLCmd: "",
gitHubVersion: {
type: util.GitHubVariant.DOTCOM,
},
dbLocation: path.resolve(tmpDir, "codeql_databases"),
packs: {},
debugMode: false,
debugArtifactName: util.DEFAULT_DEBUG_ARTIFACT_NAME,
debugDatabaseName: util.DEFAULT_DEBUG_DATABASE_NAME,
augmentationProperties: {
injectedMlQueries: false,
packsInputCombines: false,
queriesInputCombines: false,
},
trapCaches: {},
trapCacheDownloadTime: 0,
};
}
function createQueryConfig(builtin, custom) {
return {
builtin,
custom: custom.map((c) => ({ searchPath: "/search", queries: [c] })),
};
}
async function runQueriesWithConfig(config, features) {
for (const language of config.languages) {
fs.mkdirSync(util.getCodeQLDatabasePath(config, language), {
recursive: true,
});
}
return (0, analyze_1.runQueries)("sarif-folder", "--memFlag", "--addSnippetsFlag", "--threadsFlag", undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)(features));
}
function getDatabaseRunQueriesCalls(mock) {
return mock.databaseRunQueries.getCalls();
}
(0, ava_1.default)("optimizeForLastQueryRun for one language", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp];
config.queries.cpp = createQueryConfig(["foo.ql"], []);
await runQueriesWithConfig(config, []);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [true]);
});
});
(0, ava_1.default)("optimizeForLastQueryRun for two languages", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp, languages_1.Language.java];
config.queries.cpp = createQueryConfig(["foo.ql"], []);
config.queries.java = createQueryConfig(["bar.ql"], []);
await runQueriesWithConfig(config, []);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [true, true]);
});
});
(0, ava_1.default)("optimizeForLastQueryRun for two languages, with custom queries", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp, languages_1.Language.java];
config.queries.cpp = createQueryConfig(["foo.ql"], ["c1.ql", "c2.ql"]);
config.queries.java = createQueryConfig(["bar.ql"], ["c3.ql"]);
await runQueriesWithConfig(config, []);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [false, false, true, false, true]);
});
});
(0, ava_1.default)("optimizeForLastQueryRun for two languages, with custom queries and packs", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp, languages_1.Language.java];
config.queries.cpp = createQueryConfig(["foo.ql"], ["c1.ql", "c2.ql"]);
config.queries.java = createQueryConfig(["bar.ql"], ["c3.ql"]);
config.packs.cpp = ["a/cpp-pack1@0.1.0"];
config.packs.java = ["b/java-pack1@0.2.0", "b/java-pack2@0.3.3"];
await runQueriesWithConfig(config, []);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [false, false, false, true, false, false, true]);
});
});
(0, ava_1.default)("optimizeForLastQueryRun for one language, CliConfigFileEnabled", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp];
await runQueriesWithConfig(config, [feature_flags_1.Feature.CliConfigFileEnabled]);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [true]);
});
});
(0, ava_1.default)("optimizeForLastQueryRun for two languages, CliConfigFileEnabled", async (t) => {
return await util.withTmpDir(async (tmpDir) => {
const codeql = mockCodeQL();
(0, codeql_1.setCodeQL)(codeql);
const config = createBaseConfig(tmpDir);
config.languages = [languages_1.Language.cpp, languages_1.Language.java];
await runQueriesWithConfig(config, [feature_flags_1.Feature.CliConfigFileEnabled]);
t.deepEqual(getDatabaseRunQueriesCalls(codeql).map((c) => c.args[4]), [true, true]);
});
});
(0, ava_1.default)("validateQueryFilters", (t) => {
t.notThrows(() => (0, analyze_1.validateQueryFilters)([]));
t.notThrows(() => (0, analyze_1.validateQueryFilters)(undefined));
t.notThrows(() => {
return (0, analyze_1.validateQueryFilters)([
{
exclude: {
"problem.severity": "recommendation",
},
},
{
exclude: {
"tags contain": ["foo", "bar"],
},
},
{
include: {
"problem.severity": "something-to-think-about",
},
},
{
include: {
"tags contain": ["baz", "bop"],
},
},
]);
});
t.throws(() => {
return (0, analyze_1.validateQueryFilters)([
{
exclude: {
"tags contain": ["foo", "bar"],
},
include: {
"tags contain": ["baz", "bop"],
},
},
]);
}, { message: /Query filter must have exactly one key/ });
t.throws(() => {
return (0, analyze_1.validateQueryFilters)([{ xxx: "foo" }]);
}, { message: /Only "include" or "exclude" filters are allowed/ });
t.throws(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return (0, analyze_1.validateQueryFilters)({ exclude: "foo" });
}, {
message: /Query filters must be an array of "include" or "exclude" entries/,
});
});
const convertPackToQuerySuiteEntryMacro = ava_1.default.macro({
exec: (t, packSpec, suiteEntry) => t.deepEqual((0, analyze_1.convertPackToQuerySuiteEntry)(packSpec), suiteEntry),
title: (_providedTitle, packSpec) => `Query Suite Entry: ${packSpec}`,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b", {
qlpack: "a/b",
from: undefined,
version: undefined,
query: undefined,
queries: undefined,
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b@~1.2.3", {
qlpack: "a/b",
from: undefined,
version: "~1.2.3",
query: undefined,
queries: undefined,
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b:my/path", {
qlpack: undefined,
from: "a/b",
version: undefined,
query: undefined,
queries: "my/path",
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b@~1.2.3:my/path", {
qlpack: undefined,
from: "a/b",
version: "~1.2.3",
query: undefined,
queries: "my/path",
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b:my/path/query.ql", {
qlpack: undefined,
from: "a/b",
version: undefined,
query: "my/path/query.ql",
queries: undefined,
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b@~1.2.3:my/path/query.ql", {
qlpack: undefined,
from: "a/b",
version: "~1.2.3",
query: "my/path/query.ql",
queries: undefined,
apply: undefined,
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b:my/path/suite.qls", {
qlpack: undefined,
from: "a/b",
version: undefined,
query: undefined,
queries: undefined,
apply: "my/path/suite.qls",
});
(0, ava_1.default)(convertPackToQuerySuiteEntryMacro, "a/b@~1.2.3:my/path/suite.qls", {
qlpack: undefined,
from: "a/b",
version: "~1.2.3",
query: undefined,
queries: undefined,
apply: "my/path/suite.qls",
});
(0, ava_1.default)("convertPackToQuerySuiteEntry Failure", (t) => {
t.throws(() => (0, analyze_1.convertPackToQuerySuiteEntry)("this-is-not-a-pack"));
});
(0, ava_1.default)("createQuerySuiteContents", (t) => {
const yamlResult = (0, analyze_1.createQuerySuiteContents)(["query1.ql", "query2.ql"], [
{
exclude: { "problem.severity": "recommendation" },
},
{
include: { "problem.severity": "recommendation" },
},
]);
const expected = `- query: query1.ql
- query: query2.ql
- exclude:
problem.severity: recommendation
- include:
problem.severity: recommendation
`;
t.deepEqual(yamlResult, expected);
}); });
//# sourceMappingURL=analyze.test.js.map //# sourceMappingURL=analyze.test.js.map

File diff suppressed because one or more lines are too long

160
lib/api-client.js generated
View File

@@ -26,14 +26,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.computeAutomationID = exports.getAutomationID = exports.getAnalysisKey = exports.getWorkflowRelativePath = exports.sendStatusReport = exports.createStatusReportBase = exports.getGitHubVersion = exports.getGitHubVersionFromApi = exports.getApiClientWithExternalAuth = exports.getApiClient = exports.getApiDetails = exports.DisallowedAPIVersionReason = void 0; exports.computeAutomationID = exports.getAutomationID = exports.getAnalysisKey = exports.getWorkflowRelativePath = exports.getGitHubVersion = exports.getGitHubVersionFromApi = exports.getApiClientWithExternalAuth = exports.getApiClient = exports.getApiDetails = exports.DisallowedAPIVersionReason = void 0;
const os = __importStar(require("os"));
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const githubUtils = __importStar(require("@actions/github/lib/utils")); const githubUtils = __importStar(require("@actions/github/lib/utils"));
const retry = __importStar(require("@octokit/plugin-retry")); const retry = __importStar(require("@octokit/plugin-retry"));
const console_log_level_1 = __importDefault(require("console-log-level")); const console_log_level_1 = __importDefault(require("console-log-level"));
const actions_util_1 = require("./actions-util"); const actions_util_1 = require("./actions-util");
const environment_1 = require("./environment");
const util_1 = require("./util"); const util_1 = require("./util");
const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version"; const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
var DisallowedAPIVersionReason; var DisallowedAPIVersionReason;
@@ -80,9 +78,6 @@ async function getGitHubVersionFromApi(apiClient, apiDetails) {
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === undefined) { if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === undefined) {
return { type: util_1.GitHubVariant.DOTCOM }; return { type: util_1.GitHubVariant.DOTCOM };
} }
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "GitHub AE") {
return { type: util_1.GitHubVariant.GHAE };
}
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "ghe.com") { if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "ghe.com") {
return { type: util_1.GitHubVariant.GHE_DOTCOM }; return { type: util_1.GitHubVariant.GHE_DOTCOM };
} }
@@ -104,159 +99,6 @@ async function getGitHubVersion() {
return cachedGitHubVersion; return cachedGitHubVersion;
} }
exports.getGitHubVersion = getGitHubVersion; exports.getGitHubVersion = getGitHubVersion;
/**
* Compose a StatusReport.
*
* @param actionName The name of the action, e.g. 'init', 'finish', 'upload-sarif'
* @param status The status. Must be 'success', 'failure', or 'starting'
* @param startedAt The time this action started executing.
* @param cause Cause of failure (only supply if status is 'failure')
* @param exception Exception (only supply if status is 'failure')
*/
async function createStatusReportBase(actionName, status, actionStartedAt, cause, exception) {
const commitOid = (0, actions_util_1.getOptionalInput)("sha") || process.env["GITHUB_SHA"] || "";
const ref = await (0, actions_util_1.getRef)();
const jobRunUUID = process.env[environment_1.EnvVar.JOB_RUN_UUID] || "";
const workflowRunID = (0, actions_util_1.getWorkflowRunID)();
const workflowRunAttempt = (0, actions_util_1.getWorkflowRunAttempt)();
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
const jobName = process.env["GITHUB_JOB"] || "";
const analysis_key = await getAnalysisKey();
let workflowStartedAt = process.env[environment_1.EnvVar.WORKFLOW_STARTED_AT];
if (workflowStartedAt === undefined) {
workflowStartedAt = actionStartedAt.toISOString();
core.exportVariable(environment_1.EnvVar.WORKFLOW_STARTED_AT, workflowStartedAt);
}
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
const actionRef = process.env["GITHUB_ACTION_REF"];
const testingEnvironment = process.env[environment_1.EnvVar.TESTING_ENVIRONMENT] || "";
// re-export the testing environment variable so that it is available to subsequent steps,
// even if it was only set for this step
if (testingEnvironment !== "") {
core.exportVariable(environment_1.EnvVar.TESTING_ENVIRONMENT, testingEnvironment);
}
const statusReport = {
job_run_uuid: jobRunUUID,
workflow_run_id: workflowRunID,
workflow_run_attempt: workflowRunAttempt,
workflow_name: workflowName,
job_name: jobName,
analysis_key,
commit_oid: commitOid,
ref,
action_name: actionName,
action_ref: actionRef,
action_oid: "unknown",
started_at: workflowStartedAt,
action_started_at: actionStartedAt.toISOString(),
status,
testing_environment: testingEnvironment,
runner_os: runnerOs,
action_version: (0, actions_util_1.getActionVersion)(),
};
// Add optional parameters
if (cause) {
statusReport.cause = cause;
}
if (exception) {
statusReport.exception = exception;
}
if (status === "success" ||
status === "failure" ||
status === "aborted" ||
status === "user-error") {
statusReport.completed_at = new Date().toISOString();
}
const matrix = (0, actions_util_1.getRequiredInput)("matrix");
if (matrix) {
statusReport.matrix_vars = matrix;
}
if ("RUNNER_ARCH" in process.env) {
// RUNNER_ARCH is available only in GHES 3.4 and later
// Values other than X86, X64, ARM, or ARM64 are discarded server side
statusReport.runner_arch = process.env["RUNNER_ARCH"];
}
if (runnerOs === "Windows" || runnerOs === "macOS") {
statusReport.runner_os_release = os.release();
}
if (codeQlCliVersion !== undefined) {
statusReport.codeql_version = codeQlCliVersion;
}
return statusReport;
}
exports.createStatusReportBase = createStatusReportBase;
const GENERIC_403_MSG = "The repo on which this action is running is not opted-in to CodeQL code scanning.";
const GENERIC_404_MSG = "Not authorized to use the CodeQL code scanning feature on this repo.";
const OUT_OF_DATE_MSG = "CodeQL Action is out-of-date. Please upgrade to the latest version of codeql-action.";
const INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scanning endpoint. Please update to a compatible version of codeql-action.";
/**
* Send a status report to the code_scanning/analysis/status endpoint.
*
* Optionally checks the response from the API endpoint and sets the action
* as failed if the status report failed. This is only expected to be used
* when sending a 'starting' report.
*
* Returns whether sending the status report was successful of not.
*/
async function sendStatusReport(statusReport) {
const statusReportJSON = JSON.stringify(statusReport);
core.debug(`Sending status report: ${statusReportJSON}`);
// If in test mode we don't want to upload the results
if ((0, util_1.isInTestMode)()) {
core.debug("In test mode. Status reports are not uploaded.");
return true;
}
const nwo = (0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY");
const [owner, repo] = nwo.split("/");
const client = getApiClient();
try {
await client.request("PUT /repos/:owner/:repo/code-scanning/analysis/status", {
owner,
repo,
data: statusReportJSON,
});
return true;
}
catch (e) {
console.log(e);
if ((0, util_1.isHTTPError)(e)) {
switch (e.status) {
case 403:
if ((0, actions_util_1.getWorkflowEventName)() === "push" &&
process.env["GITHUB_ACTOR"] === "dependabot[bot]") {
core.setFailed('Workflows triggered by Dependabot on the "push" event run with read-only access. ' +
"Uploading Code Scanning results requires write access. " +
'To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. ' +
"See https://docs.github.com/en/code-security/secure-coding/configuring-code-scanning#scanning-on-push for more information on how to configure these events.");
}
else {
core.setFailed(e.message || GENERIC_403_MSG);
}
return false;
case 404:
core.setFailed(GENERIC_404_MSG);
return false;
case 422:
// schema incompatibility when reporting status
// this means that this action version is no longer compatible with the API
// we still want to continue as it is likely the analysis endpoint will work
if ((0, util_1.getRequiredEnvParam)("GITHUB_SERVER_URL") !== util_1.GITHUB_DOTCOM_URL) {
core.debug(INCOMPATIBLE_MSG);
}
else {
core.debug(OUT_OF_DATE_MSG);
}
return true;
}
}
// something else has gone wrong and the request/response will be logged by octokit
// it's possible this is a transient error and we should continue scanning
core.error("An unexpected error occurred when sending code scanning status report.");
return true;
}
}
exports.sendStatusReport = sendStatusReport;
/** /**
* Get the path of the currently executing workflow relative to the repository root. * Get the path of the currently executing workflow relative to the repository root.
*/ */

File diff suppressed because one or more lines are too long

View File

@@ -92,15 +92,6 @@ function mockGetMetaVersionHeader(versionHeader) {
}); });
t.deepEqual({ type: util.GitHubVariant.GHES, version: "2.0" }, v2); t.deepEqual({ type: util.GitHubVariant.GHES, version: "2.0" }, v2);
}); });
(0, ava_1.default)("getGitHubVersion for GHAE", async (t) => {
mockGetMetaVersionHeader("GitHub AE");
const ghae = await api.getGitHubVersionFromApi(api.getApiClient(), {
auth: "",
url: "https://example.githubenterprise.com",
apiURL: undefined,
});
t.deepEqual({ type: util.GitHubVariant.GHAE }, ghae);
});
(0, ava_1.default)("getGitHubVersion for different domain", async (t) => { (0, ava_1.default)("getGitHubVersion for different domain", async (t) => {
mockGetMetaVersionHeader(undefined); mockGetMetaVersionHeader(undefined);
const v3 = await api.getGitHubVersionFromApi(api.getApiClient(), { const v3 = await api.getGitHubVersionFromApi(api.getApiClient(), {

View File

@@ -1 +1 @@
{"version":3,"file":"api-client.test.js","sourceRoot":"","sources":["../src/api-client.test.ts"],"names":[],"mappings":"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"} {"version":3,"file":"api-client.test.js","sourceRoot":"","sources":["../src/api-client.test.ts"],"names":[],"mappings":"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"}

View File

@@ -1 +1 @@
{ "maximumVersion": "3.10", "minimumVersion": "3.6" } { "maximumVersion": "3.12", "minimumVersion": "3.8" }

View File

@@ -28,20 +28,19 @@ const actions_util_1 = require("./actions-util");
const api_client_1 = require("./api-client"); const api_client_1 = require("./api-client");
const autobuild_1 = require("./autobuild"); const autobuild_1 = require("./autobuild");
const configUtils = __importStar(require("./config-utils")); const configUtils = __importStar(require("./config-utils"));
const environment_1 = require("./environment");
const languages_1 = require("./languages");
const logging_1 = require("./logging"); const logging_1 = require("./logging");
const status_report_1 = require("./status-report");
const util_1 = require("./util"); const util_1 = require("./util");
async function sendCompletedStatusReport(startedAt, allLanguages, failingLanguage, cause) { async function sendCompletedStatusReport(logger, startedAt, allLanguages, failingLanguage, cause) {
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)()); (0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
const status = (0, actions_util_1.getActionsStatus)(cause, failingLanguage); const status = (0, status_report_1.getActionsStatus)(cause, failingLanguage);
const statusReportBase = await (0, api_client_1.createStatusReportBase)("autobuild", status, startedAt, cause?.message, cause?.stack); const statusReportBase = await (0, status_report_1.createStatusReportBase)("autobuild", status, startedAt, await (0, util_1.checkDiskUsage)(logger), cause?.message, cause?.stack);
const statusReport = { const statusReport = {
...statusReportBase, ...statusReportBase,
autobuild_languages: allLanguages.join(","), autobuild_languages: allLanguages.join(","),
autobuild_failure: failingLanguage, autobuild_failure: failingLanguage,
}; };
await (0, api_client_1.sendStatusReport)(statusReport); await (0, status_report_1.sendStatusReport)(statusReport);
} }
async function run() { async function run() {
const startedAt = new Date(); const startedAt = new Date();
@@ -49,11 +48,12 @@ async function run() {
let currentLanguage = undefined; let currentLanguage = undefined;
let languages = undefined; let languages = undefined;
try { try {
if (!(await (0, api_client_1.sendStatusReport)(await (0, api_client_1.createStatusReportBase)("autobuild", "starting", startedAt)))) { if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("autobuild", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
return; return;
} }
const gitHubVersion = await (0, api_client_1.getGitHubVersion)(); const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger); (0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
(0, util_1.checkActionVersion)((0, actions_util_1.getActionVersion)(), gitHubVersion);
const config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger); const config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger);
if (config === undefined) { if (config === undefined) {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
@@ -68,19 +68,16 @@ async function run() {
for (const language of languages) { for (const language of languages) {
currentLanguage = language; currentLanguage = language;
await (0, autobuild_1.runAutobuild)(language, config, logger); await (0, autobuild_1.runAutobuild)(language, config, logger);
if (language === languages_1.Language.go) {
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
}
} }
} }
} }
catch (unwrappedError) { catch (unwrappedError) {
const error = (0, util_1.wrapError)(unwrappedError); const error = (0, util_1.wrapError)(unwrappedError);
core.setFailed(`We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error.message}`); core.setFailed(`We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error.message}`);
await sendCompletedStatusReport(startedAt, languages ?? [], currentLanguage, error); await sendCompletedStatusReport(logger, startedAt, languages ?? [], currentLanguage, error);
return; return;
} }
await sendCompletedStatusReport(startedAt, languages ?? []); await sendCompletedStatusReport(logger, startedAt, languages ?? []);
} }
async function runWrapper() { async function runWrapper() {
try { try {

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