Compare commits

..

142 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Chao Zhang
55eae6652f Support find .sarif files recursively 2020-12-22 23:24:51 -08: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
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
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
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
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
843 changed files with 22252 additions and 55457 deletions

View File

@@ -44,7 +44,6 @@
"@typescript-eslint/no-unsafe-call": "off", "@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-regexp-exec": "off", "@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off", "@typescript-eslint/require-await": "off",

View File

@@ -95,7 +95,7 @@ def get_conductor(repo, pull_requests, other_commits):
# This will not include any commits that exist on the release branch # This will not include any commits that exist on the release branch
# that aren't on main. # that aren't on main.
def get_commit_difference(repo): def get_commit_difference(repo):
commits = run_git('log', '--pretty=format:%H', ORIGIN + '/' + LATEST_RELEASE_BRANCH + '...' + MAIN_BRANCH).strip().split('\n') commits = run_git('log', '--pretty=format:%H', ORIGIN + '/' + LATEST_RELEASE_BRANCH + '..' + MAIN_BRANCH).strip().split('\n')
# Convert to full-fledged commit objects # Convert to full-fledged commit objects
commits = [repo.get_commit(c) for c in commits] commits = [repo.get_commit(c) for c in commits]

View File

@@ -1,507 +0,0 @@
name: "Integration Testing"
on:
push:
branches: [main, v1]
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 "$RUNNER_TEMP/codeql_databases"
# 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-and-remote-config:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
tools: [~, 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:
tools: ${{ matrix.tools }}
languages: cpp,csharp,java,javascript,python
config-file: github/codeql-action/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }}
- 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
go-custom-tracing:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
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
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
env:
TEST_MODE: true
go-custom-tracing-autobuild:
# No need to test Go autobuild on multiple OSes since
# we're testing Go custom tracing with a manual build on all OSes.
runs-on: ubuntu-latest
env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
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: go
- uses: ./../action/autobuild
- 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
test-proxy:
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
options: --dns 127.0.0.1
services:
squid-proxy:
image: datadog/squid:latest
ports:
- 3128:3128
env:
https_proxy: http://squid-proxy:3128
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: javascript
- uses: ./../action/analyze
env:
TEST_MODE: true
runner-analyze-javascript-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
# Pass --config-file here, but not for other jobs in this workflow.
# This means we're testing the config file parsing in the runner
# but not slowing down all jobs unnecessarily as it doesn't add much
# testing the parsing on different operating systems and languages.
runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages javascript --config-file ./.github/codeql/codeql-config.yml --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-javascript-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages javascript --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-javascript-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages javascript --config-file ./.github/codeql/codeql-config.yml --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-ubuntu:
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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
run: |
. ./codeql-runner/codeql-env.sh
dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-windows:
runs-on: windows-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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages csharp --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: powershell
run: |
cat ./codeql-runner/codeql-env.sh | Invoke-Expression
dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-macos:
runs-on: macos-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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: bash
run: |
. ./codeql-runner/codeql-env.sh
dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-ubuntu:
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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
run: |
../action/runner/dist/codeql-runner-linux autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-windows:
runs-on: windows-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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages csharp --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: powershell
run: |
../action/runner/dist/codeql-runner-win.exe autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-macos:
runs-on: macos-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: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: bash
run: |
../action/runner/dist/codeql-runner-macos autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-upload-sarif:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Upload with runner
run: |
# Deliberately don't use TEST_MODE here. This is specifically testing
# the compatibility with the API.
runner/dist/codeql-runner-linux upload --sarif-file src/testdata/empty-sarif.sarif --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}

View File

@@ -1,5 +1,8 @@
name: "PR checks" name: "PR checks"
env:
GO111MODULE: auto
on: on:
push: push:
branches: [main, v1] branches: [main, v1]
@@ -20,25 +23,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Check generated JavaScript - name: Check generated JavaScript
run: | run: .github/workflows/script/check-js.sh
# 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 'npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"
check-node-modules: check-node-modules:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -46,27 +31,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Check node modules up to date - name: Check node modules up to date
run: | run: .github/workflows/script/check-node-modules.sh
# 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
# 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"
npm-test: npm-test:
needs: [check-js, check-node-modules]
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest,macos-latest] os: [ubuntu-latest,macos-latest]
@@ -76,3 +44,533 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: npm run-script test - name: npm run-script test
run: npm run-script test run: npm run-script test
multi-language-repo_test-autodetect-languages:
needs: [check-js, check-node-modules]
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} .
mv ../action/.github/workflows .github
- uses: ./../action/init
- name: Build code
shell: bash
run: ./build.sh
- uses: ./../action/analyze
env:
TEST_MODE: true
- run: |
cd "$RUNNER_TEMP/codeql_databases"
# 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-and-remote-config:
needs: [check-js, check-node-modules]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
tools: [~, 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} .
mv ../action/.github/workflows .github
- uses: ./../action/init
with:
tools: ${{ matrix.tools }}
languages: cpp,csharp,java,javascript,python
config-file: github/codeql-action/tests/multi-language-repo/.github/codeql/custom-queries.yml@${{ github.sha }}
- 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:
needs: [check-js, check-node-modules]
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} .
mv ../action/.github/workflows .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
go-custom-tracing:
needs: [check-js, check-node-modules]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
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} .
mv ../action/.github/workflows .github
- uses: ./../action/init
with:
languages: go
- name: Build code
shell: bash
run: go build main.go
- uses: ./../action/analyze
env:
TEST_MODE: true
go-custom-tracing-autobuild:
needs: [check-js, check-node-modules]
# No need to test Go autobuild on multiple OSes since
# we're testing Go custom tracing with a manual build on all OSes.
runs-on: ubuntu-latest
env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "on"
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
mv ../action/.github/workflows .github
- uses: ./../action/init
with:
languages: go
- uses: ./../action/autobuild
- uses: ./../action/analyze
env:
TEST_MODE: true
multi-language-repo_rubocop:
needs: [check-js, check-node-modules]
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} .
mv ../action/.github/workflows .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
test-proxy:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
options: --dns 127.0.0.1
services:
squid-proxy:
image: datadog/squid:latest
ports:
- 3128:3128
env:
https_proxy: http://squid-proxy:3128
steps:
- uses: actions/checkout@v2
- name: Move codeql-action
shell: bash
run: |
mkdir ../action
mv * .github ../action/
mv ../action/tests/multi-language-repo/{*,.github} .
mv ../action/.github/workflows .github
- uses: ./../action/init
with:
languages: javascript
- uses: ./../action/analyze
env:
TEST_MODE: true
runner-analyze-javascript-ubuntu:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
# Pass --config-file here, but not for other jobs in this workflow.
# This means we're testing the config file parsing in the runner
# but not slowing down all jobs unnecessarily as it doesn't add much
# testing the parsing on different operating systems and languages.
runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages javascript --config-file ./.github/codeql/codeql-config.yml --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-javascript-windows:
needs: [check-js, check-node-modules]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages javascript --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-javascript-macos:
needs: [check-js, check-node-modules]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Run init
run: |
runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages javascript --config-file ./.github/codeql/codeql-config.yml --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Run analyze
run: |
runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-ubuntu:
needs: [check-js, check-node-modules]
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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
run: |
. ./codeql-runner/codeql-env.sh
$CODEQL_RUNNER dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-windows:
needs: [check-js, check-node-modules]
runs-on: windows-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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages csharp --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: powershell
run: |
cat ./codeql-runner/codeql-env.sh | Invoke-Expression
& $Env:CODEQL_RUNNER dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-macos:
needs: [check-js, check-node-modules]
runs-on: macos-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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: bash
run: |
. ./codeql-runner/codeql-env.sh
$CODEQL_RUNNER dotnet build
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-ubuntu:
needs: [check-js, check-node-modules]
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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-linux init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
run: |
../action/runner/dist/codeql-runner-linux autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-linux analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-windows:
needs: [check-js, check-node-modules]
runs-on: windows-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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-win.exe init --repository $Env:GITHUB_REPOSITORY --languages csharp --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: powershell
run: |
../action/runner/dist/codeql-runner-win.exe autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-win.exe analyze --repository $Env:GITHUB_REPOSITORY --commit $Env:GITHUB_SHA --ref $Env:GITHUB_REF --github-url $Env:GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-analyze-csharp-autobuild-macos:
needs: [check-js, check-node-modules]
runs-on: macos-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} .
mv ../action/.github/workflows .github
- name: Build runner
run: |
cd ../action/runner
npm install
npm run build-runner
- name: Run init
run: |
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
- name: Build code
shell: bash
run: |
../action/runner/dist/codeql-runner-macos autobuild
- name: Run analyze
run: |
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
env:
TEST_MODE: true
runner-upload-sarif:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
steps:
- uses: actions/checkout@v2
- name: Build runner
run: |
cd runner
npm install
npm run build-runner
- name: Upload with runner
run: |
# Deliberately don't use TEST_MODE here. This is specifically testing
# the compatibility with the API.
runner/dist/codeql-runner-linux upload --sarif-file src/testdata/empty-sarif.sarif --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}

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 'npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"

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
# 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"

View File

@@ -12,6 +12,7 @@ on:
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.repository == 'github/codeql-action' }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:

View File

@@ -96,7 +96,16 @@ Use the `config-file` parameter of the `init` action to enable the configuration
config-file: ./.github/codeql/codeql-config.yml 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 file](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#using-a-custom-configuration-file)." The configuration file can be located in a different repository. This is useful if you want to share the same configuration across multiple repositories. If the configuration file is in a private repository you can also specify an `external-repository-token` option. This should be a personal access token that has read access to any repositories containing referenced config files and queries.
```yaml
- uses: github/codeql-action/init@v1
with:
config-file: owner/repo/codeql-config.yml@branch
external-repository-token: ${{ secrets.EXTERNAL_REPOSITORY_TOKEN }}
```
For information on how to write a configuration file, see "[Using a custom configuration file](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#using-a-custom-configuration-file)."
If you only want to customise the queries used, you can specify them in your workflow instead of creating a config file, using the `queries` property of the `init` action: If you only want to customise the queries used, you can specify them in your workflow instead of creating a config file, using the `queries` property of the `init` action:

View File

@@ -19,6 +19,9 @@ inputs:
queries: 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. 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 required: false
external-repository-token:
description: A token for fetching external config files and queries if they reside in a private repository.
required: false
setup-python-dependencies: setup-python-dependencies:
description: Try to auto-install your python dependencies description: Try to auto-install your python dependencies
required: true required: true

157
lib/actions-util.js generated
View File

@@ -51,6 +51,13 @@ function getRequiredEnvParam(paramName) {
return value; return value;
} }
exports.getRequiredEnvParam = getRequiredEnvParam; exports.getRequiredEnvParam = getRequiredEnvParam;
function getTemporaryDirectory() {
const value = process.env["CODEQL_ACTION_TEMP"];
return value !== undefined && value !== ""
? value
: getRequiredEnvParam("RUNNER_TEMP");
}
exports.getTemporaryDirectory = getTemporaryDirectory;
/** /**
* Ensures all required environment variables are set in the context of a local run. * Ensures all required environment variables are set in the context of a local run.
*/ */
@@ -107,6 +114,7 @@ function escapeRegExp(string) {
} }
function patternToRegExp(value) { function patternToRegExp(value) {
return new RegExp(`^${value return new RegExp(`^${value
.toString()
.split(GLOB_PATTERN) .split(GLOB_PATTERN)
.reduce(function (arr, cur) { .reduce(function (arr, cur) {
if (cur === "**") { if (cur === "**") {
@@ -140,35 +148,30 @@ function branchesToArray(branches) {
} }
return "**"; return "**";
} }
var MissingTriggers;
(function (MissingTriggers) {
MissingTriggers[MissingTriggers["None"] = 0] = "None";
MissingTriggers[MissingTriggers["Push"] = 1] = "Push";
MissingTriggers[MissingTriggers["PullRequest"] = 2] = "PullRequest";
})(MissingTriggers || (MissingTriggers = {}));
function toCodedErrors(errors) { function toCodedErrors(errors) {
return Object.entries(errors).reduce((acc, [key, value]) => { return Object.entries(errors).reduce((acc, [key, value]) => {
acc[key] = { message: value, code: key }; acc[key] = { message: value, code: key };
return acc; return acc;
}, {}); }, {});
} }
// code to send back via status report
// message to add as a warning annotation to the run
exports.WorkflowErrors = toCodedErrors({ exports.WorkflowErrors = toCodedErrors({
MismatchedBranches: `Please make sure that every branch in on.pull_request is also in on.push so that Code Scanning can compare pull requests against the state of the base branch.`, MismatchedBranches: `Please make sure that every branch in on.pull_request is also in on.push so that Code Scanning can compare pull requests against the state of the base branch.`,
MissingHooks: `Please specify on.push and on.pull_request hooks so that Code Scanning can compare pull requests against the state of the base branch.`,
MissingPullRequestHook: `Please specify an on.pull_request hook so that Code Scanning is explicitly run against pull requests. This will be required to see results on pull requests from January 31 2021.`,
MissingPushHook: `Please specify an on.push hook so that Code Scanning can compare pull requests against the state of the base branch.`, MissingPushHook: `Please specify an on.push hook so that Code Scanning can compare pull requests against the state of the base branch.`,
PathsSpecified: `Using on.push.paths can prevent Code Scanning annotating new alerts in your pull requests.`, PathsSpecified: `Using on.push.paths can prevent Code Scanning annotating new alerts in your pull requests.`,
PathsIgnoreSpecified: `Using on.push.paths-ignore can prevent Code Scanning annotating new alerts in your pull requests.`, PathsIgnoreSpecified: `Using on.push.paths-ignore can prevent Code Scanning annotating new alerts in your pull requests.`,
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`, CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
LintFailed: `Unable to lint workflow for CodeQL.`,
}); });
function validateWorkflow(doc) { function getWorkflowErrors(doc) {
var _a, _b, _c, _d, _e, _f, _g, _h; var _a, _b, _c, _d, _e, _f, _g, _h;
const errors = []; const errors = [];
// .jobs[key].steps[].run const jobName = process.env.GITHUB_JOB;
for (const job of Object.values(((_a = doc) === null || _a === void 0 ? void 0 : _a.jobs) || {})) { if (jobName) {
if (Array.isArray((_b = job) === null || _b === void 0 ? void 0 : _b.steps)) { const job = (_b = (_a = doc) === null || _a === void 0 ? void 0 : _a.jobs) === null || _b === void 0 ? void 0 : _b[jobName];
for (const step of (_c = job) === null || _c === void 0 ? void 0 : _c.steps) { const steps = (_c = job) === null || _c === void 0 ? void 0 : _c.steps;
if (Array.isArray(steps)) {
for (const step of steps) {
// this was advice that we used to give in the README // this was advice that we used to give in the README
// we actually want to run the analysis on the merge commit // we actually want to run the analysis on the merge commit
// to produce results that are more inline with expectations // to produce results that are more inline with expectations
@@ -176,43 +179,34 @@ function validateWorkflow(doc) {
// and avoid some race conditions // and avoid some race conditions
if (((_d = step) === null || _d === void 0 ? void 0 : _d.run) === "git checkout HEAD^2") { if (((_d = step) === null || _d === void 0 ? void 0 : _d.run) === "git checkout HEAD^2") {
errors.push(exports.WorkflowErrors.CheckoutWrongHead); errors.push(exports.WorkflowErrors.CheckoutWrongHead);
break;
} }
} }
} }
} }
let missing = MissingTriggers.None; let missingPush = false;
if (doc.on === undefined) { if (doc.on === undefined) {
missing = MissingTriggers.Push | MissingTriggers.PullRequest; // this is not a valid config
} }
else if (typeof doc.on === "string") { else if (typeof doc.on === "string") {
switch (doc.on) { if (doc.on === "pull_request") {
case "push": missingPush = true;
missing = MissingTriggers.PullRequest;
break;
case "pull_request":
missing = MissingTriggers.Push;
break;
default:
missing = MissingTriggers.Push | MissingTriggers.PullRequest;
break;
} }
} }
else if (Array.isArray(doc.on)) { else if (Array.isArray(doc.on)) {
if (!doc.on.includes("push")) { const hasPush = doc.on.includes("push");
missing = missing | MissingTriggers.Push; const hasPullRequest = doc.on.includes("pull_request");
} if (hasPullRequest && !hasPush) {
if (!doc.on.includes("pull_request")) { missingPush = true;
missing = missing | MissingTriggers.PullRequest;
} }
} }
else if (isObject(doc.on)) { else if (isObject(doc.on)) {
if (!Object.prototype.hasOwnProperty.call(doc.on, "pull_request")) { const hasPush = Object.prototype.hasOwnProperty.call(doc.on, "push");
missing = missing | MissingTriggers.PullRequest; const hasPullRequest = Object.prototype.hasOwnProperty.call(doc.on, "pull_request");
if (!hasPush && hasPullRequest) {
missingPush = true;
} }
if (!Object.prototype.hasOwnProperty.call(doc.on, "push")) { if (hasPush && hasPullRequest) {
missing = missing | MissingTriggers.Push;
}
else {
const paths = (_e = doc.on.push) === null || _e === void 0 ? void 0 : _e.paths; const paths = (_e = doc.on.push) === null || _e === void 0 ? void 0 : _e.paths;
// if you specify paths or paths-ignore you can end up with commits that have no baseline // if you specify paths or paths-ignore you can end up with commits that have no baseline
// if they didn't change any files // if they didn't change any files
@@ -225,56 +219,63 @@ function validateWorkflow(doc) {
errors.push(exports.WorkflowErrors.PathsIgnoreSpecified); errors.push(exports.WorkflowErrors.PathsIgnoreSpecified);
} }
} }
const push = branchesToArray((_g = doc.on.push) === null || _g === void 0 ? void 0 : _g.branches); // if doc.on.pull_request is null that means 'all branches'
if (push !== "**") { // if doc.on.pull_request is undefined that means 'off'
const pull_request = branchesToArray((_h = doc.on.pull_request) === null || _h === void 0 ? void 0 : _h.branches); // we only want to check for mismatched branches if pull_request is on.
if (pull_request !== "**") { if (doc.on.pull_request !== undefined) {
const difference = pull_request.filter((value) => !push.some((o) => patternIsSuperset(o, value))); const push = branchesToArray((_g = doc.on.push) === null || _g === void 0 ? void 0 : _g.branches);
if (difference.length > 0) { if (push !== "**") {
// there are branches in pull_request that may not have a baseline const pull_request = branchesToArray((_h = doc.on.pull_request) === null || _h === void 0 ? void 0 : _h.branches);
// because we are not building them on push if (pull_request !== "**") {
const difference = pull_request.filter((value) => !push.some((o) => patternIsSuperset(o, value)));
if (difference.length > 0) {
// there are branches in pull_request that may not have a baseline
// because we are not building them on push
errors.push(exports.WorkflowErrors.MismatchedBranches);
}
}
else if (push.length > 0) {
// push is set up to run on a subset of branches
// and you could open a PR against a branch with no baseline
errors.push(exports.WorkflowErrors.MismatchedBranches); errors.push(exports.WorkflowErrors.MismatchedBranches);
} }
} }
else if (push.length > 0) {
// push is set up to run on a subset of branches
// and you could open a PR against a branch with no baseline
errors.push(exports.WorkflowErrors.MismatchedBranches);
}
} }
} }
else { if (missingPush) {
// on is not a known type errors.push(exports.WorkflowErrors.MissingPushHook);
// this workflow is likely malformed
missing = MissingTriggers.Push | MissingTriggers.PullRequest;
}
switch (missing) {
case MissingTriggers.PullRequest | MissingTriggers.Push:
errors.push(exports.WorkflowErrors.MissingHooks);
break;
case MissingTriggers.PullRequest:
errors.push(exports.WorkflowErrors.MissingPullRequestHook);
break;
case MissingTriggers.Push:
errors.push(exports.WorkflowErrors.MissingPushHook);
break;
} }
return errors; return errors;
} }
exports.validateWorkflow = validateWorkflow; exports.getWorkflowErrors = getWorkflowErrors;
async function getWorkflowErrors() { async function validateWorkflow() {
let workflow;
try { try {
const workflow = await getWorkflow(); workflow = await getWorkflow();
if (workflow === undefined) {
return [];
}
return validateWorkflow(workflow);
} }
catch (e) { catch (e) {
return [exports.WorkflowErrors.LintFailed]; return `error: getWorkflow() failed: ${e.toString()}`;
} }
let workflowErrors;
try {
workflowErrors = getWorkflowErrors(workflow);
}
catch (e) {
return `error: getWorkflowErrors() failed: ${e.toString()}`;
}
if (workflowErrors.length > 0) {
let message;
try {
message = formatWorkflowErrors(workflowErrors);
}
catch (e) {
return `error: formatWorkflowErrors() failed: ${e.toString()}`;
}
core.warning(message);
}
return formatWorkflowCause(workflowErrors);
} }
exports.getWorkflowErrors = getWorkflowErrors; exports.validateWorkflow = validateWorkflow;
function formatWorkflowErrors(errors) { function formatWorkflowErrors(errors) {
const issuesWere = errors.length === 1 ? "issue was" : "issues were"; const issuesWere = errors.length === 1 ? "issue was" : "issues were";
const errorsList = errors.map((e) => e.message).join(" "); const errorsList = errors.map((e) => e.message).join(" ");
@@ -291,13 +292,7 @@ exports.formatWorkflowCause = formatWorkflowCause;
async function getWorkflow() { async function getWorkflow() {
const relativePath = await getWorkflowPath(); const relativePath = await getWorkflowPath();
const absolutePath = path.join(getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath); const absolutePath = path.join(getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath);
try { return yaml.safeLoad(fs.readFileSync(absolutePath, "utf-8"));
return yaml.safeLoad(fs.readFileSync(absolutePath, "utf-8"));
}
catch (e) {
core.warning(`Could not read workflow: ${e.toString()}`);
return undefined;
}
} }
exports.getWorkflow = getWorkflow; exports.getWorkflow = getWorkflow;
/** /**

File diff suppressed because one or more lines are too long

287
lib/actions-util.test.js generated
View File

@@ -11,9 +11,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const ava_1 = __importDefault(require("ava")); const ava_1 = __importDefault(require("ava"));
const yaml = __importStar(require("js-yaml"));
const sinon_1 = __importDefault(require("sinon")); const sinon_1 = __importDefault(require("sinon"));
const actionsutil = __importStar(require("./actions-util")); const actionsutil = __importStar(require("./actions-util"));
const testing_utils_1 = require("./testing-utils"); const testing_utils_1 = require("./testing-utils");
function errorCodes(actual, expected) {
return [actual.map(({ code }) => code), expected.map(({ code }) => code)];
}
testing_utils_1.setupTests(ava_1.default); testing_utils_1.setupTests(ava_1.default);
ava_1.default("getRef() throws on the empty string", async (t) => { ava_1.default("getRef() throws on the empty string", async (t) => {
process.env["GITHUB_REF"] = ""; process.env["GITHUB_REF"] = "";
@@ -68,141 +72,136 @@ ava_1.default("prepareEnvironment() when a local run", (t) => {
t.deepEqual(process.env.GITHUB_JOB, "UNKNOWN-JOB"); t.deepEqual(process.env.GITHUB_JOB, "UNKNOWN-JOB");
t.deepEqual(process.env.CODEQL_ACTION_ANALYSIS_KEY, "LOCAL-RUN:UNKNOWN-JOB"); t.deepEqual(process.env.CODEQL_ACTION_ANALYSIS_KEY, "LOCAL-RUN:UNKNOWN-JOB");
}); });
ava_1.default("validateWorkflow() when on is missing", (t) => { ava_1.default("getWorkflowErrors() when on is empty", (t) => {
const errors = actionsutil.validateWorkflow({}); const errors = actionsutil.getWorkflowErrors({ on: {} });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MissingHooks]); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push is missing", (t) => { ava_1.default("getWorkflowErrors() when on.push is an array missing pull_request", (t) => {
const errors = actionsutil.validateWorkflow({ on: {} }); const errors = actionsutil.getWorkflowErrors({ on: ["push"] });
console.log(errors); t.deepEqual(...errorCodes(errors, []));
t.deepEqual(errors, [actionsutil.WorkflowErrors.MissingHooks]);
}); });
ava_1.default("validateWorkflow() when on.push is an array missing pull_request", (t) => { ava_1.default("getWorkflowErrors() when on.push is an array missing push", (t) => {
const errors = actionsutil.validateWorkflow({ on: ["push"] }); const errors = actionsutil.getWorkflowErrors({ on: ["pull_request"] });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MissingPullRequestHook]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MissingPushHook]));
}); });
ava_1.default("validateWorkflow() when on.push is an array missing push", (t) => { ava_1.default("getWorkflowErrors() when on.push is valid", (t) => {
const errors = actionsutil.validateWorkflow({ on: ["pull_request"] }); const errors = actionsutil.getWorkflowErrors({
t.deepEqual(errors, [actionsutil.WorkflowErrors.MissingPushHook]);
});
ava_1.default("validateWorkflow() when on.push is valid", (t) => {
const errors = actionsutil.validateWorkflow({
on: ["push", "pull_request"], on: ["push", "pull_request"],
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push is a valid superset", (t) => { ava_1.default("getWorkflowErrors() when on.push is a valid superset", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: ["push", "pull_request", "schedule"], on: ["push", "pull_request", "schedule"],
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push should not have a path", (t) => { ava_1.default("getWorkflowErrors() when on.push should not have a path", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["main"], paths: ["test/*"] }, push: { branches: ["main"], paths: ["test/*"] },
pull_request: { branches: ["main"] }, pull_request: { branches: ["main"] },
}, },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.PathsSpecified]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.PathsSpecified]));
}); });
ava_1.default("validateWorkflow() when on.push is a correct object", (t) => { ava_1.default("getWorkflowErrors() when on.push is a correct object", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { push: { branches: ["main"] }, pull_request: { branches: ["main"] } }, on: { push: { branches: ["main"] }, pull_request: { branches: ["main"] } },
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.pull_requests is a string", (t) => { ava_1.default("getWorkflowErrors() when on.pull_requests is a string", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { push: { branches: ["main"] }, pull_request: { branches: "*" } }, on: { push: { branches: ["main"] }, pull_request: { branches: "*" } },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MismatchedBranches]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MismatchedBranches]));
}); });
ava_1.default("validateWorkflow() when on.pull_requests is a string and correct", (t) => { ava_1.default("getWorkflowErrors() when on.pull_requests is a string and correct", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { push: { branches: "*" }, pull_request: { branches: "*" } }, on: { push: { branches: "*" }, pull_request: { branches: "*" } },
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push is correct with empty objects", (t) => { ava_1.default("getWorkflowErrors() when on.push is correct with empty objects", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
on: { push: undefined, pull_request: undefined }, on:
}); push:
t.deepEqual(errors, []); pull_request:
`));
t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push is mismatched", (t) => { ava_1.default("getWorkflowErrors() when on.push is mismatched", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["main"] }, push: { branches: ["main"] },
pull_request: { branches: ["feature"] }, pull_request: { branches: ["feature"] },
}, },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MismatchedBranches]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MismatchedBranches]));
}); });
ava_1.default("validateWorkflow() when on.push is not mismatched", (t) => { ava_1.default("getWorkflowErrors() when on.push is not mismatched", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["main", "feature"] }, push: { branches: ["main", "feature"] },
pull_request: { branches: ["main"] }, pull_request: { branches: ["main"] },
}, },
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.push is mismatched for pull_request", (t) => { ava_1.default("getWorkflowErrors() when on.push is mismatched for pull_request", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["main"] }, push: { branches: ["main"] },
pull_request: { branches: ["main", "feature"] }, pull_request: { branches: ["main", "feature"] },
}, },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MismatchedBranches]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MismatchedBranches]));
}); });
ava_1.default("validateWorkflow() for a range of malformed workflows", (t) => { ava_1.default("getWorkflowErrors() for a range of malformed workflows", (t) => {
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: { on: {
push: 1, push: 1,
pull_request: 1, pull_request: 1,
}, },
}), []); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: 1, jobs: 1,
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: [1], jobs: [1],
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { 1: 1 }, jobs: { 1: 1 },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { test: 1 }, jobs: { test: 1 },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { test: [1] }, jobs: { test: [1] },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { test: { steps: 1 } }, jobs: { test: { steps: 1 } },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { test: { steps: [{ notrun: "git checkout HEAD^2" }] } }, jobs: { test: { steps: [{ notrun: "git checkout HEAD^2" }] } },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow({ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
on: 1, on: 1,
jobs: { test: [undefined] }, jobs: { test: [undefined] },
}), [actionsutil.WorkflowErrors.MissingHooks]); }), []));
t.deepEqual(actionsutil.validateWorkflow(1), [ t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(1), []));
actionsutil.WorkflowErrors.MissingHooks, t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors({
]);
t.deepEqual(actionsutil.validateWorkflow({
on: { on: {
push: { push: {
branches: 1, branches: 1,
@@ -211,41 +210,43 @@ ava_1.default("validateWorkflow() for a range of malformed workflows", (t) => {
branches: 1, branches: 1,
}, },
}, },
}), []); }), []));
}); });
ava_1.default("validateWorkflow() when on.pull_request for every branch but push specifies branches", (t) => { ava_1.default("getWorkflowErrors() when on.pull_request for every branch but push specifies branches", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
on: { name: "CodeQL"
push: { branches: ["main"] }, on:
pull_request: null, push:
}, branches: ["main"]
}); pull_request:
t.deepEqual(errors, [actionsutil.WorkflowErrors.MismatchedBranches]); `));
t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MismatchedBranches]));
}); });
ava_1.default("validateWorkflow() when on.pull_request for wildcard branches", (t) => { ava_1.default("getWorkflowErrors() when on.pull_request for wildcard branches", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["feature/*"] }, push: { branches: ["feature/*"] },
pull_request: { branches: "feature/moose" }, pull_request: { branches: "feature/moose" },
}, },
}); });
t.deepEqual(errors, []); t.deepEqual(...errorCodes(errors, []));
}); });
ava_1.default("validateWorkflow() when on.pull_request for mismatched wildcard branches", (t) => { ava_1.default("getWorkflowErrors() when on.pull_request for mismatched wildcard branches", (t) => {
const errors = actionsutil.validateWorkflow({ const errors = actionsutil.getWorkflowErrors({
on: { on: {
push: { branches: ["feature/moose"] }, push: { branches: ["feature/moose"] },
pull_request: { branches: "feature/*" }, pull_request: { branches: "feature/*" },
}, },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.MismatchedBranches]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.MismatchedBranches]));
}); });
ava_1.default("validateWorkflow() when HEAD^2 is checked out", (t) => { ava_1.default("getWorkflowErrors() when HEAD^2 is checked out", (t) => {
const errors = actionsutil.validateWorkflow({ process.env.GITHUB_JOB = "test";
const errors = actionsutil.getWorkflowErrors({
on: ["push", "pull_request"], on: ["push", "pull_request"],
jobs: { test: { steps: [{ run: "git checkout HEAD^2" }] } }, jobs: { test: { steps: [{ run: "git checkout HEAD^2" }] } },
}); });
t.deepEqual(errors, [actionsutil.WorkflowErrors.CheckoutWrongHead]); t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.CheckoutWrongHead]));
}); });
ava_1.default("formatWorkflowErrors() when there is one error", (t) => { ava_1.default("formatWorkflowErrors() when there is one error", (t) => {
const message = actionsutil.formatWorkflowErrors([ const message = actionsutil.formatWorkflowErrors([
@@ -260,6 +261,10 @@ ava_1.default("formatWorkflowErrors() when there are multiple errors", (t) => {
]); ]);
t.true(message.startsWith("2 issues were detected with this workflow:")); t.true(message.startsWith("2 issues were detected with this workflow:"));
}); });
ava_1.default("formatWorkflowCause() with no errors", (t) => {
const message = actionsutil.formatWorkflowCause([]);
t.deepEqual(message, undefined);
});
ava_1.default("formatWorkflowCause()", (t) => { ava_1.default("formatWorkflowCause()", (t) => {
const message = actionsutil.formatWorkflowCause([ const message = actionsutil.formatWorkflowCause([
actionsutil.WorkflowErrors.CheckoutWrongHead, actionsutil.WorkflowErrors.CheckoutWrongHead,
@@ -290,4 +295,108 @@ ava_1.default("patternIsSuperset()", (t) => {
t.true(actionsutil.patternIsSuperset("/robin/*/release/*", "/robin/moose/release/goose")); t.true(actionsutil.patternIsSuperset("/robin/*/release/*", "/robin/moose/release/goose"));
t.false(actionsutil.patternIsSuperset("/robin/moose/release/goose", "/robin/*/release/*")); t.false(actionsutil.patternIsSuperset("/robin/moose/release/goose", "/robin/*/release/*"));
}); });
ava_1.default("getWorkflowErrors() when branches contain dots", (t) => {
const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
on:
push:
branches: [4.1, master]
pull_request:
# The branches below must be a subset of the branches above
branches: [4.1, master]
`));
t.deepEqual(...errorCodes(errors, []));
});
ava_1.default("getWorkflowErrors() when on.push has a trailing comma", (t) => {
const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
`));
t.deepEqual(...errorCodes(errors, []));
});
ava_1.default("getWorkflowErrors() should only report the current job's CheckoutWrongHead", (t) => {
process.env.GITHUB_JOB = "test";
const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
jobs:
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`));
t.deepEqual(...errorCodes(errors, [actionsutil.WorkflowErrors.CheckoutWrongHead]));
});
ava_1.default("getWorkflowErrors() should not report a different job's CheckoutWrongHead", (t) => {
process.env.GITHUB_JOB = "test3";
const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
jobs:
test:
steps:
- run: "git checkout HEAD^2"
test2:
steps:
- run: "git checkout HEAD^2"
test3:
steps: []
`));
t.deepEqual(...errorCodes(errors, []));
});
ava_1.default("getWorkflowErrors() when on is missing", (t) => {
const errors = actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
`));
t.deepEqual(...errorCodes(errors, []));
});
ava_1.default("getWorkflowErrors() with a different on setup", (t) => {
t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on: "workflow_dispatch"
`)), []));
t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on: [workflow_dispatch]
`)), []));
t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on:
workflow_dispatch: {}
`)), []));
});
ava_1.default("getWorkflowErrors() should not report an error if PRs are totally unconfigured", (t) => {
t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on:
push:
branches: [master]
`)), []));
t.deepEqual(...errorCodes(actionsutil.getWorkflowErrors(yaml.safeLoad(`
name: "CodeQL"
on: ["push"]
`)), []));
});
//# sourceMappingURL=actions-util.test.js.map //# sourceMappingURL=actions-util.test.js.map

