Commit Graph

79 Commits

Author SHA1 Message Date
Marco Gario 7b29d2e0a5 Move language functions in dedicated package 2020-09-11 12:02:17 +02:00
Marco Gario 588a28d3b5 Merge remote-tracking branch 'origin/main' into platform_lang_pkg 2020-09-11 11:45:31 +02:00
Marco Gario 3f5bb98d7e # This is a combination of 4 commits.
# This is the 1st commit message:

Add logic to download codeql platform-language pkg

* Add `bundleName` argument to `getCodeQLBundleDownloadURL`
* Add `languages` argument to `setupCodeQL`.

The logic now tries to find the platform-language pkg before defaulting
to the full bundle. We keep the toolcache clean by adding the pl version
to the tool version.

# The commit message #2 will be skipped:

# Add simple fallback logic for download

# The commit message #3 will be skipped:

# wip linter

# The commit message #4 will be skipped:

# linter
2020-09-09 13:52:06 +02:00
Sam Partington d677f16692 Merge branch 'main' into allow-additive-queries-in-workflow 2020-09-08 10:00:16 +01:00
Robert Brignull 8a821a9c35 Add logger to checkoutExternalRepository 2020-09-01 13:53:59 +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 Brignull 80e2c4fe4a improve error message when config is not found 2020-08-28 09:43:25 +01:00
Robert Brignull 39b361ed69 Remove dependence of GITHUB_REPOSITORY env var 2020-08-27 11:06:14 +01:00
Robert Brignull 217483dfd6 Convert rest of the actions 2020-08-26 16:20:36 +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
Sam Partington bdfd48264f Merge branch 'main' into query-overriding 2020-08-25 10:39:53 +01:00
Sam Partington 129713f1a0 Handle errors in workflow queries correctly 2020-08-25 10:17:54 +01:00
Sam Partington 7f19f9198a Refactor common code to function and add missing test 2020-08-24 15:53:24 +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 0e8b30af75 Merge branch 'main' into add_env_to_config 2020-08-21 10:32:58 +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 00eee2b7ee Merge branch 'main' into language_parsing 2020-08-17 13:21:02 +01:00
Robert Brignull 34b372292b commit node_modules and generated files 2020-08-11 12:43:27 +01:00
Robert Brignull 591359cae6 introduce languages.ts 2020-08-10 16:03:09 +01:00
Robert 0fdcc52338 Merge branch 'main' into actions_io 2020-08-10 15:50:44 +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 Brignull d5853409b4 Provide a better error message when language is not recognised 2020-08-06 17:34:45 +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
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
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 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 87758a1402 Upload much more data in status reports 2020-07-24 15:01:44 +01:00
Robert ee63f4ee4b fix parsing of disable-default-queries field 2020-07-21 11:05:23 +01:00
Robert Brignull b86c3701ed address review comments 2020-07-15 17:37:37 +01:00
Robert Brignull da3d6d25eb move config parsing earlier + add to codeql search path 2020-07-13 14:49:01 +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 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 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 Brignull 0086c2ecdb use @actions/github 2020-07-06 16:25:26 +01:00