Compare commits

...

4066 Commits

Author SHA1 Message Date
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
f9a7c6738f Merge pull request #1827 from github/dependabot/npm_and_yarn/npm-5103036bd1
Bump the npm group with 3 updates
2023-08-08 11:20:14 +01:00
github-actions[bot]
31b9dd18d4 Update checked-in dependencies 2023-08-07 17:18:57 +00:00
dependabot[bot]
7e2f56aae3 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 10.0.15 to 10.0.16
- [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.2.0 to 6.2.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.2.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.2.0 to 6.2.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.2.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>
2023-08-07 17:16:04 +00:00
Henry Mercer
878ae4a749 Merge pull request #1823 from github/henrymercer/setup-swift-more-consistent
PR checks: Make Swift setup more consistent with default setup
2023-08-07 17:39:16 +01:00
Henry Mercer
63602c0f72 Merge pull request #1824 from github/henrymercer/cli-notifications-fix
Only workaround invalid notifications for CodeQL CLI 2.13.0 and earlier
2023-08-07 17:38:59 +01:00
Henry Mercer
66dc883276 Merge pull request #1826 from github/henrymercer/increase-reserved-scaling-factor
Increase scaling factor for reserved RAM to 5%
2023-08-07 17:32:27 +01:00
Henry Mercer
2203178090 Increase scaling factor for reserved RAM to 5% 2023-08-07 16:56:27 +01:00
Henry Mercer
0ff6cfb53c Only workaround invalid notifications for CodeQL CLI 2.13.0 and earlier 2023-08-03 22:22:31 +01:00
Henry Mercer
f128379387 Make Swift setup more consistent with default setup 2023-08-03 17:23:31 +01:00
Angela P Wen
1f63aba653 PR Checks: Test codeql-bundle.tar.gz (#1822) 2023-08-03 15:38:21 +00:00
Henry Mercer
a98b9bd46b Merge pull request #1821 from github/henrymercer/pr-checks/improve-version-naming
PR checks: Rename `cached` to `default`
2023-08-03 12:02:16 +01:00
Henry Mercer
49e0fc2ba1 PR checks: Rename cached to default 2023-08-02 18:02:10 +01:00
Florin Coada
2192e3432b Merge pull request #1809 from github/igfoo/code_scanning_codeql_java_lombok
Add support for the code_scanning_codeql_java_lombok feature flag
2023-08-02 12:47:52 +01:00
Angela P Wen
1b6e91df31 Autogenerate source map 2023-08-02 11:54:32 +02:00
Angela P Wen
c32aadf8fd Merge branch 'main' into igfoo/code_scanning_codeql_java_lombok 2023-08-02 02:44:05 -07:00
Angela P Wen
7d646d3301 Empty commit 2023-08-02 11:40:37 +02:00
Henry Mercer
7b79062de0 Merge pull request #1820 from github/henrymercer/delete-bundle-archive
Clean up the bundle archive after extracting it
2023-08-01 20:16:50 +01:00
Henry Mercer
61cdd2503b Factor out common code for cleaning up bundle artifacts 2023-08-01 19:47:57 +01:00
Henry Mercer
92c848eb82 Improve variable naming 2023-08-01 19:21:17 +01:00
Henry Mercer
f93fb8df6e Clean up non-toolcached bundle 2023-08-01 18:50:45 +01:00
Henry Mercer
ea47b2ae40 Add changelog note 2023-08-01 17:54:33 +01:00
Henry Mercer
38adb40e7a Delete bundle archive after extracting it 2023-08-01 17:49:21 +01:00
dependabot[bot]
e7e35baaf0 Bump the npm group with 2 updates (#1819)
* 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.45.0 to 8.46.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.45.0...v8.46.0)

Updates `eslint-plugin-import` from 2.27.5 to 2.28.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.27.5...v2.28.0)

---
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-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-01 03:35:02 -07:00
Nick Rolfe
a6b0ced86b Merge pull request #1818 from github/nickrolfe/disable-intra-layer-parallelism
Pass explicit option to disable intra-layer parallelism
2023-07-31 12:15:52 +01:00
Henry Mercer
6a17359b95 Merge pull request #1816 from github/henrymercer/more-user-errors
Categorize more user errors correctly in telemetry
2023-07-31 11:56:57 +01:00
Henry Mercer
245422d4c0 Merge pull request #1815 from github/henrymercer/update-readme
Simplify README to recommend default setup and refer to docs
2023-07-31 11:56:04 +01:00
Nick Rolfe
c7b7456c9e Pass explicit option to disable intra-layer parallelism 2023-07-31 11:47:25 +01:00
Nick Rolfe
cf445f7cf3 Merge pull request #1817 from github/nickrolfe/evaluator-intra-layer-parallelism-ff
Use feature flag to enable evaluator intra-layer parallelism
2023-07-31 11:03:26 +01:00
Nick Rolfe
2f8540dd31 Add CHANGELOG entry for intra-layer parallelism rollout 2023-07-31 10:08:17 +01:00
Nick Rolfe
bc068d74aa Use feature flag to enable evaluator intra-layer parallelism 2023-07-31 09:44:35 +01:00
Henry Mercer
bcfe48982e Improve function name 2023-07-28 18:51:43 +01:00
Henry Mercer
79690d4663 Make submitting advanced analysis when default setup on a user error 2023-07-28 18:21:38 +01:00
Henry Mercer
5691205077 Make not specifying a required input a user error 2023-07-28 18:18:27 +01:00
Henry Mercer
d9d3212c79 Simplify README to recommend default setup and refer to docs 2023-07-28 17:30:34 +01:00
Henry Mercer
81ae676e79 Merge pull request #1812 from github/henrymercer/no-loc-baseline-for-new-summary
Don't print the lines of code baseline when new analysis summary enabled
2023-07-28 17:18:54 +01:00
Alexander Eyers-Taylor
c8b21b59d1 Merge pull request #1814 from github/mergeback/v2.21.2-to-main-0ba42444
Mergeback v2.21.2 refs/heads/releases/v2 into main
2023-07-28 16:09:27 +01:00
github-actions[bot]
7c2bd355f3 Update checked-in dependencies 2023-07-28 14:10:21 +00:00
github-actions[bot]
868eec5e6d Update changelog and version after v2.21.2 2023-07-28 14:07:45 +00:00
Alexander Eyers-Taylor
0ba4244466 Merge pull request #1813 from github/update-v2.21.2-10c6bfee1
Merge main into releases/v2
2023-07-28 15:05:12 +01:00
Ian Lynagh
eea148f0e6 Run "npm run build" 2023-07-28 14:56:05 +01:00
Ian Lynagh
34090feb56 Lombok: Only do anything if Java is being analysed 2023-07-28 14:55:23 +01:00
github-actions[bot]
a9a416c8f4 Update changelog for v2.21.2 2023-07-28 13:26:48 +00:00
Henry Mercer
10c6bfee12 Merge pull request #1811 from github/henrymercer/print-summary-once
Only print the analysis summary once
2023-07-28 14:23:58 +01:00
Henry Mercer
67e62e7b01 Don't print the lines of code baseline when new analysis summary enabled 2023-07-28 14:03:02 +01:00
Henry Mercer
feea86eed3 Merge pull request #1810 from github/henrymercer/ci/use-platform-specific-bundles
Use platform specific bundles in PR checks
2023-07-28 13:49:54 +01:00
Henry Mercer
2e6f8c08c1 Add changelog note 2023-07-28 13:06:35 +01:00
Henry Mercer
8342844ea7 Only print the analysis summary once 2023-07-28 12:29:10 +01:00
Henry Mercer
679aac1b20 Use platform specific bundles in PR checks 2023-07-28 12:06:57 +01:00
Alexander Eyers-Taylor
de6681ceb7 Merge pull request #1797 from github/update-bundle/codeql-bundle-v2.14.1
Update default bundle to 2.14.1
2023-07-27 13:16:33 +01:00
Alexander Eyers-Taylor
f6fe5c5c70 Merge branch 'main' into update-bundle/codeql-bundle-v2.14.1 2023-07-27 12:53:27 +01:00
Ian Lynagh
976ada262f Regen 2023-07-27 12:45:19 +01:00
Ian Lynagh
c946707707 Pass codeql in to check 2023-07-27 12:45:08 +01:00
Ian Lynagh
4f6104c444 Run "npm run build" 2023-07-27 12:37:40 +01:00
Ian Lynagh
a27d3e9355 Fix lint suggestions 2023-07-27 12:36:57 +01:00
Ian Lynagh
cae6b78afc Be more consistent 2023-07-27 12:30:08 +01:00
Ian Lynagh
097823f389 Add support for the code_scanning_codeql_java_lombok feature flag 2023-07-27 12:19:38 +01:00
Andrew Eisenberg
62762170e1 Merge pull request #1808 from github/mergeback/v2.21.1-to-main-6ca1aa8c
Mergeback v2.21.1 refs/heads/releases/v2 into main
2023-07-26 12:11:01 -07:00
github-actions[bot]
e4ccfbd189 Update checked-in dependencies 2023-07-26 18:38:43 +00:00
github-actions[bot]
eaa61762f4 Update changelog and version after v2.21.1 2023-07-26 18:34:36 +00:00
Henry Mercer
6ca1aa8c19 Merge pull request #1807 from github/update-v2.21.1-055b396ea
Merge main into releases/v2
2023-07-26 19:32:45 +01:00
github-actions[bot]
84a55d4e11 Update changelog for v2.21.1 2023-07-26 16:20:35 +00:00
Stephan Brandauer
055b396ea2 Merge pull request #1800 from github/dependabot/pip/python-setup/tests/poetry/python-3.8/certifi-2023.7.22
Bump certifi from 2022.12.7 to 2023.7.22 in /python-setup/tests/poetry/python-3.8
2023-07-26 13:46:36 +02:00
Stephan Brandauer
98d57a1337 Merge pull request #1801 from github/dependabot/pip/python-setup/tests/poetry/requests-3/certifi-2023.7.22
Bump certifi from 2022.12.7 to 2023.7.22 in /python-setup/tests/poetry/requests-3
2023-07-26 13:46:20 +02:00
Stephan Brandauer
1ba3eaa7d3 Merge pull request #1802 from github/dependabot/pip/python-setup/tests/pipenv/requests-3/certifi-2023.7.22
Bump certifi from 2023.5.7 to 2023.7.22 in /python-setup/tests/pipenv/requests-3
2023-07-26 13:46:05 +02:00
Stephan Brandauer
233b9834e6 Merge pull request #1803 from github/dependabot/pip/python-setup/tests/pipenv/python-3.8/certifi-2023.7.22
Bump certifi from 2023.5.7 to 2023.7.22 in /python-setup/tests/pipenv/python-3.8
2023-07-26 13:45:43 +02:00
Stephan Brandauer
9cbfcfde24 Merge branch 'main' into dependabot/pip/python-setup/tests/pipenv/requests-3/certifi-2023.7.22 2023-07-26 12:40:45 +02:00
Stephan Brandauer
7a8ccc55bf Merge branch 'main' into dependabot/pip/python-setup/tests/poetry/requests-3/certifi-2023.7.22 2023-07-26 12:40:43 +02:00
Stephan Brandauer
ac0d76444a Merge branch 'main' into dependabot/pip/python-setup/tests/poetry/python-3.8/certifi-2023.7.22 2023-07-26 12:40:39 +02:00
Stephan Brandauer
500b1fac79 Merge branch 'main' into dependabot/pip/python-setup/tests/pipenv/python-3.8/certifi-2023.7.22 2023-07-26 12:40:26 +02:00
Stephan Brandauer
d89d3764f8 Merge pull request #1804 from github/dependabot/npm_and_yarn/npm-a99d24b4d9
Bump the npm group with 2 updates
2023-07-26 12:39:48 +02:00
Stephan Brandauer
654518ea06 Merge branch 'main' into dependabot/npm_and_yarn/npm-a99d24b4d9 2023-07-26 10:54:26 +02:00
Andrew Eisenberg
1a480074ee Merge pull request #1805 from jsoref/issue-1799
Add output for analyze action output path
2023-07-25 15:13:44 -07:00
Josh Soref
8ab72a0f47 Add output for analyze action output path 2023-07-25 16:03:16 -04:00
github-actions[bot]
658a20c06e Update checked-in dependencies 2023-07-25 17:07:05 +00:00
dependabot[bot]
818b10d9bb 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.1.0 to 6.2.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.2.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.1.0 to 6.2.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.2.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>
2023-07-25 16:40:22 +00:00
dependabot[bot]
126f9c6282 Bump certifi in /python-setup/tests/pipenv/python-3.8
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.05.07...2023.07.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 16:40:15 +00:00
dependabot[bot]
cfd7e3df84 Bump certifi in /python-setup/tests/pipenv/requests-3
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.05.07...2023.07.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 16:39:45 +00:00
dependabot[bot]
c974f40fee Bump certifi in /python-setup/tests/poetry/requests-3
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2023.07.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 16:39:42 +00:00
dependabot[bot]
d34eb386d4 Bump certifi in /python-setup/tests/poetry/python-3.8
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2023.07.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 16:39:37 +00:00
Angela P Wen
c57b27e4b7 Merge pull request #1798 from github/dependabot/npm_and_yarn/npm-7f457b68a6
Bump the npm group with 2 updates: `@schemastore/package` and `eslint-plugin-github`.
2023-07-25 18:34:52 +02:00
Angela P Wen
d1d5f4de97 Remove schemastore from Dependabot ignore 2023-07-25 18:00:43 +02:00
Angela P Wen
badeebcb1a Ignore prior commit in git blame 2023-07-25 17:59:56 +02:00
Angela P Wen
b16296be30 Auto-fix linting errors 2023-07-25 10:34:21 +02:00
github-actions[bot]
eff6331393 Update checked-in dependencies 2023-07-24 17:15:38 +00:00
dependabot[bot]
601c5ba56e Bump the npm group with 2 updates
Bumps the npm group with 2 updates: [@schemastore/package](https://github.com/ffflorian/schemastore-updater) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `@schemastore/package` from 0.0.8 to 0.0.10
- [Release notes](https://github.com/ffflorian/schemastore-updater/releases)
- [Commits](https://github.com/ffflorian/schemastore-updater/commits)

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

---
updated-dependencies:
- dependency-name: "@schemastore/package"
  dependency-type: direct:production
  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>
2023-07-24 17:12:49 +00:00
Henry Mercer
57a11be8e4 Merge pull request #1795 from github/henrymercer/use-more-cli-errors
Improve handling of fatal CLI errors
2023-07-24 17:16:47 +01:00
Henry Mercer
7197f58bbf Add JSDoc for extractFatalErrors 2023-07-24 16:47:33 +01:00
github-actions[bot]
3007c1e340 Add changelog note 2023-07-24 15:17:23 +00:00
github-actions[bot]
4a2e8975cd Update default bundle to codeql-bundle-v2.14.1 2023-07-24 15:17:18 +00:00
Henry Mercer
7b6664fa89 Merge pull request #1796 from github/henrymercer/scaling-ram-larger-runners-only
Scale the amount of reserved RAM on large runners only
2023-07-24 12:47:48 +01:00
Henry Mercer
fda93d8ef5 Apply scaling reserved RAM to large runners only 2023-07-21 18:00:34 +01:00
Henry Mercer
18ae9813bf Test memory flag computation across all platforms and system RAM values 2023-07-21 17:55:17 +01:00
Henry Mercer
47952bf4c2 Remove generated files associated with deleted code 2023-07-21 15:29:04 +01:00
Henry Mercer
5bbe7a2b8c Add test for summarizing several fatal errors 2023-07-21 15:27:57 +01:00
Henry Mercer
9fc0c931c7 Add changelog note 2023-07-21 15:16:58 +01:00
Henry Mercer
fdedc91de2 Improve formatting of fatal errors 2023-07-21 14:39:30 +01:00
Henry Mercer
2eb34f2fb9 Always include exit code in first line of CommandInvocationError 2023-07-21 14:26:44 +01:00
Henry Mercer
a3ef0b984b Include fatal error context on a single line where possible 2023-07-21 14:24:59 +01:00
Henry Mercer
65a297b952 Display the error message on one line if possible 2023-07-21 14:14:07 +01:00
Henry Mercer
0f871fa80d Improve CommandInvocationError message 2023-07-21 14:13:17 +01:00
Henry Mercer
c84418936e Add additional tests for database finalize behavior 2023-07-21 14:12:37 +01:00
Henry Mercer
e94e15d8dd Fix extra whitespace in CommandInvocationError 2023-07-21 14:12:36 +01:00
Henry Mercer
21c926745f Capture the details of fatal errors 2023-07-21 14:11:51 +01:00
Henry Mercer
76b2afaa4a Display the CLI's no code found error for CodeQL 2.12.4+ 2023-07-20 18:16:02 +01:00
Peter Newman
ce84bed594 Correct the no code found URL (#1779) 2023-07-20 01:20:31 -07:00
Henry Mercer
d0dd7d77b4 Merge pull request #1794 from github/henrymercer/resolve-cyclic-imports
Resolve cyclic imports
2023-07-19 19:24:10 +01:00
Henry Mercer
466dbc913e Merge pull request #1792 from github/mergeback/v2.21.0-to-main-1813ca74
Mergeback v2.21.0 refs/heads/releases/v2 into main
2023-07-19 17:46:06 +01:00
Henry Mercer
bac7c32ff7 Resolve the final dependency cycle! 2023-07-19 17:37:43 +01:00
Henry Mercer
5658fd1df2 Fix dependency cycle between trap-caching and init 2023-07-19 17:30:33 +01:00
Henry Mercer
2637069a45 Resolve dependency cycles between actions-util and workflow 2023-07-19 17:21:33 +01:00
Henry Mercer
0bc4788cf7 Resolve dependency cycle between api-client and actions-util 2023-07-19 17:01:05 +01:00
Henry Mercer
004f976bef Fix dependency cycle between util and config-utils 2023-07-19 16:48:21 +01:00
Henry Mercer
d577d6f6b1 Resolve dependency cycle between util and API client 2023-07-19 16:40:31 +01:00
Henry Mercer
9922e17dbb Move code scanning config enablement into feature flags 2023-07-19 15:57:59 +01:00
Henry Mercer
bf162c4114 Enable no cyclic dependencies eslint rule 2023-07-19 15:53:39 +01:00
Henry Mercer
79ad6142b1 Update script to put unreleased section in the right place 2023-07-19 13:56:46 +01:00
github-actions[bot]
6484fb09f6 Update checked-in dependencies 2023-07-19 12:53:51 +00:00
github-actions[bot]
c1144b5fa0 Update changelog and version after v2.21.0 2023-07-19 12:49:44 +00:00
Henry Mercer
1813ca74c3 Merge pull request #1791 from github/update-v2.21.0-6ae46f7a9
Merge main into releases/v2
2023-07-19 13:47:34 +01:00
github-actions[bot]
6843540876 Update changelog for v2.21.0 2023-07-19 12:14:55 +00:00
Henry Mercer
6ae46f7a92 Merge pull request #1790 from github/henrymercer/aborted-user-error
Report user errors in the abort stage appropriately
2023-07-18 18:10:04 +01:00
Henry Mercer
0cae69e062 Report user errors in the abort stage appropriately 2023-07-18 17:22:13 +01:00
Tom Bolton
d2ed0a05b6 Merge pull request #1786 from github/dependabot/npm_and_yarn/npm-0a410f26d2
Bump the npm group with 6 updates
2023-07-18 14:22:17 +01:00
Henry Mercer
651d09131a Merge pull request #1788 from github/henrymercer/fix-feature-flag-usage
Fixes for new analysis summary and scaling reserved RAM feature flag usage
2023-07-18 14:14:43 +01:00
Henry Mercer
e0f0892f83 Add tests for new analysis summary feature flag 2023-07-18 13:43:44 +01:00
Henry Mercer
27d3b2f857 Fix scaling reserved RAM feature flag naming 2023-07-18 13:41:05 +01:00
Henry Mercer
da4e0a06c0 Fix CodeQL version checks 2023-07-18 13:41:05 +01:00
github-actions[bot]
e266801e21 Update checked-in dependencies 2023-07-17 20:17:37 +00:00
dependabot[bot]
99c9f6a498 Bump the npm group with 6 updates
Bumps the npm group with 6 updates:

| Package | Update |
| --- | --- |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | 10.0.2 to 10.0.15 |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | 6.0.0 to 6.1.0 |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | 6.0.0 to 6.1.0 |
| [eslint](https://github.com/eslint/eslint) | 8.44.0 to 8.45.0 |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | 4.8.0 to 4.9.0 |
| [nock](https://github.com/nock/nock) | 13.3.1 to 13.3.2 |


Updates `@types/sinon` from 10.0.2 to 10.0.15
- [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.0.0 to 6.1.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.1.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.0.0 to 6.1.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.1.0/packages/parser)

Updates `eslint` from 8.44.0 to 8.45.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.44.0...v8.45.0)

Updates `eslint-plugin-github` from 4.8.0 to 4.9.0
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.8.0...v4.9.0)

Updates `nock` from 13.3.1 to 13.3.2
- [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.1...v13.3.2)

---
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-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-github
  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>
2023-07-17 20:14:19 +00:00
Henry Mercer
942acabcd0 Merge pull request #1785 from github/henrymercer/ignore-incompatible-dependencies
Update Dependabot config to ignore incompatible updates
2023-07-17 21:11:35 +01:00
Henry Mercer
e0806ce653 Update Dependabot config to ignore incompatible updates 2023-07-17 19:01:20 +01:00
Henry Mercer
84e042b8a4 Merge pull request #1783 from github/henrymercer/check-sarif-node16
Run check-sarif Action using Node 16
2023-07-17 18:54:32 +01:00
Henry Mercer
5719ca3eb6 Run check-sarif Action using Node 16
`using: node12` Actions have already been running using Node 16 for
some time.
2023-07-17 18:29:59 +01:00
Henry Mercer
d85a177b9b Merge pull request #1780 from github/henrymercer/remove-redundant-env-var
Remove redundant environment variable from PR check
2023-07-17 17:35:06 +01:00
Henry Mercer
2e8581811e Remove redundant environment variable from PR check 2023-07-17 15:42:21 +01:00
Henry Mercer
262017ad69 Merge pull request #1759 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-07-17 14:13:35 +01:00
Henry Mercer
eb1ef12e40 Merge branch 'main' into update-supported-enterprise-server-versions 2023-07-17 13:35:17 +01:00
Henry Mercer
2ff6d83d07 Merge pull request #1724 from github/henrymercer/bump-minimum-codeql-version
Bump minimum CodeQL version to 2.9.4
2023-07-17 13:32:48 +01:00
Henry Mercer
5246291397 Merge branch 'main' into henrymercer/bump-minimum-codeql-version 2023-07-14 16:16:25 +01:00
Chuan-kai Lin
013a1d0cb2 Merge pull request #1778 from github/mergeback/v2.20.4-to-main-489225d8
Mergeback v2.20.4 refs/heads/releases/v2 into main
2023-07-14 07:36:36 -07:00
github-actions[bot]
aedd8c2a63 Update checked-in dependencies 2023-07-14 14:05:35 +00:00
github-actions[bot]
9a97b34d8c Update changelog and version after v2.20.4 2023-07-14 13:59:05 +00:00
Chuan-kai Lin
489225d82a Merge pull request #1777 from github/update-v2.20.4-a148c5807
Merge main into releases/v2
2023-07-14 06:57:01 -07:00
github-actions[bot]
1b6383d6be Update changelog for v2.20.4 2023-07-14 13:16:51 +00:00
Andrew Eisenberg
a148c58075 Merge pull request #1776 from github/aeisenberg/changelog-releases
Add link to releases page in changelog
2023-07-13 13:51:06 -07:00
Andrew Eisenberg
50527c5dba Add link to releases page in changelog 2023-07-13 12:24:36 -07:00
Chuan-kai Lin
814b2edab6 Merge pull request #1762 from github/update-bundle/codeql-bundle-v2.14.0
Update default bundle to 2.14.0
2023-07-13 09:36:56 -07:00
Chuan-kai Lin
d2baed4b69 Merge branch 'main' into update-bundle/codeql-bundle-v2.14.0 2023-07-13 08:19:40 -07:00
Henry Mercer
c5526174a5 Merge pull request #1774 from github/dependabot/npm_and_yarn/npm-a34e423e98
Bump the npm group with 21 updates
2023-07-13 12:14:16 +01:00
Henry Mercer
c1f49580cf Fix dependency incompatibilities 2023-07-13 11:20:39 +01:00
github-actions[bot]
40a500c743 Update checked-in dependencies 2023-07-13 09:09:17 +00:00
dependabot[bot]
4fad06f438 Bump the npm group with 21 updates
Bumps the npm group with 21 updates:

| Package | Update |
| --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | 1.1.0 to 1.1.1 |
| [@actions/io](https://github.com/actions/toolkit/tree/HEAD/packages/io) | 1.1.2 to 1.1.3 |
| [@octokit/plugin-retry](https://github.com/octokit/plugin-retry.js) | 5.0.2 to 6.0.0 |
| [@schemastore/package](https://github.com/ffflorian/schemastore-updater) | 0.0.6 to 0.0.9 |
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) | 9.0.0 to 9.0.2 |
| [adm-zip](https://github.com/cthackers/adm-zip) | 0.5.9 to 0.5.10 |
| [del](https://github.com/sindresorhus/del) | 6.1.1 to 7.0.0 |
| [long](https://github.com/dcodeIO/long.js) | 5.2.0 to 5.2.3 |
| [@ava/typescript](https://github.com/avajs/typescript) | 4.0.0 to 4.1.0 |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | 7.3.13 to 7.5.0 |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | 5.48.2 to 6.0.0 |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | 5.56.0 to 6.0.0 |
| [ava](https://github.com/avajs/ava) | 5.1.1 to 5.3.1 |
| [eslint](https://github.com/eslint/eslint) | 8.32.0 to 8.44.0 |
| [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | 3.5.3 to 3.5.5 |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | 4.6.0 to 4.8.0 |
| [micromatch](https://github.com/micromatch/micromatch) | 4.0.4 to 4.0.5 |
| [nock](https://github.com/nock/nock) | 13.1.1 to 13.3.1 |
| [removeNPMAbsolutePaths](https://github.com/juanjoDiaz/removeNPMAbsolutePaths) | 3.0.0 to 3.0.1 |
| [sinon](https://github.com/sinonjs/sinon) | 15.0.1 to 15.2.0 |
| [typescript](https://github.com/Microsoft/TypeScript) | 5.0.2 to 5.1.6 |


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

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

Updates `@octokit/plugin-retry` from 5.0.2 to 6.0.0
- [Release notes](https://github.com/octokit/plugin-retry.js/releases)
- [Commits](https://github.com/octokit/plugin-retry.js/compare/v5.0.2...v6.0.0)

Updates `@schemastore/package` from 0.0.6 to 0.0.9
- [Release notes](https://github.com/ffflorian/schemastore-updater/releases)
- [Commits](https://github.com/ffflorian/schemastore-updater/commits)

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

Updates `adm-zip` from 0.5.9 to 0.5.10
- [Release notes](https://github.com/cthackers/adm-zip/releases)
- [Changelog](https://github.com/cthackers/adm-zip/blob/master/history.md)
- [Commits](https://github.com/cthackers/adm-zip/commits/v0.5.10)

Updates `del` from 6.1.1 to 7.0.0
- [Release notes](https://github.com/sindresorhus/del/releases)
- [Commits](https://github.com/sindresorhus/del/compare/v6.1.1...v7.0.0)

Updates `long` from 5.2.0 to 5.2.3
- [Release notes](https://github.com/dcodeIO/long.js/releases)
- [Commits](https://github.com/dcodeIO/long.js/compare/v5.2.0...v5.2.3)

Updates `@ava/typescript` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/avajs/typescript/releases)
- [Commits](https://github.com/avajs/typescript/compare/v4.0.0...v4.1.0)

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

Updates `@typescript-eslint/eslint-plugin` from 5.48.2 to 6.0.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.0.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 5.56.0 to 6.0.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.0.0/packages/parser)

Updates `ava` from 5.1.1 to 5.3.1
- [Release notes](https://github.com/avajs/ava/releases)
- [Commits](https://github.com/avajs/ava/compare/v5.1.1...v5.3.1)

Updates `eslint` from 8.32.0 to 8.44.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.32.0...v8.44.0)

Updates `eslint-import-resolver-typescript` from 3.5.3 to 3.5.5
- [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.3...v3.5.5)

Updates `eslint-plugin-github` from 4.6.0 to 4.8.0
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.6.0...v4.8.0)

Updates `micromatch` from 4.0.4 to 4.0.5
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.5)

Updates `nock` from 13.1.1 to 13.3.1
- [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.1.1...v13.3.1)

Updates `removeNPMAbsolutePaths` from 3.0.0 to 3.0.1
- [Release notes](https://github.com/juanjoDiaz/removeNPMAbsolutePaths/releases)
- [Commits](https://github.com/juanjoDiaz/removeNPMAbsolutePaths/compare/v3.0.0...v3.0.1)

Updates `sinon` from 15.0.1 to 15.2.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.0.1...v15.2.0)

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

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@actions/io"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@octokit/plugin-retry"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@schemastore/package"
  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: adm-zip
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: del
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: long
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@ava/typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
- dependency-name: ava
  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-patch
  dependency-group: npm
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: micromatch
  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-minor
  dependency-group: npm
- dependency-name: removeNPMAbsolutePaths
  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-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>
2023-07-13 09:06:22 +00:00
Henry Mercer
07224254ab Merge pull request #1773 from github/henrymercer/dependabot-grouped-updates
Group together dependency updates
2023-07-13 10:01:14 +01:00
Rasmus Wriedt Larsen
7d35788421 Merge pull request #1772 from github/RasmusWL/fix-pipenv
python-setup: Fix pipenv (`--keep-outdated` deprecated)
2023-07-13 09:32:14 +02:00
Henry Mercer
36928bf506 Group together npm dependency updates 2023-07-12 18:15:29 +01:00
Rasmus Wriedt Larsen
d1a140b28e python-setup: Fix pipenv (--keep-outdated deprecated)
Recently released pipenv removed support for `--keep-outdated` flag (see https://github.com/pypa/pipenv/blob/main/CHANGELOG.rst#pipenv-202379-2023-07-09)

Local testing showed that installation was fine without this 👍
2023-07-12 17:09:00 +02:00
Henry Mercer
12aa0a6e01 Merge pull request #1771 from github/henrymercer/update-semver
Bump semver
2023-07-12 10:52:52 +01:00
Henry Mercer
4b7eb74ef5 Bump semver 2023-07-11 20:48:18 +01:00
Angela P Wen
863a05b28b Nest alertCounts object in event_report.properties (#1770) 2023-07-11 09:20:29 -07:00
Henry Mercer
d6c8719550 Merge pull request #1769 from github/henrymercer/bump-caniuse
Update `caniuse-lite` dependency
2023-07-11 14:25:15 +01:00
Henry Mercer
859354c7e2 Merge pull request #1768 from github/henrymercer/no-languages-user-error
Telemetry: Mark configuration errors as user errors
2023-07-11 13:42:55 +01:00
Henry Mercer
0fc0483240 Update caniuse-lite dependency 2023-07-11 13:17:55 +01:00
Henry Mercer
e828ed68c6 Use Error for test errors 2023-07-11 13:08:50 +01:00
Henry Mercer
6639a31758 Mark configuration errors as user errors 2023-07-11 11:05:40 +01:00
Henry Mercer
95a5fda31a Merge pull request #1765 from github/dependabot/npm_and_yarn/octokit/types-11.1.0
Bump @octokit/types from 10.0.0 to 11.1.0
2023-07-10 21:29:49 +01:00
github-actions[bot]
b3406fda8f Update checked-in dependencies 2023-07-10 17:46:35 +00:00
dependabot[bot]
916cfef293 Bump @octokit/types from 10.0.0 to 11.1.0
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 10.0.0 to 11.1.0.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v10.0.0...v11.1.0)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 17:42:54 +00:00
Henry Mercer
fed45865ba Merge branch 'main' into henrymercer/bump-minimum-codeql-version 2023-07-10 13:21:51 +01:00
Nick Rolfe
6a07b2ad43 Merge pull request #1760 from github/nickrolfe/scaling-memory
Respect `scaling_reserved_ram` feature flag
2023-07-10 10:25:38 +01:00
dependabot[bot]
8f80d7761c Bump tough-cookie and @azure/ms-rest-js (#1763)
* Bump tough-cookie and @azure/ms-rest-js

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) and [@azure/ms-rest-js](https://github.com/Azure/ms-rest-js). These dependencies needed to be updated together.

Updates `tough-cookie` from 4.0.0 to 4.1.3
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

Updates `@azure/ms-rest-js` from 2.6.2 to 2.7.0
- [Changelog](https://github.com/Azure/ms-rest-js/blob/master/Changelog.md)
- [Commits](https://github.com/Azure/ms-rest-js/commits)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: "@azure/ms-rest-js"
  dependency-type: indirect
...

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-07-10 01:41:51 -07:00
github-actions[bot]
49f147856e Add changelog note 2023-07-07 16:23:39 +00:00
github-actions[bot]
b8490d73e8 Update default bundle to codeql-bundle-v2.14.0 2023-07-07 16:23:27 +00:00
Nick Rolfe
ab9aa50acb Add integration test for scaling_reserved_ram feature flag 2023-07-07 17:01:34 +01:00
Nick Rolfe
28e070c442 Add changenote for scaling_reserved_ram change 2023-07-07 16:46:48 +01:00
Nick Rolfe
f232722edf Respect scaling_reserved_ram feature flag
The amount of RAM given to the CodeQL evaluator is the machine's total
memory size, minus a reserved amount. Currently, the reserved amount is
fixed at 1 GB (or 1.5 GB on Windows). When the scaling_reserved_ram
feature flag is enabled, we also add 2% of the total memory size to the
reserved amount. This allows for the fact that the kernel will consume
more RAM (e.g. for page tables) on machines with more physical RAM.
2023-07-07 16:46:47 +01:00
Henry Mercer
85c77f1dfc Merge pull request #1761 from github/henrymercer/remove-fetching-releases-fallback
Simplify CodeQL setup now that the last two releases have semver bundles
2023-07-07 15:53:18 +01:00
Henry Mercer
dc0234b48c Remove redundant checks 2023-07-07 15:32:20 +01:00
Henry Mercer
a41df3ae10 Add unit test for unsupported default version feature flags 2023-07-07 15:15:57 +01:00
Henry Mercer
50f2cc19ee Remove now redundant variant property
Previously, this was useful for discriminating between different
`CodeQLDefaultVersion` instances. However now all instances return a
tag name.
2023-07-07 15:15:57 +01:00
Henry Mercer
bec18d1625 Remove fallback logic for mapping default CLI version to GitHub Release
The default version feature flags will now always point to a CLI version
with a semantically versioned bundle, so we can find the GitHub
Release directly from the CLI version.
2023-07-07 15:15:57 +01:00
Henry Mercer
395fdba990 Merge pull request #1757 from github/henrymercer/cli-deprecation-warning
Add a deprecation warning for CodeQL CLIs < 2.9.4
2023-07-07 14:00:45 +01:00
Henry Mercer
5499d30c79 Merge branch 'main' into henrymercer/cli-deprecation-warning 2023-07-07 13:31:06 +01:00
Henry Mercer
bc5c834c7b Merge pull request #1758 from github/henrymercer/bundle-semantic-version-simplifications
Skip an API call when downloading a CodeQL version with a semver bundle
2023-07-07 13:22:56 +01:00
Henry Mercer
f6c51a38d7 Remove redundant set of env var 2023-07-07 13:06:53 +01:00
Henry Mercer
e1913859f3 Polish deprecation wording 2023-07-07 13:05:52 +01:00
Henry Mercer
177a5796c9 Tweak doc comment 2023-07-07 13:00:29 +01:00
Henry Mercer
6418c5d819 Skip an API call when downloading a CodeQL version with a semver bundle
Previously, we made an API call to look up the CLI version to release
mapping when the default CLI version was requested on Dotcom and that
CLI wasn't in the toolcache.
Now we compute the tag name directly for semver bundles.
2023-07-07 10:58:57 +01:00
github-actions[bot]
f60aebf286 Update supported GitHub Enterprise Server versions 2023-07-07 00:13:41 +00:00
Henry Mercer
05cb00cb77 Merge branch 'main' into henrymercer/cli-deprecation-warning 2023-07-06 18:00:18 +01:00
Dave Bartolomeo
84c057931e Merge pull request #1755 from github/mergeback/v2.20.3-to-main-46ed16de
Mergeback v2.20.3 refs/heads/releases/v2 into main
2023-07-06 12:53:21 -04:00
Henry Mercer
674e180d89 Add changelog note 2023-07-06 17:37:36 +01:00
Mathias Vorreiter Pedersen
fb57c981cc Merge pull request #1756 from github/fix-readme
Fix README link
2023-07-06 17:35:04 +01:00
github-actions[bot]
0bc3d1ffcf Update checked-in dependencies 2023-07-06 16:29:43 +00:00
Henry Mercer
9b345a50dd Only warn once about the CodeQL CLI being unsupported soon 2023-07-06 17:28:37 +01:00
Henry Mercer
3a960869ac Simplify definitions of environment variables 2023-07-06 17:28:37 +01:00
Mathias Vorreiter Pedersen
59c6251800 Fix README link 2023-07-06 17:14:12 +01:00
Henry Mercer
485b5809e8 Add deprecation warning for CodeQL CLIs < 2.9.4 2023-07-06 16:51:58 +01:00
github-actions[bot]
e97b7675af Update changelog and version after v2.20.3 2023-07-06 13:51:01 +00:00
Dave Bartolomeo
46ed16ded9 Merge pull request #1754 from github/update-v2.20.3-a2d725ddd
Merge main into releases/v2
2023-07-06 09:48:42 -04:00
github-actions[bot]
d0206e8c49 Update changelog for v2.20.3 2023-07-06 13:14:11 +00:00
Henry Mercer
a2d725ddd0 Merge pull request #1753 from github/henrymercer/new-analysis-summary
Add support for new analysis summaries
2023-07-06 11:46:16 +01:00
Henry Mercer
bbefc2b931 Merge branch 'main' into henrymercer/new-analysis-summary 2023-07-06 10:58:28 +01:00
Henry Mercer
8c2e08da10 Merge pull request #1752 from github/henrymercer/export-config-by-default
Remove feature flag for exporting the code scanning configuration
2023-07-06 10:57:31 +01:00
Henry Mercer
0c1d7efb0a Add support for new analysis summaries 2023-07-05 18:56:55 +01:00
Henry Mercer
56beae86dd Remove feature flag for exporting the code scanning configuration flag 2023-07-05 16:26:20 +01:00
Dave Bartolomeo
a42c0ca9fe Merge pull request #1743 from github/update-bundle/codeql-bundle-v2.13.5
Update default bundle to 2.13.5
2023-07-05 11:12:27 -04:00
Angela P Wen
e960e482a4 Telemetry: send event report times as ISO strings (#1751) 2023-07-05 03:25:10 -07:00
Angela P Wen
bcb460dab8 Merge pull request #1747 from github/mergeback/v2.20.2-to-main-004c5de3
Mergeback v2.20.2 refs/heads/releases/v2 into main
2023-07-03 04:22:50 -07:00
github-actions[bot]
9f236e9f54 Update checked-in dependencies 2023-07-03 11:02:30 +00:00
github-actions[bot]
56f71445bc Update changelog and version after v2.20.2 2023-07-03 11:00:39 +00:00
Angela P Wen
004c5de30b Merge pull request #1746 from github/update-v2.20.2-7dfbc0e0d
Merge main into releases/v2
2023-07-03 03:58:33 -07:00
github-actions[bot]
cb0b0a398e Update changelog for v2.20.2 2023-07-03 10:12:32 +00:00
dependabot[bot]
7dfbc0e0db Bump semver from 7.3.8 to 7.5.2 (#1745)
* Bump semver from 7.3.8 to 7.5.2

Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

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-07-03 07:45:09 +00:00
github-actions[bot]
66431bf9fd Add changelog note 2023-06-30 17:50:09 +00:00
github-actions[bot]
1c88766d17 Update default bundle to codeql-bundle-v2.13.5 2023-06-30 17:50:05 +00:00
Angela P Wen
46a6823b81 Send new per-query alert count event reports for QA telemetry (#1741) 2023-06-30 07:53:13 -07:00
Henry Mercer
cff3d9e3c9 Merge pull request #1737 from github/mergeback/v2.20.1-to-main-f6e388eb
Mergeback v2.20.1 refs/heads/releases/v2 into main
2023-06-21 14:47:13 +01:00
github-actions[bot]
75c683d9b5 Update checked-in dependencies 2023-06-21 10:59:30 +00:00
github-actions[bot]
f4eef0bfda Update changelog and version after v2.20.1 2023-06-21 10:57:02 +00:00
Henry Mercer
f6e388ebf0 Merge pull request #1736 from github/update-v2.20.1-4385ad556
Merge main into releases/v2
2023-06-21 11:54:43 +01:00
github-actions[bot]
2874247228 Update changelog for v2.20.1 2023-06-21 09:25:30 +00:00
Angela P Wen
4385ad5563 Send job_run_uuid to status report telemetry (#1685) 2023-06-20 23:45:51 -07:00
dependabot[bot]
8ba77ef4d3 Bump @octokit/types from 9.0.0 to 10.0.0 (#1734)
* Bump @octokit/types from 9.0.0 to 10.0.0

Bumps [@octokit/types](https://github.com/octokit/types.ts) from 9.0.0 to 10.0.0.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v9.0.0...v10.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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-06-20 15:21:51 +00:00
Angela P Wen
82dbde173c Fix setup-swift composite action for versions 5.8, 5.8.1 (#1735) 2023-06-20 07:43:31 -07:00
Henry Mercer
c6dff3470e Merge pull request #1721 from github/update-bundle/codeql-bundle-v2.13.4
Update default bundle to 2.13.4
2023-06-19 20:52:42 +01:00
Henry Mercer
3e0c87dc38 Merge branch 'main' into update-bundle/codeql-bundle-v2.13.4 2023-06-19 11:57:24 +01:00
Henry Mercer
de74ca6211 Merge pull request #1732 from github/henrymercer/tolerate-unexpected-processing-statuses
Tolerate unexpected processing statuses for unsuccessful execution SARIF uploads
2023-06-19 10:06:30 +01:00
Henry Mercer
d6201b58de Improve logging messages 2023-06-16 11:18:41 +01:00
Michael B. Gale
0ac18158d1 Merge pull request #1684 from github/mbg/add-resolve-environment 2023-06-15 17:50:42 +01:00
Michael B. Gale
d4006d9bc9 Improve step name in integration test 2023-06-15 15:46:54 +01:00
Henry Mercer
ee2b24e9fb Merge pull request #1733 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-06-15 11:15:18 +01:00
Michael B. Gale
7e5bafcdb5 Use stable-v2.13.4 for integration test 2023-06-15 11:04:44 +01:00
Michael B. Gale
eb9703ee74 Reformat 2023-06-15 10:22:00 +01:00
Michael B. Gale
7a9f099940 Don't invoke CLI when command not supported 2023-06-15 10:15:03 +01:00
github-actions[bot]
b843f9522e Update supported GitHub Enterprise Server versions 2023-06-15 00:12:06 +00:00
Michael B. Gale
899b5a286f Continue after CLI errors 2023-06-14 16:02:54 +01:00
Henry Mercer
4d7934a07c Tolerate unexpected processing statuses for red SARIF uploads 2023-06-14 14:20:27 +01:00
Michael B. Gale
f239f49a62 Rebuild integration test workflow 2023-06-13 20:51:45 +01:00
Michael B. Gale
c8785050e2 Improve changelog wording 2023-06-13 20:46:47 +01:00
Michael B. Gale
ba64fee9b1 Add CHANGELOG entry 2023-06-13 20:46:00 +01:00
Michael B. Gale
1c732358fa Update working-directory description 2023-06-13 20:46:00 +01:00
Michael B. Gale
efe0e211bb Update action description 2023-06-13 20:46:00 +01:00
Michael B. Gale
6419f994ff Handle case where workingDir is undefined 2023-06-13 20:46:00 +01:00
Michael B. Gale
16f3f1a951 Remove validateWorkflow call 2023-06-13 20:45:59 +01:00
Michael B. Gale
8e75e1a14d Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-06-13 20:45:59 +01:00
Michael B. Gale
ef4bf4ae03 Use nightly-latest for test for now 2023-06-13 20:45:59 +01:00
Michael B. Gale
0b8c8128cf Add integration test for resolve-environment 2023-06-13 20:45:59 +01:00
Michael B. Gale
64fa96a8b3 Report success 2023-06-13 20:45:59 +01:00
Michael B. Gale
829bba8836 Do not download CLI 2023-06-13 20:45:59 +01:00
Michael B. Gale
e08f131aab Include CLI output in JSON error 2023-06-13 20:45:58 +01:00
Michael B. Gale
6f07b504a5 Propagate --working-dir argument 2023-06-13 20:45:58 +01:00
Michael B. Gale
fce65da29a Remove BuildEnvironmentOS 2023-06-13 20:45:58 +01:00
Michael B. Gale
ddb13a1ac7 Rename actionName to ACTION_NAME 2023-06-13 20:45:58 +01:00
Michael B. Gale
aef016d9b5 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-06-13 20:45:58 +01:00
Michael B. Gale
8216c3a1b1 Install CodeQL as part of the action 2023-06-13 20:45:58 +01:00
Michael B. Gale
59a9e3a311 Fix formatting for runResolveBuildEnvironment 2023-06-13 20:45:57 +01:00
Michael B. Gale
527ea9408c Add working-directory input 2023-06-13 20:45:57 +01:00
Michael B. Gale
4518431205 Fix: rename output 2023-06-13 20:45:57 +01:00
Michael B. Gale
0930314935 Add token and matrix inputs 2023-06-13 20:45:57 +01:00
Michael B. Gale
ee80b30f46 Add initial workflow code dependent on init 2023-06-13 20:45:57 +01:00
Michael B. Gale
4356c16c33 Add runResolveBuildEnvironment 2023-06-13 20:45:57 +01:00
Michael B. Gale
cc95e67380 Add resolve-environment to ActionName 2023-06-13 20:45:56 +01:00
Michael B. Gale
360d2b76b5 Update OS representation 2023-06-13 20:45:56 +01:00
Michael B. Gale
4322324628 Add resolveBuildEnvironment to CodeQL type 2023-06-13 20:45:56 +01:00
Michael B. Gale
dce63d8676 Add initial stub for resolve-environment action 2023-06-13 20:45:56 +01:00
dependabot[bot]
b8f204c619 Bump @octokit/plugin-retry from 4.0.4 to 5.0.2 (#1726)
* Bump @octokit/plugin-retry from 4.0.4 to 5.0.2

Bumps [@octokit/plugin-retry](https://github.com/octokit/plugin-retry.js) from 4.0.4 to 5.0.2.
- [Release notes](https://github.com/octokit/plugin-retry.js/releases)
- [Commits](https://github.com/octokit/plugin-retry.js/compare/v4.0.4...v5.0.2)

---
updated-dependencies:
- dependency-name: "@octokit/plugin-retry"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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-06-13 12:39:20 -07:00
Angela P Wen
5fa98fa5b2 Merge pull request #1731 from github/mergeback/v2.20.0-to-main-6c089f53
Mergeback v2.20.0 refs/heads/releases/v2 into main
2023-06-13 12:21:04 -07:00
github-actions[bot]
6bd6480037 Update checked-in dependencies 2023-06-13 18:27:20 +00:00
github-actions[bot]
e476d8b071 Update changelog and version after v2.20.0 2023-06-13 18:24:42 +00:00
Angela P Wen
6c089f53dd Merge pull request #1730 from github/update-v2.20.0-d5b7b3823
Merge main into releases/v2
2023-06-13 11:22:32 -07:00
github-actions[bot]
484d2f8088 Update changelog for v2.20.0 2023-06-13 17:50:40 +00:00
Angela P Wen
d5b7b38233 Bump Action version to 2.20.0 (#1729) 2023-06-13 17:46:13 +00:00
Henry Mercer
64d6bfc2d6 Merge branch 'main' into update-bundle/codeql-bundle-v2.13.4 2023-06-13 14:10:34 +01:00
Henry Mercer
543e4689d0 Merge pull request #1725 from github/henrymercer/fix-flag-name
Fix the name of the disable Python dependency installation feature flag
2023-06-12 21:16:13 +01:00
Henry Mercer
c92053157f Address review comments
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-06-12 19:31:25 +01:00
Henry Mercer
9f45792756 Update autogenerated notice to refer to specific ruamel.yaml version 2023-06-12 13:28:11 +01:00
Henry Mercer
98884904a2 Update checks formatting 2023-06-12 13:28:01 +01:00
Henry Mercer
5be8bd1c16 Pin version of ruamel.yaml to avoid checks breaking 2023-06-12 13:28:00 +01:00
Henry Mercer
eb5d323227 Bump minor version number 2023-06-12 12:02:38 +01:00
Henry Mercer
bce99ca79f Fix the name of the disable Python dependency installation feature flag 2023-06-12 11:55:51 +01:00
Henry Mercer
e287d85c90 Merge pull request #1723 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-06-12 11:45:24 +01:00
Henry Mercer
834c357222 Add changelog note 2023-06-12 11:36:47 +01:00
Henry Mercer
7bd23b58b5 Remove support for CodeQL CLI 2.9.3 and earlier 2023-06-12 11:34:01 +01:00
Henry Mercer
f1c4784a3f Update checks 2023-06-12 11:26:55 +01:00
Henry Mercer
a590b4afa7 Bump minimum CodeQL version to 2.9.4 2023-06-12 11:22:22 +01:00
github-actions[bot]
cd5b1ee5cf Update supported GitHub Enterprise Server versions 2023-06-10 00:11:27 +00:00
Henry Mercer
5dcc7c296d Merge pull request #1719 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2023-06-09 14:11:48 +01:00
github-actions[bot]
3437c495bd Add changelog note 2023-06-09 12:27:30 +00:00
github-actions[bot]
c94b9997cc Update default bundle to codeql-bundle-v2.13.4 2023-06-09 12:27:25 +00:00
github-actions[bot]
921d191150 Update supported GitHub Enterprise Server versions 2023-06-07 00:12:13 +00:00
Angela P Wen
cdcdbb5797 PR checks: stop setting experimental Swift var for new CLI versions (#1718)
Now that `latest` and `cached` are both 2.13.3, which is the version in which we GA'ed Swift, we should stop setting this experimental variable when we test these CLI versions so we can test the case where the variable is unset.
2023-06-06 08:49:09 -07:00
Henry Mercer
8b0f2cf9da Merge pull request #1717 from github/henrymercer/fix-changelog
Fix changelog for 2.3.6
2023-06-05 19:44:53 +01:00
Henry Mercer
a35a881b65 Fix changelog for 2.3.6 2023-06-05 19:14:03 +01:00
Henry Mercer
d8667207b6 Merge pull request #1714 from github/mergeback/v2.3.6-to-main-83f0fe6c
Mergeback v2.3.6 refs/heads/releases/v2 into main
2023-06-05 19:12:50 +01:00
Henry Mercer
926a4898bc Merge pull request #1712 from github/henrymercer/remove-unused-env-var
Remove unused `CODESCANNING_EVENT_NAME` environment variable
2023-06-01 18:28:45 +01:00
github-actions[bot]
5c63cc5b1c Update checked-in dependencies 2023-06-01 15:34:00 +00:00
github-actions[bot]
30a3b9a904 Update changelog and version after v2.3.6 2023-06-01 15:27:36 +00:00
Alexander Eyers-Taylor
83f0fe6c49 Merge pull request #1713 from github/update-v2.3.6-96f284028
Merge main into releases/v2
2023-06-01 16:25:43 +01:00
github-actions[bot]
5c8f4be0e9 Update changelog for v2.3.6 2023-06-01 13:04:31 +00:00
Henry Mercer
96f2840282 Merge pull request #1711 from github/henrymercer/improve-supported-versions-update
Improve automation for updating supported versions of GHES
2023-05-31 18:26:51 +01:00
Henry Mercer
dfc31c9995 Convert actions-util docs to JSDoc 2023-05-31 17:49:42 +01:00
Henry Mercer
019a40b91a Inline checks for producing a better error message for Dependabot PRs 2023-05-31 17:42:45 +01:00
Henry Mercer
ae005db7f8 Merge branch 'main' into henrymercer/remove-unused-env-var 2023-05-31 17:41:04 +01:00
Henry Mercer
89c4c9e65c Merge pull request #1678 from github/henrymercer/default-setup-safeguarding
Flag up functionality that may not exist in default setup workflows
2023-05-31 17:33:30 +01:00
Henry Mercer
26f16a5e63 Rephrase the still supported calculation to make it clearer 2023-05-31 17:20:39 +01:00
Henry Mercer
955f8596ae Fix sign error 2023-05-31 16:49:34 +01:00
Henry Mercer
e7cff66ce1 Fix push 2023-05-31 16:35:12 +01:00
Henry Mercer
bf419682de Remove unused CODESCANNING_EVENT_NAME environment variable 2023-05-31 15:37:11 +01:00
Henry Mercer
afdba76326 Wait a week before dropping support for end of life GHES versions 2023-05-31 15:00:19 +01:00
Henry Mercer
07e43a2208 Open PR with gh CLI 2023-05-31 14:39:03 +01:00
Henry Mercer
9632771630 Address review comments 2023-05-31 14:23:43 +01:00
Alexander Eyers-Taylor
9d2dd7cfea Merge pull request #1698 from github/update-bundle/codeql-bundle-20230524
Update default bundle to 2.13.3
2023-05-31 12:29:26 +01:00
Henry Mercer
d427c89ed7 Ignore internal Actions 2023-05-30 20:31:56 +01:00
Henry Mercer
125ff5530c Fix deprecation warnings 2023-05-30 20:31:40 +01:00
Henry Mercer
86ead5e019 Only flag up the deepest properties 2023-05-30 19:50:56 +01:00
Henry Mercer
eb1c7a3887 Use getRefFromEnv() so ref is present on default setup 2023-05-30 19:39:53 +01:00
Henry Mercer
6bd8101752 Merge pull request #1709 from github/henrymercer/print-baseline-once
Only print lines of code information once
2023-05-26 21:03:22 +01:00
Henry Mercer
2408985f4e Only print lines of code information once
CodeQL already prints it, so we don't need to print it again.
2023-05-26 20:34:30 +01:00
Henry Mercer
f8b1cb6997 Merge pull request #1695 from github/henrymercer/update-requests
PR checks: Update requests to 2.31.0
2023-05-26 11:10:44 +01:00
Andrew Eisenberg
2d031a36d6 Merge pull request #1707 from github/mergeback/v2.3.5-to-main-0225834c
Mergeback v2.3.5 refs/heads/releases/v2 into main
2023-05-25 12:50:21 -07:00
github-actions[bot]
1ba7713018 Update checked-in dependencies 2023-05-25 19:23:44 +00:00
github-actions[bot]
339e0d5afb Update changelog and version after v2.3.5 2023-05-25 19:12:36 +00:00
Andrew Eisenberg
0225834cc5 Merge pull request #1706 from github/update-v2.3.5-d3314cca2
Merge main into releases/v2
2023-05-25 12:10:52 -07:00
Andrew Eisenberg
15f9b00614 Apply suggestions from code review 2023-05-25 11:42:54 -07:00
github-actions[bot]
ff82fd0736 Update changelog for v2.3.5 2023-05-25 18:22:27 +00:00
Andrew Eisenberg
d3314cca22 Merge pull request #1705 from github/aeisenberg/location-uri-schema-fix 2023-05-25 10:45:48 -07:00
Andrew Eisenberg
42add7b4d7 Update changelog 2023-05-25 10:21:47 -07:00
Andrew Eisenberg
9c5706e1a2 Avoid throwing validation error on invalid URIs
The recent update of jsonschema inadvertently caused extra validation of
`uri-reference` formatted properties. This change ensures that these
errors are converted to warnings.

Note that we cannot revert the change to jsonschema since the old
version does not handle `uniqueItems` correctly.
2023-05-25 10:18:12 -07:00
Henry Mercer
3912995667 Merge pull request #1704 from github/henrymercer/contributions-updates
Contributing documentation updates
2023-05-25 17:33:19 +01:00
Henry Mercer
8d7f61b8f2 Update npm version 2023-05-25 17:06:08 +01:00
Henry Mercer
50bc388cfc Update Node version 2023-05-25 17:04:40 +01:00
Henry Mercer
4a409ace8f Link to CONTRIBUTING doc from README 2023-05-25 17:03:48 +01:00
Henry Mercer
41499f5466 Merge pull request #1702 from github/henrymercer/update-github-actions-email
Fix GitHub Actions email
2023-05-25 16:19:18 +01:00
Henry Mercer
1023a086ae Merge pull request #1694 from jsoref/fixes
Fix running tests on forks, and handle invalid URIs when fingerprinting
2023-05-25 15:41:27 +01:00
Josh Soref
cc5f2fb439 Gracefully handle decodeURIComponent failure 2023-05-25 09:15:55 -04:00
Josh Soref
789f65c9ee Improving handling of uploadFailedSarifResult -> [Object object] 2023-05-25 09:15:55 -04:00
Josh Soref
a5879b7b6e Tolerate forks of github/codeql-action 2023-05-25 09:14:30 -04:00
Henry Mercer
3da4cbfc79 Fix GitHub Actions email 2023-05-25 11:27:13 +01:00
Henry Mercer
5f061ca665 Merge pull request #1697 from github/fixInvalidNotifications-shortcut
Avoid parsing SARIF file when workaround for duplicate notification locations is disabled
2023-05-25 10:45:50 +01:00
Angela P Wen
11ea309db5 Merge pull request #1701 from github/mergeback/v2.3.4-to-main-f0e3dfb3
Mergeback v2.3.4 refs/heads/releases/v2 into main
2023-05-24 16:21:39 -07:00
github-actions[bot]
1319d54f85 Update checked-in dependencies 2023-05-24 22:19:26 +00:00
github-actions[bot]
59d27da76b Update changelog and version after v2.3.4 2023-05-24 22:16:43 +00:00
Angela P Wen
f0e3dfb303 Merge pull request #1700 from github/update-v2.3.4-570734c55
Merge main into releases/v2
2023-05-24 15:14:53 -07:00
Josh Soref
dba4f66682 Grant security-events: write permissions 2023-05-24 18:14:01 -04:00
Josh Soref
8f9b20ba50 Clarify how to update workflows 2023-05-24 18:14:01 -04:00
Angela P Wen
0d65621757 Update CHANGELOG.md 2023-05-24 14:49:16 -07:00
github-actions[bot]
c3ae9dcd15 Update changelog for v2.3.4 2023-05-24 21:41:27 +00:00
Angela P Wen
570734c55c Remove unnecessary conditional for Ruby autodetect (#1699)
We should check language autodetect for Ruby unconditionally. We can now move it into the step that checks all other languages.
2023-05-24 18:33:06 +00:00
Henry Mercer
65920dd33a Unconditionally set up Swift in debug artifacts PR check 2023-05-24 18:28:18 +01:00
Henry Mercer
60f5c59630 Merge branch 'main' into update-bundle/codeql-bundle-20230524 2023-05-24 18:04:09 +01:00
Henry Mercer
0962265901 Merge branch 'main' into fixInvalidNotifications-shortcut 2023-05-24 18:00:28 +01:00
Henry Mercer
143b5fb429 Merge branch 'main' into henrymercer/update-requests 2023-05-24 18:00:08 +01:00
Angela P Wen
8c923c00a3 Fix Swift PR Checks on nightly-latest CLI (#1696) 2023-05-24 17:59:40 +01:00
github-actions[bot]
34e8e09ae4 Add changelog note 2023-05-24 16:01:57 +00:00
github-actions[bot]
4f41ff7fc8 Update default bundle to codeql-bundle-20230524 2023-05-24 16:01:53 +00:00
Stephan Brandauer
636b9eab1d add rebuilt lib 2023-05-24 12:12:27 +00:00
Stephan Brandauer
153cab09da jsdoc for fixInvalidNotificationsInFile 2023-05-24 12:09:28 +00:00
Stephan Brandauer
dddabd0d26 add rebuilt lib 2023-05-24 11:51:57 +00:00
Stephan Brandauer
3100e1e354 move check to calling function
DISABLE_DUPLICATE_LOCATION_FIX - this is to avoid needless crashes on
large sarif files
2023-05-24 11:46:19 +00:00
Henry Mercer
6e92b190d0 Bump requests to 2.31.0 2023-05-23 17:07:30 +01:00
Henry Mercer
292bb7c0b9 Parameterize check scripts over requests version 2023-05-23 17:07:30 +01:00
Henry Mercer
1245696032 Merge pull request #1687 from github/henrymercer/update-changelog-note
Push back semver CodeQL bundles
2023-05-22 17:11:03 +01:00
Henry Mercer
317cd34a7a Push back semver CodeQL bundles
Push back the first bundle released using a semantic version number to 2.13.4 now that we're skipping 2.13.2.
2023-05-22 11:00:25 +01:00
Henry Mercer
6cfb483131 Merge pull request #1682 from github/henrymercer/semver-bundles
Extract semantic CLI version from URL when requesting specific tools
2023-05-18 11:32:45 +01:00
Henry Mercer
a5f4123fb0 Improve changelog note 2023-05-17 18:23:54 +01:00
Henry Mercer
50931b43dd Add changelog note 2023-05-17 14:57:27 +01:00
Henry Mercer
f54f0731d1 Merge branch 'main' into henrymercer/semver-bundles 2023-05-17 14:45:33 +01:00
Henry Mercer
ca6b925548 Merge pull request #1681 from github/henrymercer/remove-redundant-flag
Remove redundant query help version flag
2023-05-16 19:50:47 +01:00
Henry Mercer
d439786b65 Merge branch 'main' into henrymercer/remove-redundant-flag 2023-05-16 19:21:22 +01:00
Henry Mercer
f5159143cd Merge pull request #1680 from github/henrymercer/handle-swift-promotion
Use `resolve extractor` when finding autobuild scripts
2023-05-16 19:19:11 +01:00
Henry Mercer
a1be09ed8a Remove redundant query help version flag 2023-05-16 18:20:13 +01:00
Henry Mercer
2bf10dc4b9 Extract semantic CLI version from URL when requesting specific tools 2023-05-16 14:47:32 +01:00
Henry Mercer
e422b64793 Use resolve extractor when finding autobuild scripts 2023-05-16 11:18:16 +01:00
Henry Mercer
eac5e24aee Downgrade query severity to warning 2023-05-16 11:06:13 +01:00
Rasmus Wriedt Larsen
5489416722 Merge pull request #1676 from github/rasmuswl/python-disable-dependency-installation
Feature flag to disable python dependency installation
2023-05-16 10:40:47 +02:00
Rasmus Wriedt Larsen
dc0f6da426 Update CHANGELOG.md
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-05-15 12:38:10 +02:00
Rasmus Wriedt Larsen
e1cca2565c Generate JS 2023-05-15 12:05:50 +02:00
Rasmus Wriedt Larsen
cf58ef4480 Update wording for CODEQL_PYTHON warning
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-05-15 12:05:03 +02:00
Henry Mercer
8065746a2a Add query to find context variables that may not work with default setup 2023-05-12 19:35:08 +01:00
Henry Mercer
abb267d186 Add query to identify env vars that may not work with default setup 2023-05-12 18:46:31 +01:00
Rasmus Wriedt Larsen
fce87bbc67 Generate JS 2023-05-12 10:00:31 +02:00
Rasmus Wriedt Larsen
cc641561b7 Improve python warning message
The last dot in `=3.11.` is just slightly confusing, so added single
quotes around the environment variable assignments to make it 100% clear
2023-05-12 09:59:20 +02:00
Rasmus Wriedt Larsen
c237da1a2f Fix linting errors 2023-05-12 09:58:30 +02:00
Rasmus Wriedt Larsen
cbc79bf64b Merge branch 'main' into rasmuswl/python-disable-dependency-installation 2023-05-12 09:55:57 +02:00
Rasmus Wriedt Larsen
b8f39fe0f5 Use features properly in setupPythonExtractor 2023-05-12 09:55:22 +02:00
Henry Mercer
9953504776 Use new packaging mechanism for internal queries 2023-05-11 18:43:36 +01:00
Henry Mercer
130884e4e1 Merge pull request #1675 from shaikhul/remove-consts
Remove MismatchedBranches check from code scanning workflow validation
2023-05-11 15:45:33 +01:00
Shaikhul Islam
a0755a79b6 Update CHANGELOG.md
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-05-11 10:22:57 -04:00
Shaikhul Islam
903cb278c5 recompile src 2023-05-11 14:16:34 +00:00
Shaikhul Islam
e5fdcd4a8f Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-05-11 09:29:25 -04:00
Rasmus Wriedt Larsen
eb8a70647a Update CHANGELOG.md 2023-05-11 12:18:29 +02:00
Rasmus Wriedt Larsen
0ccdbf8cd5 Feature flag to disable python dependency installation 2023-05-11 12:14:04 +02:00
Shaikhul Islam
c26fc558ba revert MissingPushHook checks changes 2023-05-10 20:37:56 +00:00
Shaikhul Islam
f8707c9939 update changelog 2023-05-10 15:01:33 +00:00
Shaikhul Islam
699855c048 fix linter issue 2023-05-09 15:05:36 +00:00
Shaikhul Islam
edb138ff88 remove consts MismatchedBranches and MissingPushHook 2023-05-09 14:39:49 +00:00
Andrew Eisenberg
95cfca769b Merge pull request #1673 from github/dependabot/github_actions/peter-evans/create-pull-request-5.0.1
Bump peter-evans/create-pull-request from 5.0.0 to 5.0.1
2023-05-08 12:25:32 -07:00
dependabot[bot]
9c51a58355 Bump peter-evans/create-pull-request from 5.0.0 to 5.0.1
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](5b4a9f6a9e...284f54f989)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 18:00:47 +00:00
Aditya Sharad
deb312c60b Merge pull request #1672 from github/aeisenberg/sarif-again
Fix broken regex
2023-05-05 12:53:12 -07:00
Andrew Eisenberg
9824588133 Fix broken regex
`($i)` is not valid for javascript regexes.
2023-05-05 12:02:19 -07:00
Andrew Eisenberg
11fba50273 Merge pull request #1668 from github/aeisenberg/update-sarif-schema 2023-05-05 09:14:24 -07:00
Andrew Eisenberg
684c4b5c77 Update CHANGELOG.md
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2023-05-05 08:41:11 -07:00
Dave Bartolomeo
1e1aca8165 Merge pull request #1670 from github/mergeback/v2.3.3-to-main-29b1f65c
Mergeback v2.3.3 refs/heads/releases/v2 into main
2023-05-04 15:27:32 -04:00
github-actions[bot]
898fba281b Update checked-in dependencies 2023-05-04 19:02:16 +00:00
github-actions[bot]
913b8b11ad Update changelog and version after v2.3.3 2023-05-04 18:53:44 +00:00
Dave Bartolomeo
29b1f65c5e Merge pull request #1669 from github/update-v2.3.3-318bcc7f8
Merge main into releases/v2
2023-05-04 14:52:14 -04:00
github-actions[bot]
140500d80a Update changelog for v2.3.3 2023-05-04 18:24:50 +00:00
Dave Bartolomeo
318bcc7f84 Merge pull request #1664 from github/update-bundle/codeql-bundle-20230428
Update default bundle to 2.13.1
2023-05-04 00:32:01 -04:00
Dave Bartolomeo
f72bf5dfb3 Fix workflow formatting 2023-05-03 21:43:47 -04:00
Dave Bartolomeo
33461954a5 Merge branch 'main' into update-bundle/codeql-bundle-20230428 2023-05-03 19:02:27 -04:00
Andrew Eisenberg
3df80238a3 Re-run sync.py with new ruamel.yaml 2023-05-02 15:19:05 -07:00
Andrew Eisenberg
ef88842204 Update jsonschema version
Fixes bug in `uniqueItems` property.
2023-05-02 14:26:17 -07:00
Andrew Eisenberg
ece3cbc8ec Update changelog 2023-05-02 13:52:28 -07:00
Andrew Eisenberg
febbadf751 Update the sarif schema file
The version we were using is quite old. Copied the latest from
123e95847b/Schemata/sarif-schema-2.1.0.json

I do not think the sarif spec will be changing any more without
an explicit version update, so this is fine for now.
2023-05-02 13:46:24 -07:00
Andrew Eisenberg
8ca5570701 Merge pull request #1666 from github/aeisenberg/readme-update
Add link to changenote for custom config
2023-05-01 15:07:45 -07:00
Andrew Eisenberg
b1b3d00b62 Add link to changenote for custom config
Also, use a better link in the readme.
2023-05-01 11:06:31 -07:00
Andrew Eisenberg
d2f6dfd52d Merge pull request #1665 from github/aeisenberg/config-param
Add new configuration Parameter
2023-05-01 10:26:31 -07:00
Andrew Eisenberg
cba5616040 Update CHANGELOG.md 2023-05-01 09:21:50 -07:00
github-actions[bot]
40c95932fe Add changelog note 2023-05-01 03:46:54 +00:00
github-actions[bot]
234badad23 Update default bundle to codeql-bundle-20230428 2023-05-01 03:46:50 +00:00
Andrew Eisenberg
824d18c689 Merge remote-tracking branch 'upstream/main' into issue-1589-config-param 2023-04-28 11:34:52 -07:00
Angela P Wen
f31a31c052 Merge pull request #1663 from github/mergeback/v2.3.2-to-main-f3feb00a
Mergeback v2.3.2 refs/heads/releases/v2 into main
2023-04-27 14:00:39 -07:00
github-actions[bot]
e3395de200 Update checked-in dependencies 2023-04-27 18:52:55 +00:00
github-actions[bot]
1cccbfcedc Update changelog and version after v2.3.2 2023-04-27 18:51:28 +00:00
Angela P Wen
f3feb00acb Merge pull request #1662 from github/update-v2.3.2-8b12d99ee
Merge main into releases/v2
2023-04-27 11:49:50 -07:00
github-actions[bot]
1c9e206df3 Update changelog for v2.3.2 2023-04-27 18:18:58 +00:00
Angela P Wen
8b12d99ee5 Fix bug where run attempt was reported as run ID (#1661) 2023-04-27 18:05:34 +00:00
Angela P Wen
dcf71cf79b Merge pull request #1660 from github/mergeback/v2.3.1-to-main-8662eabe
Mergeback v2.3.1 refs/heads/releases/v2 into main
2023-04-26 14:15:40 -07:00
github-actions[bot]
194450bdd6 Update checked-in dependencies 2023-04-26 20:48:31 +00:00
github-actions[bot]
e78ef455a8 Update changelog and version after v2.3.1 2023-04-26 20:44:18 +00:00
Angela P Wen
8662eabe0e Merge pull request #1659 from github/update-v2.3.1-da583b07a
* Update changelog and version after v2.3.0

* Update checked-in dependencies

* Throw full error for CLI bundle download (#1657)

* Add `workload_run_attempt` to analysis upload (#1658)

* Refactor status report upload logic

Previously we had duplicated the logic to check `GITHUB_RUN_ID`. We now call the `getWorkflowRunID()` method for the status report upload method, and move the logic for the run attempt to `getWorkflowRunAttempt()`

* Add `workflow_run_attempt` to analysis payload

* Stop allowing `undefined` run IDs and attempts

Because we already throw an error if the ID or attempt aren't numbers, we don't have to allow `undefined` values into the payload.

* Update changelog for v2.3.1

---------

Co-authored-by: github-actions[bot] <github-actions@github.com>
Co-authored-by: Chuan-kai Lin <cklin@github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-04-26 13:42:37 -07:00
github-actions[bot]
1f2f707d99 Update changelog for v2.3.1 2023-04-26 20:16:15 +00:00
Angela P Wen
da583b07a7 Add workload_run_attempt to analysis upload (#1658)
* Refactor status report upload logic

Previously we had duplicated the logic to check `GITHUB_RUN_ID`. We now call the `getWorkflowRunID()` method for the status report upload method, and move the logic for the run attempt to `getWorkflowRunAttempt()`

* Add `workflow_run_attempt` to analysis payload

* Stop allowing `undefined` run IDs and attempts

Because we already throw an error if the ID or attempt aren't numbers, we don't have to allow `undefined` values into the payload.
2023-04-26 02:13:27 +00:00
Angela P Wen
a9648ea7c6 Throw full error for CLI bundle download (#1657) 2023-04-24 07:46:45 -07:00
Chuan-kai Lin
c5f3f016ae Merge pull request #1656 from github/mergeback/v2.3.0-to-main-b2c19fb9
Mergeback v2.3.0 refs/heads/releases/v2 into main
2023-04-21 12:43:38 -07:00
github-actions[bot]
90f053271e Update checked-in dependencies 2023-04-21 19:12:19 +00:00
github-actions[bot]
0f085f964c Update changelog and version after v2.3.0 2023-04-21 19:09:10 +00:00
Chuan-kai Lin
b2c19fb9a2 Merge pull request #1655 from github/update-v2.3.0-a8affb063
Merge main into releases/v2
2023-04-21 12:07:18 -07:00
github-actions[bot]
b203f98343 Update changelog for v2.3.0 2023-04-21 18:24:50 +00:00
Chuan-kai Lin
a8affb0639 Merge pull request #1649 from github/cklin/codeql-cli-2.13.0
Update default CodeQL bundle version to 2.13.0
2023-04-20 07:39:38 -07:00
Henry Mercer
b8cc643a23 Merge branch 'main' into cklin/codeql-cli-2.13.0 2023-04-20 11:23:25 +01:00
Henry Mercer
7019a9c6fd Merge pull request #1618 from github/henrymercer/remove-legacy-tracing
Remove legacy tracing
2023-04-20 11:22:32 +01:00
Henry Mercer
66f62df188 Merge branch 'main' into henrymercer/remove-legacy-tracing 2023-04-19 15:56:42 +01:00
Henry Mercer
afdf30f311 Merge pull request #1652 from github/henrymercer/fix-bundle-version
Fix the `bundleVersion` field set by the automated bundle update PR
2023-04-18 21:04:26 +01:00
Henry Mercer
55a2e70992 Autoformat index.ts 2023-04-18 18:59:36 +01:00
Henry Mercer
1c2f282107 Fix bundle version
It's the whole tag, we don't want to remove the `codeql-bundle-` prefix.
2023-04-18 18:59:09 +01:00
tgrall
47cec7ab01 add test with config file and input together 2023-04-18 06:01:33 +02:00
tgrall
7b876ae4f4 remove space from json string 2023-04-18 05:46:51 +02:00
tgrall
f398a65921 fix after review from @henrymercer 2023-04-18 05:43:21 +02:00
dependabot[bot]
9a866ed452 Bump swift-actions/setup-swift in /.github/actions/setup-swift (#1650)
Bumps [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](da0e3e04b5...65540b95f5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 19:16:10 +00:00
Chuan-kai Lin
7867d03591 Update default CodeQL bundle version to 2.13.0 2023-04-14 15:28:21 -07:00
Chuan-kai Lin
be2b53b5c7 Merge pull request #1648 from github/cklin/update-bundle-trigger
Fix pre-release trigger for update-bundle action
2023-04-14 15:11:42 -07:00
Chuan-kai Lin
ae24b75fca Fix pre-release trigger for update-bundle action
This PR switches the update-bundle release trigger from `prereleased` to `published` because the former has been documented not to work.

From https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release:

> Note: The prereleased type will not trigger for pre-releases published from draft releases, but the published type will trigger. If you want a workflow to run when stable and pre-releases publish, subscribe to published instead of released and prereleased.
2023-04-14 14:50:37 -07:00
Henry Mercer
dc046388f3 Merge pull request #1647 from github/mergeback/v2.2.12-to-main-7df0ce34
Mergeback v2.2.12 refs/heads/releases/v2 into main
2023-04-13 17:23:16 +01:00
github-actions[bot]
b4fa971e40 Update checked-in dependencies 2023-04-13 15:50:19 +00:00
github-actions[bot]
7879209bb2 Update changelog and version after v2.2.12 2023-04-13 14:03:50 +00:00
Henry Mercer
7df0ce3489 Merge pull request #1646 from github/update-v2.2.12-d944b3423
Merge main into releases/v2
2023-04-13 15:01:19 +01:00
github-actions[bot]
fbedecac34 Update changelog for v2.2.12 2023-04-13 11:35:13 +00:00
Henry Mercer
d944b3423d Merge pull request #1619 from github/henrymercer/default-setup-workflow
Allow workflow to be passed via an environment variable for default setup
2023-04-13 10:17:54 +01:00
Henry Mercer
e3210d8ce3 Add changelog note 2023-04-12 19:18:17 +01:00
Henry Mercer
599f4927f2 Allow passing the workflow via an environment variable 2023-04-12 14:14:43 +01:00
Henry Mercer
ed6c4995fc Merge pull request #1645 from github/henrymercer/remove-dependencies
Remove unused dependencies
2023-04-11 16:27:15 +01:00
Henry Mercer
c2b5d643fd Require xml2js >=0.5.0 to address CVE-2023-0842 2023-04-11 13:33:36 +01:00
Henry Mercer
8a093aa1a5 Merge branch 'main' into henrymercer/remove-legacy-tracing 2023-04-11 12:25:45 +01:00
Henry Mercer
9c13316a15 Remove unused dependencies 2023-04-11 12:17:38 +01:00
Angela P Wen
98f7bbd610 Add workflow_run_attempt data to status report (#1640) 2023-04-10 20:02:23 +00:00
dependabot[bot]
d7b9dcdb85 Bump peter-evans/create-pull-request from 4.2.4 to 5.0.0 (#1643)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4.2.4 to 5.0.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](38e0b6e68b...5b4a9f6a9e)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 11:27:05 -07:00
tgrall
fc374f5e9a remove the documentation about workflow parameters 2023-04-10 07:59:26 +02:00
tgrall
b4e6f81a72 resolve comments from @henrymercer 2023-04-10 07:56:09 +02:00
Tugdual Grall
0b75f471b1 Update CHANGELOG.md : during PR Review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-04-10 07:38:51 +02:00
Tugdual Grall
c9f360d9af Update README.md : during PR Review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-04-10 07:38:31 +02:00
Tugdual Grall
d2950c11f0 Update README.md : during PR Review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-04-10 07:37:52 +02:00
Tugdual Grall
a9fb7d923c Update init/action.yml : PR review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-04-10 07:37:20 +02:00
Tugdual Grall
696504dcab Accept change in PR
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-04-10 07:35:57 +02:00
Tugdual Grall
18f13455eb Merge branch 'main' into issue-1589-config-param 2023-04-10 07:33:09 +02:00
Henry Mercer
988e1bc941 Merge pull request #1639 from github/mergeback/v2.2.11-to-main-d186a2a3
Mergeback v2.2.11 refs/heads/releases/v2 into main
2023-04-06 19:20:52 +01:00
github-actions[bot]
e12fed6a79 Update checked-in dependencies 2023-04-06 17:58:48 +00:00
github-actions[bot]
ca89579b06 Update changelog and version after v2.2.11 2023-04-06 17:31:29 +00:00
Henry Mercer
d186a2a36c Merge pull request #1638 from github/update-v2.2.11-518b24fea
Merge main into releases/v2
2023-04-06 18:29:23 +01:00
github-actions[bot]
748f83eaab Update changelog for v2.2.11 2023-04-06 17:08:10 +00:00
Henry Mercer
518b24fea4 Merge pull request #1637 from github/henrymercer/fix-init-exception-reporting
Report exceptions to telemetry in init Action
2023-04-06 17:57:29 +01:00
Henry Mercer
69371ffa95 Merge branch 'main' into henrymercer/fix-init-exception-reporting 2023-04-06 17:05:02 +01:00
Henry Mercer
e5c2f32a9f Consistently wrap errors 2023-04-06 17:04:21 +01:00
Henry Mercer
c28edf06a1 Merge pull request #1636 from github/henrymercer/re-enable-duplicate-sarif-workaround
Re-enable duplicate SARIF notification location workaround
2023-04-06 16:45:06 +01:00
Henry Mercer
555b602b2f Report exceptions to telemetry in init Action 2023-04-06 15:08:48 +01:00
Henry Mercer
7193623f40 Re-enable duplicate SARIF notification location workaround 2023-04-06 14:48:04 +01:00
Henry Mercer
2058418de9 Don't expect Swift baseline info on Windows 2023-04-05 20:41:23 +01:00
Henry Mercer
5da64f56c0 Set up Swift in unset environment workflow 2023-04-05 20:27:02 +01:00
Henry Mercer
322cea6439 Set up Swift in local bundle workflow 2023-04-05 19:31:20 +01:00
Henry Mercer
f7a67e4341 Merge branch 'main' into henrymercer/remove-legacy-tracing 2023-04-05 18:39:27 +01:00
Alexander Eyers-Taylor
f32426ba96 Merge pull request #1635 from github/mergeback/v2.2.10-to-main-8c8d71dd
Mergeback v2.2.10 refs/heads/releases/v2 into main
2023-04-05 18:13:33 +01:00
github-actions[bot]
173a94ca3f Update checked-in dependencies 2023-04-05 16:53:56 +00:00
github-actions[bot]
8efbd5b301 Update changelog and version after v2.2.10 2023-04-05 16:15:52 +00:00
Alexander Eyers-Taylor
8c8d71dde4 Merge pull request #1634 from github/update-v2.2.10-66aeadb4c
Merge main into releases/v2
2023-04-05 17:13:56 +01:00
github-actions[bot]
d53297ef61 Update changelog for v2.2.10 2023-04-05 15:35:01 +00:00
Henry Mercer
66aeadb4c9 Merge pull request #1631 from github/henrymercer/duplicate-diagnostics-fixed-in-cli
Skip the SARIF notification object workaround for CLIs that have fixed this bug
2023-04-05 10:46:12 +01:00
Andrew Eisenberg
fa7cce4d4b Merge pull request #1632 from github/aeisenberg/codeql-testing-org
Move to the codeql-testing org
2023-04-04 14:38:19 -07:00
Andrew Eisenberg
2754e10472 Move to the codeql-testing org
Refer to the packages in codeql-testing, not in dsp-testing.
2023-04-04 13:39:56 -07:00
Henry Mercer
3bba073180 Skip the SARIF notification object workaround for fixed CLIs 2023-04-04 18:19:05 +01:00
Alexander Eyers-Taylor
ae0109a777 Merge pull request #1629 from github/alexet/update-2.12.6-2
Update default CodeQL bundle version to 2.12.6
2023-04-04 16:32:13 +01:00
Alexander Eyers-Taylor
9c869ebf0d Update default CodeQL bundle version to 2.12.6 2023-04-04 16:01:04 +01:00
Henry Mercer
f0a422fa27 Merge pull request #1630 from github/henrymercer/automate-bundle-upgrade
Automate the bundle upgrade
2023-04-03 20:07:03 +01:00
Henry Mercer
98173be3f0 Add a comment about lib/defaults.json 2023-04-03 19:39:22 +01:00
Henry Mercer
f6091a09eb Use tee when setting env vars to improve debugging 2023-04-03 19:34:20 +01:00
Henry Mercer
a86046f817 Explain CLI version marker files 2023-04-03 19:32:03 +01:00
Henry Mercer
33f30874a7 Format .github/actions/update-bundle/index.ts 2023-04-03 19:30:07 +01:00
Henry Mercer
1c0a788663 Add workflow to automatically update the bundle 2023-04-03 19:10:01 +01:00
Henry Mercer
e85546ccca Move internal Actions into .github/actions
This is a more standard location for these custom Actions.
2023-04-03 18:29:29 +01:00
tgrall
fe4a785361 rename new parameter from configuration to config 2023-04-01 07:13:01 +02:00
Henry Mercer
bb28e7e59e Merge pull request #1626 from github/henrymercer/diagnostics-ghes
Enable diagnostics functionality on GHES
2023-03-30 10:22:39 +01:00
Henry Mercer
69aec345f1 Pass negative SARIF include diagnostics flag when feature is disabled
In preparation for enabling this flag by default in the CLI
2023-03-29 18:56:19 +01:00
Henry Mercer
29a4713933 Enable diagnostics functionality on GHES 2023-03-29 18:45:27 +01:00
Henry Mercer
d838bacfbe Simplify matrix 2023-03-29 15:48:13 +01:00
Robin Neatherway
dc81ae3368 Merge pull request #1625 from github/rneatherway/rm-old-checks
Remove checks for triggering on specific paths
2023-03-29 13:28:57 +01:00
Henry Mercer
72d018e267 Improve serialization of Swift environment variable if expression 2023-03-29 13:15:59 +01:00
Henry Mercer
9975b733f4 Fix bundle version comments 2023-03-29 13:03:45 +01:00
Henry Mercer
6cd5121600 Merge branch 'main' into henrymercer/remove-legacy-tracing 2023-03-29 13:03:14 +01:00
Robin Neatherway
f6e4cff38a Remove checks for triggering on specific paths
These are no longer necessary with the new approach to selecting
alerts to show on pull requests.
2023-03-29 11:02:16 +02:00
Henry Mercer
fff3a80b5b Merge pull request #1620 from github/henrymercer/disable-flaky-check
Disable flaky Swift autobuild checks
2023-03-28 21:01:11 +01:00
Henry Mercer
ff39eb8d6a Disable flaky Swift autobuild checks 2023-03-28 20:40:23 +01:00
Henry Mercer
6ef37003ca Update CodeQL releases used in PR checks 2023-03-28 20:07:09 +01:00
Henry Mercer
d13d683355 Bump minor version number and add changelog note 2023-03-28 18:53:47 +01:00
Henry Mercer
d8fe76e161 Delete legacy tracing 2023-03-28 18:53:43 +01:00
Henry Mercer
4772c1d99f Bump minimum version to 2.8.5 2023-03-28 17:24:45 +01:00
Andrew Eisenberg
f9c159f4fd Merge pull request #1613 from github/aeisenberg/codeql-testing
Use new location for external queries
2023-03-27 17:35:01 -07:00
Andrew Eisenberg
0af0653ef4 Use new location for external queries
They have moved from `dsp-testing` to `codeql-testing`.
2023-03-27 16:11:45 -07:00
Henry Mercer
bc0ed6a6c3 Merge pull request #1610 from github/henrymercer/diagnostics-workaround-improvements
Follow-up improvements to the diagnostics workaround
2023-03-27 17:12:07 +01:00
Henry Mercer
b0e191ecbc Merge pull request #1609 from github/mergeback/v2.2.9-to-main-04df1262
Mergeback v2.2.9 refs/heads/releases/v2 into main
2023-03-27 16:42:07 +01:00
Henry Mercer
57eca7cbb2 Use Array.isArray 2023-03-27 15:59:29 +01:00
Henry Mercer
1e7a38893c Wrap reading and writing SARIF files 2023-03-27 15:44:47 +01:00
github-actions[bot]
2deae45400 Update checked-in dependencies 2023-03-27 14:03:17 +00:00
github-actions[bot]
32daed70e7 Update changelog and version after v2.2.9 2023-03-27 13:41:15 +00:00
Henry Mercer
04df1262e6 Merge pull request #1608 from github/update-v2.2.9-fb32c3fef
Merge main into releases/v2
2023-03-27 14:36:30 +01:00
Henry Mercer
f0988cbd79 Move changelog note to correct section 2023-03-27 11:57:26 +01:00
github-actions[bot]
fef20d6c35 Update changelog for v2.2.9 2023-03-27 10:53:14 +00:00
Henry Mercer
fb32c3fefd Merge pull request #1605 from github/henrymercer/diagnostics-grouping-workaround
Work around duplicate locations bug in diagnostics export
2023-03-27 11:43:33 +01:00
Henry Mercer
329c022f48 Just check the number of locations
Only tests the property we are looking for and avoids problems with
different cross-platform behavior.
2023-03-24 21:50:26 +00:00
Henry Mercer
c8935d5a9d Remove duplicate locations from failed run SARIF 2023-03-24 20:30:57 +00:00
Henry Mercer
ade432fd68 Remove duplicate locations from output of database interpret-results 2023-03-24 20:30:57 +00:00
Henry Mercer
6f852eeb38 Implement removing duplicate locations from a SARIF file 2023-03-24 20:30:57 +00:00
Henry Mercer
097ab4665f Speed up checks a bit by just running the standard suite 2023-03-24 20:30:57 +00:00
Henry Mercer
befd804b8b Extend diagnostics export integration test to capture location bug 2023-03-24 19:48:36 +00:00
Angela P Wen
a21bb7f968 Update upload input values and logic (#1598)
- The `upload` input to the `analyze` Action now accepts the following values:
    - `always` is the default value, which uploads the SARIF file to Code Scanning for successful and failed runs.
    - `failure-only` is recommended for customers post-processing the SARIF file before uploading it to Code Scanning. This option uploads debugging information to Code Scanning for failed runs to improve the debugging experience.
    - `never` avoids uploading the SARIF file to Code Scanning even if the code scanning run fails. This is not recommended for external users since it complicates debugging.
    - The legacy `true` and `false` options will be interpreted as `always` and `failure-only` respectively.

---------

Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-03-23 17:23:25 +00:00
Charis Kyriakou
0214d1d378 Merge pull request #1603 from github/charisk/default-branch-analayzing-override
Add override for code scanning analysis of default branch
2023-03-23 14:21:05 +00:00
Charis Kyriakou
94cc1dea00 Add override for code scanning analysis of default branch 2023-03-23 13:31:00 +00:00
Henry Mercer
04f256d7e2 Merge pull request #1602 from github/mergeback/v2.2.8-to-main-67a35a08
Mergeback v2.2.8 refs/heads/releases/v2 into main
2023-03-22 19:48:28 +00:00
github-actions[bot]
0b08c9f2ff Update checked-in dependencies 2023-03-22 19:14:19 +00:00
github-actions[bot]
1196b1ac0c Update changelog and version after v2.2.8 2023-03-22 19:04:40 +00:00
Henry Mercer
67a35a0858 Merge pull request #1601 from github/update-v2.2.8-066b6343e
Merge main into releases/v2
2023-03-22 19:02:35 +00:00
github-actions[bot]
57571ab0cd Update changelog for v2.2.8 2023-03-22 18:32:36 +00:00
Henry Mercer
066b6343ef Merge pull request #1599 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2023-03-22 18:26:37 +00:00
Robin Neatherway
aefd9896b1 Merge pull request #1597 from github/rneatherway/ghe-dotcom
Account for versioning of ghe.com
2023-03-22 17:21:10 +00:00
Robin Neatherway
3ca2260643 Account for versioning of ghe.com 2023-03-22 16:47:23 +00:00
GitHub
5f20b2c372 Update supported GitHub Enterprise Server versions. 2023-03-22 00:10:22 +00:00
Angela P Wen
760583e70d Bump setup-go from v3 to v4 (#1595)
* Bump actions/setup-go from 3 to 4

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

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

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

* Update autogenerated workflows

* Bump setup-go from v3 to v4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 10:22:27 -07:00
Henry Mercer
0ef7eda548 Merge pull request #1585 from github/henrymercer/bundle-2.12.5
Update default bundle version to 2.12.5
2023-03-21 14:59:16 +00:00
Henry Mercer
86128131fa Merge branch 'main' into henrymercer/bundle-2.12.5 2023-03-21 12:18:07 +00:00
Henry Mercer
ebbe965b43 Merge pull request #1588 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2023-03-21 00:04:32 +00:00
Angela P Wen
3cbd063679 Upload per-database diagnostic SARIFs on green and red runs (#1556)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-03-20 21:09:04 +00:00
dependabot[bot]
b4fba292aa Bump typescript from 4.9.4 to 5.0.2 (#1592)
* Bump typescript from 4.9.4 to 5.0.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 5.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.4...v5.0.2)

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

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

* Update checked-in dependencies

* Bump @typescript-eslint/parser for TS 5 compat

---------

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] <github-actions@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
2023-03-20 13:32:50 -07:00
dependabot[bot]
b55762b0a6 Bump actions/setup-go from 3 to 4 (#1593)
* Bump actions/setup-go from 3 to 4

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

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

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

* Update autogenerated workflows

---------

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-03-20 13:31:56 -07:00
dependabot[bot]
91fb7b5c11 Bump peter-evans/create-pull-request from 4.2.3 to 4.2.4 (#1594)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](2b011faafd...38e0b6e68b)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 11:57:08 -07:00
Tugdual Grall
34231cfd52 fix CI failure - check js 2023-03-18 16:51:49 +00:00
Tugdual Grall
f1fb80a041 Update README.md 2023-03-18 16:17:44 +01:00
Tugdual Grall
f81f52702f Update README.md - typo 2023-03-18 16:17:16 +01:00
Tugdual Grall
2f141340f0 fix linter issues 2023-03-18 15:14:34 +00:00
Tugdual Grall
94786b354b update changelog 2023-03-18 13:48:45 +00:00
Tugdual Grall
ee44252240 - Add new configuration Parameter
- Write test to check it is read from configuration
- Update documentation
2023-03-18 13:40:54 +00:00
GitHub
978bc50f9b Update supported GitHub Enterprise Server versions. 2023-03-18 00:11:16 +00:00
Henry Mercer
fb75ebd750 Merge pull request #1586 from github/henrymercer/enterprise-releases-ignore-classic-version
Ignore classic GHES version when updating supported versions
2023-03-17 18:03:36 +00:00
Henry Mercer
a2527628e8 Add a workflow_dispatch trigger 2023-03-17 13:54:10 +00:00
Henry Mercer
16b3d998b4 Ignore classic GHES version when updating supported versions 2023-03-17 13:53:24 +00:00
Henry Mercer
98a90dcce7 Update default bundle version to 2.12.5 2023-03-17 13:42:17 +00:00
Henry Mercer
d23060145b Merge pull request #1582 from github/mergeback/v2.2.7-to-main-168b99b3
Mergeback v2.2.7 refs/heads/releases/v2 into main
2023-03-15 12:15:14 +00:00
github-actions[bot]
bd8fec7f9f Update checked-in dependencies 2023-03-15 11:51:19 +00:00
github-actions[bot]
6a8522e57e Update changelog and version after v2.2.7 2023-03-15 11:44:17 +00:00
Henry Mercer
168b99b3c2 Merge pull request #1581 from github/update-v2.2.7-433fe88bf
Merge main into releases/v2
2023-03-15 11:42:20 +00:00
github-actions[bot]
bc7318da91 Update changelog for v2.2.7 2023-03-15 10:39:32 +00:00
Andrew Eisenberg
433fe88bf3 Merge pull request #1579 from github/aeisenberg/no-upload-database
Avoid uploading databases after integration tests
2023-03-14 15:39:16 -07:00
Andrew Eisenberg
c208575433 Avoid uploading databases after integration tests
We are still getting coverage of the upload capability through the
standard codeql analysis workflow.
2023-03-14 14:55:58 -07:00
Henry Mercer
b8ea587211 Merge pull request #1578 from github/henrymercer/fix-circular-dependency
Fix a circular dependency that led a minimum version to be `undefined`
2023-03-14 21:31:47 +00:00
Henry Mercer
65f42e3768 Inline minimum version number to avoid circular dependency 2023-03-14 21:04:34 +00:00
Henry Mercer
d9ceda3823 Add debug logging for feature flag enablement 2023-03-14 20:57:55 +00:00
dependabot[bot]
19f00dc212 Bump @ava/typescript from 3.0.1 to 4.0.0 (#1576)
* Bump @ava/typescript from 3.0.1 to 4.0.0

Bumps [@ava/typescript](https://github.com/avajs/typescript) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/avajs/typescript/releases)
- [Commits](https://github.com/avajs/typescript/compare/v3.0.1...v4.0.0)

---
updated-dependencies:
- dependency-name: "@ava/typescript"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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] <github-actions@github.com>
2023-03-13 14:10:40 -07:00
Henry Mercer
ec298233c1 Merge pull request #1565 from github/henrymercer/diagnostics-code-scanning-config
Export configuration information to SARIF
2023-03-13 16:44:23 +00:00
Henry Mercer
a92a14621b Prefer core.info to console.log 2023-03-13 12:45:15 +00:00
Dave Bartolomeo
204eadab9d Merge pull request #1571 from github/mergeback/v2.2.6-to-main-16964e90
Mergeback v2.2.6 refs/heads/releases/v2 into main
2023-03-12 10:03:48 -04:00
github-actions[bot]
0e50a19ce3 Update checked-in dependencies 2023-03-12 13:39:54 +00:00
github-actions[bot]
4775eab92e Update changelog and version after v2.2.6 2023-03-10 18:11:39 +00:00
Dave Bartolomeo
16964e90ba Merge pull request #1570 from github/update-v2.2.6-e12a2ecd4
Merge main into releases/v2
2023-03-10 13:08:52 -05:00
github-actions[bot]
74cbab4958 Update changelog for v2.2.6 2023-03-10 15:48:11 +00:00
Henry Mercer
b36480d849 Specify SARIF path via env variable 2023-03-09 19:24:49 +00:00
Henry Mercer
53f80edaf6 Merge branch 'main' into henrymercer/diagnostics-code-scanning-config 2023-03-09 18:47:43 +00:00
Henry Mercer
b31d983f22 Add PR check 2023-03-09 18:37:44 +00:00
Henry Mercer
485cc11a24 Rename featureEnablement to features
This is more succinct and removes a few line breaks
2023-03-09 16:46:51 +00:00
Henry Mercer
fc1366f6ec Gate config export behind a feature flag 2023-03-09 16:44:45 +00:00
Dave Bartolomeo
e12a2ecd45 Merge pull request #1561 from github/dbartol/bundle-2.12.4
Update bundle to 2.12.4
2023-03-09 10:22:39 -05:00
Dave Bartolomeo
d47d4c8047 Merge branch 'main' into dbartol/bundle-2.12.4 2023-03-09 09:45:34 -05:00
Andrew Eisenberg
f13b180fb8 Merge pull request #1567 from github/aeisenberg/config-parsing-ghes
Add default values to feature flags
2023-03-08 09:44:44 -08:00
Angela P Wen
a3cf96418e Add security-experimental to codeql-config.yml (#1566) 2023-03-08 08:39:00 -08:00
Andrew Eisenberg
0c27d0da4a Add default values to feature flags
This changes adds default values to feature flags. These default values
will be used whenever the full set of feature flags are not available
(for example on GHES or if the flag request fails).

The goal is to enable cli config parsing on GHES without removing the
feature flag on dotcom.
2023-03-07 16:24:55 -08:00
Henry Mercer
4b1f530308 Export configuration information for green runs 2023-03-07 21:22:43 +00:00
Henry Mercer
d98eadb536 Export configuration information for red runs 2023-03-07 21:21:47 +00:00
Andrew Eisenberg
e4b846c482 Merge pull request #1564 from github/aeisenberg/qlconfig-file
Fix --qlconfig-file option
2023-03-07 13:15:20 -08:00
Henry Mercer
c310f094dd Fix name of qlconfig file argument 2023-03-07 08:46:58 -08:00
Henry Mercer
4366485427 Avoid passing an undefined qlconfig arg 2023-03-07 08:46:57 -08:00
Henry Mercer
8340258886 Avoid writing user-config.yaml file while running tests 2023-03-07 08:46:57 -08:00
Henry Mercer
6ef6e50882 Merge pull request #1563 from github/dependabot/npm_and_yarn/glob-9.2.1
Bump glob from 8.0.1 to 9.2.1
2023-03-06 17:02:10 +00:00
Henry Mercer
eb40427b00 Fix name of qlconfig file argument 2023-03-06 10:48:14 +00:00
github-actions[bot]
7806af3040 Update checked-in dependencies 2023-03-06 10:44:50 +00:00
dependabot[bot]
abf1cea835 Bump glob from 8.0.1 to 9.2.1
Bumps [glob](https://github.com/isaacs/node-glob) from 8.0.1 to 9.2.1.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v8.0.1...v9.2.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 10:36:27 +00:00
Henry Mercer
e5ade42937 Merge branch 'main' into dbartol/bundle-2.12.4 2023-03-06 10:33:06 +00:00
Angela P Wen
6f079be771 Bump setup-swift and re-configure dependabot (#1560)
* Update `setup-swift` to v1.22.0

* Configure dependabot to scan `setup-swift` dir

* Add reminder to manually update the SHA in CLI test

* Add comment on new Dependabot directory
2023-03-06 10:32:10 +00:00
Henry Mercer
100bd7bbef Avoid passing an undefined qlconfig arg 2023-03-06 10:26:34 +00:00
Henry Mercer
a6d3a44519 Avoid writing user-config.yaml file while running tests 2023-03-06 10:23:28 +00:00
Dave Bartolomeo
5e4af3a25d Update bundle to 2.12.4 2023-03-05 20:52:06 -05:00
Dave Bartolomeo
e812e63bb6 Update bundle to 2.12.4 2023-03-05 20:50:59 -05:00
Andrew Eisenberg
a589d4087e Merge pull request #1527 from github/aeisenberg/qlconfig-in-cli
Ensure qlconfig file is created when config parsing in cli is on
2023-02-27 10:26:08 -08:00
Andrew Eisenberg
98d24e5629 Address comments from PR 2023-02-27 09:59:16 -08:00
Henry Mercer
903be79953 Merge pull request #1548 from github/mergeback/v2.2.5-to-main-32dc4993
Mergeback v2.2.5 refs/heads/releases/v2 into main
2023-02-27 11:02:00 +00:00
github-actions[bot]
18ff14b615 Update checked-in dependencies 2023-02-27 09:35:51 +00:00
Henry Mercer
36a249f5ae Merge branch 'main' into mergeback/v2.2.5-to-main-32dc4993 2023-02-27 09:33:05 +00:00
Henry Mercer
041757fc59 Merge pull request #1549 from github/henrymercer/fix-update-dependencies
Fix workflow to update dependencies
2023-02-27 09:11:46 +00:00
Andrew Eisenberg
8f19113f88 Merge branch 'main' into aeisenberg/qlconfig-in-cli 2023-02-26 18:35:21 -08:00
Henry Mercer
cf1855ae37 Fix workflow to update dependencies
Port over the fix from
https://github.com/github/codeql-action/pull/1544
and share code so these scripts don't get out of sync again.
2023-02-24 20:25:21 +00:00
github-actions[bot]
652709d1b9 Update changelog and version after v2.2.5 2023-02-24 19:28:26 +00:00
Henry Mercer
32dc499307 Merge pull request #1547 from github/update-v2.2.5-237a258d2
Merge main into releases/v2
2023-02-24 19:26:08 +00:00
github-actions[bot]
b742728ac2 Update changelog for v2.2.5 2023-02-24 19:01:14 +00:00
Alexander Eyers-Taylor
237a258d2b Merge pull request #1543 from github/alexet/update-2.12.3
Update default CodeQL bundle version to 2.12.3
2023-02-23 15:46:39 +00:00
Alexander Eyers-Taylor
5972e6d72e Fix lib file 2023-02-22 18:38:46 +00:00
Alexander Eyers-Taylor
164027e682 Fix bundle versions 2023-02-22 18:18:37 +00:00
Andrew Eisenberg
736263f8fe Update src/codeql.ts 2023-02-17 13:22:25 -08:00
Chuan-kai Lin
3dde1f3512 Merge pull request #1540 from cklin/expect-discarded-cache
Set --expect-discarded-cache option
2023-02-17 12:36:05 -08:00
Chuan-kai Lin
d7d7567b0e Unit tests for optimizeForLastQueryRun 2023-02-17 11:19:38 -08:00
Chuan-kai Lin
0e4e857bab Set optimizeForLastQueryRun on last run 2023-02-17 11:17:42 -08:00
Chuan-kai Lin
08d1f21d4f Calculate customQueryIndices early
This refactoring commit changes runQueries() to calculate the set of
indices with non-empty custom queries early. Doing so allows us to check
early on whether there are any custom queries to run.
2023-02-17 11:14:08 -08:00
Andrew Eisenberg
f3bd25eefa Merge pull request #1544 from github/aeisenberg/clean-cache
Clean the npm cache before running install
2023-02-17 10:50:03 -08:00
Andrew Eisenberg
41f1810e52 Clean the npm cache before running install 2023-02-17 09:54:53 -08:00
Alexander Eyers-Taylor
d87ad69338 Update default CodeQL bundle version to 2.12.3 2023-02-17 15:49:39 +00:00
Chuan-kai Lin
8242edb8ed databaseRunQueries(): add optimizeForLastQueryRun parameter 2023-02-15 08:45:13 -08:00
Chuan-kai Lin
3095a09bb0 databaseRunQueries(): accept a list of flags
This refactoring commit changes databaseRunQueries() to accept a list of
flags instead of separate memory and threads flags.
2023-02-14 11:53:52 -08:00
Andrew Eisenberg
e00cd12e3e Merge pull request #1539 from github/aeisenberg/unref-delay
Avoid unref-ing timer while awaiting status upload
2023-02-13 15:24:43 -08:00
Angela P Wen
a25536bc80 Optionally send tools download telemetry (#1538) 2023-02-13 21:45:54 +00:00
Andrew Eisenberg
a2487fb969 Avoid unref-ing timer while awaiting status upload
We had a problem where `waitForProcessing` was not completing before
the node process ends. This is because using `unref` would allow the
node process to end without having the `delay` function complete.
2023-02-13 13:43:18 -08:00
Chuan-kai Lin
e187d074ed Merge pull request #1533 from cklin/trap-caching-feature-flag
Remove TRAP caching feature flag
2023-02-13 06:25:11 -08:00
Angela P Wen
89c5165e5a Remove v1 from release docs (#1536) 2023-02-10 12:40:45 -08:00
Angela P Wen
ba216f7d34 Merge pull request #1535 from github/mergeback/v2.2.4-to-main-17573ee1
Mergeback v2.2.4 refs/heads/releases/v2 into main
2023-02-10 10:57:09 -08:00
github-actions[bot]
68f4f0d3bb Update checked-in dependencies 2023-02-10 18:30:00 +00:00
github-actions[bot]
12d9a244fa Update changelog and version after v2.2.4 2023-02-10 18:23:25 +00:00
Angela P Wen
17573ee1cc Merge pull request #1534 from github/update-v2.2.4-40babc141
Merge main into releases/v2
2023-02-10 10:20:44 -08:00
github-actions[bot]
b6975b4b1a Update changelog for v2.2.4 2023-02-10 17:42:05 +00:00
Chuan-kai Lin
b011dbdedf Remove TRAP caching feature flag 2023-02-10 09:27:16 -08:00
Angela P Wen
40babc141f Tools telemetry: accurately report when feature flags were inaccessible (#1532)
* Cache whether feature flags are accessible

* Small comment fixup from linting change
2023-02-10 09:06:43 -08:00
Andrew Eisenberg
5492b7d104 Add tests for generateRegistries with an existing CODEQL_REGISTRIES_AUTH 2023-02-09 13:37:08 -08:00
Andrew Eisenberg
3c81243bb1 Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-02-09 12:25:33 -08:00
Andrew Eisenberg
e2f72f11e4 Merge remote-tracking branch 'upstream/main' into aeisenberg/qlconfig-in-cli 2023-02-09 09:47:43 -08:00
Chuan-kai Lin
7ba5ed7eed Merge pull request #1531 from github/mergeback/v2.2.3-to-main-8775e868
Mergeback v2.2.3 refs/heads/releases/v2 into main
2023-02-08 13:06:40 -08:00
github-actions[bot]
21f3020df6 Update checked-in dependencies 2023-02-08 20:40:37 +00:00
github-actions[bot]
b872c5adfd Update changelog and version after v2.2.3 2023-02-08 20:37:07 +00:00
Chuan-kai Lin
8775e86802 Merge pull request #1530 from github/update-v2.2.3-c4e22e9fc
Merge main into releases/v2
2023-02-08 12:35:06 -08:00
github-actions[bot]
a2ad80b966 Update changelog for v2.2.3 2023-02-08 19:08:32 +00:00
Henry Mercer
c4e22e9fce Merge pull request #1529 from github/henrymercer/remove-bypass-toolcache-flags
Remove feature flags for bypassing the toolcache
2023-02-08 18:13:01 +00:00
Henry Mercer
db534af2ae Remove feature flags for bypassing the toolcache
- We can now use the default bundle version feature flags to remediate a
bad bundle update.
- Controlled switchover ensures that a repo consistently gets the same
bundle version, so we no longer have alert churn concerns with Kotlin
and Swift.
2023-02-08 15:20:51 +00:00
Andrew Eisenberg
bbe8d375fd Ensure qlconfig file is created when config parsing in cli is on
Previously, with the config parsing in the cli feature flag turned on,
the CLI was not able to download packs from other registries. This PR
adds the codeql-action changes required for this. The CLI changes will
be in a separate, internal PR.
2023-02-07 10:40:56 -08:00
Chuan-kai Lin
4369dda4ae Merge pull request #1518 from github/cklin/codeql-cli-2.12.2
Bump default CodeQL version to 2.12.2
2023-02-07 10:27:54 -08:00
Chuan-kai Lin
4f08c2cf20 Bump default CodeQL version to 2.12.2 2023-02-07 08:10:01 -08:00
Angela P Wen
81644f35ff Add max line length of 120 to linter (#1524) 2023-02-07 14:09:33 +00:00
Henry Mercer
9ab6aa64a0 Merge pull request #1526 from github/mergeback/v2.2.2-to-main-39d8d7e7
Mergeback v2.2.2 refs/heads/releases/v2 into main
2023-02-06 20:23:48 +00:00
github-actions[bot]
256973e279 Update checked-in dependencies 2023-02-06 20:02:57 +00:00
github-actions[bot]
59b25b480f Update changelog and version after v2.2.2 2023-02-06 19:48:14 +00:00
Henry Mercer
39d8d7e78f Merge pull request #1525 from github/update-v2.2.2-927de483f
Merge main into releases/v2
2023-02-06 19:46:06 +00:00
Angela P Wen
39c954c513 Support security-experimental as a well-known suite (#1519) 2023-02-06 19:26:03 +00:00
github-actions[bot]
8af83634ca Update changelog for v2.2.2 2023-02-06 19:16:08 +00:00
Henry Mercer
927de483f0 Merge pull request #1523 from github/henrymercer/fix/cli-version-for-different-bundles
Fix toolcache behavior when downloading bundle from another repo
2023-02-06 19:05:45 +00:00
Henry Mercer
e4c0a1b24d Merge branch 'main' into henrymercer/fix/cli-version-for-different-bundles 2023-02-06 18:24:11 +00:00
Henry Mercer
d3962273b3 Merge pull request #1517 from github/henrymercer/fix/not-all-bundle-urls-contain-tag
Fix assumption that all CodeQL bundle URLs contain the tag name of the bundle
2023-02-06 18:20:21 +00:00
Henry Mercer
c3cb270725 Merge pull request #1521 from MahmoudMabrok/patch-1
docs: add direct link to website
2023-02-06 16:34:01 +00:00
Henry Mercer
2b674f7ab9 Fix toolcache behavior when downloading bundle from another repo 2023-02-06 16:25:07 +00:00
Henry Mercer
6d47a7c8b1 Add regression test for bundle from different repo 2023-02-06 16:25:07 +00:00
Henry Mercer
c6ff11c1c4 Add changelog note 2023-02-06 16:24:25 +00:00
Henry Mercer
d3f2b2e6d2 Warn when multiple bundles for a single CLI are found in the toolcache 2023-02-06 12:28:33 +00:00
Henry Mercer
d49282c3b5 Rename forceLatest to forceShippedTools 2023-02-06 11:57:48 +00:00
Mahmoud Mabrok Fouad
c5c475188a docs: add direct link to website
To make it easy for users to go to website for more info.
2023-02-05 13:56:35 +02:00
Henry Mercer
f140af5e28 Refactor setting up CodeQL to handle bundle URLs without tags 2023-02-03 19:15:06 +00:00
Henry Mercer
e0fc1c91b2 Add regression test for a bundle URL without a tag 2023-02-03 19:13:24 +00:00
Arthur Baars
b95df0b2e7 Merge pull request #1516 from aibaars/auth-parameter
Supply authorization parameter to toolcache.downloadTool()
2023-02-03 20:02:59 +01:00
Arthur Baars
2fed02cbe2 Supply authorization parameter to toolcache.downloadTool()
Previously we supplied the authorization information via the 'headers'
parameter. This works fine, except in some cases when the request is
retried.
2023-02-03 14:56:00 +01:00
Angela P Wen
0b2a40fa4a Merge pull request #1515 from github/mergeback/v2.2.1-to-main-3ebbd71c
Mergeback v2.2.1 refs/heads/releases/v2 into main
2023-01-27 02:02:26 -08:00
github-actions[bot]
395ec04a8b Update checked-in dependencies 2023-01-27 09:37:04 +00:00
github-actions[bot]
e1070bd101 Update changelog and version after v2.2.1 2023-01-27 09:30:07 +00:00
Angela P Wen
3ebbd71c74 Merge pull request #1514 from github/update-v2.2.1-4664f3969
Merge main into releases/v2
2023-01-27 01:28:20 -08:00
github-actions[bot]
2ae6e13cc3 Update changelog for v2.2.1 2023-01-27 09:06:39 +00:00
Angela P Wen
4664f39699 Ensure that tools_download_duration_ms is int (#1513) 2023-01-27 09:03:57 +00:00
Henry Mercer
b2e16761f3 Merge pull request #1512 from github/mergeback/v2.2.0-to-main-436dbd91
Mergeback v2.2.0 refs/heads/releases/v2 into main
2023-01-26 17:44:11 +00:00
github-actions[bot]
592a896a53 Update checked-in dependencies 2023-01-26 16:40:56 +00:00
github-actions[bot]
4a6b5a54c2 Update changelog and version after v2.2.0 2023-01-26 16:39:29 +00:00
Henry Mercer
436dbd9100 Merge pull request #1511 from github/update-v2.2.0-43f1a6c70
Merge main into releases/v2
2023-01-26 16:37:04 +00:00
Henry Mercer
d966969093 Remove $ from version number 2023-01-26 15:22:33 +00:00
github-actions[bot]
f6d03f448d Update changelog for v2.2.0 2023-01-26 15:18:19 +00:00
Henry Mercer
43f1a6c701 Merge pull request #1510 from github/henrymercer/fix-fallback-version-number
Fix computation of fallback version number
2023-01-26 14:17:40 +00:00
Henry Mercer
75ae065ae6 Fix computation of fallback version 2023-01-26 11:49:51 +00:00
Henry Mercer
0a9e9db27f Add failing regression test 2023-01-26 11:49:24 +00:00
Angela P Wen
24ca6b0400 Send tools telemetry to init status report (#1497)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-01-25 11:09:18 -08:00
Andrew Eisenberg
ebf6415a7d Merge pull request #1493 from github/aeisenberg/upload-sarif-limits
Update CHANGELOG.md with new limits on uploading SARIF
2023-01-25 08:32:05 -08:00
Henry Mercer
a58e90a9da Merge pull request #1508 from github/henrymercer/default-version-fallback
Fall back to the `defaults.json` CLI version if feature flags misconfigured
2023-01-24 20:01:47 +00:00
Andrew Eisenberg
fdff4b0a17 Update CHANGELOG.md
Remove apiVersion parameter.
2023-01-24 08:25:23 -08:00
Andrew Eisenberg
8840544b91 Merge branch 'main' into aeisenberg/upload-sarif-limits 2023-01-24 08:23:50 -08:00
Henry Mercer
af42a70c34 Merge pull request #1504 from github/dependabot/npm_and_yarn/octokit/types-9.0.0
Bump @octokit/types from 8.0.0 to 9.0.0
2023-01-24 12:28:00 +00:00
Henry Mercer
824a20f6aa Merge pull request #1507 from github/henrymercer/swift-autobuild-timeout
Limit Swift autobuild runtime in PR check to 10 minutes
2023-01-23 20:16:40 +00:00
Henry Mercer
fa47d5ade1 Merge pull request #1505 from github/henrymercer/more-node-12-cleanup
More cleanup as a result of dropping Node 12
2023-01-23 20:11:32 +00:00
github-actions[bot]
71109eca74 Update checked-in dependencies 2023-01-23 20:03:33 +00:00
Henry Mercer
5d931ea2a2 Fall back to the default.json CLI version if feature flags misconfigured 2023-01-23 20:00:44 +00:00
dependabot[bot]
6b17e95b97 Bump @octokit/types from 8.0.0 to 9.0.0
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 19:48:29 +00:00
Henry Mercer
14c4412c63 Merge pull request #1506 from github/henrymercer/prepare-test-fail-early
Fail `prepare-test` early when `gh release list` fails
2023-01-23 19:39:31 +00:00
Henry Mercer
ebdd5a069f Remove perf_hooks Node 12 comment
We don't need the import for Node 12 compat, but we do need it to make
the file compile.
2023-01-23 19:16:03 +00:00
Henry Mercer
5da183dcc2 Bump npm to v9.2.0
npm v9.3.0 is out, but seems to have a bug with `npm ci` on macOS
where it will complain that `node_modules/.bin` is a directory.

We specify an exact version for reproducibility of builds.
2023-01-23 19:15:21 +00:00
Henry Mercer
b873a18a2f Limit Swift autobuild runtime to 10 minutes
There's a known issue that causes the Swift autobuilder to hang.  By
setting a timeout, we'll fail earlier and we can rerun the check
earlier.
2023-01-23 19:12:27 +00:00
Henry Mercer
66ed6f46ba Merge pull request #1503 from github/dependabot/npm_and_yarn/octokit/plugin-retry-4.0.4
Bump @octokit/plugin-retry from 3.0.9 to 4.0.4
2023-01-23 18:53:46 +00:00
Henry Mercer
90bbfad4eb Fail prepare-test early when gh release list fails 2023-01-23 18:50:59 +00:00
Henry Mercer
05d21eda44 Merge pull request #1501 from github/henrymercer/codeql-cli-2.12.1
Bump default CodeQL version to 2.12.1
2023-01-23 18:02:27 +00:00
github-actions[bot]
45eb0a66d5 Update checked-in dependencies 2023-01-23 17:26:40 +00:00
dependabot[bot]
78f2db88fc Bump @octokit/plugin-retry from 3.0.9 to 4.0.4
Bumps [@octokit/plugin-retry](https://github.com/octokit/plugin-retry.js) from 3.0.9 to 4.0.4.
- [Release notes](https://github.com/octokit/plugin-retry.js/releases)
- [Commits](https://github.com/octokit/plugin-retry.js/compare/v3.0.9...v4.0.4)

---
updated-dependencies:
- dependency-name: "@octokit/plugin-retry"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 17:02:48 +00:00
Andrew Eisenberg
604a6c3f8e Merge branch 'main' into aeisenberg/upload-sarif-limits 2023-01-23 08:35:54 -08:00
Andrew Eisenberg
fe9baed306 Fix typo in CHANGELOG.md
Co-authored-by: Jenny Rukman <jennyrocku@github.com>
2023-01-23 08:35:27 -08:00
Henry Mercer
f9ae0b9ced Merge branch 'main' into henrymercer/codeql-cli-2.12.1 2023-01-23 13:27:47 +00:00
Henry Mercer
5794d966f2 Merge pull request #1502 from github/henrymercer/python-packages-use-path-from-action
Use CodeQL path from `init` Action in Windows Python dependencies PR checks
2023-01-23 13:26:24 +00:00
Henry Mercer
64580b3179 Update workflow name to reflect Windows tests 2023-01-23 13:01:27 +00:00
Henry Mercer
e05bd5a671 Use CodeQL path from init Action in Windows Python deps PR checks 2023-01-23 13:01:11 +00:00
Henry Mercer
d37dce28f6 Bump default CodeQL version to 2.12.1 2023-01-23 11:25:09 +00:00
Henry Mercer
421a1b344f Merge pull request #1496 from github/henrymercer/no-cache-nightlies
Increase strictness of tool caching threshold to avoid caching nightlies
2023-01-20 17:57:55 +00:00
Andrew Eisenberg
42fb057842 Update CHANGELOG.md 2023-01-20 09:41:08 -08:00
Henry Mercer
54f4ea7a62 Merge branch 'main' into henrymercer/no-cache-nightlies 2023-01-20 17:35:04 +00:00
Henry Mercer
6456115682 Merge pull request #1494 from github/henrymercer/avoid-waiting-for-timeout
Fix a bug that forced the `init` Action to run for at least two minutes on JavaScript
2023-01-20 17:24:48 +00:00
Henry Mercer
8e4a1d6e60 Merge branch 'main' into henrymercer/avoid-waiting-for-timeout 2023-01-20 16:29:49 +00:00
Andrew Eisenberg
4dc41e1d1e Update CHANGELOG.md 2023-01-20 08:28:46 -08:00
Henry Mercer
4827181940 Merge pull request #1492 from github/henrymercer/upgrade-typescript
Upgrade to TypeScript 9.2.0
2023-01-20 16:28:14 +00:00
Henry Mercer
291cc75959 Add test case 2023-01-20 15:30:57 +00:00
Henry Mercer
2014c859f1 Increase strictness of tool caching threshold to avoid caching nightlies 2023-01-20 15:23:27 +00:00
Henry Mercer
4beb39593b Explain why we're using --format=json to get the extractor path 2023-01-20 15:01:38 +00:00
Henry Mercer
be8f7b01a2 Add types for package.json via @schemastore/package 2023-01-20 15:01:35 +00:00
Henry Mercer
1b508953b4 Remove checkActionVersion
This is no longer needed now that we only release v2
2023-01-20 15:01:35 +00:00
Henry Mercer
cb9be70046 Install @types/uuid and eliminate a cast 2023-01-20 15:01:35 +00:00
Henry Mercer
85f0d840c9 Use a more Promise-oriented approach for the timeout system 2023-01-19 20:25:55 +00:00
Henry Mercer
ffb06d7053 Add changelog note 2023-01-19 20:03:37 +00:00
Henry Mercer
b61b299591 Immediately unref timers to avoid waiting for them before exit 2023-01-19 18:09:06 +00:00
Andrew Eisenberg
68a248623f Update CHANGELOG.md with new limits on uploading SARIF 2023-01-19 09:57:22 -08:00
Henry Mercer
ba93815e25 Merge branch 'main' into henrymercer/upgrade-typescript 2023-01-19 16:15:51 +00:00
Henry Mercer
60e5868d6e Merge pull request #1475 from github/henrymercer/controlled-switchover
Enable a controlled switchover between CodeQL releases
2023-01-19 09:42:22 +00:00
Henry Mercer
9012214c80 Merge branch 'main' into henrymercer/controlled-switchover 2023-01-18 22:38:54 +00:00
Henry Mercer
4306b97e96 Add a .DS_Store file shipped with a dependency
We should be checking in all contents of the dependencies, including OS
junk!
2023-01-18 21:10:30 +00:00
Henry Mercer
d5dcff5766 Remove Node 12 compatibility check 2023-01-18 21:07:41 +00:00
Henry Mercer
0a11e3fdd9 Bump packages to fix linter 2023-01-18 21:00:07 +00:00
Henry Mercer
ed9506bbaf Bump eslint-plugin-import to avoid vulnerability in dependency 2023-01-18 21:00:05 +00:00
Henry Mercer
10695e6a20 Fix linter errors 2023-01-18 21:00:05 +00:00
Henry Mercer
5f644f971e Upgrade TypeScript to 9.2.0 2023-01-18 20:59:57 +00:00
Henry Mercer
40a75182e7 Merge pull request #1483 from github/henrymercer/remove-v1-checks
Remove PR checks for v1
2023-01-18 19:27:56 +00:00
Henry Mercer
48ae29987c Merge pull request #1482 from github/henrymercer/remove-v1-from-release-process
Remove v1 from the release process
2023-01-18 19:26:38 +00:00
Henry Mercer
16d8967389 Merge pull request #1490 from github/mergeback/v2.1.39-to-main-a34ca99b
Mergeback v2.1.39 refs/heads/releases/v2 into main
2023-01-18 19:26:15 +00:00
github-actions[bot]
6d37d7534f Update checked-in dependencies 2023-01-18 18:27:52 +00:00
github-actions[bot]
bb36dc476d Update changelog and version after v2.1.39 2023-01-18 18:16:09 +00:00
Henry Mercer
a34ca99b46 Merge pull request #1489 from github/update-v2.1.39-597c2041
Merge main into releases/v2
2023-01-18 18:14:06 +00:00
github-actions[bot]
48fa82899a Update changelog for v2.1.39 2023-01-18 17:27:01 +00:00
Henry Mercer
597c204127 Merge pull request #1481 from github/henrymercer/discontinue-v1
Update deprecation notice to state that CodeQL Action v1 is discontinued
2023-01-18 17:24:19 +00:00
Henry Mercer
3d62f02555 Update changelog note 2023-01-18 15:59:07 +00:00
Henry Mercer
8a4abfd10a Support cli-version-x.y.z-pre.txt marker files 2023-01-18 15:55:23 +00:00
Henry Mercer
5f1362dd53 Merge branch 'main' into henrymercer/controlled-switchover 2023-01-18 15:37:28 +00:00
Andrew Eisenberg
e0fd640b0c Merge pull request #1487 from github/aeisenberg/queries-check
Fix a bug in cli config parsing
2023-01-18 07:29:34 -08:00
Henry Mercer
d731c012c4 Merge pull request #1486 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2023-01-18 12:57:55 +00:00
Henry Mercer
6dfc772b5f Add link to new changelog post 2023-01-18 12:42:11 +00:00
Henry Mercer
60e58b4a21 Merge branch 'main' into henrymercer/discontinue-v1 2023-01-18 12:19:49 +00:00
Andrew Eisenberg
9b1206e898 Fix a bug in cli config parsing
When the config specifies queries in external repositories and no other
queries and cli config parsing is enabled, the analyze job is not able
to find any queries to run and it fails. This PR fixes the problem.

Also add some logging statements when writing a copy of the user config
file.
2023-01-17 20:59:36 -08:00
Andrew Eisenberg
40cfcb0a3f Merge pull request #1485 from github/aeisenberg/comitoid-message
Hide error message and stack for non-error
2023-01-17 17:21:14 -08:00
GitHub
e199504667 Update supported GitHub Enterprise Server versions. 2023-01-18 00:12:15 +00:00
Andrew Eisenberg
e6e3bf4923 Update src/actions-util.ts
Co-authored-by: Angela P Wen <angelapwen@github.com>
2023-01-17 15:53:14 -08:00
Andrew Eisenberg
5b9b480165 Update changelog 2023-01-17 15:05:22 -08:00
Andrew Eisenberg
b625b628b7 Hide error message and stack for non-error
Avoid printing the error message and stack when we fail to find the
commit. This will happen in several non-error states (e.g.,
when there is no repository checked out at the CWD). Move the
error message to a debug message so that it is still available
if someone really wants to see it.
2023-01-17 15:00:24 -08:00
Henry Mercer
e530813ab8 Remove PR checks for v1 2023-01-16 18:49:32 +00:00
Henry Mercer
5fe1a9b8af Update mergeback workflow 2023-01-16 18:41:03 +00:00
Henry Mercer
ba674fb1af Update release workflow 2023-01-16 18:37:43 +00:00
Henry Mercer
e0b20eea50 Migrate release script to template strings 2023-01-16 18:15:29 +00:00
Henry Mercer
218d40db4c Remove v1 only parts of release script 2023-01-16 18:09:01 +00:00
Henry Mercer
28c93a0113 Add changelog note 2023-01-16 17:56:37 +00:00
Henry Mercer
4b40a3a20e Add a notice that CodeQL Action v1 is discontinued 2023-01-16 17:56:31 +00:00
Henry Mercer
a5b44c1a39 Add a sentence on recommended practices for using the CLI 2023-01-16 10:26:34 +00:00
Henry Mercer
b660a383cf Address review comments 2023-01-16 10:14:35 +00:00
Henry Mercer
115587a52c Merge branch 'main' into henrymercer/controlled-switchover 2023-01-16 10:10:15 +00:00
Henry Mercer
ac7e4d772e Improve changelog note some more 2023-01-16 09:53:43 +00:00
Rasmus Wriedt Larsen
32be38eeff Merge pull request #1431 from github/rasmuswl/poetry-always-install-pip
python-setup: Handle poetry `virtualenvs.options.no-pip = true`
2023-01-16 09:31:13 +01:00
Henry Mercer
eca06a5561 Further improve changelog notes 2023-01-13 18:03:03 +00:00
Henry Mercer
13cdac30cc Improve changelog notes 2023-01-13 16:24:38 +00:00
Henry Mercer
12998b7ba3 Convert logger call to debug 2023-01-13 16:18:46 +00:00
Rasmus Wriedt Larsen
5ed1e985c2 python-setup: Fix site-package selection for unix 2023-01-13 14:41:00 +01:00
Rasmus Wriedt Larsen
4bd9723e2b npm run build 2023-01-13 11:26:22 +01:00
Rasmus Wriedt Larsen
2f6d17472d python-setup: Make debug printing more obvious 2023-01-13 11:25:25 +01:00
Rasmus Wriedt Larsen
2649b6603a python-setup: Fix site-packages selection without pip for Windows 2023-01-13 11:25:25 +01:00
Rasmus Wriedt Larsen
b8107301d2 python-setup: Fix for python2 2023-01-13 11:25:25 +01:00
Rasmus Wriedt Larsen
ebf1b8f8fc Fix prettier problem 2023-01-13 11:25:25 +01:00
Rasmus Wriedt Larsen
932b6a98b8 python-setup: Fix path for tests 2023-01-13 11:25:25 +01:00
Rasmus Wriedt Larsen
259993b92a python-setup: Handle poetry virtualenvs.options.no-pip = true
Fixes https://github.com/github/codeql-action/issues/1425
2023-01-13 11:25:25 +01:00
Henry Mercer
0be20e5ce1 Use the CLI version when caching the bundle in telemetry too 2023-01-12 21:09:09 +00:00
Henry Mercer
33206d299e Include the bundle version in the toolcache version number
This gives us an easy cache hit when requesting the same tools URL.
2023-01-12 20:56:31 +00:00
Henry Mercer
c2e39e078f Cache explicitly requested bundles with their URL if possible 2023-01-12 20:44:05 +00:00
Henry Mercer
c9b1be5115 Bump version to 2.2.0 2023-01-12 16:07:23 +00:00
Henry Mercer
28f827aefa Add changelog notes 2023-01-12 16:06:08 +00:00
Henry Mercer
9578699f19 Merge branch 'main' into henrymercer/controlled-switchover 2023-01-12 15:55:36 +00:00
Henry Mercer
31c7ce1ce4 Add doc describing CLI version marker files 2023-01-12 15:51:12 +00:00
Henry Mercer
a89ad76881 Expand note about defaults.json compatibility
In the future we might convert the file to JSON with comments, or add
this note to a JSON schema.
2023-01-12 15:46:12 +00:00
Henry Mercer
1eeb9df353 Remove dead code 2023-01-12 15:41:17 +00:00
Henry Mercer
648838c4a0 Allow using a x.y.z-yyyymmdd toolcache version for CLI x.y.z. 2023-01-12 15:41:07 +00:00
Henry Mercer
2073a69919 Merge pull request #1477 from github/mergeback/v2.1.38-to-main-515828d9
Mergeback v2.1.38 refs/heads/releases/v2 into main
2023-01-12 11:25:42 +00:00
github-actions[bot]
10f2d3c15a Update checked-in dependencies 2023-01-12 10:42:07 +00:00
github-actions[bot]
00c2a84eba Update changelog and version after v2.1.38 2023-01-12 10:35:11 +00:00
Henry Mercer
515828d974 Merge pull request #1476 from github/update-v2.1.38-70fdddff
Merge main into releases/v2
2023-01-12 10:32:43 +00:00
github-actions[bot]
caa49ae471 Update changelog for v2.1.38 2023-01-12 02:27:49 +00:00
Henry Mercer
e8c12e1f7d Add a debug log for the feature flag API response 2023-01-11 19:10:22 +00:00
Henry Mercer
2f7b9a1280 Differentiate setupCodeql.setupCodeQL from codeql.setupCodeQL 2023-01-11 19:06:50 +00:00
Henry Mercer
23d151db1c Add test for using default version with no requested URL on Dotcom 2023-01-11 19:06:50 +00:00
Henry Mercer
c3be36f5cb Use new default version to set up CodeQL 2023-01-11 19:06:50 +00:00
Henry Mercer
bd2f52fcef Move CodeQL setup to its own file 2023-01-11 19:06:50 +00:00
Henry Mercer
a76fe4f9bd Enable mapping from CLI version to bundle tag name 2023-01-11 19:06:50 +00:00
Henry Mercer
a6dff04fe1 Ignore default version flags with invalid version numbers 2023-01-11 19:06:49 +00:00
Henry Mercer
cdb90196f2 Support determining Dotcom CLI version from feature flags 2023-01-11 18:40:47 +00:00
Henry Mercer
70fdddff11 Merge pull request #1474 from github/henrymercer/fix-ghae-setup-test
Refactor CodeQL setup tests and fix GHAE test
2023-01-11 17:14:35 +00:00
Henry Mercer
6ba0a36550 Add JSDoc for mockDownloadApi 2023-01-11 15:25:21 +00:00
Henry Mercer
4a918790cd Merge branch 'main' into henrymercer/fix-ghae-setup-test 2023-01-11 15:23:04 +00:00
Andrew Eisenberg
42d6d35dd1 Merge pull request #1464 from github/aeisenberg/externalRepoTokenConfigParsing
Send the external repository token to the CLI
2023-01-10 14:03:12 -08:00
Andrew Eisenberg
e009918fbc Merge branch 'main' into aeisenberg/externalRepoTokenConfigParsing 2023-01-10 12:43:37 -08:00
Henry Mercer
70a288daae Merge branch 'main' into henrymercer/fix-ghae-setup-test 2023-01-10 20:37:40 +00:00
Dave Bartolomeo
bdc7c5d203 Merge pull request #1466 from github/dbartol/bundle-20230105
Update bundle to 2.12.0
2023-01-10 15:37:19 -05:00
Andrew Eisenberg
272d916f23 Address comments from PR 2023-01-10 12:17:26 -08:00
Henry Mercer
f12f76f047 Merge pull request #1473 from github/henrymercer/temporarily-disable-kotlin-in-pr-checks
Temporarily disable Kotlin analysis in PR checks
2023-01-10 19:49:21 +00:00
Henry Mercer
28a9b2d6d7 Add a note regarding the sinon workaround 2023-01-10 19:43:23 +00:00
Henry Mercer
9f8ddbdfd7 Fix GHAE CodeQL setup test 2023-01-10 19:36:29 +00:00
Henry Mercer
9203e314a3 Improve CodeQL setup test structure and naming 2023-01-10 19:35:21 +00:00
Henry Mercer
80b12d6f73 Ensure we don't unset CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN 2023-01-10 17:42:24 +00:00
Henry Mercer
620a267204 Temporarily disable Kotlin analysis in PR checks
Kotlin analysis is incompatible with Kotlin 1.8.0, which is now rolling
out to the Actions runner images.

While we work on a more permanent fix to our PR checks, this will
prevent us losing other
test coverage.
2023-01-10 17:31:35 +00:00
Dave Bartolomeo
bac4fe1a38 Merge branch 'main' into dbartol/bundle-20230105 2023-01-10 09:31:07 -05:00
Robert
166d98c19e Merge pull request #1465 from github/robertbrignull/upload_database_stream
Use a stream when uploading database contents
2023-01-09 12:37:54 +00:00
Robert
a9337bc304 Close stream after use 2023-01-09 11:00:43 +00:00
Andrew Eisenberg
4023575d64 Send the external repository token to the CLI
This commit does a few related things:

1. Bumps the minimum version for cli config parsing to 2.10.6
2. Ensures that if cli config parsing is enabled, then remove repos
   are _not_ downloaded by the action. It happens in the CLI.
3. Passes the `--external-repository-token-stdin` option to the CLI
   and passes the appropriate token via stdin if cli config parsing is
   enabled.
2023-01-06 14:46:28 -08:00
Henry Mercer
cf1437a514 Merge pull request #1462 from github/henrymercer/refactor-codeql-setup
Refactor CodeQL setup
2023-01-06 17:36:02 +00:00
Dave Bartolomeo
f9c9a2567c Rebuild 2023-01-06 12:32:23 -05:00
Dave Bartolomeo
b9c859bfa1 Merge branch 'main' into dbartol/bundle-20230105 2023-01-06 11:56:06 -05:00
Angela P Wen
b4187d626b Add CLI version field and prior release fields to defaults file (#1463)
* Add CLI version field to `defaults` file

* Add fields for prior CLI version
2023-01-06 08:24:28 -08:00
Dave Bartolomeo
bfbb7ab03c Add change note for bundle update 2023-01-06 11:00:35 -05:00
Dave Bartolomeo
4e5a06f009 Update to CoideQL bundle 20230105 (2.12.0) 2023-01-06 10:55:46 -05:00
Robert
e8f7169839 Move database bundling to inside the try-catch 2023-01-06 15:28:25 +00:00
Robert
6ce923c375 Use a stream when uploading database contents 2023-01-06 15:16:51 +00:00
Henry Mercer
b2b478264a Improve logging around authorization headers 2023-01-06 12:28:54 +00:00
Henry Mercer
5eba74a3c9 Refactor CodeQL setup 2023-01-05 19:09:34 +00:00
Henry Mercer
ff3337ee1b Merge pull request #1444 from github/henrymercer/reporting-failed-run-improvements
Improve reporting failed runs via SARIF
2023-01-04 10:43:15 +00:00
Aditya Sharad
484236cda4 Merge pull request #1460 from github/adityasharad/actions/code-scanning-schedule
Code scanning: Add scheduled trigger to workflow
2023-01-03 14:29:44 -08:00
Aditya Sharad
f837e8e761 Code scanning: Add step titles to workflow 2023-01-03 13:00:12 -08:00
Aditya Sharad
ef21864950 Code scanning: Add scheduled trigger to workflow
Ensure we are regularly running code scanning using
the latest CodeQL and remain up to date with the
internal security scorecard, even if we have a period
longer than a week with no pushes to the repo.
2023-01-03 12:59:13 -08:00
Henry Mercer
4789c1331c Add more tests for uploading failed SARIF
Test results directly via return value of `testFailedSarifUpload` vs
via checking log messages.
2022-12-22 18:48:59 +00:00
Henry Mercer
59ebabde5d Remove redundant log messages 2022-12-22 18:47:52 +00:00
Henry Mercer
3224214d91 Improve method naming 2022-12-22 18:33:06 +00:00
Henry Mercer
e09fbf5b4a Demote upload failed SARIF run info statements to debug
We now report errors via telemetry, and this feature will shortly be
enabled by default.
2022-12-21 11:41:36 +00:00
Henry Mercer
e9ff99b027 Improve error message when workflow file doesn't exist 2022-12-21 11:40:31 +00:00
Henry Mercer
8b9e982393 Add a better log message for reusable workflow calls 2022-12-21 11:40:31 +00:00
Henry Mercer
8d1e008ecb Check for successful completion rather than SARIF upload
This doesn’t affect the overall behaviour, but means we can
short-circuit slightly more quickly when `analyze` is passed
`upload: false`.
2022-12-21 11:40:31 +00:00
Henry Mercer
579411fb6c Merge pull request #1441 from github/henrymercer/remove-old-certifi-tests
Remove tests with old certifi dependency
2022-12-20 18:43:19 +00:00
Henry Mercer
e4818d46c4 Remove tests with old certifi dependency 2022-12-20 10:30:38 +00:00
Angela P Wen
4778dfbd93 Set up the Swift version the extractor declares (#1422)
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2022-12-19 13:08:15 -08:00
Henry Mercer
0a3f985290 Merge pull request #1437 from github/mergeback/v2.1.37-to-main-959cbb74
Mergeback v2.1.37 refs/heads/releases/v2 into main
2022-12-14 14:56:05 +00:00
github-actions[bot]
04f1897968 Update checked-in dependencies 2022-12-14 14:10:28 +00:00
github-actions[bot]
6ac6037211 Update changelog and version after v2.1.37 2022-12-14 14:06:24 +00:00
Henry Mercer
959cbb7472 Merge pull request #1436 from github/update-v2.1.37-d58039a1
Merge main into releases/v2
2022-12-14 14:04:14 +00:00
github-actions[bot]
10ca836463 Update changelog for v2.1.37 2022-12-14 11:07:27 +00:00
Orhan Toy
d58039a1e3 Merge pull request #1435 from github/orhantoy/add-CODE_SCANNING_REF-tests
Add tests for CODE_SCANNING_REF
2022-12-13 23:10:53 +01:00
Henry Mercer
37a4496237 Merge pull request #1433 from github/henrymercer/use-codeql-2.11.6
Bump default CodeQL version to 2.11.6
2022-12-13 13:05:00 +00:00
Orhan Toy
b7028afcb4 Make sure env is reset between tests 2022-12-13 12:18:40 +00:00
Henry Mercer
f629dada4c Merge branch 'main' into henrymercer/use-codeql-2.11.6 2022-12-13 12:15:58 +00:00
Orhan Toy
ccee4c68ff Add tests for CODE_SCANNING_REF 2022-12-13 11:51:16 +00:00
Henry Mercer
899bf9c076 Merge pull request #1432 from github/henrymercer/init-post-telemetry
Add telemetry for uploading failed runs
2022-12-12 18:45:41 +00:00
Henry Mercer
dd7c3ef80e Remove debugging log statements 2022-12-12 17:59:20 +00:00
Henry Mercer
b7b875efff Reuse existing fields in post-init status report 2022-12-12 17:54:33 +00:00
Nick Fyson
53ab991fbe Merge pull request #1434 from github/nickfyson/remove-query-string
remove use of query-string package
2022-12-12 16:40:33 +00:00
nickfyson
54d25f56dd use .has for searchParams instead of checking for undefined 2022-12-12 16:03:07 +00:00
nickfyson
d827cf3d65 remove use of query-string package 2022-12-12 14:50:10 +00:00
Henry Mercer
9438015b82 Add changelog note 2022-12-12 13:11:03 +00:00
Henry Mercer
5aced81848 Update bundle version to codeql-bundle-20221211 2022-12-12 13:10:58 +00:00
Henry Mercer
118e294bb9 Record the stack trace if applicable 2022-12-09 10:35:28 +00:00
Henry Mercer
dc9c1c1a51 Add regression test for upload: false 2022-12-09 10:35:28 +00:00
Henry Mercer
a409f43c7a Handle non-string with inputs 2022-12-09 10:35:28 +00:00
Henry Mercer
e67ad6aaed Add telemetry for uploading failed runs 2022-12-09 10:35:19 +00:00
Chuan-kai Lin
896079047b Merge pull request #1429 from github/mergeback/v2.1.36-to-main-a669cc59
Mergeback v2.1.36 refs/heads/releases/v2 into main
2022-12-08 12:35:17 -08:00
github-actions[bot]
e58b8d6a61 Update checked-in dependencies 2022-12-08 20:03:08 +00:00
github-actions[bot]
01330498de Update changelog and version after v2.1.36 2022-12-08 20:00:59 +00:00
Chuan-kai Lin
a669cc5936 Merge pull request #1428 from github/update-v2.1.36-2b971a70
Merge main into releases/v2
2022-12-08 11:58:43 -08:00
Andrew Eisenberg
6fec2ab57a Merge pull request #1427 from github/dependabot/pip/python-setup/tests/poetry/python-3.8/certifi-2022.12.7
Bump certifi from 2021.10.8 to 2022.12.7 in /python-setup/tests/poetry/python-3.8
2022-12-08 11:24:01 -08:00
github-actions[bot]
aab7a26877 Update changelog for v2.1.36 2022-12-08 19:22:44 +00:00
Henry Mercer
2b971a70bb Merge pull request #1426 from github/dependabot/pip/python-setup/tests/poetry/requests-3/certifi-2022.12.7
Bump certifi from 2021.10.8 to 2022.12.7 in /python-setup/tests/poetry/requests-3
2022-12-08 18:16:20 +00:00
dependabot[bot]
4e81e2933a Bump certifi in /python-setup/tests/poetry/python-3.8
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 17:36:48 +00:00
dependabot[bot]
bf944d782b Bump certifi in /python-setup/tests/poetry/requests-3
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 17:36:47 +00:00
Andrew Eisenberg
566a5e6727 Merge pull request #1424 from github/dependabot/pip/python-setup/tests/pipenv/python-3.8/certifi-2022.12.7
Bump certifi from 2021.10.8 to 2022.12.7 in /python-setup/tests/pipenv/python-3.8
2022-12-08 09:35:45 -08:00
Chuan-kai Lin
10c89976dc Merge pull request #1421 from github/cklin/fix-update-required-checks-sha
update-required-checks.sh: fix argument handling
2022-12-08 09:05:57 -08:00
dependabot[bot]
8121f62c54 Bump certifi in /python-setup/tests/pipenv/python-3.8
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 16:26:53 +00:00
Andrew Eisenberg
104319fe98 Merge pull request #1423 from github/dependabot/pip/python-setup/tests/pipenv/requests-3/certifi-2022.12.7
Bump certifi from 2021.10.8 to 2022.12.7 in /python-setup/tests/pipenv/requests-3
2022-12-08 08:25:36 -08:00
dependabot[bot]
aba18b82f7 Bump certifi in /python-setup/tests/pipenv/requests-3
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 12:47:50 +00:00
Chuan-kai Lin
4a5ad5af18 update-required-checks.sh: ignore check-expected-release-files 2022-12-07 14:27:32 -08:00
Chuan-kai Lin
19f867a052 Merge branch 'main' into cklin/fix-update-required-checks-sha 2022-12-07 10:37:25 -08:00
Chuan-kai Lin
5e452f0d9d Merge pull request #1412 from github/cklin/codeql-cli-2.11.5
Bump default CodeQL version to 2.11.5
2022-12-07 10:36:40 -08:00
Chuan-kai Lin
8bebf77dbd update-required-checks.sh: fix argument handling 2022-12-07 10:12:01 -08:00
Chuan-kai Lin
fb74504ab5 Disable nightly-latest checks for Swift 2022-12-07 17:59:30 +00:00
Chuan-kai Lin
c51babb6c6 Merge branch 'main' into cklin/codeql-cli-2.11.5 2022-12-07 08:33:58 -08:00
Henry Mercer
79166d0788 Merge pull request #1420 from github/henrymercer/failed-runs-fix-action-not-found
Fix failed SARIF upload behavior when the workflow doesn't call the CodeQL Action
2022-12-07 08:48:11 +00:00
Rasmus Wriedt Larsen
44ef9d902a Merge pull request #1419 from github/rasmuswl/poetry-no-local-venv
python-setup: Don't allow Poetry to make venv in project
2022-12-06 20:29:23 +01:00
Henry Mercer
384a214d60 Allow testing workflow parsing functionality from PR checks 2022-12-06 18:37:25 +00:00
Henry Mercer
697ed97fa5 Factor out some code in post-init tests 2022-12-06 18:23:55 +00:00
Henry Mercer
2207a72006 Downgrade log severity when we can't upload a failed SARIF file
This isn't severe enough to appear on the Actions summary.
2022-12-06 18:18:07 +00:00
Henry Mercer
4623c8edb6 Make getInputOrThrow throw when it can't find any calls to the Action
This created unexpected behavior with a workflow calling
`codeql-action/analyze` locally.
Therefore, be more conservative with parsing inputs from workflows and
refuse to parse jobs that don't call the specified Action exactly once.
2022-12-06 18:13:47 +00:00
Henry Mercer
9085295c40 Add regression test 2022-12-06 17:59:14 +00:00
Rasmus Wriedt Larsen
3b0a2f607d python-setup: Update comment with fully qualified configuration name 2022-12-06 11:37:57 +01:00
Rasmus Wriedt Larsen
5566638d56 Update CHANGELOG.md 2022-12-06 11:37:31 +01:00
Rasmus Wriedt Larsen
27c1438455 python-setup: Apply suggestions from code review 2022-12-06 11:32:21 +01:00
Henry Mercer
1e8d3b8fca Merge pull request #1418 from github/henrymercer/remove-file-baseline-info-feature-flag
Enable file baseline export by default
2022-12-06 09:42:34 +00:00
Rasmus Wriedt Larsen
7fc528c3c6 python-setup: Don't allow Poetry to make venv in project
I mostly verified this works on my local machine, but did add a sample `poetry.toml` to the tests, so it can be verified from looking at the logs 🤷
2022-12-06 10:41:46 +01:00
Henry Mercer
2cbc140ac5 Enable file baseline export by default
This is now fully rolled out.
2022-12-05 14:10:06 +00:00
Henry Mercer
1653364141 Merge pull request #1414 from github/dependabot/github_actions/peter-evans/create-pull-request-4.2.3
Bump peter-evans/create-pull-request from 3.4.1 to 4.2.3
2022-12-05 11:02:42 +00:00
dependabot[bot]
61cc378b7f Bump swift-actions/setup-swift from 1.19.0 to 1.20.0 (#1415)
* Bump swift-actions/setup-swift from 1.19.0 to 1.20.0

Bumps [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](5cdaa9161a...194625b58a)

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

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

* Update setup-swift SHA in non-autogenerated files

* Specify v5.7.0 instead of 5.7

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>
2022-12-05 10:54:03 +01:00
dependabot[bot]
7aa5026a55 Bump actions/setup-python from 3 to 4 (#1416)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 08:20:36 +01:00
dependabot[bot]
c80f00a5c9 Bump peter-evans/create-pull-request from 3.4.1 to 4.2.3
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3.4.1 to 4.2.3.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](c7f493a800...2b011faafd)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 19:29:01 +00:00
Henry Mercer
62b14cbbad Merge pull request #1413 from github/update-dependabot-e0f8a3c2
Add Dependabot config file
2022-12-02 19:28:32 +00:00
Henry Mercer
794a4b543a Switch to weekly interval for both ecosystems 2022-12-02 18:42:33 +00:00
Henry Mercer
ee6ba9c213 Reformat 2022-12-02 17:53:16 +00:00
Henry Mercer
81f99a8582 Remove outdated section for runner and perform all updates daily 2022-12-02 17:52:46 +00:00
Sentinel Reviewer
4b18b7bc24 Update Dependabot config file 2022-12-02 11:45:26 -06:00
Henry Mercer
4acf201e5b Merge pull request #1393 from github/henrymercer/report-failed-runs
Submit SARIF for failed runs too
2022-12-02 17:08:04 +00:00
Chuan-kai Lin
1e5919b22d Bump default CodeQL version to 2.11.5 2022-12-02 07:38:17 -08:00
Henry Mercer
375dacad24 Only print the full error message in debug mode 2022-12-02 14:38:40 +00:00
Henry Mercer
e0ff272230 Merge branch 'main' into henrymercer/report-failed-runs 2022-12-02 14:31:22 +00:00
Angela P Wen
aa0e650c6a Surface fatal CLI errors in interpret-results and run-queries (#1407)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-12-02 14:05:21 +01:00
Henry Mercer
98b2ddc7f9 Merge branch 'main' into henrymercer/report-failed-runs 2022-12-01 18:27:32 +00:00
Henry Mercer
0d9b15ca93 Merge pull request #1392 from github/henrymercer/parse-category
Add functionality for parsing Action inputs from a workflow file
2022-12-01 18:26:03 +00:00
Henry Mercer
b1c26c4c53 Merge pull request #1409 from github/mergeback/v2.1.35-to-main-b2a92eb5
Mergeback v2.1.35 refs/heads/releases/v2 into main
2022-12-01 14:25:02 +00:00
github-actions[bot]
21044b004d Update checked-in dependencies 2022-12-01 13:51:17 +00:00
github-actions[bot]
0828b04e3a Update changelog and version after v2.1.35 2022-12-01 13:04:46 +00:00
Henry Mercer
b2a92eb56d Merge pull request #1406 from github/update-v2.1.35-9af9a11d
Merge main into releases/v2
2022-12-01 13:02:24 +00:00
github-actions[bot]
075b74d36e Update changelog for v2.1.35 2022-12-01 12:16:44 +00:00
Angela P Wen
9af9a11da8 Stop running fallback Go autobuild if database is finalized (#1405) 2022-12-01 11:29:03 +01:00
Andrew Eisenberg
a631f4b016 Merge pull request #1400 from github/aeisenberg/fix-test-error
Fixes spurious error messages in tests
2022-11-30 08:04:59 -08:00
Henry Mercer
77cda4d75d Add testing environment to submit SARIF after failure PR check 2022-11-30 11:32:36 +00:00
Henry Mercer
3d90c4f911 Improve error message when failed SARIF file doesn't process as expected 2022-11-30 11:27:03 +00:00
Andrew Eisenberg
1384ce4ab3 Fixes spurious error messages in tests
Previously, `isAnalyzingDefaultBranch` was failing because there are
some missing env vars: `GITHUB_SHA`, `GITHUB_REF`, and
`GITHUB_EVENT_PATH`. Also, `checkout_path` is missing as an input.

Rather than trying to set them to mock values, which would require
setting the paths to existing paths in the file system, I chose to stub
the entire function. I think this is fine since the point of the test
is to check the ram and threads values, not testing the
`isAnalyzingDefaultBranch` function.
2022-11-29 10:53:11 -08:00
Henry Mercer
6c5cad784c Merge branch 'henrymercer/parse-category' into henrymercer/report-failed-runs 2022-11-29 17:04:56 +00:00
Henry Mercer
58b2ab08a8 Add unit test for typical workflow 2022-11-29 17:03:01 +00:00
Henry Mercer
e0dec83cfc Explicitly mention surrounding by try/catch in JSDoc 2022-11-29 16:29:27 +00:00
Henry Mercer
00a3c456fb Always wait for processing when uploading a failed SARIF file 2022-11-29 16:27:04 +00:00
Henry Mercer
e628ee0ae1 Push unsuccessful execution API error detection into upload library 2022-11-29 16:25:29 +00:00
Henry Mercer
605b23d10b Explicitly suggest wrapping in a try/catch block 2022-11-29 15:48:54 +00:00
Rasmus Wriedt Larsen
160613c380 Merge pull request #1402 from github/rasmuswl/new-virtualenv
python-setup: rely on new `virtualenv` for venv creation in Ubuntu 22.04
2022-11-29 13:56:31 +01:00
Rasmus Wriedt Larsen
caf1c5057b python-setup: Remove outdated comment 2022-11-29 13:24:10 +01:00
Rasmus Wriedt Larsen
c62445de22 python-setup: rely on new virtualenv for venv creation in Ubuntu 22.04
Removes the hotfix from https://github.com/github/codeql-action/pull/1257
2022-11-29 11:43:01 +01:00
Henry Mercer
7fc3c603aa Add changelog note 2022-11-25 18:18:39 +00:00
Henry Mercer
24fd4c0f4e Generate the "Submit SARIF after failure" workflow 2022-11-25 18:18:13 +00:00
Henry Mercer
d0517be03a Ensure we finish the log group when waiting for processing 2022-11-25 17:55:01 +00:00
Henry Mercer
37b4358e44 Handle API versions that reject unsuccessful executions 2022-11-25 17:55:00 +00:00
Henry Mercer
122b180b66 Add an integration test for uploading SARIF when the run fails 2022-11-25 17:54:22 +00:00
Henry Mercer
8337c2be0f Only upload failed SARIF if the run failed 2022-11-25 17:53:32 +00:00
Henry Mercer
5296a763b1 Upload failed SARIF files to Code Scanning 2022-11-25 17:52:50 +00:00
Henry Mercer
3afc2b194c Add feature flag for uploading failed SARIF 2022-11-25 17:49:03 +00:00
Henry Mercer
3cf2a1ba2e Add function for retrieving the "upload" input 2022-11-25 17:49:01 +00:00
Henry Mercer
4d4e25083a Use a matrix in testing workflow 2022-11-25 17:47:21 +00:00
Henry Mercer
9de6c31571 Log matrix input 2022-11-25 17:47:21 +00:00
Henry Mercer
44ae944a29 Add a workflow to test reporting a failed run 2022-11-25 17:47:21 +00:00
Henry Mercer
e2338066a1 Add diagnostics export command 2022-11-25 17:47:21 +00:00
Henry Mercer
8f05fcd048 Filter set of possible Action inputs to those from a particular job
This better handles cases where customers have a monorepo and have
separate jobs for different components.
2022-11-25 17:40:27 +00:00
Alexander Eyers-Taylor
9dac9f748a Merge pull request #1396 from github/mergeback/v2.1.34-to-main-312e093a
Mergeback v2.1.34 refs/heads/releases/v2 into main
2022-11-25 16:14:10 +00:00
github-actions[bot]
c6e756bb39 Update checked-in dependencies 2022-11-25 15:38:27 +00:00
github-actions[bot]
8d8b898c0f Update changelog and version after v2.1.34 2022-11-25 15:20:20 +00:00
Alexander Eyers-Taylor
312e093a18 Merge pull request #1395 from github/update-v2.1.34-7e73deda
Merge main into releases/v2
2022-11-25 15:17:56 +00:00
github-actions[bot]
aef0440821 Update changelog for v2.1.34 2022-11-25 13:44:40 +00:00
Henry Mercer
9f2aa7ec75 Merge branch 'main' into henrymercer/parse-category 2022-11-25 09:58:27 +00:00
Henry Mercer
7e73dedacc Merge pull request #1394 from github/aeisenberg/bypass-toolcache-kotlin-swift
Add a way to bypass the toolcache for kotlin and swift
2022-11-25 09:30:35 +00:00
Andrew Eisenberg
102e01da36 Small refactoring of shouldBypassToolcache 2022-11-24 12:33:42 -08:00
Andrew Eisenberg
eb19ecbad1 Add API call for languages if java in input
If a user explicitly includes java in their language inputs, always
make an api call to check for kotlin in the repo.

Also, add some suggestions from code reviews.
2022-11-24 11:06:29 -08:00
Henry Mercer
f0a052e8b4 Merge pull request #1388 from github/henrymercer/bump-swift-version-to-5.7.1
Run Swift tests with Swift 5.7.1 on macOS
2022-11-24 15:37:32 +00:00
Henry Mercer
ead8da6199 Merge branch 'main' into henrymercer/bump-swift-version-to-5.7.1 2022-11-24 14:32:08 +00:00
Alexander Eyers-Taylor
c61f4c61f8 Merge pull request #1391 from github/alexet/update-2.11.4-v2
Update default CodeQL bundle version to 2.11.4
2022-11-24 14:23:06 +00:00
Andrew Eisenberg
ad7ca9bf21 Add some new tests and fix some comments 2022-11-23 22:18:12 -08:00
Andrew Eisenberg
f79028af27 Add the feature to bypass the toolcache for kotlin and swift
This works by moving the logic to check for toolcache bypass out of
creating the codeql instance. The logic now _may_ perform an API request
in order to check what languages are in the repository. This check is
redundant because the same call is being made later in the action when
the actual list of languages is calculated.
2022-11-23 15:11:20 -08:00
Henry Mercer
909c8687d5 Test Linux against Swift 5.7
Currently only macOS supports 5.7.1
2022-11-23 21:21:50 +00:00
Andrew Eisenberg
5b7c9daecd Add the bypass_toolcache_kotlin_switft_enabled flag 2022-11-23 12:20:22 -08:00
Henry Mercer
ce90479412 Test latest and nightly-latest against Swift 5.7.1 2022-11-23 20:17:20 +00:00
Henry Mercer
bff0be7364 Generalize getCategoryInputOrThrow to arbitrary inputs 2022-11-23 19:27:03 +00:00
Henry Mercer
daf4614f68 Substitute matrix variables into category input
This is a common case, so we should handle it.
2022-11-23 19:27:03 +00:00
Henry Mercer
e2d523ca5e Add function to read the analysis category from a workflow 2022-11-23 19:27:03 +00:00
Henry Mercer
996d04b1e5 Fix a type error affecting later versions of TypeScript 2022-11-23 19:27:03 +00:00
Henry Mercer
79f8286c68 Refactoring: Separate out workflow related functionality
No semantic changes.
2022-11-23 19:27:01 +00:00
Alexander Eyers-Taylor
d52e657b2e Update default CodeQL bundle version to 2.11.4 2022-11-23 18:56:23 +00:00
Henry Mercer
187515b328 Merge pull request #1390 from github/henrymercer/remove-dead-code
Remove some dead code
2022-11-23 18:55:09 +00:00
Henry Mercer
bc341c5dd1 Remove fallback logic for GHES 2.22 when determining Action repository 2022-11-23 18:19:25 +00:00
Henry Mercer
39fe7aa8a1 Remove dead guard for GHES 3.0 2022-11-23 13:57:07 +00:00
Henry Mercer
c719ec0b33 Merge pull request #1389 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-11-23 10:31:21 +00:00
Henry Mercer
09bfd560f6 Merge pull request #1385 from github/henrymercer/update-v1-deprecation-date
Update v1 deprecation date
2022-11-23 10:24:17 +00:00
Henry Mercer
33b2045510 Merge branch 'main' into henrymercer/update-v1-deprecation-date 2022-11-23 09:53:16 +00:00
GitHub
93c6b70dc3 Update supported GitHub Enterprise Server versions. 2022-11-23 00:13:03 +00:00
Henry Mercer
def4f60c6c Merge pull request #1387 from github/henrymercer/fix-swift-version
Use Swift version 5.7 in PR checks
2022-11-22 22:39:17 +00:00
Henry Mercer
34d91a9ce7 Use runner.os in ML-powered queries tests too 2022-11-22 20:45:26 +00:00
Henry Mercer
c49c05b5df Perform the check using runner.os 2022-11-22 20:41:32 +00:00
Henry Mercer
2ccaddd459 Define swift-version as a string 2022-11-22 20:33:22 +00:00
Henry Mercer
5dcca8a6e4 Pin the version of swift-actions/setup-swift@v1 2022-11-22 20:13:49 +00:00
Henry Mercer
b6e17a6616 Drop unneeded CODEQL_ENABLE_EXPERIMENTAL_FEATURES env var 2022-11-22 11:31:22 +00:00
Henry Mercer
e9e73b0cb9 Use Swift version 5.7 in PR checks
The version installed in the latest runner image, 5.7.1, is not yet
supported.
2022-11-22 11:30:27 +00:00
Angela P Wen
bab5a146ac Add Ruby and Swift language autodetect tests (#1369)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-22 11:03:25 +00:00
Henry Mercer
6013661451 Update v1 deprecation date
The expected deprecation date of GHES 3.3 has been postponed, so v1 will
now be deprecated in January.
2022-11-22 09:43:07 +00:00
Andrew Eisenberg
26df9a9a4f Merge pull request #1384 from github/aeisenberg/feature-flags-disk
Cache feature flags on disk
2022-11-21 15:25:34 -08:00
Andrew Eisenberg
4ee97e5e55 Add extra test ensuring env var overrides cached feature flag 2022-11-21 14:30:36 -08:00
Andrew Eisenberg
cfce1c4e19 Rename 2022-11-21 13:42:32 -08:00
Andrew Eisenberg
da75623c67 Update changelog 2022-11-21 11:19:34 -08:00
Andrew Eisenberg
c29fca48a1 Cache feature flags on disk
This will allow feature flags to be shared across steps in the same job,
avoiding an error we saw earlier where the init action had the flag
enabled, but the analyze step had it disabled.

This uses the runner's temp folder to cache the flags file, which will
stick around until the job completes.
2022-11-21 11:14:38 -08:00
Angela P Wen
4fddc51e4f Support Kotlin for public beta (#1370) 2022-11-17 18:38:48 +00:00
Henry Mercer
7694d6752a Merge pull request #1378 from github/henrymercer/add-ruby-to-readme
Add Ruby to README
2022-11-17 12:39:38 +00:00
Marco Gario
3b8914b2cc Merge pull request #1376 from github/mergeback/v2.1.33-to-main-678fc3af
Mergeback v2.1.33 refs/heads/releases/v2 into main
2022-11-16 20:57:51 +01:00
github-actions[bot]
377b692bf3 Update checked-in dependencies 2022-11-16 18:49:58 +00:00
Henry Mercer
55a437c003 Add Ruby to README 2022-11-16 18:31:04 +00:00
github-actions[bot]
e353814da4 Update changelog and version after v2.1.33 2022-11-16 18:17:50 +00:00
Marco Gario
678fc3afe2 Merge pull request #1375 from github/update-v2.1.33-c939e661
Merge main into releases/v2
2022-11-16 19:15:58 +01:00
Henry Mercer
0f07790b74 Merge pull request #1374 from github/henrymercer/pass-testing-environment
Set testing environment for CodeQL workflow
2022-11-16 18:05:00 +00:00
Edoardo Pirovano
53060aa0c8 Merge pull request #1373 from github/edoardo/workaround-download
TRAP Caching: Re-introduce workaround for download timeout
2022-11-16 17:28:21 +00:00
Marco Gario
d13b9b8244 Fix changelog entry 2022-11-16 17:45:42 +01:00
Henry Mercer
a836d9571f Set testing environment for CodeQL workflow 2022-11-16 16:40:35 +00:00
Henry Mercer
ffc2dd6d6d Enable test mode for check-codescanning-config Action 2022-11-16 16:40:35 +00:00
Henry Mercer
7cdf75141e Remove redundant INTERNAL_CODEQL_ACTION_DEBUG_LOC variable 2022-11-16 16:40:35 +00:00
Henry Mercer
a190d3876a Rename TEST_MODE to specific variable for CodeQL Action
This allows us to set it automatically in the workflow generator,
simplifying things and reducing the scope for error.
2022-11-16 16:40:30 +00:00
github-actions[bot]
f2c3e7ca4e Update changelog for v2.1.33 2022-11-16 16:34:17 +00:00
Edoardo Pirovano
bfc56625b0 TRAP Caching: Re-introduce workaround for download timeout 2022-11-16 15:49:52 +00:00
Marco Gario
c939e6615d Merge pull request #1372 from github/marcogario/prioritize_github_ref
Prefer GITHUB_REF to CODE_SCANNING_REF
2022-11-16 12:03:29 +01:00
Henry Mercer
1935d19d61 Merge pull request #1358 from github/henrymercer/require-cli-2.6.3
Bump minimum CodeQL bundle version to 2.6.3
2022-11-16 10:37:57 +00:00
Angela P Wen
7484436e5d Remove Go extraction feature flags (#1371) 2022-11-16 10:32:40 +00:00
Marco Gario
0a76b97b28 Prefer GITHUB_REF to CODE_SCANNING_REF
Given that the GITHUB_REF is a protected variable, we want to prefer it to
CODE_SCANNING_REF. This should prevent accidentally overwriting these values.
The logic is a bit more involved, as I think it makes sense to raise the error
about GITHUB_REF not being set, rather than mentioning CODE_SCANNING_REF if
both are not set.
2022-11-16 10:49:49 +01:00
Henry Mercer
f8b607edaa Merge pull request #1364 from github/henrymercer/delete-runner-part-2
Delete the runner, part 2
2022-11-15 21:19:38 +00:00
Henry Mercer
d48707ce53 Merge branch 'henrymercer/delete-runner-part-2' into henrymercer/require-cli-2.6.3 2022-11-15 20:58:01 +00:00
Henry Mercer
07b9db6a46 Explicitly set up Go 1.13.1 in checks running on old runner images 2022-11-15 20:53:57 +00:00
Henry Mercer
0dea34e91c Merge branch 'main' into henrymercer/delete-runner-part-2 2022-11-15 19:35:30 +00:00
Henry Mercer
f47c93c5fd Merge pull request #1363 from github/henrymercer/delete-runner-part-1
Delete the runner, part 1
2022-11-15 19:31:28 +00:00
Andrew Eisenberg
6a0f768e01 Merge pull request #1368 from marcogario/marcogario/code_scanning_ref
Read CODE_SCANNING_REF env variable
2022-11-15 09:14:09 -08:00
Marco Gario
2bca6af0e5 Read CODE_SCANNING_REF 2022-11-15 15:26:47 +01:00
Henry Mercer
43f9bd3e4f Merge pull request #1365 from github/henrymercer/update-query-id-prefixes
Add Swift file baseline info to expected list
2022-11-15 14:20:42 +00:00
Henry Mercer
88b5c1e51f Set environment variable to enable Swift 2022-11-15 13:53:00 +00:00
Henry Mercer
3ef8b89353 Merge branch 'main' into henrymercer/update-query-id-prefixes 2022-11-15 13:46:12 +00:00
Henry Mercer
35086e72ed Merge pull request #1366 from github/henrymercer/update-lockfile
Update lockfiles to v3
2022-11-15 12:43:58 +00:00
Henry Mercer
1e2f8f035d Merge branch 'main' into henrymercer/require-cli-2.6.3 2022-11-14 22:25:31 +00:00
Henry Mercer
31c87302e7 Add Swift file baseline info to expected list
Also update query ID prefixes for C# and Ruby
2022-11-14 22:23:16 +00:00
Henry Mercer
0990a34ac8 Merge branch 'main' into henrymercer/delete-runner-part-1 2022-11-14 22:20:41 +00:00
Henry Mercer
47ce159207 Add config file to support npm v8 and v9 simultaneously 2022-11-14 22:15:08 +00:00
Angela P Wen
5883c13406 Deprecate Go extraction reconciliation feature flag and CODEQL_EXTRACTOR_GO_BUILD_TRACING for custom builds (#1322)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-14 13:54:35 -08:00
Henry Mercer
375506c896 Update lockfiles to v3 2022-11-14 21:43:03 +00:00
Henry Mercer
9df773d1a3 Remove unneeded apiDetails input to getApiClient 2022-11-14 19:55:30 +00:00
Henry Mercer
dac8912e9f Remove deriveApiUrl function only used by runner 2022-11-14 18:59:39 +00:00
Henry Mercer
8ecbaea022 Remove support for empty analysis keys from runner 2022-11-14 18:55:31 +00:00
Henry Mercer
3d46406f3b Remove runner-only input to databaseInitCluster 2022-11-14 18:49:17 +00:00
Henry Mercer
03bb58c07d Remove note about separation in actions-util
We could move everything into `util`, but in some ways it is nice having
a file dedicated to Actions related utilities.
2022-11-14 18:46:43 +00:00
Angela P Wen
0eacdb53ad Support Swift for private beta (#1350)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-14 10:29:05 -08:00
Henry Mercer
8c8a9b1231 Remove auth method only used in runner 2022-11-14 16:39:43 +00:00
Henry Mercer
b498c79130 Remove concept of Actions / runner mode 2022-11-14 16:37:48 +00:00
Henry Mercer
51abddb49b Delete the runner 2022-11-14 16:23:14 +00:00
Henry Mercer
73c5c0607d Remove runner threads and RAM test
We don't need to test runner functionality now since the runner is only
used in PR checks, and `extractor-ram-threads.yml` covers the Action
case.
2022-11-14 16:18:38 +00:00
Henry Mercer
adb125ae03 Remove runner upload SARIF test
Testing SARIF compatibility is covered by `codeql.yml`.
2022-11-14 16:16:58 +00:00
Henry Mercer
219d9a0182 Remove runner C# autobuild tests
These are covered by `autobuild-action.yml`.
2022-11-14 16:14:41 +00:00
Henry Mercer
83ead4549c Remove manual build steps tests
These are tested by `multi-language-autodetect.yml`
2022-11-14 16:13:14 +00:00
Henry Mercer
63d8cbe20e Remove Windows and macOS JS analysis runner tests
These are covered by `codeql.yml`, which runs across all latest runner
images.
2022-11-14 16:09:36 +00:00
Henry Mercer
be84b68e4c Delete runner CLI config parsing check
This is now covered by `codescanning-config-cli.yml`.
2022-11-14 16:07:49 +00:00
Henry Mercer
af487b12e7 Merge pull request #1361 from github/mergeback/v2.1.32-to-main-42384213
Mergeback v2.1.32 refs/heads/releases/v2 into main
2022-11-14 13:42:07 +00:00
github-actions[bot]
f3e11b9174 Update checked-in dependencies 2022-11-14 12:58:46 +00:00
github-actions[bot]
ac90bc016d Update changelog and version after v2.1.32 2022-11-14 12:37:28 +00:00
Henry Mercer
4238421316 Merge pull request #1360 from github/update-v2.1.32-33b10be6
Merge main into releases/v2
2022-11-14 12:35:15 +00:00
github-actions[bot]
97be6233c4 Update changelog for v2.1.32 2022-11-14 12:03:19 +00:00
Henry Mercer
0c3e493df0 Update first version of CLI compatible with Windows 2022
It is 2.8.2, not 2.7.3.
2022-11-11 19:08:55 +00:00
Henry Mercer
e131232b86 Add changelog note 2022-11-11 19:08:33 +00:00
Henry Mercer
1fd76310fd Update CLI versions in non-generated checks 2022-11-11 19:08:33 +00:00
Henry Mercer
9e44100c47 Update autogenerated checks to run on earliest three minor CLI versions 2022-11-11 19:00:48 +00:00
Henry Mercer
acbc6ca6e5 Fix a couple of naming nits 2022-11-11 19:00:48 +00:00
Henry Mercer
84e5134df9 Remove lines of code counting in the Action
We now only need to support doing this in the CLI.
2022-11-11 19:00:45 +00:00
Henry Mercer
ea990a3118 Remove flags for CLI v2.6.2 and earlier 2022-11-11 18:22:45 +00:00
Henry Mercer
b45e925fe2 Bump minimum version to 2.6.3 2022-11-11 18:00:58 +00:00
Henry Mercer
33b10be6bf Merge pull request #1348 from github/henrymercer/use-codeql-2.11.3
Bump default CodeQL version to 2.11.3
2022-11-11 11:36:11 +00:00
Henry Mercer
718930badf Pin npm to latest v8 release to address failing PR check
npm v9 is not compatible with Node 12, so we can't update to it yet.
2022-11-11 11:06:50 +00:00
Henry Mercer
76a77405c1 Fix Python query identifier in file baseline information PR check 2022-11-11 10:12:39 +00:00
Henry Mercer
9452b6b864 Merge branch 'main' into henrymercer/use-codeql-2.11.3 2022-11-11 09:56:50 +00:00
Edoardo Pirovano
006bb00765 Merge pull request #1354 from github/edoardo/force-exit-on-timeout
Force exit of process if a timeout has occurred
2022-11-10 16:56:41 +00:00
Edoardo Pirovano
d6f6ef4b0b Force exit of process if a timeout has occurred 2022-11-09 17:28:15 +00:00
Stephan Brandauer
7c9e85e249 Merge pull request #1353 from kaeluka/add-ATM-0.4.0-to-changelog
Add ATM 0.4.0 to changelog
2022-11-09 11:31:28 +01:00
Stephan Brandauer
fb3fdd7e15 add ATM 0.4.0 to changelog 2022-11-09 10:30:59 +01:00
Stephan Brandauer
73ff862014 Merge pull request #1351 from kaeluka/release-atm-v0.4.0
use ATM pack v0.4.0 for CLI v2.11.3 and above
2022-11-08 15:08:24 +01:00
Stephan Brandauer
01c4458f0c use ATM pack v0.4.0 for CLI v2.11.3 and above 2022-11-08 13:53:18 +01:00
Henry Mercer
0e5b04a79a Merge pull request #1349 from github/henrymercer/improve-focus-when-init-fails
Improve experience when init fails before generating a config file
2022-11-08 11:31:43 +00:00
Henry Mercer
f9948ffd0e Improve experience when init fails before generating a config file
Suppose a customer has a run where the init Action failed before saving
a config file.
When the customer opens their Actions logs, the UI currently focuses on
the post init step, since this is the last step that failed.
Demoting the error in the post init Action to a warning means that the
UI will instead focus on the `init` step, which is more useful for
debugging what went wrong.
2022-11-07 18:50:59 +00:00
Henry Mercer
c606252ada Merge pull request #1329 from github/henrymercer/file-baseline-info-enablement
Enable file baseline information behind a feature gate
2022-11-07 18:10:39 +00:00
Henry Mercer
029ecc09e7 Check expected SARIF notification objects 2022-11-07 16:37:57 +00:00
Henry Mercer
b9b7d9f2a6 Add PR check for file baseline information 2022-11-07 16:37:46 +00:00
Henry Mercer
dba70acdb3 Bump default CodeQL version to 2.11.3 2022-11-07 10:40:09 +00:00
Andrew Eisenberg
8aff97f12c Merge pull request #1346 from github/mergeback/v2.1.31-to-main-c3b6fce4
Mergeback v2.1.31 refs/heads/releases/v2 into main
2022-11-07 02:18:21 -08:00
github-actions[bot]
31a2afec21 Update checked-in dependencies 2022-11-04 23:01:51 +00:00
github-actions[bot]
6a5e69e74f Update changelog and version after v2.1.31 2022-11-04 20:36:31 +00:00
Andrew Eisenberg
c3b6fce4ee Merge pull request #1345 from github/update-v2.1.31-a8cabafa
Merge main into releases/v2
2022-11-04 13:33:47 -07:00
Andrew Eisenberg
8aa42f1f11 Update CHANGELOG.md
Add link to codeql PR.
2022-11-04 10:19:29 -07:00
Andrew Eisenberg
29a5553722 Update CHANGELOG.md
Add message about `rb/weak-cryptographic-algorithm`.
2022-11-04 10:14:36 -07:00
github-actions[bot]
e260194d76 Update changelog for v2.1.31 2022-11-04 17:05:58 +00:00
Edoardo Pirovano
a8cabafa56 Merge pull request #1344 from github/edoardo/prune-ruby
Prune results of Ruby query from SARIF
2022-11-04 17:01:42 +00:00
Edoardo Pirovano
862a512899 Prune results of Ruby query from SARIF 2022-11-04 14:57:13 +00:00
Henry Mercer
71510779c2 Merge pull request #1342 from github/mergeback/v2.1.30-to-main-18fe527f
Mergeback v2.1.30 refs/heads/releases/v2 into main
2022-11-02 13:38:45 +00:00
github-actions[bot]
81a1ec0fb3 Update checked-in dependencies 2022-11-02 12:31:48 +00:00
github-actions[bot]
60c8cda203 Update changelog and version after v2.1.30 2022-11-02 12:13:36 +00:00
Henry Mercer
18fe527fa8 Merge pull request #1341 from github/update-v2.1.30-cd983e71
Merge main into releases/v2
2022-11-02 12:09:34 +00:00
github-actions[bot]
f04ca7c11c Update changelog for v2.1.30 2022-11-02 11:23:49 +00:00
Henry Mercer
89e18934d3 Forward file baseline information enablement to CLI 2022-11-01 17:10:53 +00:00
Henry Mercer
5da50dc362 Add file baseline information feature 2022-11-01 16:59:38 +00:00
Henry Mercer
cd983e71c6 Merge pull request #1334 from github/henrymercer/better-error-for-glibc
Add a better error message for users of CodeQL CLI 2.7.2 and earlier running on `ubuntu-22.04`
2022-11-01 16:51:05 +00:00
Angela P Wen
2ec046b5ac Merge pull request #1328 from github/angelapwen/add-go-autobuild-comment
Add Go to list of supported languages
2022-11-01 09:50:32 -07:00
Cornelius Riemenschneider
72bd9cbe62 Merge pull request #1321 from github/criemen/datadog-tag
Actions status report: Send testing_environment.
2022-11-01 16:51:25 +01:00
Angela P Wen
ac0112f7f1 Add Go to list of supported languages 2022-11-01 08:28:56 -07:00
Cornelius Riemenschneider
77b1f7e44c Merge remote-tracking branch 'origin/main' into criemen/datadog-tag 2022-11-01 16:15:42 +01:00
Henry Mercer
aa07b3894b Merge pull request #1340 from github/henrymercer/fix-proxy-check
Fix missing Docker image in proxy test
2022-11-01 15:07:13 +00:00
Henry Mercer
c44e6c6096 Fix missing Docker image in proxy test 2022-11-01 14:32:18 +00:00
Cornelius Riemenschneider
ae0a2603c1 Update src/actions-util.ts
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-01 14:46:41 +01:00
Cornelius Riemenschneider
bfcbb093ac Re-export codeql testing environment variable to subsequent steps, if set. 2022-11-01 13:18:57 +01:00
Cornelius Riemenschneider
4b73c4f99e Actions status report: Send testing_environment.
The testing environment is taken from the environment variable
CODEQL_ACTION_TESTING_ENVIRONMENT.
2022-11-01 13:18:57 +01:00
Henry Mercer
6c6b550a41 Add changelog note 2022-10-31 14:22:26 +00:00
Henry Mercer
a3141c7a07 Improve error message 2022-10-31 14:19:04 +00:00
Henry Mercer
13cb2ca824 Merge branch 'main' into henrymercer/better-error-for-glibc 2022-10-31 13:44:00 +00:00
Henry Mercer
7e2585030f Merge pull request #1330 from github/henrymercer/ubuntu-image-upgrade
Make PR checks compatible with the latest version of the `ubuntu-latest` runner image
2022-10-31 10:07:19 +00:00
Henry Mercer
4b37e17ec1 Check stdout rather than stderr 2022-10-28 18:59:02 +01:00
Henry Mercer
a12a861b82 Add a better error message for users of CodeQL CLI 2.7.2 and earlier
Improves the error message for users running (a) CLI 2.7.2 and earlier
and (b) `ubuntu-22.04`, to which `ubuntu-latest` is now being migrated.
Previously this was "undefined symbol: __libc_dlopen_mode, version
GLIBC_PRIVATE".
Now we give some guidance around glibc versions and using the
`ubuntu-20.04` runner image.
2022-10-28 18:38:00 +01:00
Henry Mercer
993ca05cd7 Fix artifact lookup for ubuntu-20.04 2022-10-27 17:56:45 +01:00
Henry Mercer
a31200481f Be more specific about where the 2.7.3 constraint comes from 2022-10-27 16:28:36 +01:00
Henry Mercer
4ed5abeff3 Remove redundant Rubocop checks 2022-10-27 16:23:29 +01:00
Henry Mercer
734292689d Update non-generated checks for ubuntu-latest image update 2022-10-27 16:23:29 +01:00
Henry Mercer
5767f918ef Remove redundant fail-fast configurations 2022-10-27 15:19:07 +01:00
Henry Mercer
f248a57d3b Run PR checks for CLIs < 2.7.3 on ubuntu-20.04
Build tracing using CLIs before 2.7.3 no longer works with the most
recent update to the `ubuntu-22.04` runner image.

With this new logic, we can remove the workarounds around testing
`windows-2019` and `windows-2022`.
2022-10-27 15:19:07 +01:00
Edoardo Pirovano
40542d38bc Merge pull request #1326 from github/henrymercer/fix-mergeback-pr-description
Fix mergeback PR description
2022-10-26 14:14:58 +01:00
Henry Mercer
55ffe2dcbb Fix mergeback PR description
Previously the quoted values weren't visible in the PR description.
2022-10-26 12:22:05 +01:00
Edoardo Pirovano
3c7f7914e6 Merge pull request #1324 from github/mergeback/v2.1.29-to-main-ec3cf9c6
Mergeback v2.1.29 refs/heads/releases/v2 into main
2022-10-26 11:08:36 +01:00
github-actions[bot]
e76b89fe31 Update checked-in dependencies 2022-10-26 08:59:39 +00:00
github-actions[bot]
98f6408f34 Update changelog and version after v2.1.29 2022-10-26 08:45:16 +00:00
Edoardo Pirovano
ec3cf9c605 Merge pull request #1323 from github/update-v2.1.29-4b53723d
Merge main into releases/v2
2022-10-26 09:42:45 +01:00
github-actions[bot]
f246f20ec4 Update changelog for v2.1.29 2022-10-26 08:19:54 +00:00
Edoardo Pirovano
4b53723d6b Merge pull request #1320 from github/edoardo/2.11.2-bump
Bump default CodeQL version to 2.11.2
2022-10-25 09:41:40 +01:00
Andrew Eisenberg
de9f112cd1 Merge pull request #1318 from github/aeisenberg/bump-min-version
Bumps the min version for code scanning config in the cli
2022-10-24 09:47:34 -07:00
Andrew Eisenberg
f1a4ff53b4 Bumps the min version for code scanning config in the cli
2.11.1 has a fix in it for parsing query filters.
2022-10-24 09:20:10 -07:00
Edoardo Pirovano
624418cb40 Bump default CodeQL version to 2.11.2 2022-10-24 13:08:52 +01:00
Edoardo Pirovano
f0a1281661 Merge pull request #1315 from github/mergeback/v2.1.28-to-main-cc7986c0
Mergeback v2.1.28 refs/heads/releases/v2 into main
2022-10-18 16:48:30 +01:00
github-actions[bot]
f0b3ef9e9c Update checked-in dependencies 2022-10-18 13:18:55 +00:00
Cornelius Riemenschneider
3920e2d8ae Merge pull request #1313 from github/criemen/ghes-31-deprecation
GHES 3.1 has been deprecated end of June 2022.
2022-10-18 15:17:40 +02:00
github-actions[bot]
be55631a21 Update changelog and version after v2.1.28 2022-10-18 12:54:45 +00:00
Edoardo Pirovano
cc7986c02b Merge pull request #1311 from github/update-v2.1.28-96c8872f
Merge main into releases/v2
2022-10-18 13:52:03 +01:00
Cornelius Riemenschneider
f3a27d6945 GHES 3.1 has been deprecated end of June 2022.
Therefore, we do not need to support the workaround for
action telemetry anymore.
2022-10-18 14:20:52 +02:00
github-actions[bot]
aecd03235b Update changelog for v2.1.28 2022-10-18 09:48:42 +00:00
Henry Mercer
96c8872f06 Merge pull request #1310 from github/henrymercer/v2-mergeback
Mergeback `releases/v2` into `main`
2022-10-18 10:34:45 +01:00
Henry Mercer
b709139433 Merge branch 'releases/v2' into henrymercer/v2-mergeback 2022-10-17 20:29:45 +01:00
Andrew Eisenberg
5dd73678a4 Merge pull request #1308 from github/aeisenberg/fix-merge
Fix the merge into releases/v2
2022-10-17 09:22:33 -07:00
Andrew Eisenberg
4c1ccc4a5e Fix CHANGELOG 2022-10-17 08:38:17 -07:00
Andrew Eisenberg
c2f5185572 Merge commit 'e4cc4a2f' into releases/v2 2022-10-17 08:35:27 -07:00
Andrew Eisenberg
297ec80a46 Merge pull request #1301 from github/aeisenberg/remove-set-output
Removes deprecated set-output usage
2022-10-14 10:16:13 -07:00
Andrew Eisenberg
b0f8861cea Update CHANGELOG.md
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2022-10-13 13:51:27 -07:00
Andrew Eisenberg
2ee8edc7f0 Update changelog 2022-10-13 13:36:52 -07:00
Andrew Eisenberg
eba983fb9b Removes deprecated set-output usage
For more information see
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

This change bumps a bunch of the internal actions packages. Note that
the only required version change is `actions/core` to 1.10.0. The others
are not required, but seem like a reasonable idea.

It also changes all of the workflows that use `set-output`.
2022-10-13 13:25:43 -07:00
Andrew Eisenberg
e2481f79eb Merge pull request #1299 from github/dependabot/npm_and_yarn/octokit/types-8.0.0
Bump @octokit/types from 7.1.1 to 8.0.0
2022-10-13 11:22:02 -07:00
github-actions[bot]
17ae47e4b4 Update checked-in dependencies 2022-10-13 17:13:54 +00:00
dependabot[bot]
2c4b2a1b38 Bump @octokit/types from 7.1.1 to 8.0.0
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 7.1.1 to 8.0.0.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v7.1.1...v8.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 17:01:33 +00:00
Edoardo Pirovano
0c7f674831 Merge pull request #1298 from github/edoardo/caching-hosted
TRAP Caching: Disable on self-hosted runners
2022-10-13 15:19:42 +01:00
Edoardo Pirovano
2fafb297de TRAP Caching: Disable on self-hosted runners 2022-10-13 14:31:54 +01:00
Andrew Eisenberg
160e3fe79a Merge pull request #1284 from github/aeisenberg/ff-refactoring 2022-10-12 10:41:10 -07:00
Andrew Eisenberg
34d48f825c Merge remote-tracking branch 'upstream/main' into aeisenberg/ff-refactoring 2022-10-12 08:36:16 -07:00
Edoardo Pirovano
e862e8fc76 Merge pull request #1296 from github/edoardo/improve-docs
Improve documentation comment
2022-10-12 08:35:01 +01:00
Edoardo Pirovano
099de40ecf Merge pull request #1297 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-10-12 08:07:46 +01:00
GitHub
cc00a9d478 Update supported GitHub Enterprise Server versions. 2022-10-12 00:20:41 +00:00
Edoardo Pirovano
082bdf06b5 Improve documentation comment 2022-10-11 22:38:30 +01:00
Edoardo Pirovano
44edb7c4b5 Merge pull request #1293 from github/edoardo/fix-with-timeout
Fix `withTimeout` helper function
2022-10-11 21:29:20 +01:00
Henry Mercer
43c3ed9c28 More feature flag renaming 2022-10-11 11:52:55 -07:00
Andrew Eisenberg
701cea34ba More renaming 2022-10-11 10:39:40 -07:00
Alexander Eyers-Taylor
c27c6c7642 Merge pull request #1294 from github/alexet/release-codeql-2.11.1-v2
Update bundle for 2.11.1
2022-10-11 18:24:36 +01:00
Edoardo Pirovano
adb28963c0 Further update to reflect a conversation with @henrymercer 2022-10-11 16:59:48 +01:00
alexet
362f9a2522 Update bundle for 2.11.1
This version has the fix applied
2022-10-11 12:05:46 +01:00
Edoardo Pirovano
6e1dab28b6 Fix withTimeout helper function 2022-10-11 10:04:21 +01:00
Andrew Eisenberg
6c869f8b03 Fix typos 2022-10-07 16:27:25 -07:00
Andrew Eisenberg
919e4caca1 Merge remote-tracking branch 'upstream/main' into aeisenberg/ff-refactoring 2022-10-07 14:14:09 -07:00
Angela P Wen
c6c7d293ca Clarify merging with merge commit (#1291)
* Clarify merging with merge commit

* Add merge commit message to mergeback PRs
2022-10-07 19:05:42 +00:00
Andrew Eisenberg
1a17c59fb0 More renaming
Avoid usage of "Feature Flag" unless we are talking specifically about
the response from github features api. Otherwise, use terms like
"Toggleable features".

Note both "toggleable" and "togglable" appear to be valid spellings of
the word. I chose the first for no good reason.
2022-10-07 11:33:32 -07:00
github-actions[bot]
3d39294047 Mergeback v2.1.27 refs/heads/releases/v2 into main (#1289)
* Merge main into releases/v2 (#1287)

* Update changelog and version after v2.1.26

* Update checked-in dependencies

* Don't check for Go logs on failure (#1279)

* Update supported GitHub Enterprise Server versions. (#1275)

Co-authored-by: GitHub <noreply@github.com>

* TRAP Caching: Add timeouts to upload/download operations

* Add logging statements declaring state of the cli_config_file_enabled

It's possible to determine this otherwise, but this makes it easier to
spot.

* Avoid using single value as array

The user config parser in the CLI doesn't yet support it.

* Extract logging statements to separate function

* Correctly report CodeQL version when using cache (#1259)

* Correctly report CodeQL version when using cache

* Add JS generated files

* Add test for return value of `setupCodeQL`

* Fill in missing return value comment

* Convert "Invalid source root" errors to UserErrors

* Add changelog note for Go extraction reconciliation (#1286)

* Add changelog note for Go extraction reconciliation

* Update CHANGELOG.md

Co-authored-by: Henry Mercer <henrymercer@github.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Tweaks from PR review

Co-authored-by: Henry Mercer <henrymercer@github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Update changelog for v2.1.27

Co-authored-by: github-actions[bot] <github-actions@github.com>
Co-authored-by: Chuan-kai Lin <cklin@github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Edoardo Pirovano <edoardo.pirovano@gmail.com>
Co-authored-by: Edoardo Pirovano <6748066+edoardopirovano@users.noreply.github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>

* Update changelog and version after v2.1.27

* Update checked-in dependencies

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@github.com>
Co-authored-by: Chuan-kai Lin <cklin@github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Edoardo Pirovano <edoardo.pirovano@gmail.com>
Co-authored-by: Edoardo Pirovano <6748066+edoardopirovano@users.noreply.github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-10-07 02:22:33 +00:00
Andrew Eisenberg
b27aed78f5 Extract GitHubFeatureFlags to a separate class
Internal refactoring so that `GitHubFeatureFlags` is
private only. The public facing class is `Features`.
2022-10-06 18:00:40 -07:00
github-actions[bot]
807578363a Merge main into releases/v2 (#1287)
* Update changelog and version after v2.1.26

* Update checked-in dependencies

* Don't check for Go logs on failure (#1279)

* Update supported GitHub Enterprise Server versions. (#1275)

Co-authored-by: GitHub <noreply@github.com>

* TRAP Caching: Add timeouts to upload/download operations

* Add logging statements declaring state of the cli_config_file_enabled

It's possible to determine this otherwise, but this makes it easier to
spot.

* Avoid using single value as array

The user config parser in the CLI doesn't yet support it.

* Extract logging statements to separate function

* Correctly report CodeQL version when using cache (#1259)

* Correctly report CodeQL version when using cache

* Add JS generated files

* Add test for return value of `setupCodeQL`

* Fill in missing return value comment

* Convert "Invalid source root" errors to UserErrors

* Add changelog note for Go extraction reconciliation (#1286)

* Add changelog note for Go extraction reconciliation

* Update CHANGELOG.md

Co-authored-by: Henry Mercer <henrymercer@github.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Tweaks from PR review

Co-authored-by: Henry Mercer <henrymercer@github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Update changelog for v2.1.27

Co-authored-by: github-actions[bot] <github-actions@github.com>
Co-authored-by: Chuan-kai Lin <cklin@github.com>
Co-authored-by: Angela P Wen <angelapwen@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: Edoardo Pirovano <edoardo.pirovano@gmail.com>
Co-authored-by: Edoardo Pirovano <6748066+edoardopirovano@users.noreply.github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-10-06 23:17:09 +00:00
Angela P Wen
e4cc4a2fef Add changelog note for Go extraction reconciliation (#1286)
* Add changelog note for Go extraction reconciliation

* Update CHANGELOG.md

Co-authored-by: Henry Mercer <henrymercer@github.com>

* Update CHANGELOG.md

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>

* Tweaks from PR review

Co-authored-by: Henry Mercer <henrymercer@github.com>
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-10-06 22:18:52 +00:00
Andrew Eisenberg
5915e70486 Address comments from review 2022-10-06 13:14:06 -07:00
Andrew Eisenberg
6de05e4b24 Rename FeatureFlag -> Feature 2022-10-06 13:06:10 -07:00
Andrew Eisenberg
b16314e16c Address comments from review
- Change env var name for `MlPoweredQueriesEnabled`
- Throw error if minimumVersion is specified, but CodeQL argument is not
  supplied.
- Fix failing tests. Note that I removed a config-utils test because it
  is no longer relevant since we handle codeql minimum versions in the
  `getValue` function.
2022-10-06 12:29:58 -07:00
Andrew Eisenberg
84dffe700c Merge pull request #1282 from github/aeisenberg/user-error-source-root
Convert "Invalid source root" errors to UserErrors
2022-10-06 10:48:35 -07:00
Andrew Eisenberg
9e044c5432 Convert "Invalid source root" errors to UserErrors 2022-10-06 09:28:29 -07:00
Andrew Eisenberg
e5c3375225 Refactor handling of feature flags
This commit centralizes how feature flags are handled. All feature flags
must now add an entry in the `featureFlagConfig` dictionary. This
dictionary associates the flag with an environment variable name and
optionally a minimum version for CodeQL.

The new logic is:

- if the environment variable is set to false: disabled
- if the minimum version requirement specified and met: disabled
- if the environment variable is set to true: enable
- Otherwise check feature flag enablement from the server
2022-10-05 16:40:56 -07:00
Angela P Wen
24c8de16fa Correctly report CodeQL version when using cache (#1259)
* Correctly report CodeQL version when using cache

* Add JS generated files

* Add test for return value of `setupCodeQL`

* Fill in missing return value comment
2022-10-05 09:16:42 -07:00
Andrew Eisenberg
f359ba7af1 Merge pull request #1281 from github/aeisenberg/cli-config-processing
Add logging statements declaring state of the cli_config_file_enabled
2022-10-04 12:30:23 -07:00
Andrew Eisenberg
5960ce1190 Extract logging statements to separate function 2022-10-03 09:35:40 -07:00
Andrew Eisenberg
59fbe34861 Avoid using single value as array
The user config parser in the CLI doesn't yet support it.
2022-10-02 17:13:04 -07:00
Andrew Eisenberg
6ace05baa3 Add logging statements declaring state of the cli_config_file_enabled
It's possible to determine this otherwise, but this makes it easier to
spot.
2022-10-01 12:03:01 -07:00
Edoardo Pirovano
4cf80047d0 Merge pull request #1280 from github/edoardo/add-timeout
TRAP Caching: Add timeouts to upload/download operations
2022-09-30 14:13:18 +01:00
Edoardo Pirovano
c0641ea1d3 TRAP Caching: Add timeouts to upload/download operations 2022-09-30 13:18:46 +01:00
github-actions[bot]
61b87c69a6 Update supported GitHub Enterprise Server versions. (#1275)
Co-authored-by: GitHub <noreply@github.com>
2022-09-29 22:37:10 +00:00
Angela P Wen
57719e015c Don't check for Go logs on failure (#1279) 2022-09-29 14:23:35 -07:00
Chuan-kai Lin
0831a67a20 Merge pull request #1277 from github/mergeback/v2.1.26-to-main-e0e5ded3
Mergeback v2.1.26 refs/heads/releases/v2 into main
2022-09-29 12:37:55 -07:00
github-actions[bot]
ffa74c5cb3 Update checked-in dependencies 2022-09-29 17:59:28 +00:00
github-actions[bot]
885b397f2e Update changelog and version after v2.1.26 2022-09-29 17:46:49 +00:00
Chuan-kai Lin
e0e5ded33c Merge pull request #1276 from github/update-v2.1.26-97054749
Merge main into releases/v2
2022-09-29 10:44:20 -07:00
github-actions[bot]
c60b8543e6 Update changelog for v2.1.26 2022-09-29 16:06:08 +00:00
Andrew Eisenberg
97054749c9 Merge pull request #1274 from github/aeisenberg/update-checks-script
Update the checks script
2022-09-29 08:34:28 -07:00
Andrew Eisenberg
fb0f74784f Update the checks script
Avoid requiring test-setup-python-scripts checks.
2022-09-28 16:04:46 -07:00
Angela P Wen
3400e51bc8 Add dotnet env variable to workflow (#1273) 2022-09-28 12:45:19 -07:00
Andrew Eisenberg
74740eef3d Merge pull request #1270 from github/aeisenberg/cli-config-feature-flag
Add the `CliConfigFileEnabled` feature flag
2022-09-28 12:43:09 -07:00
Andrew Eisenberg
1ec8ea99ee Merge branch 'main' into aeisenberg/cli-config-feature-flag 2022-09-28 10:39:05 -07:00
Chuan-kai Lin
2466f0ce2c Merge pull request #1267 from github/cklin/codeql-cli-2.11.0
Update default CodeQL version to 2.11.0
2022-09-28 09:41:38 -07:00
Chuan-kai Lin
a711c7623d Update default CodeQL version to 2.11.0 2022-09-28 09:04:11 -07:00
Henry Mercer
39064e0f9b Merge pull request #1272 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-09-28 10:52:55 +01:00
Edoardo Pirovano
28c63d131f Merge pull request #1268 from jsoref/rev-parse
Correct program name
2022-09-28 09:59:29 +01:00
Josh Soref
a4e4529299 Correct program name 2022-09-27 22:08:31 -04:00
GitHub
cc4ee05a07 Update supported GitHub Enterprise Server versions. 2022-09-28 00:21:45 +00:00
Angela P Wen
1f0700d1c0 Update unset environment variables PR check (#1269)
* Only test Java for CLI v2.5+

* Improve bash code style

* Set Actions error messages

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-09-27 15:55:05 -07:00
Andrew Eisenberg
cab46c529f Update src/util.test.ts 2022-09-27 15:49:25 -07:00
Andrew Eisenberg
e37b0d6470 Add the CliConfigFileEnabled feature flag
Also, wire it up to the `useCodeScanningConfigInCli` function.
2022-09-27 07:58:31 -07:00
Edoardo Pirovano
314ede696b Merge pull request #1266 from github/edoardo/fix-unit-test
Fix broken unit test
2022-09-26 15:56:10 +01:00
Edoardo Pirovano
b96c7546c1 Fix broken unit test 2022-09-26 15:17:36 +01:00
Edoardo Pirovano
4c8f13758e Merge pull request #1265 from github/edoardo/minimum-cache-size
TRAP Caching: Skip uploading of small caches
2022-09-23 15:49:56 +01:00
Edoardo Pirovano
b98b2def63 TRAP Caching: Skip uploading of small caches 2022-09-23 15:22:31 +01:00
Henry Mercer
a643eb3621 Merge pull request #1263 from github/mergeback/v2.1.25-to-main-86f3159a
Mergeback v2.1.25 refs/heads/releases/v2 into main
2022-09-21 21:03:20 +01:00
github-actions[bot]
6188cbdeb9 Update checked-in dependencies 2022-09-21 19:05:30 +00:00
github-actions[bot]
4706007119 Update changelog and version after v2.1.25 2022-09-21 18:42:24 +00:00
Henry Mercer
86f3159a69 Merge pull request #1261 from github/update-v2.1.25-ff5ca122
Merge main into releases/v2
2022-09-21 19:31:24 +01:00
github-actions[bot]
d1e2e02bee Update changelog for v2.1.25 2022-09-21 15:40:11 +00:00
Henry Mercer
ff5ca122ed Merge pull request #1257 from github/rasmuswl/fix-ubuntu22.04-venv-creation
python-setup: Fix venv creation in Ubuntu 22.04
2022-09-21 16:27:55 +01:00
Rasmus Wriedt Larsen
32ca2cf500 Apply suggestions from code review
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-09-21 16:06:07 +02:00
Rasmus Wriedt Larsen
b2fc1e178e python-setup: Disable python2 tests on ubuntu-22.04 2022-09-21 15:36:13 +02:00
Rasmus Wriedt Larsen
8a893ddf18 python-setup: Flush even more 2022-09-21 15:36:13 +02:00
Rasmus Wriedt Larsen
93ba53f2de add missing spaces 2022-09-21 15:36:13 +02:00
Rasmus Wriedt Larsen
1fa5d72846 python-setup: Fail early if installing for Python 2, and python2 not available 2022-09-21 14:50:13 +02:00
Rasmus Wriedt Larsen
417059fdb2 Merge pull request #1258 from github/rasmuswl/poetry-v1.2
python-setup: Add support for Poetry 1.2
2022-09-21 14:03:27 +02:00
Rasmus Wriedt Larsen
ca8a78d5f3 python-setup: flush at the end of _check_call 2022-09-21 10:02:51 +02:00
Rasmus Wriedt Larsen
2264307214 python-setup: change env passing 2022-09-21 10:01:57 +02:00
Rasmus Wriedt Larsen
3f97671248 python-setup: run tests on Ubuntu 22.04 2022-09-21 09:08:04 +02:00
Rasmus Wriedt Larsen
c2c7bba5f7 Merge pull request #1256 from github/rasmuswl/newer-virtualenv
python-setup: Allow newest `virtualenv`
2022-09-21 09:05:06 +02:00
Rasmus Wriedt Larsen
1309aafb7d Update CHANGELOG.md
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-09-20 15:43:10 +02:00
Henry Mercer
038242a7f0 Merge pull request #1254 from github/henrymercer/improve-release-pr-description
Improve the descriptions of PRs created by the release process
2022-09-20 12:12:17 +01:00
Rasmus Wriedt Larsen
70509c3884 python-setup: Add support for Poetry 1.2 2022-09-19 12:21:43 +02:00
Rasmus Wriedt Larsen
e1ce6e3115 python-setup: Fix venv creation in Ubuntu 22.04
Fixes https://github.com/github/codeql-action/issues/1249
2022-09-19 09:49:53 +02:00
Rasmus Wriedt Larsen
5ffcfe95cc python-setup: Allow newest virtualenv
Context for previous version is
https://github.com/github/codeql-action/pull/862

Locally, I was able to install `20.15.1` with Python2.

I don't see any reason why python3 version should be restricted.
2022-09-16 20:49:42 +02:00
Henry Mercer
aaca8193b1 Merge pull request #1252 from github/mergeback/v2.1.24-to-main-904260d7
Mergeback v2.1.24 refs/heads/releases/v2 into main
2022-09-16 16:48:24 +01:00
Henry Mercer
2e9fbe39e1 Add advice to the mergeback PR on how to run the checks quicker 2022-09-16 15:00:57 +01:00
Henry Mercer
fb28913d5c Add advice to the backport PR on how to run the checks quicker 2022-09-16 14:54:21 +01:00
github-actions[bot]
e0ef82e596 Update checked-in dependencies 2022-09-16 13:51:53 +00:00
github-actions[bot]
9f79e5fbcf Update changelog and version after v2.1.24 2022-09-16 13:29:57 +00:00
Henry Mercer
904260d7d9 Merge pull request #1250 from github/update-v2.1.24-34aa5a55
Merge main into releases/v2
2022-09-16 14:26:13 +01:00
Edoardo Pirovano
b15cc0075a Merge pull request #1251 from github/edoardo/trap-caching-changenote
Add CHANGELOG note for TRAP caching
2022-09-16 13:54:33 +01:00
Edoardo Pirovano
82495d8d86 Add CHANGELOG note for TRAP caching 2022-09-16 11:46:50 +01:00
github-actions[bot]
21c716dd69 Update changelog for v2.1.24 2022-09-16 10:19:13 +00:00
Henry Mercer
34aa5a554b Merge pull request #1242 from github/henrymercer/go-more-backwards-compat
Go extraction reconciliation: Ensure backwards compatibility for multi-language builds
2022-09-16 11:05:41 +01:00
Henry Mercer
9207340122 Merge pull request #1239 from github/dependabot/npm_and_yarn/uuid-9.0.0
Bump uuid from 8.3.2 to 9.0.0
2022-09-16 11:04:59 +01:00
Henry Mercer
fefa6f57a4 Merge pull request #1247 from github/mergeback/v2.1.23-to-main-6a38b7d4
Mergeback v2.1.23 refs/heads/releases/v2 into main
2022-09-16 11:03:24 +01:00
Henry Mercer
4f104676ac Remove now-duplicated PR titles from release PR descriptions 2022-09-15 16:20:05 +01:00
github-actions[bot]
e6ad3e0b35 Update checked-in dependencies 2022-09-15 09:19:25 +00:00
github-actions[bot]
f84e389feb Update changelog and version after v2.1.23 2022-09-15 09:07:27 +00:00
Henry Mercer
6a38b7d4a1 Merge pull request #1246 from github/update-v2.1.23-fd4dc5bf
Merge main into releases/v2
2022-09-15 10:04:26 +01:00
github-actions[bot]
99d0a6bc15 Update changelog for v2.1.23 2022-09-14 18:34:02 +00:00
Henry Mercer
f32e161cdd Improve warning when using autobuild with multi-language builds 2022-09-13 16:53:02 +01:00
Henry Mercer
4cc95769d4 Improve variable name 2022-09-13 16:50:41 +01:00
Cornelius Riemenschneider
fd4dc5bf31 Merge pull request #1244 from github/criemen/remove-lua-tracer-ff
Remove the lua tracer feature flag check from the codeql-action.
2022-09-13 17:49:47 +02:00
Cornelius Riemenschneider
c2560331fc Fix runner integration test.
This test is broken, as it first sets environment variables, and then
immediately unsets it again.
This only worked by chance with the legacy tracer, and breaks the Lua
tracer.
2022-09-13 13:48:03 +00:00
Henry Mercer
0a38743d1a Merge pull request #1240 from github/henrymercer/2.10.5-bump
Bump CodeQL version to 2.10.5
2022-09-13 14:11:32 +01:00
Cornelius Riemenschneider
3038e979a8 Remove the lua tracer feature flag check from the codeql-action.
Always defer to the CLI on the Lua tracer state from now on.
2022-09-13 11:23:32 +00:00
Henry Mercer
bde5694fb7 Comment why we don't run multiple autobuilders for other languages 2022-09-12 18:25:20 +01:00
Henry Mercer
40e0374c6f Ensure backwards compat for multi-language builds with Go reconciliation 2022-09-12 18:24:46 +01:00
Henry Mercer
0d2fa3c636 Support autobuilding multiple languages in autobuild Action 2022-09-12 17:35:32 +01:00
Henry Mercer
ff575f231d Add changelog note 2022-09-08 18:31:08 +01:00
Henry Mercer
4a8d26e2bd Bump CodeQL version to 2.10.5 2022-09-08 18:29:45 +01:00
github-actions[bot]
f87e7a6293 Update checked-in dependencies 2022-09-08 17:28:17 +00:00
Andrew Eisenberg
9ba4d500aa Merge pull request #1221 from github/aeisenberg/ghes-pack-download
Add support for downloading packs from GHES
2022-09-08 10:02:41 -07:00
dependabot[bot]
ace5545513 Bump uuid from 8.3.2 to 9.0.0
Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.2 to 9.0.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 17:02:40 +00:00
Andrew Eisenberg
6085805a3a Append / to end of registries url
Avoids a bug in 2.10.4. Also, add some better handling for invalid
registries blocks.
2022-09-08 08:00:24 -07:00
David Verdeguer
21ae865bef Merge pull request #1238 from github/daverlo/workflow-event-name
Add workflowEventName util function
2022-09-08 10:02:03 +02:00
Andrew Eisenberg
59744464eb Fix unit tests 2022-09-07 16:10:34 -07:00
Andrew Eisenberg
aa434aaed6 Only run the init-with-registries check on nightly 2022-09-07 15:15:55 -07:00
Andrew Eisenberg
5dcb9dec2d Update changelog and input descriptions 2022-09-07 14:38:58 -07:00
Andrew Eisenberg
4fa3e8b483 Gate the new registries input behind version constraints 2022-09-07 14:38:44 -07:00
David Verdeguer
063e083705 Fix linting 2022-09-07 22:45:34 +02:00
David Verdeguer
a03f3bd585 Build js 2022-09-07 09:45:19 +02:00
David Verdeguer
335aa5e39f Add test for workflowEventName 2022-09-07 09:45:08 +02:00
David Verdeguer
add14375d5 Add workflowEventName 2022-09-07 00:05:40 +02:00
Andrew Eisenberg
376fea671d Clarify description of registries input 2022-09-06 14:06:30 -07:00
Andrew Eisenberg
bf97a6da5b Apply suggestions from code review 2022-09-06 10:41:32 -07:00
Andrew Eisenberg
7e086b240c Merge remote-tracking branch 'upstream/main' into aeisenberg/ghes-pack-download 2022-09-06 10:22:00 -07:00
Edoardo Pirovano
8cdb7d8545 Merge pull request #1234 from github/edoardo/more-tolerant
TRAP Caching: Be tolerant to not finding the extractor
2022-09-05 11:04:57 +01:00
Edoardo Pirovano
299b77421b TRAP Caching: Be tolerant to not finding the extractor 2022-09-05 10:38:21 +01:00
Andrew Eisenberg
abdf26c28f Convert from json to yaml for registries input 2022-09-02 15:03:51 -07:00
Henry Mercer
03e3453102 Merge pull request #1228 from github/henrymercer/start-go-tracing-in-init
Make Go a traced language when Go extraction reconciliation is enabled
2022-09-02 22:29:08 +01:00
Henry Mercer
ab4197c609 Merge remote-tracking branch 'origin/main' into henrymercer/start-go-tracing-in-init 2022-09-02 19:59:29 +01:00
Henry Mercer
fc2f344141 Reuse getApiDetails code 2022-09-02 19:59:18 +01:00
Henry Mercer
85ba42aa69 Merge pull request #1231 from github/henrymercer/fix-running-tests-on-node18.8
Fix running tests on Node 18.8
2022-09-02 19:42:58 +01:00
Andrew Eisenberg
b0443622cd Merge branch 'main' into aeisenberg/ghes-pack-download 2022-09-02 11:32:07 -07:00
Henry Mercer
bea5e4b220 Update ava to 4.3.3
The [release notes](https://github.com/avajs/ava/releases/tag/v4.3.3)
mention compatibility with Node 18.8.
2022-09-02 18:02:07 +01:00
Henry Mercer
4b5dea8eed Address review comments 2022-09-02 17:54:53 +01:00
Henry Mercer
62b4f237aa Merge remote-tracking branch 'origin/main' into henrymercer/start-go-tracing-in-init 2022-09-02 17:39:17 +01:00
Henry Mercer
21530f507f Merge pull request #1219 from github/angelapwen/autobuild-in-analyze
Autobuild Go in `analyze` if not already built
2022-09-02 17:36:54 +01:00
Andrew Eisenberg
e9b47b1898 Change to using a single input 2022-09-01 16:07:26 -07:00
Henry Mercer
70426bb879 Merge pull request #1229 from github/henrymercer/reenable-lua-tracing-go-windows
Run Lua tracing for Go on Windows in CLI 2.10.4+
2022-09-01 18:24:46 +01:00
Henry Mercer
ab396da825 Run Lua tracing for Go on Windows in CLI 2.10.4+
A bug preventing us from using Lua tracing for Go on Windows is fixed
in CLI 2.10.4+, so we
can now resume using Lua tracing for Go on Windows when using these
CLI versions.
2022-09-01 16:58:23 +01:00
Henry Mercer
6699d47420 Work around test -v not being available in Mac Bash 2022-09-01 16:49:39 +01:00
Henry Mercer
1d311fe8e5 Add PR checks for reconciled tracing with autobuilder and build steps 2022-09-01 15:43:49 +01:00
Henry Mercer
e303e2c65b Update legacy workflow PR check
We now trace in init when using reconciled tracing, so we no longer need
to set the `CODEQL_EXTRACTOR_GO_BUILD_TRACING` environment variable.
2022-09-01 15:43:17 +01:00
Henry Mercer
e460fa2e94 Tidy up createdDBForScannedLanguages
Now the test is fixed, we can simplify by introducing an async call.
2022-09-01 15:02:47 +01:00
Henry Mercer
6d34731d93 Make createdDBForScannedLanguages test robust to new async calls
Previously the test depended on `createdDBForScannedLanguages` making no
async calls prior to `codeql resolve extractor`.
2022-09-01 14:59:39 +01:00
Henry Mercer
cf5d465980 Trace Go when Go extraction reconciliation is enabled 2022-09-01 14:42:59 +01:00
Edoardo Pirovano
d05538fa74 Merge pull request #1227 from github/mergeback/v2.1.22-to-main-b398f525
Mergeback v2.1.22 refs/heads/releases/v2 into main
2022-09-01 13:24:01 +01:00
Henry Mercer
fe1bd9ac76 Improve clarity of logging 2022-09-01 12:56:03 +01:00
github-actions[bot]
62fab91947 Update checked-in dependencies 2022-09-01 11:27:52 +00:00
github-actions[bot]
a3607ca1f7 Update changelog and version after v2.1.22 2022-09-01 10:50:36 +00:00
Edoardo Pirovano
b398f525a5 Merge pull request #1225 from github/update-v2.1.22-a5966ad4
Merge main into releases/v2
2022-09-01 11:48:24 +01:00
github-actions[bot]
b0f41e06da Update changelog for v2.1.22 2022-09-01 09:08:14 +00:00
Edoardo Pirovano
a5966ad4f1 Merge pull request #1224 from github/edoardo/2.10.4-bump
Bump CodeQL version to 2.10.4
2022-08-31 14:58:19 +01:00
Edoardo Pirovano
8c692b37a0 Pin poetry to 1.1 2022-08-31 13:35:12 +01:00
Henry Mercer
8e0846caf0 Check TRAP directory exists first 2022-08-31 13:22:39 +01:00
Henry Mercer
955290300a Fix language inclusion test
`in` checks the indices of an array, not the values.
2022-08-31 13:20:41 +01:00
Henry Mercer
14d7039828 Add logging for determining whether to run the Go autobuilder 2022-08-31 13:20:02 +01:00
Henry Mercer
b42a495e8a Fix TRAP directory location 2022-08-31 13:19:16 +01:00
Henry Mercer
5b4b44c9d6 Add PR check for reconciled tracing with legacy workflow 2022-08-31 13:19:16 +01:00
Henry Mercer
e466e75875 Simplify doesGoExtractionOutputExist implementation
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-31 13:19:16 +01:00
Henry Mercer
fff56ee004 Add environment variable for enabling Go extraction reconcilation
This will enable us to test this behavior in PR checks.
Also simplify and add some more detailed documentation.
2022-08-31 13:19:16 +01:00
Henry Mercer
8dc468564f Use a more explicit name for checking Go extraction output 2022-08-31 13:19:16 +01:00
Angela P Wen
215c3cb4bb Autobuild Go in analyze step 2022-08-31 13:19:16 +01:00
Edoardo Pirovano
693b97bf50 Bump CodeQL version to 2.10.4 2022-08-31 11:49:32 +01:00
Andrew Eisenberg
1d92118146 Add integration test for using registries-auth-tokens 2022-08-30 15:56:08 -07:00
Andrew Eisenberg
0e98efa2bb Add support for downloading packs from GHES
This change adds:

- new `registries` block allowed in code scanning config file
- new `registries-auth-tokens` input in init action
- Change the downloadPacks function so that it accepts new parameters:
    - registries block
    - api auth
- Generate a qlconfig.yml file with the registries block if one is
  supplied. Use this file when downloading packs.
- temporarily set the `GITHUB_TOKEN` and `CODEQL_REGISTRIES_AUTH` based
  on api auth

TODO:

1. integration test
2. handle pack downloads when the config is generated by the CLI
2022-08-30 10:04:30 -07:00
Andrew Eisenberg
c7bb8946b2 Update changelog 2022-08-30 10:00:21 -07:00
Andrew Eisenberg
d92a91c5c4 Merge pull request #1218 from github/aeisenberg/move-pack-download-to-init
Move calls to pack download to the init action
2022-08-30 09:58:46 -07:00
Andrew Eisenberg
7294b404d8 Fix call to endGroup
Also, rename variable and change a comment.
2022-08-30 09:16:05 -07:00
Andrew Eisenberg
354bc9f629 Add Changelog entry 2022-08-26 16:05:06 -07:00
Andrew Eisenberg
0a2b0d236c Moves calls to pack download to the init action
This ensures all steps to gather queries happens in the init action.
This is where checking out queries in other repos happens as well.
2022-08-26 16:04:57 -07:00
Henry Mercer
a59fbe2208 Merge pull request #1215 from github/dependabot/npm_and_yarn/octokit/types-7.1.1
Bump @octokit/types from 6.21.1 to 7.1.1
2022-08-25 19:10:46 +01:00
github-actions[bot]
abafa5bdc1 Update checked-in dependencies 2022-08-25 17:19:40 +00:00
dependabot[bot]
34de8fdd99 Bump @octokit/types from 6.21.1 to 7.1.1
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 6.21.1 to 7.1.1.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v6.21.1...v7.1.1)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-25 17:00:59 +00:00
Edoardo Pirovano
9128f1cb71 Merge pull request #1213 from github/mergeback/v2.1.21-to-main-c7f292ea
Mergeback v2.1.21 refs/heads/releases/v2 into main
2022-08-25 16:23:17 +01:00
github-actions[bot]
54d57993da Update checked-in dependencies 2022-08-25 13:11:11 +00:00
github-actions[bot]
0ee5049d92 Update changelog and version after v2.1.21 2022-08-25 12:52:15 +00:00
Edoardo Pirovano
c7f292ea4f Merge pull request #1212 from github/update-v2.1.21-21bf3087
Merge main into releases/v2
2022-08-25 13:49:33 +01:00
github-actions[bot]
00ef1ee757 Update changelog for v2.1.21 2022-08-25 12:16:17 +00:00
Chris Gavin
21bf3087a5 Merge pull request #1211 from github/get-default-branch-correctly-schedule
When running on a schedule, make a better guess about whether we're analyzing the default branch.
2022-08-25 13:06:31 +01:00
Chris Gavin
5960bffd3f When running on a schedule, make a better guess about whether we're analyzing the default branch. 2022-08-25 10:58:16 +01:00
Edoardo Pirovano
92c650bfbd Merge pull request #1210 from github/edoardo/record-db-creation-time
Telemetry: Record DB creation time
2022-08-24 15:14:54 +01:00
Edoardo Pirovano
8b45ef3845 Telemetry: Record DB creation time 2022-08-24 14:31:37 +01:00
Henry Mercer
e7d4da3fa2 Merge pull request #1209 from github/henrymercer/fix-go-tracing-tests
Fix Go tracing on Windows, and fix tests
2022-08-24 13:34:51 +01:00
Henry Mercer
182342cdd7 Remove unguarded Actions library query
It is enough to pass the checks now that we only use the runner for PR
checks.
2022-08-24 11:50:07 +01:00
Henry Mercer
e195431677 Override CODEQL_EXTRACTOR_GO_BUILD_TRACING with on when it's true 2022-08-24 11:48:32 +01:00
Henry Mercer
3069613ebd Prevent hangs in Go autobuild tests due to .NET keychain prompts 2022-08-24 10:35:13 +01:00
Henry Mercer
569f78c82d Add changelog note 2022-08-23 20:03:54 +01:00
Henry Mercer
ab6508ab87 Disable Lua tracing for Go on Windows
This is currently broken in CLI versions 2.10.3 and earlier.
2022-08-23 20:03:33 +01:00
Henry Mercer
c18ed56977 Warn about invalid value for CODEQL_EXTRACTOR_GO_BUILD_TRACING 2022-08-23 20:03:33 +01:00
Henry Mercer
d5ad81bcd4 Fix Go custom tracing tests
These were supplying CODEQL_EXTRACTOR_GO_BUILD_TRACING=true rather than
CODEQL_EXTRACTOR_GO_BUILD_TRACING=on,
therefore tracing wasn't being tested.
2022-08-23 20:03:32 +01:00
Andrew Eisenberg
1cd5043ced Merge pull request #1208 from github/aeisenberg/better-error-message
More readable error message for invalid `queries` block and invalid `query-filters` blocl
2022-08-23 11:29:15 -07:00
Andrew Eisenberg
e379edd1ee Update CHANGELOG.md
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-08-23 10:05:59 -07:00
Andrew Eisenberg
9af066e7d5 Update changelog 2022-08-23 09:30:40 -07:00
Andrew Eisenberg
ac92a02de7 Merge remote-tracking branch 'upstream/main' into aeisenberg/better-error-message 2022-08-23 09:29:19 -07:00
Andrew Eisenberg
5861352d57 Better error messages for invalid queries and query filters blocks
Handle other cases where the config is invalid.
2022-08-23 09:25:59 -07:00
Edoardo Pirovano
3e49948054 Merge pull request #1207 from github/edoardo/fix-warning
TRAP Caching: Unset missing cache rather than setting to `undefined`
2022-08-23 16:58:16 +01:00
Edoardo Pirovano
1e5376ae5f TRAP Caching: Unset missing cache rather than setting to undefined 2022-08-23 15:39:05 +01:00
Henry Mercer
c2c0a2908e Merge pull request #1200 from github/mergeback/v2.1.20-to-main-7fee4ca0
Mergeback v2.1.20 refs/heads/releases/v2 into main
2022-08-22 14:29:04 +01:00
Edoardo Pirovano
ec8883580f Merge pull request #1201 from github/henrymercer/mergeback-v1-fixes
Mergeback fixes from v1 release
2022-08-22 14:10:44 +01:00
Henry Mercer
bae51503cf Remove @types/long
This is no longer needed since `long` now includes its own types.
2022-08-22 13:01:32 +01:00
Henry Mercer
c72f566aae Explicitly import performance for Node 12 compatibility 2022-08-22 12:59:22 +01:00
github-actions[bot]
e590686972 Update checked-in dependencies 2022-08-22 11:58:44 +00:00
github-actions[bot]
d7319f2ff4 Update changelog and version after v2.1.20 2022-08-22 10:37:53 +00:00
Henry Mercer
7fee4ca032 Merge pull request #1199 from github/update-v2.1.20-f0a1a35a
Merge main into releases/v2
2022-08-22 11:35:54 +01:00
github-actions[bot]
5259c5e5d8 Update changelog for v2.1.20 2022-08-22 09:41:53 +00:00
Henry Mercer
f0a1a35a9f Merge pull request #1197 from github/henrymercer/fix-release-when-package-conflicts
Make "Update release branch" workflow fail if `npm version` fails
2022-08-22 10:39:42 +01:00
Henry Mercer
a07454207a Tweak whitespace in checklist for consistency
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-22 09:52:06 +01:00
Henry Mercer
53a7a27166 Merge pull request #1193 from github/dependabot/npm_and_yarn/actions/core-1.9.1
Bump @actions/core from 1.4.0 to 1.9.1
2022-08-19 20:03:47 +01:00
Henry Mercer
2927215a2b Apply suggestions from code review
Co-authored-by: Edoardo Pirovano <6748066+edoardopirovano@users.noreply.github.com>
2022-08-19 18:37:55 +01:00
Henry Mercer
c145823103 Make "Update release branch" workflow fail if npm version fails 2022-08-19 18:22:44 +01:00
Henry Mercer
66bb63a202 Merge pull request #1194 from github/mergeback/v2.1.19-to-main-f5d217be
Mergeback v2.1.19 refs/heads/releases/v2 into main
2022-08-19 12:34:03 +01:00
github-actions[bot]
0ce8ba5772 Update checked-in dependencies 2022-08-19 10:17:01 +00:00
github-actions[bot]
5354facf4b Update changelog and version after v2.1.19 2022-08-19 09:42:43 +00:00
Henry Mercer
f5d217be74 Merge pull request #1192 from github/update-v2.1.19-5502fefd
Merge main into releases/v2
2022-08-19 10:40:40 +01:00
github-actions[bot]
a37ee26906 Update checked-in dependencies 2022-08-18 19:57:13 +00:00
dependabot[bot]
341b59f315 Bump @actions/core from 1.4.0 to 1.9.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.4.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-18 19:26:12 +00:00
Henry Mercer
7c3d74c9d7 Move changelog note to right release 2022-08-17 16:59:59 +01:00
github-actions[bot]
04ea3b12c8 Update changelog for v2.1.19 2022-08-17 15:54:54 +00:00
Edoardo Pirovano
5502fefdae Merge pull request #1191 from github/edoardo/fix-upload-times
Fix TRAP cache upload timing
2022-08-17 16:43:09 +01:00
Edoardo Pirovano
0349bb05b7 Fix TRAP cache upload timing 2022-08-17 15:49:57 +01:00
Henry Mercer
3154c4f6f0 Merge pull request #1190 from github/henrymercer/fix-debug-artifact-tests-on-push
Modify `expect-error` input checking to fix errors on main
2022-08-17 15:49:17 +01:00
Henry Mercer
b21cab99b3 Mock expect-error input to avoid errors in Action integration tests 2022-08-17 15:02:46 +01:00
Henry Mercer
219a937551 Require test mode to be set to use expect-error input
This should be more robust than determining whether the repo is the
CodeQL Action or a fork of it.
2022-08-17 14:49:24 +01:00
Henry Mercer
ff9d53b61a Dump GitHub event in debug artifacts failure workflow
This should help us debug failures on `main` like this
https://github.com/github/codeql-action/actions/runs/2875586196.
2022-08-17 14:49:23 +01:00
Edoardo Pirovano
5f4cfb016e Merge pull request #1188 from github/edoardo/round-fields
Round fields in TRAP caching telemetry to integers
2022-08-17 14:14:56 +01:00
Edoardo Pirovano
eb6f272155 Round fields in TRAP caching telemetry to integers 2022-08-17 13:30:17 +01:00
Henry Mercer
7d94bb850d Merge pull request #1185 from github/henrymercer/bypass-toolcache-feature-flag
Enable bypassing the cached CodeQL bundle via a feature flag
2022-08-17 13:21:02 +01:00
Henry Mercer
b469d5358f Tweak debug logging message 2022-08-17 12:44:53 +01:00
Henry Mercer
f47f573e6e Add a debug log message when forcing the latest tools 2022-08-17 12:33:58 +01:00
Henry Mercer
416ad3d847 Merge branch 'main' into henrymercer/bypass-toolcache-feature-flag 2022-08-17 11:39:33 +01:00
Edoardo Pirovano
8bc36d5f46 Merge pull request #1187 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-08-17 10:09:46 +01:00
GitHub
8beb190634 Update supported GitHub Enterprise Server versions. 2022-08-17 00:13:14 +00:00
Angela P Wen
9b7fa3dd99 Add expect-error input to force PR check green on expected failure (#1177) 2022-08-16 16:27:14 -07:00
Henry Mercer
e1cd41a365 Add tests for toolcache bypassing 2022-08-16 16:19:08 +01:00
Henry Mercer
d45b0eba23 Improve readability of CodeQL bundle tests 2022-08-16 16:18:41 +01:00
Henry Mercer
96a8424f0c Don't bypass the toolcache in test mode 2022-08-16 16:18:12 +01:00
Henry Mercer
5862bae77e Bypass toolcache when feature flag enabled 2022-08-16 16:18:11 +01:00
Henry Mercer
df0c0dafc0 Add bypass toolcache feature flag 2022-08-16 16:17:41 +01:00
Edoardo Pirovano
b0d61cff1a Merge pull request #1184 from github/edoardo/trap-telemetry-followup
Use `util.promisify` instead of manually constructing promise
2022-08-16 15:48:36 +01:00
Edoardo Pirovano
016a5e3bae Use util.promisify instead of manually constructing promise 2022-08-16 14:42:13 +01:00
Edoardo Pirovano
8a4437ae33 Merge pull request #1182 from github/edoardo/trap-cache-telemetry
Add telemetry for TRAP caching
2022-08-16 14:16:35 +01:00
Edoardo Pirovano
b29194f0ac Address review comments from @henrymercer 2022-08-16 13:30:49 +01:00
Edoardo Pirovano
4139682b64 Add telemetry for TRAP caching 2022-08-16 11:54:31 +01:00
Edoardo Pirovano
ca10a6d552 Merge pull request #1183 from github/edoardo/fix-cache-key
Fix cache key for TRAP caching
2022-08-16 10:52:35 +01:00
Edoardo Pirovano
d8adbe91f2 Fix cache key for TRAP caching 2022-08-16 10:20:17 +01:00
Rasmus Wriedt Larsen
b3adcb7261 Merge pull request #1181 from github/RasmusWL/disable-python2-pipenv
Disable python2 + pipenv tests
2022-08-15 17:52:28 +02:00
Rasmus Wriedt Larsen
c8cb2b45eb Update CHANGELOG.md 2022-08-15 16:56:44 +02:00
Andrew Eisenberg
fba13b0092 More readable error message for invalid queries block
When someone creates an invalid `queries` entry in the codeql config
file, like this:

```
queries:
  - foo.ql
```

THe error message is confusing, looking like this:

```
  Error: Cannot use 'in' operator to search for 'uses' in ql/ql/src
  TypeError: Cannot use 'in' operator to search for 'uses' in ql/ql/src
      at loadConfig (/home/runner/work/_actions/github/codeql-action/71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca/lib/config-utils.js:577:41)
```

With this change, the error message is more comprehensible:

`queries must be an array, with each entry having a 'uses' property`
2022-08-15 07:56:00 -07:00
Rasmus Wriedt Larsen
909e2fd56a Disable python2 + pipenv tests
Just like we did for poetry and Python 2 in https://github.com/github/codeql-action/pull/1124

From looking at changelogs, Python2 has not been supported in Pipenv since [v2021.11.5](https://pipenv.pypa.io/en/latest/changelog/#id149)
2022-08-15 16:52:11 +02:00
Henry Mercer
f9bce029b4 Merge pull request #1178 from github/henrymercer/codeql-cli-2.10.3
Update default CodeQL version to 2.10.3
2022-08-15 15:29:28 +01:00
Henry Mercer
af9d911fb5 Merge remote-tracking branch 'origin/main' into henrymercer/codeql-cli-2.10.3 2022-08-15 14:40:51 +01:00
Andrew Eisenberg
680d08e97d Merge pull request #1105 from github/aeisenberg/fix-config-files
Re-enable passing the codescanning config file to the CLI
2022-08-12 11:15:43 -07:00
Henry Mercer
5836ad9c2a Merge pull request #1176 from github/dependabot/npm_and_yarn/types/long-5.0.0
Bump @types/long from 4.0.1 to 5.0.0
2022-08-12 11:00:39 +01:00
Henry Mercer
1e8043f69c Update default CodeQL version to 2.10.3 2022-08-12 10:43:51 +01:00
Henry Mercer
68f1d68743 Merge remote-tracking branch 'origin/main' into dependabot/npm_and_yarn/types/long-5.0.0 2022-08-12 10:28:49 +01:00
Andrew Eisenberg
fa2bc211fd Merge branch 'aeisenberg/unrevert-query-filters' into aeisenberg/fix-config-files 2022-08-11 14:57:16 -07:00
Andrew Eisenberg
c12cfbc92f Merge pull request #1127 from github/aeisenberg/unrevert-query-filters
Revert "Revert "Add capability to filter queries #1098""
2022-08-11 12:28:11 -07:00
Andrew Eisenberg
bcf47202b5 Merge remote-tracking branch 'upstream/main' into aeisenberg/unrevert-query-filters 2022-08-11 11:37:55 -07:00
Chris Gavin
d101dd6f9e Merge pull request #1175 from github/local
Use the API URL from the environment if it is present.
2022-08-11 19:10:36 +01:00
github-actions[bot]
ccfb4e296c Update checked-in dependencies 2022-08-11 17:47:11 +00:00
dependabot[bot]
049537835b Bump @types/long from 4.0.1 to 5.0.0
Bumps [@types/long](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/long) from 4.0.1 to 5.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/long)

---
updated-dependencies:
- dependency-name: "@types/long"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 17:01:30 +00:00
Andrew Eisenberg
072cd929a3 Merge remote-tracking branch 'upstream/main' into aeisenberg/unrevert-query-filters 2022-08-11 10:00:12 -07:00
Andrew Eisenberg
d74f663ed4 Merge remote-tracking branch 'upstream/main' into aeisenberg/fix-config-files 2022-08-11 09:57:45 -07:00
Andrew Eisenberg
a09a029937 Fix failing test and address PR comments 2022-08-11 09:56:08 -07:00
Chris Gavin
07e8996e91 Merge main into local. 2022-08-11 17:11:05 +01:00
Chris Gavin
7c6fa5ce8a Remove an unneeded if.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-11 17:10:50 +01:00
Angela P Wen
b659ce5d7d Merge pull request #1159 from github/angelapwen/post-init-cleanup
Move logs, SARIF, database bundle actions uploads to post: hooks
2022-08-11 17:59:58 +02:00
Angela P Wen
79b933c459 Remove review comments 2022-08-11 16:47:31 +02:00
Angela P Wen
cf7f893f9c Make file paths OS-agnostic 2022-08-11 16:46:56 +02:00
Angela P Wen
172eca420d Improve doesDirectoryExist test 2022-08-11 16:08:06 +02:00
Angela P Wen
fd83e55188 Remove extraneous files 2022-08-11 16:03:48 +02:00
Angela P Wen
26cafd2f92 Add unit tests for post: hook run methods 2022-08-11 16:01:37 +02:00
Angela P Wen
15608ceae3 Merge remote-tracking branch 'origin/main' into angelapwen/post-init-cleanup 2022-08-11 15:24:10 +02:00
Angela P Wen
6fdaff6eb6 Improve file system unit tests 2022-08-11 15:09:44 +02:00
Angela P Wen
4e121c0ef5 Address additional review comments 2022-08-11 13:58:01 +02:00
Angela P Wen
d909f714fb Update comment wording
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-11 13:46:55 +02:00
Angela P Wen
fa59c284a8 Update CHANGELOG.md wording
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2022-08-11 13:46:09 +02:00
Angela P Wen
65d6ee0c51 Address review comments 2022-08-11 13:45:26 +02:00
Chris Gavin
bbdc9efa94 Use the API URL from the environment if it is present. 2022-08-11 08:38:11 +01:00
Andrew Eisenberg
2314063848 Add the defaultAugmentationProperties constant
This makes some syntax in tests somewhat simpler.
2022-08-10 15:42:45 -07:00
Andrew Eisenberg
0403fb7d8c Merge branch 'main' into aeisenberg/fix-config-files 2022-08-10 15:39:35 -07:00
Andrew Eisenberg
44f42da9ca Merge branch 'main' into aeisenberg/unrevert-query-filters 2022-08-10 15:22:40 -07:00
Andrew Eisenberg
a6d09016e7 Merge pull request #1171 from crenshaw-dev/clarify-category-error-message
fix: clarify upload-sarify category uniqueness error message
2022-08-10 13:24:16 -07:00
Angela P Wen
3c4f458a1a Re-declare codeql var 2022-08-10 15:08:35 +02:00
Angela P Wen
90676d9cb9 Merge remote-tracking branch 'origin/main' into angelapwen/post-init-cleanup 2022-08-10 15:08:04 +02:00
Angela P Wen
484a72c924 Add utilities unit tests 2022-08-10 14:57:57 +02:00
Edoardo Pirovano
c7db5d9226 Merge pull request #1174 from github/edoardo/remove-workaround
Remove distrust of `GITHUB_ACTION_REF` for local actions
2022-08-10 11:50:11 +01:00
Edoardo Pirovano
3835e64c38 Remove distrust of GITHUB_ACTION_REF for local actions 2022-08-10 09:39:03 +01:00
Edoardo Pirovano
07720c700e Merge pull request #1172 from github/edoardo/trap-caching
Introduce TRAP caching
2022-08-09 19:18:32 +01:00
Edoardo Pirovano
6df93613d7 Address review comments from @henrymercer 2022-08-09 18:37:22 +01:00
Angela P Wen
ff7a29dd72 Clarify expected failure for upload job 2022-08-09 15:24:14 +02:00
Angela P Wen
8903097982 Remove database init test for success case 2022-08-09 15:21:49 +02:00
Angela P Wen
4993f1e1fc Remove downloaded files structure display 2022-08-08 15:52:49 +02:00
Angela P Wen
27df4c2a47 Fix directory name of artifacts 2022-08-08 15:16:15 +02:00
Angela P Wen
1c82b1bb73 Display downloaded files structure 2022-08-08 14:53:25 +02:00
Angela P Wen
05176bcd41 Add continue-on-error for expected failing job 2022-08-08 14:25:43 +02:00
Angela P Wen
6bc22912e0 Add description in CHANGELOG 2022-08-08 14:06:43 +02:00
Angela P Wen
b952980043 Add integration test for failed analyze step 2022-08-08 14:00:23 +02:00
Angela P Wen
010abe7de0 Merge remote-tracking branch 'origin/main' into angelapwen/post-init-cleanup 2022-08-08 13:41:15 +02:00
Edoardo Pirovano
8f867dcb21 Introduce TRAP caching 2022-08-05 17:48:05 +01:00
CI
0e3ae6e68a fix: clarify upload-sarify category uniqueness error message 2022-08-05 10:59:35 -04:00
Edoardo Pirovano
cade2b5621 Merge pull request #1170 from github/edoardo/add-trap-cache-option
Add option to override TRAP caching feature flag
2022-08-05 12:40:04 +01:00
Edoardo Pirovano
2d5738c1ac Add option to override TRAP caching feature flag 2022-08-05 12:04:02 +01:00
Edoardo Pirovano
693d3f22d8 Merge pull request #1164 from github/edoardo/add-cache-dep
Add dependency on `@actions/cache`
2022-08-05 10:03:45 +01:00
Edoardo Pirovano
38c2c091e8 Add dependency on @actions/cache 2022-08-04 15:12:29 +01:00
Angela P Wen
9990b406c2 Merge pull request #1160 from github/angelapwen/refactor-debug-artifacts-pr-check
Split debug artifacts PR check into two jobs
2022-08-04 10:35:07 +02:00
Angela P Wen
2a582eb53d Merge branch 'main' into angelapwen/refactor-debug-artifacts-pr-check 2022-08-04 10:02:20 +02:00
Chuan-kai Lin
1a0331c4c6 Merge pull request #1167 from github/mergeback/v2.1.18-to-main-2ca79b6f
Mergeback v2.1.18 refs/heads/releases/v2 into main
2022-08-03 13:39:53 -07:00
github-actions[bot]
bb2956fd36 Update checked-in dependencies 2022-08-03 19:50:21 +00:00
github-actions[bot]
2d4d9d8cf7 Update changelog and version after v2.1.18 2022-08-03 17:48:40 +00:00
Chuan-kai Lin
2ca79b6fa8 Merge pull request #1165 from github/update-v2.1.18-329cb8b6
Merge main into releases/v2
2022-08-03 10:46:13 -07:00
github-actions[bot]
9dc4e8a2c7 Update changelog for v2.1.18 2022-08-03 16:37:42 +00:00
Angela P Wen
4ec485d633 bash syntax fixup per review 2022-08-03 17:57:05 +02:00
Angela P Wen
e16d085a47 Remove ls check, log formatting 2022-08-03 11:24:18 +02:00
Angela P Wen
f51da8688a Add script to check in appropriate directories 2022-08-03 10:55:10 +02:00
Angela P Wen
f7a7ac1799 bash syntax fixup 2022-08-03 10:23:41 +02:00
Angela P Wen
ef145d6884 Display downloaded file structure 2022-08-03 09:35:32 +02:00
Chuan-kai Lin
329cb8b61c Merge pull request #1156 from github/cklin/codeql-cli-2.10.2
Update default CodeQL version to 2.10.2
2022-08-02 09:25:06 -07:00
Angela P Wen
7f86ddc26d Move debug log printing back to actions util 2022-08-02 12:41:08 +02:00
Angela P Wen
a758ec55e8 Add more info messages to user, rename log printing function 2022-08-02 12:36:56 +02:00
Angela P Wen
eeee462f05 Move debug artifact methods into separate file 2022-08-02 12:27:52 +02:00
Angela P Wen
5895ab0c0b Address more PR comments, refactoring 2022-08-02 12:18:44 +02:00
Angela P Wen
44a27e6a51 Add top level comments, rename cleanup to post 2022-08-02 12:08:18 +02:00
Angela P Wen
a557279135 Clean up syntax per PR review 2022-08-02 12:01:02 +02:00
Angela P Wen
64d83c75f0 Fix syntax error 2022-08-02 11:38:33 +02:00
Angela P Wen
13e7a528eb Change download job to only run on linux 2022-08-02 11:37:27 +02:00
Angela P Wen
cc047a34ce Condense matrix syntax 2022-08-02 11:37:18 +02:00
Angela P Wen
daaac4306e Linting, node_modules update 2022-08-01 13:35:10 +02:00
Angela P Wen
5229df1eef Add unit test descriptions 2022-08-01 13:17:40 +02:00
Angela P Wen
5da7870265 Refactoring per PR comments 2022-08-01 12:52:16 +02:00
Angela P Wen
8a4a573d59 Error handling for JSON parsing 2022-08-01 12:12:49 +02:00
Angela P Wen
6630cbeccb Minor syntax update
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-01 11:52:34 +02:00
Angela P Wen
af87cc6ba5 Improve for matrix
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-08-01 11:52:03 +02:00
Angela P Wen
ebc59ec8da More descriptive partial db bundle messages 2022-08-01 11:43:08 +02:00
Angela P Wen
52de49c899 Refactor helper function to util 2022-08-01 11:42:55 +02:00
Angela P Wen
2c25894c5f Zip partial database directory 2022-08-01 11:24:34 +02:00
Angela P Wen
81c5b2d993 New debug artifacts workflow with separate jobs 2022-08-01 11:09:29 +02:00
Chuan-kai Lin
a5def17768 Update default CodeQL version to 2.10.2 2022-07-29 14:07:22 -07:00
Aditya Sharad
19d025e17f Merge pull request #1161 from github/adityasharad/actions/combined-check-file-contents
CI: Combine verify-pr-checks and check-for-conflicts jobs
2022-07-29 13:41:50 -07:00
Aditya Sharad
2f739fcd04 CI: Combine verify-pr-checks and check-for-conflicts jobs
Reduce the number of concurrent jobs by 1.
Run these checks in succession instead, as the
`check-file-contents` job in the PR checks workflow.
2022-07-29 12:07:38 -07:00
Aditya Sharad
495c20006b Merge pull request #1158 from github/adityasharad/actions/separate-runner-checks
CI: Move Runner checks into their own workflow
2022-07-29 09:09:22 -07:00
Angela P Wen
2746051310 Catch case where database isn't finalized 2022-07-29 12:00:07 +02:00
Angela P Wen
1016eba538 Move logs, SARIF actions uploads to post: hooks 2022-07-29 11:29:39 +02:00
Andrew Eisenberg
907f1deb5b Merge branch 'main' into aeisenberg/fix-config-files 2022-07-28 16:43:03 -07:00
Aditya Sharad
ceea66834a CI: Move Runner checks into their own workflow
Refactor the PR checks workflow into two workflows:
PR checks and Runner checks.

This does not change the actual check jobs that are run.
It also does not change the expected check names
(which rely only on the job name, not the workflow name).

This makes it easier to inspect workflow run summaries in the UI
and to separately retry subsets of failed jobs in case of flakiness.

In future we will clean up the Runner checks,
since this is a deprecated component.
2022-07-28 16:35:51 -07:00
Aditya Sharad
b100b75d58 Merge pull request #1157 from github/adityasharad/actions/combine-lint-check-js
CI: Combine JS lint and JS check jobs
2022-07-28 16:30:52 -07:00
Aditya Sharad
992d011666 CI: Combine JS lint and JS check jobs
Reduce the number of concurrent jobs.
This will require a branch protection rule update,
renaming `check-js` to Check JS` and removing `Lint`.
2022-07-28 15:37:55 -07:00
Aditya Sharad
6c23d76596 Merge pull request #1152 from github/adityasharad/actions/python-deps-path-filters
CI: Add path filters to python-deps workflow
2022-07-28 15:19:32 -07:00
Aditya Sharad
573de8b146 Merge branch 'main' into adityasharad/actions/python-deps-path-filters 2022-07-28 14:37:56 -07:00
Aditya Sharad
fbb0a4e179 Merge pull request #1154 from github/mergeback/v2.1.17-to-main-0c670bbf
Mergeback v2.1.17 refs/heads/releases/v2 into main
2022-07-28 13:02:47 -07:00
github-actions[bot]
351171d4e9 Update checked-in dependencies 2022-07-28 18:39:20 +00:00
github-actions[bot]
507d4b7b31 Update changelog and version after v2.1.17 2022-07-28 17:47:32 +00:00
Aditya Sharad
0c670bbf04 Merge pull request #1153 from github/update-v2.1.17-bbc2e701
Merge main into releases/v2
2022-07-28 10:45:57 -07:00
github-actions[bot]
0dd6a6f2b0 Update changelog for v2.1.17 2022-07-28 17:02:14 +00:00
Aditya Sharad
bf24993f0c CI: Add scheduled and manual triggers to python-deps workflow 2022-07-27 13:22:10 -07:00
Aditya Sharad
0d16d70d87 CI: Add path filters to python-deps workflow
No need to run this workflow on all PRs, only those that
change the Python dependency installation mechanism.
2022-07-27 13:16:40 -07:00
Aditya Sharad
bbc2e7010f Merge pull request #1149 from github/criemen/runner-autobuilders
autobuild: Update tests for C# on macOS
2022-07-27 13:16:12 -07:00
Aditya Sharad
caa2a0df0a Runner tests: Attempt to source the tracer env, display the binary path 2022-07-27 12:05:31 -07:00
Aditya Sharad
a2f4d66a8b Runner tests: Read CODEQL_RUNNER from the stored JSON
This test workflow does not source the environment from the init step,
so we need to manually read in the variable.
2022-07-25 15:33:52 -07:00
Aditya Sharad
b4ff463500 Autobuild: Remove CODEQL_RUNNER workaround
We do not need to prefix `$CODEQL_RUNNER` here on macOS to bypass SIP,
because we assume that the `init` step exported `DYLD_INSERT_LIBRARIES`
into the environment, which activates the Actions workaround for SIP.
See https://github.com/actions/runner/pull/416.
2022-07-25 15:02:44 -07:00
Aditya Sharad
58faf9d60c Actions: Disable the CLR tracer in C# autobuild test
Ensure that this succeeds even if the legacy CLR tracer is not enabled.
The combination of the regular tracer and the SIP workaround within Actions
should be sufficient for this to pass.
2022-07-25 15:02:42 -07:00
Aditya Sharad
dc1c51db28 Actions: Fix failing Runner autobuild test on macOS
Add the missing `$CODEQL_RUNNER` prefix to the autobuild command line.
This intermediate process works around System Integrity Protection,
allowing the tracer to start the C# extractor for the dotnet builds
within the autobuild process.

The test used to pass without this because the legacy CLR tracer bypassed SIP
while dotnet 5 was used on the Actions virtual environment.
Now that the virtual environment uses dotnet 6, the CLR tracer no longer works,
and we need to explicitly work around SIP.

This test will eventually be replaced by an internal integration test for the
equivalent functionality in the CLI. For now, this change makes the test
continue to pass.
2022-07-25 14:06:23 -07:00
Aditya Sharad
2d2dfa3424 Remove duplicate CI workflow 2022-07-25 14:01:12 -07:00
Andrew Eisenberg
4e46a69655 Merge branch 'main' into aeisenberg/fix-config-files 2022-07-25 11:20:15 -07:00
Cornelius Riemenschneider
ceec52c4bc Address review. 2022-07-21 17:03:57 +00:00
Cornelius Riemenschneider
a32664975f autobuild-action: Run autobuilders with $CODEQL_RUNNER set.
Without this, the tracer will not be injected on MacOS, as we need the
runner to circumvent SIP.
Also add a test that tests the autobuild-action to exercise this code path.
2022-07-21 15:51:54 +00:00
Henry Mercer
8171514c02 Merge pull request #1146 from github/dependabot/npm_and_yarn/runner/terser-5.14.2
Bump terser from 5.7.1 to 5.14.2 in /runner
2022-07-20 10:51:28 +01:00
dependabot[bot]
6fa0b7cb22 Bump terser from 5.7.1 to 5.14.2 in /runner
Bumps [terser](https://github.com/terser/terser) from 5.7.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 01:49:59 +00:00
Alexander Eyers-Taylor
b8bd06e075 Merge pull request #1143 from github/alexet/codeql-2.10.1-update
Update bundle to 2.10.1
2022-07-19 15:38:55 +01:00
Alexander Eyers-Taylor
aa231930c1 Merge branch 'main' into alexet/codeql-2.10.1-update 2022-07-19 14:41:49 +01:00
Cornelius Riemenschneider
ba95eeb60e Merge pull request #1145 from github/criemen/fix-ff-crash
Don't crash if we are unable to get a response from the feature-flag endpoint.
2022-07-18 14:04:23 +02:00
Cornelius Riemenschneider
c059f95c05 Fix lint errors. 2022-07-18 11:26:03 +00:00
Cornelius Riemenschneider
75afbf4a30 Address review, add test. 2022-07-18 10:37:04 +00:00
Cornelius Riemenschneider
01fa64cb90 Don't crash if we are unable to get a response from the feature-flag endpoint. 2022-07-18 10:14:40 +00:00
Alexander Eyers-Taylor
28ccb035bb Changelog: Pick the correct PR after opening
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-07-14 16:20:45 +01:00
alexet
11111290fc Update bundle to 2.10.1 2022-07-14 15:37:28 +01:00
Andrew Eisenberg
01d16b1e01 Merge branch 'main' into aeisenberg/fix-config-files 2022-07-13 14:05:48 -07:00
Edoardo Pirovano
d8c9c723a5 Merge pull request #1141 from github/mergeback/v2.1.16-to-main-3e7e3b32
Mergeback v2.1.16 refs/heads/releases/v2 into main
2022-07-13 15:16:52 +01:00
github-actions[bot]
8d24c9e4c1 Update checked-in dependencies 2022-07-13 13:25:21 +00:00
github-actions[bot]
c8971b8e0a Update changelog and version after v2.1.16 2022-07-13 11:26:38 +00:00
Cornelius Riemenschneider
3e7e3b32d0 Merge pull request #1140 from github/update-v2.1.16-548f07e3
Merge main into releases/v2
2022-07-13 12:55:19 +02:00
github-actions[bot]
330d552535 Update changelog for v2.1.16 2022-07-13 10:05:10 +00:00
Andrew Eisenberg
548f07e307 Merge pull request #1139 from github/aeisenberg/concat-not-push
Use concat instead of push around `listFolders`
2022-07-13 02:39:34 -07:00
Henry Mercer
a844fefc86 Merge branch 'main' into aeisenberg/concat-not-push 2022-07-13 10:09:16 +01:00
Andrew Eisenberg
7ce9ef9137 Use concat instead of push around listFolders
This avoids stack overflows when using the spread operator on
directories that have many, many children.
2022-07-12 13:23:01 -07:00
Henry Mercer
d750c6d79d Merge pull request #1138 from github/henrymercer/drop-token-check
Update required checks: Allow authenticating via the GitHub CLI
2022-07-12 19:57:01 +01:00
Henry Mercer
4cb248b0ec Merge branch 'main' into henrymercer/drop-token-check 2022-07-12 18:21:09 +01:00
Henry Mercer
1e7f770864 Merge pull request #1132 from github/henrymercer/one-click-debug
Enable one-click debugging via the "Enable debug logging" option when re-running Actions jobs
2022-07-12 18:10:16 +01:00
Henry Mercer
816b3e91bc Update failure message
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-07-12 17:52:15 +01:00
Henry Mercer
fbbd1dcd52 Fix extra double quote
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-07-12 17:44:51 +01:00
Henry Mercer
0a5dad3c83 Allow authenticating via the GitHub CLI
We no longer run this script within Actions for security reasons, and
when running locally we can authenticate with the GitHub CLI instead
of a PAT.
2022-07-12 17:33:24 +01:00
Henry Mercer
d61e3fdf02 Fix shellcheck errors
Avoid trying to evaluate `github/codeql-action`.
2022-07-12 17:31:31 +01:00
Henry Mercer
dca60ba711 Merge remote-tracking branch 'origin/main' into henrymercer/one-click-debug 2022-07-12 16:54:30 +01:00
Cornelius Riemenschneider
e1ec69721f Merge pull request #1137 from github/criemen/fix-end-tracing
Unset tracing variables after finalizing databases.
2022-07-12 17:49:59 +02:00
Henry Mercer
b45ac1f8f8 Cleanup: Use optional chaining in a couple of places 2022-07-12 16:30:21 +01:00
Henry Mercer
b316baae94 Merge remote-tracking branch 'origin/main' into henrymercer/one-click-debug 2022-07-12 16:22:05 +01:00
Henry Mercer
e655fb331c Use core.isDebug() instead of accessing env var 2022-07-12 16:19:13 +01:00
Henry Mercer
b3801753d4 Merge pull request #1133 from github/henrymercer/log-diagnostics-when-debug-enabled
Print diagnostic messages when debugging mode is enabled
2022-07-12 15:49:16 +01:00
Cornelius Riemenschneider
3dcdbc9add Unset tracing variables after finalizing databases.
The tracer is very good at preserving itself, so unsetting the tracing-specific
variables from within a process will not end tracing for children of
that process.
The way the actions process model works means that we're running inside
a process for the entire build step that was launched with the tracer
variables set, so we'll have the tracer injected into the entire build
step and its children.
If we unset the variables in end-tracing, we will get into an intermediate
state: Not all variables in there are preserved by the tracer,
but the tracer is still active.
Usually, that wouldn't be a problem, but the autobuilders called from
the finalize step will suddenly run under a half-configured tracer.

Particularly, this half-configured tracer is unable to execute the dotnet
CLI without hangs, as the environment variable that prevents hangs for
dotnet on MacOS has been unset, but the tracer is still active.

This is an issue for the the go autobuilder, that invokes
user-provided build scripts in the hope of installing dependencies.
If that build script then invokes dotnet, it will hang.

This is only of concern for the Lua tracer that now implements proper
multi-language tracing: Previously, when encountering the go autobuilder,
the tracer disabled itself entirely, thus side-stepping any hangs.
In the new, multi-language tracing world, the tracer will stay active
as long as there is at least one other language that's been set up
for tracing.
Thus, we also get hangs when invoking the dotnet CLI through the go
autobuilder.
2022-07-12 11:33:44 +00:00
Henry Mercer
688508d8cb Merge pull request #1099 from github/henrymercer/run-unit-tests-on-windows
Run unit tests on Windows too
2022-07-12 11:06:41 +01:00
Henry Mercer
fc926423a5 Merge remote-tracking branch 'origin/main' into henrymercer/run-unit-tests-on-windows 2022-07-11 17:57:19 +01:00
Henry Mercer
ea8fb214de Merge pull request #1104 from github/henrymercer/remove-toolcache-decorator
Remove toolcache decorator
2022-07-11 17:54:54 +01:00
Henry Mercer
3a5fa35535 Add changelog note 2022-07-01 19:14:38 +01:00
Henry Mercer
7e94a6cbca Print diagnostic messages when debug logging enabled
This commit prints diagnostic messages to the Actions log when debug
logging is enabled by passing `debug: true` to `codeql-action/init` or
enabling Actions step debug logging.
2022-07-01 18:56:12 +01:00
Henry Mercer
b7da732b32 Add changelog note 2022-07-01 18:47:41 +01:00
Henry Mercer
0c729c81f2 Mention that debug mode is automatically enabled when step debugging on 2022-07-01 17:59:10 +01:00
Henry Mercer
53850d88bb Enable one-click debugging via the "Enable debug logging" rerun option 2022-07-01 17:56:57 +01:00
Henry Mercer
b1742f8919 Add instructions to remove deleted JS / source map files in PR check 2022-06-30 09:16:11 +01:00
Henry Mercer
c736697abf Remove toolcache decorator
This decorator enabled us to use the functionality of the Actions
toolcache within the runner too.
Now that we've deleted the runner we no longer need it.
2022-06-30 09:16:10 +01:00
Arthur Baars
ca8a203b51 Merge pull request #1126 from github/aibaars/python-setup-no-pycache
Python-Setup: run auto_install_packages.py with -B flag
2022-06-30 10:08:46 +02:00
Arthur Baars
53bc5e6c78 Merge remote-tracking branch 'origin/main' into aibaars/python-setup-no-pycache 2022-06-30 09:10:41 +02:00
Andrew Eisenberg
8688a09e14 When using codescanning config call run queries a single time
When the codescanning config is being used by the CLI, there is a
single query suite that is generated that contains all queries to be
run by the analysis. This is different from the traditional way, where
there are potentially three query suites: builtin, custom, and packs.

We need to ensure that when the codescanning config is being used,
only a single call to run queries is used, and this call uses the
single generated query suite.

Also, this commit changes the cutoff version for codescanning config to
2.10.1. Earlier versions work, but there were some bugs that are only
fixed in 2.10.1 and later.
2022-06-29 12:50:24 -07:00
Henry Mercer
130a51dbc6 Handle Windows absolute paths in resolveUriToFile 2022-06-29 18:59:33 +01:00
Henry Mercer
c2fd5d10f6 Don't make temporary directories symlinks
`toolcache.extractTar` currently falls over when `ACTIONS_TEMP` contains
a symlink, and the runner no longer exists, so it's unlikely our
customers would be running with temporary directories that contain
symlinks.
2022-06-29 18:59:33 +01:00
Henry Mercer
30681e79db Separate paths with / in resolveUriToFile 2022-06-29 18:59:32 +01:00
Henry Mercer
c15604920a Workaround PATH casing issues on Windows 2022-06-29 18:59:32 +01:00
Henry Mercer
4792297702 Fix test failures on Windows related to path separators 2022-06-29 18:59:32 +01:00
Henry Mercer
79ec03f3e5 Run npm scripts on using bash so Windows can find commands 2022-06-29 18:58:38 +01:00
Henry Mercer
7ebbfcbbdd Run unit tests on Windows too 2022-06-29 10:07:31 +01:00
Chuan-kai Lin
3ea10cc7b5 Merge pull request #1130 from github/mergeback/v2.1.15-to-main-3f62b754
Mergeback v2.1.15 refs/heads/releases/v2 into main
2022-06-28 14:11:56 -07:00
Andrew Eisenberg
6fabde2be8 Add packs and queries from input
This commit adds the packs and queries from the actions input to the
config file used by the CodeQL CLI.

When the `+` is used, the actions input value is combined with the
config value and when it is not used, the input value overrides the
config value.

This commit also adds a bunch of integration tests for this feature.
In order to avoid adding too many new jobs, all of the tests are
run sequentially in a single job (matrixed across relevant operating
systems and OSes).
2022-06-28 14:07:51 -07:00
Andrew Eisenberg
237260b693 Revert "Revert usage of --codescanning-config flag"
This reverts commit 43d066495c.
2022-06-28 13:03:04 -07:00
github-actions[bot]
4a887ca920 Update checked-in dependencies 2022-06-28 19:26:38 +00:00
github-actions[bot]
7c1b9e6b1a Update changelog and version after v2.1.15 2022-06-28 19:04:16 +00:00
Chuan-kai Lin
3f62b754e2 Merge pull request #1129 from github/update-v2.1.15-e8c48cc8
Merge main into releases/v2
2022-06-28 12:02:35 -07:00
github-actions[bot]
26a69806cf Update changelog for v2.1.15 2022-06-28 18:00:58 +00:00
Henry Mercer
9953936347 Add instructions to remove deleted JS / source map files in PR check 2022-06-28 18:24:18 +01:00
Henry Mercer
41d6ac4d2a Remove toolcache decorator
This decorator enabled us to use the functionality of the Actions
toolcache within the runner too.
Now that we've deleted the runner we no longer need it.
2022-06-28 18:22:09 +01:00
Cornelius Riemenschneider
e8c48cc8cf Merge pull request #1128 from github/criemen/lua-tracer-ff-2
Simplify tests for the Lua tracer FF in analyze-action.
2022-06-28 12:52:24 +02:00
Cornelius Riemenschneider
1616e0ef98 Simplify tests for the Lua tracer FF in analyze-action. 2022-06-28 10:29:00 +00:00
Cornelius Riemenschneider
b40cd0390c Merge pull request #1120 from github/criemen/lua-tracer-ff-2
Honor the Lua tracer FF for `database trace-command` invocations for scanned languages.
2022-06-28 11:19:44 +02:00
Cornelius Riemenschneider
821fe9b476 Merge branch 'main' into criemen/lua-tracer-ff-2 2022-06-28 10:43:04 +02:00
Andrew Eisenberg
2a70419420 Revert "Revert "Add capability to filter queries #1098""
This reverts commit 99d4397d88.
2022-06-27 13:13:55 -07:00
Chuan-kai Lin
37d8b5142f Merge pull request #1123 from github/cklin/codeql-cli-2.10.0
Update default CodeQL version to 2.10.0
2022-06-27 10:20:30 -07:00
Cornelius Riemenschneider
ab7316e0c5 Implement unit tests for reading the Lua tracer FF in analyze-action. 2022-06-27 16:04:29 +00:00
Cornelius Riemenschneider
f422a50448 Honor the Lua tracer FF for database trace-command invocations for scanned languages.
In theory, a scanned language will not setup the build tracer, and so
shouldn't care about lua versus legacy tracing. However, `go` is a
special case where the autobuilder runs under the build tracer, that
then gets disabled immediately again, unless a special environment
variable is used.
Therefore, we need to thread through the feature flag to this
`database trace-command` invocation. For other scanned languages,
this should be a no-op, as no tracing is ever set up.
2022-06-27 16:04:29 +00:00
Chuan-kai Lin
ed40e306f5 Update default CodeQL version to 2.10.0 2022-06-27 09:01:12 -07:00
Arthur Baars
cae9a1f462 Run npm build 2022-06-27 16:40:40 +02:00
Arthur Baars
11a46b8856 Python-Setup: run auto_install_packages.py with -B flag
This avoids creating a __pycache__ folder in the _actions folder, which
may cause file ownership problems on self-hosted runners
when run in a docker container.
2022-06-27 16:39:19 +02:00
Arthur Baars
95673cf9a2 Revert "Python-Setup: set PYTHONDONTWRITEBYTECODE=1"
This reverts commit 3ff1fd9192.
2022-06-27 16:34:35 +02:00
Arthur Baars
3ff1fd9192 Python-Setup: set PYTHONDONTWRITEBYTECODE=1 2022-06-27 16:34:25 +02:00
Andrew Eisenberg
47bcabd3e8 Merge pull request #1116 from github/aeisenberg/multi-lang-packs
Allow scans with packs for languages not being scanned
2022-06-24 16:47:56 -07:00
Andrew Eisenberg
b9deefbe0a Merge branch 'main' into aeisenberg/multi-lang-packs 2022-06-24 15:12:24 -07:00
Andrew Eisenberg
7c4d0e0f6e Merge pull request #1124 from github/aeisenberg/poetry-python2
Disable python2 + poetry
2022-06-24 13:50:46 -07:00
Andrew Eisenberg
b38dc80666 Merge branch 'main' into aeisenberg/multi-lang-packs 2022-06-24 11:20:12 -07:00
Andrew Eisenberg
e0411511a5 Update CHANGELOG.md
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2022-06-24 11:20:06 -07:00
Andrew Eisenberg
c08ab55e3d Merge branch 'main' into aeisenberg/poetry-python2 2022-06-24 10:44:08 -07:00
Andrew Eisenberg
934c0340a7 Update CHANGELOG.md 2022-06-24 10:21:24 -07:00
Andrew Eisenberg
c18b1d6732 Update changelog 2022-06-24 10:16:08 -07:00
Andrew Eisenberg
8bfe3c6be5 Disable python2 + poetry 2022-06-24 10:09:46 -07:00
Andrew Eisenberg
4efa7d6115 Merge pull request #1119 from github/aeisenberg/runner-dependabot-fix
Fix dependabot warnings in runner
2022-06-24 09:09:13 -07:00
Andrew Eisenberg
c699821722 Update runner dependencies 2022-06-23 11:46:42 -07:00
Andrew Eisenberg
7fa4dc3512 Fix dependabot warnings in runner
Note that this changes the lock file format
from 1 to 2, so there are many changes here.
2022-06-23 10:33:54 -07:00
Andrew Eisenberg
a965b69658 Merge pull request #1118 from github/mergeback/v2.1.14-to-main-41a4ada3
Mergeback v2.1.14 refs/heads/releases/v2 into main
2022-06-22 21:28:54 -07:00
github-actions[bot]
3b151b1bde Update checked-in dependencies 2022-06-23 00:11:35 +00:00
github-actions[bot]
f9fd90ed60 Update changelog and version after v2.1.14 2022-06-22 23:54:13 +00:00
Andrew Eisenberg
41a4ada31b Merge pull request #1114 from github/update-v2.1.14-2e0c6caf
Merge main into releases/v2
2022-06-22 16:52:17 -07:00
Andrew Eisenberg
e524cd64db Update branch names for check-for-conflicts.yml job 2022-06-22 16:07:46 -07:00
Andrew Eisenberg
1653a84fbc Allow scans with packs for languages not being scanned
Previously, we were being too strict about checking that a pack's
language was being scanned. It was a failure if a pack language
was specified for a language not being scanned.
2022-06-22 14:37:31 -07:00
github-actions[bot]
08f9ac4674 Update changelog for v2.1.14 2022-06-22 14:37:09 +00:00
Andrew Eisenberg
2e0c6caf16 Merge pull request #1111 from github/aeisenberg/revert-1098
Revert "Add capability to filter queries #1098"
2022-06-21 14:25:59 -07:00
Andrew Eisenberg
99d4397d88 Revert "Add capability to filter queries #1098"
https://github.com/github/codeql-action/pull/1098
This reverts commit 777b778409.
This reverts commit 59ca9b59cb.
This reverts commit eec34d5f05.
This reverts commit 40b280032c.
2022-06-21 13:49:33 -07:00
Edoardo Pirovano
47dc295f08 Merge pull request #1110 from github/edoardo/case-insensitive-update
Fix issue with required checks sync script
2022-06-21 15:10:59 +01:00
Edoardo Pirovano
5a6f006e4d Fix issue with required checks sync script 2022-06-21 13:20:45 +01:00
Edoardo Pirovano
ceacebd3ff Merge pull request #1108 from github/mergeback/v2.1.13-to-main-d00e8c09
Mergeback v2.1.13 refs/heads/releases/v2 into main
2022-06-21 12:56:32 +01:00
Edoardo Pirovano
d069ed5c71 Merge branch 'main' into mergeback/v2.1.13-to-main-d00e8c09 2022-06-21 11:26:28 +01:00
github-actions[bot]
0e17d37ac3 Update checked-in dependencies 2022-06-21 10:23:20 +00:00
Cornelius Riemenschneider
2318cf79e9 Merge pull request #1106 from github/criemen/bump-lua-tracer-version
Bump lua tracer version requirement.
2022-06-21 11:44:40 +02:00
github-actions[bot]
b2786f5323 Update changelog and version after v2.1.13 2022-06-21 09:43:31 +00:00
Edoardo Pirovano
d00e8c09a3 Merge pull request #1107 from github/update-v2.1.13-31367d4e
Merge main into releases/v2
2022-06-21 10:41:43 +01:00
github-actions[bot]
8bd4419d1e Update changelog for v2.1.13 2022-06-21 08:59:28 +00:00
Cornelius Riemenschneider
99acb8dda6 Bump lua tracer version requirement.
The old version had a bug related to go autobuilding, so we only want to
respect the feature flag for the version that has the fix.
2022-06-20 14:05:26 +00:00
Edoardo Pirovano
31367d4e57 Merge pull request #1100 from github/edoardo/2.9.4-bump
Update default CodeQL version to 2.9.4
2022-06-20 14:46:48 +01:00
Edoardo Pirovano
ccf5d70ab3 Update default CodeQL version to 2.9.4 2022-06-20 09:39:11 +01:00
Andrew Eisenberg
30fe0a56d2 Merge pull request #1103 from github/aeisenberg/fix-required-checks-script
Ensure there are no duplicates when sending up required checks
2022-06-17 15:48:46 +02:00
Andrew Eisenberg
7adb33da1d Ensure there are no duplicates when sending up required checks
This breaks the API. Also, fix the checks that had duplicate names.
2022-06-16 20:31:29 -07:00
Andrew Eisenberg
2e111b27f7 Merge pull request #1102 from github/aeisenberg/fix-query-filters-test
Fix input to action
2022-06-17 03:56:40 +02:00
Andrew Eisenberg
c7785f6b91 Fix input to action 2022-06-16 18:34:04 -07:00
Andrew Eisenberg
2e80c74b1b Merge pull request #1096 from github/aeisenberg/check-sarif-action
Add the check-sarif action
2022-06-16 03:39:00 +02:00
Andrew Eisenberg
80ecdcdf69 Merge pull request #1098 from github/aeisenberg/remove-queries
Add capability to filter queries
2022-06-15 17:52:46 -07:00
Andrew Eisenberg
7c412c67ba Merge branch 'aeisenberg/check-sarif-action' into aeisenberg/remove-queries 2022-06-16 02:42:30 +02:00
Andrew Eisenberg
ee4575b213 Merge branch 'main' into aeisenberg/check-sarif-action 2022-06-16 02:39:30 +02:00
Henry Mercer
d2ab7a2abb Merge pull request #1086 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-06-16 01:37:12 +01:00
Andrew Eisenberg
d7459f0368 Merge branch 'aeisenberg/check-sarif-action' into aeisenberg/remove-queries 2022-06-16 02:22:34 +02:00
Andrew Eisenberg
6db77eec0d Merge remote-tracking branch 'upstream/main' into aeisenberg/remove-queries 2022-06-15 17:21:05 -07:00
Andrew Eisenberg
777b778409 Spelling, capitalization, and better descriptions 2022-06-15 17:18:35 -07:00
GitHub
97f9db4fb9 Update supported GitHub Enterprise Server versions. 2022-06-16 00:11:36 +00:00
Andrew Eisenberg
59ca9b59cb Extract query-filters test into a composite action
Removes duplicated yaml.

Also add some better typings.
2022-06-15 16:32:33 -07:00
Andrew Eisenberg
6834383903 Apply suggestions from code review
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-06-15 16:27:01 -07:00
Andrew Eisenberg
4918636a75 Clarify variable names in new action
Also simplify some computations.
2022-06-15 16:06:16 -07:00
Andrew Eisenberg
428caf0cf5 Update changelog 2022-06-15 14:11:03 -07:00
Tom Bolton
df05122fc6 Merge pull request #1087 from github/tombolton/update-ml-pack
Run ML-powered query pack `~0.3.0` on v2.9.3+ of the CLI
2022-06-15 15:55:43 +01:00
tombolton
a27dc4fee4 update security extended test for all platforms 2022-06-15 11:42:22 +01:00
tombolton
a568674c69 add tests for ML powered queries 0.3.0 and CLI 2.9.3 2022-06-15 11:42:22 +01:00
tombolton
f8f4c0b33e compile the modified TypeScript to Javascript 2022-06-15 11:42:22 +01:00
tombolton
79d8e4a43d fix lint errors 2022-06-15 11:42:22 +01:00
tombolton
0ece1d1000 add ml query pack 0.3.0 2022-06-15 11:42:22 +01:00
Andrew Eisenberg
81b419c908 Merge pull request #1097 from github/aeisenberg/js-yaml-typings 2022-06-15 05:56:07 +02:00
Andrew Eisenberg
eec34d5f05 Add integration tests for query filters 2022-06-14 14:10:08 -07:00
Andrew Eisenberg
06e27d3e3d Merge branch 'aeisenberg/js-yaml-typings' into aeisenberg/remove-queries 2022-06-14 12:08:16 -07:00
Andrew Eisenberg
40b280032c Add capability to filter queries
This change adds a `query-filters` property to the codeql-config file.

This property is an array of `exclude`/`include` entries for a query
suite. These filters are appended to the generated query suite files
and used to filter queries after they are selected.

A related change is that now, all pack references are run in a single
query suite, which has the query filters appended to them.
2022-06-14 12:07:49 -07:00
Andrew Eisenberg
bcb7fad5b3 Add the check-sarif action
Allows us to analyze and then check that certain queries were included
in the analysis and others were not.
2022-06-14 11:55:10 -07:00
Andrew Eisenberg
0efcf74ce0 Add typings for js-yaml 2022-06-14 07:50:47 -07:00
Andrew Eisenberg
29a2159db1 Merge pull request #1095 from github/aeisenberg/use-del
Avoid use of rmdir
2022-06-14 02:55:00 +02:00
Andrew Eisenberg
f7c46e5cbc Avoid use of rmdir
This is a deprecated method on node v16.
2022-06-13 22:40:09 +00:00
Andrew Eisenberg
ccf479d336 Merge pull request #1085 from github/swift-support
Add Swift as a possible traced language
2022-06-02 17:43:40 -07:00
Mathias Vorreiter Pedersen
1b5ea4afdc Merge branch 'main' into swift-support 2022-06-03 01:13:47 +01:00
Andrew Eisenberg
69e09909dc Merge pull request #1089 from github/mergeback/v2.1.12-to-main-27ea8f8f
Mergeback v2.1.12 refs/heads/releases/v2 into main
2022-06-01 13:39:46 -07:00
github-actions[bot]
632cc8efb3 Update checked-in dependencies 2022-06-01 18:35:33 +00:00
github-actions[bot]
57096f1d43 Update changelog and version after v2.1.12 2022-06-01 17:58:23 +00:00
Chuan-kai Lin
27ea8f8fe5 Merge pull request #1088 from github/update-v2.1.12-dbe6f211
Merge main into releases/v2
2022-06-01 10:56:48 -07:00
github-actions[bot]
3f00a1265f Update changelog for v2.1.12 2022-06-01 16:43:15 +00:00
Chuan-kai Lin
dbe6f211e6 Merge pull request #1084 from github/cklin/codeql-bundle-2.9.3
Update default CodeQL to 2.9.3
2022-05-31 09:20:46 -07:00
Mathias Vorreiter Pedersen
16c620dea4 Make the linter happy. 2022-05-31 13:55:23 +01:00
Chuan-kai Lin
b36688d5b7 Update default CodeQL to 2.9.3 2022-05-27 09:16:45 -07:00
Mathias Vorreiter Pedersen
bfe9d7da56 Add Swift as a supported language. 2022-05-27 16:29:13 +01:00
Cornelius Riemenschneider
822fe5ef9a Merge pull request #1057 from github/criemen/lua-tracing-ff
Introduce a feature-flag to enable/disable lua-based tracing.
2022-05-25 12:33:41 +02:00
Cornelius Riemenschneider
255ffd480f Merge branch 'main' into criemen/lua-tracing-ff 2022-05-25 11:53:06 +02:00
Cornelius Riemenschneider
4b775686a0 Choose the correct version to enable the Lua tracer for. 2022-05-25 07:39:11 +00:00
Marco Gario
f0705a6d6f Merge pull request #1081 from github/clarify_missing_base
Remove outdated guidance on missing analysis
2022-05-19 08:32:10 +02:00
Marco Gario
2faa3e16f3 Remove outdated guidance on missing analysis
As of December 2021, we do not return missing base analysis anymore.
2022-05-17 12:04:13 +02:00
Edoardo Pirovano
aaff818427 Merge pull request #1079 from github/mergeback/v2.1.11-to-main-a3a6c128
Mergeback v2.1.11 refs/heads/releases/v2 into main
2022-05-17 10:59:43 +01:00
github-actions[bot]
6f285ad15b Update checked-in dependencies 2022-05-17 08:42:16 +00:00
github-actions[bot]
c88cf91b1f Update changelog and version after v2.1.11 2022-05-17 08:23:51 +00:00
Edoardo Pirovano
a3a6c128d7 Merge pull request #1078 from github/update-v2.1.11-657c2f3f
Merge main into releases/v2
2022-05-17 09:22:11 +01:00
github-actions[bot]
657581e7a8 Update changelog for v2.1.11 2022-05-17 07:54:00 +00:00
Edoardo Pirovano
657c2f3ff0 Merge pull request #1074 from github/edoardo/2.9.2-update
Update default CodeQL to 2.9.2
2022-05-16 14:22:11 +01:00
Cornelius Riemenschneider
970e0879d9 Fix linter errors. 2022-05-16 09:40:10 +00:00
Cornelius Riemenschneider
db50adab01 Add tests for the Lua feature flag. 2022-05-16 09:16:41 +00:00
Cornelius Riemenschneider
9e9a8428c3 Introduce a feature-flag to enable/disable lua-based tracing.
This allows us to gradually roll out (or even roll back)
Lua-based tracing in case problems occur.
2022-05-16 09:16:38 +00:00
Edoardo Pirovano
1725087693 Update default CodeQL to 2.9.2 2022-05-16 09:40:19 +01:00
Henry Mercer
e655565390 Merge pull request #1076 from github/henrymercer/fix-changelog-typo
Fix a typo in the CHANGELOG
2022-05-13 17:30:42 +01:00
Henry Mercer
c38e41c45a Fix a typo in the CHANGELOG
`2.9.5 -> 2.9.1` — I missed this during review.
2022-05-13 16:55:08 +01:00
Henry Mercer
0658e4b2d6 Merge pull request #1075 from github/henrymercer/update-actions-tool-cache
Bump @actions/tool-cache to 2.0.0
2022-05-13 14:45:57 +01:00
Henry Mercer
54b4854fda Bump @actions/tool-cache to 2.0.0
This allows us to drop our direct dependency on `@actions/http-client`.
2022-05-13 11:54:40 +01:00
Henry Mercer
1fae5bf71b Merge pull request #1051 from github/henrymercer/run-atm-on-windows
Run ML-powered queries on Windows with CodeQL CLI 2.9.0+
2022-05-11 20:03:26 +01:00
Henry Mercer
533ce91971 Merge remote-tracking branch 'origin/main' into henrymercer/run-atm-on-windows 2022-05-11 19:32:14 +01:00
Henry Mercer
ace076b980 Merge pull request #1070 from github/mergeback/v2.1.10-to-main-2f58583a
Mergeback v2.1.10 refs/heads/releases/v2 into main
2022-05-11 18:36:28 +01:00
Henry Mercer
97847a4dde Merge branch 'main' into mergeback/v2.1.10-to-main-2f58583a 2022-05-11 16:59:06 +01:00
github-actions[bot]
f8c88ab2dc Update changelog and version after v2.1.10 2022-05-11 15:51:54 +00:00
Henry Mercer
2f58583a1b Merge pull request #1069 from github/henrymercer/fix-integration-tests-on-v1
Fix integration tests on v1
2022-05-11 16:48:31 +01:00
Henry Mercer
4e0668d05e Fix integration tests on v1
The GitHub API client coerces `fake-server-url` to the Dotcom API URL,
which means commands like `util.getGitHubVersion` will call the Dotcom
API with the `fake-token`, resulting in 401s.

We therefore use the Dotcom URL instead and additionally stub
`util.getGitHubVersion` as a good practice (it's no longer necessary).
2022-05-11 15:53:57 +01:00
Henry Mercer
c4fdf5fe69 Merge pull request #1067 from github/mergeback/v2.1.10-to-main-03e2e3c4
Mergeback v2.1.10 refs/heads/releases/v2 into main
2022-05-11 13:14:15 +01:00
Henry Mercer
4f87830a1f Merge branch 'main' into mergeback/v2.1.10-to-main-03e2e3c4 2022-05-11 12:00:48 +01:00
github-actions[bot]
daf6560612 Update changelog and version after v2.1.10 2022-05-11 10:57:56 +00:00
Henry Mercer
03e2e3c45f Merge pull request #1065 from github/henrymercer/remove-extraneous-commit
Remove an extraneous commit during the release process
2022-05-11 11:39:31 +01:00
Henry Mercer
3bb6c41212 Remove an extraneous commit during the release process
We only need to run `git commit` after the `git merge` call if there were conflicts.
2022-05-11 10:50:13 +01:00
Alexander Eyers-Taylor
38fc5ebb37 Merge pull request #1064 from github/mergeback/v2.1.10-to-main-75b4f1c4
Mergeback v2.1.10 refs/heads/releases/v2 into main
2022-05-10 20:12:54 +01:00
Henry Mercer
a82d691646 Merge branch 'main' into mergeback/v2.1.10-to-main-75b4f1c4 2022-05-10 19:32:12 +01:00
github-actions[bot]
ca6773e404 Update checked-in dependencies 2022-05-10 17:39:06 +00:00
Andrew Eisenberg
8dbd96566a Merge pull request #1063 from github/aeisenberg/contrib
Update contributing.md
2022-05-10 10:25:04 -07:00
github-actions[bot]
ef73e3bee8 Update changelog and version after v2.1.10 2022-05-10 17:05:35 +00:00
Alexander Eyers-Taylor
75b4f1c466 Merge pull request #1062 from github/update-v2.1.10-7cf0ed5e
Merge main into releases/v2
2022-05-10 18:03:52 +01:00
Andrew Eisenberg
d468c94a69 Update contributing.md
Change the text for keeping the checks up to date.
2022-05-10 09:55:27 -07:00
Rasmus Wriedt Larsen
7c55012151 Merge pull request #1039 from github/rasmuswl/pip-python2-fix
python-setup: Check if `pip` is already installed for Python2
2022-05-10 14:17:06 +02:00
github-actions[bot]
f8eea91a7b Update changelog for v2.1.10 2022-05-10 11:33:39 +00:00
Henry Mercer
878b64e0ef Merge branch 'main' into rasmuswl/pip-python2-fix 2022-05-10 10:52:20 +01:00
Andrew Eisenberg
7cf0ed5e3f Merge pull request #1060 from github/aeisenberg/required-checks-script
Create update-required-checks script
2022-05-10 02:50:12 -07:00
Rasmus Wriedt Larsen
b651a677d2 Merge branch 'main' into rasmuswl/pip-python2-fix 2022-05-10 10:51:39 +02:00
Andrew Eisenberg
827fd55c21 Create update-required-checks script
This also removes the .github/workflows/update-required-checks.yml
workflow. This script needs to be run locally by someone who has
admin privileges on the repo.
2022-05-09 14:59:16 -07:00
Alexander Eyers-Taylor
dd56e95b46 Merge pull request #1056 from github/alexet/update-2.9.1
Update codeql to 2.9.1
2022-05-05 16:52:48 +01:00
alexet
3c6dd303a8 Update codeql to 2.9.1 2022-05-03 15:58:57 +01:00
Chris Gavin
96bc9c36c6 Merge pull request #1055 from github/fix-status-error-being-caught
Fix processing errors being caught and logged as a warning rather than failing the workflow run.
2022-05-03 13:21:10 +01:00
Chris Gavin
366e88c2c1 Fix processing errors being caught and logged as a warning rather than failing the workflow run. 2022-05-03 10:06:19 +01:00
Andrew Eisenberg
7b66e72cb7 Merge pull request #1054 from github/aeisenberg/update-checks
Add permissions to workflow
2022-05-02 12:46:59 -07:00
Andrew Eisenberg
06d4e82bd2 Add permissions block to workflow 2022-05-02 12:01:19 -07:00
Andrew Eisenberg
0fb78380f8 Merge pull request #1053 from github/aeisenberg/update-checks
Add workflow to regenerate required checks
2022-05-02 10:44:05 -07:00
Andrew Eisenberg
b71f20d70f Add workflow to regenerate required checks
Update contributing guide.
Ensure this workflow runs once a week.
2022-05-02 10:15:40 -07:00
Andrew Eisenberg
8f845425a2 Merge pull request #1052 from github/aeisenberg/required-checks
Update CONTRIBUTING.md
2022-05-02 09:25:35 -07:00
Andrew Eisenberg
c9882bef2d Update CONTRIBUTING.md 2022-05-02 08:58:10 -07:00
Andrew Eisenberg
9a6bf18ec4 Update CONTRIBUTING.md
Clarify instructions for updating required checks
2022-05-02 08:29:30 -07:00
Andrew Eisenberg
0235de0279 Merge pull request #1049 from github/aeisenberg/packs-with-paths
Allow running packs with paths
2022-05-02 08:24:46 -07:00
Andrew Eisenberg
a73e506617 Fix syntax error in workflow 2022-04-29 17:33:21 -07:00
Andrew Eisenberg
b11fe85402 Merge branch 'main' into aeisenberg/packs-with-paths 2022-04-29 11:10:16 -07:00
Andrew Eisenberg
922dc2b976 Use the --resolve-query-specs parameter of pack download
This will allow the command to resolve packs with paths.

Also, use a more concise version of `tr`.
2022-04-29 10:54:01 -07:00
Henry Mercer
395afb1dd9 Fix unit test assertion on Windows 2022-04-29 18:18:19 +01:00
Henry Mercer
ceeddf2638 Merge pull request #1050 from github/henrymercer/dont-wait-for-processing-in-test-mode
Don't wait for processing in test mode
2022-04-29 10:26:03 +01:00
Andrew Eisenberg
06b15c22b1 Allow pack specifiers to include paths
Also, this cleans up our pack-related integration tests.
We are now testing with the most recent CLIs.
2022-04-28 17:14:30 -07:00
Henry Mercer
ed0abc6cac Log the expected outcome of the tests for clarity 2022-04-28 19:21:56 +01:00
Henry Mercer
193cfa588d Update PR checks for Windows and CodeQL CLI 2.9.0+ 2022-04-28 19:18:15 +01:00
Henry Mercer
d9e30cb001 Run ML-powered queries on Windows with CodeQL CLI 2.9.0+ 2022-04-28 19:18:15 +01:00
Henry Mercer
ea676e3184 Don't wait for processing in test mode
In test mode, we don't upload results, so there's no point waiting for
processing.
2022-04-28 19:14:14 +01:00
Henry Mercer
7c2be06006 Factor out test mode determination code 2022-04-28 19:13:22 +01:00
Henry Mercer
0c3c093eba Merge pull request #1045 from github/henrymercer/prompt-v1-to-v2-upgrades
Prompt customers to upgrade from v1 to v2
2022-04-28 18:50:10 +01:00
Henry Mercer
2bf00f719d Merge branch 'main' into henrymercer/prompt-v1-to-v2-upgrades 2022-04-28 14:17:36 +01:00
Henry Mercer
02083c307e Add a comment to explain why we show the upgrade message on GHES 3.4 2022-04-28 14:16:32 +01:00
Henry Mercer
35ef6a2db3 Move formatGitHubVersion into util.test.ts 2022-04-28 14:16:32 +01:00
Henry Mercer
5227afabbe Tweak wording of message 2022-04-28 14:16:32 +01:00
Edoardo Pirovano
6ed7f70798 Merge pull request #1047 from github/mergeback/v2.1.9-to-main-7502d6e9
Mergeback v2.1.9 refs/heads/releases/v2 into main
2022-04-28 09:39:17 +01:00
github-actions[bot]
04f504ca7f Update checked-in dependencies 2022-04-27 20:55:44 +00:00
github-actions[bot]
016ec75b7c Update changelog and version after v2.1.9 2022-04-27 18:21:50 +00:00
Henning Makholm
7502d6e991 Merge pull request #1046 from github/update-v2.1.9-72861144
Merge main into releases/v2
2022-04-27 20:20:29 +02:00
github-actions[bot]
cbce00d08d Update changelog for v2.1.9 2022-04-27 16:41:08 +00:00
Henry Mercer
0256599547 Prompt customers to upgrade from v1 to v2 2022-04-27 16:11:24 +01:00
Chuan-kai Lin
72861144fd Merge pull request #1042 from cklin/windows-status-report-error
Fix status reporting error on Windows
2022-04-26 08:46:38 -07:00
Chuan-kai Lin
6dd9baf8be Fix status reporting error on Windows 2022-04-26 08:06:57 -07:00
Henry Mercer
ff8b365e79 Merge pull request #1044 from github/adityasharad/readme/replace-git-io
README: Replace git.io shortlink with full link
2022-04-26 12:30:02 +01:00
Henry Mercer
eed184a534 Merge branch 'main' into adityasharad/readme/replace-git-io 2022-04-26 10:44:55 +01:00
Henry Mercer
c76f0b5b07 Merge pull request #1032 from github/henrymercer/handle-merge-conflicts-in-releases
Commit any conflicts during v1 backport to simplify release process
2022-04-26 10:43:55 +01:00
Aditya Sharad
bf4ba6945d README: Replace git.io shortlink with full link
git.io is deprecated, so use the full link to docs.github.com instead.
2022-04-26 02:14:44 -07:00
Henry Mercer
d2d14adf3e Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases 2022-04-26 10:03:00 +01:00
Henning Makholm
95b49c3e6b Merge pull request #1038 from github/hmakholm/pr/2.9.0
Bump default CodeQL version to 2.9.0
2022-04-26 03:03:24 +02:00
Henning Makholm
80771fd2d0 Merge branch 'main' into hmakholm/pr/2.9.0 2022-04-26 02:33:49 +02:00
Henry Mercer
2b8fdb3f2e Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases 2022-04-25 17:02:03 +01:00
Henry Mercer
074853a9a2 Suggest resolving conflicts by adding new commits vs amending the merge commit
This gives us slightly messier git history, but more importantly makes
reviewing substantially easier.
2022-04-25 16:37:32 +01:00
Henry Mercer
ce63ab5d00 Merge pull request #1033 from github/henrymercer/use-tags-for-releases
Specify releases of the CodeQL Action using tags instead of branches
2022-04-25 13:22:12 +01:00
Henry Mercer
e87e2d8201 Merge branch 'main' into henrymercer/use-tags-for-releases 2022-04-25 09:56:42 +01:00
Rasmus Wriedt Larsen
8a646279fc python-setup: Check if pip is already installed for Python2 2022-04-22 10:32:29 +02:00
Henning Makholm
23b7196b6b Bump default CodeQL version to 2.9.0 2022-04-21 23:12:38 +02:00
Andrew Eisenberg
e6e327771b Merge pull request #1026 from kojiromike/patch-1 2022-04-18 09:18:46 -07:00
Rasmus Wriedt Larsen
b9577df761 python-setup: refactor Pipenv without lockfile 2022-04-18 11:14:14 -04:00
Michael A. Smith
808c29257b Support Pipfile without Pipfile.lock
As previously written, if codeql finds a `Pipfile`, but no `Pipfile.lock`, it will run `pipenv install` with args that require `Pipfile.lock` to exist. Pipfile will fail with this message:

```
  Usage: python -m pipenv install [OPTIONS] [PACKAGES]...
  
  ERROR:: Pipfile.lock must exist to use --keep-outdated!
  package installation with pipenv failed, see error above
```

This changeset enables auto_install to work with Pipfile when there is no lock. (Bonus: `--skip-lock` is generally a bit faster.)
2022-04-18 11:14:14 -04:00
Henry Mercer
5b5ed44ab7 Add a PR check to check for conflict markers
This check is primarily intended to validate that any merge conflicts in
the v2 -> v1 backport PR are fixed before the PR is merged.
2022-04-14 20:05:42 +01:00
Henry Mercer
faf9d4b499 Merge branch 'main' into henrymercer/use-tags-for-releases 2022-04-14 19:40:48 +01:00
Henry Mercer
8b2f5d7158 Merge pull request #1034 from github/dependabot/npm_and_yarn/glob-8.0.1
Bump glob from 7.1.7 to 8.0.1
2022-04-14 19:39:48 +01:00
github-actions[bot]
0ba58d8497 Update checked-in dependencies 2022-04-14 17:56:23 +00:00
dependabot[bot]
3962f1bd85 Bump glob from 7.1.7 to 8.0.1
Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.7 to 8.0.1.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v7.1.7...v8.0.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 17:00:42 +00:00
Henry Mercer
9daf1de73c Update references to release branches
Prepare for renaming `v1` -> `releases/v1` and `v2` -> `releases/v2`.
2022-04-14 17:48:46 +01:00
Henry Mercer
bce749b10f Improve consistency of variable references in Bash 2022-04-14 17:48:46 +01:00
Henry Mercer
fce4a01cd7 Update the major version tag within the release process 2022-04-14 17:48:46 +01:00
Henry Mercer
bac9320f4f Update description of "Tag release and merge back" workflow 2022-04-14 17:48:46 +01:00
Henry Mercer
b3bf557359 Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases 2022-04-14 17:41:31 +01:00
Henry Mercer
f6312f1322 Commit any conflicts during v1 backport to simplify release process
The process of creating the v1 release can run into merge conflicts. We
commit the unresolved conflicts so a maintainer can easily resolve them
(vs erroring and requiring maintainers to reconstruct the release
manually).
2022-04-14 16:08:38 +01:00
Chris Gavin
c5c5bdabb9 Merge pull request #1007 from github/wait-for-processing-2
Re-enable waiting for processing by default, using the new API semantics.
2022-04-14 09:29:10 +01:00
Chris Gavin
e7869d541b Merge main into wait-for-processing-2. 2022-04-14 08:49:44 +01:00
Henry Mercer
7a12645d7e Merge pull request #1030 from github/RasmusWL/pyton-setup-codeowners
Add codeql-python as CODEOWNERS
2022-04-12 16:01:41 +01:00
Rasmus Wriedt Larsen
9f20addbf2 Update CODEOWNERS
Co-authored-by: Henry Mercer <henrymercer@github.com>
2022-04-12 16:34:35 +02:00
Rasmus Wriedt Larsen
780f4ee1bf Add codeql-python as CODEOWNERS 2022-04-12 11:40:51 +02:00
Chuan-kai Lin
baf90d17d2 Merge pull request #1024 from cklin/autobuild-working-dir
autobuild: add working-directory input
2022-04-08 16:20:01 -07:00
Chuan-kai Lin
6f174084dd Add autobuild workind-directory test 2022-04-08 15:18:11 -07:00
Chuan-kai Lin
b0c570ef83 autobuild: add working-directory input 2022-04-08 13:37:42 -07:00
Edoardo Pirovano
2d80fe85fc Merge pull request #1029 from github/mergeback/v2.1.8-to-main-1ed14374
Mergeback v2.1.8 refs/heads/v2 into main
2022-04-08 10:58:37 +01:00
github-actions[bot]
0c80741707 Update checked-in dependencies 2022-04-08 09:02:30 +00:00
github-actions[bot]
792bbfea04 Update changelog and version after v2.1.8 2022-04-08 08:46:10 +00:00
Edoardo Pirovano
1ed1437484 Merge pull request #1027 from github/update-v2.1.8-739937f1
Merge main into v2
2022-04-08 09:44:43 +01:00
github-actions[bot]
3ed22c8145 Update changelog for v2.1.8 2022-04-08 08:16:27 +00:00
Andrew Eisenberg
739937f14e Merge pull request #1025 from github/aeisenberg/get-runs-api
Exclude pull requests from actions/runs request
2022-04-07 16:12:02 -07:00
Andrew Eisenberg
0ecdac49ad Update changelog 2022-04-07 14:02:50 -07:00
Andrew Eisenberg
426a3951ee Exclude pull requests from actions/runs request
This will save time when fetcing the current run and we
don't use the pull requests for anything anyway. It is
ok to leave out.
2022-04-07 14:02:44 -07:00
Edoardo Pirovano
a0b596246a Merge pull request #1014 from github/edoardo/2.8.5-bump
Update default CodeQL version to 2.8.5
2022-04-07 16:12:41 +01:00
Edoardo Pirovano
5d3e1a701c Update default CodeQL version to 2.8.5 2022-04-07 13:41:02 +01:00
Edoardo Pirovano
b9bb8dd18d Merge pull request #1020 from github/mergeback/v2.1.7-to-main-0182a2c7
Mergeback v2.1.7 refs/heads/v2 into main
2022-04-05 10:50:50 -07:00
github-actions[bot]
11673755ab Update checked-in dependencies 2022-04-05 17:17:35 +00:00
github-actions[bot]
d0ca51f5e9 Update changelog and version after v2.1.7 2022-04-05 16:21:20 +00:00
Edoardo Pirovano
0182a2c78c Merge pull request #1019 from github/update-v2.1.7-9cab82f2
Merge main into v2
2022-04-05 09:19:51 -07:00
github-actions[bot]
488f78249e Update changelog for v2.1.7 2022-04-05 14:52:53 +00:00
Edoardo Pirovano
9cab82f202 Merge pull request #1018 from github/edoardo/revert-codescanning-config
Revert usage of `--codescanning-config` flag
2022-04-05 07:50:07 -07:00
Edoardo Pirovano
43d066495c Revert usage of --codescanning-config flag 2022-04-05 09:41:07 +01:00
Edoardo Pirovano
f090899ed0 Merge pull request #1015 from github/edoardo/dependency-update
Fix issue with dependencies
2022-04-01 10:08:50 -07:00
Edoardo Pirovano
8a00ed086d Fix issue with dependencies 2022-04-01 17:36:08 +01:00
Henry Mercer
935969c6f7 Merge pull request #1013 from github/henrymercer/ml-powered-query-pack-v0.2.0
Run version `~0.2.0` of the ML-powered query pack on v2.8.4+ of the CLI
2022-03-31 16:25:07 +01:00
Henry Mercer
e26813cf98 Run version ~0.2.0 of the ML-powered query pack for v2.8.4+ of the CLI 2022-03-31 14:58:41 +01:00
Henry Mercer
2c03704a6c Allow the version of the ML-powered pack to depend on the CLI version 2022-03-31 14:58:29 +01:00
Henry Mercer
dd6b592e3e Simplify ML-powered query status report definition
We now limit the cardinality of the ML-powered JS queries status report
field server-side. With no need for a limit on the cardinality of the
status report client-side, we can simplify how we produce it.
2022-03-31 14:55:32 +01:00
Henry Mercer
a90d8bf711 Merge pull request #1011 from github/henrymercer/ml-powered-queries-pr-check
Add a PR check to validate that ML-powered queries are run correctly
2022-03-31 11:13:26 +01:00
Henry Mercer
dc0338e493 Use latest major version of actions/upload-artifact 2022-03-31 10:11:33 +01:00
Henry Mercer
57096fe795 Add a PR check to validate that ML-powered queries are run correctly 2022-03-31 10:11:30 +01:00
Henry Mercer
b0ddf36abe Merge pull request #1012 from github/henrymercer/update-actions-major-versions
Update major versions of Actions in README and workflows
2022-03-30 21:06:16 +01:00
Henry Mercer
1ea2f2d7f1 Merge branch 'main' into henrymercer/update-actions-major-versions 2022-03-30 20:00:06 +01:00
Henry Mercer
9dcc141f12 Merge pull request #1010 from github/henrymercer/stop-running-ml-powered-queries-on-windows
Stop running ML-powered queries on Windows
2022-03-30 19:57:03 +01:00
Henry Mercer
ea751a9fae Update other Actions from v2 to v3 2022-03-30 19:46:09 +01:00
Henry Mercer
a2949f47b3 Update actions/checkout from v2 to v3 2022-03-30 19:46:09 +01:00
Henry Mercer
7871f0d5e1 Update CodeQL Action from v1 to v2 in README 2022-03-30 19:46:09 +01:00
Henry Mercer
e6f3e049b4 Add descriptions to each test 2022-03-30 18:17:06 +01:00
Henry Mercer
e83a1d469e Stop running ML-powered queries on Windows 2022-03-30 18:05:12 +01:00
Edoardo Pirovano
894faced79 Merge pull request #1008 from github/edoardo/no-fail-12.12
Avoid failure if `@types/node` is already 12.12
2022-03-30 17:52:20 +01:00
Edoardo Pirovano
a9095cefc9 Avoid failure if @types/node is already 12.12 2022-03-30 16:58:25 +01:00
Henry Mercer
4d339ae3ec Merge pull request #1009 from github/henrymercer/run-pr-checks-on-v2-branch
Run all PR checks on the `v2` branch
2022-03-30 16:53:09 +01:00
Henry Mercer
381ea36211 Delete unused workflows 2022-03-30 16:00:52 +01:00
Henry Mercer
e769c2dd6e Run all PR checks on v2 branch 2022-03-30 15:59:09 +01:00
Edoardo Pirovano
bae3a3acab Merge pull request #1005 from github/mergeback/v2.1.6-to-main-28eead24
Mergeback v2.1.6 refs/heads/v2 into main
2022-03-30 14:27:22 +01:00
github-actions[bot]
bcd5c027de Update checked-in dependencies 2022-03-30 11:55:38 +00:00
Chris Gavin
9885f86fab Re-enable waiting for processing by default, using the new API semantics. 2022-03-30 12:24:59 +01:00
github-actions[bot]
ee3341a9d8 Update changelog and version after v2.1.6 2022-03-30 11:13:37 +00:00
Edoardo Pirovano
28eead2408 Merge pull request #1004 from github/update-v2.1.6-bfe9e810
Merge main into v2
2022-03-30 12:12:52 +01:00
Edoardo Pirovano
a4da970395 Run workflow also on v2 branch 2022-03-30 11:47:41 +01:00
Edoardo Pirovano
34a1681e50 Fix location of changelog entry 2022-03-30 11:11:17 +01:00
github-actions[bot]
8833977736 Update changelog for v2.1.6 2022-03-30 09:58:37 +00:00
Edoardo Pirovano
bfe9e81020 Merge pull request #1003 from github/edoardo/fix-workflow
Fix typos in release workflow
2022-03-30 10:56:28 +01:00
Edoardo Pirovano
1d58cc1f27 Fix typos in release workflow 2022-03-30 10:28:34 +01:00
Edoardo Pirovano
d8576e34bf Merge pull request #990 from github/edoardo/2.8.4-bump
Bump default CodeQL version to 2.8.4
2022-03-29 17:34:59 +01:00
Edoardo Pirovano
f1060fbba0 Bump default CodeQL version to 2.8.4 2022-03-29 16:55:25 +01:00
Henry Mercer
af34c6da92 Merge pull request #1002 from github/henrymercer/update-changelog-rewriting
Update changelog rewriting step to match v2+ only changelog notes
2022-03-29 16:50:35 +01:00
Henry Mercer
282b607642 Update changelog rewriting step to match v2+ only release notes 2022-03-29 16:10:02 +01:00
Henry Mercer
f0e2f3c053 Merge pull request #1001 from github/henrymercer/pr-check-validate-node-12-build
Add PR check to validate compatibility with Node 12
2022-03-29 14:27:01 +01:00
Henry Mercer
73ba7ffb48 Merge branch 'main' into henrymercer/pr-check-validate-node-12-build 2022-03-29 13:27:16 +01:00
Henry Mercer
2f4dd4bb41 Use git add --all . 2022-03-29 13:27:03 +01:00
Henry Mercer
8237e85158 Merge pull request #1000 from github/henrymercer/bump-node-js-to-v16
Run Actions on Node 16
2022-03-29 13:07:18 +01:00
Henry Mercer
eea7cf19ff Merge branch 'main' into henrymercer/bump-node-js-to-v16 2022-03-29 12:41:55 +01:00
Edoardo Pirovano
fdc2a903c1 Merge pull request #997 from cdivitotawela/python2-fix
Fix python_setup/install_tool.sh when `python2` not present
2022-03-29 12:15:26 +01:00
Henry Mercer
c22162c09d Merge branch 'main' into henrymercer/bump-node-js-to-v16 2022-03-29 11:59:06 +01:00
Henry Mercer
01c72238c1 Add v2 only prefix to changelog note 2022-03-29 11:58:14 +01:00
Rasmus Wriedt Larsen
63b2636c23 Merge branch 'main' into python2-fix 2022-03-29 10:56:20 +02:00
Edoardo Pirovano
0ed0799824 Merge pull request #999 from github/edoardo/reenable-atm
Start running ATM queries again
2022-03-28 17:06:53 -04:00
Henry Mercer
9e403590f4 Improve code comments 2022-03-28 18:02:19 +01:00
Henry Mercer
45b96c3de6 Add PR check to validate compatibility with Node 12 2022-03-28 16:40:01 +01:00
Henry Mercer
9a709c116e Add changelog note 2022-03-28 16:39:46 +01:00
Henry Mercer
43c9f26143 Bump version to 2.1.6 2022-03-28 14:39:00 +01:00
Henry Mercer
b949e494e4 Upgrade Node type definitions 2022-03-28 14:39:00 +01:00
Henry Mercer
3d23aade46 Use Node.js v16 in all Actions 2022-03-28 14:39:00 +01:00
Edoardo Pirovano
d625a00cee Start running ATM queries again 2022-03-28 09:06:45 +01:00
Chaminda Divitotawela
077ec096bb #996: Fix python_setup/install_tool.sh
When the script  executed on a runner which does not have python2, script incorrectly execute the code inside the if condition. This script runs using /bin/sh in Ubuntu and cause the problem. Fix for this issue to use different syntax in output redirection.

Issue is reproduced using running the job on ubunutu container. Fix also verified in the action https://github.com/cdivitotawela/codeql-issue/actions/runs/2038007502
2022-03-28 07:23:31 +10:00
Henry Mercer
4d6e9c02ac Merge pull request #995 from github/henrymercer/update-release-process
Update release process to maintain both v2 and v1 releases
2022-03-25 19:33:43 +00:00
Henry Mercer
839aa81918 Merge branch 'main' into henrymercer/update-release-process 2022-03-25 19:11:59 +00:00
Andrew Eisenberg
6d1f0a0357 Merge pull request #956 from github/aeisenberg/checkout-path-commitoid
Use the `checkout_path` for getting the commit oid
2022-03-25 11:02:54 -07:00
Andrew Eisenberg
88db5e75ec Merge branch 'main' into aeisenberg/checkout-path-commitoid 2022-03-25 10:31:47 -07:00
Andrew Eisenberg
d068f5372a Fix failing tests 2022-03-25 10:00:47 -07:00
Henry Mercer
044f112dc1 Update branch protection instructions 2022-03-25 15:24:54 +00:00
Henry Mercer
f7846479e6 Merge branch 'main' into henrymercer/update-release-process 2022-03-25 15:18:11 +00:00
Henry Mercer
d0bd80897c Expose a more restrictive interface to the release script
Give the release script modes rather
than source and target branches
2022-03-25 15:17:17 +00:00
Henry Mercer
bed132dae4 Use a more restrictive sed pattern 2022-03-25 13:40:41 +00:00
Henry Mercer
9d26fe0cb3 Use source branch and target branch names consistently 2022-03-25 12:55:00 +00:00
Edoardo Pirovano
6e57bbac6c Merge pull request #998 from github/edoardo/no-download-pack
Don't download packs when it isn't needed
2022-03-25 08:36:15 -04:00
Edoardo Pirovano
85cfdb24f4 Don't download packs when it isn't needed 2022-03-25 11:26:13 +00:00
Henry Mercer
df164705ad Merge pull request #993 from github/dependabot/npm_and_yarn/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6
2022-03-24 18:50:32 +00:00
Henry Mercer
da7944b165 Update release process doc 2022-03-24 18:18:45 +00:00
Henry Mercer
33599909af Avoid conflicts by reverting 1.x version num commit from last v1 release 2022-03-24 18:18:45 +00:00
Henry Mercer
f143182488 Add "Update dependencies" label to v1 release PR 2022-03-24 18:18:45 +00:00
Henry Mercer
0b037b4fcb Add merging the v1 release PR to the checklist 2022-03-24 18:18:45 +00:00
Henry Mercer
1668e0a2bf Only mention merging the mergeback PR in the checklist when relevant 2022-03-24 18:18:45 +00:00
Henry Mercer
bd4757cd6b Update the changelog and version number in a single commit 2022-03-24 18:18:45 +00:00
Henry Mercer
5fb01dd153 Avoid commits with duplicate names during v2 to v1 backport 2022-03-24 18:18:45 +00:00
Henry Mercer
124e7d96a6 Stop versioning the runner
We no longer release the runner.
2022-03-24 18:18:45 +00:00
Henry Mercer
b8f3a377bf Fix exception when there are no commits to merge 2022-03-24 18:18:45 +00:00
Henry Mercer
4b465cb3ce Dump environment and GitHub context 2022-03-24 18:18:45 +00:00
Henry Mercer
d76b18254a Add functionality for v2 -> v1 backports 2022-03-24 18:18:45 +00:00
Henry Mercer
33f749f1c9 Set up main -> v2, v2 -> v1, and v2 -> main merges 2022-03-24 18:18:45 +00:00
Henry Mercer
ccda44cac5 Handle missing author information when generating changelog 2022-03-24 18:18:45 +00:00
Henry Mercer
81827d3fc6 Use the person triggering the release workflow as the conductor 2022-03-24 18:18:45 +00:00
Henry Mercer
b386fd4443 Parameterize release branch workflow over source and target branches 2022-03-24 18:18:45 +00:00
Henry Mercer
2a7a517ea5 Remove unused repository_dispatch trigger 2022-03-24 18:18:45 +00:00
github-actions[bot]
ca5ed24270 Update checked-in dependencies 2022-03-24 16:36:41 +00:00
dependabot[bot]
fb22523acc Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 15:54:01 +00:00
Andrew Eisenberg
b887a2ce1e Merge pull request #976 from aeisenberg/aeisenberg/timeout-45-min
Bump timeout to 45 minutes
2022-03-24 08:33:12 -07:00
Andrew Eisenberg
686c3a37f0 Merge branch 'main' into aeisenberg/timeout-45-min 2022-03-24 08:07:42 -07:00
Chuan-kai Lin
c9973ef56b Merge pull request #992 from cklin/fix-codeql-version-field
Status reporting: fix codeql_version field name
2022-03-23 13:11:09 -07:00
Chuan-kai Lin
c3010cb18a Status reporting: fix codeql_version field name 2022-03-23 11:32:03 -07:00
Henry Mercer
81bfc289f5 Merge pull request #989 from github/henrymercer/update-readme
Update README now build tracing is compatible with Windows 2022
2022-03-21 16:03:34 +00:00
Henry Mercer
5d72058994 Merge branch 'main' into aeisenberg/timeout-45-min 2022-03-21 15:37:09 +00:00
Henry Mercer
6de8537e54 Update README now build tracing is compatible with Windows 2022 2022-03-21 15:31:51 +00:00
Henry Mercer
1d81ec489b Merge pull request #984 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-03-21 13:43:13 +00:00
Henry Mercer
c592f89989 Merge branch 'main' into update-supported-enterprise-server-versions 2022-03-21 13:12:12 +00:00
Henry Mercer
f71aeef4dc Merge pull request #988 from CommanderRoot/refactor/rm-deprecated-substr
refactor: replace deprecated String.prototype.substr()
2022-03-21 10:52:17 +00:00
Tobias Speicher
0a713019c3 refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-20 17:08:43 +01:00
GitHub
243ebf6e35 Update supported GitHub Enterprise Server versions. 2022-03-18 00:09:57 +00:00
Chuan-kai Lin
3886398541 Merge pull request #987 from cklin/report-versions
Include CodeQL CLI and action versions in status reports
2022-03-17 10:46:34 -07:00
Chuan-kai Lin
f60bb5cc38 Include CodeQL CLI and action versions in status reports 2022-03-17 10:07:29 -07:00
Chuan-kai Lin
d0ee2b4276 Merge pull request #983 from github/mergeback/v1.1.5-to-main-88347664
Mergeback v1.1.5 refs/heads/v1 into main
2022-03-15 14:51:17 -07:00
github-actions[bot]
34905f691e Update checked-in dependencies 2022-03-15 19:57:13 +00:00
github-actions[bot]
ac7bd44c3b 1.1.6 2022-03-15 19:39:33 +00:00
github-actions[bot]
1457c164a9 Update changelog and version after v1.1.5 2022-03-15 19:39:31 +00:00
Chuan-kai Lin
8834766498 Merge pull request #982 from github/update-v1.1.5-5b59d878
Merge main into v1
2022-03-15 12:38:22 -07:00
github-actions[bot]
69a58ad266 1.1.5 2022-03-15 18:16:05 +00:00
Chuan-kai Lin
5b59d8784d Merge pull request #978 from cklin/restore-ghes-compatibility
Restore compatibility with GHES 3.1
2022-03-15 09:29:23 -07:00
Chuan-kai Lin
ea5898d606 Restore compatibility with GHES 3.1: address code review comments 2022-03-14 15:44:16 -07:00
Chuan-kai Lin
39aa619399 Merge branch 'main' into restore-ghes-compatibility 2022-03-14 14:59:00 -07:00
Chuan-kai Lin
2190825ac9 Merge pull request #980 from github/edoardo/release-expected
Remove runner from expected release files
2022-03-14 14:40:57 -07:00
Edoardo Pirovano
e61a4b9c7c Merge branch 'main' into edoardo/release-expected 2022-03-14 18:57:18 +00:00
Chuan-kai Lin
b74506c7c2 Merge pull request #974 from github/cklin/pr/2.8.3
Update default CodeQL bundle version to 2.8.3
2022-03-14 11:53:01 -07:00
Edoardo Pirovano
e27fa67f0f Add changenote mentioning deprecation 2022-03-14 18:35:22 +00:00
Edoardo Pirovano
eb507cfac6 Remove runner from expected release files 2022-03-14 17:56:05 +00:00
Chuan-kai Lin
c33cdd74b3 Merge branch 'main' into cklin/pr/2.8.3 2022-03-14 09:19:25 -07:00
Chuan-kai Lin
aeefdce612 Restore compatibility with GHES 3.1 2022-03-14 08:20:27 -07:00
Andrew Eisenberg
761da7eb50 Merge pull request #968 from github/aeisenberg/required-checks
Add some instructions on how to regenerate required checks
2022-03-11 12:11:17 -08:00
Andrew Eisenberg
76c3e91b1f Bump timeout to 45 minutes
With a 30 minute timeout, we were getting some cancelled runs.
This should fix it.
2022-03-11 11:45:45 -08:00
Henry Mercer
560edbc33e Merge branch 'main' into aeisenberg/required-checks 2022-03-11 18:35:59 +00:00
Andrew Eisenberg
e64a215b41 Add name to workflow 2022-03-11 10:16:34 -08:00
Henry Mercer
e437ea1d38 Merge pull request #975 from github/henrymercer/bump-ml-powered-queries-to-0.1.0
Bump ML-powered queries to v0.1.0
2022-03-11 17:47:33 +00:00
Andrew Eisenberg
8ecc1fcbc4 Ignore "Update Supported Enterprise Server Versions" 2022-03-11 09:38:08 -08:00
Henry Mercer
0b3acf68ab Bump ML-powered queries to v0.1.0 2022-03-11 15:04:07 +00:00
Arthur Baars
480ef7689f Update default CodeQL bundle version to 2.8.3 2022-03-11 12:07:37 +01:00
Andrew Eisenberg
4e2634f2fd Merge branch 'main' into aeisenberg/required-checks 2022-03-10 09:20:14 -08:00
Andrew Eisenberg
04d521d705 Avoid using sed, use --slurp instead 2022-03-09 11:07:16 -08:00
Andrew Eisenberg
cdf3c9d01e Merge pull request #971 from github/aeisenberg/timeouts
Add a timeout of 30 min
2022-03-08 20:37:45 -08:00
Andrew Eisenberg
628afae9d3 Add a timeout of 30 min
For all CI jobs. Based on some eye-balling 30 minutes should be
enough time for all jobs to complete.
2022-03-08 14:57:35 -08:00
Andrew Eisenberg
111428ce06 Add some instructions on how to regenerate required checks 2022-03-08 10:19:32 -08:00
Andrew Eisenberg
d2fd19b7d7 Merge pull request #966 from github/mergeback/v1.1.4-to-main-f5d82270
Mergeback v1.1.4 refs/heads/v1 into main
2022-03-07 17:27:08 -08:00
github-actions[bot]
c825c24663 Update checked-in dependencies 2022-03-07 22:12:02 +00:00
github-actions[bot]
0e0e934038 1.1.5 2022-03-07 21:02:20 +00:00
github-actions[bot]
d430deb927 Update changelog and version after v1.1.4 2022-03-07 21:02:19 +00:00
Henning Makholm
f5d822707e Merge pull request #965 from github/update-v1.1.4-308528ba
Merge main into v1
2022-03-07 22:01:06 +01:00
Henning Makholm
1f44993f56 Update CHANGELOG.md 2022-03-07 20:24:16 +01:00
Henning Makholm
701b6a5569 Update CHANGELOG.md
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-03-07 18:15:18 +01:00
Henning Makholm
e75fa83dde Update CHANGELOG.md 2022-03-07 17:49:53 +01:00
Henning Makholm
a33ae09fb8 Update CHANGELOG.md
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-03-07 17:44:04 +01:00
github-actions[bot]
44198be781 1.1.4 2022-03-07 16:22:37 +00:00
Andrew Eisenberg
308528ba13 Merge pull request #958 from daniel-beck/fix-link
Fix link to docs
2022-03-04 10:48:08 -08:00
Chuan-kai Lin
939659ccd0 Merge pull request #959 from cklin/report-runner-os-arch
Add runner OS and arch to status report
2022-03-03 14:59:41 -08:00
Chuan-kai Lin
401a76f245 Add runner OS release to status report 2022-03-03 13:06:02 -08:00
Andrew Eisenberg
5e27f57127 Merge pull request #961 from github/dependabot/npm_and_yarn/actions/artifact-1.0.0
Bump @actions/artifact from 0.5.2 to 1.0.0
2022-03-03 11:23:57 -08:00
github-actions[bot]
4154eaf0e9 Update checked-in dependencies 2022-03-03 17:18:51 +00:00
dependabot[bot]
75e4d9f140 Bump @actions/artifact from 0.5.2 to 1.0.0
Bumps [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) from 0.5.2 to 1.0.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/io@1.0.0/packages/artifact)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 17:01:31 +00:00
Chuan-kai Lin
870dbaaebe Use getRequiredEnvParam()
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-03-02 16:23:13 -08:00
Chuan-kai Lin
3615d8ac45 Add runner OS and arch to status report 2022-03-02 10:57:12 -08:00
Daniel Beck
47dd636fbc Fix link to docs 2022-03-02 15:30:11 +01:00
Edoardo Pirovano
e4766c87d5 Merge pull request #957 from github/edoardo/reuse-codescanning-config
Second attempt to use `--codescanning-config` flag of CLI
2022-03-02 00:27:29 +00:00
Andrew Eisenberg
5c2600e559 Merge branch 'main' into aeisenberg/checkout-path-commitoid 2022-03-01 13:15:40 -08:00
Andrew Eisenberg
a92e8775d8 Use the checkout_path for getting the commit oid
This commit also adds a new integration check to verify this.

When running in test mode, payloads will not be uploaded. Instead, they
will be saved to disk so that they can be inspected later.
2022-03-01 12:40:52 -08:00
Edoardo Pirovano
527d5153ad Bump version flag for using --codescanning-config flag 2022-03-01 14:34:53 +00:00
Edoardo Pirovano
07990f07e5 Revert "Revert "Use --codescanning-config flag of CLI""
This reverts commit 326e5118c5.
2022-03-01 14:33:00 +00:00
Edoardo Pirovano
fa19286989 Merge pull request #954 from github/edoardo/expand-tests
Expand PR checks to cover `windows-2022`
2022-03-01 09:24:51 +00:00
Chris Gavin
b1c781d398 Merge pull request #955 from github/delete-results-directory
Delete the results directory in between runs.
2022-02-28 20:26:51 +00:00
Chris Gavin
938e0a0743 Add retryDelay and a type cast to make it work. 2022-02-28 19:42:58 +00:00
Chris Gavin
d63f798314 Retry directory deletion to avoid Windows file locking issues.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-02-28 18:55:45 +00:00
Chris Gavin
86940df49f Delete the results directory in between runs. 2022-02-28 18:55:45 +00:00
Henning Makholm
25313901b7 Merge pull request #950 from github/hmakholm/pr/2.8.2
Update default CodeQL bundle version to 2.8.2
2022-02-28 19:11:10 +01:00
Edoardo Pirovano
8ec6a84629 Expand PR checks to cover windows-2022 2022-02-28 15:39:34 +00:00
Henning Makholm
162ecaff35 Update default CodeQL bundle version to 2.8.2 2022-02-25 14:09:56 +01:00
Henry Mercer
117a67b074 Merge pull request #949 from github/dependabot/npm_and_yarn/removeNPMAbsolutePaths-3.0.0
Bump removeNPMAbsolutePaths from 2.0.0 to 3.0.0
2022-02-24 18:49:56 +00:00
github-actions[bot]
0da815296a Update checked-in dependencies 2022-02-24 17:03:29 +00:00
dependabot[bot]
4e02f8e87a Bump removeNPMAbsolutePaths from 2.0.0 to 3.0.0
Bumps [removeNPMAbsolutePaths](https://github.com/juanjoDiaz/removeNPMAbsolutePaths) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/juanjoDiaz/removeNPMAbsolutePaths/releases)
- [Commits](https://github.com/juanjoDiaz/removeNPMAbsolutePaths/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: removeNPMAbsolutePaths
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 17:01:55 +00:00
Edoardo Pirovano
438f654919 Merge pull request #948 from github/edoardo/revert-windows-11
Revert "Merge pull request #869 from github/edoardo/windows-11-error"
2022-02-24 14:36:46 +00:00
Edoardo Pirovano
42af7232c3 Revert "Merge pull request #869 from github/edoardo/windows-11-error"
This reverts commit faa9ba7363, reversing
changes made to 71112ab35d.
2022-02-24 11:29:26 +00:00
Andrew Eisenberg
360221eece Merge pull request #947 from github/mergeback/v1.1.3-to-main-75f07e7a
Mergeback v1.1.3 refs/heads/v1 into main
2022-02-23 14:09:47 -08:00
github-actions[bot]
9169d2461f Update checked-in dependencies 2022-02-23 19:50:02 +00:00
github-actions[bot]
949eeb2dcf 1.1.4 2022-02-23 19:33:33 +00:00
github-actions[bot]
507795f5c4 Update changelog and version after v1.1.3 2022-02-23 19:33:31 +00:00
Andrew Eisenberg
75f07e7ab2 Merge pull request #946 from github/update-v1.1.3-d7ad71d8
Merge main into v1
2022-02-23 11:32:12 -08:00
Andrew Eisenberg
42c72a10c8 Update runner version
For some reason, the runner was still on 1.0.x.
2022-02-23 11:02:14 -08:00
Andrew Eisenberg
fa57ef0579 Update changelog 2022-02-23 09:29:10 -08:00
github-actions[bot]
4b66d317a4 1.1.3 2022-02-23 17:13:38 +00:00
Edoardo Pirovano
d7ad71d803 Merge pull request #938 from github/respect-end-tracing
Respect `end-tracing` script instead of deleting one variable
2022-02-23 17:08:20 +00:00
Edoardo Pirovano
afbddca263 Improve error handling for ending tracing 2022-02-23 16:43:38 +00:00
Edoardo Pirovano
c592525a67 Respect end-tracing script instead of deleting one variable 2022-02-23 16:21:35 +00:00
Edoardo Pirovano
f14beebc58 Merge pull request #942 from github/aeisenberg/user-error
Add `UserError`
2022-02-23 11:21:14 +00:00
Andrew Eisenberg
3d93bb2ac9 Add UserError
This commit adds a `UserError` class that should be thrown when the
cause of an error is fundamentally from user configuration.

When sending status reports, avoid sending a `failure` for `UserError`s.
This will prevent our diagnostics from pinging us for errors outside of
our control.
2022-02-17 11:47:31 -08:00
Henry Mercer
040feefecf Merge pull request #941 from github/mergeback/v1.1.2-to-main-d39d5d5c
Mergeback v1.1.2 refs/heads/v1 into main
2022-02-17 19:36:22 +00:00
github-actions[bot]
4d875a922c Update checked-in dependencies 2022-02-17 18:13:39 +00:00
github-actions[bot]
cbc9c75e8f 1.1.3 2022-02-17 17:57:14 +00:00
github-actions[bot]
65174f238c Update changelog and version after v1.1.2 2022-02-17 17:57:09 +00:00
Henry Mercer
d39d5d5c97 Merge pull request #939 from github/update-v1.1.2-fe6fb6f2
Merge main into v1
2022-02-17 17:55:54 +00:00
github-actions[bot]
da54d7bd9f 1.1.2 2022-02-17 16:35:22 +00:00
Henry Mercer
fe6fb6f21b Merge pull request #937 from github/henrymercer/revert-node-16-upgrade
Revert Node.js v16 upgrade
2022-02-17 16:33:46 +00:00
Henry Mercer
72f407c72c Merge branch 'main' into henrymercer/revert-node-16-upgrade 2022-02-17 15:30:43 +00:00
Henry Mercer
cefec5bcb7 Merge pull request #935 from github/mergeback/v1.1.1-to-main-ec300a31
Mergeback v1.1.1 refs/heads/v1 into main
2022-02-17 15:21:01 +00:00
Henry Mercer
070bf9ae1c Add changelog note 2022-02-17 13:56:09 +00:00
Henry Mercer
74dd782377 Merge branch 'main' into mergeback/v1.1.1-to-main-ec300a31 2022-02-17 13:55:34 +00:00
Henry Mercer
78e09bd811 Merge pull request #936 from edoardopirovano/revert-codescanning-config
Revert "Use `--codescanning-config` flag of CLI"
2022-02-17 13:55:06 +00:00
Henry Mercer
72b5ce4f22 Revert "Upgrade Node type definitions"
This reverts commit c72c200f52.
2022-02-17 13:52:07 +00:00
Henry Mercer
21c48e7a01 Revert "Use Node.js v16 in all Actions"
This reverts commit 34c777f8d0.
2022-02-17 13:51:03 +00:00
Edoardo Pirovano
326e5118c5 Revert "Use --codescanning-config flag of CLI"
This reverts commit 0d87b8c615.
2022-02-17 13:05:55 +00:00
github-actions[bot]
b83cccd8a6 Update checked-in dependencies 2022-02-17 12:50:43 +00:00
github-actions[bot]
9b2dafda62 1.1.2 2022-02-17 12:29:38 +00:00
github-actions[bot]
770ee8972e Update changelog and version after v1.1.1 2022-02-17 12:29:36 +00:00
Henry Mercer
ec300a3159 Merge pull request #934 from github/update-v1.1.1-6a961c08
Merge main into v1
2022-02-17 12:28:17 +00:00
github-actions[bot]
c9f98d45c1 1.1.1 2022-02-17 12:00:54 +00:00
Henry Mercer
6a961c08f2 Merge pull request #931 from github/henrymercer/fix-flaky-tests
Bump minimum supported CodeQL version to 2.4.5 to address flaky tests
2022-02-17 11:49:54 +00:00
Henry Mercer
db24c88f31 Merge branch 'main' into henrymercer/fix-flaky-tests 2022-02-17 10:50:19 +00:00
Edoardo Pirovano
c4e058a6a3 Merge pull request #830 from edoardopirovano/cli-config-files
Use `--codescanning-config` flag of CLI
2022-02-16 17:05:16 +00:00
Edoardo Pirovano
0d87b8c615 Use --codescanning-config flag of CLI 2022-02-16 13:34:47 +00:00
Henry Mercer
49c1e2f719 Add changelog note 2022-02-16 13:32:12 +00:00
Henry Mercer
13c841aa39 Bump minimum supported CodeQL version to 2.4.5
This is the earliest CodeQL version supported by GHES.
Bumping to this version resolves some flaky tests caused by the "We
still have not reached idleness" deadlock, as this deadlock is fixed in
2.4.5.
2022-02-16 12:46:47 +00:00
Henry Mercer
ef024e702c Merge pull request #930 from github/henrymercer/open-update-supported-enterprise-versions-as-draft
Open "Update supported enterprise versions" PR as draft
2022-02-16 12:42:23 +00:00
Henry Mercer
1ed61a37b6 Merge branch 'main' into henrymercer/open-update-supported-enterprise-versions-as-draft 2022-02-16 11:55:10 +00:00
Henry Mercer
abba98ef38 Merge pull request #929 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2022-02-16 11:54:53 +00:00
Henry Mercer
9d794b2b2e Open "Update supported enterprise versions" PR as draft
Actions will not run checks on PRs opened by Actions, so opening the PR as draft allows us to trigger PR checks by marking the PR as ready for review.
2022-02-16 10:42:01 +00:00
GitHub
7e1ca4f093 Update supported GitHub Enterprise Server versions. 2022-02-16 00:07:46 +00:00
Henry Mercer
621c8c7115 Merge pull request #928 from github/henrymercer/add-ml-powered-query-enablement-to-analyze-status-report
Add ML-powered query enablement info to analyze finish status report
2022-02-15 19:11:12 +00:00
Henry Mercer
feb711fe0b Merge branch 'main' into henrymercer/add-ml-powered-query-enablement-to-analyze-status-report 2022-02-15 17:31:07 +00:00
Robert
609ca1e4cf Merge pull request #927 from github/robertbrignull/remote_database_upload_flag
Remove check of database uploads feature flag
2022-02-15 17:24:50 +00:00
Robert
4c266bab6d Merge branch 'main' into robertbrignull/remote_database_upload_flag 2022-02-15 15:13:33 +00:00
Henry Mercer
ec47ce3982 Merge branch 'main' into henrymercer/add-ml-powered-query-enablement-to-analyze-status-report 2022-02-15 15:09:02 +00:00
Alexander Eyers-Taylor
e72dfad837 Merge pull request #925 from github/alexet/update-2.8.1
Update bundle version to 2.8.1
2022-02-15 15:07:58 +00:00
Henry Mercer
bcdaad245b Add ML-powered query enablement info to analyze finish status report 2022-02-15 15:04:23 +00:00
Robert
8aa32bd9c9 Remove check of database uploads feature flag 2022-02-15 14:10:33 +00:00
alexet
d8ee3b9d09 Update bundle version to 2.8.1 2022-02-14 19:10:33 +00:00
Henry Mercer
2c6b76bc5a Merge pull request #923 from github/mergeback/v1.1.0-to-main-474bbf07
Mergeback v1.1.0 refs/heads/v1 into main
2022-02-11 12:33:18 +00:00
github-actions[bot]
19debd424c Update checked-in dependencies 2022-02-11 12:12:30 +00:00
github-actions[bot]
3fdc5a23fa 1.1.1 2022-02-11 11:58:00 +00:00
github-actions[bot]
68365ec944 Update changelog and version after v1.1.0 2022-02-11 11:57:58 +00:00
Henry Mercer
474bbf07f9 Merge pull request #922 from github/update-v1.1.0-3d2ad0b9
Merge main into v1
2022-02-11 11:56:36 +00:00
github-actions[bot]
58f66fa60a 1.1.0 2022-02-11 11:24:14 +00:00
Henry Mercer
3d2ad0b9c8 Merge pull request #919 from github/henrymercer/rename-status-report-field
Rename ML powered JS queries status report field
2022-02-10 10:44:15 +00:00
Henry Mercer
7e15b9612a Merge branch 'main' into henrymercer/rename-status-report-field 2022-02-09 13:32:57 +00:00
Henry Mercer
7f9dca2982 Merge pull request #918 from github/henrymercer/windows-2022-tracing-notices
Update changelog and README with build tracing compatibility info
2022-02-09 13:32:18 +00:00
Henry Mercer
87bfa0ea7a Rename ML powered JS queries status report field
The new name `ml_powered_javascript_queries` is more consistent with
status report fields for analysis and interpretation duration metrics.
This isn't a breaking change since the old name never made it into the
GitHub API.
2022-02-09 12:56:31 +00:00
Henry Mercer
a6d606becc Update changelog and README with build tracing compatibility info 2022-02-09 12:47:13 +00:00
Henry Mercer
f2027c51f7 Merge pull request #916 from github/dependabot/npm_and_yarn/runner/simple-get-3.1.1
Bump simple-get from 3.1.0 to 3.1.1 in /runner
2022-02-08 20:59:28 +00:00
dependabot[bot]
70e63f4b08 Bump simple-get from 3.1.0 to 3.1.1 in /runner
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-08 18:33:09 +00:00
Henry Mercer
88073a5f6e Merge pull request #909 from github/henrymercer/bump-node-js-to-v16
Use Node.js v16 in all Actions
2022-02-08 18:32:24 +00:00
Henry Mercer
eb172af46d Merge branch 'main' into henrymercer/bump-node-js-to-v16 2022-02-08 17:06:42 +00:00
Henry Mercer
a777a982cb Merge pull request #917 from github/henrymercer/fix-windows-latest-ci-jobs
Fix CI jobs that broke as a result of `windows-latest` being upgraded to Windows Server 2022
2022-02-08 17:05:36 +00:00
Henry Mercer
8f27994474 Add changelog note 2022-02-08 16:19:47 +00:00
Henry Mercer
8e2954c3fa Bump to v1.1.0
The upgrade to Node.js v16 warrants a minor version bump.
2022-02-08 13:55:23 +00:00
Henry Mercer
8768b0f5a3 Remove stub type definitions 2022-02-08 13:55:23 +00:00
Henry Mercer
c72c200f52 Upgrade Node type definitions 2022-02-08 13:55:23 +00:00
Henry Mercer
34c777f8d0 Use Node.js v16 in all Actions
This is now in active LTS status.
2022-02-08 13:55:23 +00:00
Henry Mercer
8dd2b9ac2f Fix typo in Python package installation CI job 2022-02-08 13:50:46 +00:00
Henry Mercer
b8047e5610 Use windows-2019 for CI jobs involving build tracing
Build tracing currently does not support Windows 2022, so use
`windows-2019` instead of`windows-latest`.
2022-02-08 13:29:20 +00:00
Chuan-kai Lin
edd03fbd2c Merge pull request #914 from github/mergeback/v1.0.32-to-main-2b46439d
Mergeback v1.0.32 refs/heads/v1 into main
2022-02-07 11:23:20 -08:00
github-actions[bot]
f9607205db Update checked-in dependencies 2022-02-07 18:45:41 +00:00
github-actions[bot]
b870f13d6d 1.0.33 2022-02-07 18:22:30 +00:00
github-actions[bot]
2890d306c3 Update changelog and version after v1.0.32 2022-02-07 18:22:28 +00:00
Chuan-kai Lin
2b46439dd5 Merge pull request #913 from github/update-v1.0.32-4eb03fb6
Merge main into v1
2022-02-07 10:21:10 -08:00
github-actions[bot]
6d8390b7cb 1.0.32 2022-02-07 17:21:16 +00:00
Henry Mercer
4eb03fb6f3 Merge pull request #907 from github/henrymercer/report-ml-powered-query-enablement
Report ML-powered query enablement in the `init` status report
2022-02-07 17:16:25 +00:00
Henry Mercer
03c64ef07d Add more documentation for ML-powered JS queries status report
Also be more explicit about which version strings are reportable in
the code.
2022-02-07 16:46:53 +00:00
Henry Mercer
cc622a02a9 Merge branch 'main' into henrymercer/report-ml-powered-query-enablement 2022-02-07 14:39:20 +00:00
Henry Mercer
c95a3d854c Limit cardinality of ML-powered JS queries status report
Some platforms that ingest this status report charge based on the
cardinality of the fields, so here we restrict the version strings we
support to a fixed set.
2022-02-07 14:36:40 +00:00
Henry Mercer
f888be73ce Nit: Simplify code with optional chaining 2022-02-07 14:24:40 +00:00
Chuan-kai Lin
16d4068732 Merge pull request #911 from github/cklin/codeql-cli-2.8.0
Update default CodeQL version to 2.8.0
2022-02-04 13:03:16 -08:00
Chuan-kai Lin
aab545260e Update default CodeQL version to 2.8.0 2022-02-04 11:24:40 -08:00
Henry Mercer
501fe7ff12 Update getMlPoweredJsQueriesStatus doc 2022-02-04 17:16:25 +00:00
Henry Mercer
ad40e4a8f8 Merge branch 'main' into henrymercer/report-ml-powered-query-enablement 2022-02-04 16:38:18 +00:00
Henry Mercer
537b2f873a Add "multiple" report for ML-powered JS query enablement
When multiple ML-powered JS packs are in scope (an unsupported
scenario), the status report is "multiple".
2022-02-04 16:37:26 +00:00
Henry Mercer
9f32fc9b9d Only add ML-powered queries pack if the user didn't manually request it 2022-02-04 16:34:17 +00:00
Thomas Horstmeyer
904d0acf90 Merge pull request #858 from github/use-better-base-sha
Declare the merge base as base for code scanning comparisons
2022-02-04 12:37:55 +00:00
Thomas Horstmeyer
9b14aa7c84 Merge branch 'main' into use-better-base-sha 2022-02-04 12:04:41 +00:00
Henry Mercer
1cddec9558 Add ML-powered queries enablement to init status report
We report this information in the `init` status report rather than the
`analyze` status report so we can gather data about timeouts.
2022-02-03 16:29:28 +00:00
Henry Mercer
a005206838 Convert status report comments to documentation 2022-02-03 11:52:49 +00:00
Henry Mercer
ff33f031e8 Merge pull request #822 from github/dependabot/npm_and_yarn/ava/typescript-3.0.1
Upgrade AVA to v4
2022-02-02 18:01:27 +00:00
Henry Mercer
6a6a3203dd Merge branch 'main' into dependabot/npm_and_yarn/ava/typescript-3.0.1 2022-02-02 17:24:20 +00:00
Henry Mercer
942b34d547 Merge pull request #906 from github/aibaars/fix-typo
Fix typo in error message
2022-02-02 16:25:19 +00:00
Thomas Horstmeyer
3469c69bba Merge branch 'main' into use-better-base-sha 2022-02-02 13:52:13 +00:00
Arthur Baars
d57c2761c9 Fix typo in error message 2022-02-02 13:51:48 +01:00
Henry Mercer
6081b90eae Merge pull request #905 from github/henrymercer/fix-changelog
Fix changelog
2022-02-02 12:02:44 +00:00
Henry Mercer
78eb2c9c00 Fix changelog
Move a couple of entries for #889 that should have been in the
unreleased section but were inadvertently moved into the 1.0.31
release.
2022-02-02 11:13:24 +00:00
Andrew Eisenberg
b2af0740e4 Remove security-events: write from tests
This is not necessary.
2022-02-01 19:17:15 -08:00
Andrew Eisenberg
77194581b7 Merge pull request #904 from cw-acroteau/add-ref-input
Add ref input
2022-02-01 19:15:33 -08:00
cw-acroteau
1a5b604256 Merge branch 'main' into add-ref-input 2022-02-01 20:28:42 -05:00
cw-acroteau
9bfa05fb03 Merge pull request #3 from aeisenberg/aeisenberg/add-ref-input
Update the description of new inputs
2022-02-01 17:19:33 -05:00
Henry Mercer
e9aa623c5d Merge branch 'main' into dependabot/npm_and_yarn/ava/typescript-3.0.1 2022-02-01 18:57:02 +00:00
Henry Mercer
ce89f1b611 Upgrade Ava to v4 2022-02-01 18:56:42 +00:00
Andrew Eisenberg
57f34a1569 Merge pull request #902 from github/aeisenberg/permissions
Add a permissions block for generated workflows
2022-02-01 10:54:05 -08:00
Andrew Eisenberg
941e382c65 Merge branch 'main' into aeisenberg/permissions 2022-02-01 10:37:13 -08:00
Andrew Eisenberg
6c6b8c33c4 Update the description of new inputs
These new inputs will not work on pull requests from forks.
2022-02-01 10:34:45 -08:00
Andrew Eisenberg
13f97c81fe Merge branch 'aeisenberg/permissions' into add-ref-input 2022-02-01 10:31:14 -08:00
Andrew Eisenberg
36419a79c1 Avoid sending status reports in test mode 2022-02-01 10:12:35 -08:00
github-actions[bot]
9a40cc5274 Update checked-in dependencies 2022-02-01 17:46:08 +00:00
Thomas Horstmeyer
ec0b3ae7ff remove some debug info 2022-02-01 15:39:11 +00:00
Thomas Horstmeyer
e836f97769 Detect merge base as base_sha for upload 2022-02-01 15:38:43 +00:00
dependabot[bot]
11639426e6 Bump @ava/typescript from 2.0.0 to 3.0.1
Bumps [@ava/typescript](https://github.com/avajs/typescript) from 2.0.0 to 3.0.1.
- [Release notes](https://github.com/avajs/typescript/releases)
- [Commits](https://github.com/avajs/typescript/compare/v2.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@ava/typescript"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 13:33:29 +00:00
Henry Mercer
a9da9fc959 Merge pull request #901 from github/dependabot/npm_and_yarn/long-5.2.0
Bump long from 4.0.0 to 5.2.0
2022-02-01 13:31:41 +00:00
Henry Mercer
ae8741006b Merge branch 'main' into dependabot/npm_and_yarn/long-5.2.0 2022-02-01 11:11:25 +00:00
Alex Croteau
72f9a88bc5 Regenerates test workflows 2022-01-31 20:07:55 -05:00
Alex Croteau
9f36b75178 Splits integration tests 2022-01-31 20:06:18 -05:00
Alex Croteau
dfe2bc4e49 Changes to commit hash in main branch 2022-01-31 20:06:18 -05:00
Alex Croteau
63d0c7856c Fixes integration tests referred repo 2022-01-31 20:06:18 -05:00
Alex Croteau
3cc87990f0 Updates javascript files 2022-01-31 20:06:18 -05:00
Alex Croteau
260b4d5dc4 Fixes integration test 2022-01-31 20:06:18 -05:00
Alex Croteau
1bfa9ace60 Adds integration test and fixes linting 2022-01-31 20:06:18 -05:00
Alex Croteau
1eaaf07b91 Adds check on inputs and compiled files 2022-01-31 20:06:17 -05:00
Alex Croteau
5916f9896d Applies recomendation in upload-sarif/action.yml 2022-01-31 20:06:17 -05:00
cw-acroteau
0dd4dbf9d9 Apply documentation suggestions from code review
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-01-31 20:06:17 -05:00
Alex Croteau
980fd4ed38 Adds ref and SHA as inputs, and sarif-id as output 2022-01-31 20:06:17 -05:00
Andrew Eisenberg
e9aa2c6f62 Add a permissions block for generated workflows
Ensure that all workflows are able to write security events.
2022-01-31 16:11:00 -08:00
Andrew Eisenberg
e9d52340a3 Merge pull request #900 from github/mergeback/v1.0.31-to-main-1a927e93
Mergeback v1.0.31 refs/heads/v1 into main
2022-01-31 13:36:54 -08:00
github-actions[bot]
392931027a Update checked-in dependencies 2022-01-31 18:36:27 +00:00
dependabot[bot]
ba2b46d53e Bump long from 4.0.0 to 5.2.0
Bumps [long](https://github.com/dcodeIO/long.js) from 4.0.0 to 5.2.0.
- [Release notes](https://github.com/dcodeIO/long.js/releases)
- [Commits](https://github.com/dcodeIO/long.js/compare/4.0.0...v5.2.0)

---
updated-dependencies:
- dependency-name: long
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 18:32:15 +00:00
github-actions[bot]
a602dbedb7 Update checked-in dependencies 2022-01-31 17:42:59 +00:00
Andrew Eisenberg
66777347f6 Merge branch 'main' into mergeback/v1.0.31-to-main-1a927e93 2022-01-31 08:42:20 -08:00
github-actions[bot]
ce6e94b1b8 1.0.32 2022-01-31 16:41:57 +00:00
github-actions[bot]
30790fe430 Update changelog and version after v1.0.31 2022-01-31 16:41:55 +00:00
Andrew Eisenberg
1a927e9307 Merge pull request #899 from github/update-v1.0.31-3a741b6c
Merge main into v1
2022-01-31 08:40:43 -08:00
Henry Mercer
ea2ef8554d Merge pull request #893 from github/dependabot/npm_and_yarn/trim-off-newlines-1.0.3
Bump trim-off-newlines from 1.0.2 to 1.0.3
2022-01-31 16:26:49 +00:00
github-actions[bot]
bbb9c53c65 1.0.31 2022-01-31 16:08:02 +00:00
Henry Mercer
9664bae55e Merge branch 'main' into dependabot/npm_and_yarn/trim-off-newlines-1.0.3 2022-01-31 15:59:28 +00:00
Henry Mercer
3a741b6cf5 Merge pull request #892 from github/dependabot/npm_and_yarn/node-fetch-2.6.7
Bump node-fetch from 2.6.1 to 2.6.7
2022-01-31 15:48:18 +00:00
Henry Mercer
1498bce660 Merge branch 'main' into dependabot/npm_and_yarn/node-fetch-2.6.7 2022-01-31 14:51:48 +00:00
Henry Mercer
c260382f36 Merge pull request #894 from github/dependabot/npm_and_yarn/sinon-13.0.0
Bump sinon from 11.1.2 to 13.0.0
2022-01-31 14:51:33 +00:00
github-actions[bot]
6410c0691e Update checked-in dependencies 2022-01-29 01:49:46 +00:00
github-actions[bot]
8e07ec6ce2 Update checked-in dependencies 2022-01-29 01:33:45 +00:00
github-actions[bot]
c337e5f2f3 Update checked-in dependencies 2022-01-29 01:21:58 +00:00
dependabot[bot]
9673b562d9 Bump sinon from 11.1.2 to 13.0.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 11.1.2 to 13.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v11.1.2...v13.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-29 01:16:14 +00:00
dependabot[bot]
253bc84963 Bump trim-off-newlines from 1.0.2 to 1.0.3
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-29 01:15:48 +00:00
dependabot[bot]
bc4366e948 Bump node-fetch from 2.6.1 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-29 01:15:47 +00:00
Andrew Eisenberg
3b831aafd9 Merge pull request #885 from github/dependabot/npm_and_yarn/runner/node-fetch-2.6.7
Bump node-fetch from 2.6.1 to 2.6.7 in /runner
2022-01-28 17:15:15 -08:00
Andrew Eisenberg
14b1fecf33 Merge branch 'main' into dependabot/npm_and_yarn/runner/node-fetch-2.6.7 2022-01-28 15:42:46 -08:00
Robin Neatherway
5e23536180 Merge pull request #887 from github/rneatherway/content-type
Set contentType for database uploads
2022-01-25 18:40:57 +00:00
Robin Neatherway
5f30e2466f Merge branch 'rneatherway/content-type' of github.com:github/codeql-action into rneatherway/content-type 2022-01-25 17:17:21 +00:00
Andrew Eisenberg
05981c5829 Merge branch 'main' into dependabot/npm_and_yarn/runner/node-fetch-2.6.7 2022-01-25 08:57:02 -08:00
Robin Neatherway
486633d442 Try string literal key 2022-01-25 16:33:09 +00:00
Robin Neatherway
d6360c9075 Merge branch 'main' into rneatherway/content-type 2022-01-25 15:21:13 +00:00
Robin Neatherway
d3a0787934 Merge pull request #886 from github/rneatherway/remove-old-upload-path
Remove old upload path
2022-01-25 14:08:16 +00:00
Robin Neatherway
e13c8bbfb7 Merge branch 'main' into rneatherway/remove-old-upload-path 2022-01-25 12:36:23 +00:00
Andrew Eisenberg
1c9a1f5d01 Merge pull request #888 from github/aeisenberg/remove-experiemental-message
Remove `experimental` warning message for custom packs
2022-01-24 17:03:09 -08:00
Andrew Eisenberg
1f7dab4ba2 Merge branch 'main' into aeisenberg/remove-experiemental-message 2022-01-24 13:30:45 -08:00
Andrew Eisenberg
8a36468d11 Merge pull request #882 from github/aeisenberg/better-error
Ensure loadApiError is caught
2022-01-24 12:05:09 -08:00
Andrew Eisenberg
f8c38c1af3 Update changelog 2022-01-24 09:54:17 -08:00
Robin Neatherway
10249d1591 Update tests to remove feature flag 2022-01-24 17:53:09 +00:00
Andrew Eisenberg
e6bcd71529 Remove experimental warning message for custom packs 2022-01-24 09:40:46 -08:00
Andrew Eisenberg
806fc12eb2 Reword changelog entry and add back test 2022-01-24 09:25:52 -08:00
Andrew Eisenberg
ba352d365b Merge branch 'main' into aeisenberg/better-error 2022-01-24 08:56:14 -08:00
Robin Neatherway
751af2a9e3 Set contentType for database uploads 2022-01-24 15:54:46 +00:00
Robin Neatherway
1a686e7d76 Remove old upload path
The `useUploadDomain` approach is now fully enabled
2022-01-24 15:47:08 +00:00
dependabot[bot]
0479586f61 Bump node-fetch from 2.6.1 to 2.6.7 in /runner
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 13:34:40 +00:00
Edoardo Pirovano
708446c6e4 Merge pull request #884 from github/mergeback/v1.0.30-to-main-8b37404d
Mergeback v1.0.30 refs/heads/v1 into main
2022-01-24 13:33:55 +00:00
github-actions[bot]
392316b555 Update checked-in dependencies 2022-01-24 13:16:43 +00:00
github-actions[bot]
5604c0a3ad 1.0.31 2022-01-24 13:01:42 +00:00
github-actions[bot]
7d8ca8fa93 Update changelog and version after v1.0.30 2022-01-24 13:01:40 +00:00
Edoardo Pirovano
8b37404d56 Merge pull request #883 from github/update-v1.0.30-a7adbce2
Merge main into v1
2022-01-24 13:00:42 +00:00
github-actions[bot]
c180f23bb1 1.0.30 2022-01-24 11:30:41 +00:00
Edoardo Pirovano
a7adbce22c Merge pull request #877 from github/codeql-cli-2.7.6
Update default CodeQL version to 2.7.6
2022-01-24 11:18:52 +00:00
Edoardo Pirovano
3b4e4d44dc Update default CodeQL version to 2.7.6 2022-01-24 09:45:48 +00:00
Andrew Eisenberg
f18151cc59 Update error message and remove feature flag preloading
Discussion here https://github.com/github/codeql-action/pull/882#discussion_r789924177
shows that properly handling preloading feature flag errors is complex
and the benefit we get from it does not offset the complexity.
2022-01-21 11:20:48 -08:00
Andrew Eisenberg
e175dea369 Update changelog 2022-01-21 10:05:52 -08:00
Andrew Eisenberg
752ae5743f Ensure loadApiError is caught
And add a better error message.

By using `void` instead of `await`, any error thrown is not caught
by surrounding try-catch blocks.

I could continue to use `void` and explicitly handle any thrown errors
by using `.catch`, but most likely the time savings is minimal and
this makes the code more complex.
2022-01-21 10:04:08 -08:00
Andrew Eisenberg
0dabead789 Merge pull request #876 from github/aeisenberg/multi-init
Include better error message
2022-01-21 08:42:06 -08:00
Andrew Eisenberg
5e69ce82f8 Merge branch 'main' into aeisenberg/multi-init 2022-01-21 08:04:13 -08:00
Edoardo Pirovano
fdb92bbffe Merge pull request #881 from github/edoardo/respect-env
Respect extra options in a few `codeql` calls
2022-01-21 14:02:21 +00:00
Edoardo Pirovano
14b4839253 Respect extra options in a few codeql calls 2022-01-21 13:44:52 +00:00
Edoardo Pirovano
d76304cd8e Merge pull request #880 from github/mergeback/v1.0.29-to-main-384cfc42
Mergeback v1.0.29 refs/heads/v1 into main
2022-01-21 11:53:08 +00:00
github-actions[bot]
57c4e974c2 Update checked-in dependencies 2022-01-21 11:23:59 +00:00
github-actions[bot]
c2fb041dc1 1.0.30 2022-01-21 11:12:16 +00:00
github-actions[bot]
ac9d34fbc6 Update changelog and version after v1.0.29 2022-01-21 11:12:14 +00:00
Edoardo Pirovano
384cfc42b2 Merge pull request #879 from github/update-v1.0.29-67c0353a
Merge main into v1
2022-01-21 11:11:07 +00:00
github-actions[bot]
5a1e31dc6a 1.0.29 2022-01-21 10:47:33 +00:00
Edoardo Pirovano
67c0353a8c Merge pull request #878 from github/revert-wait-for-processing
Revert "Start waiting for processing by default."
2022-01-21 10:45:30 +00:00
Chris Gavin
7ec25e02e3 Add a changelog note. 2022-01-21 10:26:18 +00:00
Chris Gavin
713eacdf6c Revert "Start waiting for processing by default."
This reverts commit b661ef1697.
2022-01-21 10:25:57 +00:00
Andrew Eisenberg
c8290d07f0 Update changelog
Add a line item for using a better error message.

Also, add a link for an entry that didn't have one before.
2022-01-20 10:31:43 -08:00
Andrew Eisenberg
51126e5cd1 Include better error message
When users call init multiple times.
2022-01-20 10:28:11 -08:00
Edoardo Pirovano
c0b507e521 Merge pull request #875 from github/mergeback/v1.0.28-to-main-8a4b243f
Mergeback v1.0.28 refs/heads/v1 into main
2022-01-18 22:21:27 +00:00
github-actions[bot]
d563b098d7 Update checked-in dependencies 2022-01-18 21:54:31 +00:00
github-actions[bot]
fca047627b 1.0.29 2022-01-18 21:35:32 +00:00
github-actions[bot]
28fe8e7028 Update changelog and version after v1.0.28 2022-01-18 21:35:30 +00:00
Andrew Eisenberg
8a4b243fbf Merge pull request #874 from github/update-v1.0.28-b31df3ff
Merge main into v1
2022-01-18 13:33:47 -08:00
Andrew Eisenberg
19970ae6b5 Update changelog
Add an entry and move an entry.
2022-01-18 12:44:43 -08:00
github-actions[bot]
ec1b16574e 1.0.28 2022-01-18 19:13:38 +00:00
Henning Makholm
b31df3ff95 Merge pull request #866 from github/hmakholm/pr/2.7.5
Bump CodeQL version to 2.7.5
2022-01-17 19:45:58 +01:00
Henning Makholm
776db51d2e Merge remote-tracking branch 'origin/main' into hmakholm/pr/2.7.5 2022-01-17 18:27:39 +01:00
Andrew Eisenberg
b886234637 Merge pull request #872 from github/aeisenberg/category-with-tool
Change category uniqueness test
2022-01-17 09:19:39 -08:00
Henning Makholm
9913c9bfa5 Merge remote-tracking branch 'origin/main' into hmakholm/pr/2.7.5 2022-01-17 18:06:10 +01:00
Andrew Eisenberg
8de62beb50 Merge branch 'main' into aeisenberg/category-with-tool 2022-01-17 09:00:14 -08:00
Andrew Eisenberg
b6fbccaba1 Merge pull request #873 from github/nickrolfe/ruby
Update warning about interpreted languages to mention Ruby
2022-01-14 09:05:50 -08:00
Nick Rolfe
df0c306daf Update warning about interpreted languages to mention Ruby 2022-01-14 11:57:29 +00:00
Andrew Eisenberg
ab1f709732 Allow duplicate categories in the same validation step
A single SARIF file should be allowed to have duplicated
categories.
2022-01-13 10:35:03 -08:00
Andrew Eisenberg
8454e21c9c Change category uniqueness test
Turboscan only allows a single combination of tool name and automation
details id for testing category uniqueness.

Previously, the check in the action was not entirely correct since it
only looked at the _category_ and not the combination of the category
and the tool name.

It's even more precise now since it is looking at the actual, computed
value of the automation details id, rather than an inputted value of
the category.

This change also includes a refactoring where the action is now avoiding
multiple parsing/stringifying of the sarif files. Instead, sarif is
parsed once at the start of the process and stringified once, after
sarif processing is completely finished.
2022-01-12 15:26:34 -08:00
Henning Makholm
d85c3e58ec Bump CodeQL version to 2.7.5 2022-01-12 19:36:20 +01:00
Edoardo Pirovano
cbabe47a0b Merge pull request #871 from github/mergeback/v1.0.27-to-main-cd783c8a
Mergeback v1.0.27 refs/heads/v1 into main
2022-01-11 22:22:02 +00:00
github-actions[bot]
f8a48f464d Update checked-in dependencies 2022-01-11 21:57:25 +00:00
github-actions[bot]
f6f23f8671 1.0.28 2022-01-11 21:43:35 +00:00
github-actions[bot]
c2a7379048 Update changelog and version after v1.0.27 2022-01-11 21:43:33 +00:00
Edoardo Pirovano
cd783c8a29 Merge pull request #870 from github/update-v1.0.27-faa9ba73
Merge main into v1
2022-01-11 21:42:44 +00:00
github-actions[bot]
300c8b6dcb 1.0.27 2022-01-11 20:35:30 +00:00
Edoardo Pirovano
faa9ba7363 Merge pull request #869 from github/edoardo/windows-11-error
Refuse to run on Windows 11
2022-01-11 20:34:11 +00:00
Edoardo Pirovano
d2a0fc83dc Refuse to run on Windows 11 2022-01-11 18:34:33 +00:00
Edoardo Pirovano
71112ab35d Merge pull request #868 from edoardopirovano/debug-artifact-name
Make name of debugging artifact and DB within it configurable
2022-01-07 17:54:41 +00:00
Edoardo Pirovano
e677af3fd0 Make name of debugging artifact and DB within it configurable 2022-01-07 15:10:26 +00:00
Henry Mercer
848e5140d4 Merge pull request #857 from github/henrymercer/ml-powered-queries
Add support for running ML-powered queries for JS `security-extended` behind `ml_powered_queries` feature flag
2022-01-06 17:55:06 +00:00
Henry Mercer
e7fe6da378 Allow patch version of ML-powered queries pack to be bumped 2022-01-06 11:58:03 +00:00
Henry Mercer
2159631658 Only run ML-powered queries with v2.7.5 or newer of the CLI 2022-01-06 11:58:03 +00:00
Henry Mercer
9de1702400 Document use of redundant feature flag API call 2022-01-06 11:58:02 +00:00
Henry Mercer
efded22908 Bump the version of the ATM query pack to 0.0.2 2022-01-06 11:57:33 +00:00
Henry Mercer
5602bd50bf Test loading of ML-powered queries 2022-01-06 11:57:33 +00:00
Henry Mercer
2f4be8e34b Run ML-powered queries for JS security-extended behind feature flag 2022-01-06 11:57:33 +00:00
Edoardo Pirovano
9763bdd6ec Merge pull request #860 from edoardopirovano/always-upload-db
Always upload DB when in debug mode
2022-01-04 18:25:33 +00:00
Edoardo Pirovano
00d4d60204 Always upload DB when in debug mode 2022-01-04 16:49:31 +00:00
Edoardo Pirovano
e5d84de18b Merge pull request #861 from github/remove-debug-output
Remove debugging output
2022-01-02 10:05:46 +00:00
Edoardo Pirovano
ea1acc573a Merge branch 'main' into remove-debug-output 2022-01-02 09:41:49 +00:00
Edoardo Pirovano
79ea6d6a7c Merge pull request #862 from github/aeisenberg/fix-python-tests
Force virtualenv version
2022-01-02 09:41:38 +00:00
Andrew Eisenberg
3e50d096f8 Force virtualenv version
Force the virtualenv version to be 20.11 or less.
The 20.12 version is failing for python 2 right now.
2022-01-01 19:13:10 -08:00
Edoardo Pirovano
cca1cfdacf Remove debugging output 2021-12-31 16:32:08 +00:00
Edoardo Pirovano
cdea582765 Merge pull request #859 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2021-12-29 09:39:28 +00:00
GitHub
3e59dee9e2 Update supported GitHub Enterprise Server versions. 2021-12-29 00:07:19 +00:00
Henry Mercer
249c7ffce1 Merge pull request #856 from github/henrymercer/feature-flagging
Feature flagging via the GitHub API
2021-12-16 16:18:46 +00:00
Henry Mercer
254816c2d2 Stub feature flag API endpoint in tests 2021-12-16 13:39:18 +00:00
Henry Mercer
6d62c245ec Represent feature flags using an enum
Replaces the previous string literal type
2021-12-16 13:38:34 +00:00
Henry Mercer
5e87034b3b Explicitly pass repository to feature flags constructor
As suggested in review: The `GITHUB_REPOSITORY` environment variable is
only available on Actions. Passing it in explicitly avoids potentially
crashing if this code is called from the runner.
2021-12-15 17:03:43 +00:00
Henry Mercer
621e0794ac Throw an error if the feature flag API request errors 2021-12-15 16:34:26 +00:00
Henry Mercer
d6499fad61 Use new feature flag architecture when uploading databases 2021-12-15 13:17:05 +00:00
Henry Mercer
04671efa1d Add support for feature flagging via the GitHub API 2021-12-15 13:16:33 +00:00
Andrew Eisenberg
e1f05902cd Merge pull request #855 from github/correct-changelog
Move changelog entry into correct place
2021-12-14 11:06:40 -08:00
Thomas Horstmeyer
f9e96fa857 Move changelog entry into correct place 2021-12-14 13:49:52 +00:00
Andrew Eisenberg
14a5537e13 Merge pull request #853 from github/aeisenberg/remove-scheduled
Remove scheduled releases
2021-12-13 19:14:37 -08:00
Andrew Eisenberg
d3eb4974a3 Merge branch 'main' into aeisenberg/remove-scheduled 2021-12-13 18:37:38 -08:00
Edoardo Pirovano
39216d10d3 Merge pull request #854 from edoardopirovano/remove-dotnet-restore
Remove `dotnet restore` calls from CI checks
2021-12-13 23:29:58 +00:00
Edoardo Pirovano
265a7db16a Remove dotnet restore calls from CI checks 2021-12-13 18:04:46 +00:00
Andrew Eisenberg
f623d4cec3 Remove scheduled releases
The action will be released roughly every two weeks along
with the CodeQL CLI release process.
2021-12-13 09:34:53 -08:00
Chris Gavin
eacec3646a Merge pull request #843 from github/wait-for-processing-by-default
Start waiting for processing by default.
2021-12-13 12:19:11 +00:00
Chris Gavin
e0e2abc1a5 Merge branch 'main' into wait-for-processing-by-default 2021-12-13 12:04:22 +00:00
Chris Gavin
716b5980cd Merge pull request #844 from github/duplicated-output
Stop printing all output twice.
2021-12-13 11:57:11 +00:00
Chris Gavin
1d83f2a0bc Merge branch 'main' into duplicated-output 2021-12-13 11:44:22 +00:00
Andrew Eisenberg
ce77f88627 Merge pull request #849 from github/mergeback/v1.0.26-to-main-5f532563
Mergeback v1.0.26 refs/heads/v1 into main
2021-12-10 13:41:53 -08:00
github-actions[bot]
a777b51ef7 Update checked-in dependencies 2021-12-10 19:09:21 +00:00
github-actions[bot]
88fbabe21d 1.0.27 2021-12-10 18:40:13 +00:00
github-actions[bot]
eeb215b041 Update changelog and version after v1.0.26 2021-12-10 18:40:11 +00:00
Andrew Eisenberg
5f53256358 Merge pull request #848 from github/update-v1.0.26-07825549
Merge main into v1
2021-12-10 10:39:01 -08:00
github-actions[bot]
25a5103778 1.0.26 2021-12-10 18:20:01 +00:00
Edoardo Pirovano
0782554948 Merge pull request #845 from github/refuse-broken-versions
Refuse to use broken versions in the toolcache
2021-12-09 16:53:57 +00:00
Edoardo Pirovano
705f634a1d Refuse to use broken versions in the toolcache 2021-12-09 13:43:57 +00:00
Chris Gavin
b7b7607959 Stop printing all output twice. 2021-12-09 13:21:32 +00:00
Chris Gavin
7bcc6564d4 Add more context to a change note.
Co-authored-by: Thomas Horstmeyer <73262256+cannist@users.noreply.github.com>
2021-12-09 12:53:20 +00:00
Chris Gavin
b661ef1697 Start waiting for processing by default. 2021-12-09 10:21:34 +00:00
Andrew Eisenberg
6ad00fd084 Merge pull request #842 from github/aeisenberg/cli-2.7.3
Prepare for the CodeQL 2.7.3 release
2021-12-08 17:46:32 -08:00
Andrew Eisenberg
fccdee04ba Prepare for the CodeQL 2.7.3 release 2021-12-08 17:18:05 -08:00
Andrew Eisenberg
e694ca6192 Merge pull request #841 from github/aeisenberg/fix-del
Always use `force: true` for del
2021-12-08 16:01:45 -08:00
Andrew Eisenberg
67d11b5928 Always use force: true for del 2021-12-08 15:37:43 -08:00
Aditya Sharad
924a64d2e0 Merge pull request #840 from github/aeisenberg/fix-rm
Remove rmDir references
2021-12-08 15:08:58 -08:00
Andrew Eisenberg
45dc27d3c1 Remove rmDir references
`rmDir` is not available on the node version used by the actions runner.

Instead, use the `del` package. It is safe, well-tested, and
cross-platform.
2021-12-08 12:11:31 -08:00
Andrew Eisenberg
cbed0358c6 Merge pull request #839 from github/revert-837-aeisenberg/cli-2.7.3
Revert "Bump default CodeQL version to 2.7.3"
2021-12-08 10:58:53 -08:00
Andrew Eisenberg
a8cf6f42c2 Revert "Bump default CodeQL version to 2.7.3" 2021-12-08 10:07:10 -08:00
Andrew Eisenberg
eebe7c46f1 Merge pull request #837 from github/aeisenberg/cli-2.7.3
Bump default CodeQL version to 2.7.3
2021-12-08 09:02:37 -08:00
Edoardo Pirovano
dc32d5448f Add a workflow step to do dotnet restore 2021-12-08 14:47:42 +00:00
Andrew Eisenberg
fac22de4f9 Autobuild: Prefix invocations with CODEQL_RUNNER
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2021-12-07 20:50:17 -08:00
Andrew Eisenberg
0a1efd7f45 Update changelog 2021-12-07 10:50:12 -08:00
Andrew Eisenberg
043e3deaeb Bump default CodeQL version to 2.7.3 2021-12-07 10:45:17 -08:00
Edoardo Pirovano
0dbcb55617 Merge pull request #835 from github/mergeback/v1.0.25-to-main-546b30f3
Mergeback v1.0.25 refs/heads/v1 into main
2021-12-06 16:23:57 +00:00
github-actions[bot]
00c59b98ce Update checked-in dependencies 2021-12-06 15:25:38 +00:00
github-actions[bot]
7069ada3ed 1.0.26 2021-12-06 15:14:23 +00:00
github-actions[bot]
dd1f9a96d8 Update changelog and version after v1.0.25 2021-12-06 15:14:20 +00:00
Robert
546b30f35a Merge pull request #834 from github/update-v1.0.25-f44219c9
Merge main into v1
2021-12-06 15:13:18 +00:00
github-actions[bot]
d1dde03d7a 1.0.25 2021-12-06 14:42:24 +00:00
Robert
f44219c94b Merge pull request #832 from github/robertbrignull/upload_domain
Upload using uploads.github.com if enabled for that repository
2021-12-06 10:24:27 +00:00
Robert
bdaac951f7 Merge branch 'main' into robertbrignull/upload_domain 2021-12-06 09:59:11 +00:00
Robert
a82f53a364 Merge pull request #833 from github/robertbrignull/fix-dotnet
Deal with new dotnet version
2021-12-06 09:58:58 +00:00
Robert
f721f011bf Add call to dotnet restore 2021-12-06 09:43:07 +00:00
Robert
c82e09aa41 Delete bundled db before recreating 2021-12-01 12:25:57 +00:00
Robert
460d053698 Upload using uploads.github.com if enabled for that repository 2021-12-01 12:13:46 +00:00
Edoardo Pirovano
3bf14e85d8 Merge pull request #829 from github/mergeback/v1.0.24-to-main-e095058b
Mergeback v1.0.24 refs/heads/v1 into main
2021-11-23 11:32:20 +00:00
github-actions[bot]
13a9d6c442 Update checked-in dependencies 2021-11-23 11:12:31 +00:00
github-actions[bot]
dd65833ab6 1.0.25 2021-11-23 10:59:43 +00:00
github-actions[bot]
c2d9e4b48f Update changelog and version after v1.0.24 2021-11-23 10:59:41 +00:00
Edoardo Pirovano
e095058bfa Merge pull request #828 from github/update-v1.0.24-0b242db7
Merge main into v1
2021-11-23 10:58:34 +00:00
Edoardo Pirovano
2c99f99c4a Merge branch 'v1' into update-v1.0.24-0b242db7 2021-11-23 09:54:57 +00:00
github-actions[bot]
bcd7e6896f 1.0.24 2021-11-23 09:52:25 +00:00
Edoardo Pirovano
0b242db78f Merge pull request #827 from github/2.7.2-release
Bump default CodeQL version to 2.7.2
2021-11-22 15:17:04 +00:00
Edoardo Pirovano
c897659213 Add CHANGELOG note for new bundle version 2021-11-22 13:11:20 +00:00
Edoardo Pirovano
8b902e1723 Bump default CodeQL version to 2.7.2 2021-11-22 13:09:42 +00:00
Edoardo Pirovano
26567f6a49 Merge pull request #819 from github/mergeback/v1.0.23-to-main-a627e9fa
Mergeback v1.0.23 refs/heads/v1 into main
2021-11-20 00:30:04 +00:00
github-actions[bot]
dbf7ac4b37 Update checked-in dependencies 2021-11-19 23:52:01 +00:00
github-actions[bot]
077f7b2532 1.0.24 2021-11-19 23:46:10 +00:00
github-actions[bot]
a392055010 Update changelog and version after v1.0.23 2021-11-19 23:46:10 +00:00
Henning Makholm
0aea878963 fix changelog 2021-11-19 23:46:10 +00:00
github-actions[bot]
bca71988d3 1.0.23 2021-11-19 23:46:10 +00:00
Edoardo Pirovano
02e1cdcd36 Merge pull request #823 from github/fix-update-workflow
Remove `persist-credentials: false` from workflow
2021-11-19 23:45:25 +00:00
Edoardo Pirovano
4860ed1ad4 Remove persist-credentials: false from workflow 2021-11-19 17:55:10 +00:00
Chris Gavin
3e36cddb07 Merge pull request #781 from github/wait-for-processing
Add an option to allow waiting until an analysis has been processed before finishing the Action.
2021-11-18 12:02:43 +00:00
Chris Gavin
b9bd459b70 Add a clarifying comment to a break. 2021-11-17 15:52:36 +00:00
Chris Gavin
215c4f5ff5 Move the delay to the end of the loop. 2021-11-17 15:51:50 +00:00
Chris Gavin
4eef7ef32c Split out waiting for processing. 2021-11-17 13:20:36 +00:00
Chris Gavin
e0b9b9a248 Check for errors in the analysis status response. 2021-11-17 12:33:42 +00:00
Chris Gavin
823bb21bbb Add a default value for wait-for-processing. 2021-11-17 12:33:38 +00:00
Chris Gavin
49fc4c9b40 Reduce log message level.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2021-11-17 12:14:48 +00:00
Chris Gavin
21a786fda0 Improve a log message.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2021-11-17 12:14:25 +00:00
Chris Gavin
316ad9d919 Add an option to allow waiting until an analysis has been processed before finishing the Action. 2021-11-17 12:14:13 +00:00
Henning Makholm
a627e9fa50 Merge pull request #818 from github/update-v1.0.23-2ecc17d7
Merge main into v1
2021-11-16 20:56:34 +01:00
Henning Makholm
160021fe53 fix changelog 2021-11-16 20:39:37 +01:00
github-actions[bot]
3f2269bf58 1.0.23 2021-11-16 18:48:44 +00:00
Edoardo Pirovano
2ecc17d74f Merge pull request #817 from edoardopirovano/respect-ld-preload
Respect value of `LD_PRELOAD` given by the CLI
2021-11-16 00:22:50 +00:00
Edoardo Pirovano
9b506fed7c Respect value of LD_PRELOAD given by the CLI 2021-11-15 22:16:59 +00:00
Henning Makholm
2803f4a792 Merge pull request #816 from github/hmakholm/pr/2.7.1
Update bundle to version 2.7.1
2021-11-15 20:27:55 +01:00
Henning Makholm
720bf9d157 Merge remote-tracking branch 'origin/main' into hmakholm/pr/2.7.1 2021-11-15 20:05:55 +01:00
Andrew Eisenberg
bbf0a22e84 Merge pull request #801 from github/aeisenberg/upload-by-category
Allow multiple uploads in a single job
2021-11-15 10:57:49 -08:00
Andrew Eisenberg
d7b5c618a4 Merge branch 'main' into aeisenberg/upload-by-category 2021-11-15 10:33:14 -08:00
Henning Makholm
37a4db94ad Update bundle to version 2.7.1 2021-11-15 19:32:53 +01:00
Andrew Eisenberg
6a98a4b500 Allow multiple uploads in a single job
They must all have a unique category. The category will be
converted into an environment variable.
2021-11-15 09:16:25 -08:00
Edoardo Pirovano
ea8a175a94 Merge pull request #812 from github/sanitize-artifact-name
Sanitize artifact name before using
2021-11-08 11:23:19 +00:00
Edoardo Pirovano
f360da772a Sanitize artifact name before using 2021-11-05 08:40:16 +00:00
Andrew Eisenberg
ea169430d2 Merge pull request #809 from edoardopirovano/include-run-id
Include matrix information in debug artifact name
2021-11-04 14:13:02 -07:00
Edoardo Pirovano
375c14729e Include matrix information in debug artifact name 2021-11-04 19:20:24 +00:00
Edoardo Pirovano
0442e71a2a Merge pull request #806 from github/mergeback/v1.0.22-to-main-5581e08a
Mergeback v1.0.22 refs/heads/v1 into main
2021-11-04 12:35:39 +00:00
Edoardo Pirovano
3832953584 Update version numbers in lockfiles 2021-11-04 12:21:48 +00:00
github-actions[bot]
3ce10aec2e 1.0.23 2021-11-04 11:49:59 +00:00
github-actions[bot]
c4b0d49ea3 Update changelog and version after v1.0.22 2021-11-04 11:49:57 +00:00
Edoardo Pirovano
5581e08a65 Merge pull request #805 from github/update-v1.0.22-ae284321
Merge main into v1
2021-11-04 11:48:43 +00:00
github-actions[bot]
df5cf240b0 1.0.22 2021-11-04 11:15:19 +00:00
Edoardo Pirovano
ae2843216b Merge pull request #770 from github/enable-new-tracing
Re-enable new style of tracing
2021-11-04 10:03:53 +00:00
Edoardo Pirovano
5156a89668 Re-enable new style of tracing 2021-11-04 09:47:56 +00:00
Chuan-kai Lin
8f0825e9c0 Merge pull request #804 from github/cklin/include-custom-query-help
Include custom query help in analysis results
2021-11-03 13:33:39 -07:00
Chuan-kai Lin
9a44540e25 Include custom query help in analysis results 2021-11-03 13:19:01 -07:00
Andrew Eisenberg
ff3272d4e1 Merge pull request #786 from github/aeisenberg/dependabot
Fix dependabot issues
2021-11-03 09:56:33 -07:00
Andrew Eisenberg
56c7489b94 Merge branch 'main' into aeisenberg/dependabot 2021-11-02 10:35:28 -07:00
Edoardo Pirovano
3ba4184b13 Merge pull request #798 from edoardopirovano/debug-mode
Add an option to upload some debugging artifacts
2021-11-01 16:44:51 +00:00
Edoardo Pirovano
bc31f604d3 Add an option to upload some debugging artifacts 2021-11-01 16:12:50 +00:00
Chuan-kai Lin
4293754ed2 Merge pull request #738 from github/cklin/extractor-ram-threads-options
Add RAM and threads options to init action
2021-10-28 15:38:33 -07:00
Chuan-kai Lin
70b730eb7d Add RAM and threads options to init action 2021-10-28 15:09:59 -07:00
Edoardo Pirovano
2905689d8a Merge pull request #800 from github/mergeback/v1.0.21-to-main-e891551d
Mergeback v1.0.21 refs/heads/v1 into main
2021-10-28 23:04:40 +01:00
github-actions[bot]
1d123b770b Update checked-in dependencies 2021-10-28 21:33:38 +00:00
github-actions[bot]
9661171991 1.0.22 2021-10-28 21:19:05 +00:00
github-actions[bot]
e04751618e Update changelog and version after v1.0.21 2021-10-28 21:19:04 +00:00
Chuan-kai Lin
e891551dd4 Merge pull request #799 from github/update-v1.0.21-a53b8d0e
Merge main into v1
2021-10-28 14:18:14 -07:00
github-actions[bot]
bd48dc5be5 1.0.21 2021-10-28 20:46:17 +00:00
Chuan-kai Lin
a53b8d0ed1 Merge pull request #795 from github/cklin/codeql-cli-2.7.0-update
Update CodeQL bundle to 20211025 / 2.7.0
2021-10-25 14:10:10 -07:00
Chuan-kai Lin
22747bcb77 Update CodeQL bundle to 20211025 / 2.7.0 2021-10-25 13:45:26 -07:00
Edoardo Pirovano
503f29874a Merge pull request #793 from github/mergeback/v1.0.20-to-main-e86ea38e
Mergeback v1.0.20 refs/heads/v1 into main
2021-10-25 19:31:43 +01:00
github-actions[bot]
c3b8b48b76 Update checked-in dependencies 2021-10-25 18:15:07 +00:00
Edoardo Pirovano
eae8bacaeb Merge branch 'main' into mergeback/v1.0.20-to-main-e86ea38e 2021-10-25 19:12:04 +01:00
Edoardo Pirovano
c226132b0b Merge pull request #794 from edoardopirovano/fix-update-deps
Further fix to update dependencies workflow
2021-10-25 18:30:44 +01:00
Edoardo Pirovano
d3f5d485b3 Further fix to update dependencies workflow 2021-10-25 18:09:40 +01:00
github-actions[bot]
4647e20bb5 1.0.21 2021-10-25 16:50:12 +00:00
github-actions[bot]
1a3e71aa9a Update changelog and version after v1.0.20 2021-10-25 16:50:10 +00:00
Edoardo Pirovano
e86ea38e3f Merge pull request #791 from github/update-v1.0.20-c89d9bd8
Merge main into v1
2021-10-25 17:48:58 +01:00
Aditya Sharad
968c038839 Merge pull request #777 from github/adityasharad/upload-sarif-limits
upload-sarif: Link to docs on upload limits
2021-10-25 09:24:07 -07:00
Andrew Eisenberg
531c6ba7c8 Fix dependabot issues 2021-10-25 08:56:16 -07:00
Aditya Sharad
86fea52924 Merge branch 'main' into adityasharad/upload-sarif-limits 2021-10-25 08:54:15 -07:00
github-actions[bot]
0499230710 1.0.20 2021-10-25 09:02:27 +00:00
Aditya Sharad
c89d9bd8b0 Merge pull request #790 from edoardopirovano/fix-workflow
Fix syntax in a workflow
2021-10-22 09:51:17 -07:00
Edoardo Pirovano
63fd41bf33 Fix syntax in a workflow 2021-10-22 17:40:41 +01:00
Edoardo Pirovano
a35be9cc60 Merge pull request #784 from github/aeisenberg/workflow-fix
Fix failing workflow on main
2021-10-22 11:52:48 +01:00
Edoardo Pirovano
0ebee75b04 Merge pull request #789 from edoardopirovano/secure-workflow
Improve workflow to update dependencies
2021-10-22 11:03:09 +01:00
Edoardo Pirovano
70f007a73c Improve workflow to update dependencies 2021-10-22 10:43:31 +01:00
Andrew Eisenberg
1beeda3ba3 Fix failing workflow on main
We do not want this database uploaded for remote queries.
2021-10-21 11:04:28 -07:00
Andrew Eisenberg
bee5aac8d7 Merge pull request #775 from github/dependabot/npm_and_yarn/typescript-eslint/parser-5.0.0
Bump @typescript-eslint/parser from 4.29.2 to 5.0.0
2021-10-21 10:10:03 -07:00
Andrew Eisenberg
04a87f068f Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/parser-5.0.0 2021-10-21 09:51:48 -07:00
Edoardo Pirovano
ecffc3ce6b Merge pull request #782 from github/mergeback/v1.0.19-to-main-1990ded3
Mergeback v1.0.19 refs/heads/v1 into main
2021-10-18 23:38:06 +01:00
github-actions[bot]
fc15a137e0 Update checked-in dependencies 2021-10-18 22:20:39 +00:00
github-actions[bot]
fd20d82b8d 1.0.20 2021-10-18 22:14:24 +00:00
github-actions[bot]
c49fe2506c Update changelog and version after v1.0.19 2021-10-18 22:14:22 +00:00
Edoardo Pirovano
1990ded3d2 Merge pull request #780 from github/update-v1.0.19-a56f7259
Merge main into v1
2021-10-18 23:13:28 +01:00
github-actions[bot]
f5e572fb4b 1.0.19 2021-10-18 09:02:08 +00:00
Arthur Baars
a56f7259c1 Merge pull request #773 from github/codeql-2.6.3-a-release-prep
Update default codeql bundle to 2.6.3-a
2021-10-15 12:04:57 +02:00
Arthur Baars
5f37061461 Update default codeql bundle to 2.6.3-a 2021-10-15 11:43:16 +02:00
Arthur Baars
286a237e20 Merge pull request #778 from github/aeisenberg/fix-python-tests
Fix failing python tests
2021-10-15 11:42:50 +02:00
Andrew Eisenberg
43ea2ce0c9 Remove explicit 2.26.0 version in python tests
Also, rename test scripts to indicate the version they are using.
2021-10-14 13:40:15 -07:00
Andrew Eisenberg
3df217266d Fix failing python tests
The requests module 1.2.3 is no longer compatible with python >=3.10.0.
So, instead use 2.26.0, the most recent version that is compatible with
our supported python versions at the time of this commit.
2021-10-14 12:37:58 -07:00
Aditya Sharad
73f3a24896 upload-sarif: Link to docs on upload limits 2021-10-14 12:17:06 -07:00
github-actions[bot]
e2f39a6d71 Update checked-in dependencies 2021-10-14 17:05:18 +00:00
dependabot[bot]
6ca99f72e9 Bump @typescript-eslint/parser from 4.29.2 to 5.0.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.29.2 to 5.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.0.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-14 17:00:52 +00:00
Edoardo Pirovano
1ebb0a0a35 Merge pull request #768 from github/mergeback/v1.0.18-to-main-fd3190bb
Mergeback v1.0.18 refs/heads/v1 into main
2021-10-08 15:23:34 +01:00
github-actions[bot]
f2159737dd Update checked-in dependencies 2021-10-08 13:50:27 +00:00
github-actions[bot]
5153cc4c8d 1.0.19 2021-10-08 13:43:00 +00:00
github-actions[bot]
faa3cfa2e9 Update changelog and version after v1.0.18 2021-10-08 13:42:58 +00:00
Edoardo Pirovano
fd3190bba5 Merge pull request #767 from github/update-v1.0.18-0bbf22e3
Merge main into v1
2021-10-08 14:41:56 +01:00
github-actions[bot]
4a45fbee96 1.0.18 2021-10-08 12:07:14 +00:00
Alexander Eyers-Taylor
0bbf22e3b7 Merge pull request #766 from edoardopirovano/disable-new-tracing
Temporarily disable new style of tracing
2021-10-08 13:06:04 +01:00
Edoardo Pirovano
d362b66e03 Temporarily disable new style of tracing 2021-10-08 12:45:52 +01:00
Edoardo Pirovano
9e7b37f8e4 Merge pull request #765 from github/mergeback/v1.0.17-to-main-03e7dda1
Mergeback v1.0.17 refs/heads/v1 into main
2021-10-08 10:14:30 +01:00
github-actions[bot]
944ae88ffe Update checked-in dependencies 2021-10-07 18:56:14 +00:00
github-actions[bot]
ace3701b4a 1.0.18 2021-10-07 18:49:13 +00:00
github-actions[bot]
dbb326152c Update changelog and version after v1.0.17 2021-10-07 18:49:11 +00:00
Alexander Eyers-Taylor
03e7dda1b9 Merge pull request #764 from github/update-v1.0.17-3bfe8ab7
Merge main into v1
2021-10-07 19:48:02 +01:00
github-actions[bot]
ee9e32621e 1.0.17 2021-10-07 18:32:06 +00:00
Alexander Eyers-Taylor
3bfe8ab742 Merge pull request #763 from github/alexet/fix-changelog-version
Fix changelog
2021-10-07 19:29:06 +01:00
Alexander Eyers-Taylor
515f16b728 Merge branch 'main' into alexet/fix-changelog-version 2021-10-07 18:37:24 +01:00
alexet
8b12e8c5e1 Fix changelog
The release is added automatically by the action.
2021-10-07 18:35:10 +01:00
Alexander Eyers-Taylor
10f284c032 Merge pull request #761 from github/codeql-2.6.3-release-prep
Update default codeql bundle to 2.6.3
2021-10-06 18:48:49 +01:00
alexet
19d3f6c536 Update default codeql bundle to 2.6.3 2021-10-06 15:55:21 +01:00
Edoardo Pirovano
7d56b0cd44 Merge pull request #759 from github/mergeback/v1.0.16-to-main-1ddd8a56
Mergeback v1.0.16 refs/heads/v1 into main
2021-10-05 10:26:15 +01:00
github-actions[bot]
69ddeed7d5 Update checked-in dependencies 2021-10-05 08:38:02 +00:00
github-actions[bot]
2c73ad667d 1.0.17 2021-10-05 08:29:45 +00:00
github-actions[bot]
b5a522dfb8 Update changelog and version after v1.0.16 2021-10-05 08:29:43 +00:00
Edoardo Pirovano
1ddd8a5632 Merge pull request #758 from github/update-v1.0.16-ef3290ce
Merge main into v1
2021-10-05 09:28:24 +01:00
Edoardo Pirovano
d96049eeaf Update CHANGELOG date 2021-10-05 09:15:30 +01:00
github-actions[bot]
168327a4aa 1.0.16 2021-10-04 09:02:11 +00:00
Edoardo Pirovano
ef3290ce11 Merge pull request #753 from github/edoardo/use-cli-loc
Use CLI's own baseline LOC counting
2021-09-29 23:59:10 +01:00
Edoardo Pirovano
f04acbbdc3 Use CLI's own baseline LOC counting 2021-09-29 11:17:41 +01:00
Edoardo Pirovano
cd1b9df1e3 Merge pull request #751 from edoardopirovano/deprecare-rmdir
Remove calls to `fs.rmdirSync`
2021-09-23 12:04:05 +01:00
Edoardo Pirovano
292203e8b6 Remove calls to fs.rmdirSync 2021-09-23 09:38:52 +01:00
Edoardo Pirovano
f151a3cfe6 Merge pull request #744 from edoardopirovano/use-db-cluster
Make use of multi-language and indirect tracing
2021-09-23 09:08:04 +01:00
Edoardo Pirovano
ee57c2ed58 Merge branch 'main' into use-db-cluster 2021-09-23 08:54:22 +01:00
Edoardo Pirovano
d521b0e630 Merge pull request #750 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2021-09-23 08:44:33 +01:00
GitHub
5aac657d98 Update supported GitHub Enterprise Server versions. 2021-09-23 00:06:59 +00:00
Edoardo Pirovano
ed36ec077c Merge pull request #749 from github/mergeback/v1.0.15-to-main-1b37538d
Mergeback v1.0.15 refs/heads/v1 into main
2021-09-22 18:41:24 +01:00
github-actions[bot]
bb0850a826 Update checked-in dependencies 2021-09-22 16:57:36 +00:00
github-actions[bot]
f16cf435c3 1.0.16 2021-09-22 16:44:21 +00:00
github-actions[bot]
167d7583fe Update changelog and version after v1.0.15 2021-09-22 16:44:19 +00:00
Edoardo Pirovano
1b37538d9c Merge pull request #748 from github/update-v1.0.15-e40e8879
Merge main into v1
2021-09-22 17:24:19 +01:00
github-actions[bot]
334262d6cf 1.0.15 2021-09-22 15:51:19 +00:00
Edoardo Pirovano
1f4460b9fb Make use of multi-language and indirect tracing 2021-09-22 16:12:23 +01:00
Edoardo Pirovano
e40e887968 Merge pull request #747 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2021-09-22 08:55:45 +01:00
GitHub
6e631b99c4 Update supported GitHub Enterprise Server versions. 2021-09-22 00:05:45 +00:00
Edoardo Pirovano
5a80cb1408 Merge pull request #746 from github/edoardo/2.6.2-release
Bump default CodeQL version to 2.6.2 bundle
2021-09-21 17:59:41 +01:00
Edoardo Pirovano
014d3ea60a Don't use shared compilation 2021-09-21 17:28:22 +01:00
Edoardo Pirovano
8caa0808ee Upload tracer logs 2021-09-21 14:46:08 +01:00
Edoardo Pirovano
fd4659dfd4 Bump default CodeQL version to 2.6.2 bundle 2021-09-21 13:41:10 +01:00
Edoardo Pirovano
7112cdaa06 Merge pull request #743 from github/cklin/dependabot-ignore-fix
Fix dependabot ignore syntax
2021-09-14 21:03:22 +01:00
Chuan-kai Lin
58056a4b12 Fix dependabot ignore syntax
This commit addresses the error:

The property '#/updates/0/ignore' of type object did not match the following type: array
The property '#/updates/1/ignore' of type object did not match the following type: array
2021-09-14 12:42:41 -07:00
Edoardo Pirovano
18cda24a3b Merge pull request #741 from edoardopirovano/dependabot-ignore
Dependabot: Ignore minor and patch versions
2021-09-14 19:49:37 +01:00
Edoardo Pirovano
c93e88dc4b Merge branch 'main' into dependabot-ignore 2021-09-14 17:47:37 +01:00
Andrew Eisenberg
a52e4c3e23 Merge pull request #708 from github/dependabot/npm_and_yarn/typescript-eslint/parser-4.29.2
Bump @typescript-eslint/parser from 4.29.1 to 4.29.2
2021-09-14 09:35:33 -07:00
Edoardo Pirovano
9db151d251 Dependabot: Ignore minor and patch versions 2021-09-14 16:42:07 +01:00
Andrew Eisenberg
6e8752e4d5 Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/parser-4.29.2 2021-09-14 08:38:55 -07:00
Edoardo Pirovano
adfea7610d Merge pull request #726 from github/dependabot/npm_and_yarn/typescript-4.4.2
Bump typescript from 4.3.5 to 4.4.2
2021-09-14 12:16:57 +01:00
Andrew Eisenberg
40568daca8 Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause
is now `unknown` type. So, we need to cast the `e`, `err`, or `error`
variables to type `Error`.
2021-09-10 14:06:27 -07:00
Andrew Eisenberg
5b28adb7ed Merge branch 'main' into dependabot/npm_and_yarn/typescript-4.4.2 2021-09-10 13:13:32 -07:00
Andrew Eisenberg
008b2cc71c Merge pull request #725 from github/aeisenberg/path-parse
Fix dependabot warning on path-parse
2021-09-09 08:15:01 -07:00
Henry Mercer
58d2adec4b Merge branch 'main' into aeisenberg/path-parse 2021-09-09 15:48:13 +01:00
Edoardo Pirovano
b5a94e0978 Merge pull request #736 from edoardopirovano/bump-release
Bump release to `codeql-bundle-20210909`
2021-09-09 15:46:16 +01:00
Edoardo Pirovano
31ae172f4b Bump release to codeql-bundle-20210909 2021-09-09 15:28:33 +01:00
Henry Mercer
d0b95baf8b Merge branch 'main' into aeisenberg/path-parse 2021-09-09 15:07:10 +01:00
Edoardo Pirovano
aa1baf5b84 Merge pull request #735 from github/mergeback/v1.0.14-to-main-4854dd23
Mergeback v1.0.14 refs/heads/v1 into main
2021-09-09 14:15:20 +01:00
github-actions[bot]
bc190d2af9 Update checked-in dependencies 2021-09-09 12:46:47 +00:00
github-actions[bot]
c0971eed35 1.0.15 2021-09-09 12:34:00 +00:00
github-actions[bot]
ac8bd3f417 Update changelog and version after v1.0.14 2021-09-09 12:33:58 +00:00
Edoardo Pirovano
4854dd23d5 Merge pull request #734 from github/update-v1.0.14-83d5f38d
Merge main into v1
2021-09-09 13:32:39 +01:00
github-actions[bot]
c5468fcaea 1.0.14 2021-09-09 11:55:49 +00:00
Edoardo Pirovano
b0b34e58f9 Merge branch 'main' into aeisenberg/path-parse 2021-09-09 12:17:25 +01:00
Edoardo Pirovano
83d5f38dee Merge pull request #732 from edoardopirovano/refactor-checks
Refactor PR checks
2021-09-09 11:41:21 +01:00
Edoardo Pirovano
444316b6c6 Refactor PR checks 2021-09-08 13:59:52 +01:00
Aditya Sharad
7128833392 Merge pull request #733 from github/cklin/codeql-cli-2.6.1-update
Update CodeQL bundle to 20210907 / 2.6.1
2021-09-07 16:02:06 -07:00
Chuan-kai Lin
455ee1f217 Update CodeQL bundle to 20210907 / 2.6.1 2021-09-07 15:07:55 -07:00
Edoardo Pirovano
54fc9c575e Merge pull request #730 from github/mergeback/v1.0.13-to-main-89d78ba4
Mergeback v1.0.13 refs/heads/v1 into main
2021-09-06 13:17:33 +01:00
github-actions[bot]
3525a164c3 Update checked-in dependencies 2021-09-06 11:55:41 +00:00
github-actions[bot]
aeeb3c3e88 1.0.14 2021-09-06 11:50:15 +00:00
github-actions[bot]
88d30845f1 Update changelog and version after v1.0.13 2021-09-06 11:50:13 +00:00
Edoardo Pirovano
89d78ba457 Merge pull request #729 from github/update-v1.0.13-4455bf8c
Merge main into v1
2021-09-06 12:49:34 +01:00
github-actions[bot]
e72d9f4a72 1.0.13 2021-09-06 09:02:00 +00:00
Andrew Eisenberg
4455bf8cd9 Merge pull request #723 from github/adityasharad/readme-indent
README: Minor formatting edits
2021-09-02 10:49:46 -07:00
github-actions[bot]
f27dc32aeb Update checked-in dependencies 2021-09-02 17:02:23 +00:00
dependabot[bot]
bf6f871097 Bump typescript from 4.3.5 to 4.4.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 17:00:45 +00:00
Andrew Eisenberg
cda7fe109b Fix dependabot warning on path-parse 2021-09-01 21:06:53 -07:00
Andrew Eisenberg
12300ac88e Merge branch 'main' into adityasharad/readme-indent 2021-09-01 21:03:17 -07:00
Aditya Sharad
11db623ba8 Merge pull request #724 from aeisenberg/aeisenberg/changelog
Update changelog
2021-09-01 16:35:44 -07:00
Andrew Eisenberg
3f515d3140 Update changelog 2021-09-01 15:58:18 -07:00
Aditya Sharad
a57642e1a0 README: Minor formatting edits 2021-09-01 15:56:15 -07:00
Andrew Eisenberg
bf85baea70 Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/parser-4.29.2 2021-09-01 15:48:55 -07:00
Andrew Eisenberg
62ef9f5eb2 Merge pull request #713 from github/aeisenberg/pr-check-names
Add names to all pr-checks
2021-09-01 15:47:24 -07:00
Andrew Eisenberg
e22a6cd3c9 Merge branch 'main' into aeisenberg/pr-check-names 2021-09-01 15:34:36 -07:00
Andrew Eisenberg
f9b0b9cb7b Merge pull request #715 from edoardopirovano/remove-old-loc
Remove old baseline LoC injection
2021-09-01 10:20:01 -07:00
Andrew Eisenberg
5fc16ebcf6 Merge branch 'main' into remove-old-loc 2021-09-01 09:49:28 -07:00
Andrew Eisenberg
7e2215bc92 Merge pull request #722 from github/esbena-patch-2
Fix typo in docstring
2021-09-01 08:47:47 -07:00
Andrew Eisenberg
3a016ebea8 Merge branch 'main' into remove-old-loc 2021-09-01 07:27:50 -07:00
Andrew Eisenberg
2ba7208ff2 Merge branch 'main' into aeisenberg/pr-check-names 2021-09-01 07:27:25 -07:00
Andrew Eisenberg
72399ae69a Merge branch 'main' into esbena-patch-2 2021-09-01 07:26:43 -07:00
Andrew Eisenberg
c0a58782b6 Merge pull request #721 from github/aeisenberg/update-pack-version
Update integration test pack versions
2021-08-31 21:47:11 -07:00
Andrew Eisenberg
d1ff4d6297 Try the nightly build for packaging integration tests 2021-08-31 19:21:37 -07:00
Andrew Eisenberg
80a6b3a41e Merge branch 'main' into remove-old-loc 2021-08-31 14:58:37 -07:00
Esben Sparre Andreasen
1c27c52804 Fix typo in docstring 2021-08-31 09:27:30 +02:00
Andrew Eisenberg
e833d6e84c Update integration test pack versions 2021-08-26 15:59:11 -07:00
Andrew Eisenberg
8a0c541e24 Merge branch 'main' into aeisenberg/pr-check-names 2021-08-26 10:05:30 -07:00
Andrew Eisenberg
e2d592dc8f Merge pull request #714 from github/aeisenberg/update-linguist
Upgrade linguist dependency
2021-08-26 10:04:42 -07:00
Edoardo Pirovano
2e71e02553 Remove old baseline LoC injection 2021-08-26 13:46:22 +01:00
Andrew Eisenberg
b29bf7b05a Upgrade linguist dependency
This version changes how it counts python heredoc. All heredoc is
counted as code.
2021-08-25 11:15:45 -07:00
Andrew Eisenberg
1785bbb7d8 Add names to all pr-checks 2021-08-25 10:38:25 -07:00
Edoardo Pirovano
a44b61d961 Merge pull request #707 from edoardopirovano/cli-version
Improve handling of CLI versions
2021-08-25 15:52:37 +01:00
Henry Mercer
a062fc9bf5 Merge branch 'main' into cli-version 2021-08-25 15:33:18 +01:00
Aditya Sharad
50de2e4d1e Merge pull request #712 from github/hmakholm/pr/2.6.0
Update CodeQL bundle to 20210824 / 2.6.0
2021-08-24 15:32:25 -07:00
Edoardo Pirovano
132e08a05f Bump version of testing pack 2021-08-24 23:18:22 +01:00
Henning Makholm
720884501a Update CodeQL bundle to 20210824 / 2.6.0 2021-08-24 23:06:42 +02:00
github-actions[bot]
6dc5d80b98 Update checked-in dependencies 2021-08-19 17:02:21 +00:00
dependabot[bot]
542390c023 Bump @typescript-eslint/parser from 4.29.1 to 4.29.2
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.29.1 to 4.29.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.2/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-19 17:00:50 +00:00
Edoardo Pirovano
fd45eac830 Address PR comments from @henrymercer 2021-08-18 16:39:00 +01:00
Edoardo Pirovano
e70ec1d70e Test against oldest supported version 2021-08-18 11:48:12 +01:00
Edoardo Pirovano
70d2efc353 Enforce a minimum version of CodeQL CLI 2021-08-18 11:48:12 +01:00
Edoardo Pirovano
fb77829455 Version flag usage of certain CLI flags 2021-08-18 09:44:49 +01:00
Edoardo Pirovano
4ba53e33d7 Cache result of codeql version 2021-08-18 09:26:33 +01:00
Edoardo Pirovano
f0a2954c12 Merge pull request #706 from iotbo/main
fix indentation error on README.md
2021-08-17 09:53:18 +01:00
iotboy
bf91ac91d4 fix indentation error on README.md 2021-08-17 15:52:11 +08:00
Edoardo Pirovano
e3151ae8df Merge pull request #703 from github/dependabot/npm_and_yarn/runner/webpack-5.50.0
Bump webpack from 5.48.0 to 5.50.0 in /runner
2021-08-16 11:53:47 +01:00
dependabot[bot]
a2f0227de2 Bump webpack from 5.48.0 to 5.50.0 in /runner
Bumps [webpack](https://github.com/webpack/webpack) from 5.48.0 to 5.50.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.48.0...v5.50.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 09:47:18 +00:00
Edoardo Pirovano
2639547a69 Merge pull request #705 from github/mergeback/v1.0.12-to-main-b0e70410
Mergeback v1.0.12 refs/heads/v1 into main
2021-08-16 10:46:00 +01:00
github-actions[bot]
e86cff2acb Update checked-in dependencies 2021-08-16 09:26:34 +00:00
github-actions[bot]
2eb8300e80 1.0.13 2021-08-16 09:20:05 +00:00
github-actions[bot]
78cda05e38 Update changelog and version after v1.0.12 2021-08-16 09:20:02 +00:00
Edoardo Pirovano
b0e70410b4 Merge pull request #704 from github/update-v1.0.12-01d17eaf
Merge main into v1
2021-08-16 10:19:26 +01:00
github-actions[bot]
3254fa5859 1.0.12 2021-08-16 09:02:11 +00:00
Edoardo Pirovano
01d17eaf42 Merge pull request #702 from github/pass-ram-flag
Pass `--ram` flag to `database finalize`
2021-08-12 18:25:43 +01:00
Edoardo Pirovano
0c4306b672 Pass --ram flag to database finalize 2021-08-12 18:12:28 +01:00
Henry Mercer
acd9964b7a Merge pull request #701 from github/henrymercer/brief-releasing-instructions
Add brief instructions on creating a release
2021-08-11 18:57:21 +01:00
Henry Mercer
bc33041cc2 Always run codeql (latest) job on PRs so we can make it required 2021-08-11 18:42:29 +01:00
Henry Mercer
c7203c94d9 Fix conditional in PR checks 2021-08-11 18:27:35 +01:00
Henry Mercer
7f1659f0d8 Merge branch 'main' into henrymercer/brief-releasing-instructions 2021-08-11 18:11:56 +01:00
Henry Mercer
962925a448 Merge pull request #700 from github/henrymercer/reduce-num-pr-check-jobs-on-push
Reduce the number of PR checks that are run on `push`
2021-08-11 18:11:44 +01:00
Henry Mercer
4e477f1b95 Add more details on the workflows involved in the release process 2021-08-11 18:11:25 +01:00
Henry Mercer
a068a286e6 Add brief instructions on creating a release 2021-08-11 17:50:47 +01:00
Henry Mercer
b19f1f91f0 Reduce the number of PR checks that are run on push
If we're running on push, then we can reintroduce the logic that skips
running with `tools: latest` when it would be the same as running with
`tools: null`.
2021-08-11 17:27:26 +01:00
Henry Mercer
f1c75fc816 Merge pull request #694 from github/dependabot/npm_and_yarn/typescript-eslint/parser-4.29.1
Bump @typescript-eslint/parser from 4.29.0 to 4.29.1
2021-08-11 16:14:07 +01:00
github-actions[bot]
1e0763ca30 Update checked-in dependencies 2021-08-11 14:28:28 +00:00
Henry Mercer
5fd8ca8122 Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/parser-4.29.1 2021-08-11 15:12:11 +01:00
Edoardo Pirovano
873a76a1a7 Merge pull request #698 from github/dependabot/npm_and_yarn/eslint-plugin-github-4.2.0
Bump eslint-plugin-github from 4.1.5 to 4.2.0
2021-08-11 14:32:24 +01:00
github-actions[bot]
4a0d3378b1 Update checked-in dependencies 2021-08-11 13:02:43 +00:00
Henry Mercer
46043e8a9e Tweak linting rule changes brought in by eslint-plugin-github upgrade 2021-08-11 13:53:14 +01:00
dependabot[bot]
75aad219f8 Bump eslint-plugin-github from 4.1.5 to 4.2.0
Bumps [eslint-plugin-github](https://github.com/github/eslint-plugin-github) from 4.1.5 to 4.2.0.
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.1.5...v4.2.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-11 12:52:58 +00:00
Henry Mercer
fe83f965e4 Merge pull request #692 from github/dependabot/npm_and_yarn/eslint-plugin-import-2.24.0
Bump eslint-plugin-import from 2.23.4 to 2.24.0
2021-08-11 13:50:45 +01:00
Henry Mercer
3ebf97724d Merge branch 'main' into dependabot/npm_and_yarn/eslint-plugin-import-2.24.0 2021-08-11 13:33:19 +01:00
Henry Mercer
0d884244be Merge pull request #699 from github/henrymercer/allow-latest-checks-to-be-required
Always run the `latest` tools PR checks so we can make them required
2021-08-11 13:32:02 +01:00
Henry Mercer
1263b9c651 Merge branch 'main' into henrymercer/allow-latest-checks-to-be-required 2021-08-11 13:17:37 +01:00
Henry Mercer
93c9da2c2e Reference exported names via import *.
Rather than via properties on default exports — see
https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
2021-08-11 13:17:04 +01:00
Henry Mercer
060eb52d32 Merge branch 'main' into dependabot/npm_and_yarn/eslint-plugin-import-2.24.0 2021-08-11 13:05:55 +01:00
Henry Mercer
8c8a933d75 Merge pull request #693 from github/dependabot/npm_and_yarn/ava/typescript-2.0.0
Bump @ava/typescript from 1.1.1 to 2.0.0
2021-08-11 13:01:56 +01:00
Henry Mercer
743d8dfb6e Always run the latest tools PR checks so we can make them required 2021-08-11 13:01:33 +01:00
Henry Mercer
75d42bea8d Add compile property to ava configuration
This is required with `@ava/typescript` v2
2021-08-11 12:23:19 +01:00
Henry Mercer
46ddfc6186 Merge branch 'main' into dependabot/npm_and_yarn/ava/typescript-2.0.0 2021-08-11 12:18:01 +01:00
Andrew Eisenberg
07fa17da87 Merge pull request #689 from github/aeisenberg/update-permissions
Updates the permissions block to be minimal
2021-08-09 15:12:02 -07:00
Andrew Eisenberg
61fb5d7202 Merge branch 'main' into aeisenberg/update-permissions 2021-08-09 14:56:35 -07:00
Aditya Sharad
89e4b4fff3 Merge pull request #697 from github/mergeback/v1.0.11-to-main-db7158f9
Mergeback v1.0.11 refs/heads/v1 into main
2021-08-09 14:36:43 -07:00
github-actions[bot]
9ad3f820af Update checked-in dependencies 2021-08-09 21:20:18 +00:00
github-actions[bot]
5ba154a3b4 1.0.12 2021-08-09 21:14:09 +00:00
github-actions[bot]
bb0eba15f5 Update changelog and version after v1.0.11 2021-08-09 21:14:08 +00:00
Aditya Sharad
db7158f9ba Merge pull request #696 from github/update-v1.0.11-20de0f01
Merge main into v1
2021-08-09 14:13:36 -07:00
github-actions[bot]
94013c25cf 1.0.11 2021-08-09 20:35:05 +00:00
Aditya Sharad
20de0f01a3 Merge pull request #691 from github/adityasharad/changelog-2.5.9
Changelog: Add note for CodeQL 2.5.9
2021-08-09 13:30:39 -07:00
Andrew Eisenberg
21753283b1 Updates the permissions block to be minimal
And adds a permissions block to the README.
2021-08-09 13:30:16 -07:00
Aditya Sharad
44c8bd3e63 Merge branch 'main' into adityasharad/changelog-2.5.9 2021-08-09 13:13:28 -07:00
github-actions[bot]
952b2690da Update checked-in dependencies 2021-08-09 19:50:05 +00:00
github-actions[bot]
d6a5bf5c1c Update checked-in dependencies 2021-08-09 19:49:49 +00:00
github-actions[bot]
068ade0b31 Update checked-in dependencies 2021-08-09 19:49:16 +00:00
dependabot[bot]
183487b717 Bump @typescript-eslint/parser from 4.29.0 to 4.29.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.29.0 to 4.29.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.1/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 19:48:52 +00:00
dependabot[bot]
38bb211981 Bump @ava/typescript from 1.1.1 to 2.0.0
Bumps [@ava/typescript](https://github.com/avajs/typescript) from 1.1.1 to 2.0.0.
- [Release notes](https://github.com/avajs/typescript/releases)
- [Commits](https://github.com/avajs/typescript/compare/v1.1.1...v2.0.0)

---
updated-dependencies:
- dependency-name: "@ava/typescript"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 19:48:14 +00:00
dependabot[bot]
a0ab4842b5 Bump eslint-plugin-import from 2.23.4 to 2.24.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.23.4 to 2.24.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 19:47:56 +00:00
Aditya Sharad
9e304b92ff Merge pull request #690 from github/revert-650-dependabot/npm_and_yarn/jsonschema-1.4.0
Revert "Bump jsonschema from 1.2.6 to 1.4.0"
2021-08-09 12:47:22 -07:00
Aditya Sharad
5e1d24657c Merge branch 'main' into revert-650-dependabot/npm_and_yarn/jsonschema-1.4.0 2021-08-09 12:31:16 -07:00
Aditya Sharad
2b6d86c672 Changelog: Add note for CodeQL 2.5.9 2021-08-09 12:30:03 -07:00
Aditya Sharad
5bcf9d9972 Merge pull request #687 from github/hmakholm/pr/2.5.9
Update CodeQL bundle to 20210809 / 2.5.9
2021-08-09 12:27:39 -07:00
Chuan-kai Lin
8068352efa Revert "Bump jsonschema from 1.2.6 to 1.4.0" 2021-08-09 12:03:58 -07:00
Aditya Sharad
bef7eecb10 Merge pull request #685 from adityasharad/tests/ruby-nightly
Add PR check job for Ruby beta
2021-08-09 12:03:23 -07:00
Henry Mercer
1df71f8baa Merge branch 'main' into hmakholm/pr/2.5.9 2021-08-09 18:28:53 +01:00
Henry Mercer
8ddd620de3 Merge pull request #682 from github/dependabot/npm_and_yarn/runner/ts-loader-9.2.5
Bump ts-loader from 9.2.4 to 9.2.5 in /runner
2021-08-09 18:28:39 +01:00
Aditya Sharad
53cfc95284 Add PR check job for Ruby beta
Add a separate job that analyses the multilanguage test repo's Ruby code.
For now, run this only with the latest released CodeQL build from defaults.json.
The cached builds and nightly builds don't support Ruby yet.

In future, we can update this and other PR checks to test a wider range of cases.
2021-08-09 08:42:02 -07:00
Henning Makholm
b22fb4674b Update CodeQL bundle to 20210809 / 2.5.9 2021-08-09 16:52:58 +02:00
dependabot[bot]
64160b2268 Bump ts-loader from 9.2.4 to 9.2.5 in /runner
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.4 to 9.2.5.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.4...v9.2.5)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 12:44:53 +00:00
Henry Mercer
ab6c0bce1b Merge pull request #683 from github/dependabot/npm_and_yarn/runner/webpack-5.48.0
Bump webpack from 5.47.1 to 5.48.0 in /runner
2021-08-09 13:44:12 +01:00
dependabot[bot]
2a5fc0f6de Bump webpack from 5.47.1 to 5.48.0 in /runner
Bumps [webpack](https://github.com/webpack/webpack) from 5.47.1 to 5.48.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.47.1...v5.48.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-05 17:09:57 +00:00
Henry Mercer
d98d4f5fa8 Merge pull request #679 from github/henrymercer/triggering-pr-checks
Create PRs as drafts to prompt maintainers to trigger PR checks
2021-08-04 10:16:31 +01:00
Henry Mercer
2632b65a56 Add ready_for_review type to pull_request trigger types
This runs checks on reopened draft PRs to support triggering PR checks
on draft PRs that were opened by other workflows.
2021-08-03 19:29:42 +01:00
Henry Mercer
7eb261eac8 Create PRs as drafts to prompt maintainers to trigger PR checks
PR checks won't be triggered on PRs created by Actions workflows.
Therefore mark PRs created by workflows as draft to prompt maintainers
to take the PR out of draft, thereby triggering PR checks.
2021-08-03 18:21:41 +01:00
Edoardo Pirovano
33927cc1c9 Merge pull request #675 from github/dependabot/npm_and_yarn/typescript-eslint/parser-4.29.0
Bump @typescript-eslint/parser from 4.28.5 to 4.29.0
2021-08-03 12:02:19 +01:00
github-actions[bot]
56b49fcd72 Update checked-in dependencies 2021-08-03 10:50:22 +00:00
dependabot[bot]
a673c950da Bump @typescript-eslint/parser from 4.28.5 to 4.29.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.5 to 4.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.29.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-03 10:49:07 +00:00
Edoardo Pirovano
0f516d90cf Merge pull request #674 from github/mergeback/v1.0.10-to-main-a00769bd
Mergeback v1.0.10 refs/heads/v1 into main
2021-08-03 11:47:29 +01:00
github-actions[bot]
3057100963 Update checked-in dependencies 2021-08-03 09:51:52 +00:00
github-actions[bot]
e7f3012cc2 1.0.11 2021-08-03 09:06:20 +00:00
github-actions[bot]
af7bc11dda Update changelog and version after v1.0.10 2021-08-03 09:06:16 +00:00
Henry Mercer
a00769bdfb Merge pull request #673 from github/update-v1.0.10-fa18c606
Merge main into v1
2021-08-03 10:05:43 +01:00
Henry Mercer
6e07237fd0 Update release date in changelog 2021-08-03 09:52:01 +01:00
github-actions[bot]
1b2479810e 1.0.10 2021-08-02 16:50:12 +00:00
Henry Mercer
fa18c6064c Merge pull request #672 from github/henrymercer/reenable-diagnostics-summaries
Re-enable diagnostics summaries in the output logs of the `analyze` action
2021-08-02 17:44:44 +01:00
Henry Mercer
adc7ff601c Add changelog note 2021-08-02 17:28:19 +01:00
Henry Mercer
4f7bdf9d42 Re-enable diagnostics summaries in the output of the analyze action 2021-08-02 17:06:09 +01:00
Edoardo Pirovano
60484b2ccc Merge pull request #667 from github/dependabot/npm_and_yarn/runner/webpack-5.47.1
Bump webpack from 5.47.0 to 5.47.1 in /runner
2021-08-02 13:25:38 +01:00
dependabot[bot]
9a562a33ac Bump webpack from 5.47.0 to 5.47.1 in /runner
Bumps [webpack](https://github.com/webpack/webpack) from 5.47.0 to 5.47.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.47.0...v5.47.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 10:22:48 +00:00
Edoardo Pirovano
344d820984 Merge pull request #669 from github/dependabot/npm_and_yarn/eslint-7.32.0
Bump eslint from 7.31.0 to 7.32.0
2021-08-02 11:21:28 +01:00
Edoardo Pirovano
2fcaf414fc Merge branch 'main' into dependabot/npm_and_yarn/eslint-7.32.0 2021-08-02 11:08:40 +01:00
Edoardo Pirovano
a300034dbd Merge pull request #671 from github/mergeback/v1.0.9-to-main-33f3438c
Mergeback v1.0.9 refs/heads/v1 into main
2021-08-02 11:08:09 +01:00
github-actions[bot]
ea8896ddf6 Update checked-in dependencies 2021-08-02 09:40:03 +00:00
github-actions[bot]
a73bba9f11 1.0.10 2021-08-02 09:36:30 +00:00
github-actions[bot]
6e12f03311 Update changelog and version after v1.0.9 2021-08-02 09:36:28 +00:00
Edoardo Pirovano
33f3438c1d Merge pull request #670 from github/update-v1.0.9-fb5a7215
Merge main into v1
2021-08-02 10:35:43 +01:00
github-actions[bot]
758835d67a 1.0.9 2021-08-02 09:02:27 +00:00
github-actions[bot]
9b3d4fd580 Update checked-in dependencies 2021-08-02 08:58:52 +00:00
dependabot[bot]
1c369971ff Bump eslint from 7.31.0 to 7.32.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.31.0 to 7.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.31.0...v7.32.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 08:57:28 +00:00
Edoardo Pirovano
fb5a72155f Merge pull request #666 from edoardopirovano/dependabot-runner
Enable Dependabot on runner
2021-08-02 09:56:18 +01:00
Edoardo Pirovano
2ea04f7e8a Enable dependabot on runner 2021-08-02 09:26:19 +01:00
Edoardo Pirovano
833be9c64e Merge pull request #663 from edoardopirovano/update-runner-deps
Update runner building dependencies
2021-07-29 16:15:32 +01:00
Edoardo Pirovano
54e3e4405e Update runner building dependencies 2021-07-29 11:06:31 +01:00
Edoardo Pirovano
1957254b4c Merge pull request #662 from github/dependabot/npm_and_yarn/types/node-16.4.6
Bump @types/node from 16.4.5 to 16.4.6
2021-07-29 10:51:35 +01:00
github-actions[bot]
e050205119 Update checked-in dependencies 2021-07-29 09:07:43 +00:00
dependabot[bot]
3b74ec2288 Bump @types/node from 16.4.5 to 16.4.6
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.4.5 to 16.4.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-29 09:06:25 +00:00
Edoardo Pirovano
5b2b500646 Merge pull request #661 from github/dependabot/npm_and_yarn/micromatch-4.0.4
Bump micromatch from 4.0.2 to 4.0.4
2021-07-28 18:15:56 +01:00
Edoardo Pirovano
aacf63d354 Merge branch 'main' into dependabot/npm_and_yarn/micromatch-4.0.4 2021-07-28 18:03:42 +01:00
Edoardo Pirovano
fe639a1033 Merge pull request #660 from github/dependabot/npm_and_yarn/md5-2.3.0
Bump md5 from 2.2.1 to 2.3.0
2021-07-28 18:00:53 +01:00
Edoardo Pirovano
fd833ba2c1 Merge branch 'main' into dependabot/npm_and_yarn/md5-2.3.0 2021-07-28 17:48:54 +01:00
Edoardo Pirovano
7e7162aa1e Merge pull request #659 from github/dependabot/npm_and_yarn/commander-8.1.0
Bump commander from 8.0.0-1 to 8.1.0
2021-07-28 17:00:31 +01:00
Edoardo Pirovano
3baa223274 Merge branch 'main' into dependabot/npm_and_yarn/commander-8.1.0 2021-07-28 16:36:44 +01:00
github-actions[bot]
8fa56f3f78 Update checked-in dependencies 2021-07-28 15:21:12 +00:00
dependabot[bot]
c508d620dd Bump micromatch from 4.0.2 to 4.0.4
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.2...4.0.4)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 15:17:58 +00:00
Edoardo Pirovano
ec2762e6fe Merge pull request #657 from github/dependabot/npm_and_yarn/actions/core-1.4.0
Bump @actions/core from 1.2.6 to 1.4.0
2021-07-28 16:16:52 +01:00
github-actions[bot]
a40becf6e4 Update checked-in dependencies 2021-07-28 15:07:08 +00:00
dependabot[bot]
5a67cbafe6 Bump md5 from 2.2.1 to 2.3.0
Bumps [md5](https://github.com/pvorb/node-md5) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/pvorb/node-md5/releases)
- [Commits](https://github.com/pvorb/node-md5/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: md5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 15:04:09 +00:00
Edoardo Pirovano
f3061d6dee Merge branch 'main' into dependabot/npm_and_yarn/actions/core-1.4.0 2021-07-28 16:03:47 +01:00
Edoardo Pirovano
a61bfd9ae4 Merge pull request #655 from github/dependabot/npm_and_yarn/uuid-8.3.2
Bump uuid from 8.3.0 to 8.3.2
2021-07-28 16:03:31 +01:00
github-actions[bot]
5fee2f2ed7 Update checked-in dependencies 2021-07-28 10:18:36 +00:00
github-actions[bot]
46a225cb6f Update checked-in dependencies 2021-07-28 10:17:49 +00:00
dependabot[bot]
25fef55830 Bump commander from 8.0.0-1 to 8.1.0
Bumps [commander](https://github.com/tj/commander.js) from 8.0.0-1 to 8.1.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v8.0.0-1...v8.1.0)

---
updated-dependencies:
- dependency-name: commander
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 10:17:10 +00:00
dependabot[bot]
d523ba9baa Bump @actions/core from 1.2.6 to 1.4.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.4.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 10:16:31 +00:00
Edoardo Pirovano
ad37b812d5 Merge branch 'main' into dependabot/npm_and_yarn/uuid-8.3.2 2021-07-28 11:01:05 +01:00
Edoardo Pirovano
e97797c21b Merge pull request #656 from github/dependabot/npm_and_yarn/types/semver-7.3.8
Bump @types/semver from 7.2.0 to 7.3.8
2021-07-28 10:29:08 +01:00
Edoardo Pirovano
cdcc3e81d5 Merge branch 'main' into dependabot/npm_and_yarn/types/semver-7.3.8 2021-07-28 10:08:53 +01:00
Edoardo Pirovano
e18dc0f8c5 Merge pull request #653 from github/dependabot/npm_and_yarn/types/jszip-3.4.1
Bump @types/jszip from 3.1.6 to 3.4.1
2021-07-28 09:56:26 +01:00
Edoardo Pirovano
6799d572f7 Merge branch 'main' into dependabot/npm_and_yarn/types/jszip-3.4.1 2021-07-28 09:39:54 +01:00
Edoardo Pirovano
802eff9491 Merge pull request #652 from github/dependabot/npm_and_yarn/types/node-16.4.5
Bump @types/node from 16.4.3 to 16.4.5
2021-07-28 09:23:27 +01:00
github-actions[bot]
532d1b906d Update checked-in dependencies 2021-07-28 08:10:17 +00:00
github-actions[bot]
ecdbfd6594 Update checked-in dependencies 2021-07-28 08:08:52 +00:00
github-actions[bot]
351d080ced Update checked-in dependencies 2021-07-28 08:08:26 +00:00
github-actions[bot]
d0e23476a6 Update checked-in dependencies 2021-07-28 08:08:17 +00:00
dependabot[bot]
f0fd45b66f Bump @types/semver from 7.2.0 to 7.3.8
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.2.0 to 7.3.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

---
updated-dependencies:
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 08:07:37 +00:00
dependabot[bot]
32c4995972 Bump uuid from 8.3.0 to 8.3.2
Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.0 to 8.3.2.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.2)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 08:07:24 +00:00
dependabot[bot]
d1d4cc3106 Bump @types/jszip from 3.1.6 to 3.4.1
Bumps [@types/jszip](https://github.com/Stuk/jszip) from 3.1.6 to 3.4.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/commits)

---
updated-dependencies:
- dependency-name: "@types/jszip"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 08:06:49 +00:00
dependabot[bot]
c6b30dcdcb Bump @types/node from 16.4.3 to 16.4.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.4.3 to 16.4.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 08:05:52 +00:00
Edoardo Pirovano
62be3f8b9d Merge pull request #651 from github/dependabot/npm_and_yarn/sinon-11.1.2
Bump sinon from 9.0.2 to 11.1.2
2021-07-28 00:33:21 +01:00
Edoardo Pirovano
e1828d5291 Merge branch 'main' into dependabot/npm_and_yarn/sinon-11.1.2 2021-07-28 00:21:54 +01:00
Edoardo Pirovano
ea5e62748e Merge pull request #650 from github/dependabot/npm_and_yarn/jsonschema-1.4.0
Bump jsonschema from 1.2.6 to 1.4.0
2021-07-28 00:20:47 +01:00
Edoardo Pirovano
b1e69f9179 Merge branch 'main' into dependabot/npm_and_yarn/jsonschema-1.4.0 2021-07-28 00:07:02 +01:00
Edoardo Pirovano
5fc3f3af30 Merge pull request #649 from github/dependabot/npm_and_yarn/octokit/plugin-retry-3.0.9
Bump @octokit/plugin-retry from 3.0.3 to 3.0.9
2021-07-28 00:04:09 +01:00
Edoardo Pirovano
30a243e57a Merge branch 'main' into dependabot/npm_and_yarn/octokit/plugin-retry-3.0.9 2021-07-27 23:53:25 +01:00
Edoardo Pirovano
659ec058e3 Merge pull request #648 from github/dependabot/npm_and_yarn/types/long-4.0.1
Bump @types/long from 4.0.0 to 4.0.1
2021-07-27 23:52:18 +01:00
Edoardo Pirovano
70bbe2df84 Merge branch 'main' into dependabot/npm_and_yarn/types/long-4.0.1 2021-07-27 23:40:50 +01:00
Edoardo Pirovano
16fa9d48f8 Merge pull request #647 from github/dependabot/npm_and_yarn/actions/artifact-0.5.2
Bump @actions/artifact from 0.5.1 to 0.5.2
2021-07-27 23:40:34 +01:00
github-actions[bot]
67954db0cf Update checked-in dependencies 2021-07-27 22:26:34 +00:00
github-actions[bot]
1c4c64199f Update checked-in dependencies 2021-07-27 22:26:09 +00:00
github-actions[bot]
0cae9d939e Update checked-in dependencies 2021-07-27 22:25:35 +00:00
github-actions[bot]
5eb7f8c9a4 Update checked-in dependencies 2021-07-27 22:24:53 +00:00
github-actions[bot]
6abc4a8c32 Update checked-in dependencies 2021-07-27 22:24:17 +00:00
dependabot[bot]
3ba511a8f1 Bump sinon from 9.0.2 to 11.1.2
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.2 to 11.1.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/commits)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 22:23:24 +00:00
dependabot[bot]
5f6ba88b4b Bump jsonschema from 1.2.6 to 1.4.0
Bumps [jsonschema](https://github.com/tdegrunt/jsonschema) from 1.2.6 to 1.4.0.
- [Release notes](https://github.com/tdegrunt/jsonschema/releases)
- [Commits](https://github.com/tdegrunt/jsonschema/compare/v1.2.6...v1.4.0)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 22:23:07 +00:00
dependabot[bot]
50cb464f4a Bump @octokit/plugin-retry from 3.0.3 to 3.0.9
Bumps [@octokit/plugin-retry](https://github.com/octokit/plugin-retry.js) from 3.0.3 to 3.0.9.
- [Release notes](https://github.com/octokit/plugin-retry.js/releases)
- [Commits](https://github.com/octokit/plugin-retry.js/compare/v3.0.3...v3.0.9)

---
updated-dependencies:
- dependency-name: "@octokit/plugin-retry"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 22:22:56 +00:00
dependabot[bot]
6e37ee3fe2 Bump @types/long from 4.0.0 to 4.0.1
Bumps [@types/long](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/long) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/long)

---
updated-dependencies:
- dependency-name: "@types/long"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 22:22:48 +00:00
dependabot[bot]
6ca0c46132 Bump @actions/artifact from 0.5.1 to 0.5.2
Bumps [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 22:22:24 +00:00
Edoardo Pirovano
f649b7bd23 Merge pull request #643 from github/dependabot/npm_and_yarn/octokit/types-6.21.1
Bump @octokit/types from 5.5.0 to 6.21.1
2021-07-27 22:58:12 +01:00
Edoardo Pirovano
6520447123 Merge branch 'main' into dependabot/npm_and_yarn/octokit/types-6.21.1 2021-07-27 22:45:39 +01:00
Edoardo Pirovano
5c80cfcc1e Merge pull request #645 from github/dependabot/npm_and_yarn/query-string-7.0.1
Bump query-string from 6.14.0 to 7.0.1
2021-07-27 22:43:40 +01:00
Edoardo Pirovano
5643f45615 Merge branch 'main' into dependabot/npm_and_yarn/query-string-7.0.1 2021-07-27 22:31:33 +01:00
Edoardo Pirovano
e45b14cfc3 Merge pull request #642 from github/dependabot/npm_and_yarn/js-yaml-4.1.0
Bump js-yaml from 3.13.1 to 4.1.0
2021-07-27 22:31:17 +01:00
Edoardo Pirovano
05fc5a885c Replace safeLoad with load 2021-07-27 22:12:26 +01:00
Edoardo Pirovano
fb65207e91 Merge branch 'main' into dependabot/npm_and_yarn/query-string-7.0.1 2021-07-27 21:46:54 +01:00
Edoardo Pirovano
fde64716e1 Merge branch 'main' into dependabot/npm_and_yarn/js-yaml-4.1.0 2021-07-27 20:33:28 +01:00
Edoardo Pirovano
2a0289b1d8 Merge pull request #646 from github/dependabot/npm_and_yarn/types/node-16.4.3
Bump @types/node from 12.12.14 to 16.4.3
2021-07-27 20:33:07 +01:00
Edoardo Pirovano
04e8743013 Merge branch 'main' into dependabot/npm_and_yarn/types/node-16.4.3 2021-07-27 20:15:15 +01:00
Edoardo Pirovano
e66384f36e Merge pull request #644 from github/dependabot/npm_and_yarn/types/sinon-10.0.2
Bump @types/sinon from 7.5.2 to 10.0.2
2021-07-27 20:14:59 +01:00
github-actions[bot]
34f86ea4ba Update checked-in dependencies 2021-07-27 19:03:32 +00:00
github-actions[bot]
c18ebba599 Update checked-in dependencies 2021-07-27 19:03:07 +00:00
github-actions[bot]
4df0bb9371 Update checked-in dependencies 2021-07-27 19:01:54 +00:00
github-actions[bot]
9c0cd50e9e Update checked-in dependencies 2021-07-27 19:01:52 +00:00
github-actions[bot]
6fdd5c2f4c Update checked-in dependencies 2021-07-27 19:01:05 +00:00
dependabot[bot]
8536203ad8 Bump @types/node from 12.12.14 to 16.4.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.14 to 16.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 19:00:10 +00:00
dependabot[bot]
5a7f86f625 Bump query-string from 6.14.0 to 7.0.1
Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.14.0 to 7.0.1.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v6.14.0...v7.0.1)

---
updated-dependencies:
- dependency-name: query-string
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 19:00:01 +00:00
dependabot[bot]
dbb1b44b8f Bump @types/sinon from 7.5.2 to 10.0.2
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 7.5.2 to 10.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 18:59:55 +00:00
dependabot[bot]
07578cd9e7 Bump @octokit/types from 5.5.0 to 6.21.1
Bumps [@octokit/types](https://github.com/octokit/types.ts) from 5.5.0 to 6.21.1.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v5.5.0...v6.21.1)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 18:59:49 +00:00
dependabot[bot]
cec3af8bb0 Bump js-yaml from 3.13.1 to 4.1.0
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.13.1 to 4.1.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.13.1...4.1.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 18:59:42 +00:00
Edoardo Pirovano
dae51797d0 Merge pull request #638 from github/dependabot/npm_and_yarn/eslint-plugin-github-4.1.5
Bump eslint-plugin-github from 4.1.1 to 4.1.5
2021-07-27 19:36:15 +01:00
Edoardo Pirovano
a81500cbd6 Fix linting error 2021-07-27 19:23:11 +01:00
Edoardo Pirovano
ddd2696b4e Merge branch 'main' into dependabot/npm_and_yarn/eslint-plugin-github-4.1.5 2021-07-27 19:20:07 +01:00
Edoardo Pirovano
de06f8a300 Merge pull request #640 from github/dependabot/npm_and_yarn/actions/exec-1.1.0
Bump @actions/exec from 1.0.1 to 1.1.0
2021-07-27 19:15:31 +01:00
Edoardo Pirovano
8c3255bc78 Merge branch 'main' into dependabot/npm_and_yarn/actions/exec-1.1.0 2021-07-27 19:01:17 +01:00
Edoardo Pirovano
186161e61c Fix failing test 2021-07-27 19:00:37 +01:00
Edoardo Pirovano
cc561bc122 Merge pull request #639 from github/dependabot/npm_and_yarn/nock-13.1.1
Bump nock from 12.0.3 to 13.1.1
2021-07-27 18:54:22 +01:00
Edoardo Pirovano
df6f81e49c Merge branch 'main' into dependabot/npm_and_yarn/nock-13.1.1 2021-07-27 18:41:59 +01:00
Edoardo Pirovano
b47da63f07 Merge pull request #637 from github/dependabot/npm_and_yarn/actions/http-client-1.0.11
Bump @actions/http-client from 1.0.8 to 1.0.11
2021-07-27 18:39:30 +01:00
Edoardo Pirovano
70f5789ed2 Merge branch 'main' into dependabot/npm_and_yarn/actions/http-client-1.0.11 2021-07-27 18:18:44 +01:00
Edoardo Pirovano
99afdfbfbd Merge branch 'main' into dependabot/npm_and_yarn/actions/exec-1.1.0 2021-07-27 18:14:25 +01:00
Edoardo Pirovano
55e50b88db Merge pull request #641 from github/dependabot/npm_and_yarn/typescript-4.3.5
Bump typescript from 3.7.5 to 4.3.5
2021-07-27 18:14:04 +01:00
Edoardo Pirovano
d9849b8ca1 Rebuild after TypeScript version bump 2021-07-27 17:59:59 +01:00
github-actions[bot]
60bee34764 Update checked-in dependencies 2021-07-27 16:57:03 +00:00
github-actions[bot]
c335145f4d Update checked-in dependencies 2021-07-27 16:56:50 +00:00
github-actions[bot]
17223bdff7 Update checked-in dependencies 2021-07-27 16:54:30 +00:00
github-actions[bot]
cc1adb825a Update checked-in dependencies 2021-07-27 16:54:26 +00:00
github-actions[bot]
80916e968c Update checked-in dependencies 2021-07-27 16:53:57 +00:00
dependabot[bot]
9ce2456348 Bump typescript from 3.7.5 to 4.3.5
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 4.3.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.5...v4.3.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:52:03 +00:00
dependabot[bot]
3ab5d6d4d6 Bump @actions/exec from 1.0.1 to 1.1.0
Bumps [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/core@1.1.0/packages/exec)

---
updated-dependencies:
- dependency-name: "@actions/exec"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:51:54 +00:00
dependabot[bot]
35f1961385 Bump nock from 12.0.3 to 13.1.1
Bumps [nock](https://github.com/nock/nock) from 12.0.3 to 13.1.1.
- [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/v12.0.3...v13.1.1)

---
updated-dependencies:
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:51:47 +00:00
dependabot[bot]
6b0d45a5c6 Bump eslint-plugin-github from 4.1.1 to 4.1.5
Bumps [eslint-plugin-github](https://github.com/github/eslint-plugin-github) from 4.1.1 to 4.1.5.
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.1.1...v4.1.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:51:39 +00:00
dependabot[bot]
4867598089 Bump @actions/http-client from 1.0.8 to 1.0.11
Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.8 to 1.0.11.
- [Release notes](https://github.com/actions/http-client/releases)
- [Changelog](https://github.com/actions/http-client/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/http-client/commits)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:51:17 +00:00
Edoardo Pirovano
2aa2bede67 Merge pull request #636 from edoardopirovano/fix-typo
Fix typo in config file name
2021-07-27 17:50:48 +01:00
Edoardo Pirovano
69c3617042 Fix typo in config file name 2021-07-27 17:32:38 +01:00
Edoardo Pirovano
181fce25fe Merge pull request #635 from edoardopirovano/mergeback-deps
Update lockfile in mergeback
2021-07-27 16:36:24 +01:00
Edoardo Pirovano
05a53bbd2d Update lockfile in mergeback 2021-07-27 12:37:20 +01:00
Edoardo Pirovano
d13dea1c37 Merge pull request #634 from github/mergeback/v1.0.8-to-main-59e2f2d8
Mergeback v1.0.8 refs/heads/v1 into main
2021-07-27 10:06:11 +01:00
github-actions[bot]
fb19072237 Update checked-in dependencies 2021-07-27 08:53:06 +00:00
github-actions[bot]
c4e99325d0 1.0.9 2021-07-26 23:35:55 +00:00
github-actions[bot]
ddb608be41 Update changelog and version after v1.0.8 2021-07-26 23:35:53 +00:00
Aditya Sharad
59e2f2d80d Merge pull request #633 from github/update-v1.0.8-fc12036b
Merge main into v1
2021-07-26 16:35:28 -07:00
Aditya Sharad
57a865e201 Update CHANGELOG.md 2021-07-26 16:19:22 -07:00
github-actions[bot]
dd1c95359b 1.0.8 2021-07-26 23:09:46 +00:00
Aditya Sharad
fc12036b55 Merge pull request #631 from github/alexet/cli-2.5.8
Update codeql bunde to 20210726 / 2.5.8
2021-07-26 11:23:10 -07:00
alexet
fb8602423d Update codeql bunde to 20210726 / 2.5.8 2021-07-26 18:09:24 +01:00
Robin Neatherway
fa857eb53f Merge pull request #620 from github/rneatherway-patch-1
Suggest limiting push/pull_request triggers
2021-07-26 16:28:26 +01:00
Aditya Sharad
ecc548b556 Merge branch 'main' into rneatherway-patch-1 2021-07-26 08:17:02 -07:00
Edoardo Pirovano
2f3ec1f9f1 Merge pull request #630 from edoardopirovano/enable-dependabot
Enable dependabot automatic updates
2021-07-26 15:34:40 +01:00
Edoardo Pirovano
554f1b3765 Address further PR comment 2021-07-26 15:19:47 +01:00
Edoardo Pirovano
934fb86c58 Address PR comments from @robertbrignull 2021-07-26 14:47:03 +01:00
Edoardo Pirovano
e145aa414e Enable dependabot automatic updates 2021-07-26 11:14:19 +01:00
Edoardo Pirovano
36f860f369 Merge pull request #626 from github/mergeback/v1.0.7-to-main-592af860
Mergeback v1.0.7 refs/heads/v1 into main
2021-07-21 15:47:07 +01:00
github-actions[bot]
63603427ef 1.0.8 2021-07-21 14:22:34 +00:00
github-actions[bot]
bf54da2db0 Update changelog and version after v1.0.7 2021-07-21 14:22:29 +00:00
Edoardo Pirovano
592af860c5 Merge pull request #625 from github/update-v1.0.7-3428407b
Merge main into v1
2021-07-21 15:22:02 +01:00
github-actions[bot]
60211eb74c 1.0.7 2021-07-21 13:59:39 +00:00
Edoardo Pirovano
3428407b4d Merge pull request #624 from edoardopirovano/loc-location
Augment where we insert baseline lines of code
2021-07-21 14:54:31 +01:00
Edoardo Pirovano
d6fc379360 Update outdated Node package. 2021-07-21 14:20:10 +01:00
Edoardo Pirovano
11d56696ec Augment where we insert baseline lines of code 2021-07-21 14:10:37 +01:00
Edoardo Pirovano
47cfd760cf Merge pull request #622 from github/mergeback/v1.0.6-to-main-84173b94
Mergeback v1.0.6 refs/heads/v1 into main
2021-07-19 11:22:42 +01:00
github-actions[bot]
01b1510da2 1.0.7 2021-07-19 09:32:59 +00:00
github-actions[bot]
0afedcafa7 Update changelog and version after v1.0.6 2021-07-19 09:32:57 +00:00
Edoardo Pirovano
84173b94c9 Merge pull request #621 from github/update-v1.0.6-3c8ba717
Merge main into v1
2021-07-19 10:32:25 +01:00
Edoardo Pirovano
8cbe2f5527 Update CHANGELOG.md
Minor formatting improvement.
2021-07-19 10:08:29 +01:00
github-actions[bot]
c302d35e73 1.0.6 2021-07-19 09:01:53 +00:00
Robin Neatherway
2a20b15eca Update README.md
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2021-07-16 10:08:37 +01:00
Robin Neatherway
0d0f0ef80e Suggest limiting push/pull_request triggers
Bring the template in line with the one used by the UI.
2021-07-15 17:20:13 +01:00
Andrew Eisenberg
3c8ba71769 Merge pull request #619 from github/aeisenberg/fix-vulnerabilities
Fix dependabot vulnerabilities
2021-07-14 19:53:52 -07:00
Andrew Eisenberg
ae97d8f96d Fix dependabot vulnerabilities
This adds some forced resolutions to ensure that vulnerable versions
of packages are not installed.
2021-07-14 14:40:10 -07:00
Aditya Sharad
14deaf67e9 Merge pull request #610 from github/aibaars/refactor-checkout-path
Replace checkoutPath variable with sourceRoot/workspacePath variables
2021-07-14 08:14:27 -07:00
Aditya Sharad
d7dcff944e Merge branch 'main' into aibaars/refactor-checkout-path 2021-07-14 07:58:23 -07:00
Robert
4aa2d05c6b Merge pull request #612 from github/robertbrignull/databases_url
Update databases URL
2021-07-14 15:30:40 +01:00
Robert
d09d89f419 Merge branch 'main' into robertbrignull/databases_url 2021-07-14 15:15:50 +01:00
Arthur Baars
f94f1ed663 Rename checkoutPath to either workspacePath or sourceRoot 2021-07-14 13:39:45 +02:00
Edoardo Pirovano
1137e7db3e Merge pull request #618 from edoardopirovano/python-deps
Install Python tools on self-hosted runners
2021-07-13 17:56:13 +01:00
Edoardo Pirovano
cc14f298d6 Install Python tools on self-hosted runners 2021-07-13 17:24:11 +01:00
Robert
96edcdfd20 use templating for language param 2021-07-13 17:05:40 +01:00
Robert
b0b9ab80cc Update databases URL 2021-07-13 14:09:56 +01:00
Arthur Baars
3b017efdfe Merge pull request #607 from mario-campos/source-root-input
Add a 'source-root' input to the init Action
2021-07-13 13:26:14 +02:00
Arthur Baars
993205272b Merge branch 'main' into source-root-input 2021-07-13 13:13:27 +02:00
Andrew Eisenberg
27e3080228 Merge pull request #617 from github/mergeback/v1.0.5-to-main-500dad96
Mergeback v1.0.5 refs/heads/v1 into main
2021-07-12 16:16:04 -07:00
github-actions[bot]
92df23808d 1.0.6 2021-07-12 23:03:41 +00:00
github-actions[bot]
a10ed6c610 Update changelog and version after v1.0.5 2021-07-12 23:03:39 +00:00
Aditya Sharad
500dad96d7 Merge pull request #616 from github/update-v1.0.5-1c26d408
Merge main into v1
2021-07-12 16:03:11 -07:00
github-actions[bot]
aa03f9b023 1.0.5 2021-07-12 21:54:31 +00:00
Mario Campos
a4a91a8631 Merge branch 'main' into source-root-input 2021-07-02 16:20:05 -05:00
Mario Campos
06c6845442 Add analyze step to 'source-root' input test case
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2021-07-02 14:50:52 -05:00
Henning Makholm
1c26d40826 Merge pull request #613 from github/hmakholm/pr/2.5.7
Update CodeQL bundle to 20210702 / 2.5.7
2021-07-02 15:25:27 +02:00
Mario Campos
b9217ca238 Test presence of database instead of results of analysis
This is for PR #607, 'source-root' input test case.
2021-07-02 08:07:06 -05:00
Henning Makholm
870e8e38d5 Update CodeQL bundle to 20210702 / 2.5.7 2021-07-02 14:32:46 +02:00
Mario Campos
2c0da4bcc7 Remove build.sh step from 'source-root' test
As this test is using only JS, it's not necessary to compile or analyze the other languages.
2021-07-01 18:43:10 -05:00
Mario Campos
12f1cff212 Rename CodeQL action paths in 'source-root' test to reflect repo paths 2021-07-01 18:39:37 -05:00
Mario Campos
2ca807cf16 Merge branch 'source-root-input' of github.com:mario-campos/codeql-action into source-root-input 2021-07-01 18:37:07 -05:00
Mario Campos
1c69fae407 Avoid moving repo files out of \$GITHUB_WORKSPACE in 'source-root' test
Moving the files into ../action was causing the job to fail because it couldn't find the test directory anymore. According to @adityasharad, these 'mv's should
not be necessary. Removing these means changing the path to the actions.

I'm also removing the 'config-file' input to keep the test minimal. I think this will mean that CodeQL will use the default query suite, so I hope that this doesn't change the results.
2021-07-01 18:34:34 -05:00
Mario Campos
67d6f7929f Delete 'packaing' from source-root test job name
The test is not related to packaging.

Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2021-07-01 18:31:50 -05:00
Mario Campos
028f98f5ea Use different config file for testing 'source-root' input
This config file 'ought to have some queries good for testing!
2021-07-01 16:12:15 -05:00
Mario Campos
c78fb87659 Add test case for 'source-root' input to 'init' Action 2021-07-01 15:26:04 -05:00
Mario Campos
45c0f11af2 Clarify 'source-root' description to include default path
This addresses @adityasharad's suggestions in PR #607.
2021-07-01 12:24:36 -05:00
Aditya Sharad
c6728b6769 Merge branch 'main' into source-root-input 2021-07-01 09:36:10 -07:00
Andrew Eisenberg
fd614e5792 Merge pull request #609 from github/aeisenberg/use-default-tools
Remove a TODO and use defautl tools option
2021-06-30 13:56:10 -07:00
Andrew Eisenberg
0792832682 Remove a TODO and use defautl tools option 2021-06-30 12:43:20 -07:00
Mario Campos
a607042aab Recompile code after accepting suggestions from PR #607 review 2021-06-30 12:36:51 -05:00
Mario Campos
35e1b55411 Use path.resolve instead of path.join for sourceRoot
Thanks to @aibaars, `path.resolve()` should will nicely handle more use-cases, namely absolute paths better than `path.join()`.

Co-authored-by: Arthur Baars <aibaars@github.com>
2021-06-30 12:34:12 -05:00
Mario Campos
66df091046 Refer to $GITHUB_WORKSPACE specifically in source-root description
Previously, I had tried to refer to '${{ github.workspace }}', but that caused a problem in Actions. Trying to avoid the issue, I changed this to "the workspace," but this gives up quite a bit of specificity.

Co-authored-by: Arthur Baars <aibaars@github.com>
2021-06-30 12:32:07 -05:00
Andrew Eisenberg
c6b33b9ec1 Merge pull request #608 from github/aeisenberg/baseline-message
Clarify missing LoC baseline message
2021-06-30 09:27:04 -07:00
Andrew Eisenberg
d939c4b8d3 Update CHANGELOG 2021-06-30 09:13:29 -07:00
Andrew Eisenberg
68f742b0d4 Clarify missing LoC baseline message 2021-06-30 09:11:15 -07:00
Mario Campos
e1cd5244c8 Recompile JS files to bring JS inline with TS for PR #607 2021-06-29 16:17:28 -05:00
Mario Campos
57f584a881 Update CHANGELOG for PR #607 2021-06-29 16:14:47 -05:00
Mario Campos
a05a7f9cb1 Remove '${{ github.workspace }}' from action.yml
It causes the action to break (or rather that context being unavailable causes it to fail), despite it being in the description field.
2021-06-29 16:05:45 -05:00
Mario Campos
337ae83a84 Make 'source-root' init input relative to github.workspace
In the previous commit, the default value of the input is ${{ github.workspace }}
which means that most uses of this input would probably prefix their paths with
${{ github.workspace }}, especially since actions/checkout's 'path' input
must be under ${{ github.workspace }}. Therefore, it doesn't make much sense for
this to be an absolute file path.

Instead, it's more intuitive to make this relative to the repository.
2021-06-29 16:00:55 -05:00
Mario Campos
42babdf2c1 Add 'source-root' input to init action
This input is exposed in the CodeQL CLI as the flag --source-root, allowing
users of the CLI to set --source-root different from --working-dir. However,
in codeql-action, these two paths are conflated and it poses problems for
users with complicated build environments, in which a source root may be
a child of the working directory.

Most users should not notice this, as the default value is
${{ github.workspace }}, as it is implied now (`path.resolve()`).
2021-06-29 15:16:32 -05:00
Edoardo Pirovano
c357ca73e4 Merge pull request #606 from edoardopirovano/local-bundle
Allow local instead of downloaded CodeQL
2021-06-29 00:03:59 +01:00
Edoardo Pirovano
d9050f49a3 Merge branch 'main' into local-bundle 2021-06-28 23:53:41 +01:00
Edoardo Pirovano
a7dac5c3db Address PR comment. 2021-06-28 23:52:53 +01:00
Edoardo Pirovano
53cf5d984d Merge pull request #602 from edoardopirovano/split-create-analysis
Support splitting of DB creation and query execution
2021-06-28 18:43:05 +01:00
Edoardo Pirovano
93214eca2e Merge branch 'main' into split-create-analysis 2021-06-28 18:25:01 +01:00
Edoardo Pirovano
8f4c2c76ad Allow local instead of downloaded CodeQL 2021-06-28 18:11:13 +01:00
Edoardo Pirovano
24ef87cfc3 Merge pull request #600 from edoardopirovano/integration-test
Run tests against nightly CLI bundles
2021-06-28 18:08:36 +01:00
Edoardo Pirovano
954700187b Run tests against nightly CLI bundles 2021-06-28 17:47:10 +01:00
Edoardo Pirovano
4a7cc176ac Merge pull request #605 from github/aeisenberg/pr-checks-dispatch
Allow  to be run on workflow_dispatch
2021-06-28 17:45:56 +01:00
Andrew Eisenberg
a6891153f0 Allow to be run on workflow_dispatch 2021-06-28 09:17:32 -07:00
Edoardo Pirovano
ef852c006a Support splitting of DB creation and query execution 2021-06-28 17:14:22 +01:00
Edoardo Pirovano
1e61ecb0c1 Merge pull request #603 from github/mergeback/v1.0.4-to-main-03450ff6
Mergeback v1.0.4 refs/heads/v1 into main
2021-06-28 16:57:01 +01:00
Edoardo Pirovano
8cccc0664b Merge branch 'main' into mergeback/v1.0.4-to-main-03450ff6 2021-06-28 16:42:39 +01:00
Andrew Eisenberg
3a8e1847c5 Merge pull request #599 from github/aeisenberg/readme-missing-analysis
Update readme to include section on missing analysis
2021-06-28 08:30:15 -07:00
github-actions[bot]
5c3c29fd3f 1.0.5 2021-06-28 15:23:49 +00:00
github-actions[bot]
d11b2ce6a3 Update changelog and version after v1.0.4 2021-06-28 15:23:47 +00:00
Edoardo Pirovano
03450ff6ed Merge pull request #601 from github/update-v1.0.4-7726ece0
Merge main into v1
2021-06-28 16:23:20 +01:00
Andrew Eisenberg
571fe400df Merge branch 'main' into aeisenberg/readme-missing-analysis 2021-06-28 08:18:18 -07:00
Edoardo Pirovano
440ccbd910 Prepare CHANGELOG for 1.0.4 2021-06-28 16:06:44 +01:00
github-actions[bot]
6017205208 1.0.4 2021-06-28 16:05:56 +01:00
Andrew Eisenberg
7726ece0ab Merge pull request #591 from github/aeisenberg/pack-in-inputs
Add new `packs` input to init action
2021-06-25 10:52:19 -07:00
Andrew Eisenberg
7c391e9640 Update readme to include section on missing analysis
Fixes #598
2021-06-25 10:44:47 -07:00
Andrew Eisenberg
67312df7cf Merge branch 'main' into aeisenberg/pack-in-inputs 2021-06-25 10:30:24 -07:00
Andrew Eisenberg
4087f37d90 Add extra integration test for packaging
Also, update the options and inputs documentation.
2021-06-25 10:07:51 -07:00
Edoardo Pirovano
85ac9fe26e Remove misleading comment. 2021-06-25 14:28:43 +01:00
Edoardo Pirovano
40852fa52a Improve error messages from CLI invocations 2021-06-24 23:38:13 +01:00
Andrew Eisenberg
db80a9a7c3 Merge pull request #594 from github/simon-engledew/fix-runner-temp-missing
Restore original getCodeQLActionRepository behaviour
2021-06-24 13:58:42 -07:00
Andrew Eisenberg
af32a29f03 Merge branch 'main' into simon-engledew/fix-runner-temp-missing 2021-06-24 13:48:45 -07:00
Arthur Baars
590c245b56 Merge pull request #593 from github/aibaars/ruby-is-interpreted
Add Ruby to 'isInterpretedLanguage'
2021-06-24 19:23:57 +02:00
Arthur Baars
a1f71cfecf Add Ruby to 'isInterpretedLanguage' 2021-06-24 19:13:05 +02:00
Simon Engledew
26ade03b50 Just reverse test case 2021-06-24 18:00:10 +01:00
Simon Engledew
9200db3ec4 Restore original getCodeQLActionRepository behaviour 2021-06-24 17:52:48 +01:00
Andrew Eisenberg
ac402bf222 Merge pull request #586 from edoardopirovano/csharp-loc
Fix C# line counting and add test
2021-06-23 17:29:02 -07:00
Andrew Eisenberg
9f37000f6b Fix dependencies 2021-06-23 16:38:32 -07:00
Andrew Eisenberg
c5434c91d8 Merge branch 'main' into csharp-loc 2021-06-23 16:22:14 -07:00
Andrew Eisenberg
e38356b367 Update lock file 2021-06-23 16:11:57 -07:00
Andrew Eisenberg
6e577cfca3 Add new packs input to init action
This input allows users to specify which packs to run. It works in
unison with the packs block of the config file and it is similar to
how `queries` works. They both use `+` in the same way.

Note that the `#TODO` in the pr check is still around, but the CLI
is available. I will remove the TODO in the next commit.
2021-06-23 16:08:35 -07:00
Edoardo Pirovano
68b68732c6 Fix C# line counting and add test 2021-06-23 23:39:44 +01:00
Andrew Eisenberg
7729b51956 Merge pull request #588 from github/mergeback/v1.0.3-to-main-cf6e0194
Mergeback v1.0.3 refs/heads/v1 into main
2021-06-23 08:23:18 -07:00
Andrew Eisenberg
c98b43187d Merge branch 'main' into mergeback/v1.0.3-to-main-cf6e0194 2021-06-23 08:08:49 -07:00
Chris Gavin
e684c09260 Merge pull request #587 from github/toolcache-upgrade
Upgrade the tool cache library and use it to download the CodeQL bundle.
2021-06-23 16:07:26 +01:00
github-actions[bot]
1496843315 1.0.4 2021-06-23 14:56:35 +00:00
github-actions[bot]
f5a5d3ad5f Update changelog and version after v1.0.3 2021-06-23 14:56:23 +00:00
Andrew Eisenberg
cf6e019480 Merge pull request #585 from github/update-v1.0.3-d623a7a3
Merge main into v1
2021-06-23 07:55:54 -07:00
Chris Gavin
59560e54ac Replace custom tool download method with the one in the tool cache library. 2021-06-23 14:28:37 +01:00
Chris Gavin
476f13ea18 Upgrade Actions Tool Cache. 2021-06-23 14:28:33 +01:00
github-actions[bot]
a12bb22724 1.0.3 2021-06-23 09:42:14 +00:00
Andrew Eisenberg
d623a7a3f7 Merge pull request #583 from github/aeisenberg/changelog-template
Update changelog template
2021-06-22 14:40:52 -07:00
Andrew Eisenberg
629f582c03 Update changelog template
The changelog for an empty version will now be:

```
No user facing changes.
```

And this will appear in the final changelog when there is an actual release.
The benefits are that users will see regular release cycles and know
how old versions are even if there's no changes for a particular version

If we find that we are going months without any user facing changes, but
we have non-visible changes, then we can rethink this strategy.
But I think this is nicer than having empty sections for a version.
2021-06-22 14:25:06 -07:00
Henning Makholm
9821b8c68c Merge pull request #582 from github/hmakholm/pr/2.5.6
Update CodeQL bundle to 20210622 / 2.5.6
2021-06-22 18:43:19 +02:00
Henry Mercer
1cd2cd12b4 Merge branch 'main' into hmakholm/pr/2.5.6 2021-06-22 17:12:00 +01:00
Robert
171619a51a Merge pull request #578 from github/upload-database
Upload CodeQL databases - mk2
2021-06-22 17:09:46 +01:00
Henning Makholm
8d50a5fd90 Update CodeQL bundle to 20210622 / 2.5.6 2021-06-22 17:27:16 +02:00
Robert
00791d5d56 remove old lib file 2021-06-22 13:45:47 +01:00
Robert
146c897909 Upload CodeQL databases 2021-06-22 13:05:12 +01:00
Andrew Eisenberg
b2d10b39b0 Merge pull request #571 from github/mergeback/v1.0.2-to-main-37f75f17
Mergeback v1.0.2 refs/heads/v1 into main
2021-06-21 08:42:17 -07:00
Andrew Eisenberg
b2e7277fb1 Merge branch 'main' into mergeback/v1.0.2-to-main-37f75f17 2021-06-21 08:29:15 -07:00
Robert
dbc4fdad80 Merge pull request #577 from github/revert-573-upload-database
Revert "Upload CodeQL databases"
2021-06-21 10:58:55 +01:00
Robert
d893508e3a Revert "Upload CodeQL databases" 2021-06-21 10:26:02 +01:00
Robert
f6d1bad81b Merge pull request #573 from github/upload-database
Upload CodeQL databases
2021-06-21 08:45:03 +01:00
Robert
f3cd5fa001 Add workflow input to disable uploads 2021-06-18 09:56:15 +01:00
Robert
33ac512514 Merge branch 'main' into upload-database 2021-06-18 09:50:05 +01:00
Andrew Eisenberg
6a7c2369bf Merge pull request #569 from github/aeisenberg/add-codeowners
Add a CODEOWNERS file
2021-06-17 11:36:23 -07:00
github-actions[bot]
4954c371d1 1.0.3 2021-06-17 18:01:57 +00:00
github-actions[bot]
c35646fe13 Update changelog and version after v1.0.2 2021-06-17 18:01:56 +00:00
Andrew Eisenberg
37f75f1702 Merge pull request #570 from github/update-v1.0.2-0b1f4a01
Merge main into v1
2021-06-17 11:01:25 -07:00
github-actions[bot]
028a76e6db 1.0.2 2021-06-17 10:39:32 -07:00
Andrew Eisenberg
9c28349a87 Merge branch 'main' into aeisenberg/add-codeowners 2021-06-17 10:27:42 -07:00
Andrew Eisenberg
0b1f4a016a Merge pull request #566 from github/aeisenberg/update-release-branch-fix
Fix update-release-branch-fix.py
2021-06-17 10:22:26 -07:00
Andrew Eisenberg
b4914d76a2 Add a CODEOWNERS file 2021-06-17 10:19:01 -07:00
Robert
69c30da5ad Merge pull request #565 from github/robertbrignull/upload_ghes
Only attempt to upload on dotcom
2021-06-17 12:42:23 +01:00
Robert
6fc1280a3c Merge pull request #564 from github/robertbrignull/workflow_event_error
Provide a better error message
2021-06-17 09:36:47 +01:00
Andrew Eisenberg
efea9238bc Fix custom version of CLI to use for package testing
This can be removed when 2.5.6 is released.
2021-06-16 14:56:52 -07:00
Andrew Eisenberg
d16268b273 Fix update-release-branch-fix.py
This change ensures that the the script can handle
commits with no committer in them. This will happen
for some commits that are auto-generated during
PRs.
2021-06-16 10:38:18 -07:00
Robert
b985a67b97 Only attempt to upload on dotcom 2021-06-16 17:24:26 +01:00
Robert
c989ee7b39 Provide a better error message 2021-06-16 17:00:26 +01:00
Robert
366b68eda0 Merge pull request #563 from github/robertbrignull/check_default_branch
Check if on default branch before uploading database
2021-06-16 15:11:45 +01:00
Robert
d693b3cb0d Check if on default branch before uploading database 2021-06-16 14:43:42 +01:00
Andrew Eisenberg
e284efba72 Merge pull request #545 from github/aeisenberg/pack-run
Allow the codeql-action to run packages
2021-06-10 11:24:56 -07:00
Andrew Eisenberg
20aafcd90c Remove unnecessary type assertions 2021-06-10 11:15:03 -07:00
Robin Neatherway
429471162a Update cleanup to bundle 2021-06-10 17:09:58 +01:00
Robert
2a9a602a5e Upload databases from analyze action 2021-06-10 16:09:58 +01:00
Andrew Eisenberg
6a1c0700c3 Avoid running mergeback workflow on PR
This was causing the workflow to run and create tags after merging
main into a branch.
2021-06-09 14:38:09 -07:00
Andrew Eisenberg
23cdd6bab6 Remove two log entries
Cleans up the output logs even more. These entries don't add any more
information since everything is grouped now.
2021-06-09 14:32:08 -07:00
Andrew Eisenberg
a2e96a4c78 Add pack download to its own log group
Also, make the baseline count message less awkward sounding.
2021-06-09 14:13:05 -07:00
Andrew Eisenberg
96e7de35af Use nullish conversion for packs
Slightly simplifies the `parsePacks` function.
2021-06-09 13:18:27 -07:00
Andrew Eisenberg
49b2220f92 Refactor codeql.ts
Extract a `runTool` function that captures the stdout and returns it.
A small refactoring that reduces copied code.
2021-06-09 13:17:25 -07:00
Andrew Eisenberg
db01c78de0 Remove unneeded action input in PR check 2021-06-09 13:10:57 -07:00
Andrew Eisenberg
82388fd94a Merge remote-tracking branch 'upstream/main' into aeisenberg/pack-run 2021-06-09 12:43:17 -07:00
Edoardo Pirovano
babcc1b793 Add --finalize-dataset to database finalize call 2021-06-09 16:52:39 +01:00
Edoardo Pirovano
06df98a513 Add new log grouping for DB cleanup 2021-06-09 16:10:22 +01:00
Edoardo Pirovano
0ea20c5b32 Add intepret-results timings to status reports 2021-06-09 10:40:15 +01:00
Andrew Eisenberg
d42f654f7a Add an integration test for packaging
Uses two pre-existing packages to run some simple queries on a javascript
database.
2021-06-08 12:34:07 -07:00
Andrew Eisenberg
1cc5f1d5dd Packaging: Address review comments
1. Better malformed data guard for PackDownloadOutput
2. Fix Packs type
3. Remove TODO in init-action
2021-06-08 10:00:22 -07:00
Edoardo Pirovano
2cc885d66e Replace analyze with run-queries and interpret-results 2021-06-08 09:25:17 +01:00
Edoardo Pirovano
c09500540c Some refactoring in fingerprint computation 2021-06-08 00:09:27 +01:00
Andrew Eisenberg
9c13fefc68 Merge pull request #554 from github/mergeback/v1.0.1-to-main-ece2addc
Mergeback v1.0.1 refs/heads/v1 into main
2021-06-07 14:14:54 -07:00
Andrew Eisenberg
a69f472ee9 Merge branch 'main' into mergeback/v1.0.1-to-main-ece2addc 2021-06-07 14:01:04 -07:00
github-actions[bot]
fbb9046bf6 1.0.2 2021-06-07 20:59:15 +00:00
github-actions[bot]
9e6b46a9e6 Update changelog and version after v1.0.1 2021-06-07 20:59:13 +00:00
Andrew Eisenberg
ece2addcff Merge pull request #553 from github/aeisenberg/no-quotes
Remove quotes around `$DRAFT` argument
2021-06-07 13:54:37 -07:00
Andrew Eisenberg
74764ac0eb Remove quotes around $DRAFT argument
gh will complain if there is an empty `""`, which is the case if
`$DRAFT` is unset.
2021-06-07 13:53:47 -07:00
Chris Gavin
675843d09a Merge pull request #549 from github/update-v1.0.1-242fd828
Merge main into v1
2021-06-07 16:26:37 +01:00
Chris Gavin
511fe43abe Empty commit to trigger CI. 2021-06-07 16:14:10 +01:00
Edoardo Pirovano
02e8dcfe9c Fix out of memory in hash computation 2021-06-07 15:12:45 +01:00
github-actions[bot]
68d7c5f620 1.0.1 2021-06-07 09:30:01 +00:00
Chris Gavin
242fd828aa Merge pull request #547 from github/retrying-fix
Add back retrying.
2021-06-07 08:04:21 +01:00
Chris Gavin
48efe6e282 Merge branch 'main' into retrying-fix 2021-06-07 07:47:18 +01:00
Chris Gavin
f8c65b775d Fix stub in tests. 2021-06-07 07:14:44 +01:00
Andrew Eisenberg
d87945e9fd Run the pack download command 2021-06-06 09:27:52 -07:00
Edoardo Pirovano
1644ade514 Add --sarif-group-rules-by-pack flag 2021-06-06 09:56:54 +01:00
Andrew Eisenberg
06687e95c8 Avoid using SemVer instances
Use strings instead. They are easier to serialize and deserialize.
2021-06-04 13:34:55 -07:00
Andrew Eisenberg
9b5753ab00 Fix logic for calculating if there are queries to run
During the analyze phase.
2021-06-04 13:23:35 -07:00
Edoardo Pirovano
ddb83a462d Cleanup CodeQL DBs and output their location for later steps 2021-06-04 18:54:15 +01:00
Andrew Eisenberg
6cee818bf3 Add better comments and error messages for pack-related changes 2021-06-04 10:18:24 -07:00
Chris Gavin
41dff7fce3 Add back retrying. 2021-06-04 15:51:51 +01:00
Andrew Eisenberg
86a804f9a7 Allow the codeql-action to run packages
This commit adds a `packs` option to the codeql-config.yml file. Users
can specify a list of ql packs to include in the analysis.

For a single language analysis, the packs property looks like this:

```yaml
packs:
  - pack-scope/pack-name1@1.2.3
  - pack-scope/pack-name2   # no explicit version means download the latest
```

For multi-language analysis, you must key the packs block by lanaguage:

```yaml
packs:
  cpp:
    - pack-scope/pack-name1@1.2.3
    - pack-scope/pack-name2
  java:
    - pack-scope/pack-name3@1.2.3
    - pack-scope/pack-name4
```

This implementation adds a new analysis run (alongside custom and 
builtin runs). The unit tests indicate that the correct commands are
being run, but I have not actually tried this with a real CLI.

Also, convert `instanceof Array` to `Array.isArray` since that is
sightly better in some situations. See:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs_isarray
2021-06-03 15:46:40 -07:00
Andrew Eisenberg
cbdf0df97b Merge pull request #539 from github/aeisenberg/env-vars
Add environment variables to signal feature and version to the CLI
2021-06-03 15:35:17 -07:00
Andrew Eisenberg
f60ef170b0 Cleaning up comments around env vars
Also, move `getTemporaryDirectory` back to `actions-util`.
2021-06-03 11:33:20 -07:00
Andrew Eisenberg
cc0733fd12 Fix Unguarded actions library use code scanning error
Must access the env var directly in order to avoid recursive calls to 
`getRequiredEnvParam`.
2021-06-02 11:55:32 -07:00
Andrew Eisenberg
082575fbc3 Merge branch 'main' into aeisenberg/env-vars 2021-06-02 11:40:40 -07:00
Andrew Eisenberg
2c2ebdc5c5 Remove local environment running
This is a functionality that never worked perfectly and hasn't been
used for a while.

This allows developers to run the action on their local machine, but
the run was always flaky and never 100% mirrored what was happening on
the actions runner.
2021-06-02 11:26:11 -07:00
Andrew Eisenberg
3708898bf2 Add environment variables to signal feature and version to the CLI
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

https://github.com/github/codeql-coreql-team/issues/1124#issuecomment-852463521

This ensures the CLI knows the features and versions of the containing
actions/runner.

Additionally:

- Fix the user agent so that it more closely aligns with user agent
  spec
- Refactor environment variable initialization so that it all happens in
  one place and call.
- Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util
  and into util. actions-util is meant for utils only called by the
  action, not the runner.

The `prepareLocalRunEnvironment()` method is most likely deprecated and
should be removed. I originally added it because I had a way of working
where I would run the action from my local machine to test out changes,
but this was always a little flaky. So, I no longer use this way of
working. I will probably remove it soon.
2021-06-02 11:06:02 -07:00
Aditya Sharad
1ec2fd7ea1 Merge pull request #542 from github/robertbrignull/import-actions-lib
Update unguarded-action-lib.ql to catch uses of actions-util.ts
2021-06-02 09:56:37 -07:00
Robert
61b561867b Update unguarded-action-lib.ql 2021-06-02 16:51:30 +01:00
Andrew Eisenberg
4ac9009dfe Merge pull request #541 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2021-06-02 08:28:15 -07:00
Andrew Eisenberg
e8486b0d6c Merge branch 'main' into update-supported-enterprise-server-versions 2021-06-02 08:14:19 -07:00
Edoardo Pirovano
0cbd4b56d3 Add some dependencies for uploading artifacts 2021-06-02 10:32:48 +01:00
Andrew Eisenberg
739e14d879 Merge branch 'main' into update-supported-enterprise-server-versions 2021-06-01 22:40:01 -07:00
Andrew Eisenberg
1d05ad7576 Merge pull request #536 from github/aeisenberg/commander
Use commander preAction hook for setMode
2021-06-01 18:35:01 -07:00
GitHub
2fee1242f4 Update supported GitHub Enterprise Server versions. 2021-06-02 00:23:42 +00:00
Andrew Eisenberg
539d968ad7 Use commander preAction hook for setMode
Hooks are new to commander v8. We can use hooks to ensure that `setMode`
is called before every command is invoked.
2021-06-01 11:17:49 -07:00
Andrew Eisenberg
4b4a5ee9d1 Merge pull request #534 from github/aeisenberg/mergeback-fix
Fix the mergeback workflow
2021-06-01 10:35:47 -07:00
Andrew Eisenberg
f0e82b7d63 1.0.1 2021-05-31 10:56:52 -07:00
Andrew Eisenberg
c02d8cc7a9 Fix EOF newlines after npm version patch
The removeNPMAbsolutePaths check requires no newlines at the
end of the file. This ensures that the version update mimics
the behavior.
2021-05-31 10:37:07 -07:00
Andrew Eisenberg
a94829cc53 Manually update the CHANGELOG
This should have happened in a mergeback PR, but the workflow to
generate this was broken.
2021-05-31 10:11:08 -07:00
Andrew Eisenberg
7d701d23e3 Merge remote-tracking branch 'upstream/v1' into aeisenberg/mergeback-fix 2021-05-31 10:09:13 -07:00
Andrew Eisenberg
981b5cb012 Fix the mergeback workflow
We need to tag and mergeback if the tag does _not_ already exist.
2021-05-31 10:08:10 -07:00
Andrew Eisenberg
ca9450846f Merge pull request #516 from github/aeisenberg/user-agent
Send version and mode to code scanning via user agent
2021-05-31 09:49:44 -07:00
Andrew Eisenberg
1a4cdd35b9 Use the version from package.json in the runner 2021-05-31 09:35:13 -07:00
Andrew Eisenberg
4164096c0d Use the version from package.json in the runner
Update the ql queries to account for change in how we look for runner

Previously, we guarded blocks of code to be run by the runner or the
action using if statements like this:

```js
if (mode === "actions") ...
```

We are no longer doing this. And now, the `unguarded-action-lib.ql`
query is out of date. This query checks that runner code does not
unintentionally access actions-only methods in the libraries.

With these changes, we now ensure that code scanning is happy.
2021-05-31 09:34:41 -07:00
Andrew Eisenberg
47588796b4 Send the version and mode with the user agent
This commit changes the way the action determines if running in action
or runner mode. There is now an environment variable that is set at the
beginning of the process and elsewhere in the process, we can check to
see if the variable is set.
2021-05-31 09:03:29 -07:00
Andrew Eisenberg
fad7cc482d Merge pull request #438 from okyanusoz/patch-1
Fix wording in README
2021-05-31 09:02:45 -07:00
Andrew Eisenberg
4917d3c7e8 Merge pull request #533 from github/update-v1.0.0-ff75ec7f
Merge main into v1
2021-05-31 08:13:07 -07:00
Andrew Eisenberg
dd66f4484d Remove leading newline
Minor change.
2021-05-31 08:12:29 -07:00
github-actions[bot]
cf57db7e1f 1.0.0 2021-05-31 09:24:10 +00:00
Andrew Eisenberg
d9a17baf2f Merge branch 'main' into patch-1 2021-05-28 15:29:27 -07:00
Henry Mercer
ff75ec7f7d Merge pull request #532 from github/henrymercer/analysis-summaries-custom-queries
Analyze: Log analysis summaries for custom queries
2021-05-28 21:48:16 +01:00
Henry Mercer
1362396c57 Add changelog note 2021-05-28 20:19:55 +01:00
Henry Mercer
2338fe5db5 Analyze: Log analysis summaries for custom queries 2021-05-28 19:36:21 +01:00
Andrew Eisenberg
2ccefaccfe Merge pull request #510 from github/aeisenberg/update-changelog-on-release
Add release and mergeback workflows
2021-05-27 13:22:14 -07:00
Andrew Eisenberg
8b0110800e Merge branch 'main' into aeisenberg/update-changelog-on-release 2021-05-27 13:12:26 -07:00
Andrew Eisenberg
ea89b06c41 Add bump runner version whenever action is versioned
Ensures that the runner version is bumped along with the action version.
2021-05-27 12:31:58 -07:00
Arthur Baars
12b2dc68b9 Merge pull request #513 from github/aibaars-patch-1
Add Ruby as a possible language
2021-05-26 07:40:23 +02:00
Arthur Baars
213f5407e2 Merge branch 'main' into aibaars-patch-1 2021-05-26 07:30:01 +02:00
Aditya Sharad
f4e2dc747e Merge pull request #531 from github/adityasharad/actions/enterprise-versions-upstream-only
Actions: Run enterprise versions workflow only on the parent repo
2021-05-25 19:02:45 -07:00
Andrew Eisenberg
6764ac6d01 Merge pull request #527 from github/update-v1-eeaefb60
Merge main into v1
2021-05-25 19:00:39 -07:00
Aditya Sharad
a55e7e1f67 Actions: Run enterprise versions workflow only on the parent repo
Don't run the cron workflow on forks, since they lack the necessary secrets.
2021-05-25 17:48:14 -07:00
Arthur Baars
44c6b33642 Address comments 2021-05-24 11:00:02 +02:00
Arthur Baars
4f51b8c47e Check available languages 2021-05-23 21:14:07 +02:00
Andrew Eisenberg
800a951427 Add release and mergeback workflows
This commit ensures that the changelog is updated before a release with
the correct date and version.

Also, after a release, a mergeback PR is created to ensure that the
changelog update and version bump is available in main.
2021-05-21 11:04:38 -07:00
Arthur Baars
91700099ba Fix unit test 2021-05-21 18:45:08 +02:00
Arthur Baars
c3633dc9bd Add Ruby as a possible language 2021-05-21 18:45:08 +02:00
Andrew Eisenberg
eeaefb6054 Merge pull request #517 from github/aibaars-additional-packs
Use --additional-packs instead of --search-path
2021-05-21 09:31:17 -07:00
Andrew Eisenberg
c3e0f887ab Merge branch 'main' into aibaars-additional-packs 2021-05-21 09:21:54 -07:00
Arthur Baars
1ad5a6c1be Merge pull request #518 from github/aibaars-no-queries
Ensure queries[language] objects are initialized
2021-05-21 12:54:23 +02:00
Arthur Baars
6a14accb41 Fix tests 2021-05-21 12:41:35 +02:00
Arthur Baars
84bec4d116 Check queries in initConfig 2021-05-21 12:23:00 +02:00
Arthur Baars
9aca271fbb Remove superfluous if 2021-05-21 12:07:30 +02:00
Arthur Baars
ec011ddfdb Ensure queries[language] objects are initialized 2021-05-21 10:42:14 +02:00
Arthur Baars
69cc3550c8 Use --additional-packs instead of --search-path 2021-05-21 10:40:06 +02:00
Aditya Sharad
8fa2ef886e Merge pull request #515 from adityasharad/analyze/summary-logging
Analyze: Improve log grouping and log the analysis summary in its own group
2021-05-20 15:49:26 -07:00
Aditya Sharad
f84cc5e6f1 Fix trailing newline in package.json
As produced by npm ci && npm run removeNPMAbsolutePaths.
2021-05-20 14:12:37 -07:00
Aditya Sharad
512d4671bc Decode CodeQL stdout as UTF-8 2021-05-20 14:08:29 -07:00
Aditya Sharad
741bd73e8e Changelog: Add note for grouping of analysis logs 2021-05-20 12:32:10 -07:00
Aditya Sharad
031ec8753a Group log messages while uploading results 2021-05-20 12:32:10 -07:00
Aditya Sharad
19fe63f821 Analyze: Log the analysis summary in its own group
Fix grouping of the analysis logs, so that custom query logs also get grouped.
Capture the stdout of codeql database analyze, which contains the analysis summary
from summary and diagnostic queries.
Log this output in its own group, along with the baseline computed in the Action.
2021-05-20 12:32:09 -07:00
Andrew Eisenberg
6a9815718a Merge pull request #514 from github/aeisenberg/first-changelog-entry
Add the first changelog entry
2021-05-20 10:47:51 -07:00
Andrew Eisenberg
7ae8d165a6 Add the first changelog entry
(Adding the changelog itself.)
2021-05-20 09:24:30 -07:00
Andrew Eisenberg
06b386ac6c Merge pull request #507 from github/aeisenberg/changelog
Add a changelog
2021-05-19 15:41:37 -07:00
Andrew Eisenberg
1b3a351d6d Merge branch 'main' into aeisenberg/changelog 2021-05-19 15:28:21 -07:00
Andrew Eisenberg
1564a6d863 Fix typo in changelog
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2021-05-19 15:28:15 -07:00
Andrew Eisenberg
8566f9b061 Add a changelog
Adds an empty changelog file and a reminder to update it when opening
pull requests.

Also, adds a 1.0.0 version number in the package.json, which is what
we _could_ use for version numbering.
2021-05-19 15:19:36 -07:00
Andrew Eisenberg
bc39b2101e Merge pull request #487 from RA80533/chore/--build
Use `--build`
2021-05-19 13:41:01 -07:00
Andrew Eisenberg
98104d89d9 Merge branch 'main' into chore/--build 2021-05-19 12:44:31 -07:00
RA80533
781da98328 Remove final newline 2021-05-19 15:12:54 -04:00
Henning Makholm
88f6e15932 Merge pull request #508 from github/update-v1-79c79f1b
Merge main into v1
2021-05-19 15:11:11 +02:00
Edoardo Pirovano
79c79f1be5 Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
Henning Makholm
feccdcb876 Merge pull request #506 from github/hmakholm/pr/2.5.5
Update CodeQL bundle to 20210517 / 2.5.5
2021-05-17 21:02:51 +02:00
Henning Makholm
95f5a25b5d Update CodeQL bundle to 20210517 / 2.5.5 2021-05-17 20:38:22 +02:00
Andrew Eisenberg
b393038372 Merge pull request #504 from github/update-v1-21830ef0
Merge main into v1
2021-05-17 08:44:48 -07:00
Andrew Eisenberg
e94d93ad78 Merge branch 'main' into patch-1 2021-05-17 08:30:13 -07:00
Henning Makholm
21830ef0c1 Merge pull request #503 from github/hmakholm/pr/warn-magic-names
Add warnings about CLI hack to codeql.ts
2021-05-14 21:57:44 +02:00
Henning Makholm
e7d4215894 Add warnings about CLI hack to codeql.ts
These warnings refer to a hack that was added to the CLI in
https://github.com/github/semmle-code/pull/39335

They can be removed again once the CLI has a more principled way for
the CLI to recognize that it's being invoked by the runner/action.
2021-05-14 21:23:13 +02:00
Andrew Eisenberg
97887fe996 Merge pull request #501 from github/aeisenberg/add-task
Add a tasks.json
2021-05-13 12:35:33 -07:00
Andrew Eisenberg
da06f4f01b Merge branch 'main' into aeisenberg/add-task 2021-05-13 12:25:54 -07:00
Andrew Eisenberg
6a0bd27159 Merge pull request #500 from github/aeisenberg/paths-include
Change include path for lines of code counting
2021-05-13 12:25:42 -07:00
Andrew Eisenberg
8e61fc214a Change include path for lines of code counting
Previously, we were always using `**` in the include path. the
effect of this was to always count lines in the entire
repository unless explicitly added to the paths-ignore. This
was incorrect behaviour. Now we only using `**` if the include
path is otherwise empty.
2021-05-13 12:05:01 -07:00
Andrew Eisenberg
a77f6b0a58 Merge pull request #502 from github/aeisenberg/metric-id
Use the prefix id for keying into metrics rules
2021-05-13 12:03:01 -07:00
Andrew Eisenberg
8c963ea445 Merge branch 'main' into aeisenberg/metric-id 2021-05-13 11:12:15 -07:00
Andrew Eisenberg
e8b2a9884b Use the prefix id for keying into metrics rules
Fixes a bug where we were looking for incorrect keys for metrics rules.
Previously, we were using full language names in the keys. Now, we use
the short language names in the metric ids. This is done through a
simplification of the code.

Also, this change does two smaller things:

1. Prints out the baseline count to the logs
2. Adds the `assertNever` function to ensure we never miss a case in
   a switch statement. This function is borrowed from vscode-codeql.
2021-05-13 11:11:13 -07:00
Andrew Eisenberg
a924f03118 Merge pull request #499 from github/aeisenberg/non-parallel-loc
Update loc count library
2021-05-13 10:10:39 -07:00
Andrew Eisenberg
38c131a270 Add a tasks.json
This is just a helpful way to ensure you can run `tsc --watch` from
inside vscode.
2021-05-13 16:40:19 +00:00
Andrew Eisenberg
ddcb299283 Update loc count library
This version will count lines of code in each file serially. It still
runs all file system operations asynchronously. The only difference now
is that it will only count one file at a time. It is slower, but it
is able to count large repositories without running out of memory.
2021-05-12 16:33:05 -07:00
Aditya Sharad
4c0671c518 Merge pull request #495 from edoardopirovano/windows-env-file
Output environment file for Windows
2021-05-10 14:01:50 -07:00
Edoardo Pirovano
84b6ff05df Merge branch 'main' into windows-env-file 2021-05-10 21:24:44 +01:00
Andrew Eisenberg
458b7913fc Merge pull request #494 from github/aeisenberg/audit-fix
Fix security vulnerabilities
2021-05-10 12:56:41 -07:00
Edoardo Pirovano
a5506d82e4 Output environment file for Windows 2021-05-10 20:43:49 +01:00
Andrew Eisenberg
22d1f7f619 Merge branch 'main' into aeisenberg/audit-fix 2021-05-10 11:49:23 -07:00
Andrew Eisenberg
ef38c532f3 Merge pull request #493 from github/aeisenberg/contributing2
Fix information about `npm ci`
2021-05-10 11:49:07 -07:00
Andrew Eisenberg
22d495fd60 Merge branch 'main' into aeisenberg/contributing2 2021-05-10 10:25:42 -07:00
Andrew Eisenberg
a9cdff830d Remove confusing words
Co-authored-by: Robert <robertbrignull@github.com>
2021-05-10 10:25:31 -07:00
Aditya Sharad
a56e777fe4 Merge pull request #482 from github/robertbrignull/python-deps-test
Make matrix run all cases of the python-deps tests
2021-05-10 10:19:38 -07:00
Andrew Eisenberg
489dbb0e02 Fix security vulnerabilities
Ran `npm audit fix`.

Even though this fixes a "high" severity vulnerability, all affected
packages are dev packages only.
2021-05-10 10:14:48 -07:00
Andrew Eisenberg
793b3772ec Fix information about npm ci 2021-05-10 10:05:30 -07:00
Aditya Sharad
d2ef04e4b0 Merge branch 'main' into robertbrignull/python-deps-test 2021-05-10 09:48:56 -07:00
Andrew Eisenberg
224195bd22 Merge pull request #492 from github/aeisenberg/contributing
Update contributing guide
2021-05-10 09:20:03 -07:00
Andrew Eisenberg
3280a85376 Update contributing guide
This adds a section on checking in compiled artifacts.
2021-05-10 09:04:59 -07:00
Robert
3c96019556 fix windows hopefully 2021-05-10 16:24:52 +01:00
Robert
f742f910aa put matrix vars in env vars for whitespace safety 2021-05-10 16:19:38 +01:00
Andrew Eisenberg
4a083a45c2 Merge pull request #491 from github/update-v1-f00bafbd
Merge main into v1
2021-05-10 08:07:39 -07:00
David Verdeguer
cf682cf1c2 Merge pull request #463 from github/daverlo/categoryInput
Add category input
2021-05-10 15:35:35 +02:00
David Verdeguer
ea18d47a2b Merge branch 'main' into daverlo/categoryInput 2021-05-10 14:54:09 +02:00
RA80533
db6341a36c Use --build 2021-05-07 20:15:12 -04:00
Andrew Eisenberg
f00bafbde1 Merge pull request #483 from github/aeisenberg/fix-language
Fix lines of code mapping
2021-05-07 11:02:25 -07:00
Andrew Eisenberg
b6ae33fbe6 Fix lines of code mapping
We were inadvertently using codeql language ids instead of the action's
language ids. There is now a 3-way mapping between the ids used by
the lines counter library, the action, and codeql.
2021-05-07 10:46:21 -07:00
Robert
603c47cb50 make matrix run all cases 2021-05-07 10:21:05 +01:00
Andrew Eisenberg
35a83b92ca Merge pull request #477 from github/hmakholm/pr/fix-escaping
fix value escaping in codeql-env.sh
2021-05-06 09:09:01 -07:00
Henning Makholm
ad98dc69ff Merge branch 'main' into hmakholm/pr/fix-escaping 2021-05-06 17:08:10 +02:00
Robert
418fcd5826 Merge pull request #480 from github/robertbrignull/logging_typo
Fix typos in logging
2021-05-06 13:56:08 +01:00
Robert
031dc506df fix typos in logging 2021-05-06 09:26:42 +01:00
Henning Makholm
ee062d3e85 Merge branch 'main' into hmakholm/pr/fix-escaping 2021-05-06 02:25:37 +02:00
Andrew Eisenberg
a7d3945ab4 Merge pull request #479 from github/aeisenberg/directory-fingerprint
Avoid fingerprinting directories
2021-05-05 13:54:11 -07:00
Andrew Eisenberg
f584f94f3d Avoid fingerprinting directories 2021-05-05 13:37:17 -07:00
Andrew Eisenberg
b477190a33 Merge branch 'main' into hmakholm/pr/fix-escaping 2021-05-05 12:09:07 -07:00
Henning Makholm
a6ebb19b5b Update src/runner.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2021-05-05 11:50:51 -07:00
Andrew Eisenberg
53210459f6 Merge pull request #475 from github/aeisenberg/warning-message
Clarify the missing baseline lines of code warning message
2021-05-05 11:20:13 -07:00
Henning Makholm
e7e64d59be fix value escaping in codeql-env.sh 2021-05-05 19:57:44 +02:00
Henry Mercer
c2ec5a225a Merge branch 'main' into aeisenberg/warning-message 2021-05-05 18:32:29 +01:00
Henry Mercer
46d0d277ef Merge pull request #476 from github/henrymercer/log-queries-during-interpretation
Log each query as it's interpreted when calling codeql database analyze
2021-05-05 18:30:32 +01:00
Henry Mercer
2c0a85753e Log each query as it's interpreted when calling codeql database analyze 2021-05-05 18:12:16 +01:00
Andrew Eisenberg
e04c62bb3c Clarify the missing baseline lines of code warning message 2021-05-05 09:29:20 -07:00
David Verdeguer
0c0bc0e6c6 Fix undefined environment 2021-05-05 15:46:49 +02:00
David Verdeguer
a1176686f1 Merge branch 'main' into daverlo/categoryInput 2021-05-05 12:31:11 +02:00
David Verdeguer
cd7eedd4a5 Address comments 2021-05-05 12:30:20 +02:00
Andrew Eisenberg
925cef7601 Merge pull request #474 from github/aeisenberg/change-metric-id
Change from `metric` to `rule`
2021-05-04 11:20:18 -07:00
Andrew Eisenberg
a2312a0bf3 Change from metric to rule
The SARIF that we are interpreting has moved away from using `metric`
to the more general term, `rule`. We need to adapt our baseline lines of
code counting to use `rule` as well.
2021-05-04 10:06:16 -07:00
Aditya Sharad
9a415429a9 Merge pull request #473 from github/update-v1-8e3540bb
Merge main into v1
2021-05-03 15:29:45 -07:00
Aditya Sharad
8e3540bb01 Merge pull request #472 from github/adityasharad/pr/2.5.4
Update CodeQL bundle to 20210503 / 2.5.4
2021-05-03 15:14:07 -07:00
Aditya Sharad
c3e98fb528 Update CodeQL bundle to 20210503 / 2.5.4 2021-05-03 14:41:51 -07:00
David Verdeguer
aa53f64b85 Use the category on the runner 2021-05-03 19:58:30 +02:00
David Verdeguer
3b741b35ad Use actionsUtil.computeAutomationID on upload-lib 2021-05-03 19:56:04 +02:00
David Verdeguer
c93cbc943a Forward category input to codeql cli 2021-05-03 19:41:53 +02:00
David Verdeguer
519d0771c7 Add actions-util.getAutomationID() 2021-05-03 19:36:32 +02:00
Henning Makholm
6b86057d79 Merge pull request #471 from github/update-v1-cb581084
Merge main into v1
2021-04-30 19:18:44 +02:00
Henning Makholm
cb5810848d Merge pull request #470 from github/hmakholm/pr/2.5.3
update bundle to 20210430
2021-04-30 19:02:00 +02:00
Henning Makholm
7ab95f642d update bundle to 20210430 2021-04-30 18:26:08 +02:00
Chris Gavin
33bb16c8b4 Merge pull request #457 from github/restrict-permissions
Restrict Actions token permissions in CodeQL workflow.
2021-04-30 14:19:45 +01:00
Chris Gavin
d879f4b84e Merge branch 'main' into restrict-permissions 2021-04-30 13:55:34 +01:00
Chris Gavin
e305db89c2 Fix the token permissions for private copies of the CodeQL Action, and for runs that are not from pull requests. 2021-04-30 13:47:54 +01:00
David Verdeguer
c6e734ccc5 Add category option to runner 2021-04-29 14:59:36 +02:00
David Verdeguer
76f5ada659 Don't use getOptionalInput on the runner codepath 2021-04-29 08:00:19 +02:00
Andrew Eisenberg
1585462c63 Merge pull request #465 from github/aeisenberg/lines-of-code-trim
Avoid analyzing excluded language files for line counting
2021-04-28 16:41:55 -07:00
Andrew Eisenberg
ee2346270d Avoid analyzing excluded language files for line counting
This change passes in a list of file types to the line counting
analysis. These are the languages for the databases being analyzed.
Line count analysis is restricted to these files.
2021-04-28 16:07:55 -07:00
Andrew Eisenberg
5c0a38d7e4 Update github-linguist dependency
This version adds a larger list of auto-excluded binary files.
And allows for the passing of a list of file types to restrict
analysis to.
2021-04-28 14:55:17 -07:00
David Verdeguer
40fb1f3f00 Add category input 2021-04-28 14:32:16 +02:00
Andrew Eisenberg
03f029c2a1 Merge pull request #459 from github/aeisenberg/add-linguist-data
Add baseline metrics for lines of code
2021-04-26 14:23:31 -07:00
Andrew Eisenberg
998f472183 Add baseline metrics for lines of code
This commit uses a third party library to estimate the lines of code in
a database that is to be analyzed by codeql.

The estimate uses the same includes and excludes globs for determining
which files should be counted.

The lines of code count is returned by language and injected into the
SARIF as `baseline` property in the `${language}/summary/lines-of-code`
metric.
2021-04-26 14:09:38 -07:00
Andrew Eisenberg
83b730ea82 Merge pull request #461 from github/update-v1-7c5b1287
Merge main into v1
2021-04-26 09:05:53 -07:00
Andrew Eisenberg
7c5b1287d5 Merge pull request #460 from github/dependabot/npm_and_yarn/runner/ssri-6.0.2
Bump ssri from 6.0.1 to 6.0.2 in /runner
2021-04-23 14:19:20 -07:00
dependabot[bot]
e2d70d6a0b Bump ssri from 6.0.1 to 6.0.2 in /runner
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-23 18:01:34 +00:00
Andrew Eisenberg
e266dfb63e Merge pull request #458 from github/aeisenberg/add-github-linguist
Add the github-linguist package
2021-04-23 10:59:56 -07:00
Andrew Eisenberg
b6b197e0ad Merge branch 'main' into aeisenberg/add-github-linguist 2021-04-23 10:54:04 -07:00
Robert
ba64dfb959 Merge pull request #456 from github/robertbrignull/toolcache-interface
Introduce our own toolcache implementation for use by the runnner
2021-04-23 16:24:04 +01:00
Robert
27bf3a208d fix typo 2021-04-23 10:01:50 +01:00
Robert
8207018b75 make query more robust 2021-04-23 10:01:28 +01:00
Robert
ce467e7e36 use safeWhich 2021-04-23 09:59:23 +01:00
Andrew Eisenberg
c4a84a93d4 Add the github-linguist package
This commit only adds a single package and all of its transitive
dependencies. The github-linguist package will be used for counting
lines of code as a baseline for databases we are analyzing.
2021-04-22 15:59:49 -07:00
Chris Gavin
643bc6e3ed Remove spurious blank line. 2021-04-22 17:26:26 +01:00
Chris Gavin
7e85b5d66a Restrict Actions token permissions in CodeQL workflow. 2021-04-22 17:07:03 +01:00
Robert
8c91ba83e2 Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
Henning Makholm
429ece1037 Merge pull request #455 from github/update-v1-896b4ff1
Merge main into v1
2021-04-21 20:50:55 +02:00
Henning Makholm
896b4ff181 Merge pull request #454 from github/hmakholm/pr/2.5.2
update bundle to 20210421 (CLI 2.5.2)
2021-04-21 20:24:18 +02:00
Henning Makholm
cb4c96ba60 Merge remote-tracking branch 'origin/main' into hmakholm/pr/2.5.2 2021-04-21 18:56:33 +02:00
Edoardo Pirovano
578f9fc99e Add external git repositories to search path for custom queries 2021-04-21 17:40:56 +01:00
Henning Makholm
46517cfb47 update bundle to 20210421 (CLI 2.5.2) 2021-04-21 17:31:57 +02:00
David Verdeguer
75dbb28e2f Merge pull request #453 from github/update-v1-1fa35632
Merge main into v1
2021-04-20 14:27:30 +02:00
David Verdeguer
1fa35632f2 Merge pull request #452 from github/daverlo/category
Ignore non-string values in populateRunAutomationDetails
2021-04-20 13:31:19 +02:00
David Verdeguer
496bf0ec11 Ignore non-string values in populateRunAutomationDetails 2021-04-20 12:53:16 +02:00
Andrew Eisenberg
9db4c5714e Merge pull request #449 from github/update-v1-8bd2b351
Merge main into v1
2021-04-19 08:33:23 -07:00
David Verdeguer
8bd2b3516b Merge pull request #446 from github/daverlo/runAutomationDetails
Add automationdetails id to runs
2021-04-19 11:30:53 +02:00
David Verdeguer
bc14da99c5 Merge branch 'main' into daverlo/runAutomationDetails 2021-04-19 10:47:18 +02:00
David Verdeguer
351d36fd18 Add test for existing automationDetails 2021-04-19 09:04:58 +02:00
Andrew Eisenberg
c87ee1c65a [Runner] Throw error on unknown option in init command
And explicitly document the advanced --trace-process-name and
--trace-process-level args.
2021-04-16 12:09:26 -07:00
David Verdeguer
0ece0d074b Fix populateRunAutomationDetails for null environments 2021-04-16 09:24:34 +02:00
David Verdeguer
de611b2de3 Prevent the automationDetails to be regenerated if it already exists 2021-04-16 07:47:42 +02:00
David Verdeguer
47755f0910 Add automationdetails id to runs 2021-04-15 16:20:49 +02:00
Andrew Eisenberg
6aebd1b98a Fixes a regex for language and locale recognition
See https://github.com/oasis-tcs/sarif-spec/pull/490
See #418

Note that this changes the sarif spec file. Unless this
change is actually merged in the sarif spec repo, the
version used by the action will be slightly different.
2021-04-14 08:10:56 -07:00
Andrew Eisenberg
af641b2d26 Use externalRepoAuth when getting a remote config
This allows users to specify a different token for retrieving the
codeql config from a different repository.

Fixes https://github.com/github/advanced-security-field/issues/185
2021-04-12 08:02:30 -07:00
Aditya Sharad
8a00ebe607 Code scanning: Compare the default and latest CodeQL tools bundles
Create a prerequisite job that runs the init step twice, with `tools: null` and `tools: latest`.
Use the outputs of these steps to compare the two CodeQL versions.
Pass the list of distinct tool versions for the analysis job to matrix over.
This lets us test the analysis against both versions, while avoiding duplication
when they are actually the same version.
2021-04-12 08:02:30 -07:00
Aditya Sharad
6b4df91bd2 PR checks: Compare the default and latest CodeQL tools bundles
Create a prerequisite job that runs the init step twice, with `tools: null` and `tools: latest`.
Use the outputs of these steps to compare the two CodeQL versions.
Pass the list of distinct tool versions for the integration tests to use in their matrix strategy.
This avoids redundant test jobs when the default and latest bundles are actually the same version of CodeQL.

`~` is accepted by JSON but not by the Actions context language, so we use `null` to indicate the default version.
2021-04-12 08:02:30 -07:00
Aditya Sharad
757ff9962f PR checks: Run integration tests against both tools: null and tools: latest
Always test against both the default and latest CodeQL bundle.

This improves test coverage shortly after a CodeQL bundle release, where the latest bundle
may not yet be built into the Actions VM image as the default bundle.

It also saves a manual step during bundle release testing,
since we no longer need to temporarily change the PR checks to `tools: latest`.

There is some redundancy when the latest bundle is the same as the default bundle on the VM image,
but this can be considered a test for the `tools: latest` configuration.
2021-04-12 08:02:30 -07:00
Aditya Sharad
0c2281fb06 Merge pull request #441 from adityasharad/tests/matrix-tools-latest
PR checks: Run integration tests against both `tools: null` and `tools: latest`
2021-04-09 16:24:56 -07:00
Aditya Sharad
fcf0863613 Merge branch 'main' into tests/matrix-tools-latest 2021-04-09 16:11:35 -07:00
Andrew Eisenberg
534192fa05 Use externalRepoAuth when getting a remote config
This allows users to specify a different token for retrieving the
codeql config from a different repository.

Fixes https://github.com/github/advanced-security-field/issues/185
2021-04-09 15:00:57 -07:00
Aditya Sharad
64b50fa2a6 Code scanning: Compare the default and latest CodeQL tools bundles
Create a prerequisite job that runs the init step twice, with `tools: null` and `tools: latest`.
Use the outputs of these steps to compare the two CodeQL versions.
Pass the list of distinct tool versions for the analysis job to matrix over.
This lets us test the analysis against both versions, while avoiding duplication
when they are actually the same version.
2021-04-09 14:51:18 -07:00
Aditya Sharad
51b1d7d81f PR checks: Compare the default and latest CodeQL tools bundles
Create a prerequisite job that runs the init step twice, with `tools: null` and `tools: latest`.
Use the outputs of these steps to compare the two CodeQL versions.
Pass the list of distinct tool versions for the integration tests to use in their matrix strategy.
This avoids redundant test jobs when the default and latest bundles are actually the same version of CodeQL.

`~` is accepted by JSON but not by the Actions context language, so we use `null` to indicate the default version.
2021-04-09 13:38:30 -07:00
Aditya Sharad
f9a19da7bf PR checks: Run integration tests against both tools: null and tools: latest
Always test against both the default and latest CodeQL bundle.

This improves test coverage shortly after a CodeQL bundle release, where the latest bundle
may not yet be built into the Actions VM image as the default bundle.

It also saves a manual step during bundle release testing,
since we no longer need to temporarily change the PR checks to `tools: latest`.

There is some redundancy when the latest bundle is the same as the default bundle on the VM image,
but this can be considered a test for the `tools: latest` configuration.
2021-04-08 13:39:01 -07:00
Aditya Sharad
ed446be54b Merge pull request #439 from github/update-v1-7f9fb10a
Merge main into v1
2021-04-05 12:02:07 -07:00
okyanusoz
8a1d7c290f Fix wording in README 2021-04-03 21:55:03 +03:00
Aditya Sharad
7f9fb10a74 Merge pull request #437 from github/dependabot/npm_and_yarn/runner/y18n-4.0.1
Bump y18n from 4.0.0 to 4.0.1 in /runner
2021-04-01 14:57:41 -07:00
Aditya Sharad
2f9f143d73 Merge branch 'main' into dependabot/npm_and_yarn/runner/y18n-4.0.1 2021-04-01 14:18:52 -07:00
Aditya Sharad
356d7a0637 Merge pull request #436 from github/dependabot/npm_and_yarn/y18n-4.0.1
Bump y18n from 4.0.0 to 4.0.1
2021-04-01 14:18:21 -07:00
Robert
def266fc62 update node modules 2021-04-01 10:37:02 +01:00
dependabot[bot]
5c715f3945 Bump y18n from 4.0.0 to 4.0.1 in /runner
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-01 06:56:53 +00:00
dependabot[bot]
d0b1259bbe Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 22:46:11 +00:00
Aditya Sharad
8f0d3f7541 Merge pull request #435 from github/robertbrignull/dependabot_error
Add special error message case for dependabot
2021-03-31 07:47:05 -07:00
Robert
ca27066d09 fix grammar / punctuation 2021-03-31 11:05:30 +01:00
Robert
2f93805cef check push event 2021-03-30 16:53:02 +01:00
Robert
d4edded3ea Add special dependabot error message 2021-03-30 14:09:06 +01:00
Henning Makholm
f8f120e93b Merge pull request #434 from github/update-v1-bf8daada
Merge main into v1
2021-03-26 20:18:38 +01:00
Henning Makholm
bf8daada40 Merge pull request #433 from github/hmakholm/pr/2.5.0
Update CodeQL bundle to 20210326
2021-03-26 19:16:50 +01:00
Henning Makholm
996a90bf48 Revert "Temporarily use the latest version for testing"
This reverts commit d8216decae.
2021-03-26 18:06:32 +01:00
Robin Neatherway
d8216decae Temporarily use the latest version for testing 2021-03-26 15:17:17 +01:00
Henning Makholm
1d93ad95c1 Update CodeQL bundle to 20210326 2021-03-26 15:03:49 +01:00
Simon Engledew
bb012c4070 Merge pull request #432 from github/simon-engledew/fix-ref-check
Fix rev-parse errors
2021-03-25 14:02:01 +00:00
Simon Engledew
ba14abbca7 Rewrite the ref to correctly point to refs/remotes
Fixes the rev-parse issues caused by https://github.com/github/codeql-action/pull/428
2021-03-25 13:08:55 +00:00
Simon Engledew
972dc3e3f9 Merge pull request #428 from github/simon-engledew/detect-merge
Fix race condition with actions/checkout@v1
2021-03-23 06:18:28 +00:00
Simon Engledew
9165099103 Skip doing work if it is not necessary 2021-03-22 15:50:04 +00:00
Simon Engledew
36a9516acc PR feedback 2021-03-22 15:09:33 +00:00
Aditya Sharad
687b7b73f7 Merge pull request #429 from github/update-v1-5d467d01
Merge main into v1
2021-03-22 07:42:13 -07:00
Simon Engledew
ef92c5ac5f Count the number of parents of the current commit to check it is still a merge
Work around a race condition in actions where sometimes GITHUB_SHA != git rev-parse head
2021-03-22 12:05:00 +00:00
Aditya Sharad
5d467d014b Merge pull request #427 from github/hmakholm/pr/2.4.6 2021-03-20 15:52:17 -07:00
Henning Makholm
f8e31274f4 Revert "Temporarily use the latest version for testing"
This reverts commit e700075082.
2021-03-20 01:13:11 +01:00
Robin Neatherway
e700075082 Temporarily use the latest version for testing 2021-03-20 00:35:46 +01:00
Henning Makholm
d2f4021928 Update CodeQL bundle to 20210319 2021-03-20 00:30:46 +01:00
Josh Soref
c4fced7348 Fix spelling errors
spelling: executable
spelling: github
spelling: javascript
spelling: latest
spelling: occurred
spelling: parameter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-18 09:40:47 -07:00
Andrew Eisenberg
08fae3caba Display better error message on invalid sarif
Specifically, some third party tools do not include a `results`
block for runs when there is an error. This change adds a more
explicit error message for this situation.
2021-03-18 09:03:42 -07:00
Andrew Eisenberg
ffd96b38fb Ensure error correct error message on 403 error 2021-03-17 07:55:21 -07:00
Robert
0f834639e4 Merge pull request #423 from github/robertbrignull/toolcache-query-safety
Make unguarded-action-lib better at ignoring uses of toolcache
2021-03-16 16:13:33 +00:00
Robert
5004a54ed3 Merge branch 'main' into robertbrignull/toolcache-query-safety 2021-03-16 15:29:47 +00:00
Robert
8373707722 Merge pull request #422 from github/robertbrignull/getActionsCodeQLActionRepository
Make control flow cleaer to fix unguarded-action-lib alert
2021-03-16 15:22:37 +00:00
Robert
378f30f95d call setupActionsVars in the tests too 2021-03-16 13:43:28 +00:00
Robert
d698cb3d2b Make unguarded-action-lib better at ignoring uses of toolcache 2021-03-16 13:14:17 +00:00
Robert
09024e50d4 make control flow cleaer to fix query alert 2021-03-16 12:07:00 +00:00
Chris Gavin
daff33213e Merge pull request #417 from github/dependabot/npm_and_yarn/runner/elliptic-6.5.4
Bump elliptic from 6.5.3 to 6.5.4 in /runner
2021-03-16 10:11:36 +00:00
Chris Gavin
4c3c9b0d41 Merge branch 'main' into dependabot/npm_and_yarn/runner/elliptic-6.5.4 2021-03-16 09:52:57 +00:00
Chris Gavin
0ed969c530 Merge pull request #419 from github/update-v1-cfec2bbc
Merge main into v1
2021-03-15 10:22:24 +00:00
dependabot[bot]
4df078eec5 Bump elliptic from 6.5.3 to 6.5.4 in /runner
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-11 04:41:48 +00:00
Chris Gavin
cfec2bbc35 Merge pull request #409 from github/check-ghae-endpoint-first-only-on-ghae
When downloading the CodeQL bundle, only use the GitHub AE endpoint on GitHub AE, and check it first.
2021-03-10 13:03:16 +00:00
Chris Gavin
18f6367c46 Merge branch 'main' into check-ghae-endpoint-first-only-on-ghae 2021-03-10 12:23:15 +00:00
Aditya Sharad
df9359871e Merge pull request #415 from github/update-v1-2fcc4eb0
Merge main into v1
2021-03-09 11:12:08 -08:00
Aditya Sharad
2fcc4eb030 Merge pull request #414 from github/hmakholm/pr/2.4.5
Update CodeQL bundle to 20210308
2021-03-09 10:35:53 -08:00
Henning Makholm
27ed6ac804 Revert "Temporarily use the latest version for testing"
This reverts commit c78d81fa3e.
2021-03-09 19:03:10 +01:00
Robin Neatherway
c78d81fa3e Temporarily use the latest version for testing 2021-03-09 18:21:32 +01:00
Henning Makholm
bcca43b391 Update CodeQL bundle to 20210308 2021-03-09 17:43:35 +01:00
Aditya Sharad
5c4e11807d Merge pull request #413 from github/update-v1-6ddfab14
Merge main into v1
2021-03-08 11:35:14 -08:00
Aditya Sharad
6ddfab14f6 Merge pull request #412 from github/fix-pip-url
Fix the Pip download URL.
2021-03-08 10:51:58 -08:00
Chris Gavin
039625a3ce Fix the Pip download URL. 2021-03-08 18:27:42 +00:00
Aditya Sharad
ce6b93eb0a Merge pull request #408 from github/adityasharad/bundle/20210304
Update CodeQL bundle to 20210304 / CLI 2.4.4
2021-03-08 07:53:39 -08:00
Simon Engledew
145b51c270 Merge pull request #410 from github/update-v1-bde489c6
Merge main into v1
2021-03-08 15:50:17 +00:00
Chris Gavin
bb51ece0b4 When downloading the CodeQL bundle, only use the GitHub AE endpoint on GitHub AE, and check it first. 2021-03-07 11:18:54 +00:00
Aditya Sharad
fb01860db6 Revert "Temporarily use the latest version for testing"
This reverts commit 2f4f48f767.
2021-03-04 13:33:26 -08:00
Aditya Sharad
2f4f48f767 Temporarily use the latest version for testing 2021-03-04 13:20:54 -08:00
Aditya Sharad
0ff9c449b7 Update CodeQL bundle to 20210304 / CLI 2.4.4 2021-03-04 13:05:37 -08:00
Simon Engledew
bde489c632 Merge pull request #406 from github/simon-engledew/go-module
Check if this mitigates the go 1.16 issue
2021-03-01 13:20:17 +00:00
Simon Engledew
324d987bc6 Check if this mitigates the go 1.16 issue 2021-03-01 13:01:56 +00:00
Chris Gavin
e40d00393d Merge pull request #405 from github/update-v1-964ae012
Merge main into v1
2021-03-01 10:57:06 +00:00
Chris Gavin
964ae01287 Merge pull request #400 from github/no-update-release-branch-on-forks
Don't run update release branch workflow on forks.
2021-02-24 09:28:41 +00:00
Chris Gavin
fdf2494cfa Don't run update release branch workflow on forks. 2021-02-23 11:44:38 +00:00
Robert
d00607bc7b Merge pull request #399 from github/update-v1-bcd7b2de
Merge main into v1
2021-02-22 10:37:31 +00:00
Robert
7f1d7b8bda Merge pull request #398 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions.
2021-02-22 10:34:38 +00:00
GitHub
760681b052 Update supported GitHub Enterprise Server versions. 2021-02-20 00:26:14 +00:00
Aditya Sharad
bcd7b2de1d Merge pull request #396 from github/adityasharad/ram-threshold
Increase the default amount of RAM reserved for the OS
2021-02-17 12:05:25 -08:00
Aditya Sharad
fd0ad84431 Merge branch 'main' into adityasharad/ram-threshold 2021-02-17 11:29:15 -08:00
Robert
41b73e168c Merge pull request #397 from github/robertbrignull/runner_auth
Set externalRepoAuth
2021-02-17 16:53:23 +00:00
Robert
a2653534db set externalRepoAuth 2021-02-17 08:30:35 -08:00
Chris Gavin
f84e342ff3 Merge pull request #393 from github/ghae-endpoint
Also look for the CodeQL bundle at the custom GitHub AE endpoint.
2021-02-17 08:41:39 +00:00
Chris Gavin
2b1c88c014 Merge branch 'main' into ghae-endpoint 2021-02-17 08:29:36 +00:00
Aditya Sharad
0ab754c698 Merge pull request #395 from github/aeisenberg/remove-external-token
Remove --external-repository-token option from runner
2021-02-16 15:12:54 -08:00
Aditya Sharad
4c94e29f1b Increase the default amount of RAM reserved for the OS
Mitigation for OOM errors (137/SIGKILL) seen by users when we overcommit the available memory.
For Unix, reserve 1GB.
For Windows, reserve 1.5GB, as the OS needs more memory and estimates inaccurately.
2021-02-16 15:10:19 -08:00
Andrew Eisenberg
58defc0652 Remove --external-repository-token option from runner
Specifying a token as a cli input leads to a potential for leaking the
token on CI logs. This commit removes the option. Instead, users
should specify a single GitHub token through `--github-auth-stdin` or
by setting the `GITHUB_TOKEN` environment variable. This token should be
created with enough privileges to access the required repository.
2021-02-16 11:28:25 -08:00
Andrew Eisenberg
88714e3a60 Add capability to specify auth from env var or stdin
This commit adds two new ways of specifying GitHub auth:

1. from the GITHUB_TOKEN environment variable
2. from standard input

This commit does not include any documentation changes and the
descriptions of new command line options will need to be tweaked.
2021-02-16 11:26:39 -08:00
Chris Gavin
3c63623824 Merge branch 'main' into ghae-endpoint 2021-02-16 10:17:25 +00:00
Chris Gavin
1d92248672 Merge pull request #394 from github/lock-bundler-version
Lock bundler version to 2.2.9.
2021-02-16 10:16:31 +00:00
Chris Gavin
c6390afb59 Merge branch 'main' into lock-bundler-version 2021-02-16 10:07:00 +00:00
Chris Gavin
f2896eb08a Lock bundler version to 2.2.9. 2021-02-15 19:50:32 +00:00
Chris Gavin
f8c5dacab5 Also look for the CodeQL bundle at the custom GitHub AE endpoint. 2021-02-15 19:41:41 +00:00
Chris Gavin
49cb962d82 Merge pull request #385 from github/allow-override-temp
Allow overriding path of temporary files.
2021-02-15 19:39:15 +00:00
Chris Gavin
04d2b0018e Merge branch 'main' into allow-override-temp 2021-02-15 16:20:45 +00:00
Chris Gavin
3568e4afcc Merge pull request #392 from github/detect-ghae
Add detection for GitHub AE.
2021-02-15 12:11:09 +00:00
Chris Gavin
7b72f1c330 Merge main into allow-override-temp. 2021-02-15 11:45:08 +00:00
Chris Gavin
6452109691 Treat empty CODEQL_ACTION_TEMP the same as it not being set. 2021-02-15 11:44:44 +00:00
Chris Gavin
c9ca4ec1bd Convert GitHub variant to an enum. 2021-02-15 09:30:16 +00:00
Chris Gavin
0656b2c1ad Add detection for GitHub AE. 2021-02-13 11:06:03 +00:00
Chris Gavin
21026345ae Merge pull request #388 from github/update-v1-781e3bc5
Merge main into v1
2021-02-08 11:37:49 +00:00
Sam Partington
781e3bc540 Merge pull request #380 from github/remove-uploadFromActions-params
Remove parameters from uploadFromActions
2021-02-02 11:53:08 +00:00
Sam Partington
10a2f1b1aa Merge branch 'main' into remove-uploadFromActions-params 2021-02-02 11:34:02 +00:00
Simon Engledew
c4084e1c1a Merge pull request #386 from github/simon-engledew/warning-undefined
Do not report warning: undefined
2021-02-02 10:17:59 +00:00
Simon Engledew
f3f5dfd3df Merge branch 'main' into simon-engledew/warning-undefined 2021-02-02 10:06:49 +00:00
Simon Engledew
169b9f804b Fix lint errors 2021-02-02 09:59:06 +00:00
Chris Gavin
3d8b1cb7ea Merge pull request #387 from github/asymmetric-log-release-branch
Use an asymmetric Git log when updating the release branch.
2021-02-02 08:18:19 +00:00
Chris Gavin
8fef3928ba Use an asymmetric Git log when updating the release branch. 2021-02-01 18:03:39 +00:00
Aditya Sharad
db540f07f0 Merge pull request #381 from github/adityasharad/fix/python2-pip-url
Python setup: Fix URL for Python 2.7 pip install
2021-02-01 09:36:57 -08:00
Aditya Sharad
80a8f97b9c Merge branch 'main' into adityasharad/fix/python2-pip-url 2021-02-01 09:15:29 -08:00
Simon Engledew
1f07e287da Do not report warning: undefined 2021-02-01 16:32:13 +00:00
Chris Gavin
ed751ece83 Allow overriding path of temporary files. 2021-02-01 15:34:13 +00:00
Robin Neatherway
0dcd795b4c Merge pull request #384 from github/update-v1-6408d722
Merge main into v1
2021-02-01 10:29:19 +00:00
Simon Engledew
6408d72268 Merge pull request #367 from github/simon-engledew/remove-january-warning
Remove date specific pull request warnings
2021-01-29 10:47:59 +00:00
Simon Engledew
44ed1c6ce1 Remove pull request warnings 2021-01-29 10:42:37 +00:00
Aditya Sharad
bfa9dfe827 Python setup: Fix URL for Python 2.7 pip install
This URL changed upstream. Fix it by using the same upstream URL as the LGTM Python image.
We can revisit separately whether to drop the Python 2 pip installation entirely.
2021-01-28 16:52:16 -08:00
Sam Partington
19fe854945 Remove intermediate variables 2021-01-28 15:40:42 +00:00
Sam Partington
c2377b2e49 Remove parameters from uploadFromActions
Retrieve the relevant values in the method itself instead.
2021-01-28 15:37:09 +00:00
Robin Neatherway
74004631ca Merge pull request #379 from github/rneatherway/codeql-bundle-20210127
Update default CodeQL to 20210127
2021-01-28 12:13:38 +00:00
Robin Neatherway
07943dcc5d Revert "Temporarily use the latest version for testing"
This reverts commit 2c62543901.
2021-01-27 14:50:45 +00:00
Robin Neatherway
2c62543901 Temporarily use the latest version for testing 2021-01-27 11:51:55 +00:00
Robin Neatherway
18f9eb6b55 Update default CodeQL to 20210127 2021-01-27 11:31:51 +00:00
Chris Gavin
0dc37c7260 Merge pull request #377 from github/fix-version-in-message
Fix the formatting of a warning message.
2021-01-26 17:43:05 +00:00
Chris Gavin
f109c77463 Merge branch 'main' into fix-version-in-message 2021-01-26 17:24:58 +00:00
Chris Gavin
601dc8486f Merge pull request #376 from github/fix-deduplication-sources
Fix deduplication of bundle download sources.
2021-01-26 17:22:03 +00:00
Chris Gavin
d182a0e3aa Fix deduplication of bundle download sources. 2021-01-26 16:56:43 +00:00
Chris Gavin
5261491807 Fix the formatting of a warning message. 2021-01-26 16:52:43 +00:00
Chris Gavin
24872f608c Merge pull request #374 from github/automatic-upload-debug-logs
Upload debug logs automatically when `ACTIONS_STEP_DEBUG` is enabled.
2021-01-26 10:11:17 +00:00
Chris Gavin
94b32884f9 Dump logs to stdout instead of stderr to avoid synchronization problems. 2021-01-26 09:47:31 +00:00
Chris Gavin
8705aaff32 Walk log filex manually rather than using the Actions globber. 2021-01-26 09:21:38 +00:00
Chris Gavin
219142571c Upload debug logs automatically when ACTIONS_STEP_DEBUG is enabled. 2021-01-25 15:44:31 +00:00
Robert
3a205cc343 Merge pull request #372 from github/update-v1-7a340d32
Merge main into v1
2021-01-25 10:56:12 +00:00
Simon Engledew
7a340d32a1 Merge pull request #370 from github/simon-engledew/hide-workflow-not-found
Do not warn users if a workflow cannot be read
2021-01-25 09:21:11 +00:00
Simon Engledew
ee4d06713e Fix wonky comment 2021-01-22 14:08:43 +00:00
Simon Engledew
6be1f5ce0e Add more granular exception handling 2021-01-22 13:52:04 +00:00
Simon Engledew
8a9922df92 Disambiguate report messages 2021-01-22 13:52:04 +00:00
Simon Engledew
795b1923ec Swap method naming to account for new functionality 2021-01-22 13:52:03 +00:00
Simon Engledew
28e2860afb Correctly report WorkflowMissing 2021-01-22 13:51:45 +00:00
Simon Engledew
4547749a2f Do not warn users if a workflow cannot be read
This will still send a LintFailed message status report.
2021-01-22 13:51:19 +00:00
Robert
484a9ad67e Merge pull request #368 from github/robertbrignull/external-token-fix
Only insert external repos token if supplied
2021-01-22 12:50:17 +00:00
Robert
1013277382 Merge branch 'main' into robertbrignull/external-token-fix 2021-01-22 12:08:26 +00:00
Robert
504cb5e7a2 Merge pull request #371 from github/robertbrignull/pr-checks-workflow
Move .github/workflows back where it was
2021-01-21 18:26:50 +00:00
Robert
cfdf2eaf7a move .github/workflows back where it was 2021-01-21 16:06:26 +00:00
Robert
a1bfa7609f Merge pull request #369 from felicitymay/patch-1
Update description to include limit on number of results
2021-01-19 17:57:15 +00:00
Felicity Chapman
a3a8231e64 Update upload-sarif/action.yml
Co-authored-by: hubwriter <hubwriter@github.com>
2021-01-19 17:17:45 +00:00
Felicity Chapman
d0ac97e33f Add results limit to description 2021-01-19 17:02:31 +00:00
Robert
cb574a7d60 only insert external repos token if supplied 2021-01-19 15:42:57 +00:00
Robert
ce35c1c3a5 Merge pull request #366 from github/update-v1-8659fb33
Merge main into v1
2021-01-18 10:22:40 +00:00
Robert
b0adc415a0 Merge pull request #364 from ericcornelissen/eslint/no-unused-vars
Update code so "@typescript-eslint/no-unused-vars" passes
2021-01-18 10:01:59 +00:00
Eric Cornelissen
946779f5b6 Run npm run-script build 2021-01-15 18:40:06 +01:00
Eric Cornelissen
9a753aa409 Removed unused vars in config-utils.test.ts 2021-01-15 18:25:29 +01:00
Eric Cornelissen
2a6d6c52d7 Update ESLint configuration
Remove the line to disable the "github/no-unused-vars"  rule.
2021-01-15 18:20:07 +01:00
Robin Neatherway
8659fb33f9 Merge pull request #362 from github/rneatherway/merge-workflows
Merge pr-check and integration-testing workflows
2021-01-15 16:26:34 +00:00
Robin Neatherway
137e614f23 Merge branch 'main' into rneatherway/merge-workflows 2021-01-15 15:59:36 +00:00
Simon Engledew
4bdcd08344 Merge pull request #363 from github/simon-engledew/fix-incorrect-branch-warning
Fix overzealous warnings when PR scanning is not required
2021-01-15 10:59:19 +00:00
Simon Engledew
b6fc7138bf Merge branch 'main' into simon-engledew/fix-incorrect-branch-warning 2021-01-15 10:41:33 +00:00
Simon Engledew
1a6f6a27b3 Implement PR feedback 2021-01-15 08:28:21 +00:00
Robert
f86e200d13 Merge pull request #357 from github/robertbrignull/external-token-option
Introduce external repository token
2021-01-14 17:41:30 +00:00
Robert
c8abbce0a2 Merge branch 'main' into robertbrignull/external-token-option 2021-01-14 17:27:33 +00:00
Robin Neatherway
3d63fa4dad Merge pull request #361 from github/rneatherway/status-base
Correct typo in setting of PR upload base ref
2021-01-14 10:28:34 +00:00
Simon Engledew
0853901c0d Fix overzealous warning when PR scanning is not required 2021-01-13 12:28:24 +00:00
Robin Neatherway
369cad8272 Use the fully qualified ref name 2021-01-13 12:16:10 +00:00
Robin Neatherway
9ace6974f2 Merge pr-check and integration-testing workflows
These had some minor overlap checking that the JS is up to date and
there isn't any benefit in having them separate as the jobs are run in
parallel anyway.
2021-01-13 12:10:34 +00:00
Robin Neatherway
884ee1d129 Correct typo in setting upload base ref 2021-01-13 12:00:33 +00:00
Robin Neatherway
a7f3c648eb Update test to check base ref/sha values 2021-01-13 11:57:55 +00:00
Robert
087e7a3a1a Merge pull request #360 from github/robertbrignull/preload_tracer_env_var
Output path to preload_tracer in env file
2021-01-13 10:15:31 +00:00
Robert
97a70e6013 include missing changes 2021-01-12 12:09:22 +00:00
Robert
90d1a31dd4 Introduce external repository token 2021-01-12 12:07:03 +00:00
Robert
70733e4ae5 add call operator 2021-01-12 11:44:25 +00:00
Robert
a432f684f7 Use CODEQL_RUNNER env var in integration tests 2021-01-12 11:29:42 +00:00
Robert
2f9814894f Add tests of CODEQL_RUNNER env var 2021-01-12 11:29:30 +00:00
Robert
c796788c33 move CODEQL_RUNNER population to tracer-config.ts 2021-01-12 10:49:08 +00:00
Robert
cd2eafc8e3 switch to using runner instead of preload_tracer 2021-01-12 10:43:06 +00:00
Robert
5a03a14bfb use CODEQL_PLATFORM 2021-01-12 10:24:25 +00:00
Robert
dbd8007298 Output path to preload_tracer 2021-01-11 11:15:53 +00:00
Robert
32a206ea17 Merge pull request #359 from github/update-v1-a0c4707d
Merge main into v1
2021-01-11 10:11:38 +00:00
Sam Partington
a0c4707dcc Merge pull request #323 from github/split-upload-method
Split upload method into two mode-specific ones
2021-01-06 12:02:34 +00:00
Sam Partington
c7275a75ce Don't re-retrieve GitHub version when already have it
54e0c67332 (r45693026)
54e0c67332 (r45693030)
2021-01-06 11:40:16 +00:00
Sam Partington
023add5df0 Fix linter violations 2021-01-06 11:19:50 +00:00
Sam Partington
4e46a490ae Merge branch 'main' into split-upload-method 2021-01-06 11:13:51 +00:00
Sam Partington
54e0c67332 Revert "Retrieve GitHubVersion when used rather than passing around"
This reverts commit 6de1b753c2.

https://github.com/github/codeql-action/pull/323#discussion_r551960301
2021-01-06 11:06:01 +00:00
Sam Partington
4bc186cf34 Move type definition to where it's used
https://github.com/github/codeql-action/pull/323#discussion_r551951925
2021-01-06 10:58:32 +00:00
Sam Partington
1da4ce5a03 Ensure stats get sent when not uploading results
https://github.com/github/codeql-action/pull/323#discussion_r551948732
2021-01-06 10:52:16 +00:00
Robert
20d8f91819 Merge pull request #358 from github/robertbrignull/recursive_sarif_test
Add test of finding SARIF files recursively
2021-01-04 15:34:11 +00:00
Robert
3792ed8ceb Merge branch 'main' into robertbrignull/recursive_sarif_test 2021-01-04 15:15:44 +00:00
Simon Engledew
b1e0b46970 Merge pull request #348 from github/simon-engledew/checkout-wrong-heads
Only report the first CheckoutWrongHead lint error
2021-01-04 14:19:05 +00:00
Simon Engledew
034bf318b8 Merge branch 'main' into simon-engledew/checkout-wrong-heads 2021-01-04 13:37:11 +00:00
Robert
bd4e3adfd9 Add test of finding SARIF files recursively 2021-01-04 13:12:30 +00:00
Robert
230cb9b734 Merge pull request #352 from chao2zhang/main
Support find .sarif files recursively
2021-01-04 12:58:36 +00:00
Simon Engledew
456cd431ff Improve test coverage 2021-01-04 12:05:37 +00:00
Simon Engledew
1511db33b3 Only check the steps of the job currently being run 2021-01-04 12:00:15 +00:00
Chris Gavin
bb9d573cf9 Merge pull request #354 from github/update-v1-094554cf
Merge main into v1
2021-01-04 11:10:06 +00:00
Chao Zhang
55eae6652f Support find .sarif files recursively 2020-12-22 23:24:51 -08:00
Chris Gavin
c2dc86575a Merge pull request #350 from github/prevent-accidental-analysis-of-get-pip-v1
Prevent accidental analysis of the `get-pip.py` script. [v1 cherry-pick]
2020-12-22 15:12:10 +00:00
Chris Gavin
094554cf89 Merge pull request #349 from github/prevent-accidental-analysis-of-get-pip
Prevent accidental analysis of the `get-pip.py` script.
2020-12-22 14:48:15 +00:00
Chris Gavin
b8f3d839cc Prevent accidental analysis of the get-pip.py script. 2020-12-22 14:36:09 +00:00
Chris Gavin
3c494fdd7a Prevent accidental analysis of the get-pip.py script. 2020-12-22 14:16:57 +00:00
Sam Partington
6de1b753c2 Retrieve GitHubVersion when used rather than passing around 2020-12-22 11:49:42 +00:00
Sam Partington
45dd5ee97d Fix linter violations 2020-12-22 11:28:08 +00:00
Sam Partington
82a8fa443e Merge branch 'main' into split-upload-method 2020-12-22 11:23:49 +00:00
Simon Engledew
e89a24b8cb Only report the first CheckoutWrongHead lint error 2020-12-21 11:08:49 +00:00
Simon Engledew
dc999c55d0 Merge pull request #346 from github/simon-engledew/fix-numerical-branches
Fix for numerical branch names
2020-12-21 09:17:09 +00:00
Simon Engledew
2d00e8c6f7 Fix for numerical branch names 2020-12-18 10:23:46 +00:00
Robin Neatherway
9f7bdecc04 Merge pull request #341 from github/rneatherway/gate-integration-testing
Gate execution of expensive tests on JS being up to date
2020-12-16 11:06:41 +00:00
Robin Neatherway
cea5932aad Merge branch 'main' into rneatherway/gate-integration-testing 2020-12-15 18:16:25 +00:00
Chris Gavin
4d262138e1 Merge pull request #345 from github/update-v1-8cbc02a4
Merge main into v1
2020-12-14 11:42:02 +00:00
Robert
cbd120ea91 Merge pull request #343 from github/dependabot/npm_and_yarn/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2020-12-14 10:42:35 +00:00
Robert
71c7759fac update node_modules 2020-12-14 10:25:05 +00:00
Robert
9435055597 Merge branch 'main' into dependabot/npm_and_yarn/ini-1.3.8 2020-12-14 10:24:17 +00:00
Robert
5d77983efc Merge pull request #344 from github/dependabot/npm_and_yarn/runner/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8 in /runner
2020-12-14 10:23:46 +00:00
dependabot[bot]
1fd28a0d4c Bump ini from 1.3.5 to 1.3.8 in /runner
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-13 05:06:37 +00:00
dependabot[bot]
46c74bba1d Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-12 17:32:00 +00:00
Robin Neatherway
3e176f8293 Gate execution of expensive tests on JS being up to date 2020-12-08 16:53:35 +00:00
Chris Gavin
8cbc02a4c2 Merge pull request #339 from github/split-python2-python3-install
Install Python 3 tools before installing Python 2 tools.
2020-12-07 15:55:57 +00:00
Chris Gavin
222b57e35b Merge branch 'main' into split-python2-python3-install 2020-12-07 14:40:04 +00:00
Chris Gavin
6156eb9557 Install Python 3 tools before installing Python 2 tools. 2020-12-07 13:59:49 +00:00
Robin Neatherway
682158920d Merge pull request #329 from github/robertbrignull/meta
Send base_sha and base_ref when appropriate
2020-12-07 12:47:11 +00:00
Robin Neatherway
7afd3334e3 Adjust type annotations on payload 2020-12-07 12:35:48 +00:00
Robin Neatherway
d0d858c809 Merge branch 'main' into robertbrignull/meta 2020-12-07 12:34:21 +00:00
Robert
049e10c079 Merge pull request #338 from github/update-v1-494945f7
Merge main into v1
2020-12-07 09:51:43 +00:00
Robert
494945f710 Merge pull request #337 from github/robertbrignull/merge-v1
Merge v1 into main to fix conflicts
2020-12-04 17:01:18 +00:00
Robert
e9152c326e Merge remote-tracking branch 'origin/v1' into robertbrignull/merge-v1 2020-12-04 16:44:17 +00:00
Simon Engledew
a43ce966aa Merge pull request #332 from github/simon-engledew/string-branches
Handle the case where branches may be strings, wildcards
2020-12-04 16:27:00 +00:00
Simon Engledew
18c6a7d6d1 fix another edge case 2020-12-04 15:18:22 +00:00
Simon Engledew
1dc40ba165 Merge remote-tracking branch 'origin/main' into simon-engledew/string-branches 2020-12-04 12:36:42 +00:00
Simon Engledew
7100f22932 Add a bunch of tests cases and harden the function aganst malformed workflows 2020-12-03 13:41:55 +00:00
Simon Engledew
7310a508e1 Merge pull request #335 from github/simon-engledew/backport-v1
Backport v1 into main
2020-12-02 16:54:52 +00:00
Simon Engledew
f3c9aee686 Hide an warning that is confusing on GHES 2020-12-02 16:49:54 +00:00
Simon Engledew
107fe8422f Add advanced test case 2020-12-02 08:48:34 +00:00
Simon Engledew
ec8015bc03 Merge branch 'main' into simon-engledew/string-branches 2020-12-02 08:35:11 +00:00
Simon Engledew
78b9d23d09 Remove unecessary if statement 2020-12-02 08:34:18 +00:00
Simon Engledew
1dd265aef3 Merge pull request #333 from github/simon-engledew/hide-warnings-v1
Hide a warning that is confusing on GHES
2020-12-02 08:31:48 +00:00
Simon Engledew
698e2a5487 Just convert the pattern into a RegExp... 2020-12-01 20:56:07 +00:00
Simon Engledew
4d862616ce First iteration on feedback 2020-12-01 20:08:41 +00:00
Simon Engledew
56b1ead679 Do not show lint failed in the UX if it happens 2020-12-01 17:23:00 +00:00
Simon Engledew
b1be00db57 Test the branch patterns work both ways 2020-12-01 17:16:33 +00:00
Simon Engledew
c3a9325bd8 Hide an warning that is confusing on GHES 2020-12-01 16:59:15 +00:00
Simon Engledew
f99af1c014 Have a catch all coded error for lint failures 2020-12-01 15:41:04 +00:00
Simon Engledew
145a3c1ed9 Add more wildcard examples 2020-12-01 15:33:27 +00:00
Simon Engledew
14719432ef Add more test cases 2020-12-01 15:30:11 +00:00
Simon Engledew
c8ee1f4ef3 Handle wildcard branches 2020-12-01 15:21:30 +00:00
Simon Engledew
ac1c081de8 Handle the case where branches may be strings, including "*" 2020-12-01 12:03:50 +00:00
Robin Neatherway
e6174fc6cf Merge pull request #326 from github/rneatherway/on-push-notice
Add an explicit deprecation date
2020-12-01 11:28:15 +00:00
Robin Neatherway
1010b1f743 Merge branch 'main' into rneatherway/on-push-notice 2020-12-01 11:12:14 +00:00
Robin Neatherway
8e0e34a3e6 Add an explicit deprecation date
So that we can remove support for the beta configuration of
`on: push`-only we should communicate a date after which this
will not work.
2020-12-01 11:10:20 +00:00
Chris Gavin
f65e6c40fa Merge pull request #330 from github/check-files-on-release
Add a check to ensure expected CodeQL release files exist.
2020-12-01 10:56:58 +00:00
Chris Gavin
fb2a3bf840 Add a check to ensure expected CodeQL release files exist. 2020-12-01 09:26:05 +00:00
Robin Neatherway
d99e994194 Fix test to be immune to running on Actions 2020-11-30 18:35:55 +00:00
Robin Neatherway
836cbe0784 Remove output files for deleted source 2020-11-30 18:31:21 +00:00
Robin Neatherway
9de6863c74 Correct base ref to include prefix 2020-11-30 18:30:02 +00:00
Robin Neatherway
dff118f7ad Use version information to construct payload 2020-11-30 16:45:18 +00:00
Robert
c6dbd5a9bf Merge pull request #324 from github/robertbrignull/go_autobuild
Test Go autobuild
2020-11-30 13:00:21 +00:00
Robert
32878b75b8 Merge branch 'main' into robertbrignull/go_autobuild 2020-11-30 12:47:38 +00:00
Robert
b1fd75309c Update .github/workflows/integration-testing.yml
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
2020-11-30 12:28:26 +00:00
Chris Gavin
90e780524b Merge pull request #325 from github/update-bundle
Update the default bundle to `codeql-bundle-20201127`.
2020-11-30 10:49:56 +00:00
Chris Gavin
1110f7be49 Merge branch 'main' into update-bundle 2020-11-30 10:30:59 +00:00
Robin Neatherway
d73e5cefb0 Merge pull request #327 from github/rneatherway-patch-1
Only analyze PRs against main and v1
2020-11-30 10:18:36 +00:00
Robin Neatherway
38ed96450e Only analyze PRs against main and v1
We can only analyze PRs against those branches we are analyzing on push.
2020-11-27 17:37:32 +00:00
Sam Partington
ff28c8d403 Move uploading side-effect out of runAnalyze
https://github.com/github/codeql-action/pull/323#discussion_r530978010
2020-11-27 12:27:10 +00:00
Chris Gavin
0c33f016fa Update the default bundle to codeql-bundle-20201127. 2020-11-27 12:04:35 +00:00
Robert
7174a81563 test Go autobuild 2020-11-27 11:34:02 +00:00
Robert
81a21bfa1e Request meta endpoint at the start of execution 2020-11-26 17:54:46 +00:00
Simon Engledew
8d18e347a7 Merge pull request #319 from github/simon-engledew/lint-workspace
Validate the codeql-action workspace for common errors
2020-11-26 16:36:46 +00:00
Simon Engledew
92df38732c Merge branch 'main' into simon-engledew/lint-workspace 2020-11-26 15:22:22 +00:00
Simon Engledew
be09fb3e99 Implement feedback 2020-11-26 15:20:38 +00:00
Robert
7d74882aaf Merge pull request #321 from ericcornelissen/eslint/github-no-then
Update code so "github/no-then" passes
2020-11-26 14:35:51 +00:00
Sam Partington
9532bda6e4 Use better comparison operator 2020-11-26 11:57:34 +00:00
Sam Partington
57514f31db Split upload method into two mode-specific ones 2020-11-26 11:50:57 +00:00
Sam Partington
7ae9b0db35 Extract filepath retrieval to a method 2020-11-26 11:18:00 +00:00
Eric Cornelissen
e6ea8cbae0 Run npm run build 2020-11-25 22:46:30 +01:00
Eric Cornelissen
cd727934bf Update source so github/no-then passes 2020-11-25 22:45:53 +01:00
Eric Cornelissen
35fd0a93b1 Update ESLint configuration
Remove the line to disable the "github/no-then"  rule.
2020-11-25 22:44:45 +01:00
Simon Engledew
378f1f95d7 Merge pull request #320 from github/simon-engledew/fix-DEP0005-buffer
Fix deprecated method Buffer.new
2020-11-25 16:25:07 +00:00
Simon Engledew
eed314143b Add paths-ignore case 2020-11-25 14:23:21 +00:00
Simon Engledew
253d46ac97 Better copy for PathsSpecified, suggested by @sampart 2020-11-25 13:30:32 +00:00
Simon Engledew
c5f58f3ee7 Markdown is not supported - roll back and fix typo 2020-11-25 13:06:51 +00:00
Simon Engledew
94b10dbb8f See if markdown is supported 2020-11-25 12:46:37 +00:00
Simon Engledew
85aefe5fa4 Signpost the latest documentation in the warning 2020-11-25 12:45:13 +00:00
Simon Engledew
582f792089 Fix deprecated method Buffer.new 2020-11-25 12:38:45 +00:00
Simon Engledew
8d468d67de Improve linting hints 2020-11-25 12:36:59 +00:00
Simon Engledew
c06dcf8fa2 Update source 2020-11-25 11:03:48 +00:00
Simon Engledew
cb3b3a8cb5 Comment the lint cases to make maintaining easier 2020-11-25 10:55:06 +00:00
Simon Engledew
92ffb08081 Tidy up ready for review 2020-11-24 17:21:25 +00:00
Simon Engledew
1020df5700 Merge branch 'main' into simon-engledew/lint-workspace 2020-11-24 14:55:54 +00:00
Simon Engledew
fd16298746 Revert an accidental change to make testing quicker 2020-11-24 14:28:08 +00:00
Simon Engledew
2ac22e8935 Send short codes that do not need URL encoding for better splunk tracing 2020-11-24 12:43:08 +00:00
Sam Partington
27520b94c4 Merge pull request #318 from github/api-param-object
Introduce parameter object for API params that travel together
2020-11-24 12:10:47 +00:00
Sam Partington
3ee4739b13 Make anonymous objects into variables for readability 2020-11-24 11:23:53 +00:00
Sam Partington
ab9b1a72db Fix tests
Previously, most tests were using https://github.com and only the first was using https://github.example.com. As it happens, https://github.com works for all of them.
2020-11-24 11:10:25 +00:00
Simon Engledew
6df1fc5e38 Do not fail if the workflow has been deleted 2020-11-24 10:51:31 +00:00
Simon Engledew
754f502a84 Workflow triggers are null if unspecified 2020-11-24 10:25:58 +00:00
Simon Engledew
c0bd7b0b2b Handle relative workflow paths 2020-11-24 09:56:10 +00:00
Simon Engledew
33bb87523e Write a warning if there is an error with the workflow 2020-11-24 09:51:00 +00:00
Simon Engledew
7eb9dfcc60 Add a function that can lint a CodeQL action workflow 2020-11-23 17:29:19 +00:00
Sam Partington
20567b5888 Introduce parameter object for API params that travel together 2020-11-23 14:39:01 +00:00
David Verdeguer
4dcb3202d8 Merge pull request #317 from github/update-v1-b15854c9
Merge main into v1
2020-11-23 15:01:13 +01:00
David Verdeguer
b15854c9af Merge pull request #316 from The-Compiler/patch-1
Make sure a Python 2 pip is installed
2020-11-20 17:28:05 +01:00
Florian Bruhin
b168eee469 Make sure a Python 2 pip is installed
In the README of this repo, it's suggested to use the `ubuntu-latest` environment.
That environment will soon be upgraded to Ubuntu 20.04: https://github.com/actions/virtual-environments/issues/1816

As pointed out in that issue, the updated image comes without a Python 2 pip preinstalled:

    Setup Python dependencies
    /home/runner/work/_actions/github/codeql-action/v1/python-setup/install_tools.sh
    [...]
      + python2 -m pip install --user --upgrade pip setuptools wheel
      /usr/bin/python2: No module named pip
    Warning: Unable to download and extract the tools needed for installing the python dependecies. You can call this action with 'setup-python-dependencies: false' to disable this process.
2020-11-20 16:48:43 +01:00
Chris Gavin
7589c051a9 Merge pull request #313 from github/query-binary-planting
Add a query to detect binary planting vulnerabilities.
2020-11-20 15:25:01 +00:00
Chris Gavin
f5e028fd83 Merge branch 'main' into query-binary-planting 2020-11-20 15:04:10 +00:00
Robert
c4b7211148 Merge pull request #311 from ericcornelissen/fix-typos
Fix typos in source code, logging, comments, and config files
2020-11-20 13:42:37 +00:00
Eric Cornelissen
6aaf0483f0 Merge branch 'main' into fix-typos 2020-11-20 14:32:12 +01:00
Chris Gavin
c5d599ecb2 Merge pull request #310 from ericcornelissen/eslint-rule/no-shadow
Update code so "no-shadow" passes
2020-11-20 13:23:13 +00:00
Eric Cornelissen
6ed5c82bb9 Merge branch 'main' into fix-typos 2020-11-20 13:59:16 +01:00
Eric Cornelissen
82ba92f462 Update spelling for autobuild to auto-built 2020-11-20 13:58:20 +01:00
Chris Gavin
7091b81414 Merge branch 'main' into eslint-rule/no-shadow 2020-11-20 12:44:18 +00:00
Chris Gavin
6d232b4ec8 Merge pull request #314 from github/skip-integration-tests-prs-from-forks
Skip Runner integration tests on pull requests from forks.
2020-11-20 12:27:46 +00:00
Chris Gavin
b59d204bbe Merge branch 'main' into skip-integration-tests-prs-from-forks 2020-11-20 12:18:45 +00:00
Chris Gavin
0a05e95b52 Merge pull request #312 from ericcornelissen/fix-minor-code-mistakes
Two minor code fixes
2020-11-20 11:48:19 +00:00
Chris Gavin
fd36bec497 Skip Runner integration tests on pull requests from forks. 2020-11-20 11:47:43 +00:00
Chris Gavin
a04d948b04 Merge branch 'main' into fix-minor-code-mistakes 2020-11-20 11:37:27 +00:00
Chris Gavin
b03b9fe641 Add a query to detect binary planting vulnerabilities. 2020-11-20 11:34:33 +00:00
Eric Cornelissen
35b050652a Run npm run build 2020-11-20 11:48:25 +01:00
Simon Engledew
31872f129b Merge pull request #308 from github/simon-engledew/fast-fail
Abort CodeQL action if the status cannot be reported
2020-11-20 10:45:40 +00:00
Eric Cornelissen
5416d4f3b5 Run npm run build 2020-11-20 11:35:59 +01:00
Eric Cornelissen
cf8c79ca35 Fix unused sorted value in update-release-branch
Fix a minor issue in the update-release-branch.py script that performs a
call to `sorted` but doesn't use the output. Since `sorted` does not
operate in place, the call is currently useless. As a result, the function
`get_pr_for_commit` does not currently work as exected. I.e. it is
expected to return the "first" (i.e. lowest PR number), but actually it
returns the first in the list provided by GitHub.
2020-11-20 11:20:45 +01:00
Eric Cornelissen
4e8634c29c Remove duplicate statement in tracer-config test
The tracer-config.test.js file contained a duplicate of the statement:

  process.env["SEMMLE_DEPTRACE_SOCKET"] = "abc";

one line apart. This removes the second instance of this statement.
2020-11-20 11:14:08 +01:00
Eric Cornelissen
512c07d9a3 Fix typos in Action config files 2020-11-20 11:11:17 +01:00
Eric Cornelissen
85ea24bd20 Fix typos in src
- Rename "toolrunnner" (three 'n') to "toolrunner"
- Rename "relativeFilepaht" to "relativeFilepath"
- Fix various typos in documentation & comments
- Fix typos in logs and test names
2020-11-20 11:00:55 +01:00
Simon Engledew
6a45994b42 Merge branch 'main' into simon-engledew/fast-fail 2020-11-20 09:21:26 +00:00
Eric Cornelissen
992a0cf8f2 Merge branch 'main' into eslint-rule/no-shadow 2020-11-19 23:41:11 +01:00
Eric Cornelissen
847f4ef293 Run npm run build 2020-11-19 23:03:45 +01:00
Eric Cornelissen
483c94b974 Fix no shadow issues in upload-lib.ts
Rename one instance of "path"  to avoid shadowing.
2020-11-19 22:54:48 +01:00
Eric Cornelissen
74559947b1 Fix no shadow issues in fingerprints.ts
Rename various instances of "hash", shadowing the function with that
name.
2020-11-19 22:54:05 +01:00
Eric Cornelissen
ffe94681e4 Fix no shadow issues in fingerprints.test.ts
Rename shadowing "uri" argument to the more explicit "artifactURI".
2020-11-19 22:51:29 +01:00
Eric Cornelissen
2a2910e693 Fix no shadow issues in config-utils.ts
Rename throwaway variable "suite" to "found" when assigned from "find".

Rename local variable "path" to "newPath" as it is a modification of
the "originalPath" provided to `validateAndSanitisePath`.

Rename instances of "path" to more explicit varients "ignorePath" and
"includePath". Maybe "ignoredPath" and "includedPath" are better names?
2020-11-19 22:50:02 +01:00
Eric Cornelissen
06e99f1523 Fix no shadow issues in config-utils.test.ts
Rename "queries" variable in test cases to "testQueries" to avoid
shadowing it in a subsequent helper function call (4 times).

Rename "path" twice in a hlper function to "validPath" and "invalidPath"
to avoid shadowing "path". The new names are more explicit.
2020-11-19 22:47:32 +01:00
Eric Cornelissen
98ad63b240 Fix no shadow issues in codeql.ts
Two simple variable renames from "path" to "paths" since the types are
arrays of strings (not just one string).

One function definition inside a function moved outside that function
to avoid shadowing the "options" argument.
2020-11-19 22:45:15 +01:00
Eric Cornelissen
b54c2aab11 Fix no shadow issues in api-client.ts
Duplicate use of "_" placeholder argument name. This change may conflict
with #192.
2020-11-19 22:42:13 +01:00
Eric Cornelissen
22f779c5e6 Update ESLint configuration
Remove the "no-shadow": "off" override and replace it by enabling
"@typescript-eslint/no-shadow" in the "rules" section, following the
typescript-eslint docs:
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md#how-to-use
2020-11-19 22:38:38 +01:00
Robert
aafb457527 Merge pull request #222 from github/robertbrignull/go_build_trace
Check CODEQL_EXTRACTOR_GO_TRACE and treat Go as a traced language
2020-11-19 18:01:53 +00:00
Robert
0b0bc35050 Merge branch 'main' into robertbrignull/go_build_trace 2020-11-19 17:20:54 +00:00
Simon Engledew
eb4226ede4 Scanning endpoint failures should not halt the scan 2020-11-19 15:49:46 +00:00
Simon Engledew
7fda765d49 Merge remote-tracking branch 'origin/main' into simon-engledew/fast-fail 2020-11-19 13:55:47 +00:00
Chris Gavin
0924fb6b26 Merge pull request #309 from github/safe-which
Ensure unqualified program names are present on `PATH` before executing them.
2020-11-19 13:52:57 +00:00
Simon Engledew
17d4671d60 Fail processing on a 422 as well
Until there is a more robust versioning system it is probably safest to require endpoint compatiblity and not continue the action if there is a mismatch.
2020-11-19 13:14:45 +00:00
Simon Engledew
f3ff4c84ba Implement review feedback 2020-11-19 12:39:57 +00:00
Chris Gavin
726cfc8441 Ensure unqualified program names are present on PATH before executing them. 2020-11-18 22:20:13 +00:00
Simon Engledew
68dedeaa57 Do not run CodeQL if code scanning is not enabled
Put more fine grained logic around which errors we ignore and process.
Re-instate status reporting in Enterprise.
Abort the code scanning process the status endpoint reports it is not configured.
2020-11-18 17:21:57 +00:00
Robert
dc80b016b6 Merge pull request #301 from github/robertbrignull/tools_version
Send action ref and tool version in status reports
2020-11-18 11:38:26 +00:00
Robert
0d960df08a Merge branch 'main' into robertbrignull/tools_version 2020-11-18 11:25:46 +00:00
Chris Gavin
10b43b815a Merge pull request #231 from github/add-multi-cause-markdown-flag
Enable the CodeQL SARIF multi-cause markdown flag.
2020-11-18 08:39:30 +00:00
Chris Gavin
f94e06a382 Merge main into add-multi-cause-markdown-flag. 2020-11-18 08:26:39 +00:00
Robert
577fc451dd Merge pull request #306 from github/update-v1-d4eb1e36
Merge main into v1
2020-11-16 12:03:04 +00:00
Robert
d4eb1e36af Merge pull request #302 from github/robertbrignull/no_tracing
Don't use the word "trace" in log messages
2020-11-13 15:27:37 +00:00
Robert
54c857ce0a update build command 2020-11-13 15:15:58 +00:00
Robert
3f2a7abc7b change voicing 2020-11-13 15:04:54 +00:00
Robert
e3a9a7a91c Update init/action.yml
Co-authored-by: Sam Partington <sampart@github.com>
2020-11-13 12:51:25 +00:00
Robert
4d8912d269 Don't use the word "trace" in log messages 2020-11-13 12:01:07 +00:00
Robert
af27146b64 Merge branch 'main' into robertbrignull/go_build_trace 2020-11-13 10:24:37 +00:00
Robert
1737b806ff check if running locally 2020-11-12 14:18:58 +00:00
Robert
80b43ca9d3 send action ref and tool version in status reports 2020-11-12 12:27:31 +00:00
Robert
acacf9bbd5 Merge pull request #299 from github/azure_pipelines
Detect Agent.Worker.exe
2020-11-11 10:28:25 +00:00
Robert
9a7b7cb035 Merge branch 'main' into azure_pipelines 2020-11-11 10:12:56 +00:00
Chris Gavin
fdb0d486b6 Merge pull request #298 from github/use-github-action-repository-variable
Make use of the `GITHUB_ACTION_REPOSITORY` environment variable if it is set.
2020-11-10 18:13:50 +00:00
Chris Gavin
241fca876b Merge branch 'main' into use-github-action-repository-variable 2020-11-10 17:55:13 +00:00
Robert
aae4713a4d detect Agent.Worker.exe 2020-11-10 16:16:58 +00:00
Robin Neatherway
d3285a0ea2 Merge pull request #297 from github/rneatherway-patch-1
Change suggested workflow to analyse merge commit
2020-11-10 14:46:28 +00:00
Chris Gavin
bf30ea69d6 Make use of the GITHUB_ACTION_REPOSITORY environment variable if it is set. 2020-11-10 13:30:20 +00:00
Robin Neatherway
988704e971 Change suggested workflow to analyse merge commit 2020-11-10 12:10:07 +00:00
Robert
409b71a3d0 Merge pull request #296 from 0xflotus/patch-1
fix: small typo in import-action-entrypoint.ql
2020-11-10 09:34:24 +00:00
0xflotus
1870040fac fix: small typo in import-action-entrypoint.ql 2020-11-10 00:38:46 +01:00
Robin Neatherway
1de54f1d3b Merge pull request #295 from github/main
Update v1 with new CodeQL bundle
2020-11-09 15:42:20 +00:00
Robin Neatherway
4b301bd34e Merge pull request #294 from github/rneatherway/bump-codeql-20201106
Update default CodeQL bundle version
2020-11-09 14:05:10 +00:00
Robin Neatherway
ab40235d88 Update default CodeQL bundle version 2020-11-09 13:00:43 +00:00
Simon Engledew
e3bfd25a41 Merge pull request #293 from github/update-v1-f13bd452
Merge main into v1
2020-11-09 10:22:41 +00:00
Simon Engledew
f13bd452d7 Merge pull request #291 from github/simon-engledew/output-codeql-path
Add a codeql-path output to the init action
2020-11-05 10:22:10 +00:00
Simon Engledew
f76124122e Remove output from README
As this is an advanced usage it makes more sense to work to getting this included in the documentation instead.
2020-11-05 08:31:35 +00:00
Simon Engledew
c87f3021d4 Expand readme to include codeql-path output example
Also add example from README into workflow to confirm it is accurate.
2020-11-04 19:35:19 +00:00
Simon Engledew
54f3e52e8f Move setOutput into try block in case it errors 2020-11-04 19:29:06 +00:00
Simon Engledew
ff6db59d5a Fix indentation for action output
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
2020-11-04 19:16:09 +00:00
Simon Engledew
77f914a4ba Add codeql-path to README (wip) 2020-11-04 17:22:32 +00:00
Simon Engledew
c213a7c7c9 Use codeql-path output in python-deps workflow 2020-11-04 17:22:32 +00:00
Simon Engledew
854109fe92 Report the path of CodeQL as an output 2020-11-04 15:38:31 +00:00
Simon Engledew
0ed3207eb5 Merge pull request #289 from github/simon-engledew/fix-act-local
Fix invalid API call when running locally
2020-11-04 14:30:51 +00:00
Simon Engledew
df843a2867 Merge branch 'main' into simon-engledew/fix-act-local 2020-11-04 12:47:38 +00:00
Robert
82e3812a35 Merge branch 'main' into robertbrignull/go_build_trace 2020-11-04 11:07:46 +00:00
Simon Engledew
1c8d72e0c2 Remove unnecessary env manipulation
testing-utils.ts / setupTests() already stores and restores the env
2020-11-04 10:59:35 +00:00
Simon Engledew
5c0e2f93f1 Fix invalid API call when running locally
The method getAnalysisKey would call getWorkflowPath and raise an API Error.

This change follows the pattern in prepareLocalRunEnvironment to set a dummy value for the required environment variable, therefore shortcutting the API request.
2020-11-04 09:58:09 +00:00
Chris Gavin
b6989db81e Merge pull request #288 from github/tweak-bump-supported-versions
Make a few small tweaks to the update-supported-enterprise-server-versions script.
2020-11-04 09:48:05 +00:00
Chris Gavin
813b5235a1 Merge branch 'main' into tweak-bump-supported-versions 2020-11-04 09:08:27 +00:00
Andrew Eisenberg
bc1ee1620f Add the --threads config option to finalize db (#281)
This flag is already being used for `runQueries`, so let's use it for
finalize as well.
2020-11-03 08:25:40 -08:00
Simon Engledew
a6c99e6b5b Merge pull request #287 from github/disable-gpgsign-in-tests
Disable gpg key signing in tests
2020-11-03 15:08:31 +00:00
Simon Engledew
d7bd6e39e3 Merge branch 'main' into disable-gpgsign-in-tests 2020-11-03 14:47:39 +00:00
Chris Gavin
4ffed2603e Only increase the newest supported release, never reduce it. 2020-11-03 13:58:07 +00:00
Chris Gavin
beac9d5621 Fix a copy and pasted job name. 2020-11-03 13:57:41 +00:00
Chris Gavin
1364a74a5d Merge pull request #285 from github/check-api-version
Log a warning if the API version is not supported.
2020-11-03 13:36:53 +00:00
Chris Gavin
b16110e60e Log the version warning a second time if a request fails unexpectedly. 2020-11-03 12:57:15 +00:00
Simon Engledew
efc3797e30 Disable gpg key signing in tests
This avoids a popup appearing if your GPG key has a passphrase and ensures the tests still pass even if GPG is misconfigured.
2020-11-03 11:05:49 +00:00
David Verdeguer
935dd4041f Merge pull request #286 from github/update-v1-9a0139ee
Merge main into v1
2020-11-03 11:27:07 +01:00
Chris Gavin
5e2fa08dae Merge main into check-api-version. 2020-11-02 09:02:05 +00:00
Chris Gavin
1a4385d516 Only log the version warning once on Actions even if the Action is invoked multiple times. 2020-11-02 09:01:36 +00:00
Chris Gavin
865b4bd832 Pass a logger in to getApiClient() rather than constructing one there. 2020-11-02 08:53:25 +00:00
Chris Gavin
1f7bae7ab8 Use an undefined check rather than hasOwnProperty. 2020-11-02 08:47:11 +00:00
Robert
9a0139eee2 Merge pull request #274 from github/jhutchings1-patch-1
Change to the latest support link
2020-10-30 17:51:26 +00:00
Robert
736f65db3e Merge branch 'main' into jhutchings1-patch-1 2020-10-30 17:28:53 +00:00
Robert Brignull
2e550bba7f Check CODEQL_EXTRACTOR_GO_BUILD_TRACING
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
2020-10-30 16:44:11 +00:00
Robert
7d5b76a81b Merge pull request #272 from sonicdoe/patch-1
Fix alignment of cron comment
2020-10-30 16:36:12 +00:00
Robert
fb10307267 Merge branch 'main' into patch-1 2020-10-30 16:24:53 +00:00
David Verdeguer
f0c568a42f Merge pull request #284 from github/daverlo/min-disk-free
Add min disk free flag to database analyze:
2020-10-30 16:17:54 +01:00
Chris Gavin
1220ae5bfd Log a warning if the API version is not supported. 2020-10-30 12:20:06 +00:00
David Verdeguer
04e7c3cfe7 Merge branch 'main' into daverlo/min-disk-free 2020-10-30 11:25:55 +01:00
David Verdeguer
7b571208e1 Merge pull request #280 from github/daverlo/update-codeql
Use codeql 20201028
2020-10-29 11:42:57 +01:00
David Verdeguer
d96ee1a48c Fix python tests 2020-10-28 16:31:15 +01:00
David Verdeguer
f46875dae9 Use codeql 20201028 2020-10-28 15:18:46 +01:00
David Verdeguer
253ef425f9 Merge pull request #279 from github/update-v1-46110c36
Merge main into v1
2020-10-28 11:38:54 +01:00
Chris Gavin
2d75893188 Enable the CodeQL SARIF multi-cause markdown flag. 2020-10-27 13:50:40 +00:00
David Verdeguer
46110c361b Merge pull request #278 from github/daverlo/setup-python-dependencies
Use setup-python-dependencies input
2020-10-27 14:36:20 +01:00
David Verdeguer
8db7d74c10 Merge branch 'main' into daverlo/setup-python-dependencies 2020-10-27 11:47:00 +01:00
Chris Gavin
abe6b7b085 Merge pull request #276 from github/fix-ci
Fix Python CI jobs.
2020-10-27 10:20:15 +00:00
David Verdeguer
4575212a76 Use setup-python-dependencies input 2020-10-27 10:06:17 +01:00
Chris Gavin
85c65cd6bf Always use the latest CodeQL in the Python dependencies tests. 2020-10-26 14:17:11 +00:00
Chris Gavin
65efaf83e9 Fix Python CI jobs. 2020-10-26 08:31:09 +00:00
Justin Hutchings
762078e765 Change to the latest support link
Support is recommending we redirect users to a new page for formal support requests.
2020-10-23 13:22:06 -07:00
Jakob Krigovsky
ea5ae18876 Fix alignment of cron comment 2020-10-22 18:29:58 +02:00
David Verdeguer
fb7d0f72e5 Merge pull request #270 from github/daverlo/python-mac
Port python deps setup to mac
2020-10-22 15:09:38 +02:00
David Verdeguer
e23b3ef342 Merge branch 'main' into daverlo/python-mac 2020-10-22 14:01:07 +02:00
David Verdeguer
bf20a55f26 Combine python deps tests workflows 2020-10-22 14:00:51 +02:00
David Verdeguer
badb2863db Merge pull request #271 from github/daverlo/fail-analyze
Fail the analyze action when some language fails to run the queries
2020-10-22 12:28:37 +02:00
David Verdeguer
d6287621f6 Fail the analyze action when some language fails to run the queries 2020-10-22 10:22:27 +02:00
Robin Neatherway
6ac5978b44 Merge pull request #266 from github/robertbrignull/runner_workflow
Add a workflow to build and upload the runner
2020-10-21 10:17:00 +01:00
Robin Neatherway
59913e8e05 Merge remote-tracking branch 'origin/robertbrignull/runner_workflow' into robertbrignull/runner_workflow 2020-10-20 15:04:56 +01:00
Robin Neatherway
269b8b9bae Update for review comments 2020-10-20 15:04:04 +01:00
Robin Neatherway
b6e9407b12 Merge branch 'main' into robertbrignull/runner_workflow 2020-10-20 11:59:11 +01:00
Robin Neatherway
c1e2c53b95 Remove push trigger now that I've tested it works 2020-10-20 11:58:20 +01:00
Robin Neatherway
d91d2d2873 Upload the runner to the release directly 2020-10-20 11:00:00 +01:00
David Verdeguer
1c789715a7 Address comments 2020-10-20 10:49:48 +02:00
Robin Neatherway
7507a5a9b1 Merge pull request #269 from github/update-v1-c8b8c041
Merge main into v1
2020-10-19 12:38:26 +01:00
David Verdeguer
ce8418a2ed Only run tests on main and v1 2020-10-19 13:08:20 +02:00
David Verdeguer
2391771a3f Allow installing python deps on mac 2020-10-19 12:45:33 +02:00
David Verdeguer
04f2f600bc Adapt true for mac 2020-10-19 12:36:34 +02:00
David Verdeguer
8e516b1d36 Run tests 2020-10-19 12:21:58 +02:00
David Verdeguer
c860191a1a Run python deps tests on mac 2020-10-19 12:21:21 +02:00
David Verdeguer
c8b8c0415e Merge pull request #257 from github/daverlo/python-windows
Port python deps setup to windows
2020-10-15 14:48:25 +02:00
David Verdeguer
e0f78380e3 Merge branch 'main' into daverlo/python-windows 2020-10-15 12:12:50 +02:00
David Verdeguer
a41d1bd815 Merge pull request #261 from github/rasmuswl/python-update-setenv
Don't use ::set-env in python-setup
2020-10-15 11:59:37 +02:00
David Verdeguer
7d1f309c39 Address comments 2020-10-15 11:56:40 +02:00
Rasmus Wriedt Larsen
bc72944cba Merge branch 'main' into rasmuswl/python-update-setenv 2020-10-15 10:37:45 +02:00
David Verdeguer
2c3dafc162 Use sys.executable 2020-10-14 10:54:41 +02:00
Robert
3f8927dbc5 Merge pull request #259 from andymckay/patch-1
Change time in template
2020-10-13 17:20:16 +01:00
Robert
345bcba3ea Merge branch 'main' into patch-1 2020-10-13 16:47:00 +01:00
David Verdeguer
e63596efd3 Merge branch 'main' into daverlo/python-windows 2020-10-13 17:44:16 +02:00
David Verdeguer
0d97ea8f14 Call pipenv and poetry through python 2020-10-13 17:38:53 +02:00
Robin Neatherway
cdfffe8ff7 Merge pull request #264 from github/rneatherway-patch-1
Start analysing merge commit for PRs
2020-10-13 15:11:55 +01:00
Robin Neatherway
f813ad0ce2 Merge branch 'main' into rneatherway-patch-1 2020-10-13 14:26:01 +01:00
Robin Neatherway
bc196131af Merge pull request #260 from github/rneatherway/codeql-bundle-20201008
Update default CodeQL version to codeql-bundle-20201008
2020-10-13 11:14:48 +01:00
Robert Brignull
ffaa8aa197 add workflow to build runner 2020-10-13 10:56:07 +01:00
Robin Neatherway
f79717f3c3 Start analysing merge commit for PRs 2020-10-13 10:19:15 +01:00
Rasmus Wriedt Larsen
64ebf10c1d Don't use ::set-env in python-setup
Is now deprecated as described in
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-10-08 16:12:40 +02:00
David Verdeguer
72e430fc65 Merge branch 'main' into daverlo/python-windows 2020-10-08 15:53:50 +02:00
Robin Neatherway
2da5fbf0d4 Update default CodeQL version to codeql-bundle-20201008 2020-10-08 14:48:20 +01:00
David Verdeguer
9bc8c56ef0 Add missing [ 2020-10-08 12:17:28 +02:00
David Verdeguer
e3d2d4afc4 Add call to py 2020-10-08 12:14:41 +02:00
David Verdeguer
735ec7d414 Add powershell to call 2020-10-08 12:06:29 +02:00
David Verdeguer
424a9cfa1c Apply suggestions from code review
Co-authored-by: Arthur Baars <aibaars@github.com>
2020-10-08 11:59:35 +02:00
Andy McKay
da5edaf1b4 Change time in template
This template proposes a time which is our peak load for Actions, would this time work better for our customers? Fixes https://github.com/github/codeql-action/issues/258
2020-10-07 09:59:53 -07:00
Marco Gario
4a270064ab Merge pull request #256 from github/update-v1-b1e2c9b8
Merge main into v1
2020-10-07 13:31:57 +02:00
David Verdeguer
e97bdbdfac Combine auto_install scripts 2020-10-07 12:55:02 +02:00
David Verdeguer
526dac0f91 Only run tests on main and v1 2020-10-06 14:47:20 +02:00
David Verdeguer
0f2fa46e3c Update installPythonDeps for windows 2020-10-06 14:37:35 +02:00
David Verdeguer
2748e6c5c1 Update python-deps-windows test_dir paths 2020-10-06 14:21:10 +02:00
David Verdeguer
74afd3c373 Port python deps setup to windows 2020-10-06 14:14:12 +02:00
David Verdeguer
b1e2c9b8bd Merge pull request #255 from github/daverlo/guard-python
Guard python deps install
2020-10-06 12:38:40 +02:00
David Verdeguer
d81cc671c0 Guard python deps install 2020-10-06 11:30:05 +02:00
Robert
3630a78d1a Merge pull request #235 from github/robertbrignull/subdomain
Make URL parsing more robust, and handle subdomain isolation
2020-10-05 17:53:43 +01:00
Robert Brignull
b185050563 Use GITHUB_DOTCOM_URL so URL deduplication works 2020-10-05 16:44:43 +01:00
Chris Raynor
5dc2db0028 Merge pull request #252 from github/update-v1-a1fc3a5e
Merge main into v1
2020-10-05 16:29:49 +01:00
Robert Brignull
28a5b954e7 Merge branch 'main' into robertbrignull/subdomain 2020-10-05 13:36:12 +01:00
Chris Gavin
5cdfcab4d4 Merge pull request #236 from github/ignore-temp-dir
Exclude the temporary directory from scanning.
2020-10-05 13:07:02 +01:00
Chris Gavin
11c1460003 Run npm run lint-fix. 2020-10-05 12:44:58 +01:00
Chris Gavin
14192f8248 Merge branch 'main' into ignore-temp-dir 2020-10-05 12:41:49 +01:00
Chris Raynor
d0afe926eb Merge pull request #238 from github/cbraynor/fix201
Resolve violations of import/no-extraneous-dependencies lint
2020-10-05 10:43:32 +01:00
Chris Raynor
0907cd5a41 Merge branch 'main' into cbraynor/fix201 2020-10-05 10:35:27 +01:00
David Verdeguer
a1fc3a5e79 Merge pull request #155 from github/daverlo/python
Python deps setup
2020-10-05 08:34:05 +02:00
David Verdeguer
55eb02cb0a Merge branch 'main' into daverlo/python 2020-10-05 08:05:16 +02:00
David Verdeguer
4ce302bdb9 Use find in python-des tests 2020-10-05 00:04:20 +02:00
Chris Raynor
1a91a0716f Merge pull request #242 from thaJeztah/cron_hint
README: document cron fields in example
2020-10-04 11:26:53 +01:00
Chris Raynor
319881ca28 Merge branch 'main' into cron_hint 2020-10-04 11:23:44 +01:00
Chris Raynor
a89f5ee6fd Fixing excess whitespace 2020-10-04 11:21:23 +01:00
Chris Raynor
31e2458574 Using standard format from docs
Updating the format slightly to match [the docs](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#schedule) precisely
2020-10-04 11:20:31 +01:00
Chris Raynor
fe8c48ed50 Merge pull request #243 from github/dependabot/npm_and_yarn/actions/core-1.2.6
Bump @actions/core from 1.2.0 to 1.2.6
2020-10-03 13:27:39 +01:00
Chris Raynor
f49e963057 Updating node_modules 2020-10-03 12:55:40 +01:00
dependabot[bot]
4290eabf33 Bump @actions/core from 1.2.0 to 1.2.6
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.0 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 17:36:26 +00:00
Sebastiaan van Stijn
7073967e9a README: document cron fields in example
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-01 16:52:44 +02:00
Chris Raynor
bf60ce880e Merge branch 'main' into cbraynor/fix201 2020-10-01 12:24:03 +01:00
Chris Raynor
4ff6c0d0c9 Merge pull request #237 from github/cbraynor/fix206
Resolve violations of sort-imports lint
2020-10-01 12:22:14 +01:00
Chris Raynor
6d01157d11 Merge branch 'cbraynor/fix206' into cbraynor/fix201 2020-10-01 11:17:59 +01:00
Chris Raynor
10479a214a Merge branch 'main' into cbraynor/fix206 2020-10-01 11:09:05 +01:00
Chris Raynor
122c9b7f24 Switching to import/order instead of sort-imports 2020-10-01 11:03:46 +01:00
Marco Gario
b9e933968b Merge pull request #240 from github/marcogario/platform-bundle
Platform specific bundle
2020-10-01 11:29:53 +02:00
Chris Gavin
62f25fda9b Ignore the tools directory as well and remove the warning. 2020-10-01 10:03:45 +01:00
Marco Gario
d5029a8680 Platform specific bundle 2020-10-01 10:04:48 +02:00
Chris Gavin
dbecf76db8 Use a relative path to ignore the runner temporary directory. 2020-09-29 15:43:37 +01:00
Chris Raynor
47fa956a52 Updating node_modules 2020-09-29 15:05:16 +01:00
Chris Raynor
8200c137dc Resolve violations of import/no-extraneous-dependencies lint
Fixes #201
2020-09-29 15:03:21 +01:00
Chris Raynor
228546a1e5 Resolve violations of sort-imports lint
Resolves #206
2020-09-29 14:43:37 +01:00
Robin Neatherway
bb6fa8ee6d Merge pull request #217 from github/rneatherway/optional-merge
Do not always overwrite the GITHUB_REF for PRs
2020-09-29 13:17:39 +01:00
Robin Neatherway
2d6f6077bf Merge branch 'main' into rneatherway/optional-merge 2020-09-29 13:02:37 +01:00
Robert
8ea621e2e3 Merge pull request #234 from github/update-v1-f2e557e7
Merge main into v1
2020-09-29 10:34:59 +01:00
David Verdeguer
4e39b768c7 Remove tests that should fail 2020-09-29 10:33:25 +02:00
David Verdeguer
5e2245cc23 Add x permission to the test scripts 2020-09-29 10:06:06 +02:00
David Verdeguer
67ddca1d9c Add workflow for testing python setup 2020-09-29 09:57:29 +02:00
Chris Gavin
206e34cbb4 Exclude the temporary directory from scanning. 2020-09-28 21:43:19 +01:00
Robert Brignull
c4dc1b0438 Make URL parsing more robust 2020-09-28 18:39:56 +01:00
Chris Raynor
2841489ddf Merge pull request #233 from miqh/fix/205
Resolve violations of no-useless-escape lint
2020-09-28 11:49:40 +01:00
Chris Raynor
a2931d32c7 Merge branch 'main' into fix/205 2020-09-28 11:20:31 +01:00
Chris Raynor
bcf29b3c36 Merge pull request #232 from miqh/fix/204
Resolve violations of no-throw-literal lint
2020-09-28 11:18:23 +01:00
Michael Huynh
c68c97e2bd Resolve violations of no-useless-escape lint
Resolves #205
2020-09-28 10:55:58 +08:00
Rasmus Wriedt Larsen
18312707fe Explain get_extractor_version for python setup scripts 2020-09-25 12:07:22 +02:00
Michael Huynh
476bf863f2 Resolve violations of no-throw-literal lint
Resolves #204
2020-09-25 17:39:25 +08:00
David Verdeguer
5419fcd735 Improve warning message 2020-09-25 11:28:57 +02:00
Rasmus Wriedt Larsen
dffce9945c Minor fixes to python installation scripts based on code review 2020-09-24 15:43:34 +02:00
Rasmus Wriedt Larsen
6645c550ef Apply suggestions from code review
Co-authored-by: Marco Gario  <marcogario@github.com>
2020-09-24 15:36:00 +02:00
David Verdeguer
7753dec413 Add min disk free flag to database analyze: 2020-09-24 11:42:21 +02:00
David Verdeguer
34955967b7 Fix python string 2020-09-23 18:06:08 +02:00
David Verdeguer
147734591c Check platform before installing python tools 2020-09-23 17:49:39 +02:00
Robert
f2e557e77f Merge pull request #228 from miqh/fix/197
Resolve violations of eslint-comments/no-use lint
2020-09-23 15:20:37 +01:00
Robert
5d00d5b4e8 Merge branch 'main' into fix/197 2020-09-23 14:28:21 +01:00
Robert
d9f39334ae Merge pull request #229 from miqh/fix/203
Resolve violations of no-sparse-arrays lint
2020-09-23 14:27:27 +01:00
Michael Huynh
38363a1043 Resolve violations of no-sparse-arrays lint
Resolves #203
2020-09-23 21:02:03 +08:00
Michael Huynh
80b408e704 Resolve violations of eslint-comments/no-use lint
Resolves #197
2020-09-23 20:25:45 +08:00
Chris Raynor
481f3ce214 Merge pull request #227 from github/cbraynor/cache-pinning
Prioritizing pre-downloaded CodeQL bundle in some circumstances
2020-09-23 11:58:35 +01:00
Chris Raynor
2f4ca98eb6 Reducing the number of new builds significantly while keeping coverage 2020-09-23 11:54:42 +01:00
David Verdeguer
23a1a65b43 Merge branch 'main' into daverlo/python-v2 2020-09-23 09:27:54 +02:00
Chris Raynor
3b90db98f9 Integration tests now both rely on pre-downloaded and latest codeql bundles 2020-09-22 14:42:23 +01:00
Chris Raynor
41464b1396 Allowing a cached version of the CodeQL bundle sometimes
To save time downloading the CodeQL bundle we're pre-downloading it into the
hosted Actions runner, but because the release schedule is different there may
be some version drift. This change allows a different version of the bundle
to be used than the default if a version isn't explicitly specified, there's
only one version downloaded, and it's been marked as a 'pinned-version' -
otherwise it reverts to the prior behavior.
2020-09-22 14:38:27 +01:00
Chris Gavin
367ad73efb Merge pull request #226 from github/octokit-retry
Fix retrying uploads by using Octokit retry plugin.
2020-09-22 12:39:47 +01:00
Chris Gavin
8d26f6175d Merge branch 'main' into octokit-retry 2020-09-22 12:26:34 +01:00
Chris Gavin
31c2eca167 Fix retrying uploads by using Octokit retry plugin. 2020-09-21 19:15:19 +01:00
Marco Gario
427c79f43f Merge pull request #216 from github/split_bundle
Workflow to split the bundle into components
2020-09-21 18:19:03 +02:00
Marco Gario
c36848d44b Merge branch 'main' into split_bundle 2020-09-21 18:12:53 +02:00
Marco Gario
590fdcd891 Apply suggestions from code review
Co-authored-by: Robert <robertbrignull@github.com>
2020-09-21 18:12:23 +02:00
Chris Gavin
e67ba57e65 Merge pull request #221 from github/update-actions-github
Update to the latest version of `@actions/github`.
2020-09-21 16:06:30 +01:00
Chris Gavin
bba73b6d4e Merge main into update-actions-github. 2020-09-21 15:25:08 +01:00
Chris Gavin
cc0eb452c7 Use getOctokit(...) when getting the GitHub API client. 2020-09-21 15:21:05 +01:00
Chris Raynor
a8a62974b3 Merge pull request #223 from miqh/fix/199
Resolve violations of github/array-foreach lint
2020-09-21 11:11:07 +01:00
Robert
c7c948adb9 Merge pull request #224 from github/update-v1-b2dfa6e6
Merge main into v1
2020-09-21 11:04:47 +01:00
Marco Gario
d265935d24 Update split.yml 2020-09-21 12:00:29 +02:00
Marco Gario
47eb668155 Update split.yml 2020-09-21 12:00:00 +02:00
Marco Gario
1154bf6df9 Update split.yml 2020-09-21 10:13:23 +02:00
Michael Huynh
4666a0eed0 Resolve violations of github/array-foreach lint
Resolves #199
2020-09-20 17:41:27 +08:00
Robert
b2dfa6e690 Merge pull request #219 from github/robertbrignull/init_status_queries
Include workflow queries in status report
2020-09-18 16:56:03 +01:00
Robert
def00916ce Merge branch 'main' into robertbrignull/init_status_queries 2020-09-18 16:36:17 +01:00
Chris Gavin
9ed519fa12 Update to the latest version of @actions/github. 2020-09-18 16:06:20 +01:00
Robert
55458a1ab1 Merge pull request #179 from github/split_builtin_custom_queries
Split up builtin and custom queries
2020-09-18 10:06:50 +01:00
Robert Brignull
1dc1029baf Merge branch 'main' into split_builtin_custom_queries 2020-09-18 09:52:44 +01:00
Marco Gario
5166e750e9 Merge pull request #218 from github/marcogario/reduce_ci_jobs
Reduce triggers in workflows
2020-09-17 18:36:18 +02:00
Robert Brignull
875a8da7e3 include workflow queries in status report 2020-09-17 17:29:45 +01:00
Marco Gario
ade519b950 Reduce triggers in workflows
See #182. Workflows are now triggered on all PRs but only on push on the main and v1 branch
2020-09-17 14:39:18 +02:00
Robin Neatherway
7795860c11 Do not always overwrite the GITHUB_REF for PRs
As we move towards analysing the merge commit for pull requests by
default, we should stop sending `/refs/pull/n/head` rather than
`refs/pull/n/merge` _unless_ the checked-out SHA has actually changed.
Here we assume that any change (compared to GITHUB_SHA) indicates that
`git checkout HEAD^2` has been run earlier. This may sometimes be
incorrect (e.g. `git checkout mybranch`), but in that case the ref
would be wrong either way.
2020-09-17 13:11:06 +01:00
Marco Gario
b4a8cfa05c Add instructions 2020-09-17 13:42:19 +02:00
Marco Gario
7da583bcb3 Workflow to split the bundle into components 2020-09-17 13:36:26 +02:00
Robert
c9b06117cb Merge pull request #211 from github/robertbrignull/consistent_inputs
Make inputs consistent between action and runner
2020-09-17 10:06:43 +01:00
Robert
4b4f9e8e6a Merge branch 'main' into robertbrignull/consistent_inputs 2020-09-17 09:36:51 +01:00
Robert
2c94a7f61f Merge pull request #215 from github/main-v1
Mergeback v1 to main
2020-09-17 09:33:39 +01:00
Marco Gario
5f592775cc Merge branch 'main' into main-v1 2020-09-16 18:37:11 +02:00
Robert
ef3b75cbdb Update action.yml 2020-09-16 16:23:11 +02:00
Robert Brignull
090a7013dd add explanation to query 2020-09-16 11:03:19 +01:00
Robert Brignull
4c4114f2d8 add an extra getRequiredInput 2020-09-16 11:03:13 +01:00
Robert Brignull
7be1a410c2 Merge branch 'main' into robertbrignull/consistent_inputs 2020-09-16 10:50:54 +01:00
Robert Brignull
c1cee53da5 Add getOptionalInput and getRequiredInput 2020-09-15 18:47:50 +01:00
Robert Brignull
d88fa5cef6 Add queries 2020-09-15 18:33:37 +01:00
Robert
f6894d6610 Merge pull request #210 from github/robertbrignull/disable-snippets
Disable snippets by default
2020-09-15 18:25:28 +01:00
Robert
3d5127d682 Update action.yml 2020-09-15 17:45:34 +01:00
Marco Gario
4076e23ec5 Merge pull request #209 from github/remove_file
Remove unused files
2020-09-15 18:02:05 +02:00
Nick Fyson
0da3e94867 Merge branch 'main' into remove_file 2020-09-15 15:16:05 +01:00
Marco Gario
3325da8a15 Remove unused files 2020-09-15 15:51:27 +02:00
Robert
1ca9d4c096 Merge pull request #207 from github/robertbrignull/replace_all
Replace all occurrences instead of just the first
2020-09-15 14:47:05 +01:00
Robert Brignull
121fd331cd Introduce actions-util.ts 2020-09-15 14:01:21 +01:00
Chris Raynor
50d46f662f Merge pull request #184 from github/update-v1-6567bffc
Merge main into v1
2020-09-15 09:09:40 +01:00
Robert Brignull
89dad149ed Replace all occurrences 2020-09-14 18:13:33 +01:00
Nick Fyson
245c02cf7d Merge pull request #174 from github/nickfyson/error_wrapper
add error-catching wrapper around calls to toolrunner
2020-09-14 13:59:39 +01:00
Nick Fyson
e5e9aad174 Merge branch 'main' into nickfyson/error_wrapper
# Conflicts:
#	lib/codeql.js
#	lib/codeql.js.map
#	src/codeql.ts
2020-09-14 13:30:37 +01:00
Chris Raynor
698eab0c5f Merge pull request #181 from github/cbraynor/eslint
Switching to ESLint
2020-09-14 10:59:19 +01:00
Chris Raynor
7bdf90af87 Adding super simple lint Action 2020-09-14 10:51:29 +01:00
Chris Raynor
cb51c857fc Adding temporary overrides to allow the linter to pass 2020-09-14 10:49:02 +01:00
Chris Raynor
a184d50a26 Running lint-fix 2020-09-14 10:44:43 +01:00
Chris Raynor
c96f84308a Regenerating node_modules 2020-09-14 10:42:37 +01:00
Chris Raynor
09b4a82c83 Removing the tslint config 2020-09-14 10:37:55 +01:00
Chris Raynor
06765f9340 Adding ESLint config and required dev dependencies 2020-09-14 10:32:24 +01:00
Nick Fyson
814840b1de Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 10:28:03 +01:00
Chris Raynor
6567bffcb9 Merge pull request #183 from github/dependabot/npm_and_yarn/node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2020-09-13 11:22:52 +01:00
Chris Raynor
0579b4d27d Vendoring node_modules 2020-09-13 10:27:23 +01:00
dependabot[bot]
0b64878cfe Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-12 20:20:25 +00:00
Nick Fyson
b104d6e035 Merge branch 'main' into nickfyson/error_wrapper
# Conflicts:
#	lib/codeql.js.map
2020-09-11 19:04:05 +01:00
Nick Fyson
b3b99014eb make ErrorMatcher an object rather than a tuple 2020-09-11 18:30:07 +01:00
Nick Fyson
1fb7c81099 tweak in response to reviewer comments 2020-09-11 18:25:23 +01:00
Nick Fyson
57ef26cffe Merge pull request #178 from github/nickfyson/include-snippets
add optional workflow input to specify whether snippets are added to sarif
2020-09-11 14:11:14 +01:00
Nick Fyson
be681d444e Merge branch 'main' into nickfyson/include-snippets 2020-09-11 13:58:53 +01:00
David Verdeguer
4ab5cbcc8a Merge pull request #173 from github/rasmuswl/update-python-scripts
Update Python scripts for "Python deps setup"
2020-09-11 12:41:31 +02:00
Rasmus Wriedt Larsen
1b20fa78be Handle error in poetry 1.0.10 2020-09-11 12:40:40 +02:00
Rasmus Wriedt Larsen
7fc41c62be Update python scripts to handle setup.py 2020-09-11 12:40:40 +02:00
David Verdeguer
5701037850 Add python scripts 2020-09-11 12:25:47 +02:00
Robert
a2cdfc8031 Merge pull request #180 from ericcornelissen/patch-1
Fix "Using a custom configuration" link in the README
2020-09-11 10:13:31 +01:00
David Verdeguer
52274f1815 Setup python extractor for installed deps 2020-09-11 11:07:27 +02:00
David Verdeguer
8cea21575c Install python deps on init 2020-09-11 10:53:41 +02:00
Eric Cornelissen
ea3706d88f Fix "Using a custom configuration" link in README
Fix the "Using a custom configuration" link the README. The actual ID of the header on the page is "using-a-custom-configuration-file", so I updated both the link and the link test to match. (as far as I can tell all other links in the README work as expected)
2020-09-10 20:58:39 +03:00
Nick Fyson
77f767cb34 add optional workflow input to specify whether snippets are added to sarif output 2020-09-10 18:26:58 +01:00
Robert Brignull
0539269665 split up builtin and custom queries 2020-09-10 18:17:03 +01:00
Robert
75af0bf309 Merge pull request #177 from github/external_queries_test
Make a local repo for checkoutExternalQueries
2020-09-10 11:43:03 +01:00
Robert
d4f40db368 Merge branch 'main' into external_queries_test 2020-09-10 11:24:22 +01:00
Robert
c5f77d0bfd Merge pull request #175 from github/runner-integration-tests
Add more integration tests for the runner
2020-09-10 11:23:28 +01:00
Robert
e6083671c7 Merge branch 'main' into runner-integration-tests 2020-09-10 10:57:16 +01:00
Robert
4d8719bb73 Merge pull request #176 from github/fingerprint_test
Add another fingerprinting test
2020-09-10 10:24:01 +01:00
Robert Brignull
3be0e89804 make a local repo for checkoutExternalQueries 2020-09-09 18:30:57 +01:00
Robert Brignull
3db0a253ed add another fingerprinting test 2020-09-09 17:37:53 +01:00
Robert
d82e34bb43 Merge branch 'main' into runner-integration-tests 2020-09-09 17:31:35 +01:00
Robert
67246cd645 Update integration-testing.yml 2020-09-09 17:31:20 +01:00
Sam Partington
028706c3a2 Merge pull request #165 from github/allow-additive-queries-in-workflow
Allow "additive" queries in workflow by prefixing with "+"
2020-09-09 16:41:55 +01:00
Sam Partington
4ad13dff42 Merge branch 'main' into allow-additive-queries-in-workflow 2020-09-09 15:32:20 +01:00
Robert Brignull
e4b0068a9d add more integration tests for the runner 2020-09-08 18:32:52 +01:00
Robert
506e641669 Merge pull request #167 from github/windows_tracing
Fix tracing on windows for the runner, and when using multiple self-hosted actions runners
2020-09-08 11:28:42 +01:00
Sam Partington
18cd03ab62 Make variable name less ambiguous 2020-09-08 10:14:51 +01:00
Sam Partington
d677f16692 Merge branch 'main' into allow-additive-queries-in-workflow 2020-09-08 10:00:16 +01:00
Nick Fyson
88951d6193 renames to reflect the switch to using toolrunner 2020-09-08 00:01:04 +01:00
Nick Fyson
3cd41279f2 Merge branch 'main' into nickfyson/error_wrapper
# Conflicts:
#	lib/codeql.js
#	lib/codeql.js.map
#	src/codeql.ts
2020-09-07 23:55:32 +01:00
Nick Fyson
c4f579a4db remove the intentionally failing matcher integration tests 2020-09-07 23:12:12 +01:00
Nick Fyson
30bb37a5c7 restore all default workflow triggers and integration tests 2020-09-07 23:11:10 +01:00
Nick Fyson
cc2dfaf5d8 clean up and rename things to follow proper conventions 2020-09-07 23:02:58 +01:00
Nick Fyson
3e6d23928b add test for initial error matcher 2020-09-07 22:50:37 +01:00
Nick Fyson
7dbaff09b6 move error matcher definition into dedicated file 2020-09-07 18:37:51 +01:00
Robert Brignull
7d9c81f55c Print final process we choose 2020-09-07 17:23:35 +01:00
Robert Brignull
212f4484d3 Merge branch 'main' into windows_tracing 2020-09-07 17:08:59 +01:00
Robert
556aed46b0 Merge pull request #170 from github/windows_message
Print path to file instead of file contents
2020-09-07 16:23:49 +01:00
Robert Brignull
c68937100c Merge branch 'main' into windows_message 2020-09-07 16:01:09 +01:00
Nick Fyson
1f3ce75844 add initial suite of tests for exec_wrapper 2020-09-07 15:17:43 +01:00
Nick Fyson
9701a93bf1 ensure exec_wrapper always captures exit code of called process 2020-09-07 15:17:19 +01:00
Robert
8c43427531 Merge pull request #169 from github/codeql_download_info
Print that we are downloading codeql and it may take a while
2020-09-07 14:32:37 +01:00
Robert
1a772a2b9e Merge branch 'main' into codeql_download_info 2020-09-07 13:37:20 +01:00
Robert Brignull
694fa2d961 add options to specify process name or level to trace 2020-09-07 13:36:47 +01:00
Robert Brignull
789059e604 Merge branch 'main' into windows_tracing 2020-09-07 12:49:20 +01:00
Robert
0e9b8f4a47 Merge pull request #168 from github/runner_refs
make inputting refs easier
2020-09-07 12:19:56 +01:00
Robert
3901848a2f Merge pull request #171 from github/update-v1-68c6069f
Merge main into v1
2020-09-07 11:42:15 +01:00
Nick Fyson
dd4e841441 remove spurious use of exec_wrapper 2020-09-03 17:01:51 +01:00
Nick Fyson
6a43a6178d ensure matchers not applied if exit code is zero 2020-09-03 16:42:56 +01:00
Robert Brignull
9782622366 Print path to file instead of file contents 2020-09-02 19:58:03 +01:00
Robert Brignull
32eb1c4c34 Print that we are downloading codeql and it may take a while 2020-09-02 18:02:49 +01:00
Robert Brignull
ebb41156ee make inputting refs easier 2020-09-02 18:00:46 +01:00
Nick Fyson
231537b08e refactor to handle exec.exec return values together 2020-09-02 16:32:28 +01:00
Robert Brignull
48df01325b add alternative script for in runner mode 2020-09-02 15:50:37 +01:00
Robert Brignull
5c0bd22d01 set -ExecutionPolicy Bypass 2020-09-02 15:50:23 +01:00
Robert Brignull
2dbd7e8dc1 Fix tracing when there are multiple self-hosted runners 2020-09-02 15:28:50 +01:00
Nick Fyson
6ef533485e wrap more codeql calls in the error catcher wrapper 2020-09-01 16:51:39 +01:00
Nick Fyson
7b7e0e12b7 update error_wrapper to take matcher array 2020-09-01 16:35:08 +01:00
Robert
68c6069f0b Merge pull request #162 from github/runner_analyze
Convert init, autobuild, and analyze actions to CLI / runner mode
2020-09-01 15:01:36 +01:00
Robert Brignull
b4d142e980 whitelist @actions/exec/lib/toolrunner 2020-09-01 14:44:38 +01:00
Robert Brignull
4c00c68d14 Add --ram and --threads args 2020-09-01 14:27:56 +01:00
Robert Brignull
09fb3ec514 Remove a call to getActionsApiClient 2020-09-01 14:01:21 +01:00
Robert Brignull
8a821a9c35 Add logger to checkoutExternalRepository 2020-09-01 13:53:59 +01:00
Robert
b8f7e0ff0f Merge pull request #166 from github/update-v1-5bd2832b
Merge main into v1
2020-09-01 13:30:36 +01:00
Robert Brignull
1548b771cb Merge remote-tracking branch 'origin/main' into runner_analyze 2020-08-28 17:28:14 +01:00
Robert Brignull
a0b54fc7ab fix tests 2020-08-28 17:28:05 +01:00
Robert Brignull
aa7e2fe91b automatically import env in autobuild 2020-08-28 17:22:26 +01:00
Sam Partington
abf5854149 Extract more common test code to function 2020-08-28 17:20:40 +01:00
Sam Partington
23cf700e38 Extract common test code to a function
https://github.com/github/codeql-action/pull/165#discussion_r479396850
2020-08-28 17:13:06 +01:00
Robert Brignull
c3d6602e8a use ToolRunner directly instead of exec wrapper 2020-08-28 16:59:34 +01:00
Sam Partington
831c686d9b Add details of queries property to README 2020-08-28 16:58:15 +01:00
Robert
5bd2832b32 Merge pull request #164 from github/npm_test_os
Run `npm test` on linux and macos
2020-08-28 16:57:28 +01:00
Sam Partington
ab8d9eccc9 Add a test which combines workflow queries and disabling the defaults 2020-08-28 16:53:11 +01:00
Sam Partington
82000c26c8 Allow "additive" queries in workflow by prefixing with "+"
See discussion on https://github.com/github/code-scanning/issues/1446
2020-08-28 16:45:57 +01:00
Robert
b1d719eeeb fix tests on non-linux 2020-08-28 15:13:14 +01:00
Robert
da1c00f5c8 Run npm test on all operating systems 2020-08-28 15:10:47 +01:00
Robert Brignull
80e2c4fe4a improve error message when config is not found 2020-08-28 09:43:25 +01:00
Robert Brignull
37bac22443 Make runner arg descriptions more consistent 2020-08-28 09:35:37 +01:00
Robert Brignull
57f03d3bd0 Remove hash from temp dir 2020-08-28 09:27:28 +01:00
Robert Brignull
6c8f96d781 Log that we're clearing the temp dir 2020-08-27 16:45:41 +01:00
Robert Brignull
3dfaa88a1d Remove process of auth 2020-08-27 16:45:28 +01:00
Robert Brignull
1fd45d7407 address review comments 2020-08-27 16:34:09 +01:00
Robert Brignull
6f422a4303 add debug mode to limit output 2020-08-27 14:26:44 +01:00
Robert Brignull
f80d660e33 check environment before running autobuild or analyze 2020-08-27 14:22:16 +01:00
Robert Brignull
a542021200 make --language optional to autobuild and detect dominant language 2020-08-27 14:08:54 +01:00
Robert Brignull
b42ed69542 Update temp dir and tools dir 2020-08-27 14:08:41 +01:00
Marco Gario
8229390c1d Merge pull request #163 from github/codeql_bundle_20200826
CodeQL Bundle: 20200826
2020-08-27 14:54:09 +02:00
Robert Brignull
39b361ed69 Remove dependence of GITHUB_REPOSITORY env var 2020-08-27 11:06:14 +01:00
Robert Brignull
688df282cd fix exporting env vars on linux 2020-08-26 16:40:58 +01:00
Robert Brignull
e9bfa56061 inline inject-tracer.ps1 2020-08-26 16:20:36 +01:00
Robert Brignull
1f2bd10757 add newline to output 2020-08-26 16:20:36 +01:00
Robert Brignull
1c004b9275 inline tracer-env.js 2020-08-26 16:20:36 +01:00
Robert Brignull
f5d645fc73 Fix use of wrong URL 2020-08-26 16:20:36 +01:00
Robert Brignull
3ffe4b7421 Add code to output required env to files 2020-08-26 16:20:36 +01:00
Robert Brignull
217483dfd6 Convert rest of the actions 2020-08-26 16:20:36 +01:00
Marco Gario
b1aa99c6de Merge branch 'main' into codeql_bundle_20200826 2020-08-26 16:42:16 +02:00
Marco Gario
7e207743ab Update defaults.json 2020-08-26 16:28:44 +02:00
Robert
aac5eb2aea Merge pull request #159 from github/rename_cli
Rename CLI to CodeQL runner
2020-08-26 15:03:23 +01:00
Robert Brignull
09677dada5 rename CLI to runner 2020-08-25 17:44:30 +01:00
Robert
fe756603d9 Merge pull request #152 from github/vercel/pkg
Add vercel/pkg to create standalone CLI
2020-08-25 17:42:54 +01:00
Robert Brignull
80a22f43d8 Merge branch 'main' into vercel/pkg 2020-08-25 15:58:59 +01:00
Robert
c039c3b7a4 Merge pull request #158 from github/tracer-config
Break out tracer-config.ts to its own file
2020-08-25 15:20:36 +01:00
Robert
2df51e04f7 Merge branch 'main' into tracer-config 2020-08-25 15:05:15 +01:00
Sam Partington
abddb8bf00 Merge pull request #127 from github/query-overriding
Allow queries to be specified in the workflow configuration, overriding those set in the config file
2020-08-25 14:29:40 +01:00
Sam Partington
e997bdf637 Merge branch 'main' into query-overriding 2020-08-25 14:21:33 +01:00
Sam Partington
ab4e7216d3 Don't refer to config file in contexts where it's not relevant
https://github.com/github/codeql-action/pull/127#discussion_r476366221
2020-08-25 14:19:16 +01:00
Robert Brignull
1fb8d3b712 fix test workflow again 2020-08-25 12:00:04 +01:00
Robert Brignull
c3c86d82ae Merge remote-tracking branch 'origin/main' into vercel/pkg
the commit.
2020-08-25 11:49:44 +01:00
Esben Sparre Andreasen
ab457bef49 Merge pull request #139 from github/support-multiple-checkouts
Support checkout of multiple refs for a single repository
2020-08-25 12:48:09 +02:00
Robert Brignull
d6daa45d0b update test workflow 2020-08-25 11:46:13 +01:00
Robert Brignull
0bb8872e19 remove build-cli from top-level package.json 2020-08-25 11:45:01 +01:00
Esben Sparre Andreasen
c562bfbd92 Merge branch 'main' into support-multiple-checkouts 2020-08-25 12:35:47 +02:00
Robert Brignull
8efabe9ec9 Merge branch 'main' into tracer-config 2020-08-25 11:35:22 +01:00
Robert
e05e9e6b5d Merge pull request #160 from github/rename_entrypoints
Rename the action entrypoint files
2020-08-25 11:31:17 +01:00
Esben Sparre Andreasen
05f620754e Merge branch 'main' into support-multiple-checkouts 2020-08-25 12:25:42 +02:00
Robert
85c7ad0ecd Merge branch 'main' into rename_entrypoints 2020-08-25 11:10:22 +01:00
Robert
570a0d7142 Merge pull request #161 from github/lib_clean
Clean up the lib directory
2020-08-25 11:10:11 +01:00
Robert Brignull
82fb31ed5e make tests clearer 2020-08-25 11:09:07 +01:00
Nick Fyson
cd22abcda8 add example regex match for stdout/err string 2020-08-25 10:54:54 +01:00
Sam Partington
bdfd48264f Merge branch 'main' into query-overriding 2020-08-25 10:39:53 +01:00
Esben Sparre Andreasen
eecc25f914 build typescript 2020-08-25 11:22:11 +02:00
Esben Sparre Andreasen
45b9e967ef support checkout of multiple refs for a single repository 2020-08-25 11:22:08 +02:00
Sam Partington
129713f1a0 Handle errors in workflow queries correctly 2020-08-25 10:17:54 +01:00
Nick Fyson
45e00a8e6a match existing behaviour when custom listeners defined 2020-08-24 18:35:22 +01:00
Sam Partington
7f19f9198a Refactor common code to function and add missing test 2020-08-24 15:53:24 +01:00
Robert Brignull
9c015b7e83 cleanup lib 2020-08-24 15:18:26 +01:00
Robert Brignull
4bc0c2b0e7 clean the lib dir before building 2020-08-24 15:18:01 +01:00
Robert Brignull
9e342a9b83 rename the action entrypoint files 2020-08-24 15:15:26 +01:00
Sam Partington
c6f02973ac Prevent queries in workflow overriding default queries
https://github.com/github/codeql-action/pull/127#pullrequestreview-463207781
2020-08-24 14:42:05 +01:00
Robert Brignull
88d9e95da6 add minimal instructions for building CLI 2020-08-24 14:04:29 +01:00
Robert Brignull
3c5b7fba82 update node_modules 2020-08-24 14:02:55 +01:00
Robert Brignull
a6e6d4b72b move dependencies needed to build CLI to separate package.json 2020-08-24 14:02:49 +01:00
Robert
06fb4821bc Merge pull request #157 from github/update-v1-bd54c20d
Merge main into v1
2020-08-24 13:46:18 +01:00
Robert Brignull
407ef0ac11 Break out tracer-config.ts 2020-08-24 12:53:09 +01:00
Nick Fyson
2b27c68c84 add exec_wrapper function 2020-08-24 11:22:25 +01:00
Robert
bd54c20d3e Merge pull request #153 from github/add_env_to_config
Add tempDir and codeQLCmd fields to the config
2020-08-21 11:00:48 +01:00
Robert Brignull
0e8b30af75 Merge branch 'main' into add_env_to_config 2020-08-21 10:32:58 +01:00
Robert
1f5a571dfc Merge pull request #151 from github/action_libs_query
Add query to detect use of actions libs
2020-08-21 10:31:20 +01:00
Robert
d193e5f876 Merge branch 'main' into action_libs_query 2020-08-21 10:07:22 +01:00
Robert
5d49d011a2 Merge pull request #144 from github/language_parsing
Refactor language parsing
2020-08-21 10:07:06 +01:00
Robert Brignull
038c4ebdf7 add CodeQL cmd to config 2020-08-19 15:57:13 +01:00
Robert Brignull
360e77a083 remove direct accesses to RUNNER_TEMP 2020-08-19 15:25:27 +01:00
Robert Brignull
9c29fe283d add tempDir and toolCacheDir to config 2020-08-19 15:11:49 +01:00
Robert Brignull
574b5dc4e9 Merge branch 'main' into language_parsing 2020-08-19 09:40:47 +01:00
Esben Sparre Andreasen
e9e2284547 Merge pull request #138 from github/esbena/additional-codeql-options
Support additional codeql options
2020-08-18 10:35:18 +02:00
Esben Sparre Andreasen
9597f2e889 build typescript 2020-08-18 08:32:33 +02:00
Esben Sparre Andreasen
fd94b16cf5 use template strings instead of concatenations 2020-08-18 08:32:04 +02:00
Esben Sparre Andreasen
288f49eee5 use ExtraOptions in codeql commands 2020-08-18 08:32:03 +02:00
Esben Sparre Andreasen
c2b7b7f977 add getExtraOptions utility 2020-08-18 08:32:03 +02:00
Esben Sparre Andreasen
008b0062c6 add ExtraOptions type for codeql commands 2020-08-18 08:32:03 +02:00
Sam Partington
517d9fad41 Improve description of queries property
Co-authored-by: Alistair Christie <54933897+hubwriter@users.noreply.github.com>
2020-08-17 16:33:47 +01:00
Robert Brignull
d6fbafb242 add tests 2020-08-17 13:34:55 +01:00
Robert Brignull
1943ed432b use enum 2020-08-17 13:34:34 +01:00
Robert Brignull
00eee2b7ee Merge branch 'main' into language_parsing 2020-08-17 13:21:02 +01:00
Robert
c5e07ebfcc Merge pull request #149 from github/max_threads
Use all available threads for analysis
2020-08-17 13:12:30 +01:00
Robert
ce75b488a5 Merge pull request #150 from github/update-v1-e9efcf19
Merge main into v1
2020-08-17 12:52:09 +01:00
Robert Brignull
96ded2b500 Merge remote-tracking branch 'origin/main' into max_threads 2020-08-17 12:47:19 +01:00
Robert Brignull
5eb3736850 move maxThreads outside of loop 2020-08-17 12:46:55 +01:00
Robert Brignull
d49b8673bb fix alerts 2020-08-17 12:42:23 +01:00
Robert Brignull
f92a68048c add query to detect use of actions libs 2020-08-17 12:32:22 +01:00
Chris Gavin
e9efcf1900 Merge pull request #145 from github/chrisgavin/default-bundle-version-json
Store the default CodeQL bundle version in a JSON file.
2020-08-14 16:12:59 +01:00
Chris Gavin
73c73baaa2 Merge branch 'main' into chrisgavin/default-bundle-version-json 2020-08-14 15:53:07 +01:00
Robert Brignull
aaeb9751bb use all available threads for analysis 2020-08-14 14:24:08 +01:00
Robert
2527130a32 Merge pull request #147 from github/upload_cli
Add a CLI interface to the upload-sarif action
2020-08-13 18:05:15 +01:00
Robert Brignull
2828c43ac7 fix file location 2020-08-12 18:08:30 +01:00
Robert Brignull
4b56177c28 Re-throw errors 2020-08-12 18:06:34 +01:00
Robert Brignull
150e07f914 add test action 2020-08-12 17:55:40 +01:00
Robert Brignull
5b0aafadb1 address comments 2020-08-12 17:42:47 +01:00
Chris Gavin
9c5f7640e5 Merge branch 'main' into chrisgavin/default-bundle-version-json 2020-08-11 17:52:34 +01:00
Robert Brignull
cf08f5a9cd remove unused arguments 2020-08-11 13:56:23 +01:00
Robert Brignull
34b372292b commit node_modules and generated files 2020-08-11 12:43:27 +01:00
Robert Brignull
6d7a135fea Add a CLI interface to the upload-sarif action 2020-08-11 12:43:06 +01:00
Robert
bcf676e52d Merge pull request #141 from github/actions_io
Remove direct dependency on @actions/io
2020-08-10 16:14:11 +01:00
Robert Brignull
591359cae6 introduce languages.ts 2020-08-10 16:03:09 +01:00
Robert
7c2a7b236c Merge remote-tracking branch 'origin/main' into actions_io 2020-08-10 15:59:27 +01:00
Robert
0fdcc52338 Merge branch 'main' into actions_io 2020-08-10 15:50:44 +01:00
Robert
d5693a7fd2 Merge pull request #140 from github/remove_some_shared_env
Remove some shared env
2020-08-10 15:46:03 +01:00
Robert
eb4eda5cbe Merge branch 'main' into remove_some_shared_env 2020-08-10 15:28:44 +01:00
Chris Gavin
97eafbc804 Store the default CodeQL bundle version in a JSON file. 2020-08-10 13:41:45 +01:00
Robert
9494a25e76 Merge pull request #143 from github/update-v1-86081052
Merge main into v1
2020-08-10 10:46:27 +01:00
Robert
6e18b27d4d Merge pull request #137 from github/invalid_language
Provide a better error message when languages are not recognised
2020-08-10 10:36:01 +01:00
Robert
de0b59097a remove direct dependency on @actions/io 2020-08-07 18:09:45 +01:00
Robert
d5c453c995 mock API request in test 2020-08-07 17:15:46 +01:00
Robert Brignull
657540584e add tests 2020-08-07 17:02:42 +01:00
Robert
a0660c80bd remove should_abort method 2020-08-07 16:56:04 +01:00
Robert
396f7167d8 remove CODEQL_ACTION_TRACED_LANGUAGES and CODEQL_ACTION_SCANNED_LANGUAGES 2020-08-07 16:55:45 +01:00
Robert
e5ad069f2c remove CODEQL_ACTION_ANALYSIS_KEY 2020-08-07 16:54:58 +01:00
Robert
5b35de62bd remove CODEQL_ACTION_DATABASE_DIR 2020-08-07 16:08:16 +01:00
Robert Brignull
d5853409b4 Provide a better error message when language is not recognised 2020-08-06 17:34:45 +01:00
Robert
8608105240 Merge pull request #136 from github/always_log_error
Always log the full error
2020-08-06 17:33:13 +01:00
Robert
ac66bbe1fe Merge branch 'main' into always_log_error 2020-08-06 16:25:10 +01:00
Robert
3a28cb4ca8 Merge pull request #131 from github/languages_error
Improve error messages when no languages or no queries are specified
2020-08-05 10:01:09 +01:00
Robert Brignull
8127c47bbd always log full error 2020-08-05 09:43:46 +01:00
Robert Brignull
44c88fdd05 fix undefined check 2020-08-05 09:40:12 +01:00
Robert Brignull
6230b36dc2 update error message 2020-08-05 09:23:51 +01:00
Robert Brignull
3d552ba624 Merge branch 'main' into languages_error 2020-08-05 09:22:58 +01:00
Andrew Eisenberg
42235cc048 Allow the codeql-action to be run locally (#117)
* Allow the codeql-action to be run locally

This change allows the codeql-action to be run locally through
[act](https://github.com/nektos/act).

In order to run the action locally, you need to do two things:

1. Add the `CODEQL_LOCAL_RUN: true` environment variable. The only way
   I could figure out how to do this was to add it directly in the
   workflow file in an `env` block. It _should_ be possible to add it
   through a `.env` file and pass it to `act`, but I couldn't get it
   working.
2. Run this command `act -j codeql -s GITHUB_TOKEN=<MY_PAT>`

Setting the `CODEQL_LOCAL_RUN` env var will fill in missing env vars
that the action needs, but isn't set by `act`. It will also avoid
making api calls to github that would fail locally.

This is a refactoring discussed in
https://github.com/github/dsp-codeql/issues/36
2020-08-04 14:35:20 -07:00
Alex Ford
631929a68f Merge pull request #135 from github/revert-dont-send-matrix-vars
revert: 'Don't send `matrix_vars` field in status reports.'
2020-08-04 18:43:59 +01:00
Alex Ford
128c2cf718 revert: 'Don't send field in status reports.' 2020-08-04 18:26:31 +01:00
Chris Gavin
69bf3f24d4 Merge pull request #134 from github/merge-v1
Merge v1 into main.
2020-08-04 16:33:57 +01:00
Chris Gavin
02d3d62def Merge remote-tracking branch v1 into main. 2020-08-04 16:30:51 +01:00
Chris Gavin
f0894d52f3 Merge pull request #132 from github/dont-send-matrix-vars
Don't send `matrix_vars` field in status reports.
2020-08-04 16:28:08 +01:00
Chris Gavin
1fb3aaff6e Don't send matrix_vars field in status reports. 2020-08-04 16:21:58 +01:00
Robert Brignull
dc366899d2 Check that the set of queries is non-empty at init time 2020-08-04 10:39:47 +01:00
Robert Brignull
4896ba51da improve error message when no languages are detected 2020-08-04 10:29:50 +01:00
Robert
30d2cce9f8 Merge pull request #128 from github/enterprise_status_reports
Avoid sending status reports on enterprise
2020-08-03 15:18:02 +01:00
Robert
1ef33b0330 Merge pull request #130 from github/update-v1-e8896a90
Merge main into v1
2020-08-03 11:28:33 +01:00
Sam Partington
443d18adb7 Improve variable name 2020-07-31 11:15:09 +01:00
Sam Partington
d998a87469 Fix typo 2020-07-31 11:13:06 +01:00
Sam Partington
f57bf21879 Tidy up test 2020-07-31 11:11:47 +01:00
Sam Partington
ca2b74f2f8 Make test name more descriptive 2020-07-30 17:05:58 +01:00
Sam Partington
7b0f432c26 Add missing JavaScript
https://github.com/github/codeql-action/pull/127/checks?check_run_id=915325110
2020-07-30 16:49:50 +01:00
Robert Brignull
368c14c502 avoid sending status reports on enterprise 2020-07-30 13:00:35 +01:00
Chris Gavin
e8896a906a Merge pull request #123 from github/search-for-bundle
Search for the CodeQL bundle in multiple places.
2020-07-30 10:56:03 +01:00
Chris Gavin
f5ccce0c86 Merge branch 'main' into search-for-bundle 2020-07-30 10:35:09 +01:00
Sam Partington
f03827d513 Add new input to the init action configuration 2020-07-27 16:50:03 +01:00
Sam Partington
2da457060b Allow multiple overriding queries, comma-separated 2020-07-27 16:50:03 +01:00
Sam Partington
95cef22589 Add support for basic query overriding in action file itself
See https://github.com/github/dsp-code-scanning/issues/1446
2020-07-27 16:50:03 +01:00
Robert
74268130c6 Merge pull request #116 from github/status_reports_v2
Upload much more data in status reports
2020-07-27 15:58:17 +01:00
Robert
ae2d7afe3b Merge branch 'main' into status_reports_v2 2020-07-27 14:58:04 +01:00
Robert
12a37237d2 Merge pull request #124 from github/lodash_update
Update lodash
2020-07-27 14:57:28 +01:00
Robert
b38a014f94 Merge pull request #126 from github/update-v1-93dd64d3
Merge main into v1
2020-07-27 14:56:10 +01:00
Chris Gavin
5587e128ff Add a missing space. 2020-07-27 11:06:36 +01:00
Chris Gavin
74b4d8a6db Remove DEFAULT_ from some constant names. 2020-07-27 11:04:49 +01:00
Chris Gavin
175d681835 Factor out reimplementation of toolcache download into its own method. 2020-07-27 11:02:37 +01:00
Chris Gavin
f4e72f4a09 Add a comment explaining an edge-case. 2020-07-27 10:51:51 +01:00
Chris Gavin
5f057318b6 Fix a typo. 2020-07-27 10:48:00 +01:00
Chris Gavin
0f88c0111f Change INSTANCE_API_URL constant to a method. 2020-07-27 10:47:45 +01:00
Chris Gavin
bfaa0cf943 Restructure code to remove an error that can never be thrown. 2020-07-27 10:43:03 +01:00
Chris Gavin
337dbe5618 Remove an unneeded check. 2020-07-27 10:41:39 +01:00
Robert
6f42543a85 update lodash 2020-07-24 16:50:31 +01:00
Andrew Eisenberg
93dd64d351 Use templated strings for better readability 2020-07-24 08:29:04 -07:00
Robert
87758a1402 Upload much more data in status reports 2020-07-24 15:01:44 +01:00
Chris Gavin
813cb0479f Search for the CodeQL bundle in multiple places. 2020-07-24 14:24:44 +01:00
Robert
9769e4a6df Merge pull request #120 from github/default_queries_fix
Default queries fix + reset env vars in tests
2020-07-21 13:11:49 +01:00
Robert
315a9f4b3c fix typo 2020-07-21 12:46:19 +01:00
Robert
0446cb0aff address comments 2020-07-21 12:19:37 +01:00
Robert
29cf06569d reset environment variables between tests 2020-07-21 11:39:55 +01:00
Robert
ee63f4ee4b fix parsing of disable-default-queries field 2020-07-21 11:05:23 +01:00
Robert
5b4f4e40af introduce tests 2020-07-21 10:53:14 +01:00
Robert
58a0034549 Merge pull request #112 from github/undeclared-action-input
Fix undeclared action inputs
2020-07-20 09:30:31 +01:00
Robert Brignull
c7c1aa8045 fix undeclared action inputs 2020-07-16 14:54:15 +01:00
Robert
b673c57b89 Merge pull request #109 from github/codeql_search_path
Move config parsing earlier + add to codeql search path
2020-07-16 09:17:08 +01:00
Robert Brignull
d138b00811 await promise 2020-07-16 09:04:16 +01:00
Robert Brignull
b86c3701ed address review comments 2020-07-15 17:37:37 +01:00
Robert Brignull
7bb6ac6c60 Merge branch 'main' into codeql_search_path 2020-07-15 17:14:38 +01:00
Robert
e775d4e893 Merge pull request #108 from github/update-v1-c3dcf26e
Merge main into v1
2020-07-14 10:34:40 +01:00
Sam Partington
d1d80761ef Merge pull request #111 from github/vscode-debugging
Add support for debugging from VSCode
2020-07-14 10:32:08 +01:00
Sam Partington
7a78ec0a54 Add support for debugging from VSCode
https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-vscode.md recommends passing the `debug` option to Ava.  However, in my experience Ava waits indefinitely when this option is used, without actually running any tests.

The increased timeout setting is so that tests won't fail prematurely because you're slowly stepping through code.
2020-07-14 09:49:21 +01:00
Robert Brignull
da3d6d25eb move config parsing earlier + add to codeql search path 2020-07-13 14:49:01 +01:00
Robert
c3dcf26eaf Merge pull request #103 from github/lgtm_filters
Add support for LGTM_INDEX_FILTERS
2020-07-10 15:47:16 +01:00
Robert Brignull
189b6ef4bf ban / as a path 2020-07-10 15:33:03 +01:00
Robert Brignull
1a4c658bbf Merge branch 'main' into lgtm_filters 2020-07-10 15:01:22 +01:00
Robert
ec154779ac Merge pull request #100 from github/github_proxy
Use @actions/github as a wrapper around octokit in order to support proxies
2020-07-10 14:37:22 +01:00
Robert Brignull
ca775cfb2e remove bypass-proxy test 2020-07-10 12:58:18 +01:00
Robert Brignull
fb9f2af49f adjust comments 2020-07-10 11:08:29 +01:00
Robert Brignull
60126bfb39 ban backslashes 2020-07-09 18:27:46 +01:00
Robert Brignull
24367a89b5 move checking to when env vars are constructed 2020-07-09 18:05:54 +01:00
Robert Brignull
70980b9f32 Make characters completely illegal on windows 2020-07-09 17:40:26 +01:00
Robert Brignull
bf5b437adb output better errors 2020-07-09 17:01:53 +01:00
Robert Brignull
b6efd2e6de Merge remote-tracking branch 'origin/main' into github_proxy 2020-07-09 16:37:52 +01:00
Robert Brignull
8a6b404471 add tests 2020-07-09 16:36:49 +01:00
Robert Brignull
d781c667b1 Merge branch 'main' into lgtm_filters 2020-07-09 10:30:20 +01:00
Robert Brignull
56417be251 filter ** paths 2020-07-08 16:33:00 +01:00
Robert Brignull
abf6f239fa trim leading slashes 2020-07-08 16:22:29 +01:00
Robert Brignull
9fb69dda17 clarify error slightly more 2020-07-08 15:11:29 +01:00
Robert Brignull
dcebdd6441 give better error messages 2020-07-08 15:06:45 +01:00
Robert
56e74b9096 Merge pull request #102 from github/exclude-lib
Exclude lib directory from analysis
2020-07-08 10:32:12 +01:00
Robert Brignull
13ee335beb Merge remote-tracking branch 'origin/main' into github_proxy 2020-07-07 18:34:09 +01:00
Robert Brignull
07caa0f5cf pull out mockGetContents method 2020-07-07 18:32:29 +01:00
Robert Brignull
f77ab09bf4 add sinon types 2020-07-07 18:32:18 +01:00
Robert
8d908eeab3 Update codeql-config.yml 2020-07-07 13:09:32 +01:00
Robert
cfcff89771 Merge pull request #101 from github/workflow_dispatch
Add workflow_dispatch event
2020-07-07 11:39:47 +01:00
Robert Brignull
fe3dbb7e64 Add support for LGTM_INDEX_FILTERS 2020-07-07 11:37:56 +01:00
Robert
1aeb7665e7 Add workflow_dispatch event 2020-07-07 10:24:41 +01:00
Robert Brignull
0086c2ecdb use @actions/github 2020-07-06 16:25:26 +01:00
Sam Partington
60fdcc2376 Merge pull request #99 from github/update-v1-8947510a
Merge main into v1
2020-07-06 15:17:26 +01:00
Robert
9da537eb33 Merge pull request #93 from github/codeql_mock
Introduce wrapper around codeql
2020-07-06 10:38:41 +01:00
Robert Brignull
5ab09ae291 Make parameter names more descriptive 2020-07-02 14:45:14 +01:00
Robert Brignull
c41d287cae Introduce wrapper around codeql 2020-07-02 14:25:08 +01:00
Sam Partington
8947510a57 Merge pull request #96 from github/pr-template-test-builds
Remove test builds section of PR template
2020-07-02 14:23:33 +01:00
Sam Partington
5d84e87b3d Merge branch 'main' into pr-template-test-builds 2020-07-02 14:11:18 +01:00
Sam Partington
9bc459c5f1 Merge pull request #95 from github/merge-help
Add details of who will merge (CONTRIBUTING.md)
2020-07-02 13:46:52 +01:00
Sam Partington
77e9a735f6 Merge branch 'main' into merge-help 2020-07-02 13:42:20 +01:00
Sam Partington
57a57713c3 Remove test builds section of PR template
This is covered by the CI checks now
2020-07-02 13:37:46 +01:00
Sam Partington
a0bf50cb7b Add details of who will merge (CONTRIBUTING.md) 2020-07-02 13:35:29 +01:00
Robert
72803c4251 Merge pull request #90 from github/analysis_key_status
add analysis_key to status reports
2020-07-02 11:48:14 +01:00
Robert
eaf6649611 Merge branch 'main' into analysis_key_status 2020-07-02 11:34:08 +01:00
Sam Partington
55a6f9e0a8 Merge pull request #94 from github/developer-docs
Add development instructions to CONTRIBUTING.md
2020-07-02 11:07:06 +01:00
Sam Partington
dfed1f7eea Point people at init/action.yml for node version
https://github.com/github/codeql-action/pull/94#discussion_r448502825
2020-07-02 10:55:00 +01:00
Sam Partington
580e603e94 Add development instructions to CONTRIBUTING.md 2020-07-01 14:32:04 +01:00
Robert
de7ff148e5 Merge pull request #91 from github/codeql-bundle-20200630
Update codeql bundle
2020-07-01 09:55:41 +01:00
Robert
480467971e Merge branch 'main' into codeql-bundle-20200630 2020-06-30 16:03:24 +01:00
Sam Partington
e2a8f32427 Merge pull request #87 from github/support-remote-config
Allow config files to be from a remote repository
2020-06-30 15:19:23 +01:00
Sam Partington
260a93fe06 Merge branch 'main' into support-remote-config 2020-06-30 14:57:35 +01:00
Sam Partington
dc2678801a Use right SHA in integration test
1bb294af6b (r40266717)
2020-06-30 14:37:27 +01:00
Sam Partington
c953f77bb6 Merge pull request #92 from github/use-checkout-v2
Use v2 of checkout action
2020-06-30 14:33:21 +01:00
Sam Partington
aa6c2c5bda Fix URL in integration test
https://github.com/github/codeql-action/runs/822529558?check_suite_focus=true#step:4:43
2020-06-30 14:32:36 +01:00
Sam Partington
a52f1a55ed Fix workflow name 2020-06-30 14:17:37 +01:00
Sam Partington
1bb294af6b Combine integration tests for simplicity
https://github.com/github/codeql-action/pull/87#issuecomment-651757413
2020-06-30 14:15:51 +01:00
Sam Partington
25a0a6baed Use v2 of checkout action 2020-06-30 14:11:08 +01:00
Sam Partington
4b37db72e4 Add integration test for retrieval of remote config
https://github.com/github/codeql-action/pull/87#pullrequestreview-439357075
2020-06-30 12:22:08 +01:00
Robert
04b2540e30 Update codeql bundle 2020-06-30 11:39:56 +01:00
Robert
010117c1b7 Merge pull request #89 from github/update-v1-a08742f1
Merge main into v1
2020-06-30 10:59:34 +01:00
Robert
e0299c3c04 Merge pull request #88 from github/fail-fast
Remove `strategy: fail-fast`
2020-06-29 12:49:28 +01:00
Robert Brignull
0e3f8311ed add analysis_key to status reports 2020-06-29 11:24:04 +01:00
Sam Partington
ca76a2ca94 Add .DS_Store files from node module
https://github.com/github/codeql-action/pull/87/checks?check_run_id=811678038
2020-06-29 09:18:18 +01:00
Robert
aad14bf2cb Remove strategy: fail-fast 2020-06-29 08:49:16 +01:00
Robin Neatherway
a08742f199 Merge pull request #86 from github/correct-test-description
Correct copy/pasted test description
2020-06-26 18:41:17 +01:00
Sam Partington
6afe41036b Update node modules
https://github.com/github/codeql-action/pull/87/checks?check_run_id=811666672
2020-06-26 16:27:11 +01:00
Sam Partington
ee4cc86b19 Merge branch 'main' into support-remote-config 2020-06-26 16:14:32 +01:00
Sam Partington
0607771cc2 Make remote config retrieval more robust 2020-06-26 16:14:15 +01:00
Robin Neatherway
151d531bd0 Correct copy/pasted test description 2020-06-26 16:01:59 +01:00
Sam Partington
51becd2cf8 Bring error message method name inline with others 2020-06-26 15:44:57 +01:00
Sam Partington
a66f2b0b11 Remove redundant comment 2020-06-26 15:44:13 +01:00
Robin Neatherway
504c8cfc6f Merge pull request #85 from github/non-empty-env-vars
getRequiredEnvParams must be non-empty
2020-06-26 15:43:55 +01:00
Robin Neatherway
a0d4330434 Simplify singleton tests by removing the loop 2020-06-26 15:25:32 +01:00
Sam Partington
7c00663f08 Remove tests of internal function now its behaviour has been verified 2020-06-26 14:46:53 +01:00
Sam Partington
f8c87948ab Use new API client
From https://github.com/github/codeql-action/pull/82
2020-06-26 14:45:37 +01:00
Sam Partington
9566d8c220 Merge branch 'main' into support-remote-config 2020-06-26 13:48:59 +01:00
Sam Partington
366d8a32d1 Retrieve remote configuration where specified 2020-06-26 11:49:00 +01:00
Robin Neatherway
bb9ed79f3d getRequiredEnvParams must be non-empty 2020-06-26 11:44:17 +01:00
Chris Gavin
17548064f9 Merge pull request #82 from github/octokit
Use a single Octokit client for everything rather than a bunch of Octokits and an HTTP client.
2020-06-26 11:03:01 +01:00
Chris Gavin
ef507971e7 Merge branch 'main' into octokit 2020-06-26 10:29:51 +01:00
Robert
96d02d50f7 Merge pull request #84 from github/remove_git_dependency
Fall back to GITHUB_SHA env var if git is not available
2020-06-25 16:55:32 +01:00
Robert Brignull
0fdc2c71e4 fall back to GITHUB_SHA env var if git is not available 2020-06-25 15:53:24 +01:00
Robert
28944b580b Merge pull request #83 from github/aborted_completed_at
Include completed_at when action is aborted
2020-06-25 15:11:12 +01:00
Sam Partington
388403b46e Add a test that an Octokit request is made for remote config 2020-06-25 15:10:17 +01:00
Sam Partington
32c9898fa4 Fix regex 2020-06-25 15:10:17 +01:00
Sam Partington
56292b1fa3 Reset mocks in test so they don't leak into later test 2020-06-25 15:10:17 +01:00
Robert Brignull
50a2815790 Include completed_at when action is aborted 2020-06-25 14:10:28 +01:00
Sam Partington
a19d19e0a3 Add validation of remote config location, no retrieval yet 2020-06-25 13:21:46 +01:00
Sam Partington
153a598a97 Add a new function used to determine where to retrieve config from 2020-06-24 16:15:25 +01:00
Sam Partington
f4cf65ca2d Add a test that Octokit isn't used for local config 2020-06-24 14:42:29 +01:00
Sam Partington
b0af5695e6 Add sinon package for mocking 2020-06-24 14:34:08 +01:00
Sam Partington
43c1bea680 Run npm install so have clear baseline 2020-06-24 14:33:14 +01:00
Alex Kalyvitis
6846c702da Merge pull request #81 from github/report-action-aborted
Report that an action has been aborted on configuration failures
2020-06-24 15:06:35 +02:00
Alex Kalyvitis
559e2600c1 Merge branch 'main' into report-action-aborted 2020-06-24 15:04:07 +02:00
Robert
5bb9e6e131 Merge pull request #79 from github/only-output-on-failure
Only output anything from tests when there's a failure
2020-06-24 14:03:30 +01:00
Chris Gavin
464ce1b43a Manually convert response.data to a JSON string. 2020-06-24 13:50:52 +01:00
Alex Kalyvitis
8530f5b76a add missing semicolon 2020-06-24 14:37:12 +02:00
Alex Kalyvitis
a67896b792 fix typo and throw error when languages are not detected 2020-06-24 14:31:06 +02:00
Robert
b3ffa760ab Merge branch 'main' into only-output-on-failure 2020-06-24 13:13:46 +01:00
Alex Kalyvitis
3871ca717b reformat remaining 4 space indentations 2020-06-24 14:12:51 +02:00
Alex Kalyvitis
a091618158 Merge branch 'main' into report-action-aborted 2020-06-24 14:04:46 +02:00
Robert
04adf2bf60 Merge pull request #80 from github/symlinks_test
Make the temporary directory in tests a symlink
2020-06-24 10:23:06 +01:00
Chris Gavin
74c48f71fa Use a single Octokit client for everything rather than a bunch of Octokits and an HTTP client. 2020-06-23 21:40:42 +01:00
Alex Kalyvitis
b8ac06a9c8 run tslint --fix 2020-06-23 18:41:16 +02:00
Robert Brignull
7581ac8b17 make the temporary directory in tests a symlink 2020-06-23 17:40:54 +01:00
Alex Kalyvitis
af252d2f0d report action has aborted 2020-06-23 18:36:08 +02:00
Robert Brignull
cb384e776b fix indentation 2020-06-23 17:29:15 +01:00
Robert Brignull
403832b950 Merge remote-tracking branch 'origin/main' into only-output-on-failure 2020-06-23 17:18:35 +01:00
Robert Brignull
52e52435f7 handle Uint8Array 2020-06-23 17:17:11 +01:00
Robert
bc21c8f6f3 Merge pull request #77 from nickrolfe/nickrolfe/codeql.exe
Call codeql.exe rather than codeql.cmd wrapper on Windows
2020-06-23 16:39:34 +01:00
Nick Rolfe
9a784b1f57 Merge remote-tracking branch 'upstream/main' into nickrolfe/codeql.exe 2020-06-23 16:01:51 +01:00
Chris Gavin
b3c9d6f3a9 Merge pull request #78 from github/fix-indentation
Make indentation consistent.
2020-06-23 15:40:31 +01:00
Robert
f009c4c924 Merge branch 'main' into nickrolfe/codeql.exe 2020-06-23 15:37:34 +01:00
Nick Rolfe
852d99d8e2 Call codeql.exe rather than codeql.cmd wrapper on Windows 2020-06-23 15:25:45 +01:00
Chris Gavin
052d39e909 Fix some strange formatting. 2020-06-23 14:44:40 +01:00
Chris Gavin
107d8ffc4c Fix a line that's too long. 2020-06-23 14:44:40 +01:00
Chris Gavin
88231094bf Convert all 4-space indented files to 2-space. 2020-06-23 14:44:40 +01:00
Chris Gavin
211ad30f72 Update TSLint configuration to detect bad indentation. 2020-06-23 14:44:36 +01:00
Robert Brignull
350bf488da add semicolon 2020-06-23 14:42:52 +01:00
Chris Gavin
a1d945f14f Add a .editorconfig with our chosen formatting options. 2020-06-23 14:38:30 +01:00
Robert Brignull
bd4042802d Merge remote-tracking branch 'origin/main' into only-output-on-failure 2020-06-23 14:36:53 +01:00
Robert Brignull
02776246bf Only output on failing tests 2020-06-23 14:36:40 +01:00
Robert Brignull
66be268a09 run verbose 2020-06-23 14:36:40 +01:00
Robert Brignull
56f06c77fd add calls 2020-06-23 14:36:40 +01:00
Alex Kalyvitis
98f8945cfb Merge pull request #73 from github/add-analyze-threads-flag
Add threads flag to analyze action
2020-06-23 15:03:08 +02:00
Sam Partington
a30a5ba788 Add silencing to additional test files
https://github.com/github/codeql-action/pull/75#issuecomment-648104201
2020-06-23 13:59:58 +01:00
Alex Kalyvitis
9133b2b54d Merge branch 'main' into add-analyze-threads-flag 2020-06-23 14:46:41 +02:00
Robert
8e098cbb87 Merge pull request #72 from github/release-sorting
Fixing sorting of PRs
2020-06-23 13:06:31 +01:00
Alex Kalyvitis
7ae8c32cbe Merge branch 'main' into add-analyze-threads-flag 2020-06-23 13:22:23 +02:00
Robert
beedd317d2 Merge branch 'main' into release-sorting 2020-06-23 12:13:58 +01:00
Sam Partington
8a67191278 Merge pull request #76 from github/update-release-branch-base
Update release branch base
2020-06-23 10:27:04 +01:00
Sam Partington
1ce7f98898 Update other references to master in release script 2020-06-23 10:10:23 +01:00
Sam Partington
6d413dd723 Update release branch script as main branch is now "main".
See https://github.com/github/dsp-code-scanning/issues/1457
2020-06-23 10:08:23 +01:00
Alex Kalyvitis
31996935e6 reformat code and allow negative values for threads 2020-06-22 21:39:09 +02:00
Alex Kalyvitis
bcb5b28954 format code 2020-06-22 18:55:20 +02:00
Sam Partington
8622312249 Update JavaScript with newer comment 2020-06-22 17:20:29 +01:00
Sam Partington
c0c67ce80f Reduce debug output in tests 2020-06-22 17:13:47 +01:00
Alex Kalyvitis
bc9591a12b revert node_modules from master 2020-06-22 17:20:03 +02:00
Alex Kalyvitis
dcba70915d move functions to util.ts 2020-06-22 17:17:25 +02:00
Alex Kalyvitis
2758bd30c8 avoid floating point division of ram 2020-06-22 14:51:18 +02:00
Alex Kalyvitis
f4001a0790 update dependencies 2020-06-22 13:28:23 +02:00
Alex Kalyvitis
d55f711b71 introduce inputs.threads flag to analyze action 2020-06-22 13:27:03 +02:00
Robert
2845a93f4c Fixing sorting of PRs 2020-06-22 11:27:50 +01:00
Robert
7970d85db4 Merge pull request #71 from github/update-v1-74f864b
Merge master into v1
2020-06-22 10:28:42 +01:00
Alex Kalyvitis
74f864bee1 Merge pull request #69 from github/fix-self-hosted-stale-bundle-download
Use bundle URL version as the cache version
2020-06-19 14:33:53 +02:00
Alex Kalyvitis
38c231113e build ts 2020-06-19 13:41:33 +02:00
Alex Kalyvitis
34c941dc31 Use Object.entries() instead of checking hasOwnProperty
Co-authored-by: Robert <robertbrignull@github.com>
2020-06-19 13:27:45 +02:00
Alex Kalyvitis
5eccb79587 improve regex 2020-06-19 12:07:06 +02:00
Alex Kalyvitis
11a9af0387 update deps again 2020-06-18 19:10:34 +02:00
Alex Kalyvitis
6d036cef6f Merge branch 'master' into fix-self-hosted-stale-bundle-download 2020-06-18 19:08:04 +02:00
Alex Kalyvitis
f9768ac4ba update deps 2020-06-18 18:43:30 +02:00
Alex Kalyvitis
3ff198f23b fix tslint errors 2020-06-18 18:29:25 +02:00
Alex Kalyvitis
ff8fe44e0c compiled js 2020-06-18 16:40:02 +02:00
Alex Kalyvitis
3f2a60be8a switch to semver instead of hash 2020-06-18 16:31:39 +02:00
Alex Kalyvitis
4c6749115a update @actions/tool-cache, install semver, nock 2020-06-18 16:31:13 +02:00
Sam Partington
608ed15968 Merge pull request #67 from github/dont-fail-on-symlinks
Ensure config path comparisons don't fail where workspace path is a symlink
2020-06-18 09:21:27 +01:00
Sam Partington
14f179f70b Merge branch 'master' into dont-fail-on-symlinks 2020-06-17 16:14:36 +01:00
Sam Partington
dc4009c7ed Merge pull request #68 from github/ignore-javascript
Configure VSCode to ignore transpiled JavaScript
2020-06-17 16:14:07 +01:00
Sam Partington
14d602cced Fix test failures introduced by making code more robust 2020-06-17 16:00:19 +01:00
Sam Partington
24096a1cb3 Don't fail if query path doesn't exist 2020-06-17 15:55:14 +01:00
Alex Kalyvitis
74d434c5ca fix lint errors 2020-06-17 16:19:00 +02:00
Alex Kalyvitis
fff3de9938 wip: hash bundle url and use it as the cache version 2020-06-17 16:13:58 +02:00
Sam Partington
1aae76b906 Configure VSCode to ignore transpiled JavaScript 2020-06-17 14:57:29 +01:00
Sam Partington
013c02758e Apply realpathSync sooner
Fixes lint: https://github.com/github/codeql-action/pull/67/checks?check_run_id=777215812
2020-06-16 17:04:30 +01:00
Sam Partington
0b53ebbc36 Fix config path comparisons where workspace path is a symlink
Before this change, config-utils.ts › load non-empty input was failing on Mac with:

The configuration file "/var/folders/gx/y8v1507s29d97m1r_5kq0s000000gn/T/codeql-action-oum66d/input" is invalid: property "queries.uses" is invalid as the local path "" is outside of the repository

The reason is that the tmp directory (which is where the config file was put by the test) was a symlink.
2020-06-16 16:59:15 +01:00
Robert
7496ac4fb3 Merge pull request #62 from github/update-v1-042ab54
Merge master into v1
2020-06-15 16:42:59 +01:00
Robert
c13712badb Merge pull request #60 from github/update-v1-6bd7f17
Merge master into v1
2020-06-15 10:40:53 +01:00
Robert
a30f8542ee Merge pull request #53 from github/update-v1
Update v1 branch
2020-06-04 09:58:53 +01:00
Robert
aca790b504 Merge pull request #51 from github/update-v1
Update v1
2020-06-01 13:09:45 +01:00
Robert
80a5f3c700 Merge pull request #44 from github/merge-master-v1
Update v1 branch to latest master
2020-05-22 10:20:25 +01:00
Robert
999c772fa3 Merge pull request #15 from github/master
Update v1 branch
2020-05-01 17:03:38 +01:00
Arthur Baars
74eb3b3541 Merge pull request #6 from github/master
Merge changes from master into v1
2020-04-29 15:06:15 +02:00
15099 changed files with 2575479 additions and 1048573 deletions

10
.editorconfig Normal file
View File

@@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
indent_style = space
indent_size = 2

4
.eslintignore Normal file
View File

@@ -0,0 +1,4 @@
**/webpack.config.js
lib/**
src/testdata/**
tests/**

77
.eslintrc.json Normal file
View File

@@ -0,0 +1,77 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "filenames", "github", "import", "no-async-foreach"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:github/recommended",
"plugin:github/typescript",
"plugin:import/typescript"
],
"rules": {
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"],
"i18n-text/no-en": "off",
"import/extensions": ["error", {
// Allow importing JSON files
"json": {}
}],
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-cycle": "error",
"import/no-dynamic-require": "error",
// Disable the rule that checks that devDependencies aren't imported since we use a single
// linting configuration file for both source and test code.
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"import/no-namespace": "off",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
"import/order": ["error", {
"alphabetize": {"order": "asc"},
"newlines-between": "always"
}],
"max-len": ["error", {
"code": 120,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-async-foreach/no-async-foreach": "error",
"no-console": "off",
"no-sequences": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"one-var": ["error", "never"]
},
"overrides": [{
// "temporarily downgraded during transition to eslint
"files": "**",
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"func-style": "off",
"sort-imports": "off"
}
}],
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src"]
},
"typescript": {}
}
}
}

3
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,3 @@
# .git-blame-ignore-revs
# Added trailing commas to adhere to new eslint rules
b16296be30e150034524d6dd0b0418fc6b184267

8
.gitattributes vendored
View File

@@ -1 +1,9 @@
lib/*.js linguist-generated=true
.github/workflows/__* linguist-generated=true
# Reduce incidence of needless merge conflicts on CHANGELOG.md
# The man page at
# https://mirrors.edge.kernel.org/pub/software/scm/git/docs/gitattributes.html
# suggests that this might interleave lines arbitrarily, but empirically
# it keeps added chunks contiguous
CHANGELOG.md merge=union

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Contact GitHub Support
url: https://support.github.com/contact?subject=Code+Scanning+Beta+Support&tags=code-scanning-support
about: Contact Support about code scanning
url: https://support.github.com/request
about: Contact Support

View File

@@ -0,0 +1,62 @@
name: Check Code-Scanning Config
description: |
Checks the code scanning configuration file generated by the
action to ensure it contains the expected contents
inputs:
languages:
required: false
description: The languages field passed to the init action.
packs:
required: false
description: The packs field passed to the init action.
queries:
required: false
description: The queries field passed to the init action.
config-file-test:
required: false
description: |
The location of the config file to use. If empty,
then no config file is used.
expected-config-file-contents:
required: true
description: |
A JSON string containing the exact contents of the config file.
tools:
required: true
description: |
The url of codeql to use.
runs:
using: composite
steps:
- uses: ./../action/init
with:
languages: ${{ inputs.languages }}
config-file: ${{ inputs.config-file-test }}
queries: ${{ inputs.queries }}
packs: ${{ inputs.packs }}
tools: ${{ inputs.tools }}
db-location: ${{ runner.temp }}/codescanning-config-cli-test
env:
CODEQL_ACTION_TEST_MODE: 'true'
- name: Install dependencies
shell: bash
run: npm install --location=global ts-node js-yaml
- name: Check config
working-directory: ${{ github.action_path }}
shell: bash
run: ts-node ./index.ts "${{ runner.temp }}/user-config.yaml" '${{ inputs.expected-config-file-contents }}'
- name: Clean up
shell: bash
if: always()
run: |
rm -rf ${{ runner.temp }}/codescanning-config-cli-test
rm -rf ${{ runner.temp }}/user-config.yaml

View File

@@ -0,0 +1,39 @@
import * as core from '@actions/core'
import * as yaml from 'js-yaml'
import * as fs from 'fs'
import * as assert from 'assert'
const actualConfig = loadActualConfig()
const rawExpectedConfig = process.argv[3].trim()
if (!rawExpectedConfig) {
core.info('No expected configuration provided')
} else {
core.startGroup('Expected generated user config')
core.info(yaml.dump(JSON.parse(rawExpectedConfig)))
core.endGroup()
}
const expectedConfig = rawExpectedConfig ? JSON.parse(rawExpectedConfig) : undefined;
assert.deepStrictEqual(
actualConfig,
expectedConfig,
'Expected configuration does not match actual configuration'
);
function loadActualConfig() {
if (!fs.existsSync(process.argv[2])) {
core.info('No configuration file found')
return undefined
} else {
const rawActualConfig = fs.readFileSync(process.argv[2], 'utf8')
core.startGroup('Actual generated user config')
core.info(rawActualConfig)
core.endGroup()
return yaml.load(rawActualConfig)
}
}

20
.github/actions/check-sarif/action.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Check SARIF
description: Checks a SARIF file to see if certain queries were run and others were not run.
inputs:
sarif-file:
required: true
description: The SARIF file to check
queries-run:
required: true
description: |
Comma separated list of query ids that should be included in this SARIF file.
queries-not-run:
required: true
description: |
Comma separated list of query ids that should NOT be included in this SARIF file.
runs:
using: node16
main: index.js

43
.github/actions/check-sarif/index.js vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict'
const core = require('@actions/core')
const fs = require('fs')
const sarif = JSON.parse(fs.readFileSync(core.getInput('sarif-file'), 'utf8'))
const rules = sarif.runs[0].tool.extensions.flatMap(ext => ext.rules || [])
const ruleIds = rules.map(rule => rule.id)
// Check that all the expected queries ran
const expectedQueriesRun = getQueryIdsInput('queries-run')
const queriesThatShouldHaveRunButDidNot = expectedQueriesRun.filter(queryId => !ruleIds.includes(queryId))
if (queriesThatShouldHaveRunButDidNot.length > 0) {
core.setFailed(`The following queries were expected to run but did not: ${queriesThatShouldHaveRunButDidNot.join(', ')}`)
}
// Check that all the unexpected queries did not run
const expectedQueriesNotRun = getQueryIdsInput('queries-not-run')
const queriesThatShouldNotHaveRunButDid = expectedQueriesNotRun.filter(queryId => ruleIds.includes(queryId))
if (queriesThatShouldNotHaveRunButDid.length > 0) {
core.setFailed(`The following queries were NOT expected to have run but did: ${queriesThatShouldNotHaveRunButDid.join(', ')}`)
}
core.startGroup('All queries run')
rules.forEach(rule => {
core.info(`${rule.id}: ${(rule.properties && rule.properties.name) || rule.name}`)
})
core.endGroup()
core.startGroup('Full SARIF')
core.info(JSON.stringify(sarif, null, 2))
core.endGroup()
function getQueryIdsInput(name) {
return core.getInput(name)
.split(',')
.map(q => q.trim())
.filter(q => q.length > 0)
}

60
.github/actions/prepare-test/action.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: "Prepare test"
description: Performs some preparation to run tests
inputs:
version:
description: "The version of the CodeQL CLI to use. Can be 'latest', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
required: true
use-all-platform-bundle:
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
default: 'false'
required: false
outputs:
tools-url:
description: "The value that should be passed as the 'tools' input of the 'init' step."
value: ${{ steps.get-url.outputs.tools-url }}
runs:
using: composite
steps:
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
mv ../action/.github/workflows .github
- id: get-url
name: Determine URL
shell: bash
run: |
set -e # Fail this Action if `gh release list` fails.
if [[ ${{ inputs.use-all-platform-bundle }} == "true" ]]; then
artifact_name="codeql-bundle.tar.gz"
elif [[ "$RUNNER_OS" == "Linux" ]]; then
artifact_name="codeql-bundle-linux64.tar.gz"
elif [[ "$RUNNER_OS" == "macOS" ]]; then
artifact_name="codeql-bundle-osx64.tar.gz"
elif [[ "$RUNNER_OS" == "Windows" ]]; then
artifact_name="codeql-bundle-win64.tar.gz"
else
echo "::error::Unrecognized OS $RUNNER_OS"
exit 1
fi
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version-manual/$artifact_name" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.version }} == "latest" ]]; then
echo "tools-url=latest" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.version }} == "default" ]]; then
echo "tools-url=" >> $GITHUB_OUTPUT
else
echo "::error::Unrecognized version specified!"
exit 1
fi

View File

@@ -0,0 +1,54 @@
name: Query Filter Test
description: Runs a test of query filters using the check SARIF action
inputs:
sarif-file:
required: true
description: The SARIF file to check
queries-run:
required: true
description: |
Comma separated list of query ids that should be included in this SARIF file.
queries-not-run:
required: true
description: |
Comma separated list of query ids that should NOT be included in this SARIF file.
config-file:
required: true
description: |
The location of the codeql configuration file to use.
tools:
required: true
description: |
The url of codeql to use.
runs:
using: composite
steps:
- uses: ./../action/init
with:
languages: javascript
config-file: ${{ inputs.config-file }}
tools: ${{ inputs.tools }}
db-location: ${{ runner.temp }}/query-filter-test
env:
CODEQL_ACTION_TEST_MODE: "true"
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: never
env:
CODEQL_ACTION_TEST_MODE: "true"
- name: Check SARIF
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ inputs.sarif-file }}
queries-run: ${{ inputs.queries-run}}
queries-not-run: ${{ inputs.queries-not-run}}
- name: Cleanup after test
shell: bash
run: rm -rf "$RUNNER_TEMP/results" "$RUNNER_TEMP/query-filter-test"

37
.github/actions/setup-swift/action.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: "Set up Swift on Linux"
description: Sets up an appropriate Swift version on Linux.
inputs:
codeql-path:
description: Path to the CodeQL CLI executable.
required: true
runs:
using: "composite"
steps:
- name: Get Swift version
id: get_swift_version
if: runner.os == 'Linux'
shell: bash
env:
CODEQL_PATH: ${{ inputs.codeql-path }}
run: |
SWIFT_EXTRACTOR_DIR="$("$CODEQL_PATH" resolve languages --format json | jq -r '.swift[0]')"
if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then
VERSION="null"
else
VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/linux64/extractor" --version | awk '/version/ { print $3 }')"
# Specify 5.x.0, otherwise setup Action will default to latest minor version.
if [ $VERSION = "5.7" ]; then
VERSION="5.7.0"
elif [ $VERSION = "5.8" ]; then
VERSION="5.8.0"
# setup-swift does not yet support v5.8.1 Remove this when it does.
elif [ $VERSION = "5.8.1" ]; then
VERSION="5.8.0"
fi
fi
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.
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
with:
swift-version: "${{ steps.get_swift_version.outputs.version }}"

View File

@@ -0,0 +1,14 @@
name: Update default CodeQL bundle
description: Updates 'src/defaults.json' to point to a new CodeQL bundle release.
runs:
using: composite
steps:
- name: Install ts-node
shell: bash
run: npm install -g ts-node
- name: Run update script
working-directory: ${{ github.action_path }}
shell: bash
run: ts-node ./index.ts

67
.github/actions/update-bundle/index.ts vendored Normal file
View File

@@ -0,0 +1,67 @@
import * as fs from 'fs';
import * as github from '@actions/github';
interface BundleInfo {
bundleVersion: string;
cliVersion: string;
}
interface Defaults {
bundleVersion: string;
cliVersion: string;
priorBundleVersion: string;
priorCliVersion: string;
}
function getCodeQLCliVersionForRelease(release): string {
// We do not currently tag CodeQL bundles based on the CLI version they contain.
// Instead, we use a marker file `cli-version-<version>.txt` to record the CLI version.
// This marker file is uploaded as a release asset for all new CodeQL bundles.
const cliVersionsFromMarkerFiles = release.assets
.map((asset) => asset.name.match(/cli-version-(.*)\.txt/)?.[1])
.filter((v) => v)
.map((v) => v as string);
if (cliVersionsFromMarkerFiles.length > 1) {
throw new Error(
`Release ${release.tag_name} has multiple CLI version marker files.`
);
} else if (cliVersionsFromMarkerFiles.length === 0) {
throw new Error(
`Failed to find the CodeQL CLI version for release ${release.tag_name}.`
);
}
return cliVersionsFromMarkerFiles[0];
}
async function getBundleInfoFromRelease(release): Promise<BundleInfo> {
return {
bundleVersion: release.tag_name,
cliVersion: getCodeQLCliVersionForRelease(release)
};
}
async function getNewDefaults(currentDefaults: Defaults): Promise<Defaults> {
const release = github.context.payload.release;
console.log('Updating default bundle as a result of the following release: ' +
`${JSON.stringify(release)}.`)
const bundleInfo = await getBundleInfoFromRelease(release);
return {
bundleVersion: bundleInfo.bundleVersion,
cliVersion: bundleInfo.cliVersion,
priorBundleVersion: currentDefaults.bundleVersion,
priorCliVersion: currentDefaults.cliVersion
};
}
async function main() {
const previousDefaults: Defaults = JSON.parse(fs.readFileSync('../../../src/defaults.json', 'utf8'));
const newDefaults = await getNewDefaults(previousDefaults);
// Update the source file in the repository. Calling workflows should subsequently rebuild
// the Action to update `lib/defaults.json`.
fs.writeFileSync('../../../src/defaults.json', JSON.stringify(newDefaults, null, 2) + "\n");
}
// Ideally, we'd await main() here, but that doesn't work well with `ts-node`.
// So instead we rely on the fact that Node won't exit until the event loop is empty.
main();

View File

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

36
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
labels:
- Update dependencies
# Ignore incompatible dependency updates
ignore:
# There is a type incompatibility issue between v0.0.9 and our other dependencies.
- dependency-name: "@octokit/plugin-retry"
versions: ["~6.0.0"]
# v7 requires ESM
- dependency-name: "del"
versions: ["^7.0.0"]
groups:
npm:
patterns:
- "*"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
groups:
actions:
patterns:
- "*"
- package-ecosystem: github-actions
directory: "/.github/actions/setup-swift/" # All subdirectories outside of "/.github/workflows" must be explicitly included.
schedule:
interval: weekly
groups:
actions-setup-swift:
patterns:
- "*"

View File

@@ -1,7 +1,5 @@
### Merge / deployment checklist
- Run test builds as necessary. Can be on this repository or elsewhere as needed in order to test the change - please include links to tests in other repos!
- [ ] CodeQL using init/analyze actions
- [ ] 3rd party tool using upload action
- [ ] Confirm this change is backwards compatible with existing workflows.
- [ ] Confirm the [readme](https://github.com/github/codeql-action/blob/master/README.md) has been updated if necessary.
- [ ] Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) has been updated if necessary.
- [ ] Confirm the [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) has been updated if necessary.

View File

@@ -1,101 +1,111 @@
import argparse
import datetime
from github import Github
import random
import requests
import json
import os
import subprocess
import sys
# The branch being merged from.
# This is the one that contains day-to-day development work.
MASTER_BRANCH = 'master'
# The branch being merged into.
# This is the release branch that users reference.
LATEST_RELEASE_BRANCH = 'v1'
EMPTY_CHANGELOG = """# CodeQL Action Changelog
## [UNRELEASED]
No user facing changes.
"""
SOURCE_BRANCH = 'main'
TARGET_BRANCH = 'releases/v2'
# Name of the remote
ORIGIN = 'origin'
# Runs git with the given args and returns the stdout.
# Raises an error if git does not exit successfully.
def run_git(*args):
# Raises an error if git does not exit successfully (unless passed
# allow_non_zero_exit_code=True).
def run_git(*args, allow_non_zero_exit_code=False):
cmd = ['git', *args]
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if (p.returncode != 0):
raise Exception('Call to ' + ' '.join(cmd) + ' exited with code ' + str(p.returncode) + ' stderr:' + p.stderr.decode('ascii'))
if not allow_non_zero_exit_code and p.returncode != 0:
raise Exception(f'Call to {" ".join(cmd)} exited with code {p.returncode} stderr: {p.stderr.decode("ascii")}.')
return p.stdout.decode('ascii')
# Returns true if the given branch exists on the origin remote
def branch_exists_on_remote(branch_name):
return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != ''
# Opens a PR from the given branch to the release branch
def open_pr(repo, all_commits, short_master_sha, branch_name):
# 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):
# Sort the commits into the pull requests that introduced them,
# and any commits that don't have a pull request
pull_requests = []
commits_without_pull_requests = []
for commit in all_commits:
pr = get_pr_for_commit(repo, commit)
pr = get_pr_for_commit(commit)
if pr is None:
commits_without_pull_requests.append(commit)
elif not any(p for p in pull_requests if p.number == pr.number):
pull_requests.append(pr)
print('Found ' + str(len(pull_requests)) + ' pull requests')
print('Found ' + str(len(commits_without_pull_requests)) + ' commits not in a pull request')
print(f'Found {len(pull_requests)} pull requests.')
print(f'Found {len(commits_without_pull_requests)} commits not in a pull request.')
# Sort PRs and commits by age
sorted(pull_requests, key=lambda pr: pr.number)
sorted(commits_without_pull_requests, key=lambda c: c.commit.author.date)
pull_requests = sorted(pull_requests, key=lambda pr: pr.number)
commits_without_pull_requests = sorted(commits_without_pull_requests, key=lambda c: c.commit.author.date)
# Start constructing the body text
body = 'Merging ' + short_master_sha + ' into ' + LATEST_RELEASE_BRANCH
body = []
body.append(f'Merging {source_branch_short_sha} into {TARGET_BRANCH}.')
conductor = get_conductor(repo, pull_requests, commits_without_pull_requests)
body += '\n\nConductor for this PR is @' + conductor
body.append('')
body.append(f'Conductor for this PR is @{conductor}.')
# List all PRs merged
if len(pull_requests) > 0:
body += '\n\nContains the following pull requests:'
body.append('')
body.append('Contains the following pull requests:')
for pr in pull_requests:
merger = get_merger_of_pr(repo, pr)
body += '\n- #' + str(pr.number)
body += ' - ' + pr.title
body += ' (@' + merger + ')'
body.append(f'- #{pr.number} (@{merger})')
# List all commits not part of a PR
if len(commits_without_pull_requests) > 0:
body += '\n\nContains the following commits not from a pull request:'
body.append('')
body.append('Contains the following commits not from a pull request:')
for commit in commits_without_pull_requests:
body += '\n- ' + commit.sha
body += ' - ' + get_truncated_commit_message(commit)
body += ' (@' + commit.author.login + ')'
author_description = f' (@{commit.author.login})' if commit.author is not None else ''
body.append(f'- {commit.sha} - {get_truncated_commit_message(commit)}{author_description}')
title = 'Merge ' + MASTER_BRANCH + ' into ' + LATEST_RELEASE_BRANCH
body.append('')
body.append('Please do the following:')
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(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(' - [ ] 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}'
# Create the pull request
pr = repo.create_pull(title=title, body=body, head=branch_name, base=LATEST_RELEASE_BRANCH)
print('Created PR #' + str(pr.number))
# 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.
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}')
# Assign the conductor
pr.add_to_assignees(conductor)
print('Assigned PR to ' + conductor)
print(f'Assigned PR to {conductor}')
# Gets the person who should be in charge of the mergeback PR
def get_conductor(repo, pull_requests, other_commits):
# If there are any PRs then use whoever merged the last one
if len(pull_requests) > 0:
return get_merger_of_pr(repo, pull_requests[-1])
# Otherwise take the author of the latest commit
return other_commits[-1].author.login
# Gets a list of the SHAs of all commits that have happened on master
# since the release branched off.
# This will not include any commits that exist on the release branch
# that aren't on master.
# Gets a list of the SHAs of all commits that have happened on the source branch
# since the last release to the target branch.
# This will not include any commits that exist on the target branch
# that aren't on the source branch.
def get_commit_difference(repo):
commits = run_git('log', '--pretty=format:%H', ORIGIN + '/' + LATEST_RELEASE_BRANCH + '...' + MASTER_BRANCH).strip().split('\n')
# Passing split nothing means that the empty string splits to nothing: compare `''.split() == []`
# to `''.split('\n') == ['']`.
commits = run_git('log', '--pretty=format:%H', f'{ORIGIN}/{TARGET_BRANCH}..{ORIGIN}/{SOURCE_BRANCH}').strip().split()
# Convert to full-fledged commit objects
commits = [repo.get_commit(c) for c in commits]
@@ -105,26 +115,26 @@ def get_commit_difference(repo):
# Is the given commit the automatic merge commit from when merging a PR
def is_pr_merge_commit(commit):
return commit.committer.login == 'web-flow' and len(commit.parents) > 1
return commit.committer is not None and commit.committer.login == 'web-flow' and len(commit.parents) > 1
# Gets a copy of the commit message that should display nicely
def get_truncated_commit_message(commit):
message = commit.commit.message.split('\n')[0]
if len(message) > 60:
return message[:57] + '...'
return f'{message[:57]}...'
else:
return message
# Converts a commit into the PR that introduced it to the master branch.
# Converts a commit into the PR that introduced it to the source branch.
# Returns the PR object, or None if no PR could be found.
def get_pr_for_commit(repo, commit):
def get_pr_for_commit(commit):
prs = commit.get_pulls()
if prs.totalCount > 0:
# In the case that there are multiple PRs, return the earliest one
prs = list(prs)
sorted(prs, key=lambda pr: int(pr.number))
return prs[0]
sorted_prs = sorted(prs, key=lambda pr: int(pr.number))
return sorted_prs[0]
else:
return None
@@ -135,44 +145,103 @@ def get_pr_for_commit(repo, commit):
def get_merger_of_pr(repo, pr):
return repo.get_commit(pr.merge_commit_sha).author.login
def main():
if len(sys.argv) != 3:
raise Exception('Usage: update-release.branch.py <github token> <repository nwo>')
github_token = sys.argv[1]
repository_nwo = sys.argv[2]
def get_current_version():
with open('package.json', 'r') as f:
return json.load(f)['version']
repo = Github(github_token).get_repo(repository_nwo)
def get_today_string():
today = datetime.datetime.today()
return '{:%d %b %Y}'.format(today)
def update_changelog(version):
if (os.path.exists('CHANGELOG.md')):
content = ''
with open('CHANGELOG.md', 'r') as f:
content = f.read()
else:
content = EMPTY_CHANGELOG
newContent = content.replace('[UNRELEASED]', f'{version} - {get_today_string()}', 1)
with open('CHANGELOG.md', 'w') as f:
f.write(newContent)
def main():
parser = argparse.ArgumentParser('update-release-branch.py')
parser.add_argument(
'--github-token',
type=str,
required=True,
help='GitHub token, typically from GitHub Actions.'
)
parser.add_argument(
'--repository-nwo',
type=str,
required=True,
help='The nwo of the repository, for example github/codeql-action.'
)
parser.add_argument(
'--conductor',
type=str,
required=True,
help='The GitHub handle of the person who is conducting the release process.'
)
args = parser.parse_args()
repo = Github(args.github_token).get_repo(args.repository_nwo)
version = get_current_version()
# Print what we intend to go
print('Considering difference between ' + MASTER_BRANCH + ' and ' + LATEST_RELEASE_BRANCH)
short_master_sha = run_git('rev-parse', '--short', MASTER_BRANCH).strip()
print('Current head of ' + MASTER_BRANCH + ' is ' + short_master_sha)
print(f'Considering difference between {SOURCE_BRANCH} and {TARGET_BRANCH}...')
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}.')
# See if there are any commits to merge in
commits = get_commit_difference(repo)
commits = get_commit_difference(repo=repo)
if len(commits) == 0:
print('No commits to merge from ' + MASTER_BRANCH + ' to ' + LATEST_RELEASE_BRANCH)
print(f'No commits to merge from {SOURCE_BRANCH} to {TARGET_BRANCH}.')
return
# 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
# exists we can assume we don't need to recreate it.
new_branch_name = 'update-' + LATEST_RELEASE_BRANCH + '-' + short_master_sha
print('Branch name is ' + new_branch_name)
new_branch_name = f'update-v{version}-{source_branch_short_sha}'
print(f'Branch name is {new_branch_name}.')
# Check if the branch already exists. If so we can abort as this script
# has already run on this combination of branches.
if branch_exists_on_remote(new_branch_name):
print('Branch ' + new_branch_name + ' already exists. Nothing to do.')
print(f'Branch {new_branch_name} already exists. Nothing to do.')
return
# Create the new branch and push it to the remote
print('Creating branch ' + new_branch_name)
run_git('checkout', '-b', new_branch_name, MASTER_BRANCH)
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,
# 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)
# Open a PR to update the branch
open_pr(repo, commits, short_master_sha, new_branch_name)
open_pr(
repo,
commits,
source_branch_short_sha,
new_branch_name,
conductor=args.conductor,
)
if __name__ == '__main__':
main()

67
.github/workflows/__all-platform-bundle.yml generated vendored Normal file
View File

@@ -0,0 +1,67 @@
# 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 - All-platform bundle
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:
all-platform-bundle:
strategy:
matrix:
include:
- os: ubuntu-latest
version: nightly-latest
name: All-platform bundle
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: 'true'
- 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
- id: init
uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
env:
CODEQL_ACTION_TEST_MODE: true

108
.github/workflows/__analyze-ref-input.yml generated vendored Normal file
View File

@@ -0,0 +1,108 @@
# 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 - Analyze: 'ref' and 'sha' from inputs"
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:
analyze-ref-input:
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: "Analyze: 'ref' and 'sha' from inputs"
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:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
env:
CODEQL_ACTION_TEST_MODE: true

82
.github/workflows/__autobuild-action.yml generated vendored Normal file
View File

@@ -0,0 +1,82 @@
# 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 - autobuild-action
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:
autobuild-action:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
name: autobuild-action
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: csharp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
env:
# Explicitly disable the CLR tracer.
COR_ENABLE_PROFILING: ''
COR_PROFILER: ''
COR_PROFILER_PATH_64: ''
CORECLR_ENABLE_PROFILING: ''
CORECLR_PROFILER: ''
CORECLR_PROFILER_PATH_64: ''
- uses: ./../action/analyze
with:
upload-database: false
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then
echo "Did not find a C# database"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

106
.github/workflows/__config-export.yml generated vendored Normal file
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 - Config export
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:
config-export:
strategy:
matrix:
include:
- 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: Config export
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
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: config-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check config properties appear in SARIF
uses: actions/github-script@v6
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with:
script: |
const fs = require('fs');
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
const run = sarif.runs[0];
const configSummary = run.properties.codeqlConfigSummary;
if (configSummary === undefined) {
core.setFailed('`codeqlConfigSummary` property not found in the SARIF run property bag.');
}
if (configSummary.disableDefaultQueries !== false) {
core.setFailed('`disableDefaultQueries` property incorrect: expected false, got ' +
`${JSON.stringify(configSummary.disableDefaultQueries)}.`);
}
const expectedQueries = [{ type: 'builtinSuite', uses: 'security-extended' }];
// Use JSON.stringify to deep-equal the arrays.
if (JSON.stringify(configSummary.queries) !== JSON.stringify(expectedQueries)) {
core.setFailed(`\`queries\` property incorrect: expected ${JSON.stringify(expectedQueries)}, got ` +
`${JSON.stringify(configSummary.queries)}.`);
}
core.info('Finished config export tests.');
env:
CODEQL_PASS_CONFIG_TO_CLI: true
CODEQL_ACTION_TEST_MODE: true

152
.github/workflows/__diagnostics-export.yml generated vendored Normal file
View File

@@ -0,0 +1,152 @@
# 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 - Diagnostic export
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:
diagnostics-export:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-20230317
- os: macos-latest
version: stable-20230317
- os: windows-latest
version: stable-20230317
- 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: Diagnostic export
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
id: init
with:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Add test diagnostics
shell: bash
env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: |
for i in {1..2}; do
# Use the same location twice to test the workaround for the bug in CodeQL CLI 2.12.5 that
# produces an invalid diagnostic with multiple identical location objects.
"$CODEQL_PATH" database add-diagnostic \
"$RUNNER_TEMP/codeql_databases/javascript" \
--file-path /path/to/file \
--plaintext-message "Plaintext message $i" \
--source-id "lang/diagnostics/example" \
--source-name "Diagnostic name" \
--ready-for-status-page
done
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Upload SARIF
uses: actions/upload-artifact@v3
with:
name: diagnostics-export-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check diagnostics appear in SARIF
uses: actions/github-script@v6
env:
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
with:
script: |
const fs = require('fs');
function checkStatusPageNotification(n) {
const expectedMessage = 'Plaintext message 1\n\nCodeQL also found 1 other diagnostic like this. See the workflow log for details.';
if (n.message.text !== expectedMessage) {
core.setFailed(`Expected the status page diagnostic to have the message '${expectedMessage}', but found '${n.message.text}'.`);
}
if (n.locations.length !== 1) {
core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`);
}
}
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 === 'lang/diagnostics/example' && 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)}.`
);
}
checkStatusPageNotification(statusPageNotifications[0]);
const notifications = run.tool.driver.notifications;
const diagnosticNotification = notifications.filter(n =>
n.id === 'lang/diagnostics/example' && n.name === 'lang/diagnostics/example' &&
n.fullDescription.text === 'Diagnostic name'
);
if (diagnosticNotification.length !== 1) {
core.setFailed(
'Expected exactly one notification for this diagnostic in the ' +
`'runs[].tool.driver.notifications[]' SARIF property, but found ` +
`${diagnosticNotification.length}. All notifications: ` +
`${JSON.stringify(notifications)}.`
);
}
core.info('Finished diagnostic export test');
env:
CODEQL_ACTION_EXPORT_DIAGNOSTICS: true
CODEQL_ACTION_TEST_MODE: true

View File

@@ -0,0 +1,102 @@
# 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 - Export file baseline information
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:
export-file-baseline-information:
strategy:
matrix:
include:
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: Export file baseline information
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
id: init
with:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
env:
CODEQL_FILE_BASELINE_INFORMATION: true
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
env:
CODEQL_FILE_BASELINE_INFORMATION: true
- name: Upload SARIF
uses: actions/upload-artifact@v3
with:
name: with-baseline-information-${{ matrix.os }}-${{ matrix.version }}.sarif.json
path: ${{ runner.temp }}/results/javascript.sarif
retention-days: 7
- name: Check results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
expected_baseline_languages="cpp cs go java js py rb"
if [[ $RUNNER_OS != "Windows" ]]; then
expected_baseline_languages+=" swift"
fi
for lang in ${expected_baseline_languages}; do
rule_name="${lang}/baseline/expected-extracted-files"
found_notification=$(jq --arg rule_name "${rule_name}" '[.runs[0].tool.driver.notifications |
select(. != null) | flatten | .[].id] | any(. == $rule_name)' javascript.sarif)
if [[ "${found_notification}" != "true" ]]; then
echo "Expected SARIF output to contain notification '${rule_name}', but found no such notification."
exit 1
else
echo "Found notification '${rule_name}'."
fi
done
env:
CODEQL_ACTION_TEST_MODE: true

78
.github/workflows/__extractor-ram-threads.yml generated vendored Normal file
View File

@@ -0,0 +1,78 @@
# 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 - Extractor ram and threads options test
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:
extractor-ram-threads:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
name: Extractor ram and threads options test
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: java
ram: 230
threads: 1
- name: Assert Results
shell: bash
run: |
if [ "${CODEQL_RAM}" != "230" ]; then
echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230"
exit 1
fi
if [ "${CODEQL_EXTRACTOR_JAVA_RAM}" != "230" ]; then
echo "CODEQL_EXTRACTOR_JAVA_RAM is '${CODEQL_EXTRACTOR_JAVA_RAM}' instead of 230"
exit 1
fi
if [ "${CODEQL_THREADS}" != "1" ]; then
echo "CODEQL_THREADS is '${CODEQL_THREADS}' instead of 1"
exit 1
fi
if [ "${CODEQL_EXTRACTOR_JAVA_THREADS}" != "1" ]; then
echo "CODEQL_EXTRACTOR_JAVA_THREADS is '${CODEQL_EXTRACTOR_JAVA_THREADS}' instead of 1"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

106
.github/workflows/__go-custom-queries.yml generated vendored Normal file
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: Custom 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:
go-custom-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: 'Go: Custom 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: go
config-file: ./.github/codeql/custom-queries.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

101
.github/workflows/__go-tracing-autobuilder.yml generated vendored Normal file
View File

@@ -0,0 +1,101 @@
# 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: tracing with autobuilder step'
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:
go-tracing-autobuilder:
strategy:
matrix:
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
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with autobuilder step'
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: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
echo "Expected the Go autobuilder to be run, but the" \
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was not true."
exit 1
fi
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d go ]]; then
echo "Did not find a Go database"
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

105
.github/workflows/__go-tracing-custom-build-steps.yml generated vendored Normal file
View File

@@ -0,0 +1,105 @@
# 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: tracing with custom build steps'
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:
go-tracing-custom-build-steps:
strategy:
matrix:
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
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with custom build steps'
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: 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: |
# 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

95
.github/workflows/__go-tracing-legacy-workflow.yml generated vendored Normal file
View File

@@ -0,0 +1,95 @@
# 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: tracing with legacy workflow'
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:
go-tracing-legacy-workflow:
strategy:
matrix:
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
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: 'Go: tracing with legacy workflow'
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: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d go ]]; then
echo "Did not find a Go database"
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

134
.github/workflows/__init-with-registries.yml generated vendored Normal file
View File

@@ -0,0 +1,134 @@
# 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 - Packaging: Download using registries'
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:
init-with-registries:
strategy:
matrix:
include:
- 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: 'Packaging: Download using registries'
permissions:
contents: read
packages: read
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
- name: Init with registries
uses: ./../action/init
with:
db-location: ${{ runner.temp }}/customDbLocation
tools: ${{ steps.prepare-test.outputs.tools-url }}
config-file: ./.github/codeql/codeql-config-registries.yml
languages: javascript
registries: |
- url: "https://ghcr.io/v2/"
packages: "*/*"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Verify packages installed
shell: bash
run: |
PRIVATE_PACK="$HOME/.codeql/packages/codeql-testing/private-pack"
CODEQL_PACK1="$HOME/.codeql/packages/codeql-testing/codeql-pack1"
if [[ -d $PRIVATE_PACK ]]
then
echo "$PRIVATE_PACK was installed."
else
echo "::error $PRIVATE_PACK pack was not installed."
exit 1
fi
if [[ -d $CODEQL_PACK1 ]]
then
echo "$CODEQL_PACK1 was installed."
else
echo "::error $CODEQL_PACK1 pack was not installed."
exit 1
fi
- name: Verify qlconfig.yml file was created
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
if [[ -f $QLCONFIG_PATH ]]
then
echo "qlconfig.yml file was created."
else
echo "::error qlconfig.yml file was not created."
exit 1
fi
- name: Verify contents of qlconfig.yml
# yq is not available on windows
if: runner.os != 'Windows'
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'
if [[ $? -eq 0 ]]
then
echo "Registry was added to qlconfig.yml file."
else
echo "::error Registry was not added to qlconfig.yml file."
echo "Contents of qlconfig.yml file:"
cat $QLCONFIG_PATH
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

81
.github/workflows/__javascript-source-root.yml generated vendored Normal file
View File

@@ -0,0 +1,81 @@
# 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 - Custom source root
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:
javascript-source-root:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: nightly-latest
name: Custom source root
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
- name: Move codeql-action
shell: bash
run: |
mkdir ../new-source-root
mv * ../new-source-root
- uses: ./../action/init
with:
languages: javascript
source-root: ../new-source-root
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
skip-queries: true
upload: never
- name: Assert database exists
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d javascript ]]; then
echo "Did not find a JavaScript database"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

147
.github/workflows/__ml-powered-queries.yml generated vendored Normal file
View File

@@ -0,0 +1,147 @@
# 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

149
.github/workflows/__multi-language-autodetect.yml generated vendored Normal file
View File

@@ -0,0 +1,149 @@
# 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 - Multi-language repository
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:
multi-language-autodetect:
strategy:
matrix:
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
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Multi-language repository
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
id: init
with:
db-location: ${{ runner.temp }}/customDbLocation
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- name: Check language autodetect for all languages excluding Swift
shell: bash
run: |
CPP_DB=${{ fromJson(steps.analysis.outputs.db-locations).cpp }}
if [[ ! -d $CPP_DB ]] || [[ ! $CPP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for CPP, or created it in the wrong location."
exit 1
fi
CSHARP_DB=${{ fromJson(steps.analysis.outputs.db-locations).csharp }}
if [[ ! -d $CSHARP_DB ]] || [[ ! $CSHARP_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for C Sharp, or created it in the wrong location."
exit 1
fi
GO_DB=${{ fromJson(steps.analysis.outputs.db-locations).go }}
if [[ ! -d $GO_DB ]] || [[ ! $GO_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Go, or created it in the wrong location."
exit 1
fi
JAVA_DB=${{ fromJson(steps.analysis.outputs.db-locations).java }}
if [[ ! -d $JAVA_DB ]] || [[ ! $JAVA_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Java, or created it in the wrong location."
exit 1
fi
JAVASCRIPT_DB=${{ fromJson(steps.analysis.outputs.db-locations).javascript }}
if [[ ! -d $JAVASCRIPT_DB ]] || [[ ! $JAVASCRIPT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Javascript, or created it in the wrong location."
exit 1
fi
PYTHON_DB=${{ fromJson(steps.analysis.outputs.db-locations).python }}
if [[ ! -d $PYTHON_DB ]] || [[ ! $PYTHON_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Python, or created it in the wrong location."
exit 1
fi
RUBY_DB=${{ fromJson(steps.analysis.outputs.db-locations).ruby }}
if [[ ! -d $RUBY_DB ]] || [[ ! $RUBY_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Ruby, or created it in the wrong location."
exit 1
fi
- name: Check language autodetect for Swift
if: >-
env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' ||
(runner.os != 'Windows' && matrix.version == 'nightly-latest')
shell: bash
run: |
SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }}
if [[ ! -d $SWIFT_DB ]] || [[ ! $SWIFT_DB == ${{ runner.temp }}/customDbLocation/* ]]; then
echo "Did not create a database for Swift, or created it in the wrong location."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -0,0 +1,108 @@
# 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 - Packaging: Config and input passed to the CLI'
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:
packaging-codescanning-config-inputs-js:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config and input passed to the CLI'
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:
config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check results
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/other-query-block javascript/example/two-block"
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n\r" " " | xargs)"
echo "Found matching rules '$RULES'"
if [ "$RULES" != "$EXPECTED_RULES" ]; then
echo "Did not match expected rules '$EXPECTED_RULES'."
exit 1
fi
env:
CODEQL_PASS_CONFIG_TO_CLI: true
CODEQL_ACTION_TEST_MODE: true

106
.github/workflows/__packaging-config-inputs-js.yml generated vendored Normal file
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 - Packaging: Config and input'
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:
packaging-config-inputs-js:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config and input'
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:
config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check results
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/other-query-block javascript/example/two-block"
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n\r" " " | xargs)"
echo "Found matching rules '$RULES'"
if [ "$RULES" != "$EXPECTED_RULES" ]; then
echo "Did not match expected rules '$EXPECTED_RULES'."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

105
.github/workflows/__packaging-config-js.yml generated vendored Normal file
View File

@@ -0,0 +1,105 @@
# 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 - Packaging: Config file'
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:
packaging-config-js:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Config file'
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:
config-file: .github/codeql/codeql-config-packaging.yml
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Check results
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/other-query-block javascript/example/two-block"
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n\r" " " | xargs)"
echo "Found matching rules '$RULES'"
if [ "$RULES" != "$EXPECTED_RULES" ]; then
echo "Did not match expected rules '$EXPECTED_RULES'."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

105
.github/workflows/__packaging-inputs-js.yml generated vendored Normal file
View File

@@ -0,0 +1,105 @@
# 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 - Packaging: Action input'
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:
packaging-inputs-js:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: windows-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-latest
version: nightly-latest
name: 'Packaging: Action input'
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:
config-file: .github/codeql/codeql-config-packaging2.yml
languages: javascript
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2, codeql-testing/codeql-pack3:other-query.ql
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
- name: Check results
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run:
javascript/example/empty-or-one-block,javascript/example/empty-or-one-block,javascript/example/other-query-block,javascript/example/two-block
queries-not-run: foo,bar
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/other-query-block javascript/example/two-block"
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n\r" " " | xargs)"
echo "Found matching rules '$RULES'"
if [ "$RULES" != "$EXPECTED_RULES" ]; then
echo "Did not match expected rules '$EXPECTED_RULES'."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

104
.github/workflows/__remote-config.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 - Remote config file
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:
remote-config:
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: Remote config file
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:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
CODEQL_ACTION_TEST_MODE: true

71
.github/workflows/__resolve-environment-action.yml generated vendored Normal file
View File

@@ -0,0 +1,71 @@
# 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 - Resolve environment
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:
resolve-environment-action:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-v2.13.4
- os: macos-latest
version: stable-v2.13.4
- os: windows-latest
version: stable-v2.13.4
name: Resolve environment
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: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/resolve-environment
id: resolve-environment
with:
language: go
- name: Fail if no Go configuration was returned
if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go)
run: exit 1
env:
CODEQL_ACTION_TEST_MODE: true

74
.github/workflows/__rubocop-multi-language.yml generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# 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 - RuboCop multi-language
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:
rubocop-multi-language:
strategy:
matrix:
include:
- os: ubuntu-latest
version: default
name: RuboCop multi-language
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
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install Code Scanning integration
shell: bash
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
- name: Install dependencies
shell: bash
run: bundle install
- name: RuboCop run
shell: bash
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- uses: ./../action/upload-sarif
with:
sarif_file: rubocop.sarif
env:
CODEQL_ACTION_TEST_MODE: true

80
.github/workflows/__ruby.yml generated vendored Normal file
View File

@@ -0,0 +1,80 @@
# 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 - Ruby analysis
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:
ruby:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Ruby analysis
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: ruby
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- name: Check database
shell: bash
run: |
RUBY_DB="${{ fromJson(steps.analysis.outputs.db-locations).ruby }}"
if [[ ! -d "$RUBY_DB" ]]; then
echo "Did not create a database for Ruby."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

99
.github/workflows/__scaling-reserved-ram.yml generated vendored Normal file
View File

@@ -0,0 +1,99 @@
# 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 - Scaling reserved RAM
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:
scaling-reserved-ram:
strategy:
matrix:
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
version: stable-20221211
- os: macos-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: macos-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Scaling reserved RAM
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
id: init
with:
db-location: ${{ runner.temp }}/customDbLocation
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
env:
CODEQL_ACTION_SCALING_RESERVED_RAM: true
CODEQL_ACTION_TEST_MODE: true

104
.github/workflows/__split-workflow.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 - Split workflow
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:
split-workflow:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Split workflow
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:
config-file: .github/codeql/codeql-config-packaging3.yml
packs: +codeql-testing/codeql-pack1@1.0.0
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
skip-queries: true
output: ${{ runner.temp }}/results
upload-database: false
- name: Assert No Results
shell: bash
run: |
if [ "$(ls -A $RUNNER_TEMP/results)" ]; then
echo "Expected results directory to be empty after skipping query execution!"
exit 1
fi
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Assert Results
shell: bash
run: |
cd "$RUNNER_TEMP/results"
# We should have 4 hits from these rules
EXPECTED_RULES="javascript/example/empty-or-one-block javascript/example/empty-or-one-block javascript/example/other-query-block javascript/example/two-block"
# use tr to replace newlines with spaces and xargs to trim leading and trailing whitespace
RULES="$(cat javascript.sarif | jq -r '.runs[0].results[].ruleId' | sort | tr "\n\r" " " | xargs)"
echo "Found matching rules '$RULES'"
if [ "$RULES" != "$EXPECTED_RULES" ]; then
echo "Did not match expected rules '$EXPECTED_RULES'."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

84
.github/workflows/__submit-sarif-failure.yml generated vendored Normal file
View File

@@ -0,0 +1,84 @@
# 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 - Submit SARIF after failure
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:
submit-sarif-failure:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: nightly-latest
name: Submit SARIF after failure
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: actions/checkout@v3
- uses: ./init
with:
languages: javascript
- name: Fail
# We want this job to pass if the Action correctly uploads the SARIF file for
# the failed run.
# Setting this step to continue on error means that it is marked as completing
# successfully, so will not fail the job.
continue-on-error: true
run: exit 1
- uses: ./analyze
# In a real workflow, this step wouldn't run. Since we used `continue-on-error`
# above, we manually disable it with an `if` condition.
if: false
with:
category: /test-codeql-version:${{ matrix.version }}
env:
# Internal-only environment variable used to indicate that the post-init Action
# should expect to upload a SARIF file for the failed run.
CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF: true
# Make sure the uploading SARIF files feature is enabled.
CODEQL_ACTION_UPLOAD_FAILED_SARIF: true
# Upload the failed SARIF file as an integration test of the API endpoint.
CODEQL_ACTION_TEST_MODE: false
# Mark telemetry for this workflow so it can be treated separately.
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks

91
.github/workflows/__swift-custom-build.yml generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# 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 - Swift analysis using a custom build command
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:
swift-custom-build:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Swift analysis using a custom build command
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
id: init
with:
languages: swift
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{steps.init.outputs.codeql-path}}
- name: Check working directory
shell: bash
run: pwd
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- name: Check database
shell: bash
run: |
SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
if [[ ! -d "$SWIFT_DB" ]]; then
echo "Did not create a database for Swift."
exit 1
fi
env:
DOTNET_GENERATE_ASPNET_CERTIFICATE: 'false'
CODEQL_ACTION_TEST_MODE: true

79
.github/workflows/__test-autobuild-working-dir.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 - Autobuild working directory
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:
test-autobuild-working-dir:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
name: Autobuild working directory
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
- name: Test setup
shell: bash
run: |
# Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir
# ... and fails if attempted in the current directory
echo > build.gradle
- uses: ./../action/init
with:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
with:
working-directory: autobuild-dir
- uses: ./../action/analyze
with:
upload-database: false
- name: Check database
shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d java ]]; then
echo "Did not find a Java database"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

73
.github/workflows/__test-local-codeql.yml generated vendored Normal file
View File

@@ -0,0 +1,73 @@
# 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 - Local CodeQL bundle
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:
test-local-codeql:
strategy:
matrix:
include:
- os: ubuntu-latest
version: nightly-latest
name: Local CodeQL bundle
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
- name: Fetch a CodeQL bundle
shell: bash
env:
CODEQL_URL: ${{ steps.prepare-test.outputs.tools-url }}
run: |
wget "$CODEQL_URL"
- id: init
uses: ./../action/init
with:
tools: ./codeql-bundle-linux64.tar.gz
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
env:
CODEQL_ACTION_TEST_MODE: true

70
.github/workflows/__test-proxy.yml generated vendored Normal file
View File

@@ -0,0 +1,70 @@
# 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 - Proxy test
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:
test-proxy:
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
name: Proxy test
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
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
env:
https_proxy: http://squid-proxy:3128
CODEQL_ACTION_TEST_MODE: true
container:
image: ubuntu:22.04
options: --dns 127.0.0.1
services:
squid-proxy:
image: ubuntu/squid:latest
ports:
- 3128:3128

122
.github/workflows/__unset-environment.yml generated vendored Normal file
View File

@@ -0,0 +1,122 @@
# 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 - Test unsetting environment variables
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:
unset-environment:
strategy:
matrix:
include:
- os: ubuntu-latest
version: stable-20220615
- os: ubuntu-latest
version: stable-20220908
- os: ubuntu-latest
version: stable-20221211
- os: ubuntu-latest
version: stable-20230418
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
name: Test unsetting environment variables
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
id: init
with:
db-location: ${{ runner.temp }}/customDbLocation
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
# workaround for our PR checks.
run: env -i CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN=true PATH="$PATH" HOME="$HOME"
./build.sh
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- shell: bash
run: |
CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}"
if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then
echo "::error::Did not create a database for CPP, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/cpp' but actual was '${CPP_DB}'"
exit 1
fi
CSHARP_DB="${{ fromJson(steps.analysis.outputs.db-locations).csharp }}"
if [[ ! -d "$CSHARP_DB" ]] || [[ ! "$CSHARP_DB" == "${RUNNER_TEMP}/customDbLocation/csharp" ]]; then
echo "::error::Did not create a database for C Sharp, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/csharp' but actual was '${CSHARP_DB}'"
exit 1
fi
GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}"
if [[ ! -d "$GO_DB" ]] || [[ ! "$GO_DB" == "${RUNNER_TEMP}/customDbLocation/go" ]]; then
echo "::error::Did not create a database for Go, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/go' but actual was '${GO_DB}'"
exit 1
fi
JAVA_DB="${{ fromJson(steps.analysis.outputs.db-locations).java }}"
if [[ ! -d "$JAVA_DB" ]] || [[ ! "$JAVA_DB" == "${RUNNER_TEMP}/customDbLocation/java" ]]; then
echo "::error::Did not create a database for Java, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/java' but actual was '${JAVA_DB}'"
exit 1
fi
JAVASCRIPT_DB="${{ fromJson(steps.analysis.outputs.db-locations).javascript }}"
if [[ ! -d "$JAVASCRIPT_DB" ]] || [[ ! "$JAVASCRIPT_DB" == "${RUNNER_TEMP}/customDbLocation/javascript" ]]; then
echo "::error::Did not create a database for Javascript, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/javascript' but actual was '${JAVASCRIPT_DB}'"
exit 1
fi
PYTHON_DB="${{ fromJson(steps.analysis.outputs.db-locations).python }}"
if [[ ! -d "$PYTHON_DB" ]] || [[ ! "$PYTHON_DB" == "${RUNNER_TEMP}/customDbLocation/python" ]]; then
echo "::error::Did not create a database for Python, or created it in the wrong location." \
"Expected location was '${RUNNER_TEMP}/customDbLocation/python' but actual was '${PYTHON_DB}'"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

113
.github/workflows/__upload-ref-sha-input.yml generated vendored Normal file
View File

@@ -0,0 +1,113 @@
# 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 - Upload-sarif: 'ref' and 'sha' from inputs"
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:
upload-ref-sha-input:
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: "Upload-sarif: 'ref' and 'sha' from inputs"
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:
tools: ${{ steps.prepare-test.outputs.tools-url }}
languages: cpp,csharp,java,javascript,python
config-file: ${{ github.repository }}/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{
github.sha }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
upload: never
- uses: ./../action/upload-sarif
with:
ref: refs/heads/main
sha: 5e235361806c361d4d3f8859e3c897658025a9a2
env:
CODEQL_ACTION_TEST_MODE: true

157
.github/workflows/__with-checkout-path.yml generated vendored Normal file
View File

@@ -0,0 +1,157 @@
# 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 - Use a custom `checkout_path`
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:
with-checkout-path:
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: Use a custom `checkout_path`
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: actions/checkout@v3
with:
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
path: x/y/z/some-path
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
# it's enough to test one compiled language and one interpreted language
languages: csharp,javascript
source-path: x/y/z/some-path/tests/multi-language-repo
debug: true
- name: Build code (non-windows)
shell: bash
if: ${{ runner.os != 'Windows' }}
run: |
$CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/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
with:
checkout_path: x/y/z/some-path/tests/multi-language-repo
ref: v1.1.0
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
upload: never
upload-database: false
- uses: ./../action/upload-sarif
with:
ref: v1.1.0
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
checkout_path: x/y/z/some-path/tests/multi-language-repo
- name: Verify SARIF after upload
shell: bash
run: |
EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6"
EXPECTED_REF="v1.1.0"
EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo"
ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)"
ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)"
ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)"
if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then
echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then
echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then
echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI"
echo "$RUNNER_TEMP/payload.json"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -0,0 +1,25 @@
name: Check Expected Release Files
on:
pull_request:
paths:
- .github/workflows/check-expected-release-files.yml
- src/defaults.json
# 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]
jobs:
check-expected-release-files:
runs-on: ubuntu-latest
steps:
- name: Checkout CodeQL Action
uses: actions/checkout@v3
- name: Check Expected Release Files
run: |
bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")"
set -x
for expected_file in "codeql-bundle.tar.gz" "codeql-bundle-linux64.tar.gz" "codeql-bundle-osx64.tar.gz" "codeql-bundle-win64.tar.gz"; do
curl --location --fail --head --request GET "https://github.com/github/codeql-action/releases/download/$bundle_version/$expected_file" > /dev/null
done

View File

@@ -1,28 +1,97 @@
name: "CodeQL action"
on: [push, pull_request]
on:
push:
branches: [main, releases/v2]
pull_request:
branches: [main, releases/v2]
# 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 Sunday.
- cron: '30 1 * * 0'
env:
CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks
jobs:
# Identify the CodeQL tool versions to use in the analysis job.
check-codeql-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.compare.outputs.versions }}
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- name: Init with default CodeQL bundle from the VM image
id: init-default
uses: ./init
with:
languages: javascript
- name: Remove empty database
# allows us to run init a second time
run: |
rm -rf "$RUNNER_TEMP/codeql_databases"
- name: Init with latest CodeQL bundle
id: init-latest
uses: ./init
with:
tools: latest
languages: javascript
- name: Compare default and latest CodeQL bundle versions
id: compare
env:
CODEQL_DEFAULT: ${{ steps.init-default.outputs.codeql-path }}
CODEQL_LATEST: ${{ steps.init-latest.outputs.codeql-path }}
run: |
CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)"
CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)"
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
# If we're running on a pull request, run with both bundles, even if `tools: latest` would
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
# required status check.
#
# If we're running on push or schedule, then we can skip running with `tools: latest` when it would be
# the same as running with `tools: null`.
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
VERSIONS_JSON='[null]'
else
VERSIONS_JSON='[null, "latest"]'
fi
# Output a JSON-encoded list with the distinct versions to test against.
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
build:
needs: [check-codeql-versions]
strategy:
matrix:
os: [ubuntu-latest,windows-latest,macos-latest]
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
runs-on: ${{ matrix.os }}
permissions:
security-events: write
steps:
- uses: actions/checkout@v1
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
fetch-depth: 2
# If this run was triggered by a pull request event then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- uses: ./init
- name: Checkout
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: ./init
id: init
with:
languages: javascript
config-file: ./.github/codeql/codeql-config.yml
- uses: ./analyze
tools: ${{ matrix.tools }}
# confirm steps.init.outputs.codeql-path points to the codeql binary
- name: Print CodeQL Version
run: ${{steps.init.outputs.codeql-path}} version --format=json
- name: Perform CodeQL Analysis
uses: ./analyze

View File

@@ -0,0 +1,218 @@
# Tests that the generated code scanning config file contains the expected contents
name: Code-Scanning config CLI tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODEQL_PASS_CONFIG_TO_CLI: true
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
code-scanning-config-tests:
continue-on-error: true
strategy:
matrix:
include:
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: default
- os: macos-latest
version: default
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
# Code-Scanning config not created because environment variable is not set
name: Code Scanning Configuration tests
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 }}
- name: Empty file
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: "{}"
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Packs from input
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
}
languages: javascript
packs: codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Packs from input with +
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
}
languages: javascript
packs: + codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries from input
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }]
}
languages: javascript
queries: ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries from input with +
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }]
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries and packs from input with +
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }],
"packs": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
packs: + codeql-testing/codeql-pack1@1.0.0, codeql-testing/codeql-pack2
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries and packs from config
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }],
"packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ]
}
}
languages: javascript
config-file-test: .github/codeql/queries-and-packs-config.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries and packs from config overriden by input
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }],
"packs": ["codeql/javascript-queries"]
}
languages: javascript
queries: ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
packs: codeql/javascript-queries
config-file-test: .github/codeql/queries-and-packs-config.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Queries and packs from config merging with input
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" },
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql" }
],
"packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2", "codeql/javascript-queries" ]
}
}
languages: javascript
queries: + ./codeql-qlpacks/complex-javascript-qlpack/show_ifs.ql
packs: + codeql/javascript-queries
config-file-test: .github/codeql/queries-and-packs-config.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Multi-language packs from config
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"packs": {
"javascript": ["codeql-testing/codeql-pack1@1.0.0", "codeql-testing/codeql-pack2" ],
"ruby": ["codeql/ruby-queries"]
},
"queries": [
{ "uses": "./codeql-qlpacks/complex-javascript-qlpack/foo2/show_ifs.ql" }
]
}
languages: javascript,ruby
config-file-test: .github/codeql/multi-language-packs-config.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Other config properties
if: success() || failure()
uses: ./../action/.github/actions/check-codescanning-config
with:
expected-config-file-contents: |
{
"name": "Config using all properties",
"packs": ["codeql/javascript-queries" ],
"disable-default-queries": true,
"paths-ignore": ["xxx"],
"paths": ["yyy"]
}
languages: javascript
packs: + codeql/javascript-queries
config-file-test: .github/codeql/other-config-properties.yml
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

@@ -0,0 +1,93 @@
# Checks logs, SARIF, and database bundle debug artifacts exist
# when the analyze step fails.
name: PR Check - Debug artifacts after failure
env:
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
# workaround for our PR checks.
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
upload-artifacts:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: Upload debug artifacts after failure in analyze
continue-on-error: true
env:
CODEQL_ACTION_TEST_MODE: true
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Dump GitHub event
run: cat "${GITHUB_EVENT_PATH}"
- name: Check out repository
uses: actions/checkout@v3
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: latest
- uses: actions/setup-go@v4
with:
go-version: ^1.13.1
- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
debug: true
debug-artifact-name: my-debug-artifacts
debug-database-name: my-db
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
with:
expect-error: true
ram: 1
download-and-check-artifacts:
name: Download and check debug artifacts after failure in analyze
needs: upload-artifacts
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Check expected artifacts exist
shell: bash
run: |
OPERATING_SYSTEMS="ubuntu-latest macos-latest"
LANGUAGES="cpp csharp go java javascript python"
for os in $OPERATING_SYSTEMS; do
pushd "./my-debug-artifacts-$os"
echo "Artifacts from run on $os:"
for language in $LANGUAGES; do
echo "- Checking $language"
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
echo "Missing a partial database bundle for $language"
exit 1
fi
if [[ ! -d "log" ]] ; then
echo "Missing database initialization logs"
exit 1
fi
if [[ ! "$language" == "go" ]] && [[ ! -d "$language/log" ]] ; then
echo "Missing logs for $language"
exit 1
fi
done
popd
done
env:
GO111MODULE: auto

102
.github/workflows/debug-artifacts.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
# Checks logs, SARIF, and database bundle debug artifacts exist.
name: PR Check - Debug artifact upload
env:
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
# workaround for our PR checks.
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
upload-artifacts:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
version:
- stable-20220615
- stable-20220908
- stable-20221211
- stable-20230418
- default
- latest
- nightly-latest
name: Upload debug artifacts
env:
CODEQL_ACTION_TEST_MODE: true
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 }}
- uses: actions/setup-go@v4
with:
go-version: ^1.13.1
- uses: ./../action/init
id: init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
debug: true
debug-artifact-name: my-debug-artifacts
debug-database-name: my-db
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
id: analysis
download-and-check-artifacts:
name: Download and check debug artifacts
needs: upload-artifacts
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Check expected artifacts exist
shell: bash
run: |
VERSIONS="stable-20220615 stable-20220908 stable-20221211 stable-20230418 default latest nightly-latest"
LANGUAGES="cpp csharp go java javascript python"
for version in $VERSIONS; do
for os in ubuntu-latest macos-latest; do
pushd "./my-debug-artifacts-$os-$version"
echo "Artifacts from version $version on $os:"
for language in $LANGUAGES; do
echo "- Checking $language"
if [[ ! -f "$language.sarif" ]] ; then
echo "Missing a SARIF file for $language"
exit 1
fi
if [[ ! -f "my-db-$language.zip" ]] ; then
echo "Missing a database bundle for $language"
exit 1
fi
if [[ ! -d "$language/log" ]] ; then
echo "Missing logs for $language"
exit 1
fi
done
popd
done
done
env:
GO111MODULE: auto

View File

@@ -0,0 +1,46 @@
name: Check queries that ran
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
expected-queries:
name: Expected Queries Tests
env:
CODEQL_ACTION_TEST_MODE: true
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: latest
- uses: ./../action/init
with:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: never
- name: Check Sarif
uses: ./../action/.github/actions/check-sarif
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: js/incomplete-hostname-regexp,js/path-injection
queries-not-run: foo,bar

View File

@@ -1,126 +0,0 @@
name: "Integration Testing"
on: [push, pull_request]
jobs:
multi-language-repo_test-autodetect-languages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true
- run: |
cd "$CODEQL_ACTION_DATABASE_DIR"
# List all directories as there will be precisely one directory per database
# but there may be other files in this directory such as query suites.
if [ "$(ls -d */ | wc -l)" != 6 ] || \
[[ ! -d cpp ]] || \
[[ ! -d csharp ]] || \
[[ ! -d go ]] || \
[[ ! -d java ]] || \
[[ ! -d javascript ]] || \
[[ ! -d python ]]; then
echo "Did not find expected number of databases. Database dir contains: $(ls)"
exit 1
fi
multi-language-repo_test-custom-queries:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
with:
languages: cpp,csharp,java,javascript,python
config-file: ./.github/codeql/custom-queries.yml
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true
# Currently is not possible to analyze Go in conjunction with other languages in macos
multi-language-repo_test-go-custom-queries:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
if: ${{ matrix.os == 'macos-latest' }}
with:
go-version: '^1.13.1'
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- uses: ./../action/init
with:
languages: go
config-file: ./.github/codeql/custom-queries.yml
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true
multi-language-repo_rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install Code Scanning integration
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
- name: Install dependencies
run: bundle install
- name: Rubocop run
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- uses: ./../action/upload-sarif
with:
sarif_file: rubocop.sarif
env:
TEST_MODE: true

View File

@@ -0,0 +1,148 @@
# This workflow runs after a release of the action. It:
# 1. Merges any changes from the release back into the main branch. Typically, this is just a single
# 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
# 3. Updates the `v2` tag to refer to this merge commit.
name: Tag release and merge back
on:
workflow_dispatch:
inputs:
baseBranch:
description: 'The base branch to merge into'
default: main
required: false
push:
branches:
- releases/v2
jobs:
merge-back:
runs-on: ubuntu-latest
if: github.repository == 'github/codeql-action'
env:
BASE_BRANCH: "${{ github.event.inputs.baseBranch || 'main' }}"
HEAD_BRANCH: "${{ github.head_ref || github.ref }}"
steps:
- name: Dump environment
run: env
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "${GITHUB_CONTEXT}"
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Get version and new branch
id: getVersion
run: |
VERSION="v$(jq '.version' -r 'package.json')"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
short_sha="${GITHUB_SHA:0:8}"
NEW_BRANCH="mergeback/${VERSION}-to-${BASE_BRANCH}-${short_sha}"
echo "newBranch=${NEW_BRANCH}" >> $GITHUB_OUTPUT
- name: Dump branches
env:
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
run: |
echo "BASE_BRANCH ${BASE_BRANCH}"
echo "HEAD_BRANCH ${HEAD_BRANCH}"
echo "NEW_BRANCH ${NEW_BRANCH}"
- name: Create mergeback branch
env:
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
run: |
git checkout -b "${NEW_BRANCH}"
- name: Check for tag
id: check
env:
VERSION: "${{ steps.getVersion.outputs.version }}"
run: |
set +e # don't fail on an errored command
git ls-remote --tags origin | grep "${VERSION}"
exists="$?"
if [ "${exists}" -eq 0 ]; then
echo "Tag ${VERSION} exists. Not going to re-release."
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "Tag ${VERSION} does not exist yet."
fi
# we didn't tag the release during the update-release-branch workflow because the
# commit that actually makes it to the release branch is a merge commit,
# and not yet known during the first workflow. We tag now because we know the correct commit.
- name: Tag release
if: steps.check.outputs.exists != 'true'
env:
VERSION: ${{ steps.getVersion.outputs.version }}
run: |
# Unshallow the repo in order to allow pushes
git fetch --unshallow
# Create the `vx.y.z` tag
git tag --annotate "${VERSION}" --message "${VERSION}"
# Update the `vx` tag
major_version_tag=$(cut -d '.' -f1 <<< "${VERSION}")
# Use `--force` to overwrite the major version tag
git tag --annotate "${major_version_tag}" --message "${major_version_tag}" --force
# Push the tags, using:
# - `--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
# unwanted Dependabot updates, e.g. from v2 to v2.x.y)
# - `--force` since we're overwriting the `vx` tag
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
- name: Create mergeback branch
if: steps.check.outputs.exists != 'true'
env:
VERSION: "${{ steps.getVersion.outputs.version }}"
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
set -exu
pr_title="Mergeback ${VERSION} ${HEAD_BRANCH} into ${BASE_BRANCH}"
pr_body=$(cat << EOF
This PR bumps the version number and updates the changelog after the ${VERSION} release.
Please do the following:
- [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.
- [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.
- [ ] Mark the PR as ready for review to trigger the full set of PR checks.
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is
selected rather than "Squash and merge" or "Rebase and merge".
EOF
)
# Update the version number ready for the next release
npm version patch --no-git-tag-version
# Update the changelog
perl -i -pe 's/^/## \[UNRELEASED\]\n\nNo user facing changes.\n\n/ if($.==5)' CHANGELOG.md
git add .
git commit -m "Update changelog and version after ${VERSION}"
git push origin "${NEW_BRANCH}"
# 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.
gh pr create \
--head "${NEW_BRANCH}" \
--base "${BASE_BRANCH}" \
--title "${pr_title}" \
--label "Update dependencies" \
--body "${pr_body}" \
--assignee "${GITHUB_ACTOR}" \
--draft

View File

@@ -1,71 +1,78 @@
name: "PR checks"
name: PR Checks
on: [push, pull_request]
on:
push:
branches: [main, releases/v2]
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]
workflow_dispatch:
jobs:
tslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: tslint
run: npm run-script lint
check-js:
name: Check JS
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
- name: Check generated JavaScript
run: |
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Generate the JavaScript files
npm run-script build
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"
- name: Checkout
uses: actions/checkout@v3
- name: Lint
run: npm run-script lint
- name: Check generated JS
run: .github/workflows/script/check-js.sh
check-node-modules:
runs-on: ubuntu-latest
name: Check modules up to date
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
- name: Check node modules up to date
run: |
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
- uses: actions/checkout@v3
- name: Check node modules up to date
run: .github/workflows/script/check-node-modules.sh
# Reinstall modules and then clean to remove absolute paths
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
npm ci
npm run removeNPMAbsolutePaths
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
git status
exit 1
fi
echo "Success: node_modules are up to date"
check-file-contents:
name: Check file contents
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# When updating this, update the autogenerated code header in `sync.py` too.
pip install ruamel.yaml==0.17.31
# Ensure the generated PR check workflows are up to date.
- name: Verify PR checks up to date
run: .github/workflows/script/verify-pr-checks.sh
npm-test:
runs-on: ubuntu-latest
name: Unit Test
needs: [check-js, check-node-modules]
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v1
- name: npm run-script test
run: npm run-script test
- uses: actions/checkout@v3
- name: npm test
run: |
# Run any commands referenced in package.json using Bash, otherwise
# we won't be able to find them on Windows.
npm config set script-shell bash
npm test

174
.github/workflows/python-deps.yml vendored Normal file
View File

@@ -0,0 +1,174 @@
name: Test Python Package Installation
on:
push:
branches: [main, releases/v2]
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]
paths:
# Changes to this workflow.
- '.github/workflows/python-deps.yml'
# Changes to the Python package installation scripts and their tests.
- 'python-setup/**'
# Changes to the default CodeQL bundle version.
- '**/defaults.json'
schedule:
# Weekly on Monday.
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
test-setup-python-scripts:
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
python_deps_type: [pipenv, poetry, requirements, setup_py]
python_version: [3]
env:
PYTHON_DEPS_TYPE: ${{ matrix.python_deps_type }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Initialize CodeQL
uses: ./init
id: init
with:
tools: latest
languages: python
setup-python-dependencies: false
- name: Test Auto Package Installation
run: |
set -x
$GITHUB_WORKSPACE/python-setup/install_tools.sh
cd $GITHUB_WORKSPACE/python-setup/tests/${PYTHON_DEPS_TYPE}/requests-${PYTHON_VERSION}
case ${{ matrix.os }} in
ubuntu-20.04*) basePath="/opt";;
ubuntu-22.04*) basePath="/opt";;
macos-latest*) basePath="/Users/runner";;
esac
echo ${basePath}
$GITHUB_WORKSPACE/python-setup/auto_install_packages.py "$(dirname ${{steps.init.outputs.codeql-path}})"
- name: Setup for extractor
run: |
echo $CODEQL_PYTHON
# only run if $CODEQL_PYTHON is set
if [ ! -z $CODEQL_PYTHON ]; then
$GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON;
fi
- name: Verify packages installed
run: |
$GITHUB_WORKSPACE/python-setup/tests/check_requests.sh ${PYTHON_VERSION} 2.31.0
# This one shouldn't fail, but also won't install packages
test-setup-python-scripts-non-standard-location:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Initialize CodeQL
uses: ./init
id: init
with:
tools: latest
languages: python
setup-python-dependencies: false
- name: Test Auto Package Installation
run: |
set -x
$GITHUB_WORKSPACE/python-setup/install_tools.sh
cd $GITHUB_WORKSPACE/python-setup/tests/requirements/non-standard-location
case ${{ matrix.os }} in
ubuntu-20.04*) basePath="/opt";;
ubuntu-22.04*) basePath="/opt";;
macos-latest*) basePath="/Users/runner";;
esac
echo ${basePath}
$GITHUB_WORKSPACE/python-setup/auto_install_packages.py "$(dirname ${{steps.init.outputs.codeql-path}})"
- name: Setup for extractor
run: |
echo $CODEQL_PYTHON
# only run if $CODEQL_PYTHON is set
if [ ! -z $CODEQL_PYTHON ]; then
$GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON;
fi
- name: Verify packages installed
run: |
test -z $LGTM_INDEX_IMPORT_PATH
test-setup-python-scripts-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python_deps_type: [pipenv, poetry, requirements, setup_py]
python_version: [3]
env:
CODEQL_ACTION_TEST_MODE: true
PYTHON_DEPS_TYPE: ${{ matrix.python_deps_type }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Initialize CodeQL
id: init
uses: ./init
with:
tools: latest
languages: python
setup-python-dependencies: false
- name: Test Auto Package Installation
env:
CODEQL_PATH: ${{ steps.init.outputs.codeql-path }}
run: |
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1"
powershell -File $cmd
cd $Env:GITHUB_WORKSPACE\\python-setup/tests/$Env:PYTHON_DEPS_TYPE/requests-$Env:PYTHON_VERSION
$codeql_dist = (get-item $Env:CODEQL_PATH).Directory.FullName
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py $codeql_dist
- name: Setup for extractor
run: |
echo $Env:CODEQL_PYTHON
py -3 $Env:GITHUB_WORKSPACE\\python-setup\\tests\\from_python_exe.py $Env:CODEQL_PYTHON
- name: Verify packages installed
run: |
$cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\tests\\check_requests.ps1"
powershell -File $cmd $Env:PYTHON_VERSION 2.31.0

55
.github/workflows/query-filters.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Query filters tests
on:
push:
branches:
- main
- releases/v2
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch: {}
jobs:
query-filters:
name: Query Filters Tests
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: latest
- name: Check SARIF for default queries with Single include, Single exclude
uses: ./../action/.github/actions/query-filter-test
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: js/zipslip
queries-not-run: js/path-injection
config-file: ./.github/codeql/codeql-config-query-filters1.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check SARIF for query packs with Single include, Single exclude
uses: ./../action/.github/actions/query-filter-test
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: js/zipslip,javascript/example/empty-or-one-block
queries-not-run: js/path-injection
config-file: ./.github/codeql/codeql-config-query-filters2.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check SARIF for query packs and local queries with Single include, Single exclude
uses: ./../action/.github/actions/query-filter-test
with:
sarif-file: ${{ runner.temp }}/results/javascript.sarif
queries-run: js/zipslip,javascript/example/empty-or-one-block,inrepo-javascript-querypack/show-ifs
queries-not-run: js/path-injection,complex-python-querypack/show-ifs,complex-python-querypack/foo/bar/show-ifs
config-file: ./.github/codeql/codeql-config-query-filters3.yml
tools: ${{ steps.prepare-test.outputs.tools-url }}

21
.github/workflows/script/check-js.sh vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -eu
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Wipe the lib directory incase there are extra unnecessary files in there
rm -rf lib
# Generate the JavaScript files
npm run-script build
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"

View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -eu
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
"$(dirname "$0")/update-node-modules.sh" check-only
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: node_modules are not up to date. Add the 'Update dependencies' label to your PR to update them. Note it is important that node modules are updated on macOS and not any other operating system as there is one dependency (fsevents) that is needed for macOS and may not be installed if dependencies are updated on a Windows or Linux machine."
git status
exit 1
fi
echo "Success: node_modules are up to date"

View File

@@ -0,0 +1,18 @@
if [ "$1" != "update" && "$1" != "check-only" ]; then
>&2 echo "Failed: Invalid argument. Must be 'update' or 'check-only'"
exit 1
fi
sudo npm install --force -g npm@9.2.0
# clean the npm cache to ensure we don't have any files owned by root
sudo npm cache clean --force
if [ "$1" = "update" ]; then
npm install
fi
# Reinstall modules and then clean to remove absolute paths
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
npm ci
npm run removeNPMAbsolutePaths

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Update the required checks based on the current branch.
# Typically, this will be main.
if ! gh auth status 2>/dev/null; then
gh auth status
echo "Failed: Not authorized. This script requires admin access to github/codeql-action through the gh CLI."
exit 1
fi
if [ "$#" -eq 1 ]; then
# If we were passed an argument, use that as the SHA
GITHUB_SHA="$1"
elif [ "$#" -gt 1 ]; then
echo "Usage: $0 [SHA]"
echo "Update the required checks based on the SHA, or main."
exit 1
elif [ -z "$GITHUB_SHA" ]; then
# If we don't have a SHA, use main
GITHUB_SHA="$(git rev-parse main)"
fi
echo "Getting checks for $GITHUB_SHA"
# 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')"
echo "$CHECKS" | jq
echo "{\"contexts\": ${CHECKS}}" > checks.json
for BRANCH in main releases/v2; do
echo "Updating $BRANCH"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json
done
rm checks.json

25
.github/workflows/script/verify-pr-checks.sh vendored Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -eu
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Wipe the generated PR checks in case there are extra unnecessary files in there
rm -rf .github/workflows/__*
# Generate the PR checks
cd pr-checks && python3 sync.py
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
git diff
git status
>&2 echo "Failed: PR checks are not up to date. Run 'cd pr-checks && python3 sync.py' to update"
exit 1
fi
echo "Success: PR checks are up to date"

View File

@@ -0,0 +1,56 @@
name: 'PR Check - CodeQL Bundle All'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
# Disable Kotlin analysis while it's incompatible with Kotlin 1.8, until we find a
# workaround for our PR checks.
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:
test-codeql-bundle-all:
strategy:
matrix:
include:
- os: ubuntu-latest
version: nightly-latest
name: 'CodeQL Bundle All'
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: true
- id: init
uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/.github/actions/setup-swift
with:
codeql-path: ${{ steps.init.outputs.codeql-path }}
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
env:
CODEQL_ACTION_TEST_MODE: true

91
.github/workflows/update-bundle.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: Update default CodeQL bundle
on:
release:
# From https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
# Note: The prereleased type will not trigger for pre-releases published
# from draft releases, but the published type will trigger. If you want a
# workflow to run when stable and pre-releases publish, subscribe to
# published instead of released and prereleased.
#
# From https://github.com/orgs/community/discussions/26281
# As a work around, in published type workflow, you could add if condition
# to filter pre-release attribute.
types: [published]
jobs:
update-bundle:
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
runs-on: ubuntu-latest
steps:
- name: Dump environment
run: env
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update bundle
uses: ./.github/actions/update-bundle
- name: Rebuild Action
run: npm run build
- name: Commit and push changes
env:
RELEASE_TAG: "${{ github.event.release.tag_name }}"
run: |
git checkout -b "update-bundle/$RELEASE_TAG"
git commit -am "Update default bundle to $RELEASE_TAG"
git push --set-upstream origin "update-bundle/$RELEASE_TAG"
- name: Open pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cli_version=$(jq -r '.cliVersion' src/defaults.json)
pr_url=$(gh pr create \
--title "Update default bundle to $cli_version" \
--body "This pull request updates the default CodeQL bundle, as used with \`tools: latest\` and on GHES, to $cli_version." \
--assignee "$GITHUB_ACTOR" \
--draft \
)
echo "CLI_VERSION=$cli_version" | tee -a "$GITHUB_ENV"
echo "PR_URL=$pr_url" | tee -a "$GITHUB_ENV"
- name: Create changelog note
shell: python
run: |
import os
import re
# Get the PR number from the PR URL.
pr_number = os.environ['PR_URL'].split('/')[-1]
changelog_note = f"- Update default CodeQL bundle version to {os.environ['CLI_VERSION']}. [#{pr_number}]({os.environ['PR_URL']})"
# If the "[UNRELEASED]" section starts with "no user facing changes", remove that line.
# Use perl to avoid having to escape the newline character.
with open('CHANGELOG.md', 'r') as f:
changelog = f.read()
changelog = changelog.replace('## [UNRELEASED]\n\nNo user facing changes.', '## [UNRELEASED]\n')
# Add the changelog note to the bottom of the "[UNRELEASED]" section.
changelog = re.sub(r'\n## (\d+\.\d+\.\d+)', f'{changelog_note}\n\n## \\1', changelog, count=1)
with open('CHANGELOG.md', 'w') as f:
f.write(changelog)
- name: Push changelog note
run: |
git commit -am "Add changelog note"
git push

View File

@@ -0,0 +1,37 @@
name: Update dependencies
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, labeled]
jobs:
update:
name: Update dependencies
timeout-minutes: 45
runs-on: macos-latest
if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action')
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Remove PR label
env:
REPOSITORY: '${{ github.repository }}'
PR_NUMBER: '${{ github.event.pull_request.number }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
- name: Push updated dependencies
env:
BRANCH: '${{ github.head_ref }}'
run: |
git fetch origin "$BRANCH" --depth=1
git checkout "origin/$BRANCH"
.github/workflows/script/update-node-modules.sh update
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 add node_modules
git commit -am "Update checked-in dependencies"
git push origin "HEAD:$BRANCH"
fi

View File

@@ -1,31 +1,46 @@
name: Update release branch
on:
schedule:
- cron: 0 9 * * 1
repository_dispatch:
# Example of how to trigger this:
# curl -H "Authorization: Bearer <token>" -X POST https://api.github.com/repos/github/codeql-action/dispatches -d '{"event_type":"update-release-branch"}'
# Replace <token> with a personal access token from this page: https://github.com/settings/tokens
types: [update-release-branch]
# You can trigger this workflow via workflow dispatch to start a release.
# This will open a PR to update the v2 release branch.
workflow_dispatch:
jobs:
update:
timeout-minutes: 45
runs-on: ubuntu-latest
if: github.repository == 'github/codeql-action'
steps:
- uses: actions/checkout@v2
- name: Dump environment
run: env
- name: Dump GitHub context
env:
GITHUB_CONTEXT: '${{ toJson(github) }}'
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
with:
# Need full history so we calculate diffs
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.5
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub==1.51 requests
pip install PyGithub==1.55 requests
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update release branch
run: python .github/update-release-branch.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }}
run: |
python .github/update-release-branch.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--repository-nwo ${{ github.repository }} \
--conductor ${GITHUB_ACTOR}

View File

@@ -0,0 +1,56 @@
name: Update Supported Enterprise Server Versions
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update-supported-enterprise-server-versions:
name: Update Supported Enterprise Server Versions
timeout-minutes: 45
runs-on: ubuntu-latest
if: ${{ github.repository == 'github/codeql-action' }}
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Checkout CodeQL Action
uses: actions/checkout@v3
- name: Checkout Enterprise Releases
uses: actions/checkout@v3
with:
repository: github/enterprise-releases
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
path: ${{ github.workspace }}/enterprise-releases/
- name: Update Supported Enterprise Server Versions
run: |
cd ./.github/workflows/update-supported-enterprise-server-versions/
python3 -m pip install pipenv
pipenv install
pipenv run ./update.py
rm --recursive "$ENTERPRISE_RELEASES_PATH"
npm run build
env:
ENTERPRISE_RELEASES_PATH: ${{ github.workspace }}/enterprise-releases/
- name: Update git config
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Commit changes and open PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ -z $(git status --porcelain) ]]; then
echo "No changes to commit"
else
git checkout -b update-supported-enterprise-server-versions
git add .
git commit --message "Update supported GitHub Enterprise Server versions"
git push origin update-supported-enterprise-server-versions
gh pr create --fill --draft
fi

View File

@@ -0,0 +1,9 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
semver = "*"

View File

@@ -0,0 +1,27 @@
{
"_meta": {
"hash": {
"sha256": "e3ba923dcb4888e05de5448c18a732bf40197e80fabfa051a61c01b22c504879"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"semver": {
"hashes": [
"sha256:ced8b23dceb22134307c1b8abfa523da14198793d9787ac838e70e29e77458d4",
"sha256:fa0fe2722ee1c3f57eac478820c3a5ae2f624af8264cbdf9000c980ff7f75e3f"
],
"index": "pypi",
"version": "==2.13.0"
}
},
"develop": {}
}

View File

@@ -0,0 +1,51 @@
#!/usr/bin/env python3
import datetime
import json
import os
import pathlib
import semver
_API_COMPATIBILITY_PATH = pathlib.Path(__file__).absolute().parents[3] / "src" / "api-compatibility.json"
_ENTERPRISE_RELEASES_PATH = pathlib.Path(os.environ["ENTERPRISE_RELEASES_PATH"])
_RELEASE_FILE_PATH = _ENTERPRISE_RELEASES_PATH / "releases.json"
_FIRST_SUPPORTED_RELEASE = semver.VersionInfo.parse("2.22.0") # Versions older than this did not include Code Scanning.
def main():
api_compatibility_data = json.loads(_API_COMPATIBILITY_PATH.read_text())
releases = json.loads(_RELEASE_FILE_PATH.read_text())
# Remove GHES version using a previous version numbering scheme.
if "11.10.340" in releases:
del releases["11.10.340"]
oldest_supported_release = None
newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0")
for release_version_string, release_data in releases.items():
release_version = semver.VersionInfo.parse(release_version_string + ".0")
if release_version < _FIRST_SUPPORTED_RELEASE:
continue
if release_version > newest_supported_release:
feature_freeze_date = datetime.date.fromisoformat(release_data["feature_freeze"])
if feature_freeze_date < datetime.date.today() + datetime.timedelta(weeks=2):
newest_supported_release = release_version
if oldest_supported_release is None or release_version < oldest_supported_release:
end_of_life_date = datetime.date.fromisoformat(release_data["end"])
# The GHES version is not actually end of life until the end of the day specified by
# `end_of_life_date`. Wait an extra week to be safe.
is_end_of_life = datetime.date.today() > end_of_life_date + datetime.timedelta(weeks=1)
if not is_end_of_life:
oldest_supported_release = release_version
api_compatibility_data = {
"minimumVersion": f"{oldest_supported_release.major}.{oldest_supported_release.minor}",
"maximumVersion": f"{newest_supported_release.major}.{newest_supported_release.minor}",
}
_API_COMPATIBILITY_PATH.write_text(json.dumps(api_compatibility_data, sort_keys=True) + "\n")
if __name__ == "__main__":
main()

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
# Ignore for example failing-tests.json from AVA
node_modules/.cache

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
lockfile-version=3

25
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug AVA test file",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
"runtimeArgs": [
"${file}",
"--break",
"--serial",
"--timeout=20m"
],
"port": 9229,
"outputCapture": "std",
"skipFiles": [
"<node_internals>/**/*.js"
]
}
]
}

10
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"files.exclude": {
// include the defaults from VS Code
"**/.git": true,
"**/.DS_Store": true,
// transpiled JavaScript
"lib": true,
}
}

15
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc: watch - tsconfig.json"
}
]
}

503
CHANGELOG.md Normal file
View File

@@ -0,0 +1,503 @@
# CodeQL Action Changelog
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
## 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 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)
## 2.21.2 - 28 Jul 2023
- Update default CodeQL bundle version to 2.14.1. [#1797](https://github.com/github/codeql-action/pull/1797)
- Avoid duplicating the analysis summary within the logs. [#1811](https://github.com/github/codeql-action/pull/1811)
## 2.21.1 - 26 Jul 2023
- Improve the handling of fatal errors from the CodeQL CLI. [#1795](https://github.com/github/codeql-action/pull/1795)
- Add the `sarif-output` output to the analyze action that contains the path to the directory of the generated SARIF. [#1799](https://github.com/github/codeql-action/pull/1799)
## 2.21.0 - 19 Jul 2023
- CodeQL Action now requires CodeQL CLI 2.9.4 or later. For more information, see the corresponding changelog entry for CodeQL Action version 2.20.4. [#1724](https://github.com/github/codeql-action/pull/1724)
## 2.20.4 - 14 Jul 2023
- This is the last release of the Action that supports CodeQL CLI versions 2.8.5 to 2.9.3. These versions of the CodeQL CLI were deprecated on June 20, 2023 alongside GitHub Enterprise Server 3.5 and will not be supported by the next release of the CodeQL Action (2.21.0).
- If you are using one of these versions, please update to CodeQL CLI version 2.9.4 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.8.5 and 2.9.3, you can replace 'github/codeql-action/*@v2' by 'github/codeql-action/*@v2.20.4' in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
- We are rolling out a feature in July 2023 that will slightly reduce the default amount of RAM used for query execution, in proportion to the runner's total memory. This will help to avoid out-of-memory failures on larger runners. [#1760](https://github.com/github/codeql-action/pull/1760)
- Update default CodeQL bundle version to 2.14.0. [#1762](https://github.com/github/codeql-action/pull/1762)
## 2.20.3 - 06 Jul 2023
- Update default CodeQL bundle version to 2.13.5. [#1743](https://github.com/github/codeql-action/pull/1743)
## 2.20.2 - 03 Jul 2023
No user facing changes.
## 2.20.1 - 21 Jun 2023
- Update default CodeQL bundle version to 2.13.4. [#1721](https://github.com/github/codeql-action/pull/1721)
- Experimental: add a new `resolve-environment` action which attempts to infer a configuration for the build environment that is required to build a given project. Do not use this in production as it is part of an internal experiment and subject to change at any time.
## 2.20.0 - 13 Jun 2023
- Bump the version of the Action to 2.20.0. This ensures that users who received a Dependabot upgrade to [`cdcdbb5`](https://github.com/github/codeql-action/commit/cdcdbb579706841c47f7063dda365e292e5cad7a), which was mistakenly marked as Action version 2.13.4, continue to receive updates to the CodeQL Action. Full details in [#1729](https://github.com/github/codeql-action/pull/1729)
## 2.3.6 - 01 Jun 2023
- Update default CodeQL bundle version to 2.13.3. [#1698](https://github.com/github/codeql-action/pull/1698)
## 2.3.5 - 25 May 2023
- Allow invalid URIs to be used as values to `artifactLocation.uri` properties. This reverses a change from [#1668](https://github.com/github/codeql-action/pull/1668) that inadvertently led to stricter validation of some URI values. [#1705](https://github.com/github/codeql-action/pull/1705)
- Gracefully handle invalid URIs when fingerprinting. [#1694](https://github.com/github/codeql-action/pull/1694)
## 2.3.4 - 24 May 2023
- Updated the SARIF 2.1.0 JSON schema file to the latest from [oasis-tcs/sarif-spec](https://github.com/oasis-tcs/sarif-spec/blob/123e95847b13fbdd4cbe2120fa5e33355d4a042b/Schemata/sarif-schema-2.1.0.json). [#1668](https://github.com/github/codeql-action/pull/1668)
- We are rolling out a feature in May 2023 that will disable Python dependency installation for new users of the CodeQL Action. This improves the speed of analysis while having only a very minor impact on results. [#1676](https://github.com/github/codeql-action/pull/1676)
- We are improving the way that [CodeQL bundles](https://github.com/github/codeql-action/releases) are tagged to make it possible to easily identify bundles by their CodeQL semantic version. [#1682](https://github.com/github/codeql-action/pull/1682)
- As of CodeQL CLI 2.13.4, CodeQL bundles will be tagged using semantic versions, for example `codeql-bundle-v2.13.4`, instead of timestamps, like `codeql-bundle-20230615`.
- This change does not affect the majority of workflows, and we will not be changing tags for existing bundle releases.
- Some workflows with custom logic that depends on the specific format of the CodeQL bundle tag may need to be updated. For example, if your workflow matches CodeQL bundle tag names against a `codeql-bundle-yyyymmdd` pattern, you should update it to also recognize `codeql-bundle-vx.y.z` tags.
- Remove the requirement for `on.push` and `on.pull_request` to trigger on the same branches. [#1675](https://github.com/github/codeql-action/pull/1675)
## 2.3.3 - 04 May 2023
- Update default CodeQL bundle version to 2.13.1. [#1664](https://github.com/github/codeql-action/pull/1664)
- You can now configure CodeQL within your code scanning workflow by passing a `config` input to the `init` Action. See [Using a custom configuration file](https://aka.ms/code-scanning-docs/config-file) for more information about configuring code scanning. [#1590](https://github.com/github/codeql-action/pull/1590)
## 2.3.2 - 27 Apr 2023
No user facing changes.
## 2.3.1 - 26 Apr 2023
No user facing changes.
## 2.3.0 - 21 Apr 2023
- Update default CodeQL bundle version to 2.13.0. [#1649](https://github.com/github/codeql-action/pull/1649)
- Bump the minimum CodeQL bundle version to 2.8.5. [#1618](https://github.com/github/codeql-action/pull/1618)
## 2.2.12 - 13 Apr 2023
- Include the value of the `GITHUB_RUN_ATTEMPT` environment variable in the telemetry sent to GitHub. [#1640](https://github.com/github/codeql-action/pull/1640)
- Improve the ease of debugging failed runs configured using [default setup](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository#configuring-code-scanning-automatically). The CodeQL Action will now upload diagnostic information to Code Scanning from failed runs configured using default setup. You can view this diagnostic information on the [tool status page](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-the-tool-status-page). [#1619](https://github.com/github/codeql-action/pull/1619)
## 2.2.11 - 06 Apr 2023
No user facing changes.
## 2.2.10 - 05 Apr 2023
- Update default CodeQL bundle version to 2.12.6. [#1629](https://github.com/github/codeql-action/pull/1629)
## 2.2.9 - 27 Mar 2023
- Customers post-processing the SARIF output of the `analyze` Action before uploading it to Code Scanning will benefit from an improved debugging experience. [#1598](https://github.com/github/codeql-action/pull/1598)
- The CodeQL Action will now upload a SARIF file with debugging information to Code Scanning on failed runs for customers using `upload: false`. Previously, this was only available for customers using the default value of the `upload` input.
- The `upload` input to the `analyze` Action now accepts the following values:
- `always` is the default value, which uploads the SARIF file to Code Scanning for successful and failed runs.
- `failure-only` is recommended for customers post-processing the SARIF file before uploading it to Code Scanning. This option uploads debugging information to Code Scanning for failed runs to improve the debugging experience.
- `never` avoids uploading the SARIF file to Code Scanning even if the code scanning run fails. This is not recommended for external users since it complicates debugging.
- The legacy `true` and `false` options will be interpreted as `always` and `failure-only` respectively.
## 2.2.8 - 22 Mar 2023
- Update default CodeQL bundle version to 2.12.5. [#1585](https://github.com/github/codeql-action/pull/1585)
## 2.2.7 - 15 Mar 2023
No user facing changes.
## 2.2.6 - 10 Mar 2023
- Update default CodeQL bundle version to 2.12.4. [#1561](https://github.com/github/codeql-action/pull/1561)
## 2.2.5 - 24 Feb 2023
- Update default CodeQL bundle version to 2.12.3. [#1543](https://github.com/github/codeql-action/pull/1543)
## 2.2.4 - 10 Feb 2023
No user facing changes.
## 2.2.3 - 08 Feb 2023
- Update default CodeQL bundle version to 2.12.2. [#1518](https://github.com/github/codeql-action/pull/1518)
## 2.2.2 - 06 Feb 2023
- Fix an issue where customers using the CodeQL Action with the [CodeQL Action sync tool](https://docs.github.com/en/enterprise-server@3.7/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance#configuring-codeql-analysis-on-a-server-without-internet-access) would not be able to obtain the CodeQL tools. [#1517](https://github.com/github/codeql-action/pull/1517)
## 2.2.1 - 27 Jan 2023
No user facing changes.
## 2.2.0 - 26 Jan 2023
- Improve stability when choosing the default version of CodeQL to use in code scanning workflow runs on Actions on GitHub.com. [#1475](https://github.com/github/codeql-action/pull/1475)
- This change addresses customer reports of code scanning alerts on GitHub.com being closed and reopened during the rollout of new versions of CodeQL in the GitHub Actions [runner images](https://github.com/actions/runner-images).
- **No change is required for the majority of workflows**, including:
- Workflows on GitHub.com hosted runners using the latest version (`v2`) of the CodeQL Action.
- Workflows on GitHub.com hosted runners that are pinned to specific versions of the CodeQL Action from `v2.2.0` onwards.
- Workflows on GitHub Enterprise Server.
- **A change may be required** for workflows on GitHub.com hosted runners that are pinned to specific versions of the CodeQL Action before `v2.2.0` (e.g. `v2.1.32`):
- Previously, these workflows would obtain the latest version of CodeQL from the Actions runner image.
- Now, these workflows will download an older, compatible version of CodeQL from GitHub Releases. To use this older version, no change is required. To use the newest version of CodeQL, please update your workflows to reference the latest version of the CodeQL Action (`v2`).
- **Internal changes**
- These changes will not affect the majority of code scanning workflows. Continue reading only if your workflow uses [@actions/tool-cache](https://github.com/actions/toolkit/tree/main/packages/tool-cache) or relies on the precise location of CodeQL within the Actions tool cache.
- The tool cache now contains **two** recent CodeQL versions (previously **one**).
- Each CodeQL version is located under a directory named after the release date and version number, e.g. CodeQL 2.11.6 is now located under `CodeQL/2.11.6-20221211/x64/codeql` (previously `CodeQL/0.0.0-20221211/x64/codeql`).
- The maximum number of [SARIF runs](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#run-object) per file has been increased from 15 to 20 for users uploading SARIF files to GitHub.com. This change will help ensure that Code Scanning can process SARIF files generated by third-party tools that have many runs. See the [GitHub API documentation](https://docs.github.com/en/rest/code-scanning#upload-an-analysis-as-sarif-data) for a list of all the limits around uploading SARIF. This change will be released to GitHub Enterprise Server as part of GHES 3.9.
- Update default CodeQL bundle version to 2.12.1. [#1498](https://github.com/github/codeql-action/pull/1498)
- Fix a bug that forced the `init` Action to run for at least two minutes on JavaScript. [#1494](https://github.com/github/codeql-action/pull/1494)
## 2.1.39 - 18 Jan 2023
- CodeQL Action v1 is now deprecated, and is no longer updated or supported. For better performance, improved security, and new features, upgrade to v2. For more information, see [this changelog post](https://github.blog/changelog/2023-01-18-code-scanning-codeql-action-v1-is-now-deprecated/). [#1467](https://github.com/github/codeql-action/pull/1466)
- Python automatic dependency installation will no longer fail for projects using Poetry that specify `virtualenvs.options.no-pip = true` in their `poetry.toml`. [#1431](https://github.com/github/codeql-action/pull/1431)
- Avoid printing a stack trace and error message when the action fails to find the SHA at the
current directory. This will happen in several non-error states and so we now avoid cluttering the
log with this message. [#1485](https://github.com/github/codeql-action/pull/1485)
## 2.1.38 - 12 Jan 2023
- Update default CodeQL bundle version to 2.12.0. [#1466](https://github.com/github/codeql-action/pull/1466)
## 2.1.37 - 14 Dec 2022
- Update default CodeQL bundle version to 2.11.6. [#1433](https://github.com/github/codeql-action/pull/1433)
## 2.1.36 - 08 Dec 2022
- Update default CodeQL bundle version to 2.11.5. [#1412](https://github.com/github/codeql-action/pull/1412)
- Add a step that tries to upload a SARIF file for the workflow run when that workflow run fails. This will help better surface failed code scanning workflow runs. [#1393](https://github.com/github/codeql-action/pull/1393)
- Python automatic dependency installation will no longer consider dependency code installed in venv as user-written, for projects using Poetry that specify `virtualenvs.in-project = true` in their `poetry.toml`. [#1419](https://github.com/github/codeql-action/pull/1419)
## 2.1.35 - 01 Dec 2022
No user facing changes.
## 2.1.34 - 25 Nov 2022
- Update default CodeQL bundle version to 2.11.4. [#1391](https://github.com/github/codeql-action/pull/1391)
- Fixed a bug where some the `init` action and the `analyze` action would have different sets of experimental feature flags enabled. [#1384](https://github.com/github/codeql-action/pull/1384)
## 2.1.33 - 16 Nov 2022
- Go is now analyzed in the same way as other compiled languages such as C/C++, C#, and Java. This completes the rollout of the feature described in [CodeQL Action version 2.1.27](#2127---06-oct-2022). [#1322](https://github.com/github/codeql-action/pull/1322)
- Bump the minimum CodeQL bundle version to 2.6.3. [#1358](https://github.com/github/codeql-action/pull/1358)
## 2.1.32 - 14 Nov 2022
- Update default CodeQL bundle version to 2.11.3. [#1348](https://github.com/github/codeql-action/pull/1348)
- Update the ML-powered additional query pack for JavaScript to version 0.4.0. [#1351](https://github.com/github/codeql-action/pull/1351)
## 2.1.31 - 04 Nov 2022
- The `rb/weak-cryptographic-algorithm` Ruby query has been updated to no longer report uses of hash functions such as `MD5` and `SHA1` even if they are known to be weak. These hash algorithms are used very often in non-sensitive contexts, making the query too imprecise in practice. For more information, see the corresponding change in the [github/codeql repository](https://github.com/github/codeql/pull/11129). [#1344](https://github.com/github/codeql-action/pull/1344)
## 2.1.30 - 02 Nov 2022
- Improve the error message when using CodeQL bundle version 2.7.2 and earlier in a workflow that runs on a runner image such as `ubuntu-22.04` that uses glibc version 2.34 and later. [#1334](https://github.com/github/codeql-action/pull/1334)
## 2.1.29 - 26 Oct 2022
- Update default CodeQL bundle version to 2.11.2. [#1320](https://github.com/github/codeql-action/pull/1320)
## 2.1.28 - 18 Oct 2022
- Update default CodeQL bundle version to 2.11.1. [#1294](https://github.com/github/codeql-action/pull/1294)
- Replace uses of GitHub Actions command `set-output` because it is now deprecated. See more information in the [GitHub Changelog](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/). [#1301](https://github.com/github/codeql-action/pull/1301)
## 2.1.27 - 06 Oct 2022
- We are rolling out a feature of the CodeQL Action in October 2022 that changes the way that Go code is analyzed to be more consistent with other compiled languages like C/C++, C#, and Java. You do not need to alter your code scanning workflows. If you encounter any problems, please [file an issue](https://github.com/github/codeql-action/issues) or open a private ticket with GitHub Support and request an escalation to engineering.
## 2.1.26 - 29 Sep 2022
- Update default CodeQL bundle version to 2.11.0. [#1267](https://github.com/github/codeql-action/pull/1267)
## 2.1.25 - 21 Sep 2022
- We will soon be rolling out a feature of the CodeQL Action that stores some information used to make future runs faster in the GitHub Actions cache. Initially, this will only be enabled on JavaScript repositories, but we plan to add more languages to this soon. The new feature can be disabled by passing the `trap-caching: false` option to your workflow's `init` step, for example if you are already using the GitHub Actions cache for a different purpose and are near the storage limit for it.
- Add support for Python automatic dependency installation with Poetry 1.2 [#1258](https://github.com/github/codeql-action/pull/1258)
## 2.1.24 - 16 Sep 2022
No user facing changes.
## 2.1.23 - 14 Sep 2022
- Allow CodeQL packs to be downloaded from GitHub Enterprise Server instances, using the new `registries` input for the `init` action. [#1221](https://github.com/github/codeql-action/pull/1221)
- Update default CodeQL bundle version to 2.10.5. [#1240](https://github.com/github/codeql-action/pull/1240)
## 2.1.22 - 01 Sep 2022
- Downloading CodeQL packs has been moved to the `init` step. Previously, CodeQL packs were downloaded during the `analyze` step. [#1218](https://github.com/github/codeql-action/pull/1218)
- Update default CodeQL bundle version to 2.10.4. [#1224](https://github.com/github/codeql-action/pull/1224)
- The newly released [Poetry 1.2](https://python-poetry.org/blog/announcing-poetry-1.2.0) is not yet supported. In the most common case where the CodeQL Action is automatically installing Python dependencies, it will continue to install and use Poetry 1.1 on its own. However, in certain cases such as with self-hosted runners, you may need to ensure Poetry 1.1 is installed yourself.
## 2.1.21 - 25 Aug 2022
- Improve error messages when the code scanning configuration file includes an invalid `queries` block or an invalid `query-filters` block. [#1208](https://github.com/github/codeql-action/pull/1208)
- Fix a bug where Go build tracing could fail on Windows. [#1209](https://github.com/github/codeql-action/pull/1209)
## 2.1.20 - 22 Aug 2022
No user facing changes.
## 2.1.19 - 17 Aug 2022
- Add the ability to filter queries from a code scanning run by using the `query-filters` option in the code scanning configuration file. [#1098](https://github.com/github/codeql-action/pull/1098)
- In debug mode, debug artifacts are now uploaded even if a step in the Actions workflow fails. [#1159](https://github.com/github/codeql-action/pull/1159)
- Update default CodeQL bundle version to 2.10.3. [#1178](https://github.com/github/codeql-action/pull/1178)
- The combination of python2 and Pipenv is no longer supported. [#1181](https://github.com/github/codeql-action/pull/1181)
## 2.1.18 - 03 Aug 2022
- Update default CodeQL bundle version to 2.10.2. [#1156](https://github.com/github/codeql-action/pull/1156)
## 2.1.17 - 28 Jul 2022
- Update default CodeQL bundle version to 2.10.1. [#1143](https://github.com/github/codeql-action/pull/1143)
## 2.1.16 - 13 Jul 2022
- You can now quickly debug a job that uses the CodeQL Action by re-running the job from the GitHub UI and selecting the "Enable debug logging" option. [#1132](https://github.com/github/codeql-action/pull/1132)
- You can now see diagnostic messages produced by the analysis in the logs of the `analyze` Action by enabling debug mode. To enable debug mode, pass `debug: true` to the `init` Action, or [enable step debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging). This feature is available for CodeQL CLI version 2.10.0 and later. [#1133](https://github.com/github/codeql-action/pull/1133)
## 2.1.15 - 28 Jun 2022
- CodeQL query packs listed in the `packs` configuration field will be skipped if their target language is not being analyzed in the current Actions job. Previously, this would throw an error. [#1116](https://github.com/github/codeql-action/pull/1116)
- The combination of python2 and poetry is no longer supported. See <https://github.com/actions/setup-python/issues/374> for more details. [#1124](https://github.com/github/codeql-action/pull/1124)
- Update default CodeQL bundle version to 2.10.0. [#1123](https://github.com/github/codeql-action/pull/1123)
## 2.1.14 - 22 Jun 2022
No user facing changes.
## 2.1.13 - 21 Jun 2022
- Update default CodeQL bundle version to 2.9.4. [#1100](https://github.com/github/codeql-action/pull/1100)
## 2.1.12 - 01 Jun 2022
- Update default CodeQL bundle version to 2.9.3. [#1084](https://github.com/github/codeql-action/pull/1084)
## 2.1.11 - 17 May 2022
- Update default CodeQL bundle version to 2.9.2. [#1074](https://github.com/github/codeql-action/pull/1074)
## 2.1.10 - 10 May 2022
- Update default CodeQL bundle version to 2.9.1. [#1056](https://github.com/github/codeql-action/pull/1056)
- When `wait-for-processing` is enabled, the workflow will now fail if there were any errors that occurred during processing of the analysis results.
## 2.1.9 - 27 Apr 2022
- Add `working-directory` input to the `autobuild` action. [#1024](https://github.com/github/codeql-action/pull/1024)
- The `analyze` and `upload-sarif` actions will now wait up to 2 minutes for processing to complete after they have uploaded the results so they can report any processing errors that occurred. This behavior can be disabled by setting the `wait-for-processing` action input to `"false"`. [#1007](https://github.com/github/codeql-action/pull/1007)
- Update default CodeQL bundle version to 2.9.0.
- Fix a bug where [status reporting fails on Windows](https://github.com/github/codeql-action/issues/1041). [#1042](https://github.com/github/codeql-action/pull/1042)
## 2.1.8 - 08 Apr 2022
- Update default CodeQL bundle version to 2.8.5. [#1014](https://github.com/github/codeql-action/pull/1014)
- Fix error where the init action would fail due to a GitHub API request that was taking too long to complete [#1025](https://github.com/github/codeql-action/pull/1025)
## 2.1.7 - 05 Apr 2022
- A bug where additional queries specified in the workflow file would sometimes not be respected has been fixed. [#1018](https://github.com/github/codeql-action/pull/1018)
## 2.1.6 - 30 Mar 2022
- [v2+ only] The CodeQL Action now runs on Node.js v16. [#1000](https://github.com/github/codeql-action/pull/1000)
- Update default CodeQL bundle version to 2.8.4. [#990](https://github.com/github/codeql-action/pull/990)
- Fix a bug where an invalid `commit_oid` was being sent to code scanning when a custom checkout path was being used. [#956](https://github.com/github/codeql-action/pull/956)
## 1.1.5 - 15 Mar 2022
- Update default CodeQL bundle version to 2.8.3.
- The CodeQL runner is now deprecated and no longer being released. For more information, see [CodeQL runner deprecation](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/).
- Fix two bugs that cause action failures with GHES 3.3 or earlier. [#978](https://github.com/github/codeql-action/pull/978)
- Fix `not a permitted key` invalid requests with GHES 3.1 or earlier
- Fix `RUNNER_ARCH environment variable must be set` errors with GHES 3.3 or earlier
## 1.1.4 - 07 Mar 2022
- Update default CodeQL bundle version to 2.8.2. [#950](https://github.com/github/codeql-action/pull/950)
- Fix a bug where old results can be uploaded if the languages in a repository change when using a non-ephemeral self-hosted runner. [#955](https://github.com/github/codeql-action/pull/955)
## 1.1.3 - 23 Feb 2022
- Fix a bug where the CLR traces can continue tracing even after tracing should be stopped. [#938](https://github.com/github/codeql-action/pull/938)
## 1.1.2 - 17 Feb 2022
- Due to potential issues for GHES 3.13.3 customers who are using recent versions of the CodeQL Action via GHES Connect, the CodeQL Action now uses Node.js v12 rather than Node.js v16. [#937](https://github.com/github/codeql-action/pull/937)
## 1.1.1 - 17 Feb 2022
- The CodeQL CLI versions up to and including version 2.4.4 are not compatible with the CodeQL Action 1.1.1 and later. The Action will emit an error if it detects that it is being used by an incompatible version of the CLI. [#931](https://github.com/github/codeql-action/pull/931)
- Update default CodeQL bundle version to 2.8.1. [#925](https://github.com/github/codeql-action/pull/925)
## 1.1.0 - 11 Feb 2022
- The CodeQL Action now uses Node.js v16. [#909](https://github.com/github/codeql-action/pull/909)
- Beware that the CodeQL build tracer in this release (and in all earlier releases) is incompatible with Windows 11 and Windows Server 2022. This incompatibility affects database extraction for compiled languages: cpp, csharp, go, and java. As a result, analyzing these languages with the `windows-latest` or `windows-2022` Actions virtual environments is currently unsupported. If you use any of these languages, please use the `windows-2019` Actions virtual environment or otherwise avoid these specific Windows versions until a new release fixes this incompatibility.
## 1.0.32 - 07 Feb 2022
- Add `sarif-id` as an output for the `upload-sarif` and `analyze` actions. [#889](https://github.com/github/codeql-action/pull/889)
- Add `ref` and `sha` inputs to the `analyze` action, which override the defaults provided by the GitHub Action context. [#889](https://github.com/github/codeql-action/pull/889)
- Update default CodeQL bundle version to 2.8.0. [#911](https://github.com/github/codeql-action/pull/911)
## 1.0.31 - 31 Jan 2022
- Remove `experimental` message when using custom CodeQL packages. [#888](https://github.com/github/codeql-action/pull/888)
- Add a better warning message stating that experimental features will be disabled if the workflow has been triggered by a pull request from a fork or the `security-events: write` permission is not present. [#882](https://github.com/github/codeql-action/pull/882)
## 1.0.30 - 24 Jan 2022
- Display a better error message when encountering a workflow that runs the `codeql-action/init` action multiple times. [#876](https://github.com/github/codeql-action/pull/876)
- Update default CodeQL bundle version to 2.7.6. [#877](https://github.com/github/codeql-action/pull/877)
## 1.0.29 - 21 Jan 2022
- The feature to wait for SARIF processing to complete after upload has been disabled by default due to a bug in its interaction with pull requests from forks.
## 1.0.28 - 18 Jan 2022
- Update default CodeQL bundle version to 2.7.5. [#866](https://github.com/github/codeql-action/pull/866)
- Fix a bug where SARIF files were failing upload due to an invalid test for unique categories. [#872](https://github.com/github/codeql-action/pull/872)
## 1.0.27 - 11 Jan 2022
- The `analyze` and `upload-sarif` actions will now wait up to 2 minutes for processing to complete after they have uploaded the results so they can report any processing errors that occurred. This behavior can be disabled by setting the `wait-for-processing` action input to `"false"`. [#855](https://github.com/github/codeql-action/pull/855)
## 1.0.26 - 10 Dec 2021
- Update default CodeQL bundle version to 2.7.3. [#842](https://github.com/github/codeql-action/pull/842)
## 1.0.25 - 06 Dec 2021
No user facing changes.
## 1.0.24 - 23 Nov 2021
- Update default CodeQL bundle version to 2.7.2. [#827](https://github.com/github/codeql-action/pull/827)
## 1.0.23 - 16 Nov 2021
- The `upload-sarif` action now allows multiple uploads in a single job, as long as they have different categories. [#801](https://github.com/github/codeql-action/pull/801)
- Update default CodeQL bundle version to 2.7.1. [#816](https://github.com/github/codeql-action/pull/816)
## 1.0.22 - 04 Nov 2021
- The `init` step of the Action now supports `ram` and `threads` inputs to limit resource use of CodeQL extractors. These inputs also serve as defaults to the subsequent `analyze` step, which finalizes the database and executes queries. [#738](https://github.com/github/codeql-action/pull/738)
- When used with CodeQL 2.7.1 or above, the Action now includes custom query help in the analysis results uploaded to GitHub code scanning, if available. To add help text for a custom query, create a Markdown file next to the `.ql` file containing the query, using the same base name but the file extension `.md`. [#804](https://github.com/github/codeql-action/pull/804)
## 1.0.21 - 28 Oct 2021
- Update default CodeQL bundle version to 2.7.0. [#795](https://github.com/github/codeql-action/pull/795)
## 1.0.20 - 25 Oct 2021
No user facing changes.
## 1.0.19 - 18 Oct 2021
No user facing changes.
## 1.0.18 - 08 Oct 2021
- Fixed a bug where some builds were no longer being traced correctly. [#766](https://github.com/github/codeql-action/pull/766)
## 1.0.17 - 07 Oct 2021
- Update default CodeQL bundle version to 2.6.3. [#761](https://github.com/github/codeql-action/pull/761)
## 1.0.16 - 05 Oct 2021
No user facing changes.
## 1.0.15 - 22 Sep 2021
- Update default CodeQL bundle version to 2.6.2. [#746](https://github.com/github/codeql-action/pull/746)
## 1.0.14 - 09 Sep 2021
- Update default CodeQL bundle version to 2.6.1. [#733](https://github.com/github/codeql-action/pull/733)
## 1.0.13 - 06 Sep 2021
- Update default CodeQL bundle version to 2.6.0. [#712](https://github.com/github/codeql-action/pull/712)
- Update baseline lines of code counter for python. All multi-line strings are counted as code. [#714](https://github.com/github/codeql-action/pull/714)
- Remove old baseline LoC injection [#715](https://github.com/github/codeql-action/pull/715)
## 1.0.12 - 16 Aug 2021
- Update README to include a sample permissions block. [#689](https://github.com/github/codeql-action/pull/689)
## 1.0.11 - 09 Aug 2021
- Update default CodeQL bundle version to 2.5.9. [#687](https://github.com/github/codeql-action/pull/687)
## 1.0.10 - 03 Aug 2021
- Fix an issue where a summary of diagnostics information from CodeQL was not output to the logs of the `analyze` step of the Action. [#672](https://github.com/github/codeql-action/pull/672)
## 1.0.9 - 02 Aug 2021
No user facing changes.
## 1.0.8 - 26 Jul 2021
- Update default CodeQL bundle version to 2.5.8. [#631](https://github.com/github/codeql-action/pull/631)
## 1.0.7 - 21 Jul 2021
No user facing changes.
## 1.0.6 - 19 Jul 2021
- The `init` step of the Action now supports a `source-root` input as a path to the root source-code directory. By default, the path is relative to `$GITHUB_WORKSPACE`. [#607](https://github.com/github/codeql-action/pull/607)
- The `init` step will now try to install a few Python tools needed by this Action when running on a self-hosted runner. [#616](https://github.com/github/codeql-action/pull/616)
## 1.0.5 - 12 Jul 2021
- The `analyze` step of the Action now supports a `skip-queries` option to merely build the CodeQL database without analyzing. This functionality is not present in the runner. Additionally, the step will no longer fail if it encounters a finalized database, and will instead continue with query execution. [#602](https://github.com/github/codeql-action/pull/602)
- Update the warning message when the baseline lines of code count is unavailable. [#608](https://github.com/github/codeql-action/pull/608)
## 1.0.4 - 28 Jun 2021
- Fix `RUNNER_TEMP environment variable must be set` when using runner. [#594](https://github.com/github/codeql-action/pull/594)
- Fix counting of lines of code for C# projects. [#586](https://github.com/github/codeql-action/pull/586)
## 1.0.3 - 23 Jun 2021
No user facing changes.
## 1.0.2 - 17 Jun 2021
- Fix out of memory in hash computation. [#550](https://github.com/github/codeql-action/pull/550)
- Clean up logging during analyze results. [#557](https://github.com/github/codeql-action/pull/557)
- Add `--finalize-dataset` to `database finalize` call, freeing up some disk space after database creation. [#558](https://github.com/github/codeql-action/pull/558)
## 1.0.1 - 07 Jun 2021
- Pass the `--sarif-group-rules-by-pack` argument to CodeQL CLI invocations that generate SARIF. This means the SARIF rule object for each query will now be found underneath its corresponding query pack in `runs[].tool.extensions`. [#546](https://github.com/github/codeql-action/pull/546)
- Output the location of CodeQL databases created in the analyze step. [#543](https://github.com/github/codeql-action/pull/543)
## 1.0.0 - 31 May 2021
- Add this changelog file. [#507](https://github.com/github/codeql-action/pull/507)
- Improve grouping of analysis logs. Add a new log group containing a summary of metrics and diagnostics, if they were produced by CodeQL builtin queries. [#515](https://github.com/github/codeql-action/pull/515)
- Add metrics and diagnostics summaries from custom query suites to the analysis summary log group. [#532](https://github.com/github/codeql-action/pull/532)

3
CODEOWNERS Normal file
View File

@@ -0,0 +1,3 @@
**/* @github/codeql-action-reviewers
/python-setup/ @github/codeql-python @github/codeql-action-reviewers

View File

@@ -1,4 +1,4 @@
## Contributing
# Contributing
[fork]: https://github.com/github/codeql-action/fork
[pr]: https://github.com/github/codeql-action/compare
@@ -10,13 +10,43 @@ Contributions to this project are [released](https://help.github.com/articles/gi
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
## Development and Testing
Before you start, ensure that you have a recent version of node (16 or higher) installed, along with a recent version of npm (9.2 or higher). You can see which version of node is used by the action in `init/action.yml`.
### Common tasks
* Transpile the TypeScript to JavaScript: `npm run build`. Note that the JavaScript files are committed to git.
* Run tests: `npm run test`. Youll need to ensure that the JavaScript files are up-to-date first by running the command above.
* Run the linter: `npm run lint`.
This project also includes configuration to run tests from VSCode (with support for breakpoints) - open the test file you wish to run and choose "Debug AVA test file" from the Run menu in the Run panel.
You may want to run `tsc --watch` from the command line or inside of vscode in order to ensure build artifacts are up to date as you are working.
### Checking in compiled artifacts and `node_modules`
Because CodeQL Action users consume the code directly from this repository, and there can be no build step during an GitHub Actions run, this repository contains all compiled artifacts and node modules. There is a PR check that will fail if any of the compiled artifacts are not up to date. Compiled artifacts are stored in the `lib/` directory. For all day-to-day development purposes, this folder can be ignored.
Only run `npm install` if you are explicitly changing the set of dependencies in `package.json`. The `node_modules` directory should be up to date when you check out, but if for some reason, there is an inconsistency use `npm ci && npm run removeNPMAbsolutePaths` to ensure the directory is in a state consistent with the `package-lock.json`. Note that due to a macOS-specific dependency, this command should be run on a macOS machine. There is a PR check to ensure the consistency of the `node_modules` directory.
### Running the action
To see the effect of your changes and to test them, push your changes in a branch and then look at the [Actions output](https://github.com/github/codeql-action/actions) for that branch. You can also exercise the code locally by running the automated tests.
### Integration tests
As well as the unit tests (see _Common tasks_ above), there are integration tests, defined in `.github/workflows/integration-testing.yml`. These are run by a CI check. Depending on the change youre making, you may want to add a test to this file or extend an existing one.
## Submitting a pull request
1. [Fork][fork] and clone the repository
2. Create a new branch: `git checkout -b my-branch-name`
3. Make your change, add tests, and make sure the tests still pass
4. Push to your fork and [submit a pull request][pr]
5. Pat your self on the back and wait for your pull request to be reviewed and merged.
5. Pat yourself on the back and wait for your pull request to be reviewed and merged.
If you're a GitHub staff member, you can merge your own PR once it's approved; for external contributors, GitHub staff will merge your PR once it's approved.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
@@ -24,6 +54,30 @@ Here are a few things you can do that will increase the likelihood of your pull
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
## Releasing (write access required)
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `releases/v2` release branch.
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
1. The workflow run will open a pull request titled "Merge main into releases/v2". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
1. Review the checklist items in the pull request description.
Once you've checked off all but the last two of these, approve the PR and automerge it.
1. When the "Merge main into releases/v2" pull request is merged into the `releases/v2` branch, the "Tag release and merge back" workflow will create a mergeback PR.
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v2" pull request, and bumps the patch version of the CodeQL Action.
Approve the mergeback PR and automerge it.
Once the mergeback has been merged to `main`, the release is complete.
## Keeping the PR checks up to date (admin access required)
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred jobs that need to pass in order for a PR to turn green. You can regenerate the checks automatically by running the [update-required-checks.sh](.github/workflows/script/update-required-checks.sh) script:
1. By default, this script retrieves the checks from the latest SHA on `main`, so make sure that your `main` branch is up to date.
2. Run the script. If there's a reason to, you can pass in a different SHA as a CLI argument.
3. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v1`, and `v2` have been updated.
## Resources
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

104
README.md
View File

@@ -1,6 +1,8 @@
# CodeQL Action
This action runs GitHub's industry-leading static analysis engine, CodeQL, against a repository's source code to find security vulnerabilities. It then automatically uploads the results to GitHub so they can be displayed in the repository's security tab. CodeQL runs an extensible set of [queries](https://github.com/github/codeql), which have been developed by the community and the [GitHub Security Lab](https://securitylab.github.com/) to find common vulnerabilities in your code.
This action runs GitHub's industry-leading semantic code analysis engine, [CodeQL](https://codeql.github.com/), against a repository's source code to find security vulnerabilities. It then automatically uploads the results to GitHub so they can be displayed on pull requests and in the repository's security tab. CodeQL runs an extensible set of [queries](https://github.com/github/codeql), which have been developed by the community and the [GitHub Security Lab](https://securitylab.github.com/) to find common vulnerabilities in your code.
For a list of recent changes, see the CodeQL Action's [changelog](CHANGELOG.md).
## License
@@ -10,100 +12,14 @@ The underlying CodeQL CLI, used in this action, is licensed under the [GitHub Co
## Usage
This is a short walkthrough, but for more information read [configuring code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-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/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-default-setup-for-code-scanning)."
To get code scanning results from CodeQL analysis on your repo you can use the following workflow as a template:
```yaml
name: "Code Scanning - Action"
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
CodeQL-Build:
strategy:
fail-fast: false
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
# Only include this option if you are running this workflow on pull requests.
fetch-depth: 2
# If this run was triggered by a pull request event then checkout
# the head of the pull request instead of the merge commit.
# Only include this step if you are running this workflow on pull requests.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
```
If you prefer to integrate this within an existing CI workflow, it should end up looking something like this:
```yaml
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: go, javascript
# Here is where you build your code
- run: |
make bootstrap
make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
```
### Configuration file
Use the `config-file` parameter of the `init` action to enable the configuration file. The value of `config-file` is the path to the configuration file you want to use. This example loads the configuration file `./.github/codeql/codeql-config.yml`.
```yaml
- uses: github/codeql-action/init@v1
with:
config-file: ./.github/codeql/codeql-config.yml
```
The configuration file must be located within the local repository. For information on how to write a configuration file, see "[Using a custom configuration](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#using-a-custom-configuration)."
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)."
## Troubleshooting
Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).
Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning).
## Contributing
This project welcomes contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to build, install, and contribute.

View File

@@ -1,24 +1,89 @@
name: 'CodeQL: Finish'
description: 'Finalize CodeQL database'
author: 'GitHub'
name: "CodeQL: Finish"
description: "Finalize CodeQL database"
author: "GitHub"
inputs:
check_name:
description: The name of the check run to add text to.
required: false
output:
description: The path of the directory in which to save the SARIF results
required: false
default: '../results'
default: "../results"
upload:
description: Upload the SARIF file
description: >-
Upload the SARIF file to Code Scanning.
Defaults to 'always' which uploads the SARIF file to Code Scanning for successful and failed runs.
'failure-only' only uploads debugging information to Code Scanning if the workflow run fails, for users post-processing the SARIF file before uploading it to Code Scanning.
'never' avoids uploading the SARIF file to Code Scanning, even if the code scanning run fails. This is not recommended for external users since it complicates debugging.
required: false
default: true
# If changing this, make sure to update workflow.ts accordingly.
default: "always"
cleanup-level:
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --mode flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
required: false
default: "brutal"
ram:
description: Override the amount of memory in MB to be used by CodeQL. By default, almost all the memory of the machine is used.
description: >-
The amount of memory in MB that can be used by CodeQL for database finalization and query execution.
By default, this action will use the same amount of memory as previously set in the "init" action.
If the "init" action also does not have an explicit "ram" input, this action will use most of the
memory available in the system (which for GitHub-hosted runners is 6GB for Linux, 5.5GB for Windows,
and 13GB for macOS).
required: false
add-snippets:
description: Specify whether or not to add code snippets to the output sarif file.
required: false
default: "false"
skip-queries:
description: If this option is set, the CodeQL database will be built but no queries will be run on it. Thus, no results will be produced.
required: false
default: "false"
threads:
description: >-
The number of threads that can be used by CodeQL for database finalization and query execution.
By default, this action will use the same number of threads as previously set in the "init" action.
If the "init" action also does not have an explicit "threads" input, this action will use all the
hardware threads available in the system (which for GitHub-hosted runners is 2 for Linux and Windows
and 3 for macOS).
required: false
checkout_path:
description: "The path at which the analyzed repository was checked out. Used to relativize any absolute paths in the uploaded SARIF file."
required: false
# If changing this, make sure to update workflow.ts accordingly.
default: ${{ github.workspace }}
ref:
description: "The ref where results will be uploaded. If not provided, the Action will use the GITHUB_REF environment variable. If provided, the sha input must be provided as well. This input is not available in pull requests from forks."
required: false
sha:
description: "The sha of the HEAD of the ref where results will be uploaded. If not provided, the Action will use the GITHUB_SHA environment variable. If provided, the ref input must be provided as well. This input is not available in pull requests from forks."
required: false
category:
description: String used by Code Scanning for matching the analyses
required: false
upload-database:
description: Whether to upload the resulting CodeQL database
required: false
default: "true"
wait-for-processing:
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
required: true
default: "true"
token:
default: ${{ github.token }}
matrix:
default: ${{ toJson(matrix) }}
expect-error:
description: "[Internal] It is an error to use this input outside of integration testing of the codeql-action."
required: false
default: "false"
outputs:
db-locations:
description: A map from language to absolute path for each database created by CodeQL.
sarif-output:
description: Absolute, local path to the directory containing the generated SARIF file.
sarif-id:
description: The ID of the uploaded SARIF file.
runs:
using: 'node12'
main: '../lib/finalize-db.js'
using: "node16"
main: "../lib/analyze-action.js"
post: "../lib/analyze-action-post.js"

View File

@@ -6,6 +6,12 @@ inputs:
default: ${{ github.token }}
matrix:
default: ${{ toJson(matrix) }}
working-directory:
description: >-
Run the autobuilder using this path (relative to $GITHUB_WORKSPACE) as
working directory. If this input is not set, the autobuilder runs with
$GITHUB_WORKSPACE as its working directory.
required: false
runs:
using: 'node12'
main: '../lib/autobuild.js'
using: 'node16'
main: '../lib/autobuild-action.js'

View File

@@ -1,21 +1,113 @@
name: 'CodeQL: Init'
description: 'Setup the CodeQL tracer'
description: 'Set up CodeQL'
author: 'GitHub'
inputs:
tools:
description: URL of CodeQL tools
required: false
default: https://github.com/github/codeql-action/releases/download/codeql-bundle-20200601/codeql-bundle.tar.gz
# If not specified the Action will check in several places until it finds the CodeQL tools.
languages:
description: The languages to be analysed
required: false
token:
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
default: ${{ github.token }}
required: false
registries:
description: |
Use this input only when you need to download CodeQL packages from another instance of GitHub. If you only need to download packages from this GitHub instance, use the token input instead.
A YAML string that defines the list of GitHub container registries to use for downloading packs. The string is in the following form (the | is required on the first line):
registries: |
- url: https://containers.GHEHOSTNAME1/v2/
packages:
- my-company/*
- my-company2/*
token: \$\{{ secrets.GHEHOSTNAME1_TOKEN }}
- url: https://ghcr.io/v2/
packages: */*
token: \$\{{ secrets.GHCR_TOKEN }}
The `url` property contains the URL to the container registry you want to connect to.
The `packages` property contains a single glob string or a list of glob strings, specifying which packages should be retrieved from this particular container registry. Order is important. Earlier entries will match before later entries.
The `token` property contains a connection token for this registry. required: false
matrix:
default: ${{ toJson(matrix) }}
required: false
config-file:
description: Path of the config file to use
required: false
db-location:
description: Path where CodeQL databases should be created. If not specified, a temporary directory will be used.
required: false
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.
required: false
queries:
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
required: false
packs:
description: >-
[Experimental] Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
configuration file; prefix with "+" to use both sets of packs.
This input is only available in single-language analyses. To use packs in multi-language
analyses, you must specify packs in the codeql-config.yml file.
required: false
external-repository-token:
description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action.
required: false
setup-python-dependencies:
description: Try to auto-install your python dependencies
required: true
default: 'true'
source-root:
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
required: false
ram:
description: >-
The amount of memory in MB that can be used by CodeQL extractors.
By default, CodeQL extractors will use most of the memory available in the system
(which for GitHub-hosted runners is 6GB for Linux, 5.5GB for Windows, and 13GB for macOS).
This input also sets the amount of memory that can later be used by the "analyze" action.
required: false
threads:
description: >-
The number of threads that can be used by CodeQL extractors.
By default, CodeQL extractors will use all the hardware threads available in the system
(which for GitHub-hosted runners is 2 for Linux and Windows and 3 for macOS).
This input also sets the number of threads that can later be used by the "analyze" action.
required: false
debug:
description: >-
Enable debugging mode.
This will result in more output being produced which may be useful when debugging certain issues.
Debugging mode is enabled automatically when step debug logging is turned on.
required: false
default: 'false'
debug-artifact-name:
description: >-
The name of the artifact to store debugging information in.
This is only used when debug mode is enabled.
required: false
debug-database-name:
description: >-
The name of the database uploaded to the debugging artifact.
This is only used when debug mode is enabled.
required: false
trap-caching:
description: >-
Explicitly enable or disable TRAP caching rather than respecting the feature flag for it.
required: false
outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
runs:
using: 'node12'
main: '../lib/setup-tracer.js'
using: 'node16'
main: '../lib/init-action.js'
post: '../lib/init-action-post.js'

380
lib/actions-util.js generated Normal file
View File

@@ -0,0 +1,380 @@
"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.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;
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const core = __importStar(require("@actions/core"));
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
const safeWhich = __importStar(require("@chrisgavin/safe-which"));
const util_1 = require("./util");
// eslint-disable-next-line import/no-commonjs
const pkg = require("../package.json");
/**
* Wrapper around core.getInput for inputs that always have a value.
* Also see getOptionalInput.
*
* This allows us to get stronger type checking of required/optional inputs.
*/
const getRequiredInput = function (name) {
const value = core.getInput(name);
if (!value) {
throw new util_1.UserError(`Input required and not supplied: ${name}`);
}
return value;
};
exports.getRequiredInput = getRequiredInput;
/**
* Wrapper around core.getInput that converts empty inputs to undefined.
* Also see getRequiredInput.
*
* This allows us to get stronger type checking of required/optional inputs.
*/
const getOptionalInput = function (name) {
const value = core.getInput(name);
return value.length > 0 ? value : undefined;
};
exports.getOptionalInput = getOptionalInput;
function getTemporaryDirectory() {
const value = process.env["CODEQL_ACTION_TEMP"];
return value !== undefined && value !== ""
? value
: (0, util_1.getRequiredEnvParam)("RUNNER_TEMP");
}
exports.getTemporaryDirectory = getTemporaryDirectory;
/**
* Gets the SHA of the commit that is currently checked out.
*/
const getCommitOid = async function (checkoutPath, ref = "HEAD") {
// Try to use git to get the current commit SHA. If that fails then
// log but otherwise silently fall back to using the SHA from the environment.
// The only time these two values will differ is during analysis of a PR when
// the workflow has changed the current commit to the head commit instead of
// 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
// reported on the merge commit.
try {
let commitOid = "";
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], {
silent: true,
listeners: {
stdout: (data) => {
commitOid += data.toString();
},
stderr: (data) => {
process.stderr.write(data);
},
},
cwd: checkoutPath,
}).exec();
return commitOid.trim();
}
catch (e) {
core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment.");
core.debug(`Reason: ${e.message}`);
core.debug(e.stack || "NO STACK");
return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
}
};
exports.getCommitOid = getCommitOid;
/**
* 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.
*/
const determineMergeBaseCommitOid = async function () {
if (getWorkflowEventName() !== "pull_request") {
return undefined;
}
const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
const checkoutPath = (0, exports.getOptionalInput)("checkout_path");
try {
let commitOid = "";
let baseOid = "";
let headOid = "";
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["show", "-s", "--format=raw", mergeSha], {
silent: true,
listeners: {
stdline: (data) => {
if (data.startsWith("commit ") && commitOid === "") {
commitOid = data.substring(7);
}
else if (data.startsWith("parent ")) {
if (baseOid === "") {
baseOid = data.substring(7);
}
else if (headOid === "") {
headOid = data.substring(7);
}
}
},
stderr: (data) => {
process.stderr.write(data);
},
},
cwd: checkoutPath,
}).exec();
// Let's confirm our assumptions: We had a merge commit and the parsed parent data looks correct
if (commitOid === mergeSha &&
headOid.length === 40 &&
baseOid.length === 40) {
return baseOid;
}
return undefined;
}
catch (e) {
core.info(`Failed to call git to determine merge base. Continuing with data from environment: ${e}`);
core.info(e.stack || "NO STACK");
return undefined;
}
};
exports.determineMergeBaseCommitOid = determineMergeBaseCommitOid;
/**
* Get the ref currently being analyzed.
*/
async function getRef() {
// Will be in the form "refs/heads/master" on a push event
// or in the form "refs/pull/N/merge" on a pull_request event
const refInput = (0, exports.getOptionalInput)("ref");
const shaInput = (0, exports.getOptionalInput)("sha");
const checkoutPath = (0, exports.getOptionalInput)("checkout_path") ||
(0, exports.getOptionalInput)("source-root") ||
(0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE");
const hasRefInput = !!refInput;
const hasShaInput = !!shaInput;
// If one of 'ref' or 'sha' are provided, both are required
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
throw new Error("Both 'ref' and 'sha' are required if one of them is provided.");
}
const ref = refInput || getRefFromEnv();
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
// If the ref is a user-provided input, we have to skip logic
// and assume that it is really where they want to upload the results.
if (refInput) {
return refInput;
}
// For pull request refs we want to detect whether the workflow
// has run `git checkout HEAD^2` to analyze the 'head' ref rather
// than the 'merge' ref. If so, we want to convert the ref that
// we report back.
const pull_ref_regex = /refs\/pull\/(\d+)\/merge/;
if (!pull_ref_regex.test(ref)) {
return ref;
}
const head = await (0, exports.getCommitOid)(checkoutPath, "HEAD");
// in actions/checkout@v2+ we can check if git rev-parse HEAD == GITHUB_SHA
// in actions/checkout@v1 this may not be true as it checks out the repository
// using GITHUB_REF. There is a subtle race condition where
// git rev-parse GITHUB_REF != GITHUB_SHA, so we must check
// git rev-parse GITHUB_REF == git rev-parse HEAD instead.
const hasChangedRef = sha !== head &&
(await (0, exports.getCommitOid)(checkoutPath, ref.replace(/^refs\/pull\//, "refs/remotes/pull/"))) !== head;
if (hasChangedRef) {
const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head");
core.debug(`No longer on merge commit, rewriting ref from ${ref} to ${newRef}.`);
return newRef;
}
else {
return ref;
}
}
exports.getRef = getRef;
function getRefFromEnv() {
// To workaround a limitation of Actions dynamic workflows not setting
// the GITHUB_REF in some cases, we accept also the ref within the
// CODE_SCANNING_REF variable. When possible, however, we prefer to use
// the GITHUB_REF as that is a protected variable and cannot be overwritten.
let refEnv;
try {
refEnv = (0, util_1.getRequiredEnvParam)("GITHUB_REF");
}
catch (e) {
// If the GITHUB_REF is not set, we try to rescue by getting the
// CODE_SCANNING_REF.
const maybeRef = process.env["CODE_SCANNING_REF"];
if (maybeRef === undefined || maybeRef.length === 0) {
throw e;
}
refEnv = maybeRef;
}
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() {
return pkg.version;
}
exports.getActionVersion = getActionVersion;
/**
* Returns the name of the event that triggered this workflow.
*
* This will be "dynamic" for default setup workflow runs.
*/
function getWorkflowEventName() {
return (0, util_1.getRequiredEnvParam)("GITHUB_EVENT_NAME");
}
exports.getWorkflowEventName = getWorkflowEventName;
/**
* Returns whether the current workflow is executing a local copy of the Action, e.g. we're running
* a workflow on the codeql-action repo itself.
*/
function isRunningLocalAction() {
const relativeScriptPath = getRelativeScriptPath();
return (relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath));
}
exports.isRunningLocalAction = isRunningLocalAction;
/**
* Get the location where the Action is running from.
*
* This can be used to get the Action's name or tell if we're running a local Action.
*/
function getRelativeScriptPath() {
const runnerTemp = (0, util_1.getRequiredEnvParam)("RUNNER_TEMP");
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
return path.relative(actionsDirectory, __filename);
}
exports.getRelativeScriptPath = getRelativeScriptPath;
/** Returns the contents of `GITHUB_EVENT_PATH` as a JSON object. */
function getWorkflowEvent() {
const eventJsonFile = (0, util_1.getRequiredEnvParam)("GITHUB_EVENT_PATH");
try {
return JSON.parse(fs.readFileSync(eventJsonFile, "utf-8"));
}
catch (e) {
throw new Error(`Unable to read workflow event JSON from ${eventJsonFile}: ${e}`);
}
}
function removeRefsHeadsPrefix(ref) {
return ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref;
}
/**
* Returns whether we are analyzing the default branch for the repository.
*
* This first checks the environment variable `CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH`. This
* environment variable can be set in cases where repository information might not be available, for
* example dynamic workflows.
*/
async function isAnalyzingDefaultBranch() {
if (process.env.CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH === "true") {
return true;
}
// Get the current ref and trim and refs/heads/ prefix
let currentRef = await getRef();
currentRef = removeRefsHeadsPrefix(currentRef);
const event = getWorkflowEvent();
let defaultBranch = event?.repository?.default_branch;
if (getWorkflowEventName() === "schedule") {
defaultBranch = removeRefsHeadsPrefix(getRefFromEnv());
}
return currentRef === defaultBranch;
}
exports.isAnalyzingDefaultBranch = isAnalyzingDefaultBranch;
async function printDebugLogs(config) {
for (const language of config.languages) {
const databaseDirectory = (0, util_1.getCodeQLDatabasePath)(config, language);
const logsDirectory = path.join(databaseDirectory, "log");
if (!(0, util_1.doesDirectoryExist)(logsDirectory)) {
core.info(`Directory ${logsDirectory} does not exist.`);
continue; // Skip this language database.
}
const walkLogFiles = (dir) => {
const entries = fs.readdirSync(dir, { withFileTypes: true });
if (entries.length === 0) {
core.info(`No debug logs found at directory ${logsDirectory}.`);
}
for (const entry of entries) {
if (entry.isFile()) {
const absolutePath = path.resolve(dir, entry.name);
core.startGroup(`CodeQL Debug Logs - ${language} - ${entry.name} from file at path ${absolutePath}`);
process.stdout.write(fs.readFileSync(absolutePath));
core.endGroup();
}
else if (entry.isDirectory()) {
walkLogFiles(path.resolve(dir, entry.name));
}
}
};
walkLogFiles(logsDirectory);
}
}
exports.printDebugLogs = printDebugLogs;
/**
* Parses the `upload` input into an `UploadKind`, converting unspecified and deprecated upload
* inputs appropriately.
*/
function getUploadValue(input) {
switch (input) {
case undefined:
case "true":
case "always":
return "always";
case "false":
case "failure-only":
return "failure-only";
case "never":
return "never";
default:
core.warning(`Unrecognized 'upload' input to 'analyze' Action: ${input}. Defaulting to 'always'.`);
return "always";
}
}
exports.getUploadValue = getUploadValue;
/**
* Get the workflow run ID.
*/
function getWorkflowRunID() {
const workflowRunIdString = (0, util_1.getRequiredEnvParam)("GITHUB_RUN_ID");
const workflowRunID = parseInt(workflowRunIdString, 10);
if (Number.isNaN(workflowRunID)) {
throw new Error(`GITHUB_RUN_ID must define a non NaN workflow run ID. Current value is ${workflowRunIdString}`);
}
if (workflowRunID < 0) {
throw new Error(`GITHUB_RUN_ID must be a non-negative integer. Current value is ${workflowRunIdString}`);
}
return workflowRunID;
}
exports.getWorkflowRunID = getWorkflowRunID;
/**
* Get the workflow run attempt number.
*/
function getWorkflowRunAttempt() {
const workflowRunAttemptString = (0, util_1.getRequiredEnvParam)("GITHUB_RUN_ATTEMPT");
const workflowRunAttempt = parseInt(workflowRunAttemptString, 10);
if (Number.isNaN(workflowRunAttempt)) {
throw new Error(`GITHUB_RUN_ATTEMPT must define a non NaN workflow run attempt. Current value is ${workflowRunAttemptString}`);
}
if (workflowRunAttempt <= 0) {
throw new Error(`GITHUB_RUN_ATTEMPT must be a positive integer. Current value is ${workflowRunAttemptString}`);
}
return workflowRunAttempt;
}
exports.getWorkflowRunAttempt = getWorkflowRunAttempt;
//# sourceMappingURL=actions-util.js.map

1
lib/actions-util.js.map Normal file

File diff suppressed because one or more lines are too long

249
lib/actions-util.test.js generated Normal file
View File

@@ -0,0 +1,249 @@
"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 fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava"));
const sinon = __importStar(require("sinon"));
const actionsUtil = __importStar(require("./actions-util"));
const api_client_1 = require("./api-client");
const environment_1 = require("./environment");
const testing_utils_1 = require("./testing-utils");
const util_1 = require("./util");
(0, testing_utils_1.setupTests)(ava_1.default);
(0, ava_1.default)("getRef() throws on the empty string", async (t) => {
process.env["GITHUB_REF"] = "";
await t.throwsAsync(actionsUtil.getRef);
});
(0, ava_1.default)("getRef() returns merge PR ref if GITHUB_SHA still checked out", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const expectedRef = "refs/pull/1/merge";
const currentSha = "a".repeat(40);
process.env["GITHUB_REF"] = expectedRef;
process.env["GITHUB_SHA"] = currentSha;
const callback = sinon.stub(actionsUtil, "getCommitOid");
callback.withArgs("HEAD").resolves(currentSha);
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, expectedRef);
callback.restore();
});
});
(0, ava_1.default)("getRef() returns merge PR ref if GITHUB_REF still checked out but sha has changed (actions checkout@v1)", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const expectedRef = "refs/pull/1/merge";
process.env["GITHUB_REF"] = expectedRef;
process.env["GITHUB_SHA"] = "b".repeat(40);
const sha = "a".repeat(40);
const callback = sinon.stub(actionsUtil, "getCommitOid");
callback.withArgs("refs/remotes/pull/1/merge").resolves(sha);
callback.withArgs("HEAD").resolves(sha);
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, expectedRef);
callback.restore();
});
});
(0, ava_1.default)("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
process.env["GITHUB_REF"] = "refs/pull/1/merge";
process.env["GITHUB_SHA"] = "a".repeat(40);
const callback = sinon.stub(actionsUtil, "getCommitOid");
callback.withArgs(tmpDir, "refs/pull/1/merge").resolves("a".repeat(40));
callback.withArgs(tmpDir, "HEAD").resolves("b".repeat(40));
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, "refs/pull/1/head");
callback.restore();
});
});
(0, ava_1.default)("getRef() returns ref provided as an input and ignores current HEAD", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge");
getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40));
// These values are be ignored
process.env["GITHUB_REF"] = "refs/pull/1/merge";
process.env["GITHUB_SHA"] = "a".repeat(40);
const callback = sinon.stub(actionsUtil, "getCommitOid");
callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40));
callback.withArgs("HEAD").resolves("b".repeat(40));
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, "refs/pull/2/merge");
callback.restore();
getAdditionalInputStub.restore();
});
});
(0, ava_1.default)("getRef() returns CODE_SCANNING_REF as a fallback for GITHUB_REF", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const expectedRef = "refs/pull/1/HEAD";
const currentSha = "a".repeat(40);
process.env["CODE_SCANNING_REF"] = expectedRef;
process.env["GITHUB_REF"] = "";
process.env["GITHUB_SHA"] = currentSha;
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, expectedRef);
});
});
(0, ava_1.default)("getRef() returns GITHUB_REF over CODE_SCANNING_REF if both are provided", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const expectedRef = "refs/pull/1/merge";
const currentSha = "a".repeat(40);
process.env["CODE_SCANNING_REF"] = "refs/pull/1/HEAD";
process.env["GITHUB_REF"] = expectedRef;
process.env["GITHUB_SHA"] = currentSha;
const actualRef = await actionsUtil.getRef();
t.deepEqual(actualRef, expectedRef);
});
});
(0, ava_1.default)("getRef() throws an error if only `ref` is provided as an input", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge");
await t.throwsAsync(async () => {
await actionsUtil.getRef();
}, {
instanceOf: Error,
message: "Both 'ref' and 'sha' are required if one of them is provided.",
});
getAdditionalInputStub.restore();
});
});
(0, ava_1.default)("getRef() throws an error if only `sha` is provided as an input", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
process.env["GITHUB_WORKSPACE"] = "/tmp";
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40));
await t.throwsAsync(async () => {
await actionsUtil.getRef();
}, {
instanceOf: Error,
message: "Both 'ref' and 'sha' are required if one of them is provided.",
});
getAdditionalInputStub.restore();
});
});
(0, ava_1.default)("computeAutomationID()", async (t) => {
let actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"language": "javascript", "os": "linux"}');
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux/");
// check the environment sorting
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"os": "linux", "language": "javascript"}');
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/language:javascript/os:linux/");
// check that an empty environment produces the right results
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", "{}");
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/");
// check non string environment values
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", '{"number": 1, "object": {"language": "javascript"}}');
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/number:/object:/");
// check undefined environment
actualAutomationID = (0, api_client_1.computeAutomationID)(".github/workflows/codeql-analysis.yml:analyze", undefined);
t.deepEqual(actualAutomationID, ".github/workflows/codeql-analysis.yml:analyze/");
});
(0, ava_1.default)("initializeEnvironment", (t) => {
(0, util_1.initializeEnvironment)("1.2.3");
t.deepEqual(process.env[environment_1.EnvVar.VERSION], "1.2.3");
});
(0, ava_1.default)("isAnalyzingDefaultBranch()", async (t) => {
process.env["GITHUB_EVENT_NAME"] = "push";
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "true";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "false";
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
const envFile = path.join(tmpDir, "event.json");
fs.writeFileSync(envFile, JSON.stringify({
repository: {
default_branch: "main",
},
}));
process.env["GITHUB_EVENT_PATH"] = envFile;
process.env["GITHUB_REF"] = "main";
process.env["GITHUB_SHA"] = "1234";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
process.env["GITHUB_REF"] = "refs/heads/main";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
process.env["GITHUB_REF"] = "feature";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), false);
fs.writeFileSync(envFile, JSON.stringify({
schedule: "0 0 * * *",
}));
process.env["GITHUB_EVENT_NAME"] = "schedule";
process.env["GITHUB_REF"] = "refs/heads/main";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), true);
const getAdditionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
getAdditionalInputStub
.withArgs("ref")
.resolves("refs/heads/something-else");
getAdditionalInputStub
.withArgs("sha")
.resolves("0000000000000000000000000000000000000000");
process.env["GITHUB_EVENT_NAME"] = "schedule";
process.env["GITHUB_REF"] = "refs/heads/main";
t.deepEqual(await actionsUtil.isAnalyzingDefaultBranch(), false);
getAdditionalInputStub.restore();
});
});
(0, ava_1.default)("createStatusReportBase", async (t) => {
await (0, util_1.withTmpDir)(async (tmpDir) => {
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
process.env["GITHUB_REF"] = "refs/heads/main";
process.env["GITHUB_SHA"] = "a".repeat(40);
process.env["GITHUB_RUN_ID"] = "100";
process.env["GITHUB_RUN_ATTEMPT"] = "2";
process.env["GITHUB_REPOSITORY"] = "octocat/HelloWorld";
process.env["CODEQL_ACTION_ANALYSIS_KEY"] = "analysis-key";
process.env["RUNNER_OS"] = "macOS";
const getRequiredInput = sinon.stub(actionsUtil, "getRequiredInput");
getRequiredInput.withArgs("matrix").resolves("input/matrix");
const statusReport = await (0, api_client_1.createStatusReportBase)("init", "failure", new Date("May 19, 2023 05:19:00"), "failure cause", "exception stack trace");
t.assert(typeof statusReport.job_run_uuid === "string");
t.assert(statusReport.workflow_run_id === 100);
t.assert(statusReport.workflow_run_attempt === 2);
t.assert(statusReport.workflow_name === (process.env["GITHUB_WORKFLOW"] || ""));
t.assert(statusReport.job_name === (process.env["GITHUB_JOB"] || ""));
t.assert(statusReport.analysis_key === "analysis-key");
t.assert(statusReport.commit_oid === process.env["GITHUB_SHA"]);
t.assert(statusReport.ref === process.env["GITHUB_REF"]);
t.assert(statusReport.action_name === "init");
t.assert(statusReport.action_oid === "unknown");
t.assert(statusReport.started_at === process.env[environment_1.EnvVar.WORKFLOW_STARTED_AT]);
t.assert(statusReport.action_started_at ===
new Date("May 19, 2023 05:19:00").toISOString());
t.assert(statusReport.status === "failure");
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

File diff suppressed because one or more lines are too long

82
lib/analysis-paths.js generated
View File

@@ -1,27 +1,83 @@
"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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
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 });
const core = __importStar(require("@actions/core"));
function includeAndExcludeAnalysisPaths(config, languages) {
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) {
core.exportVariable('LGTM_INDEX_INCLUDE', config.paths.join('\n'));
process.env["LGTM_INDEX_INCLUDE"] = buildIncludeExcludeEnvVar(config.paths);
}
if (config.pathsIgnore.length !== 0) {
core.exportVariable('LGTM_INDEX_EXCLUDE', config.pathsIgnore.join('\n'));
// 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);
}
function isInterpretedLanguage(language) {
return language === 'javascript' || language === 'python';
if (pathsIgnore.length !== 0) {
process.env["LGTM_INDEX_EXCLUDE"] = buildIncludeExcludeEnvVar(pathsIgnore);
}
// Index include/exclude only work in javascript and python
// If some other language is detected/configured show a warning
if ((config.paths.length !== 0 || config.pathsIgnore.length !== 0) && !languages.every(isInterpretedLanguage)) {
core.warning('The "paths"/"paths-ignore" fields of the config only have effect for Javascript and Python');
// 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;

View File

@@ -1 +1 @@
{"version":3,"file":"analysis-paths.js","sourceRoot":"","sources":["../src/analysis-paths.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAItC,SAAgB,8BAA8B,CAAC,MAA0B,EAAE,SAAmB;IAC1F,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3B,IAAI,CAAC,cAAc,CAAC,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACtE;IAED,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QACjC,IAAI,CAAC,cAAc,CAAC,oBAAoB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KAC5E;IAED,SAAS,qBAAqB,CAAC,QAAQ;QACnC,OAAO,QAAQ,KAAK,YAAY,IAAI,QAAQ,KAAK,QAAQ,CAAC;IAC9D,CAAC;IAED,2DAA2D;IAC3D,+DAA+D;IAC/D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE;QAC3G,IAAI,CAAC,OAAO,CAAC,4FAA4F,CAAC,CAAC;KAC9G;AACL,CAAC;AAlBD,wEAkBC"}
{"version":3,"file":"analysis-paths.js","sourceRoot":"","sources":["../src/analysis-paths.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAK7B,SAAS,qBAAqB,CAAC,QAAQ;IACrC,OAAO,CACL,QAAQ,KAAK,YAAY,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,MAAM,CAC1E,CAAC;AACJ,CAAC;AAED,6FAA6F;AAChF,QAAA,+BAA+B,GAAG,cAAc,CAAC;AAE9D,uFAAuF;AACvF,SAAS,yBAAyB,CAAC,KAAe;IAChD,iCAAiC;IACjC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnD,uDAAuD;IACvD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QAChC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,uCAA+B,CAAC,CAAC,CAAC;KACvE;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAgB,uBAAuB,CACrC,MAA0B,EAC1B,MAAc;IAEd,qEAAqE;IACrE,sEAAsE;IACtE,IACE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;QAC9D,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAC9C;QACA,MAAM,CAAC,OAAO,CACZ,mGAAmG,CACpG,CAAC;KACH;AACH,CAAC;AAdD,0DAcC;AAED,SAAgB,8BAA8B,CAAC,MAA0B;IACvE,0EAA0E;IAC1E,+DAA+D;IAC/D,sEAAsE;IACtE,qDAAqD;IACrD,gFAAgF;IAChF,sEAAsE;IACtE,sDAAsD;IACtD,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,yBAAyB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC7E;IACD,mFAAmF;IACnF,MAAM,qBAAqB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3E,IAAI,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACrC,IACE,CAAC,qBAAqB,CAAC,UAAU,CAAC,IAAI,CAAC;QACvC,CAAC,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,EACvC;QACA,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;KACzD;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,yBAAyB,CAAC,WAAW,CAAC,CAAC;KAC5E;IAED,yEAAyE;IACzE,6EAA6E;IAC7E,wDAAwD;IACxD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACxD;AACH,CAAC;AAjCD,wEAiCC"}

View File

@@ -1,30 +1,124 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
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 configUtils = __importStar(require("./config-utils"));
ava_1.default("emptyPaths", async (t) => {
let config = new configUtils.Config();
analysisPaths.includeAndExcludeAnalysisPaths(config, []);
t.is(process.env['LGTM_INDEX_INCLUDE'], undefined);
t.is(process.env['LGTM_INDEX_EXCLUDE'], undefined);
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);
});
});
ava_1.default("nonEmptyPaths", async (t) => {
let config = new configUtils.Config();
config.paths.push('path1', 'path2');
config.pathsIgnore.push('path3', 'path4');
analysisPaths.includeAndExcludeAnalysisPaths(config, []);
t.is(process.env['LGTM_INDEX_INCLUDE'], 'path1\npath2');
t.is(process.env['LGTM_INDEX_EXCLUDE'], 'path3\npath4');
(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 +1 @@
{"version":3,"file":"analysis-paths.test.js","sourceRoot":"","sources":["../src/analysis-paths.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAuB;AAEvB,gEAAkD;AAClD,4DAA8C;AAE9C,aAAI,CAAC,YAAY,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IACzB,IAAI,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;IACtC,aAAa,CAAC,8BAA8B,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IAC5B,IAAI,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,aAAa,CAAC,8BAA8B,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,cAAc,CAAC,CAAC;IACxD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
{"version":3,"file":"analysis-paths.test.js","sourceRoot":"","sources":["../src/analysis-paths.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,8CAAuB;AAEvB,gEAAkD;AAClD,mDAA6C;AAC7C,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,IAAA,aAAI,EAAC,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC7B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG;YACb,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE;YACf,KAAK,EAAE,EAAE;YACT,iBAAiB,EAAE,EAAE;YACrB,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EAAwB;YACxE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,CAAC;YACpD,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,KAAK;YAChB,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;YACnD,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;YACnD,sBAAsB,EAAE;gBACtB,iBAAiB,EAAE,KAAK;gBACxB,kBAAkB,EAAE,KAAK;gBACzB,oBAAoB,EAAE,KAAK;aAC5B;YACD,UAAU,EAAE,EAAE;YACd,qBAAqB,EAAE,CAAC;SACzB,CAAC;QACF,aAAa,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAChC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG;YACb,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;YACrC,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;YAC3C,iBAAiB,EAAE,EAAE;YACrB,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EAAwB;YACxE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,CAAC;YACpD,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,KAAK;YAChB,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;YACnD,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;YACnD,sBAAsB,EAAE;gBACtB,iBAAiB,EAAE,KAAK;gBACxB,kBAAkB,EAAE,KAAK;gBACzB,oBAAoB,EAAE,KAAK;aAC5B;YACD,UAAU,EAAE,EAAE;YACd,qBAAqB,EAAE,CAAC;SACzB,CAAC;QACF,aAAa,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,cAAc,CAAC,CAAC;QACxD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,cAAc,CAAC,CAAC;QACxD,CAAC,CAAC,EAAE,CACF,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EACjC,gGAAgG,CACjG,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,kBAAkB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG;QACb,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,EAAE;QACf,KAAK,EAAE,EAAE;QACT,iBAAiB,EAAE,EAAE;QACrB,OAAO;QACP,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EAAwB;QACxE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,CAAC;QACrD,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,KAAK;QAChB,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;QACnD,iBAAiB,EAAE,IAAI,CAAC,2BAA2B;QACnD,sBAAsB,EAAE;YACtB,iBAAiB,EAAE,KAAK;YACxB,kBAAkB,EAAE,KAAK;YACzB,oBAAoB,EAAE,KAAK;SAC5B;QACD,UAAU,EAAE,EAAE;QACd,qBAAqB,EAAE,CAAC;KACzB,CAAC;IACF,aAAa,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAAC;IAC9D,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC"}

91
lib/analyze-action-env.test.js generated Normal file
View File

@@ -0,0 +1,91 @@
"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 ava_1 = __importDefault(require("ava"));
const sinon = __importStar(require("sinon"));
const actionsUtil = __importStar(require("./actions-util"));
const analyze = __importStar(require("./analyze"));
const api = __importStar(require("./api-client"));
const configUtils = __importStar(require("./config-utils"));
const testing_utils_1 = require("./testing-utils");
const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default);
// This test needs to be in its own file so that ava would run it in its own
// nodejs process. The code being tested is in analyze-action.ts, which runs
// immediately on load. So the file needs to be loaded during part of the test,
// and that can happen only once per nodejs process. If multiple such tests are
// in the same test file, ava would run them in the same nodejs process, and all
// but the first test would fail.
(0, ava_1.default)("analyze action with RAM & threads from environment variables", async (t) => {
await util.withTmpDir(async (tmpDir) => {
process.env["GITHUB_SERVER_URL"] = util.GITHUB_DOTCOM_URL;
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
process.env["GITHUB_API_URL"] = "https://api.github.com";
sinon
.stub(api, "createStatusReportBase")
.resolves({});
sinon.stub(api, "sendStatusReport").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
const gitHubVersion = {
type: util.GitHubVariant.DOTCOM,
};
sinon.stub(configUtils, "getConfig").resolves({
gitHubVersion,
languages: [],
packs: [],
trapCaches: {},
});
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
requiredInputStub.withArgs("token").returns("fake-token");
requiredInputStub.withArgs("upload-database").returns("false");
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
optionalInputStub.withArgs("cleanup-level").returns("none");
optionalInputStub.withArgs("expect-error").returns("false");
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, {});
// When there are no action inputs for RAM and threads, the action uses
// environment variables (passed down from the init action) to set RAM and
// threads usage.
process.env["CODEQL_THREADS"] = "-1";
process.env["CODEQL_RAM"] = "4992";
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
const runQueriesStub = sinon.stub(analyze, "runQueries");
const analyzeAction = require("./analyze-action");
// When analyze-action.ts loads, it runs an async function from the top
// level but does not wait for it to finish. To ensure that calls to
// runFinalize and runQueries are correctly captured by spies, we explicitly
// wait for the action promise to complete before starting verification.
await analyzeAction.runPromise;
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=4992");
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=4992");
});
});
//# sourceMappingURL=analyze-action-env.test.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,8DAA8D,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/E,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACrC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,sCAAsC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,wBAAwB,CAAC;QACzD,KAAK;aACF,IAAI,CAAC,GAAG,EAAE,wBAAwB,CAAC;aACnC,QAAQ,CAAC,EAAkC,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEnE,MAAM,aAAa,GAAuB;YACxC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;SAChC,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC;YAC5C,aAAa;YACb,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,EAAE;SACkB,CAAC,CAAC;QACpC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QACtE,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QACtE,iBAAiB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5D,iBAAiB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAA,gCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAA,0CAA0B,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAEpC,uEAAuE;QACvE,0EAA0E;QAC1E,iBAAiB;QACjB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC;QAEnC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACzD,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAElD,uEAAuE;QACvE,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

91
lib/analyze-action-input.test.js generated Normal file
View File

@@ -0,0 +1,91 @@
"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 ava_1 = __importDefault(require("ava"));
const sinon = __importStar(require("sinon"));
const actionsUtil = __importStar(require("./actions-util"));
const analyze = __importStar(require("./analyze"));
const api = __importStar(require("./api-client"));
const configUtils = __importStar(require("./config-utils"));
const testing_utils_1 = require("./testing-utils");
const util = __importStar(require("./util"));
(0, testing_utils_1.setupTests)(ava_1.default);
// This test needs to be in its own file so that ava would run it in its own
// nodejs process. The code being tested is in analyze-action.ts, which runs
// immediately on load. So the file needs to be loaded during part of the test,
// and that can happen only once per nodejs process. If multiple such tests are
// in the same test file, ava would run them in the same nodejs process, and all
// but the first test would fail.
(0, ava_1.default)("analyze action with RAM & threads from action inputs", async (t) => {
await util.withTmpDir(async (tmpDir) => {
process.env["GITHUB_SERVER_URL"] = util.GITHUB_DOTCOM_URL;
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
process.env["GITHUB_API_URL"] = "https://api.github.com";
sinon
.stub(api, "createStatusReportBase")
.resolves({});
sinon.stub(api, "sendStatusReport").resolves(true);
const gitHubVersion = {
type: util.GitHubVariant.DOTCOM,
};
sinon.stub(configUtils, "getConfig").resolves({
gitHubVersion,
languages: [],
packs: [],
trapCaches: {},
});
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
requiredInputStub.withArgs("token").returns("fake-token");
requiredInputStub.withArgs("upload-database").returns("false");
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
optionalInputStub.withArgs("cleanup-level").returns("none");
optionalInputStub.withArgs("expect-error").returns("false");
sinon.stub(api, "getGitHubVersion").resolves(gitHubVersion);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, {});
process.env["CODEQL_THREADS"] = "1";
process.env["CODEQL_RAM"] = "4992";
// Action inputs have precedence over environment variables.
optionalInputStub.withArgs("threads").returns("-1");
optionalInputStub.withArgs("ram").returns("3012");
const runFinalizeStub = sinon.stub(analyze, "runFinalize");
const runQueriesStub = sinon.stub(analyze, "runQueries");
const analyzeAction = require("./analyze-action");
// When analyze-action.ts loads, it runs an async function from the top
// level but does not wait for it to finish. To ensure that calls to
// runFinalize and runQueries are correctly captured by spies, we explicitly
// wait for the action promise to complete before starting verification.
await analyzeAction.runPromise;
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=3012");
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=3012");
});
});
//# sourceMappingURL=analyze-action-input.test.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,kDAAoC;AACpC,4DAA8C;AAC9C,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,sDAAsD,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvE,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACrC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,sCAAsC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,wBAAwB,CAAC;QACzD,KAAK;aACF,IAAI,CAAC,GAAG,EAAE,wBAAwB,CAAC;aACnC,QAAQ,CAAC,EAAkC,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,aAAa,GAAuB;YACxC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;SAChC,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC;YAC5C,aAAa;YACb,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,EAAE;SACkB,CAAC,CAAC;QACpC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QACtE,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QACtE,iBAAiB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5D,iBAAiB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnE,IAAA,gCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAA,0CAA0B,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAEpC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC;QAEnC,4DAA4D;QAC5D,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpD,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACzD,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAElD,uEAAuE;QACvE,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

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