File diff suppressed because one or more lines are too long

View File

@@ -27,7 +27,7 @@ ava_1.default("emptyPaths", async (t) => {
tempDir: tmpDir, tempDir: tmpDir,
toolCacheDir: tmpDir, toolCacheDir: tmpDir,
codeQLCmd: "", codeQLCmd: "",
gitHubVersion: { type: "dotcom" }, gitHubVersion: { type: util.GitHubVariant.DOTCOM },
}; };
analysisPaths.includeAndExcludeAnalysisPaths(config); analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined); t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
@@ -46,7 +46,7 @@ ava_1.default("nonEmptyPaths", async (t) => {
tempDir: tmpDir, tempDir: tmpDir,
toolCacheDir: tmpDir, toolCacheDir: tmpDir,
codeQLCmd: "", codeQLCmd: "",
gitHubVersion: { type: "dotcom" }, gitHubVersion: { type: util.GitHubVariant.DOTCOM },
}; };
analysisPaths.includeAndExcludeAnalysisPaths(config); analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], "path1\npath2"); t.is(process.env["LGTM_INDEX_INCLUDE"], "path1\npath2");
@@ -66,7 +66,7 @@ ava_1.default("exclude temp dir", async (t) => {
tempDir, tempDir,
toolCacheDir, toolCacheDir,
codeQLCmd: "", codeQLCmd: "",
gitHubVersion: { type: "dotcom" }, gitHubVersion: { type: util.GitHubVariant.DOTCOM },
}; };
analysisPaths.includeAndExcludeAnalysisPaths(config); analysisPaths.includeAndExcludeAnalysisPaths(config);
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined); t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);

View File

@@ -1 +1 @@
{"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,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC7B,OAAO,MAAM,IAAI,CAAC,UAAU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S,CAAC,CAAC;QACnD,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAAC;QAC9D,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

41
lib/analyze-action.js generated
View File

@@ -7,12 +7,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result; return result;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const actionsUtil = __importStar(require("./actions-util")); const actionsUtil = __importStar(require("./actions-util"));
const analyze_1 = require("./analyze"); const analyze_1 = require("./analyze");
const config_utils_1 = require("./config-utils"); const config_utils_1 = require("./config-utils");
const logging_1 = require("./logging"); const logging_1 = require("./logging");
const repository_1 = require("./repository"); const upload_lib = __importStar(require("./upload-lib"));
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
async function sendStatusReport(startedAt, stats, error) { async function sendStatusReport(startedAt, stats, error) {
var _a, _b, _c; var _a, _b, _c;
@@ -29,13 +31,14 @@ async function sendStatusReport(startedAt, stats, error) {
async function run() { async function run() {
const startedAt = new Date(); const startedAt = new Date();
let stats = undefined; let stats = undefined;
let config = undefined;
try { try {
actionsUtil.prepareLocalRunEnvironment(); actionsUtil.prepareLocalRunEnvironment();
if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("finish", "starting", startedAt)))) { if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("finish", "starting", startedAt)))) {
return; return;
} }
const logger = logging_1.getActionsLogger(); const logger = logging_1.getActionsLogger();
const config = await config_utils_1.getConfig(actionsUtil.getRequiredEnvParam("RUNNER_TEMP"), logger); config = await config_utils_1.getConfig(actionsUtil.getTemporaryDirectory(), logger);
if (config === undefined) { if (config === undefined) {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
} }
@@ -43,7 +46,16 @@ async function run() {
auth: actionsUtil.getRequiredInput("token"), auth: actionsUtil.getRequiredInput("token"),
url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"), url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"),
}; };
stats = await analyze_1.runAnalyze(repository_1.parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), apiDetails, actionsUtil.getRequiredInput("upload") === "true", "actions", actionsUtil.getRequiredInput("output"), util.getMemoryFlag(actionsUtil.getOptionalInput("ram")), util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), util.getThreadsFlag(actionsUtil.getOptionalInput("threads"), logger), config, logger); const outputDir = actionsUtil.getRequiredInput("output");
const queriesStats = await analyze_1.runAnalyze(outputDir, util.getMemoryFlag(actionsUtil.getOptionalInput("ram")), util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")), util.getThreadsFlag(actionsUtil.getOptionalInput("threads"), logger), config, logger);
if (actionsUtil.getRequiredInput("upload") === "true") {
const uploadStats = await upload_lib.uploadFromActions(outputDir, config.gitHubVersion, apiDetails, logger);
stats = { ...queriesStats, ...uploadStats };
}
else {
logger.info("Not uploading results");
stats = { ...queriesStats };
}
} }
catch (error) { catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
@@ -54,6 +66,29 @@ async function run() {
await sendStatusReport(startedAt, stats, error); await sendStatusReport(startedAt, stats, error);
return; return;
} }
finally {
if (core.isDebug() && config !== undefined) {
core.info("Debug mode is on. Printing CodeQL debug logs...");
for (const language of config.languages) {
const databaseDirectory = util.getCodeQLDatabasePath(config.tempDir, language);
const logsDirectory = path.join(databaseDirectory, "log");
const walkLogFiles = (dir) => {
const entries = fs.readdirSync(dir, { withFileTypes: true });
for (const entry of entries) {
if (entry.isFile()) {
core.startGroup(`CodeQL Debug Logs - ${language} - ${entry.name}`);
process.stdout.write(fs.readFileSync(path.resolve(dir, entry.name)));
core.endGroup();
}
else if (entry.isDirectory()) {
walkLogFiles(path.resolve(dir, entry.name));
}
}
};
walkLogFiles(logsDirectory);
}
}
}
await sendStatusReport(startedAt, stats); await sendStatusReport(startedAt, stats);
} }
async function runWrapper() { async function runWrapper() {

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":["../src/analyze-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAImB;AACnB,iDAA2C;AAC3C,uCAA6C;AAC7C,6CAAkD;AAClD,6CAA+B;AAM/B,KAAK,UAAU,gBAAgB,CAC7B,SAAe,EACf,KAAuC,EACvC,KAAa;;IAEb,MAAM,MAAM,GACV,OAAA,KAAK,0CAAE,wBAAwB,MAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAClE,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,QAAQ,EACR,MAAM,EACN,SAAS,QACT,KAAK,0CAAE,OAAO,QACd,KAAK,0CAAE,KAAK,CACb,CAAC;IACF,MAAM,YAAY,GAAuB;QACvC,GAAG,gBAAgB;QACnB,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;KACjB,CAAC;IACF,MAAM,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACnD,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,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,KAAK,CAAC,CAAC;gBAE1D,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE;oBACnC,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC7D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;wBAC3B,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE;4BAClB,IAAI,CAAC,UAAU,CACb,uBAAuB,QAAQ,MAAM,KAAK,CAAC,IAAI,EAAE,CAClD,CAAC;4BACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAC/C,CAAC;4BACF,IAAI,CAAC,QAAQ,EAAE,CAAC;yBACjB;6BAAM,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;4BAC9B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;yBAC7C;qBACF;gBACH,CAAC,CAAC;gBACF,YAAY,CAAC,aAAa,CAAC,CAAC;aAC7B;SACF;KACF;IAED,MAAM,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,0BAA0B,KAAK,EAAE,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

10
lib/analyze.js generated
View File

@@ -14,7 +14,6 @@ const analysisPaths = __importStar(require("./analysis-paths"));
const codeql_1 = require("./codeql"); const codeql_1 = require("./codeql");
const languages_1 = require("./languages"); const languages_1 = require("./languages");
const sharedEnv = __importStar(require("./shared-environment")); const sharedEnv = __importStar(require("./shared-environment"));
const upload_lib = __importStar(require("./upload-lib"));
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
class CodeQLAnalysisError extends Error { class CodeQLAnalysisError extends Error {
constructor(queriesStatusReport, message) { constructor(queriesStatusReport, message) {
@@ -117,7 +116,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
return statusReport; return statusReport;
} }
exports.runQueries = runQueries; exports.runQueries = runQueries;
async function runAnalyze(repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, apiDetails, doUpload, mode, outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger) { async function runAnalyze(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger) {
// Delete the tracer config env var to avoid tracing ourselves // Delete the tracer config env var to avoid tracing ourselves
delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION]; delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION];
fs.mkdirSync(outputDir, { recursive: true }); fs.mkdirSync(outputDir, { recursive: true });
@@ -125,12 +124,7 @@ async function runAnalyze(repositoryNwo, commitOid, ref, analysisKey, analysisNa
await finalizeDatabaseCreation(config, threadsFlag, logger); await finalizeDatabaseCreation(config, threadsFlag, logger);
logger.info("Analyzing database"); logger.info("Analyzing database");
const queriesStats = await runQueries(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger); const queriesStats = await runQueries(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger);
if (!doUpload) { return { ...queriesStats };
logger.info("Not uploading results");
return { ...queriesStats };
}
const uploadStats = await upload_lib.upload(outputDir, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, config.gitHubVersion, apiDetails, mode, logger);
return { ...queriesStats, ...uploadStats };
} }
exports.runAnalyze = runAnalyze; exports.runAnalyze = runAnalyze;
//# sourceMappingURL=analyze.js.map //# sourceMappingURL=analyze.js.map

View File

@@ -1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tmpDir,
toolCacheDir: tmpDir, toolCacheDir: tmpDir,
codeQLCmd: "", codeQLCmd: "",
gitHubVersion: { type: "dotcom" }, gitHubVersion: {
type: util.GitHubVariant.DOTCOM,
},
}; };
fs.mkdirSync(util.getCodeQLDatabasePath(config.tempDir, language), { fs.mkdirSync(util.getCodeQLDatabasePath(config.tempDir, language), {
recursive: true, recursive: true,

View File

@@ -1 +1 @@
{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../src/analyze.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyB;AAEzB,8CAAuB;AAEvB,uCAAuC;AACvC,qCAAqC;AAErC,2CAAuC;AACvC,uCAA4C;AAC5C,mDAA6C;AAC7C,6CAA+B;AAE/B,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,yEAAyE;AACzE,yCAAyC;AACzC,aAAI,CAAC,sBAAsB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC5C,kBAAS,CAAC;YACR,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS;SACvC,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,eAAe,GAAG,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAG,EAAE,CAAC;QAEvB,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,oBAAQ,CAAC,EAAE;YAC9C,MAAM,MAAM,GAAW;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE;gBACf,KAAK,EAAE,EAAE;gBACT,iBAAiB,EAAE,EAAE;gBACrB,OAAO,EAAE,MAAM;gBACf,YAAY,EAAE,MAAM;gBACpB,SAAS,EAAE,EAAE;gBACb,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAwB;aACxD,CAAC;YAC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" } { "maximumVersion": "3.1", "minimumVersion": "2.22" }

View File

@@ -34,7 +34,7 @@ async function run() {
if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("autobuild", "starting", startedAt)))) { if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("autobuild", "starting", startedAt)))) {
return; return;
} }
const config = await config_utils.getConfig(actionsUtil.getRequiredEnvParam("RUNNER_TEMP"), logger); const config = await config_utils.getConfig(actionsUtil.getTemporaryDirectory(), logger);
if (config === undefined) { if (config === undefined) {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
} }

View File

@@ -1 +1 @@
{"version":3,"file":"autobuild-action.js","sourceRoot":"","sources":["../src/autobuild-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,2CAAuE;AACvE,6DAA+C;AAE/C,uCAA6C;AAS7C,KAAK,UAAU,yBAAyB,CACtC,SAAe,EACf,YAAsB,EACtB,eAAwB,EACxB,KAAa;;IAEb,MAAM,MAAM,GACV,eAAe,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAClD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,WAAW,EACX,MAAM,EACN,SAAS,QACT,KAAK,0CAAE,OAAO,QACd,KAAK,0CAAE,KAAK,CACb,CAAC;IACF,MAAM,YAAY,GAA0B;QAC1C,GAAG,gBAAgB;QACnB,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3C,iBAAiB,EAAE,eAAe;KACnC,CAAC;IACF,MAAM,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACnD,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,MAAM,GAAG,0BAAgB,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,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AC;QACpD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} {"version":3,"file":"autobuild-action.js","sourceRoot":"","sources":["../src/autobuild-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,2CAAuE;AACvE,6DAA+C;AAE/C,uCAA6C;AAS7C,KAAK,UAAU,yBAAyB,CACtC,SAAe,EACf,YAAsB,EACtB,eAAwB,EACxB,KAAa;;IAEb,MAAM,MAAM,GACV,eAAe,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAClD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,WAAW,EACX,MAAM,EACN,SAAS,QACT,KAAK,0CAAE,OAAO,QACd,KAAK,0CAAE,KAAK,CACb,CAAC;IACF,MAAM,YAAY,GAA0B;QAC1C,GAAG,gBAAgB;QACnB,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3C,iBAAiB,EAAE,eAAe;KACnC,CAAC;IACF,MAAM,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACnD,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,MAAM,GAAG,0BAAgB,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,QAAQ,GAAyB,SAAS,CAAC;IAC/C,IAAI;QACF,WAAW,CAAC,0BAA0B,EAAE,CAAC;QACzC,IACE,CAAC,CAAC,MAAM,WAAW,CAAC,gBAAgB,CAClC,MAAM,WAAW,CAAC,sBAAsB,CACtC,WAAW,EACX,UAAU,EACV,SAAS,CACV,CACF,CAAC,EACF;YACA,OAAO;SACR;QAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,SAAS,CACzC,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,KAAK,CACb,yFAAyF,CAC1F,CAAC;SACH;QACD,QAAQ,GAAG,sCAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,wBAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;SAC9C;KACF;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CACZ,mIAAmI,KAAK,CAAC,OAAO,EAAE,CACnJ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,yBAAyB,CAC7B,SAAS,EACT,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAC1B,QAAQ,EACR,KAAK,CACN,CAAC;QACF,OAAO;KACR;IAED,MAAM,yBAAyB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,4BAA4B,KAAK,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

42
lib/codeql.js generated
View File

@@ -6,6 +6,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
result["default"] = mod; result["default"] = mod;
return result; return result;
}; };
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const path = __importStar(require("path")); const path = __importStar(require("path"));
@@ -14,6 +17,8 @@ const globalutil = __importStar(require("util"));
const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); const toolrunner = __importStar(require("@actions/exec/lib/toolrunner"));
const http = __importStar(require("@actions/http-client")); const http = __importStar(require("@actions/http-client"));
const toolcache = __importStar(require("@actions/tool-cache")); const toolcache = __importStar(require("@actions/tool-cache"));
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
const query_string_1 = __importDefault(require("query-string"));
const semver = __importStar(require("semver")); const semver = __importStar(require("semver"));
const uuid_1 = require("uuid"); const uuid_1 = require("uuid");
const actions_util_1 = require("./actions-util"); const actions_util_1 = require("./actions-util");
@@ -76,7 +81,9 @@ async function getCodeQLBundleDownloadURL(apiDetails, mode, logger) {
]; ];
// We now filter out any duplicates. // We now filter out any duplicates.
// Duplicates will happen either because the GitHub instance is GitHub.com, or because the Action is not a fork. // Duplicates will happen either because the GitHub instance is GitHub.com, or because the Action is not a fork.
const uniqueDownloadSources = potentialDownloadSources.filter((url, index, self) => index === self.indexOf(url)); const uniqueDownloadSources = potentialDownloadSources.filter((source, index, self) => {
return !self.slice(0, index).some((other) => fast_deep_equal_1.default(source, other));
});
const codeQLBundleName = getCodeQLBundleName(); const codeQLBundleName = getCodeQLBundleName();
for (const downloadSource of uniqueDownloadSources) { for (const downloadSource of uniqueDownloadSources) {
const [apiURL, repository] = downloadSource; const [apiURL, repository] = downloadSource;
@@ -103,6 +110,25 @@ async function getCodeQLBundleDownloadURL(apiDetails, mode, logger) {
logger.info(`Looked for CodeQL bundle in ${downloadSource[1]} on ${downloadSource[0]} but got error ${e}.`); logger.info(`Looked for CodeQL bundle in ${downloadSource[1]} on ${downloadSource[0]} but got error ${e}.`);
} }
} }
try {
const release = await api
.getApiClient(apiDetails)
.request("GET /enterprise/code-scanning/codeql-bundle/find/{tag}", {
tag: CODEQL_BUNDLE_VERSION,
});
const assetID = release.data.assets[codeQLBundleName];
if (assetID !== undefined) {
const download = await api
.getApiClient(apiDetails)
.request("GET /enterprise/code-scanning/codeql-bundle/download/{asset_id}", { asset_id: assetID });
const downloadURL = download.data.url;
logger.info(`Found CodeQL bundle at GitHub AE endpoint with URL ${downloadURL}.`);
return downloadURL;
}
}
catch (e) {
logger.info(`Attempted to fetch bundle from GitHub AE endpoint but got error ${e}.`);
}
return `https://github.com/${CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${CODEQL_BUNDLE_VERSION}/${codeQLBundleName}`; return `https://github.com/${CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${CODEQL_BUNDLE_VERSION}/${codeQLBundleName}`;
} }
// We have to download CodeQL manually because the toolcache doesn't support Accept headers. // We have to download CodeQL manually because the toolcache doesn't support Accept headers.
@@ -157,11 +183,15 @@ async function setupCodeQL(codeqlURL, apiDetails, tempDir, toolsDir, mode, logge
if (!codeqlURL) { if (!codeqlURL) {
codeqlURL = await getCodeQLBundleDownloadURL(apiDetails, mode, logger); codeqlURL = await getCodeQLBundleDownloadURL(apiDetails, mode, logger);
} }
const parsedCodeQLURL = new URL(codeqlURL);
const parsedQueryString = query_string_1.default.parse(parsedCodeQLURL.search);
const headers = { accept: "application/octet-stream" }; const headers = { accept: "application/octet-stream" };
// We only want to provide an authorization header if we are downloading // We only want to provide an authorization header if we are downloading
// from the same GitHub instance the Action is running on. // from the same GitHub instance the Action is running on.
// This avoids leaking Enterprise tokens to dotcom. // This avoids leaking Enterprise tokens to dotcom.
if (codeqlURL.startsWith(`${apiDetails.url}/`)) { // We also don't want to send an authorization header if there's already a token provided in the URL.
if (codeqlURL.startsWith(`${apiDetails.url}/`) &&
parsedQueryString["token"] === undefined) {
logger.debug("Downloading CodeQL bundle with token."); logger.debug("Downloading CodeQL bundle with token.");
headers.authorization = `token ${apiDetails.auth}`; headers.authorization = `token ${apiDetails.auth}`;
} }
@@ -249,7 +279,6 @@ function setCodeQL(partialCodeql) {
finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"), finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"),
resolveQueries: resolveFunction(partialCodeql, "resolveQueries"), resolveQueries: resolveFunction(partialCodeql, "resolveQueries"),
databaseAnalyze: resolveFunction(partialCodeql, "databaseAnalyze"), databaseAnalyze: resolveFunction(partialCodeql, "databaseAnalyze"),
queryCompile: resolveFunction(partialCodeql, "queryCompile"),
}; };
return cachedCodeQL; return cachedCodeQL;
} }
@@ -409,13 +438,6 @@ function getCodeQLForCmd(cmd) {
querySuite, querySuite,
]).exec(); ]).exec();
}, },
async queryCompile(querySuite) {
await new toolrunner.ToolRunner(cmd, [
"query",
"compile",
querySuite,
]).exec();
},
}; };
} }
/** /**

File diff suppressed because one or more lines are too long

18
lib/config-utils.js generated
View File

@@ -128,7 +128,7 @@ async function addLocalQueries(codeQL, resultMap, localQueryPath, checkoutPath,
/** /**
* Retrieve the set of queries at the referenced remote repo and add them to resultMap. * Retrieve the set of queries at the referenced remote repo and add them to resultMap.
*/ */
async function addRemoteQueries(codeQL, resultMap, queryUses, tempDir, githubUrl, logger, configFile) { async function addRemoteQueries(codeQL, resultMap, queryUses, tempDir, apiDetails, logger, configFile) {
let tok = queryUses.split("@"); let tok = queryUses.split("@");
if (tok.length !== 2) { if (tok.length !== 2) {
throw new Error(getQueryUsesInvalid(configFile, queryUses)); throw new Error(getQueryUsesInvalid(configFile, queryUses));
@@ -147,7 +147,7 @@ async function addRemoteQueries(codeQL, resultMap, queryUses, tempDir, githubUrl
} }
const nwo = `${tok[0]}/${tok[1]}`; const nwo = `${tok[0]}/${tok[1]}`;
// Checkout the external repository // Checkout the external repository
const checkoutPath = await externalQueries.checkoutExternalRepository(nwo, ref, githubUrl, tempDir, logger); const checkoutPath = await externalQueries.checkoutExternalRepository(nwo, ref, apiDetails, tempDir, logger);
const queryPath = tok.length > 2 const queryPath = tok.length > 2
? path.join(checkoutPath, tok.slice(2).join("/")) ? path.join(checkoutPath, tok.slice(2).join("/"))
: checkoutPath; : checkoutPath;
@@ -161,7 +161,7 @@ async function addRemoteQueries(codeQL, resultMap, queryUses, tempDir, githubUrl
* local paths starting with './', or references to remote repos, or * local paths starting with './', or references to remote repos, or
* a finite set of hardcoded terms for builtin suites. * a finite set of hardcoded terms for builtin suites.
*/ */
async function parseQueryUses(languages, codeQL, resultMap, queryUses, tempDir, checkoutPath, githubUrl, logger, configFile) { async function parseQueryUses(languages, codeQL, resultMap, queryUses, tempDir, checkoutPath, apiDetails, logger, configFile) {
queryUses = queryUses.trim(); queryUses = queryUses.trim();
if (queryUses === "") { if (queryUses === "") {
throw new Error(getQueryUsesInvalid(configFile)); throw new Error(getQueryUsesInvalid(configFile));
@@ -177,7 +177,7 @@ async function parseQueryUses(languages, codeQL, resultMap, queryUses, tempDir,
return; return;
} }
// Otherwise, must be a reference to another repo // Otherwise, must be a reference to another repo
await addRemoteQueries(codeQL, resultMap, queryUses, tempDir, githubUrl, logger, configFile); await addRemoteQueries(codeQL, resultMap, queryUses, tempDir, apiDetails, logger, configFile);
} }
// Regex validating stars in paths or paths-ignore entries. // Regex validating stars in paths or paths-ignore entries.
// The intention is to only allow ** to appear when immediately // The intention is to only allow ** to appear when immediately
@@ -367,12 +367,12 @@ async function getLanguages(languagesInput, repository, apiDetails, logger) {
} }
return parsedLanguages; return parsedLanguages;
} }
async function addQueriesFromWorkflow(codeQL, queriesInput, languages, resultMap, tempDir, checkoutPath, githubUrl, logger) { async function addQueriesFromWorkflow(codeQL, queriesInput, languages, resultMap, tempDir, checkoutPath, apiDetails, logger) {
queriesInput = queriesInput.trim(); queriesInput = queriesInput.trim();
// "+" means "don't override config file" - see shouldAddConfigFileQueries // "+" means "don't override config file" - see shouldAddConfigFileQueries
queriesInput = queriesInput.replace(/^\+/, ""); queriesInput = queriesInput.replace(/^\+/, "");
for (const query of queriesInput.split(",")) { for (const query of queriesInput.split(",")) {
await parseQueryUses(languages, codeQL, resultMap, query, tempDir, checkoutPath, githubUrl, logger); await parseQueryUses(languages, codeQL, resultMap, query, tempDir, checkoutPath, apiDetails, logger);
} }
} }
// Returns true if either no queries were provided in the workflow. // Returns true if either no queries were provided in the workflow.
@@ -393,7 +393,7 @@ async function getDefaultConfig(languagesInput, queriesInput, repository, tempDi
const queries = {}; const queries = {};
await addDefaultQueries(codeQL, languages, queries); await addDefaultQueries(codeQL, languages, queries);
if (queriesInput) { if (queriesInput) {
await addQueriesFromWorkflow(codeQL, queriesInput, languages, queries, tempDir, checkoutPath, apiDetails.url, logger); await addQueriesFromWorkflow(codeQL, queriesInput, languages, queries, tempDir, checkoutPath, apiDetails, logger);
} }
return { return {
languages, languages,
@@ -450,7 +450,7 @@ async function loadConfig(languagesInput, queriesInput, configFile, repository,
// unless they're prefixed with "+", in which case they supplement those // unless they're prefixed with "+", in which case they supplement those
// in the config file. // in the config file.
if (queriesInput) { if (queriesInput) {
await addQueriesFromWorkflow(codeQL, queriesInput, languages, queries, tempDir, checkoutPath, apiDetails.url, logger); await addQueriesFromWorkflow(codeQL, queriesInput, languages, queries, tempDir, checkoutPath, apiDetails, logger);
} }
if (shouldAddConfigFileQueries(queriesInput) && if (shouldAddConfigFileQueries(queriesInput) &&
QUERIES_PROPERTY in parsedYAML) { QUERIES_PROPERTY in parsedYAML) {
@@ -462,7 +462,7 @@ async function loadConfig(languagesInput, queriesInput, configFile, repository,
typeof query[QUERIES_USES_PROPERTY] !== "string") { typeof query[QUERIES_USES_PROPERTY] !== "string") {
throw new Error(getQueryUsesInvalid(configFile)); throw new Error(getQueryUsesInvalid(configFile));
} }
await parseQueryUses(languages, codeQL, queries, query[QUERIES_USES_PROPERTY], tempDir, checkoutPath, apiDetails.url, logger, configFile); await parseQueryUses(languages, codeQL, queries, query[QUERIES_USES_PROPERTY], tempDir, checkoutPath, apiDetails, logger, configFile);
} }
} }
if (PATHS_IGNORE_PROPERTY in parsedYAML) { if (PATHS_IGNORE_PROPERTY in parsedYAML) {

File diff suppressed because one or more lines are too long

View File

@@ -25,9 +25,10 @@ const util = __importStar(require("./util"));
testing_utils_1.setupTests(ava_1.default); testing_utils_1.setupTests(ava_1.default);
const sampleApiDetails = { const sampleApiDetails = {
auth: "token", auth: "token",
externalRepoAuth: "token",
url: "https://github.example.com", url: "https://github.example.com",
}; };
const gitHubVersion = { type: "dotcom" }; const gitHubVersion = { type: util.GitHubVariant.DOTCOM };
// Returns the filepath of the newly-created file // Returns the filepath of the newly-created file
function createConfigFile(inputFileContents, tmpDir) { function createConfigFile(inputFileContents, tmpDir) {
const configFilePath = path.join(tmpDir, "input"); const configFilePath = path.join(tmpDir, "input");
@@ -427,7 +428,7 @@ ava_1.default("Invalid queries in workflow file handled correctly", async (t) =>
// This function just needs to be type-correct; it doesn't need to do anything, // This function just needs to be type-correct; it doesn't need to do anything,
// since we're deliberately passing in invalid data // since we're deliberately passing in invalid data
const codeQL = codeql_1.setCodeQL({ const codeQL = codeql_1.setCodeQL({
async resolveQueries(_queries, _extraSearchPath) { async resolveQueries() {
return { return {
byLanguage: { byLanguage: {
javascript: {}, javascript: {},

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,3 @@
{ {
"bundleVersion": "codeql-bundle-20201127" "bundleVersion": "codeql-bundle-20210304"
} }

View File

@@ -14,7 +14,7 @@ const safeWhich = __importStar(require("@chrisgavin/safe-which"));
/** /**
* Check out repository at the given ref, and return the directory of the checkout. * Check out repository at the given ref, and return the directory of the checkout.
*/ */
async function checkoutExternalRepository(repository, ref, githubUrl, tempDir, logger) { async function checkoutExternalRepository(repository, ref, apiDetails, tempDir, logger) {
logger.info(`Checking out ${repository}`); logger.info(`Checking out ${repository}`);
const checkoutLocation = path.join(tempDir, repository, ref); const checkoutLocation = path.join(tempDir, repository, ref);
if (!checkoutLocation.startsWith(tempDir)) { if (!checkoutLocation.startsWith(tempDir)) {
@@ -22,10 +22,10 @@ async function checkoutExternalRepository(repository, ref, githubUrl, tempDir, l
throw new Error(`'${repository}@${ref}' is not a valid repository and reference.`); throw new Error(`'${repository}@${ref}' is not a valid repository and reference.`);
} }
if (!fs.existsSync(checkoutLocation)) { if (!fs.existsSync(checkoutLocation)) {
const repoURL = `${githubUrl}/${repository}`; const repoCloneURL = buildCheckoutURL(repository, apiDetails);
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), [ await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), [
"clone", "clone",
repoURL, repoCloneURL,
checkoutLocation, checkoutLocation,
]).exec(); ]).exec();
await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), [ await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), [
@@ -38,4 +38,17 @@ async function checkoutExternalRepository(repository, ref, githubUrl, tempDir, l
return checkoutLocation; return checkoutLocation;
} }
exports.checkoutExternalRepository = checkoutExternalRepository; exports.checkoutExternalRepository = checkoutExternalRepository;
function buildCheckoutURL(repository, apiDetails) {
const repoCloneURL = new URL(apiDetails.url);
if (apiDetails.externalRepoAuth !== undefined) {
repoCloneURL.username = "x-access-token";
repoCloneURL.password = apiDetails.externalRepoAuth;
}
if (!repoCloneURL.pathname.endsWith("/")) {
repoCloneURL.pathname += "/";
}
repoCloneURL.pathname += `${repository}`;
return repoCloneURL.toString();
}
exports.buildCheckoutURL = buildCheckoutURL;
//# sourceMappingURL=external-queries.js.map //# sourceMappingURL=external-queries.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"external-queries.js","sourceRoot":"","sources":["../src/external-queries.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAIpD;;GAEG;AACI,KAAK,UAAU,0BAA0B,CAC9C,UAAkB,EAClB,GAAW,EACX,SAAiB,EACjB,OAAe,EACf,MAAc;IAEd,MAAM,CAAC,IAAI,CAAC,gBAAgB,UAAU,EAAE,CAAC,CAAC;IAE1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC;IAE7D,IAAI,CAAC,gBA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IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;QACpC,MAAM,YAAY,GAAG,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC9D,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAChE,OAAO;YACP,YAAY;YACZ,gBAAgB;SACjB,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAChE,eAAe,gBAAgB,EAAE;YACjC,aAAa,gBAAgB,OAAO;YACpC,UAAU;YACV,GAAG;SACJ,CAAC,CAAC,IAAI,EAAE,CAAC;KACX;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAlCD,gEAkCC;AAED,SAAgB,gBAAgB,CAC9B,UAAkB,EAClB,UAAwC;IAExC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,UAAU,CAAC,gBAAgB,KAAK,SAAS,EAAE;QAC7C,YAAY,CAAC,QAAQ,GAAG,gBAAgB,CAAC;QACzC,YAAY,CAAC,QAAQ,GAAG,UAAU,CAAC,gBAAgB,CAAC;KACrD;IACD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACxC,YAAY,CAAC,QAAQ,IAAI,GAAG,CAAC;KAC9B;IACD,YAAY,CAAC,QAAQ,IAAI,GAAG,UAAU,EAAE,CAAC;IACzC,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC;AACjC,CAAC;AAdD,4CAcC"}

View File

@@ -81,17 +81,35 @@ ava_1.default("checkoutExternalQueries", async (t) => {
const commit2Sha = await runGit(["rev-parse", "HEAD"]); const commit2Sha = await runGit(["rev-parse", "HEAD"]);
// Checkout the first commit, which should contain 'a' and 'b' // Checkout the first commit, which should contain 'a' and 'b'
t.false(fs.existsSync(path.join(tmpDir, repoName))); t.false(fs.existsSync(path.join(tmpDir, repoName)));
await externalQueries.checkoutExternalRepository(repoName, commit1Sha, `file://${testRepoBaseDir}`, tmpDir, logging_1.getRunnerLogger(true)); await externalQueries.checkoutExternalRepository(repoName, commit1Sha, { url: `file://${testRepoBaseDir}`, externalRepoAuth: "" }, tmpDir, logging_1.getRunnerLogger(true));
t.true(fs.existsSync(path.join(tmpDir, repoName))); t.true(fs.existsSync(path.join(tmpDir, repoName)));
t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha))); t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha)));
t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha, "a"))); t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha, "a")));
t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha, "b"))); t.true(fs.existsSync(path.join(tmpDir, repoName, commit1Sha, "b")));
// Checkout the second commit as well, which should only contain 'a' // Checkout the second commit as well, which should only contain 'a'
t.false(fs.existsSync(path.join(tmpDir, repoName, commit2Sha))); t.false(fs.existsSync(path.join(tmpDir, repoName, commit2Sha)));
await externalQueries.checkoutExternalRepository(repoName, commit2Sha, `file://${testRepoBaseDir}`, tmpDir, logging_1.getRunnerLogger(true)); await externalQueries.checkoutExternalRepository(repoName, commit2Sha, { url: `file://${testRepoBaseDir}`, externalRepoAuth: "" }, tmpDir, logging_1.getRunnerLogger(true));
t.true(fs.existsSync(path.join(tmpDir, repoName, commit2Sha))); t.true(fs.existsSync(path.join(tmpDir, repoName, commit2Sha)));
t.true(fs.existsSync(path.join(tmpDir, repoName, commit2Sha, "a"))); t.true(fs.existsSync(path.join(tmpDir, repoName, commit2Sha, "a")));
t.false(fs.existsSync(path.join(tmpDir, repoName, commit2Sha, "b"))); t.false(fs.existsSync(path.join(tmpDir, repoName, commit2Sha, "b")));
}); });
}); });
ava_1.default("buildCheckoutURL", (t) => {
t.deepEqual(externalQueries.buildCheckoutURL("foo/bar", {
url: "https://github.com",
externalRepoAuth: undefined,
}), "https://github.com/foo/bar");
t.deepEqual(externalQueries.buildCheckoutURL("foo/bar", {
url: "https://github.example.com/",
externalRepoAuth: undefined,
}), "https://github.example.com/foo/bar");
t.deepEqual(externalQueries.buildCheckoutURL("foo/bar", {
url: "https://github.com",
externalRepoAuth: "abc",
}), "https://x-access-token:abc@github.com/foo/bar");
t.deepEqual(externalQueries.buildCheckoutURL("foo/bar", {
url: "https://github.example.com/",
externalRepoAuth: "abc",
}), "https://x-access-token:abc@github.example.com/foo/bar");
});
//# sourceMappingURL=external-queries.test.js.map //# sourceMappingURL=external-queries.test.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"external-queries.test.js","sourceRoot":"","sources":["../src/external-queries.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AACpD,8CAAuB;AAEvB,oEAAsD;AACtD,uCAA4C;AAC5C,mDAA6C;AAC7C,6CAA+B;AAE/B,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,yBAAyB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1C,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACrC,kDAAkD;QAClD,mFAAmF;QACnF,gDAAgD;QAChD,wCAAwC;QACxC,8EAA8E;QAC9E,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAE/C,oDAAoD;QACpD,oCAAoC;QACpC,2DAA2D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AACL,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE;IAC7B,CAAC,CAAC,SAAS,CACT,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC1C,GAAG,EAAE,oBAAoB;QACzB,gBAAgB,EAAE,SAAS;KAC5B,CAAC,EACF,4BAA4B,CAC7B,CAAC;IACF,CAAC,CAAC,SAAS,CACT,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC1C,GAAG,EAAE,6BAA6B;QAClC,gBAAgB,EAAE,SAAS;KAC5B,CAAC,EACF,oCAAoC,CACrC,CAAC;IAEF,CAAC,CAAC,SAAS,CACT,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC1C,GAAG,EAAE,oBAAoB;QACzB,gBAAgB,EAAE,KAAK;KACxB,CAAC,EACF,+CAA+C,CAChD,CAAC;IACF,CAAC,CAAC,SAAS,CACT,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC1C,GAAG,EAAE,6BAA6B;QAClC,gBAAgB,EAAE,KAAK;KACxB,CAAC,EACF,uDAAuD,CACxD,CAAC;AACJ,CAAC,CAAC,CAAC"}

