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
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
Sam Partington
0607771cc2
Make remote config retrieval more robust
2020-06-26 16:14:15 +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
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
366d8a32d1
Retrieve remote configuration where specified
2020-06-26 11:49:00 +01:00
Sam Partington
32c9898fa4
Fix regex
2020-06-25 15:10:17 +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
24096a1cb3
Don't fail if query path doesn't exist
2020-06-17 15:55:14 +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 Brignull
af4edf6546
fix typos
2020-06-09 10:42:52 +01:00
Robert Brignull
5a97f7e980
Merge branch 'master' into safe-config-parsing
2020-06-09 10:39:49 +01:00
Robert Brignull
e35c90f53d
Merge branch 'master' into safe-config-parsing
2020-06-08 13:40:17 +01:00
Robert Brignull
5ea736059a
move all files to the RUNNER_TEMP directory
2020-06-04 12:15:34 +01:00
Robert Brignull
22501fd7c8
change method used to check inclusion
2020-06-01 13:06:47 +01:00
Robert Brignull
07e22b1f4a
add missing return statement
2020-06-01 12:58:38 +01:00
Robert Brignull
3c2191ffdd
fix array inclusion test
2020-06-01 12:45:23 +01:00
Robert Brignull
50dcaaf00d
use the new additional suites
2020-06-01 12:19:24 +01:00
Robert Brignull
054f867322
make config file parsing more strict
2020-05-26 19:23:28 +01:00
Robert Brignull
1e600686e7
introduce new syntax for built-in query suites
2020-05-26 16:02:22 +01:00
Robert Brignull
0e6df42024
add tests for config-utils
2020-05-14 16:47:42 +01:00
Robert Brignull
aa54af7018
enable source maps
2020-05-14 11:07:58 +01:00
David Verdeguer
9e35ea1ac8
Merge branch 'master' into disable-default-queries
2020-04-30 11:12:28 +02:00
David Verdeguer
2809bdc3ee
ignore-default-queries -> disable-default-queries
2020-04-30 09:37:04 +02:00
Arthur Baars
e7afa7cb98
Fix parsing of path-ignore field
2020-04-29 13:23:32 +02:00
David Verdeguer
5c74b0f641
Parse ignoreDefaultQueries field
2020-04-29 12:40:48 +02:00
anaarmas
28ccc3db2d
Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
2020-04-28 17:23:37 +02:00