From 854109fe92d3e3703e393f0121a87db77582c7aa Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 15:38:31 +0000 Subject: [PATCH 1/7] Report the path of CodeQL as an output --- init/action.yml | 3 +++ lib/init-action.js | 1 + lib/init-action.js.map | 2 +- src/init-action.ts | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/init/action.yml b/init/action.yml index f2c1519c77..6b5f408b39 100644 --- a/init/action.yml +++ b/init/action.yml @@ -23,6 +23,9 @@ inputs: description: Try to auto-install your python dependencies required: true default: 'true' +outputs: + codeql-path: + description: The path of the CodeQL binary used for analysis runs: using: 'node12' main: '../lib/init-action.js' diff --git a/lib/init-action.js b/lib/init-action.js index bcbfecf4eb..381d61f871 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -100,6 +100,7 @@ async function run() { return; } await sendSuccessStatusReport(startedAt, config); + core.setOutput("codeql-path", config.codeQLCmd); } run().catch((e) => { core.setFailed(`init action failed: ${e}`); diff --git a/lib/init-action.js.map b/lib/init-action.js.map index 3e51b739ca..2edc8d3365 100644 --- a/lib/init-action.js.map +++ b/lib/init-action.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAG9C,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAkBlD,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B;;IAE1B,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,CAAC,MAAM,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Ac,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACjC;YAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;gBAChC,MAAM,0BAAmB,CACvB,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,MAAM,EACN,YAAY,CACb,CAAC;aACH;SACF;KACF;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,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAG9C,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAkBlD,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B;;IAE1B,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,WAAW,CAAC,gBAAgB,CAAC,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,YAAY,CAAC,GAAG,CAAC,EAAE;gBAC3D,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACjC;YAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;gBAChC,MAAM,0BAAmB,CACvB,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,MAAM,EACN,YAAY,CACb,CAAC;aACH;SACF;KACF;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,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAEjD,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/init-action.ts b/src/init-action.ts index a1b5fb0da2..78cc82c033 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -191,6 +191,8 @@ async function run() { return; } await sendSuccessStatusReport(startedAt, config); + + core.setOutput("codeql-path", config.codeQLCmd); } run().catch((e) => { From c213a7c7c95be27e654cc5e15202663fee551cbf Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 15:43:50 +0000 Subject: [PATCH 2/7] Use codeql-path output in python-deps workflow --- .github/workflows/python-deps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-deps.yml b/.github/workflows/python-deps.yml index 058b6d92a2..4bc27abef6 100644 --- a/.github/workflows/python-deps.yml +++ b/.github/workflows/python-deps.yml @@ -44,6 +44,7 @@ jobs: - name: Initialize CodeQL uses: ./init + id: init with: tools: latest languages: python @@ -62,8 +63,7 @@ jobs: esac echo ${basePath} - codeql_version="0.0.0-$(cat "$GITHUB_WORKSPACE/src/defaults.json" | jq -r .bundleVersion | rev | cut -d - -f 1 | rev)" - $GITHUB_WORKSPACE/python-setup/auto_install_packages.py "${basePath}/hostedtoolcache/CodeQL/$codeql_version/x64/codeql" + $GITHUB_WORKSPACE/python-setup/auto_install_packages.py "$(dirname ${{steps.init.outputs.codeql-path}})" - name: Setup for extractor run: | echo $CODEQL_PYTHON From 77f914a4ba9be60aabbd3a2d900aaca90f025295 Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 15:44:02 +0000 Subject: [PATCH 3/7] Add codeql-path to README (wip) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6f35ee7802..dab7930b37 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,10 @@ By default, this will override any queries specified in a config file. If you wi queries: +, ``` +### CodeQL Path + +The `init` action makes the path to CodeQL available as the output `codeql-path`. + ## Troubleshooting Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning). From ff6db59d5a0443daedf862c73ff24aeecbada58e Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 18:57:50 +0000 Subject: [PATCH 4/7] Fix indentation for action output Co-authored-by: Chris Gavin --- init/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/action.yml b/init/action.yml index 6b5f408b39..77c5c2e645 100644 --- a/init/action.yml +++ b/init/action.yml @@ -25,7 +25,7 @@ inputs: default: 'true' outputs: codeql-path: - description: The path of the CodeQL binary used for analysis + description: The path of the CodeQL binary used for analysis runs: using: 'node12' main: '../lib/init-action.js' From 54f3e52e8f64042ef67d32bd4dd41b7a640b9b74 Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 19:10:27 +0000 Subject: [PATCH 5/7] Move setOutput into try block in case it errors --- lib/init-action.js | 2 +- lib/init-action.js.map | 2 +- src/init-action.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/init-action.js b/lib/init-action.js index 381d61f871..abdcd21b00 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -92,6 +92,7 @@ async function run() { await init_1.injectWindowsTracer("Runner.Worker.exe", undefined, config, codeql, tracerConfig); } } + core.setOutput("codeql-path", config.codeQLCmd); } catch (error) { core.setFailed(error.message); @@ -100,7 +101,6 @@ async function run() { return; } await sendSuccessStatusReport(startedAt, config); - core.setOutput("codeql-path", config.codeQLCmd); } run().catch((e) => { core.setFailed(`init action failed: ${e}`); diff --git a/lib/init-action.js.map b/lib/init-action.js.map index 2edc8d3365..aa639c3588 100644 --- a/lib/init-action.js.map +++ b/lib/init-action.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAG9C,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAkBlD,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B;;IAE1B,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,K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gBAC3D,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACjC;YAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;gBAChC,MAAM,0BAAmB,CACvB,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,MAAM,EACN,YAAY,CACb,CAAC;aACH;SACF;KACF;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,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAEjD,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAG9C,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAkBlD,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B;;IAE1B,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAC/D,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,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KAAK,SAAS,EAAE;YAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE;gBAC3D,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACjC;YAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;gBAChC,MAAM,0BAAmB,CACvB,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,MAAM,EACN,YAAY,CACb,CAAC;aACH;SACF;QAED,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KACjD;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,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/init-action.ts b/src/init-action.ts index 78cc82c033..d867015ac8 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -176,6 +176,8 @@ async function run() { ); } } + + core.setOutput("codeql-path", config.codeQLCmd); } catch (error) { core.setFailed(error.message); console.log(error); @@ -191,8 +193,6 @@ async function run() { return; } await sendSuccessStatusReport(startedAt, config); - - core.setOutput("codeql-path", config.codeQLCmd); } run().catch((e) => { From c87f3021d45bb310d6736f884852a1a3c8093ad7 Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Wed, 4 Nov 2020 19:27:29 +0000 Subject: [PATCH 6/7] Expand readme to include codeql-path output example Also add example from README into workflow to confirm it is accurate. --- .github/workflows/codeql.yml | 4 ++++ README.md | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e5e35000ac..5777edbc7a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,7 +15,11 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ./init + id: init with: languages: javascript config-file: ./.github/codeql/codeql-config.yml + # example from README.md + - name: Print CodeQL Version + run: ${{steps.init.outputs.codeql-path}} version --format=json - uses: ./analyze diff --git a/README.md b/README.md index dab7930b37..e5bc673ff7 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,24 @@ By default, this will override any queries specified in a config file. If you wi queries: +, ``` -### CodeQL Path +### Calling CodeQL Directly The `init` action makes the path to CodeQL available as the output `codeql-path`. +With this you can access the `codeql` binary: + + +```yaml +- name: Initialize CodeQL + uses: github/codeql-action/init@v1 + id: init + with: + languages: javascript + +- name: Print CodeQL Version + run: ${{steps.init.outputs.codeql-path}} version --format=json +``` + ## Troubleshooting Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning). From f76124122e73adfc02a4c9b4daf413fb7bdf235f Mon Sep 17 00:00:00 2001 From: Simon Engledew Date: Thu, 5 Nov 2020 08:31:32 +0000 Subject: [PATCH 7/7] Remove output from README As this is an advanced usage it makes more sense to work to getting this included in the documentation instead. --- .github/workflows/codeql.yml | 2 +- README.md | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5777edbc7a..88ff7a0a0c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: with: languages: javascript config-file: ./.github/codeql/codeql-config.yml - # example from README.md + # confirm steps.init.outputs.codeql-path points to the codeql binary - name: Print CodeQL Version run: ${{steps.init.outputs.codeql-path}} version --format=json - uses: ./analyze diff --git a/README.md b/README.md index e5bc673ff7..6f35ee7802 100644 --- a/README.md +++ b/README.md @@ -125,24 +125,6 @@ By default, this will override any queries specified in a config file. If you wi queries: +, ``` -### Calling CodeQL Directly - -The `init` action makes the path to CodeQL available as the output `codeql-path`. - -With this you can access the `codeql` binary: - - -```yaml -- name: Initialize CodeQL - uses: github/codeql-action/init@v1 - id: init - with: - languages: javascript - -- name: Print CodeQL Version - run: ${{steps.init.outputs.codeql-path}} version --format=json -``` - ## Troubleshooting Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).