58
lib/init-action.js generated
View File

@@ -7,7 +7,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result; return result;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const actionsUtil = __importStar(require("./actions-util")); const actionsUtil = __importStar(require("./actions-util"));
const init_1 = require("./init"); const init_1 = require("./init");
@@ -57,6 +56,7 @@ async function run() {
let toolsVersion; let toolsVersion;
const apiDetails = { const apiDetails = {
auth: actionsUtil.getRequiredInput("token"), auth: actionsUtil.getRequiredInput("token"),
externalRepoAuth: actionsUtil.getOptionalInput("external-repository-token"),
url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"), url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"),
}; };
const gitHubVersion = await util_1.getGitHubVersion(apiDetails); const gitHubVersion = await util_1.getGitHubVersion(apiDetails);
@@ -65,24 +65,14 @@ async function run() {
} }
try { try {
actionsUtil.prepareLocalRunEnvironment(); actionsUtil.prepareLocalRunEnvironment();
const workflowErrors = await actionsUtil.getWorkflowErrors(); const workflowErrors = await actionsUtil.validateWorkflow();
// we do not want to worry users if linting is failing if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("init", "starting", startedAt, workflowErrors)))) {
// but we do want to send a status report containing this error code
// below
const userWorkflowErrors = workflowErrors.filter((o) => o.code !== "LintFailed");
if (userWorkflowErrors.length > 0) {
core.warning(actionsUtil.formatWorkflowErrors(userWorkflowErrors));
}
if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("init", "starting", startedAt, actionsUtil.formatWorkflowCause(workflowErrors))))) {
return; return;
} }
const initCodeQLResult = await init_1.initCodeQL(actionsUtil.getOptionalInput("tools"), apiDetails, actionsUtil.getRequiredEnvParam("RUNNER_TEMP"), actionsUtil.getRequiredEnvParam("RUNNER_TOOL_CACHE"), "actions", logger); const initCodeQLResult = await init_1.initCodeQL(actionsUtil.getOptionalInput("tools"), apiDetails, actionsUtil.getTemporaryDirectory(), actionsUtil.getRequiredEnvParam("RUNNER_TOOL_CACHE"), "actions", logger);
codeql = initCodeQLResult.codeql; codeql = initCodeQLResult.codeql;
toolsVersion = initCodeQLResult.toolsVersion; toolsVersion = initCodeQLResult.toolsVersion;
config = await init_1.initConfig(actionsUtil.getOptionalInput("languages"), actionsUtil.getOptionalInput("queries"), actionsUtil.getOptionalInput("config-file"), repository_1.parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")), actionsUtil.getRequiredEnvParam("RUNNER_TEMP"), actionsUtil.getRequiredEnvParam("RUNNER_TOOL_CACHE"), codeql, actionsUtil.getRequiredEnvParam("GITHUB_WORKSPACE"), gitHubVersion, apiDetails, logger); config = await init_1.initConfig(actionsUtil.getOptionalInput("languages"), actionsUtil.getOptionalInput("queries"), actionsUtil.getOptionalInput("config-file"), repository_1.parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")), actionsUtil.getTemporaryDirectory(), actionsUtil.getRequiredEnvParam("RUNNER_TOOL_CACHE"), codeql, actionsUtil.getRequiredEnvParam("GITHUB_WORKSPACE"), gitHubVersion, apiDetails, logger);
// Compile queries and (TODO: extract query cache hash)
// MG: Spell out what info we need from the config, and move to init.ts
await compileQueries(codeql, config, logger);
if (config.languages.includes(languages_1.Language.python) && if (config.languages.includes(languages_1.Language.python) &&
actionsUtil.getRequiredInput("setup-python-dependencies") === "true") { actionsUtil.getRequiredInput("setup-python-dependencies") === "true") {
try { try {
@@ -137,43 +127,5 @@ async function runWrapper() {
console.log(error); console.log(error);
} }
} }
async function compileQueries(codeql, config, logger) {
// MG: This method is based of `runQueries`.
// Creating the query suite file could be refactored out of that method.
for (const language of config.languages) {
logger.startGroup(`Analyzing ${language}`);
const queries = config.queries[language];
if (queries.builtin.length === 0 && queries.custom.length === 0) {
throw new Error(`Unable to analyse ${language} as no queries were selected for this language`);
}
for (const type of ["custom"]) {
// MG: Only compile custom, but we would be ok doing also builtin
if (queries[type].length > 0) {
// Pass the queries to codeql using a file instead of using the command
// line to avoid command line length restrictions, particularly on windows.
const querySuitePath = `${language}-queries-${type}.qls`;
const querySuiteContents = queries[type]
.map((q) => `- query: ${q}`)
.join("\n");
fs.writeFileSync(querySuitePath, querySuiteContents);
logger.debug(`Query suite file for ${language}...\n${querySuiteContents}`);
await codeql.queryCompile(querySuitePath);
logger.debug(`Queries compiled`);
logger.endGroup();
}
}
}
// Compute hash
const globHash = require("glob-hash");
const finalHash = await globHash({
include: [
`${config.tempDir}/**/.cache/data/**`,
`${config.toolCacheDir}/**/.cache/data/**`,
],
files: false,
});
logger.info(`FinalHash: ${finalHash}`);
return finalHash;
}
void runWrapper(); void runWrapper();
//# sourceMappingURL=init-action.js.map //# sourceMappingURL=init-action.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAEpD,gEAAkD;AAElD,qCAA+C;AAC/C,4DAA8C;AAG9C,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,SAA6B,EAC7B,UAA4B,EAC5B,OAAe,EACf,QAAgB,EAChB,IAAe,EACf,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,oBAAW,CAChD,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,MAAM,CACP,CAAC;IACF,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAClC,CAAC;AApBD,gCAoBC;AAEM,KAAK,UAAU,UAAU,CAC9B,cAAkC,EAClC,YAAgC,EAChC,UAA8B,EAC9B,UAAyB,EACzB,OAAe,EACf,YAAoB,EACpB,MAAc,EACd,YAAoB,EACpB,aAAiC,EACjC,UAA4B,EAC5B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,CACzC,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,CACP,CAAC;IACF,aAAa,CAAC,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,MAAM,CAAC,QAAQ,EAAE,CA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AI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE;gBAChE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC,IAAI,EAAE,CAAC;SACX;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CACZ,+IAA+I,CAChJ,CAAC;QACF,OAAO;KACR;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAnDD,8CAmDC"}

28
lib/runner.js generated
View File

@@ -82,7 +82,8 @@ program
.description("Initializes CodeQL") .description("Initializes CodeQL")
.requiredOption("--repository <repository>", "Repository name. (Required)") .requiredOption("--repository <repository>", "Repository name. (Required)")
.requiredOption("--github-url <url>", "URL of GitHub instance. (Required)") .requiredOption("--github-url <url>", "URL of GitHub instance. (Required)")
.requiredOption("--github-auth <auth>", "GitHub Apps token or personal access token. (Required)") .option("--github-auth <auth>", "GitHub Apps token or personal access token. This option is insecure and deprecated, please use `--github-auth-stdin` instead.")
.option("--github-auth-stdin", "Read GitHub Apps token or personal access token from stdin.")
.option("--languages <languages>", "Comma-separated list of languages to analyze. Otherwise detects and analyzes all supported languages from the repo.") .option("--languages <languages>", "Comma-separated list of languages to analyze. Otherwise detects and analyzes all supported languages from the repo.")
.option("--queries <queries>", "Comma-separated list of additional queries to run. This overrides the same setting in a configuration file.") .option("--queries <queries>", "Comma-separated list of additional queries to run. This overrides the same setting in a configuration file.")
.option("--config-file <file>", "Path to config file.") .option("--config-file <file>", "Path to config file.")
@@ -103,8 +104,10 @@ program
logger.info(`Cleaning temp directory ${tempDir}`); logger.info(`Cleaning temp directory ${tempDir}`);
fs.rmdirSync(tempDir, { recursive: true }); fs.rmdirSync(tempDir, { recursive: true });
fs.mkdirSync(tempDir, { recursive: true }); fs.mkdirSync(tempDir, { recursive: true });
const auth = await util_1.getGitHubAuth(logger, cmd.githubAuth, cmd.githubAuthStdin);
const apiDetails = { const apiDetails = {
auth: cmd.githubAuth, auth,
externalRepoAuth: auth,
url: util_1.parseGithubUrl(cmd.githubUrl), url: util_1.parseGithubUrl(cmd.githubUrl),
}; };
const gitHubVersion = await util_1.getGitHubVersion(apiDetails); const gitHubVersion = await util_1.getGitHubVersion(apiDetails);
@@ -207,7 +210,8 @@ program
.requiredOption("--commit <commit>", "SHA of commit that was analyzed. (Required)") .requiredOption("--commit <commit>", "SHA of commit that was analyzed. (Required)")
.requiredOption("--ref <ref>", "Name of ref that was analyzed. (Required)") .requiredOption("--ref <ref>", "Name of ref that was analyzed. (Required)")
.requiredOption("--github-url <url>", "URL of GitHub instance. (Required)") .requiredOption("--github-url <url>", "URL of GitHub instance. (Required)")
.requiredOption("--github-auth <auth>", "GitHub Apps token or personal access token. (Required)") .option("--github-auth <auth>", "GitHub Apps token or personal access token. This option is insecure and deprecated, please use `--github-auth-stdin` instead.")
.option("--github-auth-stdin", "Read GitHub Apps token or personal access token from stdin.")
.option("--checkout-path <path>", "Checkout path. Default is the current working directory.") .option("--checkout-path <path>", "Checkout path. Default is the current working directory.")
.option("--no-upload", "Do not upload results after analysis.") .option("--no-upload", "Do not upload results after analysis.")
.option("--output-dir <dir>", "Directory to output SARIF files to. Default is in the temp directory.") .option("--output-dir <dir>", "Directory to output SARIF files to. Default is in the temp directory.")
@@ -227,11 +231,17 @@ program
throw new Error("Config file could not be found at expected location. " + throw new Error("Config file could not be found at expected location. " +
"Was the 'init' command run with the same '--temp-dir' argument as this command."); "Was the 'init' command run with the same '--temp-dir' argument as this command.");
} }
const auth = await util_1.getGitHubAuth(logger, cmd.githubAuth, cmd.githubAuthStdin);
const apiDetails = { const apiDetails = {
auth: cmd.githubAuth, auth,
url: util_1.parseGithubUrl(cmd.githubUrl), url: util_1.parseGithubUrl(cmd.githubUrl),
}; };
await analyze_1.runAnalyze(repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, apiDetails, cmd.upload, "runner", outputDir, util_1.getMemoryFlag(cmd.ram), util_1.getAddSnippetsFlag(cmd.addSnippets), util_1.getThreadsFlag(cmd.threads, logger), config, logger); await analyze_1.runAnalyze(outputDir, util_1.getMemoryFlag(cmd.ram), util_1.getAddSnippetsFlag(cmd.addSnippets), util_1.getThreadsFlag(cmd.threads, logger), config, logger);
if (!cmd.upload) {
logger.info("Not uploading results");
return;
}
await upload_lib.uploadFromRunner(outputDir, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), cmd.checkoutPath || process.cwd(), config.gitHubVersion, apiDetails, logger);
} }
catch (e) { catch (e) {
logger.error("Analyze failed"); logger.error("Analyze failed");
@@ -247,18 +257,20 @@ program
.requiredOption("--commit <commit>", "SHA of commit that was analyzed. (Required)") .requiredOption("--commit <commit>", "SHA of commit that was analyzed. (Required)")
.requiredOption("--ref <ref>", "Name of ref that was analyzed. (Required)") .requiredOption("--ref <ref>", "Name of ref that was analyzed. (Required)")
.requiredOption("--github-url <url>", "URL of GitHub instance. (Required)") .requiredOption("--github-url <url>", "URL of GitHub instance. (Required)")
.requiredOption("--github-auth <auth>", "GitHub Apps token or personal access token. (Required)") .option("--github-auth <auth>", "GitHub Apps token or personal access token. This option is insecure and deprecated, please use `--github-auth-stdin` instead.")
.option("--github-auth-stdin", "Read GitHub Apps token or personal access token from stdin.")
.option("--checkout-path <path>", "Checkout path. Default is the current working directory.") .option("--checkout-path <path>", "Checkout path. Default is the current working directory.")
.option("--debug", "Print more verbose output", false) .option("--debug", "Print more verbose output", false)
.action(async (cmd) => { .action(async (cmd) => {
const logger = logging_1.getRunnerLogger(cmd.debug); const logger = logging_1.getRunnerLogger(cmd.debug);
const auth = await util_1.getGitHubAuth(logger, cmd.githubAuth, cmd.githubAuthStdin);
const apiDetails = { const apiDetails = {
auth: cmd.githubAuth, auth,
url: util_1.parseGithubUrl(cmd.githubUrl), url: util_1.parseGithubUrl(cmd.githubUrl),
}; };
try { try {
const gitHubVersion = await util_1.getGitHubVersion(apiDetails); const gitHubVersion = await util_1.getGitHubVersion(apiDetails);
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, gitHubVersion, apiDetails, "runner", logger); await upload_lib.uploadFromRunner(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), cmd.checkoutPath || process.cwd(), gitHubVersion, apiDetails, logger);
} }
catch (e) { catch (e) {
logger.error("Upload failed"); logger.error("Upload failed");

File diff suppressed because one or more lines are too long

6
lib/tracer-config.js generated
View File

@@ -141,6 +141,12 @@ async function getCombinedTracerConfig(config, codeql) {
else if (process.platform !== "win32") { else if (process.platform !== "win32") {
mainTracerConfig.env["LD_PRELOAD"] = path.join(codeQLDir, "tools", "linux64", "${LIB}trace.so"); mainTracerConfig.env["LD_PRELOAD"] = path.join(codeQLDir, "tools", "linux64", "${LIB}trace.so");
} }
// On macos it's necessary to prefix the build command with the runner exectuable
// on order to trace when System Integrity Protection is enabled.
// The exectuable also exists and works for other platforms so we output this env
// var with a path to the runner regardless so it's always available.
const runnerExeName = process.platform === "win32" ? "runner.exe" : "runner";
mainTracerConfig.env["CODEQL_RUNNER"] = path.join(mainTracerConfig.env["CODEQL_DIST"], "tools", mainTracerConfig.env["CODEQL_PLATFORM"], runnerExeName);
return mainTracerConfig; return mainTracerConfig;
} }
exports.getCombinedTracerConfig = getCombinedTracerConfig; exports.getCombinedTracerConfig = getCombinedTracerConfig;

File diff suppressed because one or more lines are too long

View File

@@ -29,7 +29,7 @@ function getTestConfig(tmpDir) {
tempDir: tmpDir, tempDir: tmpDir,
toolCacheDir: tmpDir, toolCacheDir: tmpDir,
codeQLCmd: "", codeQLCmd: "",
gitHubVersion: { type: "dotcom" }, gitHubVersion: { type: util.GitHubVariant.DOTCOM },
}; };
} }
// A very minimal setup // A very minimal setup
@@ -238,6 +238,7 @@ ava_1.default("getCombinedTracerConfig - return undefined when no languages are
async getTracerEnv() { async getTracerEnv() {
return { return {
ODASA_TRACER_CONFIGURATION: "abc", ODASA_TRACER_CONFIGURATION: "abc",
CODEQL_DIST: "/",
foo: "bar", foo: "bar",
}; };
}, },
@@ -250,17 +251,28 @@ ava_1.default("getCombinedTracerConfig - valid spec file", async (t) => {
const config = getTestConfig(tmpDir); const config = getTestConfig(tmpDir);
const spec = path.join(tmpDir, "spec"); const spec = path.join(tmpDir, "spec");
fs.writeFileSync(spec, "foo.log\n2\nabc\ndef"); fs.writeFileSync(spec, "foo.log\n2\nabc\ndef");
const bundlePath = path.join(tmpDir, "bundle");
const codeqlPlatform = process.platform === "win32"
? "win64"
: process.platform === "darwin"
? "osx64"
: "linux64";
const codeQL = codeql_1.setCodeQL({ const codeQL = codeql_1.setCodeQL({
async getTracerEnv() { async getTracerEnv() {
return { return {
ODASA_TRACER_CONFIGURATION: spec, ODASA_TRACER_CONFIGURATION: spec,
CODEQL_DIST: bundlePath,
CODEQL_PLATFORM: codeqlPlatform,
foo: "bar", foo: "bar",
}; };
}, },
}); });
const result = await tracer_config_1.getCombinedTracerConfig(config, codeQL); const result = await tracer_config_1.getCombinedTracerConfig(config, codeQL);
t.notDeepEqual(result, undefined);
const expectedEnv = { const expectedEnv = {
foo: "bar", foo: "bar",
CODEQL_DIST: bundlePath,
CODEQL_PLATFORM: codeqlPlatform,
ODASA_TRACER_CONFIGURATION: result.spec, ODASA_TRACER_CONFIGURATION: result.spec,
}; };
if (process.platform === "darwin") { if (process.platform === "darwin") {
@@ -269,6 +281,15 @@ ava_1.default("getCombinedTracerConfig - valid spec file", async (t) => {
else if (process.platform !== "win32") { else if (process.platform !== "win32") {
expectedEnv["LD_PRELOAD"] = path.join(path.dirname(codeQL.getPath()), "tools", "linux64", "${LIB}trace.so"); expectedEnv["LD_PRELOAD"] = path.join(path.dirname(codeQL.getPath()), "tools", "linux64", "${LIB}trace.so");
} }
if (process.platform === "win32") {
expectedEnv["CODEQL_RUNNER"] = path.join(bundlePath, "tools/win64/runner.exe");
}
else if (process.platform === "darwin") {
expectedEnv["CODEQL_RUNNER"] = path.join(bundlePath, "tools/osx64/runner");
}
else {
expectedEnv["CODEQL_RUNNER"] = path.join(bundlePath, "tools/linux64/runner");
}
t.deepEqual(result, { t.deepEqual(result, {
spec: path.join(tmpDir, "compound-spec"), spec: path.join(tmpDir, "compound-spec"),
env: expectedEnv, env: expectedEnv,

File diff suppressed because one or more lines are too long

53
lib/upload-lib.js generated
View File

@@ -17,8 +17,10 @@ const core = __importStar(require("@actions/core"));
const file_url_1 = __importDefault(require("file-url")); const file_url_1 = __importDefault(require("file-url"));
const jsonschema = __importStar(require("jsonschema")); const jsonschema = __importStar(require("jsonschema"));
const semver = __importStar(require("semver")); const semver = __importStar(require("semver"));
const actionsUtil = __importStar(require("./actions-util"));
const api = __importStar(require("./api-client")); const api = __importStar(require("./api-client"));
const fingerprints = __importStar(require("./fingerprints")); const fingerprints = __importStar(require("./fingerprints"));
const repository_1 = require("./repository");
const sharedEnv = __importStar(require("./shared-environment")); const sharedEnv = __importStar(require("./shared-environment"));
const util = __importStar(require("./util")); const util = __importStar(require("./util"));
// Takes a list of paths to sarif files and combines them together, // Takes a list of paths to sarif files and combines them together,
@@ -63,32 +65,55 @@ async function uploadPayload(payload, repositoryNwo, apiDetails, mode, logger) {
logger.debug(`response status: ${response.status}`); logger.debug(`response status: ${response.status}`);
logger.info("Successfully uploaded results"); logger.info("Successfully uploaded results");
} }
// Recursively walks a directory and returns all SARIF files it finds.
// Does not follow symlinks.
function findSarifFilesInDir(sarifPath) {
const sarifFiles = [];
const walkSarifFiles = (dir) => {
const entries = fs.readdirSync(dir, { withFileTypes: true });
for (const entry of entries) {
if (entry.isFile() && entry.name.endsWith(".sarif")) {
sarifFiles.push(path.resolve(dir, entry.name));
}
else if (entry.isDirectory()) {
walkSarifFiles(path.resolve(dir, entry.name));
}
}
};
walkSarifFiles(sarifPath);
return sarifFiles;
}
exports.findSarifFilesInDir = findSarifFilesInDir;
// Uploads a single sarif file or a directory of sarif files // Uploads a single sarif file or a directory of sarif files
// depending on what the path happens to refer to. // depending on what the path happens to refer to.
// Returns true iff the upload occurred and succeeded // Returns true iff the upload occurred and succeeded
async function upload(sarifPath, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, gitHubVersion, apiDetails, mode, logger) { async function uploadFromActions(sarifPath, gitHubVersion, apiDetails, logger) {
const sarifFiles = []; return await uploadFiles(getSarifFilePaths(sarifPath), repository_1.parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), gitHubVersion, apiDetails, "actions", logger);
}
exports.uploadFromActions = uploadFromActions;
// Uploads a single sarif file or a directory of sarif files
// depending on what the path happens to refer to.
// Returns true iff the upload occurred and succeeded
async function uploadFromRunner(sarifPath, repositoryNwo, commitOid, ref, checkoutPath, gitHubVersion, apiDetails, logger) {
return await uploadFiles(getSarifFilePaths(sarifPath), repositoryNwo, commitOid, ref, undefined, undefined, undefined, checkoutPath, undefined, gitHubVersion, apiDetails, "runner", logger);
}
exports.uploadFromRunner = uploadFromRunner;
function getSarifFilePaths(sarifPath) {
if (!fs.existsSync(sarifPath)) { if (!fs.existsSync(sarifPath)) {
throw new Error(`Path does not exist: ${sarifPath}`); throw new Error(`Path does not exist: ${sarifPath}`);
} }
let sarifFiles;
if (fs.lstatSync(sarifPath).isDirectory()) { if (fs.lstatSync(sarifPath).isDirectory()) {
const paths = fs sarifFiles = findSarifFilesInDir(sarifPath);
.readdirSync(sarifPath)
.filter((f) => f.endsWith(".sarif"))
.map((f) => path.resolve(sarifPath, f));
for (const filepath of paths) {
sarifFiles.push(filepath);
}
if (sarifFiles.length === 0) { if (sarifFiles.length === 0) {
throw new Error(`No SARIF files found to upload in "${sarifPath}".`); throw new Error(`No SARIF files found to upload in "${sarifPath}".`);
} }
} }
else { else {
sarifFiles.push(sarifPath); sarifFiles = [sarifPath];
} }
return await uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, gitHubVersion, apiDetails, mode, logger); return sarifFiles;
} }
exports.upload = upload;
// Counts the number of results in the given SARIF file // Counts the number of results in the given SARIF file
function countResultsInSarif(sarif) { function countResultsInSarif(sarif) {
let numResults = 0; let numResults = 0;
@@ -137,12 +162,12 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo
base_sha: undefined, base_sha: undefined,
}; };
// This behaviour can be made the default when support for GHES 3.0 is discontinued. // This behaviour can be made the default when support for GHES 3.0 is discontinued.
if (gitHubVersion.type === "dotcom" || if (gitHubVersion.type !== util.GitHubVariant.GHES ||
semver.satisfies(gitHubVersion.version, `>=3.1`)) { semver.satisfies(gitHubVersion.version, `>=3.1`)) {
if (process.env.GITHUB_EVENT_NAME === "pull_request" && if (process.env.GITHUB_EVENT_NAME === "pull_request" &&
process.env.GITHUB_EVENT_PATH) { process.env.GITHUB_EVENT_PATH) {
const githubEvent = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8")); const githubEvent = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8"));
payloadObj.base_ref = `refs/heads/$githubEvent.pull_request.base.ref`; payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`;
payloadObj.base_sha = githubEvent.pull_request.base.sha; payloadObj.base_sha = githubEvent.pull_request.base.sha;
} }
} }

File diff suppressed because one or more lines are too long

46
lib/upload-lib.test.js generated
View File

@@ -1,7 +1,4 @@
"use strict"; "use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) { var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
@@ -9,11 +6,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
result["default"] = mod; result["default"] = mod;
return result; return result;
}; };
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava")); const ava_1 = __importDefault(require("ava"));
const logging_1 = require("./logging"); const logging_1 = require("./logging");
const testing_utils_1 = require("./testing-utils"); const testing_utils_1 = require("./testing-utils");
const uploadLib = __importStar(require("./upload-lib")); const uploadLib = __importStar(require("./upload-lib"));
const util_1 = require("./util");
testing_utils_1.setupTests(ava_1.default); testing_utils_1.setupTests(ava_1.default);
ava_1.default("validateSarifFileSchema - valid", (t) => { ava_1.default("validateSarifFileSchema - valid", (t) => {
const inputFile = `${__dirname}/../src/testdata/valid-sarif.sarif`; const inputFile = `${__dirname}/../src/testdata/valid-sarif.sarif`;
@@ -25,12 +28,12 @@ ava_1.default("validateSarifFileSchema - invalid", (t) => {
}); });
ava_1.default("validate correct payload used per version", async (t) => { ava_1.default("validate correct payload used per version", async (t) => {
const newVersions = [ const newVersions = [
{ type: "dotcom" }, { type: util_1.GitHubVariant.DOTCOM },
{ type: "ghes", version: "3.1.0" }, { type: util_1.GitHubVariant.GHES, version: "3.1.0" },
]; ];
const oldVersions = [ const oldVersions = [
{ type: "ghes", version: "2.22.1" }, { type: util_1.GitHubVariant.GHES, version: "2.22.1" },
{ type: "ghes", version: "3.0.0" }, { type: util_1.GitHubVariant.GHES, version: "3.0.0" },
]; ];
const allVersions = newVersions.concat(oldVersions); const allVersions = newVersions.concat(oldVersions);
process.env["GITHUB_EVENT_NAME"] = "push"; process.env["GITHUB_EVENT_NAME"] = "push";
@@ -44,8 +47,8 @@ ava_1.default("validate correct payload used per version", async (t) => {
process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`; process.env["GITHUB_EVENT_PATH"] = `${__dirname}/../src/testdata/pull_request.json`;
for (const version of newVersions) { for (const version of newVersions) {
const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions"); const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions");
t.truthy(payload.base_ref); t.deepEqual(payload.base_ref, "refs/heads/master");
t.truthy(payload.base_sha); t.deepEqual(payload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");
} }
for (const version of oldVersions) { for (const version of oldVersions) {
const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions"); const payload = uploadLib.buildPayload("commit", "refs/pull/123/merge", "key", undefined, "", undefined, "/opt/src", undefined, ["CodeQL", "eslint"], version, "actions");
@@ -54,4 +57,29 @@ ava_1.default("validate correct payload used per version", async (t) => {
t.falsy(payload.base_sha); t.falsy(payload.base_sha);
} }
}); });
ava_1.default("finding SARIF files", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
// include a couple of sarif files
fs.writeFileSync(path.join(tmpDir, "a.sarif"), "");
fs.writeFileSync(path.join(tmpDir, "b.sarif"), "");
// other random files shouldn't be returned
fs.writeFileSync(path.join(tmpDir, "c.foo"), "");
// we should recursively look in subdirectories
fs.mkdirSync(path.join(tmpDir, "dir1"));
fs.writeFileSync(path.join(tmpDir, "dir1", "d.sarif"), "");
fs.mkdirSync(path.join(tmpDir, "dir1", "dir2"));
fs.writeFileSync(path.join(tmpDir, "dir1", "dir2", "e.sarif"), "");
// we should ignore symlinks
fs.mkdirSync(path.join(tmpDir, "dir3"));
fs.symlinkSync(tmpDir, path.join(tmpDir, "dir3", "symlink1"), "dir");
fs.symlinkSync(path.join(tmpDir, "a.sarif"), path.join(tmpDir, "dir3", "symlink2.sarif"), "file");
const sarifFiles = uploadLib.findSarifFilesInDir(tmpDir);
t.deepEqual(sarifFiles, [
path.join(tmpDir, "a.sarif"),
path.join(tmpDir, "b.sarif"),
path.join(tmpDir, "dir1", "d.sarif"),
path.join(tmpDir, "dir1", "dir2", "e.sarif"),
]);
});
});
//# sourceMappingURL=upload-lib.test.js.map //# sourceMappingURL=upload-lib.test.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"upload-lib.test.js","sourceRoot":"","sources":["../src/upload-lib.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAuB;AAEvB,uCAA4C;AAC5C,mDAA6C;AAC7C,wDAA0C;AAG1C,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,iCAAiC,EAAE,CAAC,CAAC,EAAE,EAAE;IAC5C,MAAM,SAAS,GAAG,GAAG,SAAS,oCAAoC,CAAC;IACnE,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CACf,SAAS,CAAC,uBAAuB,CAAC,SAAS,EAAE,yBAAe,CAAC,IAAI,CAAC,CAAC,CACpE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,mCAAmC,EAAE,CAAC,CAAC,EAAE,EAAE;IAC9C,MAAM,SAAS,GAAG,GAAG,SAAS,sCAAsC,CAAC;IACrE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CACZ,SAAS,CAAC,uBAAuB,CAAC,SAAS,EAAE,yBAAe,CAAC,IAAI,CAAC,CAAC,CACpE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,2CAA2C,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC5D,MAAM,WAAW,GAAoB;QACnC,EAAE,IAAI,EAAE,QAAQ,EA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C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3D,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAChD,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QAEnE,4BAA4B;QAC5B,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACxC,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC;QACrE,EAAE,CAAC,WAAW,CACZ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,EAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAC3C,MAAM,CACP,CAAC;QAEF,MAAM,UAAU,GAAG,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAEzD,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

View File

@@ -10,7 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const actionsUtil = __importStar(require("./actions-util")); const actionsUtil = __importStar(require("./actions-util"));
const logging_1 = require("./logging"); const logging_1 = require("./logging");
const repository_1 = require("./repository");
const upload_lib = __importStar(require("./upload-lib")); const upload_lib = __importStar(require("./upload-lib"));
const util_1 = require("./util"); const util_1 = require("./util");
async function sendSuccessStatusReport(startedAt, uploadStats) { async function sendSuccessStatusReport(startedAt, uploadStats) {
@@ -32,7 +31,7 @@ async function run() {
url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"), url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"),
}; };
const gitHubVersion = await util_1.getGitHubVersion(apiDetails); const gitHubVersion = await util_1.getGitHubVersion(apiDetails);
const uploadStats = await upload_lib.upload(actionsUtil.getRequiredInput("sarif_file"), repository_1.parseRepositoryNwo(actionsUtil.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), gitHubVersion, apiDetails, "actions", logging_1.getActionsLogger()); const uploadStats = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), gitHubVersion, apiDetails, logging_1.getActionsLogger());
await sendSuccessStatusReport(startedAt, uploadStats); await sendSuccessStatusReport(startedAt, uploadStats);
} }
catch (error) { catch (error) {

View File

@@ -1 +1 @@
{"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAA6C;AAC7C,6CAAkD;AAClD,yDAA2C;AAC3C,iCAA0C;AAM1C,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB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;QACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,WAAW,CAAC,gBAAgB,CAChC,MAAM,WAAW,CAAC,sBAAsB,CACtC,cAAc,EACd,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,sCAAsC,KAAK,EAAE,CAAC,CAAC;QAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} {"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAA6C;AAC7C,yDAA2C;AAC3C,iCAA0C;AAM1C,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,cAAc,EACd,SAAS,EACT,SAAS,CACV,CAAC;IACF,MAAM,YAAY,GAA4B;QAC5C,GAAG,gBAAgB;QACnB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACnD,CAAC;AAED,KAAK,UAAU,GAAG;IAChB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IACE,CAAC,CAAC,MAAM,WAAW,CAAC,gBAAgB,CAClC,MAAM,WAAW,CAAC,sBAAsB,CACtC,cAAc,EACd,UAAU,EACV,SAAS,CACV,CACF,CAAC,EACF;QACA,OAAO;KACR;IAED,IAAI;QACF,MAAM,UAAU,GAAG;YACjB,IAAI,EAAE,WAAW,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAC3C,GAAG,EAAE,WAAW,CAAC,mBAAmB,CAAC,mBAAmB,CAAC;SAC1D,CAAC;QAEF,MAAM,aAAa,GAAG,MAAM,uBAAgB,CAAC,UAAU,CAAC,CAAC;QAEzD,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,iBAAiB,CACpD,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAC1C,aAAa,EACb,UAAU,EACV,0BAAgB,EAAE,CACnB,CAAC;QACF,MAAM,uBAAuB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;KACvD;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,WAAW,CAAC,gBAAgB,CAChC,MAAM,WAAW,CAAC,sBAAsB,CACtC,cAAc,EACd,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,sCAAsC,KAAK,EAAE,CAAC,CAAC;QAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

90
lib/util.js generated
View File

@@ -72,9 +72,21 @@ async function withTmpDir(body) {
return result; return result;
} }
exports.withTmpDir = withTmpDir; exports.withTmpDir = withTmpDir;
/**
* Gets an OS-specific amount of memory (in MB) to reserve for OS processes
* when the user doesn't explicitly specify a memory setting.
* This is a heuristic to avoid OOM errors (exit code 137 / SIGKILL)
* from committing too much of the available memory to CodeQL.
* @returns number
*/
function getSystemReservedMemoryMegaBytes() {
// Windows needs more memory for OS processes.
return 1024 * (process.platform === "win32" ? 1.5 : 1);
}
/** /**
* Get the codeql `--ram` flag as configured by the `ram` input. If no value was * Get the codeql `--ram` flag as configured by the `ram` input. If no value was
* specified, the total available memory will be used minus 256 MB. * specified, the total available memory will be used minus a threshold
* reserved for the OS.
* *
* @returns string * @returns string
*/ */
@@ -89,8 +101,8 @@ function getMemoryFlag(userInput) {
else { else {
const totalMemoryBytes = os.totalmem(); const totalMemoryBytes = os.totalmem();
const totalMemoryMegaBytes = totalMemoryBytes / (1024 * 1024); const totalMemoryMegaBytes = totalMemoryBytes / (1024 * 1024);
const systemReservedMemoryMegaBytes = 256; const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes();
memoryToUseMegaBytes = totalMemoryMegaBytes - systemReservedMemoryMegaBytes; memoryToUseMegaBytes = totalMemoryMegaBytes - reservedMemoryMegaBytes;
} }
return `--ram=${Math.floor(memoryToUseMegaBytes)}`; return `--ram=${Math.floor(memoryToUseMegaBytes)}`;
} }
@@ -197,10 +209,16 @@ exports.parseGithubUrl = parseGithubUrl;
const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version"; const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
const CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR = "CODEQL_ACTION_WARNED_ABOUT_VERSION"; const CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR = "CODEQL_ACTION_WARNED_ABOUT_VERSION";
let hasBeenWarnedAboutVersion = false; let hasBeenWarnedAboutVersion = false;
var GitHubVariant;
(function (GitHubVariant) {
GitHubVariant[GitHubVariant["DOTCOM"] = 0] = "DOTCOM";
GitHubVariant[GitHubVariant["GHES"] = 1] = "GHES";
GitHubVariant[GitHubVariant["GHAE"] = 2] = "GHAE";
})(GitHubVariant = exports.GitHubVariant || (exports.GitHubVariant = {}));
async function getGitHubVersion(apiDetails) { async function getGitHubVersion(apiDetails) {
// We can avoid making an API request in the standard dotcom case // We can avoid making an API request in the standard dotcom case
if (parseGithubUrl(apiDetails.url) === exports.GITHUB_DOTCOM_URL) { if (parseGithubUrl(apiDetails.url) === exports.GITHUB_DOTCOM_URL) {
return { type: "dotcom" }; return { type: GitHubVariant.DOTCOM };
} }
// Doesn't strictly have to be the meta endpoint as we're only // Doesn't strictly have to be the meta endpoint as we're only
// using the response headers which are available on every request. // using the response headers which are available on every request.
@@ -209,23 +227,26 @@ async function getGitHubVersion(apiDetails) {
// This happens on dotcom, although we expect to have already returned in that // This happens on dotcom, although we expect to have already returned in that
// case. This can also serve as a fallback in cases we haven't foreseen. // case. This can also serve as a fallback in cases we haven't foreseen.
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === undefined) { if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === undefined) {
return { type: "dotcom" }; return { type: GitHubVariant.DOTCOM };
}
if (response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] === "GitHub AE") {
return { type: GitHubVariant.GHAE };
} }
const version = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER]; const version = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER];
return { type: "ghes", version }; return { type: GitHubVariant.GHES, version };
} }
exports.getGitHubVersion = getGitHubVersion; exports.getGitHubVersion = getGitHubVersion;
function checkGitHubVersionInRange(version, mode, logger) { function checkGitHubVersionInRange(version, mode, logger) {
if (hasBeenWarnedAboutVersion || version.type !== "ghes") { if (hasBeenWarnedAboutVersion || version.type !== GitHubVariant.GHES) {
return; return;
} }
const disallowedAPIVersionReason = apiVersionInRange(version.version, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion); const disallowedAPIVersionReason = apiVersionInRange(version.version, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion);
const toolName = mode === "actions" ? "Action" : "Runner"; const toolName = mode === "actions" ? "Action" : "Runner";
if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD) { if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD) {
logger.warning(`The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.`); logger.warning(`The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version.version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.`);
} }
if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW) { if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW) {
logger.warning(`GitHub Enterprise ${version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.`); logger.warning(`GitHub Enterprise ${version.version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.`);
} }
hasBeenWarnedAboutVersion = true; hasBeenWarnedAboutVersion = true;
if (mode === "actions") { if (mode === "actions") {
@@ -248,4 +269,55 @@ function apiVersionInRange(version, minimumVersion, maximumVersion) {
return undefined; return undefined;
} }
exports.apiVersionInRange = apiVersionInRange; exports.apiVersionInRange = apiVersionInRange;
/**
* Retrieves the github auth token for use with the runner. There are
* three possible locations for the token:
*
* 1. from the cli (considered insecure)
* 2. from stdin
* 3. from the GITHUB_TOKEN environment variable
*
* If both 1 & 2 are specified, then an error is thrown.
* If 1 & 3 or 2 & 3 are specified, then the environment variable is ignored.
*
* @param githubAuth a github app token or PAT
* @param fromStdIn read the github app token or PAT from stdin up to, but excluding the first whitespace
* @param readable the readable stream to use for getting the token (defaults to stdin)
*
* @return a promise resolving to the auth token.
*/
async function getGitHubAuth(logger, githubAuth, fromStdIn, readable = process.stdin) {
if (githubAuth && fromStdIn) {
throw new Error("Cannot specify both `--github-auth` and `--github-auth-stdin`. Please use `--github-auth-stdin`, which is more secure.");
}
if (githubAuth) {
logger.warning("Using `--github-auth` via the CLI is insecure. Use `--github-auth-stdin` instead.");
return githubAuth;
}
if (fromStdIn) {
return new Promise((resolve, reject) => {
let token = "";
readable.on("data", (data) => {
token += data.toString("utf8");
});
readable.on("end", () => {
token = token.split(/\s+/)[0].trim();
if (token) {
resolve(token);
}
else {
reject(new Error("Standard input is empty"));
}
});
readable.on("error", (err) => {
reject(err);
});
});
}
if (process.env.GITHUB_TOKEN) {
return process.env.GITHUB_TOKEN;
}
throw new Error("No GitHub authentication token was specified. Please provide a token via the GITHUB_TOKEN environment variable, or by adding the `--github-auth-stdin` flag and passing the token via standard input.");
}
exports.getGitHubAuth = getGitHubAuth;
//# sourceMappingURL=util.js.map //# sourceMappingURL=util.js.map

File diff suppressed because one or more lines are too long

48
lib/util.test.js generated
View File

@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs")); const fs = __importStar(require("fs"));
const os = __importStar(require("os")); const os = __importStar(require("os"));
const stream = __importStar(require("stream"));
const github = __importStar(require("@actions/github")); const github = __importStar(require("@actions/github"));
const ava_1 = __importDefault(require("ava")); const ava_1 = __importDefault(require("ava"));
const sinon_1 = __importDefault(require("sinon")); const sinon_1 = __importDefault(require("sinon"));
@@ -27,9 +28,10 @@ ava_1.default("getToolNames", (t) => {
}); });
ava_1.default("getMemoryFlag() should return the correct --ram flag", (t) => { ava_1.default("getMemoryFlag() should return the correct --ram flag", (t) => {
const totalMem = Math.floor(os.totalmem() / (1024 * 1024)); const totalMem = Math.floor(os.totalmem() / (1024 * 1024));
const expectedThreshold = process.platform === "win32" ? 1536 : 1024;
const tests = [ const tests = [
[undefined, `--ram=${totalMem - 256}`], [undefined, `--ram=${totalMem - expectedThreshold}`],
["", `--ram=${totalMem - 256}`], ["", `--ram=${totalMem - expectedThreshold}`],
["512", "--ram=512"], ["512", "--ram=512"],
]; ];
for (const [input, expectedFlag] of tests) { for (const [input, expectedFlag] of tests) {
@@ -152,18 +154,54 @@ ava_1.default("getGitHubVersion", async (t) => {
auth: "", auth: "",
url: "https://github.com", url: "https://github.com",
}); });
t.deepEqual("dotcom", v.type); t.deepEqual(util.GitHubVariant.DOTCOM, v.type);
mockGetMetaVersionHeader("2.0"); mockGetMetaVersionHeader("2.0");
const v2 = await util.getGitHubVersion({ const v2 = await util.getGitHubVersion({
auth: "", auth: "",
url: "https://ghe.example.com", url: "https://ghe.example.com",
}); });
t.deepEqual({ type: "ghes", version: "2.0" }, v2); t.deepEqual({ type: util.GitHubVariant.GHES, version: "2.0" }, v2);
mockGetMetaVersionHeader("GitHub AE");
const ghae = await util.getGitHubVersion({
auth: "",
url: "https://example.githubenterprise.com",
});
t.deepEqual({ type: util.GitHubVariant.GHAE }, ghae);
mockGetMetaVersionHeader(undefined); mockGetMetaVersionHeader(undefined);
const v3 = await util.getGitHubVersion({ const v3 = await util.getGitHubVersion({
auth: "", auth: "",
url: "https://ghe.example.com", url: "https://ghe.example.com",
}); });
t.deepEqual({ type: "dotcom" }, v3); t.deepEqual({ type: util.GitHubVariant.DOTCOM }, v3);
}); });
ava_1.default("getGitHubAuth", async (t) => {
const msgs = [];
const mockLogger = {
warning: (msg) => msgs.push(msg),
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
t.throwsAsync(async () => util.getGitHubAuth(mockLogger, "abc", true));
process.env.GITHUB_TOKEN = "123";
t.is("123", await util.getGitHubAuth(mockLogger, undefined, undefined));
t.is(msgs.length, 0);
t.is("abc", await util.getGitHubAuth(mockLogger, "abc", undefined));
t.is(msgs.length, 1); // warning expected
msgs.length = 0;
await mockStdInForAuth(t, mockLogger, "def", "def");
await mockStdInForAuth(t, mockLogger, "def", "", "def");
await mockStdInForAuth(t, mockLogger, "def", "def\n some extra garbage", "ghi");
await mockStdInForAuth(t, mockLogger, "defghi", "def", "ghi\n123");
await mockStdInForAuthExpectError(t, mockLogger, "");
await mockStdInForAuthExpectError(t, mockLogger, "", " ", "abc");
await mockStdInForAuthExpectError(t, mockLogger, " def\n some extra garbage", "ghi");
t.is(msgs.length, 0);
});
async function mockStdInForAuth(t, mockLogger, expected, ...text) {
const stdin = stream.Readable.from(text);
t.is(expected, await util.getGitHubAuth(mockLogger, undefined, true, stdin));
}
async function mockStdInForAuthExpectError(t, mockLogger, ...text) {
const stdin = stream.Readable.from(text);
await t.throwsAsync(async () => util.getGitHubAuth(mockLogger, undefined, true, stdin));
}
//# sourceMappingURL=util.test.js.map //# sourceMappingURL=util.test.js.map

File diff suppressed because one or more lines are too long

1
node_modules/.bin/glob-hash generated vendored
View File

@@ -1 +0,0 @@
../glob-hash/bin/glob-hash

5555
node_modules/.package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,40 +1,16 @@
{ {
"_args": [ "name": "@actions/core",
[ "version": "1.2.6",
"@actions/core@1.2.6",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/core@1.2.6",
"_id": "@actions/core@1.2.6",
"_inBundle": false,
"_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==",
"_location": "/@actions/core",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/core@1.2.6",
"name": "@actions/core",
"escapedName": "@actions%2fcore",
"scope": "@actions",
"rawSpec": "1.2.6",
"saveSpec": null,
"fetchSpec": "1.2.6"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
"_spec": "1.2.6",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"description": "Actions core lib", "description": "Actions core lib",
"devDependencies": { "keywords": [
"@types/node": "^12.0.2" "github",
}, "actions",
"core"
],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
"license": "MIT",
"main": "lib/core.js",
"types": "lib/core.d.ts",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -43,15 +19,6 @@
"lib", "lib",
"!.DS_Store" "!.DS_Store"
], ],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
"keywords": [
"github",
"actions",
"core"
],
"license": "MIT",
"main": "lib/core.js",
"name": "@actions/core",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -65,6 +32,10 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"types": "lib/core.d.ts", "bugs": {
"version": "1.2.6" "url": "https://github.com/actions/toolkit/issues"
},
"devDependencies": {
"@types/node": "^12.0.2"
}
} }

View File

@@ -1,41 +1,15 @@
{ {
"_args": [ "name": "@actions/exec",
[ "version": "1.0.1",
"@actions/exec@1.0.1",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/exec@1.0.1",
"_id": "@actions/exec@1.0.1",
"_inBundle": false,
"_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==",
"_location": "/@actions/exec",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/exec@1.0.1",
"name": "@actions/exec",
"escapedName": "@actions%2fexec",
"scope": "@actions",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/",
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"description": "Actions exec lib", "description": "Actions exec lib",
"devDependencies": { "keywords": [
"@actions/io": "^1.0.1" "github",
}, "actions",
"exec"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
"license": "MIT",
"main": "lib/exec.js",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -43,16 +17,6 @@
"files": [ "files": [
"lib" "lib"
], ],
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52",
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
"keywords": [
"github",
"actions",
"exec"
],
"license": "MIT",
"main": "lib/exec.js",
"name": "@actions/exec",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -64,5 +28,11 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"version": "1.0.1" "bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"devDependencies": {
"@actions/io": "^1.0.1"
},
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52"
} }

View File

@@ -1,47 +1,15 @@
{ {
"_args": [ "name": "@actions/github",
[ "version": "4.0.0",
"@actions/github@4.0.0",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/github@4.0.0",
"_id": "@actions/github@4.0.0",
"_inBundle": false,
"_integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==",
"_location": "/@actions/github",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/github@4.0.0",
"name": "@actions/github",
"escapedName": "@actions%2fgithub",
"scope": "@actions",
"rawSpec": "4.0.0",
"saveSpec": null,
"fetchSpec": "4.0.0"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz",
"_spec": "4.0.0",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
"@actions/http-client": "^1.0.8",
"@octokit/core": "^3.0.0",
"@octokit/plugin-paginate-rest": "^2.2.3",
"@octokit/plugin-rest-endpoint-methods": "^4.0.0"
},
"description": "Actions github lib", "description": "Actions github lib",
"devDependencies": { "keywords": [
"jest": "^25.1.0", "github",
"proxy": "^1.0.1" "actions"
}, ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/github",
"license": "MIT",
"main": "lib/github.js",
"types": "lib/github.d.ts",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -50,14 +18,6 @@
"lib", "lib",
"!.DS_Store" "!.DS_Store"
], ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/github",
"keywords": [
"github",
"actions"
],
"license": "MIT",
"main": "lib/github.js",
"name": "@actions/github",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -68,12 +28,23 @@
}, },
"scripts": { "scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate", "audit-moderate": "npm install && npm audit --audit-level=moderate",
"test": "jest",
"build": "tsc", "build": "tsc",
"format": "prettier --write **/*.ts", "format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts", "format-check": "prettier --check **/*.ts",
"test": "jest",
"tsc": "tsc" "tsc": "tsc"
}, },
"types": "lib/github.d.ts", "bugs": {
"version": "4.0.0" "url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
"@actions/http-client": "^1.0.8",
"@octokit/core": "^3.0.0",
"@octokit/plugin-paginate-rest": "^2.2.3",
"@octokit/plugin-rest-endpoint-methods": "^4.0.0"
},
"devDependencies": {
"jest": "^25.1.0",
"proxy": "^1.0.1"
}
} }

View File

@@ -1,51 +1,7 @@
{ {
"_args": [ "name": "tunnel",
[ "version": "0.0.6",
"tunnel@0.0.6",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "tunnel@0.0.6",
"_id": "tunnel@0.0.6",
"_inBundle": false,
"_integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"_location": "/@actions/http-client/tunnel",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "tunnel@0.0.6",
"name": "tunnel",
"escapedName": "tunnel",
"rawSpec": "0.0.6",
"saveSpec": null,
"fetchSpec": "0.0.6"
},
"_requiredBy": [
"/@actions/http-client"
],
"_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"_spec": "0.0.6",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Koichi Kobayashi",
"email": "koichik@improvement.jp"
},
"bugs": {
"url": "https://github.com/koichik/node-tunnel/issues"
},
"description": "Node HTTP/HTTPS Agents for tunneling proxies", "description": "Node HTTP/HTTPS Agents for tunneling proxies",
"devDependencies": {
"mocha": "^5.2.0",
"should": "^13.2.3"
},
"directories": {
"lib": "./lib"
},
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
},
"homepage": "https://github.com/koichik/node-tunnel/",
"keywords": [ "keywords": [
"http", "http",
"https", "https",
@@ -53,15 +9,26 @@
"proxy", "proxy",
"tunnel" "tunnel"
], ],
"homepage": "https://github.com/koichik/node-tunnel/",
"bugs": "https://github.com/koichik/node-tunnel/issues",
"license": "MIT", "license": "MIT",
"author": "Koichi Kobayashi <koichik@improvement.jp>",
"main": "./index.js", "main": "./index.js",
"name": "tunnel", "directories": {
"lib": "./lib"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/koichik/node-tunnel.git" "url": "https://github.com/koichik/node-tunnel.git"
}, },
"scripts": { "scripts": {
"test": "mocha" "test": "mocha"
}, },
"version": "0.0.6" "devDependencies": {
"mocha": "^5.2.0",
"should": "^13.2.3"
},
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
} }

