Commit Graph

176 Commits

Author SHA1 Message Date
Henry Mercer 0fe34bd39a Extract language appropriately in analyze step when build mode specified 2024-02-07 13:19:29 +00:00
Henry Mercer 0166a8a567 Add build mode to configuration 2024-01-30 19:10:37 +00:00
Henry Mercer ec42edcaab Refactoring: Create interface for config initialization
This eliminates argument order mistakes, and also lets us add new inputs
without having to update every test.
2024-01-30 18:59:59 +00:00
Henry Mercer 4feb32a7ef Remove code to download packs 2024-01-04 16:29:49 +00:00
Henry Mercer f65fc6a926 Remove parsing of queries, packs, paths, and pathsIgnore 2024-01-04 16:27:05 +00:00
Henry Mercer b683173003 Remove unused arguments 2024-01-04 15:05:15 +00:00
Henry Mercer fa98ec0c7a Remove CliConfigFileEnabled feature flag 2024-01-04 14:39:36 +00:00
Michael B. Gale bcbb900532 Rename VersionOutput to VersionInfo 2023-10-04 15:54:34 +01:00
Michael B. Gale e827ad5b71 Move makeVersionOutput to testing-utils.js 2023-10-04 15:49:04 +01:00
Michael B. Gale 74b46628c3 Support features key in version JSON output 2023-10-04 11:28:28 +01:00
Henry Mercer ebbadee09e Remove ML-powered queries 2023-10-02 17:20:50 +01:00
Henry Mercer 1d5eed8d40 Remove deprecated functionality 2023-09-27 16:16:13 +01:00
Angela P Wen b16296be30 Auto-fix linting errors 2023-07-25 10:34:21 +02:00
Henry Mercer bac7c32ff7 Resolve the final dependency cycle! 2023-07-19 17:37:43 +01:00
Henry Mercer 004f976bef Fix dependency cycle between util and config-utils 2023-07-19 16:48:21 +01:00
Henry Mercer 5246291397 Merge branch 'main' into henrymercer/bump-minimum-codeql-version 2023-07-14 16:16:25 +01:00
Henry Mercer c1f49580cf Fix dependency incompatibilities 2023-07-13 11:20:39 +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 7bd23b58b5 Remove support for CodeQL CLI 2.9.3 and earlier 2023-06-12 11:34:01 +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
Tugdual Grall 18f13455eb Merge branch 'main' into issue-1589-config-param 2023-04-10 07:33:09 +02: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
Tugdual Grall 2f141340f0 fix linter issues 2023-03-18 15:14:34 +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
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 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
Angela P Wen 39c954c513 Support security-experimental as a well-known suite (#1519) 2023-02-06 19:26:03 +00:00
Henry Mercer 10695e6a20 Fix linter errors 2023-01-18 21:00:05 +00: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
Andrew Eisenberg ad7ca9bf21 Add some new tests and fix some comments 2022-11-23 22:18:12 -08:00
Henry Mercer 9df773d1a3 Remove unneeded apiDetails input to getApiClient 2022-11-14 19:55:30 +00: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 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
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
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 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
Andrew Eisenberg 59744464eb Fix unit tests 2022-09-07 16:10:34 -07: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 e9b47b1898 Change to using a single input 2022-09-01 16:07:26 -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 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
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