View File

@@ -1,45 +1,29 @@
{ {
"_args": [ "name": "@actions/http-client",
[ "version": "1.0.8",
"@actions/http-client@1.0.8", "description": "Actions Http Client",
"/home/marco/repos/github/codeql-action" "main": "index.js",
] "scripts": {
], "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out",
"_from": "@actions/http-client@1.0.8", "test": "jest",
"_id": "@actions/http-client@1.0.8", "format": "prettier --write *.ts && prettier --write **/*.ts",
"_inBundle": false, "format-check": "prettier --check *.ts && prettier --check **/*.ts",
"_integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==", "audit-check": "npm audit --audit-level=moderate"
"_location": "/@actions/http-client",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/http-client@1.0.8",
"name": "@actions/http-client",
"escapedName": "@actions%2fhttp-client",
"scope": "@actions",
"rawSpec": "1.0.8",
"saveSpec": null,
"fetchSpec": "1.0.8"
}, },
"_requiredBy": [ "repository": {
"/", "type": "git",
"/@actions/github", "url": "git+https://github.com/actions/http-client.git"
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz",
"_spec": "1.0.8",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "GitHub, Inc."
}, },
"keywords": [
"Actions",
"Http"
],
"author": "GitHub, Inc.",
"license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/actions/http-client/issues" "url": "https://github.com/actions/http-client/issues"
}, },
"dependencies": { "homepage": "https://github.com/actions/http-client#readme",
"tunnel": "0.0.6"
},
"description": "Actions Http Client",
"devDependencies": { "devDependencies": {
"@types/jest": "^25.1.4", "@types/jest": "^25.1.4",
"@types/node": "^12.12.31", "@types/node": "^12.12.31",
@@ -49,24 +33,7 @@
"ts-jest": "^25.2.1", "ts-jest": "^25.2.1",
"typescript": "^3.8.3" "typescript": "^3.8.3"
}, },
"homepage": "https://github.com/actions/http-client#readme", "dependencies": {
"keywords": [ "tunnel": "0.0.6"
"Actions", }
"Http"
],
"license": "MIT",
"main": "index.js",
"name": "@actions/http-client",
"repository": {
"type": "git",
"url": "git+https://github.com/actions/http-client.git"
},
"scripts": {
"audit-check": "npm audit --audit-level=moderate",
"build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out",
"format": "prettier --write *.ts && prettier --write **/*.ts",
"format-check": "prettier --check *.ts && prettier --check **/*.ts",
"test": "jest"
},
"version": "1.0.8"
} }

View File

@@ -1,37 +1,15 @@
{ {
"_args": [ "name": "@actions/io",
[ "version": "1.0.1",
"@actions/io@1.0.1",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/io@1.0.1",
"_id": "@actions/io@1.0.1",
"_inBundle": false,
"_integrity": "sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA==",
"_location": "/@actions/io",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/io@1.0.1",
"name": "@actions/io",
"escapedName": "@actions%2fio",
"scope": "@actions",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"description": "Actions io lib", "description": "Actions io lib",
"keywords": [
"github",
"actions",
"io"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/io",
"license": "MIT",
"main": "lib/io.js",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -39,16 +17,6 @@
"files": [ "files": [
"lib" "lib"
], ],
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52",
"homepage": "https://github.com/actions/toolkit/tree/master/packages/io",
"keywords": [
"github",
"actions",
"io"
],
"license": "MIT",
"main": "lib/io.js",
"name": "@actions/io",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -60,5 +28,8 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"version": "1.0.1" "bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52"
} }

View File

@@ -1,40 +1,16 @@
{ {
"_args": [ "name": "@actions/core",
[ "version": "1.2.4",
"@actions/core@1.2.4",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/core@1.2.4",
"_id": "@actions/core@1.2.4",
"_inBundle": false,
"_integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==",
"_location": "/@actions/tool-cache/@actions/core",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/core@1.2.4",
"name": "@actions/core",
"escapedName": "@actions%2fcore",
"scope": "@actions",
"rawSpec": "1.2.4",
"saveSpec": null,
"fetchSpec": "1.2.4"
},
"_requiredBy": [
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz",
"_spec": "1.2.4",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"description": "Actions core lib", "description": "Actions core lib",
"devDependencies": { "keywords": [
"@types/node": "^12.0.2" "github",
}, "actions",
"core"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"license": "MIT",
"main": "lib/core.js",
"types": "lib/core.d.ts",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -42,15 +18,6 @@
"files": [ "files": [
"lib" "lib"
], ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"keywords": [
"github",
"actions",
"core"
],
"license": "MIT",
"main": "lib/core.js",
"name": "@actions/core",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -64,6 +31,10 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"types": "lib/core.d.ts", "bugs": {
"version": "1.2.4" "url": "https://github.com/actions/toolkit/issues"
},
"devDependencies": {
"@types/node": "^12.0.2"
}
} }

View File

@@ -1,63 +1,28 @@
{ {
"_args": [ "name": "semver",
[ "version": "6.3.0",
"semver@6.3.0",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "semver@6.3.0",
"_id": "semver@6.3.0",
"_inBundle": false,
"_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"_location": "/@actions/tool-cache/semver",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "semver@6.3.0",
"name": "semver",
"escapedName": "semver",
"rawSpec": "6.3.0",
"saveSpec": null,
"fetchSpec": "6.3.0"
},
"_requiredBy": [
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"_spec": "6.3.0",
"_where": "/home/marco/repos/github/codeql-action",
"bin": {
"semver": "bin/semver.js"
},
"bugs": {
"url": "https://github.com/npm/node-semver/issues"
},
"description": "The semantic version parser used by npm.", "description": "The semantic version parser used by npm.",
"main": "semver.js",
"scripts": {
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --follow-tags"
},
"devDependencies": { "devDependencies": {
"tap": "^14.3.1" "tap": "^14.3.1"
}, },
"license": "ISC",
"repository": "https://github.com/npm/node-semver",
"bin": {
"semver": "./bin/semver.js"
},
"files": [ "files": [
"bin", "bin",
"range.bnf", "range.bnf",
"semver.js" "semver.js"
], ],
"homepage": "https://github.com/npm/node-semver#readme",
"license": "ISC",
"main": "semver.js",
"name": "semver",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/node-semver.git"
},
"scripts": {
"postpublish": "git push origin --follow-tags",
"postversion": "npm publish",
"preversion": "npm test",
"test": "tap"
},
"tap": { "tap": {
"check-coverage": true "check-coverage": true
}, }
"version": "6.3.0"
} }

View File

@@ -1,71 +1,21 @@
{ {
"_args": [ "name": "uuid",
[ "version": "3.4.0",
"uuid@3.4.0", "description": "RFC4122 (v1, v4, and v5) UUIDs",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "uuid@3.4.0",
"_id": "uuid@3.4.0",
"_inBundle": false,
"_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"_location": "/@actions/tool-cache/uuid",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "uuid@3.4.0",
"name": "uuid",
"escapedName": "uuid",
"rawSpec": "3.4.0",
"saveSpec": null,
"fetchSpec": "3.4.0"
},
"_requiredBy": [
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"_spec": "3.4.0",
"_where": "/home/marco/repos/github/codeql-action",
"bin": {
"uuid": "bin/uuid"
},
"browser": {
"./lib/rng.js": "./lib/rng-browser.js",
"./lib/sha1.js": "./lib/sha1-browser.js",
"./lib/md5.js": "./lib/md5-browser.js"
},
"bugs": {
"url": "https://github.com/uuidjs/uuid/issues"
},
"commitlint": { "commitlint": {
"extends": [ "extends": [
"@commitlint/config-conventional" "@commitlint/config-conventional"
] ]
}, },
"contributors": [ "keywords": [
{ "uuid",
"name": "Robert Kieffer", "guid",
"email": "robert@broofa.com" "rfc4122"
},
{
"name": "Christoph Tavan",
"email": "dev@tavan.de"
},
{
"name": "AJ ONeal",
"email": "coolaj86@gmail.com"
},
{
"name": "Vincent Voyer",
"email": "vincent@zeroload.net"
},
{
"name": "Roman Shtylman",
"email": "shtylman@gmail.com"
}
], ],
"description": "RFC4122 (v1, v4, and v5) UUIDs", "license": "MIT",
"bin": {
"uuid": "./bin/uuid"
},
"devDependencies": { "devDependencies": {
"@commitlint/cli": "~8.2.0", "@commitlint/cli": "~8.2.0",
"@commitlint/config-conventional": "~8.2.0", "@commitlint/config-conventional": "~8.2.0",
@@ -75,29 +25,25 @@
"runmd": "1.2.1", "runmd": "1.2.1",
"standard-version": "7.0.0" "standard-version": "7.0.0"
}, },
"homepage": "https://github.com/uuidjs/uuid#readme", "scripts": {
"lint": "eslint .",
"test": "npm run lint && mocha test/test.js",
"md": "runmd --watch --output=README.md README_js.md",
"release": "standard-version",
"prepare": "runmd --output=README.md README_js.md"
},
"browser": {
"./lib/rng.js": "./lib/rng-browser.js",
"./lib/sha1.js": "./lib/sha1-browser.js",
"./lib/md5.js": "./lib/md5-browser.js"
},
"repository": {
"type": "git",
"url": "https://github.com/uuidjs/uuid.git"
},
"husky": { "husky": {
"hooks": { "hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
} }
}, }
"keywords": [
"uuid",
"guid",
"rfc4122"
],
"license": "MIT",
"name": "uuid",
"repository": {
"type": "git",
"url": "git+https://github.com/uuidjs/uuid.git"
},
"scripts": {
"lint": "eslint .",
"md": "runmd --watch --output=README.md README_js.md",
"prepare": "runmd --output=README.md README_js.md",
"release": "standard-version",
"test": "npm run lint && mocha test/test.js"
},
"version": "3.4.0"
} }

View File

@@ -1,51 +1,16 @@
{ {
"_args": [ "name": "@actions/tool-cache",
[ "version": "1.5.5",
"@actions/tool-cache@1.5.5",
"/home/marco/repos/github/codeql-action"
]
],
"_from": "@actions/tool-cache@1.5.5",
"_id": "@actions/tool-cache@1.5.5",
"_inBundle": false,
"_integrity": "sha512-y/YO37BOaXzOEHpvoGZDLCwvg6XZWQ7Ala4Np4xzrKD1r48mff+K/GAmzXMejnApU7kgqC6lL/aCKTZDCrhdmw==",
"_location": "/@actions/tool-cache",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/tool-cache@1.5.5",
"name": "@actions/tool-cache",
"escapedName": "@actions%2ftool-cache",
"scope": "@actions",
"rawSpec": "1.5.5",
"saveSpec": null,
"fetchSpec": "1.5.5"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.5.tgz",
"_spec": "1.5.5",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/exec": "^1.0.0",
"@actions/http-client": "^1.0.8",
"@actions/io": "^1.0.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
},
"description": "Actions tool-cache lib", "description": "Actions tool-cache lib",
"devDependencies": { "keywords": [
"@types/nock": "^10.0.3", "github",
"@types/semver": "^6.0.0", "actions",
"@types/uuid": "^3.4.4", "exec"
"nock": "^10.0.6" ],
}, "homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache",
"license": "MIT",
"main": "lib/tool-cache.js",
"types": "lib/tool-cache.d.ts",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -54,15 +19,6 @@
"lib", "lib",
"scripts" "scripts"
], ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache",
"keywords": [
"github",
"actions",
"exec"
],
"license": "MIT",
"main": "lib/tool-cache.js",
"name": "@actions/tool-cache",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@@ -76,6 +32,21 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"types": "lib/tool-cache.d.ts", "bugs": {
"version": "1.5.5" "url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/exec": "^1.0.0",
"@actions/http-client": "^1.0.8",
"@actions/io": "^1.0.1",
"semver": "^6.1.0",
"uuid": "^3.3.2"
},
"devDependencies": {
"@types/nock": "^10.0.3",
"@types/semver": "^6.0.0",
"@types/uuid": "^3.4.4",
"nock": "^10.0.6"
}
} }

View File

@@ -1,55 +1,28 @@
{ {
"_args": [ "name": "escape-string-regexp",
[ "version": "2.0.0",
"escape-string-regexp@2.0.0", "description": "Escape RegExp special characters",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "repository": "sindresorhus/escape-string-regexp",
],
"_development": true,
"_from": "escape-string-regexp@2.0.0",
"_id": "escape-string-regexp@2.0.0",
"_inBundle": false,
"_integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"_location": "/@ava/typescript/escape-string-regexp",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "escape-string-regexp@2.0.0",
"name": "escape-string-regexp",
"escapedName": "escape-string-regexp",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"/@ava/typescript"
],
"_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"_spec": "2.0.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "sindresorhus.com" "url": "sindresorhus.com"
}, },
"bugs": { "maintainers": [
"url": "https://github.com/sindresorhus/escape-string-regexp/issues" "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
}, "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
"description": "Escape RegExp special characters", ],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"engines": { "engines": {
"node": ">=8" "node": ">=8"
}, },
"scripts": {
"test": "xo && ava && tsd"
},
"files": [ "files": [
"index.js", "index.js",
"index.d.ts" "index.d.ts"
], ],
"homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
"keywords": [ "keywords": [
"escape", "escape",
"regex", "regex",
@@ -62,26 +35,9 @@
"special", "special",
"characters" "characters"
], ],
"license": "MIT", "devDependencies": {
"maintainers": [ "ava": "^1.4.1",
{ "tsd": "^0.7.2",
"name": "Sindre Sorhus", "xo": "^0.24.0"
"email": "sindresorhus@gmail.com", }
"url": "sindresorhus.com"
},
{
"name": "Joshua Boy Nicolai Appelman",
"email": "joshua@jbna.nl",
"url": "jbna.nl"
}
],
"name": "escape-string-regexp",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "2.0.0"
} }

View File

@@ -1,64 +1,32 @@
{ {
"_args": [ "name": "@ava/typescript",
[ "version": "1.1.1",
"@ava/typescript@1.1.1",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@ava/typescript@1.1.1",
"_id": "@ava/typescript@1.1.1",
"_inBundle": false,
"_integrity": "sha512-KbLUAe2cWXK63WLK6LnOJonjwEDU/8MNXCOA1ooX/YFZgKRmeAD1kZu+2K0ks5fnOCEcckNQAooyBNGdZUmMQA==",
"_location": "/@ava/typescript",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@ava/typescript@1.1.1",
"name": "@ava/typescript",
"escapedName": "@ava%2ftypescript",
"scope": "@ava",
"rawSpec": "1.1.1",
"saveSpec": null,
"fetchSpec": "1.1.1"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-1.1.1.tgz",
"_spec": "1.1.1",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Mark Wubben",
"url": "https://novemberborn.net"
},
"bugs": {
"url": "https://github.com/avajs/typescript/issues"
},
"dependencies": {
"escape-string-regexp": "^2.0.0"
},
"description": "TypeScript provider for AVA", "description": "TypeScript provider for AVA",
"devDependencies": {
"ava": "^3.0.0",
"execa": "^4.0.0",
"nyc": "^15.0.0",
"xo": "^0.25.3"
},
"engines": { "engines": {
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0" "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
}, },
"files": [ "files": [
"index.js" "index.js"
], ],
"homepage": "https://github.com/avajs/typescript#readme", "author": "Mark Wubben (https://novemberborn.net)",
"repository": "avajs/typescript",
"license": "MIT",
"keywords": [ "keywords": [
"ava", "ava",
"typescript" "typescript"
], ],
"license": "MIT", "scripts": {
"name": "@ava/typescript", "test": "xo && nyc ava"
},
"dependencies": {
"escape-string-regexp": "^2.0.0"
},
"devDependencies": {
"ava": "^3.0.0",
"execa": "^4.0.0",
"nyc": "^15.0.0",
"xo": "^0.25.3"
},
"nyc": { "nyc": {
"reporter": [ "reporter": [
"html", "html",
@@ -66,14 +34,6 @@
"text" "text"
] ]
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/avajs/typescript.git"
},
"scripts": {
"test": "xo && nyc ava"
},
"version": "1.1.1",
"xo": { "xo": {
"rules": { "rules": {
"import/order": "off" "import/order": "off"

View File

@@ -1,58 +1,21 @@
{ {
"_args": [ "name": "@babel/code-frame",
[ "version": "7.5.5",
"@babel/code-frame@7.5.5", "description": "Generate errors that contain a code frame that point to source locations.",
"/home/marco/repos/github/codeql-action" "author": "Sebastian McKenzie <sebmck@gmail.com>",
] "homepage": "https://babeljs.io/",
], "license": "MIT",
"_development": true, "publishConfig": {
"_from": "@babel/code-frame@7.5.5", "access": "public"
"_id": "@babel/code-frame@7.5.5",
"_inBundle": false,
"_integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"_location": "/@babel/code-frame",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/code-frame@7.5.5",
"name": "@babel/code-frame",
"escapedName": "@babel%2fcode-frame",
"scope": "@babel",
"rawSpec": "7.5.5",
"saveSpec": null,
"fetchSpec": "7.5.5"
},
"_requiredBy": [
"/eslint",
"/read-pkg/parse-json"
],
"_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"_spec": "7.5.5",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
}, },
"repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame",
"main": "lib/index.js",
"dependencies": { "dependencies": {
"@babel/highlight": "^7.0.0" "@babel/highlight": "^7.0.0"
}, },
"description": "Generate errors that contain a code frame that point to source locations.",
"devDependencies": { "devDependencies": {
"chalk": "^2.0.0", "chalk": "^2.0.0",
"strip-ansi": "^4.0.0" "strip-ansi": "^4.0.0"
}, },
"gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43"
"homepage": "https://babeljs.io/",
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/code-frame",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
},
"version": "7.5.5"
} }

View File

@@ -1,58 +1,22 @@
{ {
"_args": [ "name": "@babel/highlight",
[ "version": "7.5.0",
"@babel/highlight@7.5.0", "description": "Syntax highlight JavaScript strings for output in terminals.",
"/home/marco/repos/github/codeql-action" "author": "suchipi <me@suchipi.com>",
] "homepage": "https://babeljs.io/",
], "license": "MIT",
"_development": true, "publishConfig": {
"_from": "@babel/highlight@7.5.0", "access": "public"
"_id": "@babel/highlight@7.5.0",
"_inBundle": false,
"_integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"_location": "/@babel/highlight",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/highlight@7.5.0",
"name": "@babel/highlight",
"escapedName": "@babel%2fhighlight",
"scope": "@babel",
"rawSpec": "7.5.0",
"saveSpec": null,
"fetchSpec": "7.5.0"
},
"_requiredBy": [
"/@babel/code-frame"
],
"_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"_spec": "7.5.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "suchipi",
"email": "me@suchipi.com"
}, },
"repository": "https://github.com/babel/babel/tree/master/packages/babel-highlight",
"main": "lib/index.js",
"dependencies": { "dependencies": {
"chalk": "^2.0.0", "chalk": "^2.0.0",
"esutils": "^2.0.2", "esutils": "^2.0.2",
"js-tokens": "^4.0.0" "js-tokens": "^4.0.0"
}, },
"description": "Syntax highlight JavaScript strings for output in terminals.",
"devDependencies": { "devDependencies": {
"strip-ansi": "^4.0.0" "strip-ansi": "^4.0.0"
}, },
"gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4"
"homepage": "https://babeljs.io/",
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/highlight",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-highlight"
},
"version": "7.5.0"
} }

View File

@@ -1,61 +1,32 @@
{ {
"_args": [ "name": "@chrisgavin/safe-which",
[ "version": "1.0.2",
"@chrisgavin/safe-which@1.0.2", "description": "A NodeJS library to guard against Windows binary planting attacks.",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "homepage": "https://github.com/chrisgavin/safe-which/",
], "publishConfig": {
"_from": "@chrisgavin/safe-which@1.0.2", "access": "public"
"_id": "@chrisgavin/safe-which@1.0.2",
"_inBundle": false,
"_integrity": "sha512-xImXYK6iJvLEDMevGCs5s05iKoFn3ARFShBswRFeWeHp6P1Z0jlYmKcK5+M2TtDoWuz45ay1unmNvV/8t66F2g==",
"_location": "/@chrisgavin/safe-which",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@chrisgavin/safe-which@1.0.2",
"name": "@chrisgavin/safe-which",
"escapedName": "@chrisgavin%2fsafe-which",
"scope": "@chrisgavin",
"rawSpec": "1.0.2",
"saveSpec": null,
"fetchSpec": "1.0.2"
}, },
"_requiredBy": [ "main": "./build/index.js",
"/" "types": "./build/index.d.ts",
], "scripts": {
"_resolved": "https://registry.npmjs.org/@chrisgavin/safe-which/-/safe-which-1.0.2.tgz", "build": "tsc",
"_spec": "1.0.2", "pretest": "npm install && npm run build",
"_where": "/home/marco/repos/github/codeql-action", "test": "ava --verbose --serial ./src/**",
"ava": { "prepublishOnly": "npm install && npm run build && npm version --allow-same-version=true --git-tag-version=false ${GITHUB_REF#refs/tags/}"
"typescript": {
"rewritePaths": {
"./src/": "./build/"
}
}
}, },
"dependencies": {}, "dependencies": {},
"description": "A NodeJS library to guard against Windows binary planting attacks.",
"devDependencies": { "devDependencies": {
"@ava/typescript": "^1.1.1", "@ava/typescript": "^1.1.1",
"@types/node": "^14.14.7", "@types/node": "^14.14.7",
"ava": "^3.13.0", "ava": "^3.13.0",
"typescript": "^3.8.3" "typescript": "^3.8.3"
}, },
"homepage": "https://github.com/chrisgavin/safe-which/", "ava": {
"license": "MIT", "typescript": {
"main": "./build/index.js", "rewritePaths": {
"name": "@chrisgavin/safe-which", "./src/": "./build/"
"publishConfig": { }
"access": "public" }
}, }
"scripts": {
"build": "tsc",
"prepublishOnly": "npm install && npm run build && npm version --allow-same-version=true --git-tag-version=false ${GITHUB_REF#refs/tags/}",
"pretest": "npm install && npm run build",
"test": "ava --verbose --serial ./src/**"
},
"types": "./build/index.d.ts",
"version": "1.0.2"
} }

View File

@@ -1,53 +1,23 @@
{ {
"_args": [ "name": "arrify",
[ "version": "1.0.1",
"arrify@1.0.1", "description": "Convert a value to an array",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "repository": "sindresorhus/arrify",
],
"_development": true,
"_from": "arrify@1.0.1",
"_id": "arrify@1.0.1",
"_inBundle": false,
"_integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"_location": "/@concordance/react/arrify",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "arrify@1.0.1",
"name": "arrify",
"escapedName": "arrify",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/@concordance/react"
],
"_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/home/marco/repos/github/codeql-action",
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "sindresorhus.com" "url": "sindresorhus.com"
}, },
"bugs": {
"url": "https://github.com/sindresorhus/arrify/issues"
},
"description": "Convert a value to an array",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
}, },
"scripts": {
"test": "xo && ava"
},
"files": [ "files": [
"index.js" "index.js"
], ],
"homepage": "https://github.com/sindresorhus/arrify#readme",
"keywords": [ "keywords": [
"array", "array",
"arr", "arr",
@@ -56,14 +26,8 @@
"convert", "convert",
"value" "value"
], ],
"license": "MIT", "devDependencies": {
"name": "arrify", "ava": "*",
"repository": { "xo": "*"
"type": "git", }
"url": "git+https://github.com/sindresorhus/arrify.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "1.0.1"
} }

View File

@@ -1,63 +1,39 @@
{ {
"_args": [ "name": "@concordance/react",
[ "version": "2.0.0",
"@concordance/react@2.0.0", "description": "Compare, format, diff and serialize React trees with Concordance",
"/home/marco/repos/github/codeql-action" "main": "index.js",
] "files": [
"lib",
"index.js"
], ],
"_development": true, "engines": {
"_from": "@concordance/react@2.0.0", "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0"
"_id": "@concordance/react@2.0.0",
"_inBundle": false,
"_integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==",
"_location": "/@concordance/react",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@concordance/react@2.0.0",
"name": "@concordance/react",
"escapedName": "@concordance%2freact",
"scope": "@concordance",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
}, },
"_requiredBy": [ "scripts": {
"/ava" "build:fixtures": "babel --presets=module:@babel/preset-react,module:ava/stage-4 --out-dir=test/fixtures/react --extensions=.jsx test/fixtures/react",
], "lint": "as-i-preach",
"_resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", "pretest": "npm run -s build:fixtures",
"_spec": "2.0.0", "test": "npm run -s lint && nyc ava"
"_where": "/home/marco/repos/github/codeql-action",
"as-i-preach": {
"allowDevDependencies": [
"test/**/*.js",
"test/**/*.jsx"
],
"ignore": [
"test/fixtures/react/*.js"
]
}, },
"author": { "repository": {
"name": "Mark Wubben", "type": "git",
"url": "https://novemberborn.net/" "url": "git+https://github.com/concordancejs/react.git"
},
"ava": {
"babel": {
"testOptions": {
"presets": [
"module:@babel/preset-react"
]
}
}
}, },
"author": "Mark Wubben (https://novemberborn.net/)",
"license": "ISC",
"bugs": { "bugs": {
"url": "https://github.com/concordancejs/react/issues" "url": "https://github.com/concordancejs/react/issues"
}, },
"homepage": "https://github.com/concordancejs/react#readme",
"keywords": [
"concordance-plugin",
"concordance",
"react"
],
"dependencies": { "dependencies": {
"arrify": "^1.0.1" "arrify": "^1.0.1"
}, },
"description": "Compare, format, diff and serialize React trees with Concordance",
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.1.0", "@babel/cli": "^7.1.0",
"@babel/core": "^7.1.0", "@babel/core": "^7.1.0",
@@ -70,22 +46,24 @@
"react": "^16.5.2", "react": "^16.5.2",
"react-test-renderer": "^16.5.2" "react-test-renderer": "^16.5.2"
}, },
"engines": { "as-i-preach": {
"node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" "allowDevDependencies": [
"test/**/*.js",
"test/**/*.jsx"
],
"ignore": [
"test/fixtures/react/*.js"
]
},
"ava": {
"babel": {
"testOptions": {
"presets": [
"module:@babel/preset-react"
]
}
}
}, },
"files": [
"lib",
"index.js"
],
"homepage": "https://github.com/concordancejs/react#readme",
"keywords": [
"concordance-plugin",
"concordance",
"react"
],
"license": "ISC",
"main": "index.js",
"name": "@concordance/react",
"nyc": { "nyc": {
"reporter": [ "reporter": [
"html", "html",
@@ -93,16 +71,5 @@
"text" "text"
] ]
}, },
"repository": { "standard-engine": "@novemberborn/as-i-preach"
"type": "git",
"url": "git+https://github.com/concordancejs/react.git"
},
"scripts": {
"build:fixtures": "babel --presets=module:@babel/preset-react,module:ava/stage-4 --out-dir=test/fixtures/react --extensions=.jsx test/fixtures/react",
"lint": "as-i-preach",
"pretest": "npm run -s build:fixtures",
"test": "npm run -s lint && nyc ava"
},
"standard-engine": "@novemberborn/as-i-preach",
"version": "2.0.0"
} }

View File

@@ -1,40 +1,48 @@
{ {
"_args": [ "name": "ignore",
[ "version": "4.0.6",
"ignore@4.0.6", "description": "Ignore is a manager and filter for .gitignore rules.",
"/home/marco/repos/github/codeql-action" "files": [
] "legacy.js",
"index.js",
"index.d.ts",
"LICENSE-MIT"
], ],
"_development": true, "scripts": {
"_from": "ignore@4.0.6", "prepublish": "npm run build",
"_id": "ignore@4.0.6", "build": "babel -o legacy.js index.js",
"_inBundle": false, "test:lint": "eslint .",
"_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "test:tsc": "tsc ./test/ts/simple.ts",
"_location": "/@eslint/eslintrc/ignore", "test:git": "tap test/git-check-ignore.js",
"_phantomChildren": {}, "test:ignore": "tap test/ignore.js --coverage",
"_requested": { "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage",
"type": "version", "test": "npm run test-no-cov",
"registry": true, "posttest": "tap --coverage-report=html && codecov"
"raw": "ignore@4.0.6",
"name": "ignore",
"escapedName": "ignore",
"rawSpec": "4.0.6",
"saveSpec": null,
"fetchSpec": "4.0.6"
}, },
"_requiredBy": [ "repository": {
"/@eslint/eslintrc" "type": "git",
"url": "git@github.com:kaelzhang/node-ignore.git"
},
"keywords": [
"ignore",
".gitignore",
"gitignore",
"npmignore",
"rules",
"manager",
"filter",
"regexp",
"regex",
"fnmatch",
"glob",
"asterisks",
"regular-expression"
], ],
"_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "author": "kael",
"_spec": "4.0.6", "license": "MIT",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "kael"
},
"bugs": { "bugs": {
"url": "https://github.com/kaelzhang/node-ignore/issues" "url": "https://github.com/kaelzhang/node-ignore/issues"
}, },
"description": "Ignore is a manager and filter for .gitignore rules.",
"devDependencies": { "devDependencies": {
"babel-cli": "^6.26.0", "babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
@@ -52,45 +60,5 @@
}, },
"engines": { "engines": {
"node": ">= 4" "node": ">= 4"
}, }
"files": [
"legacy.js",
"index.js",
"index.d.ts",
"LICENSE-MIT"
],
"homepage": "https://github.com/kaelzhang/node-ignore#readme",
"keywords": [
"ignore",
".gitignore",
"gitignore",
"npmignore",
"rules",
"manager",
"filter",
"regexp",
"regex",
"fnmatch",
"glob",
"asterisks",
"regular-expression"
],
"license": "MIT",
"name": "ignore",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/kaelzhang/node-ignore.git"
},
"scripts": {
"build": "babel -o legacy.js index.js",
"posttest": "tap --coverage-report=html && codecov",
"prepublish": "npm run build",
"test": "npm run test-no-cov",
"test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage",
"test:git": "tap test/git-check-ignore.js",
"test:ignore": "tap test/ignore.js --coverage",
"test:lint": "eslint .",
"test:tsc": "tsc ./test/ts/simple.ts"
},
"version": "4.0.6"
} }

View File

@@ -1,57 +1,26 @@
{ {
"_args": [ "name": "strip-json-comments",
[ "version": "3.1.1",
"strip-json-comments@3.1.1", "description": "Strip comments from JSON. Lets you use comments in your JSON files!",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "repository": "sindresorhus/strip-json-comments",
], "funding": "https://github.com/sponsors/sindresorhus",
"_development": true,
"_from": "strip-json-comments@3.1.1",
"_id": "strip-json-comments@3.1.1",
"_inBundle": false,
"_integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"_location": "/@eslint/eslintrc/strip-json-comments",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "strip-json-comments@3.1.1",
"name": "strip-json-comments",
"escapedName": "strip-json-comments",
"rawSpec": "3.1.1",
"saveSpec": null,
"fetchSpec": "3.1.1"
},
"_requiredBy": [
"/@eslint/eslintrc"
],
"_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"_spec": "3.1.1",
"_where": "/home/marco/repos/github/codeql-action",
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com" "url": "https://sindresorhus.com"
}, },
"bugs": {
"url": "https://github.com/sindresorhus/strip-json-comments/issues"
},
"description": "Strip comments from JSON. Lets you use comments in your JSON files!",
"devDependencies": {
"ava": "^1.4.1",
"matcha": "^0.7.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"engines": { "engines": {
"node": ">=8" "node": ">=8"
}, },
"scripts": {
"test": "xo && ava && tsd",
"bench": "matcha benchmark.js"
},
"files": [ "files": [
"index.js", "index.js",
"index.d.ts" "index.d.ts"
], ],
"funding": "https://github.com/sponsors/sindresorhus",
"homepage": "https://github.com/sindresorhus/strip-json-comments#readme",
"keywords": [ "keywords": [
"json", "json",
"strip", "strip",
@@ -69,15 +38,10 @@
"environment", "environment",
"jsonc" "jsonc"
], ],
"license": "MIT", "devDependencies": {
"name": "strip-json-comments", "ava": "^1.4.1",
"repository": { "matcha": "^0.7.0",
"type": "git", "tsd": "^0.7.2",
"url": "git+https://github.com/sindresorhus/strip-json-comments.git" "xo": "^0.24.0"
}, }
"scripts": {
"bench": "matcha benchmark.js",
"test": "xo && ava && tsd"
},
"version": "3.1.1"
} }

View File

@@ -1,40 +1,46 @@
{ {
"_args": [ "name": "@eslint/eslintrc",
[ "version": "0.1.3",
"@eslint/eslintrc@0.1.3", "description": "The legacy ESLintRC config file format for ESLint",
"/home/marco/repos/github/codeql-action" "main": "lib/index.js",
] "files": [
"lib",
"conf",
"LICENSE"
], ],
"_development": true, "publishConfig": {
"_from": "@eslint/eslintrc@0.1.3", "access": "public"
"_id": "@eslint/eslintrc@0.1.3",
"_inBundle": false,
"_integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==",
"_location": "/@eslint/eslintrc",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@eslint/eslintrc@0.1.3",
"name": "@eslint/eslintrc",
"escapedName": "@eslint%2feslintrc",
"scope": "@eslint",
"rawSpec": "0.1.3",
"saveSpec": null,
"fetchSpec": "0.1.3"
}, },
"_requiredBy": [ "scripts": {
"/eslint" "lint": "eslint .",
"test": "mocha tests/lib/shared",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
},
"repository": "eslint/eslintrc",
"keywords": [
"ESLint",
"ESLintRC",
"Configuration"
], ],
"_resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", "author": "Nicholas C. Zakas",
"_spec": "0.1.3", "license": "MIT",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Nicholas C. Zakas"
},
"bugs": { "bugs": {
"url": "https://github.com/eslint/eslintrc/issues" "url": "https://github.com/eslint/eslintrc/issues"
}, },
"homepage": "https://github.com/eslint/eslintrc#readme",
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^7.7.0",
"eslint-config-eslint": "^6.0.0",
"eslint-plugin-jsdoc": "^22.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^3.1.2",
"mocha": "^8.1.1"
},
"dependencies": { "dependencies": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
"debug": "^4.1.1", "debug": "^4.1.1",
@@ -47,48 +53,7 @@
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
}, },
"description": "The legacy ESLintRC config file format for ESLint",
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^7.7.0",
"eslint-config-eslint": "^6.0.0",
"eslint-plugin-jsdoc": "^22.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^3.1.2",
"mocha": "^8.1.1"
},
"engines": { "engines": {
"node": "^10.12.0 || >=12.0.0" "node": "^10.12.0 || >=12.0.0"
}, }
"files": [
"lib",
"conf",
"LICENSE"
],
"homepage": "https://github.com/eslint/eslintrc#readme",
"keywords": [
"ESLint",
"ESLintRC",
"Configuration"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@eslint/eslintrc",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/eslint/eslintrc.git"
},
"scripts": {
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"generate-release": "eslint-generate-release",
"lint": "eslint .",
"publish-release": "eslint-publish-release",
"test": "mocha tests/lib/shared"
},
"version": "0.1.3"
} }

View File

@@ -1,43 +1,9 @@
{ {
"_args": [ "name": "@nodelib/fs.scandir",
[ "version": "2.1.3",
"@nodelib/fs.scandir@2.1.3",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@nodelib/fs.scandir@2.1.3",
"_id": "@nodelib/fs.scandir@2.1.3",
"_inBundle": false,
"_integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
"_location": "/@nodelib/fs.scandir",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nodelib/fs.scandir@2.1.3",
"name": "@nodelib/fs.scandir",
"escapedName": "@nodelib%2ffs.scandir",
"scope": "@nodelib",
"rawSpec": "2.1.3",
"saveSpec": null,
"fetchSpec": "2.1.3"
},
"_requiredBy": [
"/@nodelib/fs.walk"
],
"_resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
"_spec": "2.1.3",
"_where": "/home/marco/repos/github/codeql-action",
"dependencies": {
"@nodelib/fs.stat": "2.0.3",
"run-parallel": "^1.1.9"
},
"description": "List files and directories inside the specified directory", "description": "List files and directories inside the specified directory",
"engines": { "license": "MIT",
"node": ">= 8" "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir",
},
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf",
"keywords": [ "keywords": [
"NodeLib", "NodeLib",
"fs", "fs",
@@ -47,22 +13,23 @@
"readdir", "readdir",
"dirent" "dirent"
], ],
"license": "MIT", "engines": {
"main": "out/index.js", "node": ">= 8"
"name": "@nodelib/fs.scandir",
"repository": {
"type": "git",
"url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir"
}, },
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": { "scripts": {
"build": "npm run clean && npm run compile && npm run lint && npm test",
"clean": "rimraf {tsconfig.tsbuildinfo,out}", "clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .", "compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap", "compile:watch": "tsc -p . --watch --sourceMap",
"lint": "eslint \"src/**/*.ts\" --cache",
"test": "mocha \"out/**/*.spec.js\" -s 0", "test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch" "watch": "npm run clean && npm run compile:watch"
}, },
"typings": "out/index.d.ts", "dependencies": {
"version": "2.1.3" "@nodelib/fs.stat": "2.0.3",
"run-parallel": "^1.1.9"
},
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf"
} }

View File

@@ -1,40 +1,9 @@
{ {
"_args": [ "name": "@nodelib/fs.stat",
[ "version": "2.0.3",
"@nodelib/fs.stat@2.0.3",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@nodelib/fs.stat@2.0.3",
"_id": "@nodelib/fs.stat@2.0.3",
"_inBundle": false,
"_integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
"_location": "/@nodelib/fs.stat",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nodelib/fs.stat@2.0.3",
"name": "@nodelib/fs.stat",
"escapedName": "@nodelib%2ffs.stat",
"scope": "@nodelib",
"rawSpec": "2.0.3",
"saveSpec": null,
"fetchSpec": "2.0.3"
},
"_requiredBy": [
"/@nodelib/fs.scandir",
"/fast-glob"
],
"_resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
"_spec": "2.0.3",
"_where": "/home/marco/repos/github/codeql-action",
"description": "Get the status of a file with some features", "description": "Get the status of a file with some features",
"engines": { "license": "MIT",
"node": ">= 8" "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat",
},
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf",
"keywords": [ "keywords": [
"NodeLib", "NodeLib",
"fs", "fs",
@@ -42,22 +11,19 @@
"file system", "file system",
"stat" "stat"
], ],
"license": "MIT", "engines": {
"main": "out/index.js", "node": ">= 8"
"name": "@nodelib/fs.stat",
"repository": {
"type": "git",
"url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat"
}, },
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": { "scripts": {
"build": "npm run clean && npm run compile && npm run lint && npm test",
"clean": "rimraf {tsconfig.tsbuildinfo,out}", "clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .", "compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap", "compile:watch": "tsc -p . --watch --sourceMap",
"lint": "eslint \"src/**/*.ts\" --cache",
"test": "mocha \"out/**/*.spec.js\" -s 0", "test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch" "watch": "npm run clean && npm run compile:watch"
}, },
"typings": "out/index.d.ts", "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf"
"version": "2.0.3"
} }

View File

@@ -1,43 +1,9 @@
{ {
"_args": [ "name": "@nodelib/fs.walk",
[ "version": "1.2.4",
"@nodelib/fs.walk@1.2.4",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@nodelib/fs.walk@1.2.4",
"_id": "@nodelib/fs.walk@1.2.4",
"_inBundle": false,
"_integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
"_location": "/@nodelib/fs.walk",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nodelib/fs.walk@1.2.4",
"name": "@nodelib/fs.walk",
"escapedName": "@nodelib%2ffs.walk",
"scope": "@nodelib",
"rawSpec": "1.2.4",
"saveSpec": null,
"fetchSpec": "1.2.4"
},
"_requiredBy": [
"/fast-glob"
],
"_resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
"_spec": "1.2.4",
"_where": "/home/marco/repos/github/codeql-action",
"dependencies": {
"@nodelib/fs.scandir": "2.1.3",
"fastq": "^1.6.0"
},
"description": "A library for efficiently walking a directory recursively", "description": "A library for efficiently walking a directory recursively",
"engines": { "license": "MIT",
"node": ">= 8" "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk",
},
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf",
"keywords": [ "keywords": [
"NodeLib", "NodeLib",
"fs", "fs",
@@ -47,22 +13,23 @@
"scanner", "scanner",
"crawler" "crawler"
], ],
"license": "MIT", "engines": {
"main": "out/index.js", "node": ">= 8"
"name": "@nodelib/fs.walk",
"repository": {
"type": "git",
"url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk"
}, },
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": { "scripts": {
"build": "npm run clean && npm run compile && npm run lint && npm test",
"clean": "rimraf {tsconfig.tsbuildinfo,out}", "clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .", "compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap", "compile:watch": "tsc -p . --watch --sourceMap",
"lint": "eslint \"src/**/*.ts\" --cache",
"test": "mocha \"out/**/*.spec.js\" -s 0", "test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch" "watch": "npm run clean && npm run compile:watch"
}, },
"typings": "out/index.d.ts", "dependencies": {
"version": "1.2.4" "@nodelib/fs.scandir": "2.1.3",
"fastq": "^1.6.0"
},
"gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf"
} }

View File

@@ -1,40 +1,28 @@
{ {
"_args": [ "name": "@octokit/auth-token",
[ "description": "GitHub API token authentication for browsers and Node.js",
"@octokit/auth-token@2.4.2", "version": "2.4.2",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/auth-token@2.4.2", "pika": true,
"_id": "@octokit/auth-token@2.4.2", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", "github",
"_location": "/@octokit/auth-token", "octokit",
"_phantomChildren": {}, "authentication",
"_requested": { "api"
"type": "version",
"registry": true,
"raw": "@octokit/auth-token@2.4.2",
"name": "@octokit/auth-token",
"escapedName": "@octokit%2fauth-token",
"scope": "@octokit",
"rawSpec": "2.4.2",
"saveSpec": null,
"fetchSpec": "2.4.2"
},
"_requiredBy": [
"/@octokit/core"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", "homepage": "https://github.com/octokit/auth-token.js#readme",
"_spec": "2.4.2",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/auth-token.js/issues" "url": "https://github.com/octokit/auth-token.js/issues"
}, },
"repository": "https://github.com/octokit/auth-token.js",
"dependencies": { "dependencies": {
"@octokit/types": "^5.0.0" "@octokit/types": "^5.0.0"
}, },
"description": "GitHub API token authentication for browsers and Node.js",
"devDependencies": { "devDependencies": {
"@octokit/core": "^2.2.0", "@octokit/core": "^2.2.0",
"@octokit/request": "^5.3.0", "@octokit/request": "^5.3.0",
@@ -50,31 +38,11 @@
"ts-jest": "^25.1.0", "ts-jest": "^25.1.0",
"typescript": "^3.7.2" "typescript": "^3.7.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/auth-token.js#readme",
"keywords": [
"github",
"octokit",
"authentication",
"api"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/auth-token",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/auth-token.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "2.4.2" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,36 +1,22 @@
{ {
"_args": [ "name": "@octokit/core",
[ "description": "Extendable client for GitHub's REST & GraphQL APIs",
"@octokit/core@3.1.2", "version": "3.1.2",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/core@3.1.2", "pika": true,
"_id": "@octokit/core@3.1.2", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw==", "octokit",
"_location": "/@octokit/core", "github",
"_phantomChildren": {}, "api",
"_requested": { "sdk",
"type": "version", "toolkit"
"registry": true,
"raw": "@octokit/core@3.1.2",
"name": "@octokit/core",
"escapedName": "@octokit%2fcore",
"scope": "@octokit",
"rawSpec": "3.1.2",
"saveSpec": null,
"fetchSpec": "3.1.2"
},
"_requiredBy": [
"/@actions/github"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.1.2.tgz", "repository": "https://github.com/octokit/core.js",
"_spec": "3.1.2",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/octokit/core.js/issues"
},
"dependencies": { "dependencies": {
"@octokit/auth-token": "^2.4.0", "@octokit/auth-token": "^2.4.0",
"@octokit/graphql": "^4.3.1", "@octokit/graphql": "^4.3.1",
@@ -39,7 +25,6 @@
"before-after-hook": "^2.1.0", "before-after-hook": "^2.1.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"description": "Extendable client for GitHub's REST & GraphQL APIs",
"devDependencies": { "devDependencies": {
"@octokit/auth": "^2.0.0", "@octokit/auth": "^2.0.0",
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
@@ -62,32 +47,11 @@
"ts-jest": "^26.1.3", "ts-jest": "^26.1.3",
"typescript": "^3.5.3" "typescript": "^3.5.3"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/core.js#readme",
"keywords": [
"octokit",
"github",
"api",
"sdk",
"toolkit"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/core",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/core.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "3.1.2" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,61 +1,45 @@
{ {
"_args": [ "name": "is-plain-object",
[ "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).",
"is-plain-object@5.0.0", "version": "5.0.0",
"/home/marco/repos/github/codeql-action" "homepage": "https://github.com/jonschlinkert/is-plain-object",
] "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Osman Nuri Okumuş (http://onokumus.com)",
"Steven Vachon (https://svachon.com)",
"(https://github.com/wtgtybhertgeghgtwtg)",
"Bogdan Chadkin (https://github.com/TrySound)"
], ],
"_from": "is-plain-object@5.0.0", "repository": "jonschlinkert/is-plain-object",
"_id": "is-plain-object@5.0.0",
"_inBundle": false,
"_integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"_location": "/@octokit/endpoint/is-plain-object",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-plain-object@5.0.0",
"name": "is-plain-object",
"escapedName": "is-plain-object",
"rawSpec": "5.0.0",
"saveSpec": null,
"fetchSpec": "5.0.0"
},
"_requiredBy": [
"/@octokit/endpoint"
],
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"_spec": "5.0.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": { "bugs": {
"url": "https://github.com/jonschlinkert/is-plain-object/issues" "url": "https://github.com/jonschlinkert/is-plain-object/issues"
}, },
"contributors": [ "license": "MIT",
{ "main": "dist/is-plain-object.js",
"name": "Jon Schlinkert", "module": "dist/is-plain-object.mjs",
"url": "http://twitter.com/jonschlinkert" "types": "is-plain-object.d.ts",
}, "files": [
{ "is-plain-object.d.ts",
"name": "Osman Nuri Okumuş", "dist"
"url": "http://onokumus.com"
},
{
"name": "Steven Vachon",
"url": "https://svachon.com"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
},
{
"name": "Bogdan Chadkin",
"url": "https://github.com/TrySound"
}
], ],
"description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", "exports": {
".": {
"import": "./dist/is-plain-object.mjs",
"require": "./dist/is-plain-object.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "rollup -c",
"test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
"test_node": "mocha -r esm",
"test": "npm run test_node && npm run build && npm run test_browser",
"prepare": "rollup -c"
},
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "chai": "^4.2.0",
"esm": "^3.2.22", "esm": "^3.2.22",
@@ -64,21 +48,6 @@
"mocha-headless-chrome": "^3.1.0", "mocha-headless-chrome": "^3.1.0",
"rollup": "^2.22.1" "rollup": "^2.22.1"
}, },
"engines": {
"node": ">=0.10.0"
},
"exports": {
".": {
"import": "./dist/is-plain-object.mjs",
"require": "./dist/is-plain-object.js"
},
"./package.json": "./package.json"
},
"files": [
"is-plain-object.d.ts",
"dist"
],
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"keywords": [ "keywords": [
"check", "check",
"is", "is",
@@ -93,22 +62,6 @@
"typeof", "typeof",
"value" "value"
], ],
"license": "MIT",
"main": "dist/is-plain-object.js",
"module": "dist/is-plain-object.mjs",
"name": "is-plain-object",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-plain-object.git"
},
"scripts": {
"build": "rollup -c",
"prepare": "rollup -c",
"test": "npm run test_node && npm run build && npm run test_browser",
"test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
"test_node": "mocha -r esm"
},
"types": "is-plain-object.d.ts",
"verb": { "verb": {
"toc": false, "toc": false,
"layout": "default", "layout": "default",
@@ -128,6 +81,5 @@
"lint": { "lint": {
"reflinks": true "reflinks": true
} }
}, }
"version": "5.0.0"
} }

View File

@@ -1,42 +1,33 @@
{ {
"_args": [ "name": "@octokit/endpoint",
[ "description": "Turns REST API endpoints into generic request options",
"@octokit/endpoint@6.0.6", "version": "6.0.6",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/endpoint@6.0.6", "pika": true,
"_id": "@octokit/endpoint@6.0.6", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-7Cc8olaCoL/mtquB7j/HTbPM+sY6Ebr4k2X2y4JoXpVKQ7r5xB4iGQE0IoO58wIPsUk4AzoT65AMEpymSbWTgQ==", "octokit",
"_location": "/@octokit/endpoint", "github",
"_phantomChildren": {}, "api",
"_requested": { "rest"
"type": "version",
"registry": true,
"raw": "@octokit/endpoint@6.0.6",
"name": "@octokit/endpoint",
"escapedName": "@octokit%2fendpoint",
"scope": "@octokit",
"rawSpec": "6.0.6",
"saveSpec": null,
"fetchSpec": "6.0.6"
},
"_requiredBy": [
"/@octokit/request"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.6.tgz", "homepage": "https://github.com/octokit/endpoint.js#readme",
"_spec": "6.0.6",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/endpoint.js/issues" "url": "https://github.com/octokit/endpoint.js/issues"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/endpoint.js.git"
},
"dependencies": { "dependencies": {
"@octokit/types": "^5.0.0", "@octokit/types": "^5.0.0",
"is-plain-object": "^5.0.0", "is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"description": "Turns REST API endpoints into generic request options",
"devDependencies": { "devDependencies": {
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-node": "^0.9.0",
@@ -50,31 +41,11 @@
"ts-jest": "^26.0.0", "ts-jest": "^26.0.0",
"typescript": "^4.0.2" "typescript": "^4.0.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/endpoint.js#readme",
"keywords": [
"octokit",
"github",
"api",
"rest"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/endpoint",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/endpoint.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "6.0.6" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,42 +1,33 @@
{ {
"_args": [ "name": "@octokit/graphql",
[ "description": "GitHub GraphQL API client for browsers and Node",
"@octokit/graphql@4.5.6", "version": "4.5.6",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/graphql@4.5.6", "pika": true,
"_id": "@octokit/graphql@4.5.6", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg==", "octokit",
"_location": "/@octokit/graphql", "github",
"_phantomChildren": {}, "api",
"_requested": { "graphql"
"type": "version",
"registry": true,
"raw": "@octokit/graphql@4.5.6",
"name": "@octokit/graphql",
"escapedName": "@octokit%2fgraphql",
"scope": "@octokit",
"rawSpec": "4.5.6",
"saveSpec": null,
"fetchSpec": "4.5.6"
},
"_requiredBy": [
"/@octokit/core"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.6.tgz", "homepage": "https://github.com/octokit/graphql.js#readme",
"_spec": "4.5.6",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/graphql.js/issues" "url": "https://github.com/octokit/graphql.js/issues"
}, },
"repository": {
"type": "git",
"url": "https://github.com/octokit/graphql.js.git"
},
"dependencies": { "dependencies": {
"@octokit/request": "^5.3.0", "@octokit/request": "^5.3.0",
"@octokit/types": "^5.0.0", "@octokit/types": "^5.0.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"description": "GitHub GraphQL API client for browsers and Node",
"devDependencies": { "devDependencies": {
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-node": "^0.9.0",
@@ -53,31 +44,11 @@
"ts-jest": "^25.1.0", "ts-jest": "^25.1.0",
"typescript": "^3.4.5" "typescript": "^3.4.5"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/graphql.js#readme",
"keywords": [
"octokit",
"github",
"api",
"graphql"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/graphql",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/graphql.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "4.5.6" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,40 +1,27 @@
{ {
"_args": [ "name": "@octokit/plugin-paginate-rest",
[ "description": "Octokit plugin to paginate REST API endpoint responses",
"@octokit/plugin-paginate-rest@2.4.0", "version": "2.4.0",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/plugin-paginate-rest@2.4.0", "pika": true,
"_id": "@octokit/plugin-paginate-rest@2.4.0", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg==", "github",
"_location": "/@octokit/plugin-paginate-rest", "api",
"_phantomChildren": {}, "sdk",
"_requested": { "toolkit"
"type": "version",
"registry": true,
"raw": "@octokit/plugin-paginate-rest@2.4.0",
"name": "@octokit/plugin-paginate-rest",
"escapedName": "@octokit%2fplugin-paginate-rest",
"scope": "@octokit",
"rawSpec": "2.4.0",
"saveSpec": null,
"fetchSpec": "2.4.0"
},
"_requiredBy": [
"/@actions/github"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz", "repository": "https://github.com/octokit/plugin-paginate-rest.js",
"_spec": "2.4.0",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/octokit/plugin-paginate-rest.js/issues"
},
"dependencies": { "dependencies": {
"@octokit/types": "^5.5.0" "@octokit/types": "^5.5.0"
}, },
"description": "Octokit plugin to paginate REST API endpoint responses", "peerDependencies": {
"@octokit/core": ">=2"
},
"devDependencies": { "devDependencies": {
"@octokit/core": "^3.0.0", "@octokit/core": "^3.0.0",
"@octokit/plugin-rest-endpoint-methods": "^4.0.0", "@octokit/plugin-rest-endpoint-methods": "^4.0.0",
@@ -54,34 +41,11 @@
"ts-jest": "^26.0.0", "ts-jest": "^26.0.0",
"typescript": "^4.0.2" "typescript": "^4.0.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/plugin-paginate-rest.js#readme",
"keywords": [
"github",
"api",
"sdk",
"toolkit"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/plugin-paginate-rest",
"peerDependencies": {
"@octokit/core": ">=2"
},
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/plugin-paginate-rest.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "2.4.0" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,41 +1,25 @@
{ {
"_args": [ "name": "@octokit/plugin-rest-endpoint-methods",
[ "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints",
"@octokit/plugin-rest-endpoint-methods@4.2.0", "version": "4.2.0",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/plugin-rest-endpoint-methods@4.2.0", "pika": true,
"_id": "@octokit/plugin-rest-endpoint-methods@4.2.0", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==", "github",
"_location": "/@octokit/plugin-rest-endpoint-methods", "api",
"_phantomChildren": {}, "sdk",
"_requested": { "toolkit"
"type": "version",
"registry": true,
"raw": "@octokit/plugin-rest-endpoint-methods@4.2.0",
"name": "@octokit/plugin-rest-endpoint-methods",
"escapedName": "@octokit%2fplugin-rest-endpoint-methods",
"scope": "@octokit",
"rawSpec": "4.2.0",
"saveSpec": null,
"fetchSpec": "4.2.0"
},
"_requiredBy": [
"/@actions/github"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz", "repository": "https://github.com/octokit/plugin-rest-endpoint-methods.js",
"_spec": "4.2.0",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/octokit/plugin-rest-endpoint-methods.js/issues"
},
"dependencies": { "dependencies": {
"@octokit/types": "^5.5.0", "@octokit/types": "^5.5.0",
"deprecation": "^2.3.1" "deprecation": "^2.3.1"
}, },
"description": "Octokit plugin adding one method for all of api.github.com REST API endpoints",
"devDependencies": { "devDependencies": {
"@gimenete/type-writer": "^0.1.5", "@gimenete/type-writer": "^0.1.5",
"@octokit/core": "^3.0.0", "@octokit/core": "^3.0.0",
@@ -63,31 +47,11 @@
"ts-jest": "^26.1.3", "ts-jest": "^26.1.3",
"typescript": "^4.0.2" "typescript": "^4.0.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/plugin-rest-endpoint-methods.js#readme",
"keywords": [
"github",
"api",
"sdk",
"toolkit"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/plugin-rest-endpoint-methods",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/plugin-rest-endpoint-methods.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "4.2.0" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,41 +1,26 @@
{ {
"_args": [ "name": "@octokit/plugin-retry",
[ "description": "Automatic retry plugin for octokit",
"@octokit/plugin-retry@3.0.3", "version": "3.0.3",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/plugin-retry@3.0.3", "pika": true,
"_id": "@octokit/plugin-retry@3.0.3", "sideEffects": false,
"_inBundle": false, "homepage": "https://github.com/octokit/plugin-retry.js#readme",
"_integrity": "sha512-RFvcBg4JGyfWTWE35EIF7jf/eglIk5MuvfygzdIMLIVK3/4Ywz3X1x9Ri75nlyAmk53EpVWB4DwM/xEB1NXxXA==",
"_location": "/@octokit/plugin-retry",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@octokit/plugin-retry@3.0.3",
"name": "@octokit/plugin-retry",
"escapedName": "@octokit%2fplugin-retry",
"scope": "@octokit",
"rawSpec": "3.0.3",
"saveSpec": null,
"fetchSpec": "3.0.3"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.3.tgz",
"_spec": "3.0.3",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/plugin-retry.js/issues" "url": "https://github.com/octokit/plugin-retry.js/issues"
}, },
"repository": {
"type": "git",
"url": "https://github.com/octokit/plugin-retry.js.git"
},
"dependencies": { "dependencies": {
"@octokit/types": "^5.0.0", "@octokit/types": "^5.0.0",
"bottleneck": "^2.15.3" "bottleneck": "^2.15.3"
}, },
"description": "Automatic retry plugin for octokit",
"devDependencies": { "devDependencies": {
"@octokit/core": "^2.0.0", "@octokit/core": "^2.0.0",
"@octokit/request-error": "^2.0.0", "@octokit/request-error": "^2.0.0",
@@ -54,25 +39,11 @@
"ts-jest": "^26.0.0", "ts-jest": "^26.0.0",
"typescript": "^3.7.2" "typescript": "^3.7.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/plugin-retry.js#readme",
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/plugin-retry",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/plugin-retry.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "3.0.3" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,42 +1,33 @@
{ {
"_args": [ "name": "@octokit/request-error",
[ "description": "Error class for Octokit request errors",
"@octokit/request-error@2.0.2", "version": "2.0.2",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/request-error@2.0.2", "pika": true,
"_id": "@octokit/request-error@2.0.2", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", "octokit",
"_location": "/@octokit/request-error", "github",
"_phantomChildren": {}, "api",
"_requested": { "error"
"type": "version",
"registry": true,
"raw": "@octokit/request-error@2.0.2",
"name": "@octokit/request-error",
"escapedName": "@octokit%2frequest-error",
"scope": "@octokit",
"rawSpec": "2.0.2",
"saveSpec": null,
"fetchSpec": "2.0.2"
},
"_requiredBy": [
"/@octokit/request"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", "homepage": "https://github.com/octokit/request-error.js#readme",
"_spec": "2.0.2",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/request-error.js/issues" "url": "https://github.com/octokit/request-error.js/issues"
}, },
"repository": {
"type": "git",
"url": "https://github.com/octokit/request-error.js.git"
},
"dependencies": { "dependencies": {
"@octokit/types": "^5.0.1", "@octokit/types": "^5.0.1",
"deprecation": "^2.0.0", "deprecation": "^2.0.0",
"once": "^1.4.0" "once": "^1.4.0"
}, },
"description": "Error class for Octokit request errors",
"devDependencies": { "devDependencies": {
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.0", "@pika/plugin-build-node": "^0.9.0",
@@ -53,31 +44,11 @@
"ts-jest": "^25.1.0", "ts-jest": "^25.1.0",
"typescript": "^3.4.5" "typescript": "^3.4.5"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/request-error.js#readme",
"keywords": [
"octokit",
"github",
"api",
"error"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/request-error",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/request-error.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "2.0.2" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,61 +1,45 @@
{ {
"_args": [ "name": "is-plain-object",
[ "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).",
"is-plain-object@5.0.0", "version": "5.0.0",
"/home/marco/repos/github/codeql-action" "homepage": "https://github.com/jonschlinkert/is-plain-object",
] "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Osman Nuri Okumuş (http://onokumus.com)",
"Steven Vachon (https://svachon.com)",
"(https://github.com/wtgtybhertgeghgtwtg)",
"Bogdan Chadkin (https://github.com/TrySound)"
], ],
"_from": "is-plain-object@5.0.0", "repository": "jonschlinkert/is-plain-object",
"_id": "is-plain-object@5.0.0",
"_inBundle": false,
"_integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"_location": "/@octokit/request/is-plain-object",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-plain-object@5.0.0",
"name": "is-plain-object",
"escapedName": "is-plain-object",
"rawSpec": "5.0.0",
"saveSpec": null,
"fetchSpec": "5.0.0"
},
"_requiredBy": [
"/@octokit/request"
],
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"_spec": "5.0.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": { "bugs": {
"url": "https://github.com/jonschlinkert/is-plain-object/issues" "url": "https://github.com/jonschlinkert/is-plain-object/issues"
}, },
"contributors": [ "license": "MIT",
{ "main": "dist/is-plain-object.js",
"name": "Jon Schlinkert", "module": "dist/is-plain-object.mjs",
"url": "http://twitter.com/jonschlinkert" "types": "is-plain-object.d.ts",
}, "files": [
{ "is-plain-object.d.ts",
"name": "Osman Nuri Okumuş", "dist"
"url": "http://onokumus.com"
},
{
"name": "Steven Vachon",
"url": "https://svachon.com"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
},
{
"name": "Bogdan Chadkin",
"url": "https://github.com/TrySound"
}
], ],
"description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", "exports": {
".": {
"import": "./dist/is-plain-object.mjs",
"require": "./dist/is-plain-object.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "rollup -c",
"test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
"test_node": "mocha -r esm",
"test": "npm run test_node && npm run build && npm run test_browser",
"prepare": "rollup -c"
},
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "chai": "^4.2.0",
"esm": "^3.2.22", "esm": "^3.2.22",
@@ -64,21 +48,6 @@
"mocha-headless-chrome": "^3.1.0", "mocha-headless-chrome": "^3.1.0",
"rollup": "^2.22.1" "rollup": "^2.22.1"
}, },
"engines": {
"node": ">=0.10.0"
},
"exports": {
".": {
"import": "./dist/is-plain-object.mjs",
"require": "./dist/is-plain-object.js"
},
"./package.json": "./package.json"
},
"files": [
"is-plain-object.d.ts",
"dist"
],
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"keywords": [ "keywords": [
"check", "check",
"is", "is",
@@ -93,22 +62,6 @@
"typeof", "typeof",
"value" "value"
], ],
"license": "MIT",
"main": "dist/is-plain-object.js",
"module": "dist/is-plain-object.mjs",
"name": "is-plain-object",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-plain-object.git"
},
"scripts": {
"build": "rollup -c",
"prepare": "rollup -c",
"test": "npm run test_node && npm run build && npm run test_browser",
"test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
"test_node": "mocha -r esm"
},
"types": "is-plain-object.d.ts",
"verb": { "verb": {
"toc": false, "toc": false,
"layout": "default", "layout": "default",
@@ -128,6 +81,5 @@
"lint": { "lint": {
"reflinks": true "reflinks": true
} }
}, }
"version": "5.0.0"
} }

View File

@@ -1,37 +1,28 @@
{ {
"_args": [ "name": "@octokit/request",
[ "description": "Send parameterized requests to GitHubs APIs with sensible defaults in browsers and Node",
"@octokit/request@5.4.9", "version": "5.4.9",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/request@5.4.9", "pika": true,
"_id": "@octokit/request@5.4.9", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==", "octokit",
"_location": "/@octokit/request", "github",
"_phantomChildren": {}, "api",
"_requested": { "request"
"type": "version",
"registry": true,
"raw": "@octokit/request@5.4.9",
"name": "@octokit/request",
"escapedName": "@octokit%2frequest",
"scope": "@octokit",
"rawSpec": "5.4.9",
"saveSpec": null,
"fetchSpec": "5.4.9"
},
"_requiredBy": [
"/@octokit/core",
"/@octokit/graphql"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz", "homepage": "https://github.com/octokit/request.js#readme",
"_spec": "5.4.9",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": { "bugs": {
"url": "https://github.com/octokit/request.js/issues" "url": "https://github.com/octokit/request.js/issues"
}, },
"repository": {
"type": "git",
"url": "https://github.com/octokit/request.js.git"
},
"dependencies": { "dependencies": {
"@octokit/endpoint": "^6.0.1", "@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.0.0", "@octokit/request-error": "^2.0.0",
@@ -42,7 +33,6 @@
"once": "^1.4.0", "once": "^1.4.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"description": "Send parameterized requests to GitHubs APIs with sensible defaults in browsers and Node",
"devDependencies": { "devDependencies": {
"@octokit/auth-app": "^2.1.2", "@octokit/auth-app": "^2.1.2",
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
@@ -64,31 +54,11 @@
"ts-jest": "^26.1.0", "ts-jest": "^26.1.0",
"typescript": "^4.0.2" "typescript": "^4.0.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/request.js#readme",
"keywords": [
"octokit",
"github",
"api",
"request"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/request",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/request.js.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "5.4.9" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,49 +1,25 @@
{ {
"_args": [ "name": "@octokit/types",
[ "description": "Shared TypeScript definitions for Octokit projects",
"@octokit/types@5.5.0", "version": "5.5.0",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "files": [
"dist-*/",
"bin/"
], ],
"_from": "@octokit/types@5.5.0", "pika": true,
"_id": "@octokit/types@5.5.0", "sideEffects": false,
"_inBundle": false, "keywords": [
"_integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==", "github",
"_location": "/@octokit/types", "api",
"_phantomChildren": {}, "sdk",
"_requested": { "toolkit",
"type": "version", "typescript"
"registry": true,
"raw": "@octokit/types@5.5.0",
"name": "@octokit/types",
"escapedName": "@octokit%2ftypes",
"scope": "@octokit",
"rawSpec": "5.5.0",
"saveSpec": null,
"fetchSpec": "5.5.0"
},
"_requiredBy": [
"/",
"/@octokit/auth-token",
"/@octokit/core",
"/@octokit/endpoint",
"/@octokit/graphql",
"/@octokit/plugin-paginate-rest",
"/@octokit/plugin-rest-endpoint-methods",
"/@octokit/plugin-retry",
"/@octokit/request",
"/@octokit/request-error"
], ],
"_resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz", "repository": "https://github.com/octokit/types.ts",
"_spec": "5.5.0",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/octokit/types.ts/issues"
},
"dependencies": { "dependencies": {
"@types/node": ">= 8" "@types/node": ">= 8"
}, },
"description": "Shared TypeScript definitions for Octokit projects",
"devDependencies": { "devDependencies": {
"@octokit/graphql": "^4.2.2", "@octokit/graphql": "^4.2.2",
"@pika/pack": "^0.5.0", "@pika/pack": "^0.5.0",
@@ -63,32 +39,11 @@
"typedoc": "^0.19.0", "typedoc": "^0.19.0",
"typescript": "^4.0.2" "typescript": "^4.0.2"
}, },
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/octokit/types.ts#readme",
"keywords": [
"github",
"api",
"sdk",
"toolkit",
"typescript"
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/types",
"pika": true,
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/octokit/types.ts.git"
},
"sideEffects": false,
"source": "dist-src/index.js", "source": "dist-src/index.js",
"types": "dist-types/index.d.ts", "types": "dist-types/index.d.ts",
"version": "5.5.0" "main": "dist-node/index.js",
"module": "dist-web/index.js"
} }

View File

@@ -1,66 +1,27 @@
{ {
"_args": [ "name": "@sindresorhus/is",
[ "version": "0.14.0",
"@sindresorhus/is@0.14.0", "description": "Type check values: `is.string('🦄') //=> true`",
"/home/marco/repos/github/codeql-action" "license": "MIT",
] "repository": "sindresorhus/is",
],
"_development": true,
"_from": "@sindresorhus/is@0.14.0",
"_id": "@sindresorhus/is@0.14.0",
"_inBundle": false,
"_integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
"_location": "/@sindresorhus/is",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sindresorhus/is@0.14.0",
"name": "@sindresorhus/is",
"escapedName": "@sindresorhus%2fis",
"scope": "@sindresorhus",
"rawSpec": "0.14.0",
"saveSpec": null,
"fetchSpec": "0.14.0"
},
"_requiredBy": [
"/got"
],
"_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
"_spec": "0.14.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "sindresorhus.com" "url": "sindresorhus.com"
}, },
"bugs": { "main": "dist/index.js",
"url": "https://github.com/sindresorhus/is/issues"
},
"description": "Type check values: `is.string('🦄') //=> true`",
"devDependencies": {
"@sindresorhus/tsconfig": "^0.1.0",
"@types/jsdom": "^11.12.0",
"@types/node": "^10.12.10",
"@types/tempy": "^0.2.0",
"@types/zen-observable": "^0.8.0",
"ava": "^0.25.0",
"del-cli": "^1.1.0",
"jsdom": "^11.6.2",
"rxjs": "^6.3.3",
"tempy": "^0.2.1",
"tslint": "^5.9.1",
"tslint-xo": "^0.10.0",
"typescript": "^3.2.1",
"zen-observable": "^0.8.8"
},
"engines": { "engines": {
"node": ">=6" "node": ">=6"
}, },
"scripts": {
"lint": "tslint --format stylish --project .",
"build": "del dist && tsc",
"test": "npm run lint && npm run build && ava dist/tests",
"prepublish": "npm run build && del dist/tests"
},
"files": [ "files": [
"dist" "dist"
], ],
"homepage": "https://github.com/sindresorhus/is#readme",
"keywords": [ "keywords": [
"type", "type",
"types", "types",
@@ -82,19 +43,21 @@
"verify", "verify",
"compare" "compare"
], ],
"license": "MIT", "devDependencies": {
"main": "dist/index.js", "@sindresorhus/tsconfig": "^0.1.0",
"name": "@sindresorhus/is", "@types/jsdom": "^11.12.0",
"repository": { "@types/node": "^10.12.10",
"type": "git", "@types/tempy": "^0.2.0",
"url": "git+https://github.com/sindresorhus/is.git" "@types/zen-observable": "^0.8.0",
"ava": "^0.25.0",
"del-cli": "^1.1.0",
"jsdom": "^11.6.2",
"rxjs": "^6.3.3",
"tempy": "^0.2.1",
"tslint": "^5.9.1",
"tslint-xo": "^0.10.0",
"typescript": "^3.2.1",
"zen-observable": "^0.8.8"
}, },
"scripts": { "types": "dist/index.d.ts"
"build": "del dist && tsc",
"lint": "tslint --format stylish --project .",
"prepublish": "npm run build && del dist/tests",
"test": "npm run lint && npm run build && ava dist/tests"
},
"types": "dist/index.d.ts",
"version": "0.14.0"
} }

View File

@@ -1,46 +1,33 @@
{ {
"_args": [ "name": "@sinonjs/commons",
[ "version": "1.8.0",
"@sinonjs/commons@1.8.0", "description": "Simple functions shared among the sinon end user libraries",
"/home/marco/repos/github/codeql-action" "main": "lib/index.js",
] "scripts": {
], "lint": "eslint .",
"_development": true, "precommit": "lint-staged",
"_from": "@sinonjs/commons@1.8.0", "test": "mocha --recursive -R dot \"lib/**/*.test.js\"",
"_id": "@sinonjs/commons@1.8.0", "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"_inBundle": false, "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test",
"_integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", "preversion": "npm run test-check-coverage",
"_location": "/@sinonjs/commons", "version": "changes --commits --footer",
"_phantomChildren": {}, "postversion": "git push --follow-tags && npm publish"
"_requested": { },
"type": "version", "repository": {
"registry": true, "type": "git",
"raw": "@sinonjs/commons@1.8.0", "url": "git+https://github.com/sinonjs/commons.git"
"name": "@sinonjs/commons",
"escapedName": "@sinonjs%2fcommons",
"scope": "@sinonjs",
"rawSpec": "1.8.0",
"saveSpec": null,
"fetchSpec": "1.8.0"
}, },
"_requiredBy": [
"/@sinonjs/fake-timers",
"/@sinonjs/formatio",
"/@sinonjs/samsam",
"/nise",
"/sinon"
],
"_resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz",
"_spec": "1.8.0",
"_where": "/home/marco/repos/github/codeql-action",
"author": "", "author": "",
"license": "BSD-3-Clause",
"bugs": { "bugs": {
"url": "https://github.com/sinonjs/commons/issues" "url": "https://github.com/sinonjs/commons/issues"
}, },
"dependencies": { "homepage": "https://github.com/sinonjs/commons#readme",
"type-detect": "4.0.8" "lint-staged": {
"*.js": [
"eslint"
]
}, },
"description": "Simple functions shared among the sinon end user libraries",
"devDependencies": { "devDependencies": {
"@sinonjs/referee-sinon": "7.0.2", "@sinonjs/referee-sinon": "7.0.2",
"@studio/changes": "^2.0.0", "@studio/changes": "^2.0.0",
@@ -60,28 +47,7 @@
"nyc": "15.0.0", "nyc": "15.0.0",
"prettier": "^1.14.3" "prettier": "^1.14.3"
}, },
"homepage": "https://github.com/sinonjs/commons#readme", "dependencies": {
"license": "BSD-3-Clause", "type-detect": "4.0.8"
"lint-staged": { }
"*.js": [
"eslint"
]
},
"main": "lib/index.js",
"name": "@sinonjs/commons",
"repository": {
"type": "git",
"url": "git+https://github.com/sinonjs/commons.git"
},
"scripts": {
"lint": "eslint .",
"postversion": "git push --follow-tags && npm publish",
"precommit": "lint-staged",
"preversion": "npm run test-check-coverage",
"test": "mocha --recursive -R dot \"lib/**/*.test.js\"",
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test",
"version": "changes --commits --footer"
},
"version": "1.8.0"
} }

View File

@@ -1,45 +1,39 @@
{ {
"_args": [ "name": "@sinonjs/fake-timers",
[ "description": "Fake JavaScript timers",
"@sinonjs/fake-timers@6.0.1", "version": "6.0.1",
"/home/marco/repos/github/codeql-action" "homepage": "http://github.com/sinonjs/fake-timers",
] "author": "Christian Johansen",
], "repository": {
"_development": true, "type": "git",
"_from": "@sinonjs/fake-timers@6.0.1", "url": "http://github.com/sinonjs/fake-timers.git"
"_id": "@sinonjs/fake-timers@6.0.1",
"_inBundle": false,
"_integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==",
"_location": "/@sinonjs/fake-timers",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sinonjs/fake-timers@6.0.1",
"name": "@sinonjs/fake-timers",
"escapedName": "@sinonjs%2ffake-timers",
"scope": "@sinonjs",
"rawSpec": "6.0.1",
"saveSpec": null,
"fetchSpec": "6.0.1"
},
"_requiredBy": [
"/nise",
"/sinon"
],
"_resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz",
"_spec": "6.0.1",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Christian Johansen"
}, },
"bugs": { "bugs": {
"mail": "christian@cjohansen.no",
"url": "http://github.com/sinonjs/fake-timers/issues" "url": "http://github.com/sinonjs/fake-timers/issues"
}, },
"dependencies": { "license": "BSD-3-Clause",
"@sinonjs/commons": "^1.7.0" "scripts": {
"lint": "eslint .",
"test-node": "mocha test/ integration-test/ -R dot --check-leaks",
"test-headless": "mochify --no-detect-globals --timeout=10000",
"test-check-coverage": "npm run test-coverage && nyc check-coverage",
"test-cloud": "mochify --wd --no-detect-globals --timeout=10000",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node",
"test": "npm run lint && npm run test-node && npm run test-headless",
"bundle": "browserify --no-detect-globals -s FakeTimers -o fake-timers.js src/fake-timers-src.js",
"prepublishOnly": "npm run bundle",
"preversion": "./scripts/preversion.sh",
"version": "./scripts/version.sh",
"postversion": "./scripts/postversion.sh"
}, },
"description": "Fake JavaScript timers", "lint-staged": {
"*.js": "eslint"
},
"files": [
"src/",
"fake-timers.js"
],
"devDependencies": { "devDependencies": {
"@sinonjs/referee-sinon": "6.0.1", "@sinonjs/referee-sinon": "6.0.1",
"browserify": "16.5.0", "browserify": "16.5.0",
@@ -78,23 +72,16 @@
] ]
} }
}, },
"files": [ "module": "./fake-timers.js",
"src/", "main": "./src/fake-timers-src.js",
"fake-timers.js" "dependencies": {
], "@sinonjs/commons": "^1.7.0"
"homepage": "http://github.com/sinonjs/fake-timers", },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "run-p lint test-node" "pre-commit": "run-p lint test-node"
} }
}, },
"license": "BSD-3-Clause",
"lint-staged": {
"*.js": "eslint"
},
"main": "./src/fake-timers-src.js",
"module": "./fake-timers.js",
"name": "@sinonjs/fake-timers",
"nyc": { "nyc": {
"branches": 85, "branches": 85,
"lines": 92, "lines": 92,
@@ -105,24 +92,5 @@
"coverage/**", "coverage/**",
"fake-timers.js" "fake-timers.js"
] ]
}, }
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/sinonjs/fake-timers.git"
},
"scripts": {
"bundle": "browserify --no-detect-globals -s FakeTimers -o fake-timers.js src/fake-timers-src.js",
"lint": "eslint .",
"postversion": "./scripts/postversion.sh",
"prepublishOnly": "npm run bundle",
"preversion": "./scripts/preversion.sh",
"test": "npm run lint && npm run test-node && npm run test-headless",
"test-check-coverage": "npm run test-coverage && nyc check-coverage",
"test-cloud": "mochify --wd --no-detect-globals --timeout=10000",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node",
"test-headless": "mochify --no-detect-globals --timeout=10000",
"test-node": "mocha test/ integration-test/ -R dot --check-leaks",
"version": "./scripts/version.sh"
},
"version": "6.0.1"
} }

View File

@@ -1,45 +1,35 @@
{ {
"_args": [ "name": "@sinonjs/formatio",
[ "version": "5.0.1",
"@sinonjs/formatio@5.0.1", "description": "Human-readable object formatting",
"/home/marco/repos/github/codeql-action" "homepage": "https://sinonjs.github.io/formatio/",
] "author": "Christian Johansen",
], "license": "BSD-3-Clause",
"_development": true, "main": "./lib/formatio",
"_from": "@sinonjs/formatio@5.0.1", "repository": {
"_id": "@sinonjs/formatio@5.0.1", "type": "git",
"_inBundle": false, "url": "https://github.com/sinonjs/formatio.git"
"_integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==",
"_location": "/@sinonjs/formatio",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sinonjs/formatio@5.0.1",
"name": "@sinonjs/formatio",
"escapedName": "@sinonjs%2fformatio",
"scope": "@sinonjs",
"rawSpec": "5.0.1",
"saveSpec": null,
"fetchSpec": "5.0.1"
}, },
"_requiredBy": [ "files": [
"/sinon" "lib/**/*[^test].js"
], ],
"_resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", "scripts": {
"_spec": "5.0.1", "build": "npm run build:dist-folder && npm run build:bundle",
"_where": "/home/marco/repos/github/codeql-action", "build:bundle": "rollup -c > dist/formatio.js",
"author": { "build:dist-folder": "mkdirp dist",
"name": "Christian Johansen" "lint": "eslint .",
}, "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
"bugs": { "test": "mocha 'lib/**/*.test.js'",
"url": "https://github.com/sinonjs/formatio/issues" "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test",
"preversion": "npm run test-check-coverage",
"version": "changes --commits --footer",
"postversion": "git push --follow-tags && npm publish --access public"
}, },
"dependencies": { "dependencies": {
"@sinonjs/commons": "^1", "@sinonjs/commons": "^1",
"@sinonjs/samsam": "^5.0.2" "@sinonjs/samsam": "^5.0.2"
}, },
"description": "Human-readable object formatting",
"devDependencies": { "devDependencies": {
"@sinonjs/referee": "^4.0.0", "@sinonjs/referee": "^4.0.0",
"@studio/changes": "^2.0.0", "@studio/changes": "^2.0.0",
@@ -56,30 +46,5 @@
"prettier": "^1.18.2", "prettier": "^1.18.2",
"rollup": "1.31.0", "rollup": "1.31.0",
"rollup-plugin-commonjs": "10.1.0" "rollup-plugin-commonjs": "10.1.0"
}, }
"files": [
"lib/**/*[^test].js"
],
"homepage": "https://sinonjs.github.io/formatio/",
"license": "BSD-3-Clause",
"main": "./lib/formatio",
"name": "@sinonjs/formatio",
"repository": {
"type": "git",
"url": "git+https://github.com/sinonjs/formatio.git"
},
"scripts": {
"build": "npm run build:dist-folder && npm run build:bundle",
"build:bundle": "rollup -c > dist/formatio.js",
"build:dist-folder": "mkdirp dist",
"lint": "eslint .",
"postversion": "git push --follow-tags && npm publish --access public",
"prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
"preversion": "npm run test-check-coverage",
"test": "mocha 'lib/**/*.test.js'",
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test",
"version": "changes --commits --footer"
},
"version": "5.0.1"
} }

View File

@@ -1,51 +1,50 @@
{ {
"_args": [ "name": "@sinonjs/samsam",
[ "version": "5.0.3",
"@sinonjs/samsam@5.0.3", "description": "Value identification and comparison functions",
"/home/marco/repos/github/codeql-action" "homepage": "http://sinonjs.github.io/samsam/",
] "author": "Christian Johansen",
], "license": "BSD-3-Clause",
"_development": true, "main": "./lib/samsam",
"_from": "@sinonjs/samsam@5.0.3", "repository": {
"_id": "@sinonjs/samsam@5.0.3", "type": "git",
"_inBundle": false, "url": "https://github.com/sinonjs/samsam.git"
"_integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==",
"_location": "/@sinonjs/samsam",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sinonjs/samsam@5.0.3",
"name": "@sinonjs/samsam",
"escapedName": "@sinonjs%2fsamsam",
"scope": "@sinonjs",
"rawSpec": "5.0.3",
"saveSpec": null,
"fetchSpec": "5.0.3"
}, },
"_requiredBy": [ "lint-staged": {
"/@sinonjs/formatio", "*.js": "eslint"
"/sinon" },
], "scripts": {
"_resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", "benchmark": "node lib/deep-equal-benchmark.js",
"_spec": "5.0.3", "build": "run-s build:dist-folder build:bundle",
"_where": "/home/marco/repos/github/codeql-action", "build:bundle": "rollup -c",
"author": { "build:dist-folder": "mkdirp dist",
"name": "Christian Johansen" "jsdoc": "jsdoc -c jsdoc.conf.json",
"lint": "eslint .",
"prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
"test": "mocha ./lib/*.test.js",
"test-cloud": "npm run test-headless -- --wd",
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test",
"test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"",
"preversion": "npm run test-check-coverage",
"version": "changes --commits --footer",
"postversion": "git push --follow-tags && npm publish --access public"
}, },
"browser": { "browser": {
"jsdom": false, "jsdom": false,
"jsdom-global": false "jsdom-global": false
}, },
"bugs": { "files": [
"url": "https://github.com/sinonjs/samsam/issues" "dist/",
}, "docs/",
"lib/",
"!lib/**/*.test.js"
],
"dependencies": { "dependencies": {
"@sinonjs/commons": "^1.6.0", "@sinonjs/commons": "^1.6.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"type-detect": "^4.0.8" "type-detect": "^4.0.8"
}, },
"description": "Value identification and comparison functions",
"devDependencies": { "devDependencies": {
"@sinonjs/referee": "^4.0.0", "@sinonjs/referee": "^4.0.0",
"@studio/changes": "^2.0.0", "@studio/changes": "^2.0.0",
@@ -77,19 +76,6 @@
"rollup": "^1.23.0", "rollup": "^1.23.0",
"rollup-plugin-commonjs": "^10.1.0" "rollup-plugin-commonjs": "^10.1.0"
}, },
"files": [
"dist/",
"docs/",
"lib/",
"!lib/**/*.test.js"
],
"homepage": "http://sinonjs.github.io/samsam/",
"license": "BSD-3-Clause",
"lint-staged": {
"*.js": "eslint"
},
"main": "./lib/samsam",
"name": "@sinonjs/samsam",
"nyc": { "nyc": {
"exclude": [ "exclude": [
"**/*.test.js", "**/*.test.js",
@@ -101,27 +87,5 @@
"rollup.config.js", "rollup.config.js",
"lib/deep-equal-benchmark.js" "lib/deep-equal-benchmark.js"
] ]
}, }
"repository": {
"type": "git",
"url": "git+https://github.com/sinonjs/samsam.git"
},
"scripts": {
"benchmark": "node lib/deep-equal-benchmark.js",
"build": "run-s build:dist-folder build:bundle",
"build:bundle": "rollup -c",
"build:dist-folder": "mkdirp dist",
"jsdoc": "jsdoc -c jsdoc.conf.json",
"lint": "eslint .",
"postversion": "git push --follow-tags && npm publish --access public",
"prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
"preversion": "npm run test-check-coverage",
"test": "mocha ./lib/*.test.js",
"test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
"test-cloud": "npm run test-headless -- --wd",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test",
"test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"",
"version": "changes --commits --footer"
},
"version": "5.0.3"
} }

View File

@@ -1,97 +1,37 @@
{ {
"_args": [ "name": "@sinonjs/text-encoding",
[ "author": "Joshua Bell <inexorabletash@gmail.com>",
"@sinonjs/text-encoding@0.7.1",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@sinonjs/text-encoding@0.7.1",
"_id": "@sinonjs/text-encoding@0.7.1",
"_inBundle": false,
"_integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"_location": "/@sinonjs/text-encoding",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sinonjs/text-encoding@0.7.1",
"name": "@sinonjs/text-encoding",
"escapedName": "@sinonjs%2ftext-encoding",
"scope": "@sinonjs",
"rawSpec": "0.7.1",
"saveSpec": null,
"fetchSpec": "0.7.1"
},
"_requiredBy": [
"/nise"
],
"_resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
"_spec": "0.7.1",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Joshua Bell",
"email": "inexorabletash@gmail.com"
},
"bugs": {
"url": "https://github.com/inexorabletash/text-encoding/issues"
},
"contributors": [ "contributors": [
{ "Joshua Bell <inexorabletash@gmail.com>",
"name": "Joshua Bell", "Rick Eyre <rick.eyre@outlook.com>",
"email": "inexorabletash@gmail.com" "Eugen Podaru <eugen.podaru@live.com>",
}, "Filip Dupanović <filip.dupanovic@gmail.com>",
{ "Anne van Kesteren <annevk@annevk.nl>",
"name": "Rick Eyre", "Author: Francis Avila <francisga@gmail.com>",
"email": "rick.eyre@outlook.com" "Michael J. Ryan <tracker1@gmail.com>",
}, "Pierre Queinnec <pierre@queinnec.org>",
{ "Zack Weinberg <zackw@panix.com>"
"name": "Eugen Podaru",
"email": "eugen.podaru@live.com"
},
{
"name": "Filip Dupanović",
"email": "filip.dupanovic@gmail.com"
},
{
"name": "Anne van Kesteren",
"email": "annevk@annevk.nl"
},
{
"name": "Author: Francis Avila",
"email": "francisga@gmail.com"
},
{
"name": "Michael J. Ryan",
"email": "tracker1@gmail.com"
},
{
"name": "Pierre Queinnec",
"email": "pierre@queinnec.org"
},
{
"name": "Zack Weinberg",
"email": "zackw@panix.com"
}
], ],
"version": "0.7.1",
"description": "Polyfill for the Encoding Living Standard's API.", "description": "Polyfill for the Encoding Living Standard's API.",
"main": "index.js",
"files": [ "files": [
"index.js", "index.js",
"lib/encoding.js", "lib/encoding.js",
"lib/encoding-indexes.js" "lib/encoding-indexes.js"
], ],
"homepage": "https://github.com/inexorabletash/text-encoding", "repository": {
"type": "git",
"url": "https://github.com/inexorabletash/text-encoding.git"
},
"keywords": [ "keywords": [
"encoding", "encoding",
"decoding", "decoding",
"living standard" "living standard"
], ],
"license": "(Unlicense OR Apache-2.0)", "bugs": {
"main": "index.js", "url": "https://github.com/inexorabletash/text-encoding/issues"
"name": "@sinonjs/text-encoding",
"repository": {
"type": "git",
"url": "git+https://github.com/inexorabletash/text-encoding.git"
}, },
"version": "0.7.1" "homepage": "https://github.com/inexorabletash/text-encoding",
"license": "(Unlicense OR Apache-2.0)"
} }

View File

@@ -1,79 +1,47 @@
{ {
"_args": [ "name": "@szmarczak/http-timer",
[ "version": "1.1.2",
"@szmarczak/http-timer@1.1.2",
"/home/marco/repos/github/codeql-action"
]
],
"_development": true,
"_from": "@szmarczak/http-timer@1.1.2",
"_id": "@szmarczak/http-timer@1.1.2",
"_inBundle": false,
"_integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
"_location": "/@szmarczak/http-timer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@szmarczak/http-timer@1.1.2",
"name": "@szmarczak/http-timer",
"escapedName": "@szmarczak%2fhttp-timer",
"scope": "@szmarczak",
"rawSpec": "1.1.2",
"saveSpec": null,
"fetchSpec": "1.1.2"
},
"_requiredBy": [
"/got"
],
"_resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
"_spec": "1.1.2",
"_where": "/home/marco/repos/github/codeql-action",
"author": {
"name": "Szymon Marczak"
},
"bugs": {
"url": "https://github.com/szmarczak/http-timer/issues"
},
"dependencies": {
"defer-to-connect": "^1.0.1"
},
"description": "Timings for HTTP requests", "description": "Timings for HTTP requests",
"devDependencies": { "main": "source",
"ava": "^0.25.0",
"coveralls": "^3.0.2",
"nyc": "^12.0.2",
"p-event": "^2.1.0",
"xo": "^0.22.0"
},
"engines": { "engines": {
"node": ">=6" "node": ">=6"
}, },
"scripts": {
"test": "xo && nyc ava",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"files": [ "files": [
"source" "source"
], ],
"homepage": "https://github.com/szmarczak/http-timer#readme",
"keywords": [ "keywords": [
"http", "http",
"https", "https",
"timer", "timer",
"timings" "timings"
], ],
"license": "MIT",
"main": "source",
"name": "@szmarczak/http-timer",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/szmarczak/http-timer.git" "url": "git+https://github.com/szmarczak/http-timer.git"
}, },
"scripts": { "author": "Szymon Marczak",
"coveralls": "nyc report --reporter=text-lcov | coveralls", "license": "MIT",
"test": "xo && nyc ava" "bugs": {
"url": "https://github.com/szmarczak/http-timer/issues"
}, },
"version": "1.1.2", "homepage": "https://github.com/szmarczak/http-timer#readme",
"xo": { "xo": {
"rules": { "rules": {
"unicorn/filename-case": "camelCase" "unicorn/filename-case": "camelCase"
} }
},
"devDependencies": {
"ava": "^0.25.0",
"coveralls": "^3.0.2",
"p-event": "^2.1.0",
"nyc": "^12.0.2",
"xo": "^0.22.0"
},
"dependencies": {
"defer-to-connect": "^1.0.1"
} }
} }

View File

@@ -1,62 +1,23 @@
{ {
"_args": [ "name": "@types/color-name",
[ "version": "1.1.1",
"@types/color-name@1.1.1", "description": "TypeScript definitions for color-name",
"/home/marco/repos/github/codeql-action" "license": "MIT",
]
],
"_development": true,
"_from": "@types/color-name@1.1.1",
"_id": "@types/color-name@1.1.1",
"_inBundle": false,
"_integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"_location": "/@types/color-name",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@types/color-name@1.1.1",
"name": "@types/color-name",
"escapedName": "@types%2fcolor-name",
"scope": "@types",
"rawSpec": "1.1.1",
"saveSpec": null,
"fetchSpec": "1.1.1"
},
"_requiredBy": [
"/ava/ansi-styles",
"/boxen/ansi-styles",
"/eslint/ansi-styles",
"/ora/ansi-styles",
"/slice-ansi/ansi-styles",
"/update-notifier/ansi-styles",
"/wrap-ansi/ansi-styles"
],
"_resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"_spec": "1.1.1",
"_where": "/home/marco/repos/github/codeql-action",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"contributors": [ "contributors": [
{ {
"name": "Junyoung Clare Jang", "name": "Junyoung Clare Jang",
"url": "https://github.com/Ailrun" "url": "https://github.com/Ailrun",
"githubUsername": "Ailrun"
} }
], ],
"dependencies": {},
"description": "TypeScript definitions for color-name",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "", "main": "",
"name": "@types/color-name", "types": "index",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
}, },
"scripts": {}, "scripts": {},
"typeScriptVersion": "2.0", "dependencies": {},
"types": "index",
"typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7", "typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7",
"version": "1.1.1" "typeScriptVersion": "2.0"
} }

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