From 42235cc048519255c3a82a2e050bedcfe1e2adfd Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Tue, 4 Aug 2020 14:35:20 -0700 Subject: [PATCH] Allow the codeql-action to be run locally (#117) * Allow the codeql-action to be run locally This change allows the codeql-action to be run locally through [act](https://github.com/nektos/act). In order to run the action locally, you need to do two things: 1. Add the `CODEQL_LOCAL_RUN: true` environment variable. The only way I could figure out how to do this was to add it directly in the workflow file in an `env` block. It _should_ be possible to add it through a `.env` file and pass it to `act`, but I couldn't get it working. 2. Run this command `act -j codeql -s GITHUB_TOKEN=` Setting the `CODEQL_LOCAL_RUN` env var will fill in missing env vars that the action needs, but isn't set by `act`. It will also avoid making api calls to github that would fail locally. This is a refactoring discussed in https://github.com/github/dsp-codeql/issues/36 --- CONTRIBUTING.md | 19 ++++++++++++++++ lib/api-client.js | 6 ++++- lib/api-client.js.map | 2 +- lib/autobuild.js | 1 + lib/autobuild.js.map | 2 +- lib/config-utils.js | 4 ++-- lib/config-utils.js.map | 2 +- lib/finalize-db.js | 1 + lib/finalize-db.js.map | 2 +- lib/setup-tracer.js | 1 + lib/setup-tracer.js.map | 2 +- lib/upload-lib.js | 9 ++++++-- lib/upload-lib.js.map | 2 +- lib/util.js | 26 ++++++++++++++++++++++ lib/util.js.map | 2 +- lib/util.test.js | 31 ++++++++++++++++++++++++++ lib/util.test.js.map | 2 +- src/api-client.ts | 7 +++++- src/autobuild.ts | 1 + src/config-utils.ts | 4 ++-- src/finalize-db.ts | 1 + src/setup-tracer.ts | 1 + src/upload-lib.ts | 9 +++++--- src/util.test.ts | 49 +++++++++++++++++++++++++++++++++++++++++ src/util.ts | 29 +++++++++++++++++++++++- 25 files changed, 195 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 825b7a0913..518978eb05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,25 @@ This project also includes configuration to run tests from VSCode (with support To see the effect of your changes and to test them, push your changes in a branch and then look at the [Actions output](https://github.com/github/codeql-action/actions) for that branch. You can also exercise the code locally by running the automated tests. +### Running the action locally + +It is possible to run this action locally via [act](https://github.com/nektos/act) via the following steps: + +1. Create a GitHub [Personal Access Token](https://github.com/settings/tokens) (PAT). +1. Install [act](https://github.com/nektos/act) v0.2.10 or greater. +1. Add a `.env` file in the root of the project you are running: + + ```bash + CODEQL_LOCAL_RUN=true + + # Optional, for better logging + GITHUB_JOB= + ``` + +1. Run `act -j codeql -s GITHUB_TOKEN=` + +Running locally will generate the CodeQL database and run all the queries, but it will avoid uploading and reporting results to GitHub. Note that this must be done on a repository that _consumes_ this action, not this repository. The use case is to debug failures of this action on specific repositories. + ### Integration tests As well as the unit tests (see _Common tasks_ above), there are integration tests, defined in `.github/workflows/integration-testing.yml`. These are run by a CI check. Depending on the change you’re making, you may want to add a test to this file or extend an existing one. diff --git a/lib/api-client.js b/lib/api-client.js index a7097cf437..a2f290230b 100644 --- a/lib/api-client.js +++ b/lib/api-client.js @@ -13,7 +13,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); const github = __importStar(require("@actions/github")); const console_log_level_1 = __importDefault(require("console-log-level")); -exports.getApiClient = function () { +const util_1 = require("./util"); +exports.getApiClient = function (allowLocalRun = false) { + if (util_1.isLocalRun() && !allowLocalRun) { + throw new Error('Invalid API call in local run'); + } return new github.GitHub(core.getInput('token'), { userAgent: "CodeQL Action", log: console_log_level_1.default({ level: "debug" }) diff --git a/lib/api-client.js.map b/lib/api-client.js.map index 27f66a050c..292eda26c9 100644 --- a/lib/api-client.js.map +++ b/lib/api-client.js.map @@ -1 +1 @@ -{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsC;AACtC,wDAA0C;AAC1C,0EAAgD;AAEnC,QAAA,YAAY,GAAG;IAC1B,OAAO,IAAI,MAAM,CAAC,MAAM,CACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EACtB;QACE,SAAS,EAAE,eAAe;QAC1B,GAAG,EAAE,2BAAe,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACzC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsC;AACtC,wDAA0C;AAC1C,0EAAgD;AAEhD,iCAAoC;AAEvB,QAAA,YAAY,GAAG,UAAS,aAAa,GAAG,KAAK;IACxD,IAAI,iBAAU,EAAE,IAAI,CAAC,aAAa,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KAClD;IACD,OAAO,IAAI,MAAM,CAAC,MAAM,CACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EACtB;QACE,SAAS,EAAE,eAAe;QAC1B,GAAG,EAAE,2BAAe,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;KACzC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/autobuild.js b/lib/autobuild.js index a4714ae875..68a200b07c 100644 --- a/lib/autobuild.js +++ b/lib/autobuild.js @@ -27,6 +27,7 @@ async function run() { const startedAt = new Date(); let language; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('autobuild', true) || !await util.sendStatusReport(await util.createStatusReportBase('autobuild', 'starting', startedAt), true)) { return; diff --git a/lib/autobuild.js.map b/lib/autobuild.js.map index 1d22cdacd4..507cc34745 100644 --- a/lib/autobuild.js.map +++ b/lib/autobuild.js.map @@ -1 +1 @@ -{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AAEtC,qCAAqC;AACrC,gEAAkD;AAClD,6CAA+B;AAS/B,KAAK,UAAU,yBAAyB,CACtC,SAAe,EACf,YAAsB,EACtB,eAAwB,EACxB,KAAa;;IAEb,MAA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IAAI,CAAC,OAAO,CAAC,wDAAwD,CAAC,CAAC;SAC3L;QAED,IAAI,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,kBAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEpC,IAAI,CAAC,QAAQ,EAAE,CAAC;KAEjB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,kIAAkI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACnK,MAAM,yBAAyB,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QACxE,OAAO;KACR;IAED,MAAM,yBAAyB,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACd,IAAI,CAAC,SAAS,CAAC,4BAA4B,GAAG,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/config-utils.js b/lib/config-utils.js index b2f75891e3..23ad7ac3ac 100644 --- a/lib/config-utils.js +++ b/lib/config-utils.js @@ -301,7 +301,7 @@ async function getLanguagesInRepo() { let owner = repo_nwo[0]; let repo = repo_nwo[1]; core.debug(`GitHub repo ${owner} ${repo}`); - const response = await api.getApiClient().request("GET /repos/:owner/:repo/languages", ({ + const response = await api.getApiClient(true).request("GET /repos/:owner/:repo/languages", ({ owner, repo })); @@ -491,7 +491,7 @@ async function getRemoteConfig(configFile) { if (pieces === null || pieces.groups === undefined || pieces.length < 5) { throw new Error(getConfigFileRepoFormatInvalidMessage(configFile)); } - const response = await api.getApiClient().repos.getContents({ + const response = await api.getApiClient(true).repos.getContents({ owner: pieces.groups.owner, repo: pieces.groups.repo, path: pieces.groups.path, diff --git a/lib/config-utils.js.map b/lib/config-utils.js.map index 478bfb686a..ca1227ac8d 100644 --- a/lib/config-utils.js.map +++ b/lib/config-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"config-utils.js","sourceRoot":"","sources":["../src/config-utils.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AACtC,gDAAkC;AAClC,uCAAyB;AACzB,8CAAgC;AAChC,2CAA6B;AAE7B,kDAAoC;AACpC,qCAA2D;AAC3D,oEAAsD;AACtD,6CAA+B;AAE/B,qDAAqD;AACrD,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,gCAAgC,GAAG,yBAAyB,CAAC;AACnE,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAC7C,MAAM,cAAc,GAAG,OAAO,CAAC;AAgD/B;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAAmC;IAC/D,QAAQ,EAAE;QACR,uDAAuD;QACvD,0DAA0D;KAC3D;CACF,CAAC;AAEF,SAAS,eAAe,CAAC,QAAQ,EAAE,KAAK;IACtC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC9C,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,eAAqC;IAC5D,MAAM,kBAAkB,GAAG,eAAe,CAAC,kBAAkB,CAAC;IAC9D,MAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClE,IAAI,yBAAyB,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1C,MAAM,IAAI,KAAK,CAAC,mDAAmD;YACjE,4DAA4D;YAC5D,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,C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AY,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,SAAS;IAC7B,MAAM,UAAU,GAAG,yBAAyB,EAAE,CAAC;IAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,yFAAyF,CAAC,CAAC;KAC5G;IACD,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACzD,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC;AATD,8BASC"} \ No newline at end of file diff --git a/lib/finalize-db.js b/lib/finalize-db.js index bd7c6bf015..df8e3289a9 100644 --- a/lib/finalize-db.js +++ b/lib/finalize-db.js @@ -82,6 +82,7 @@ async function run() { let queriesStats = undefined; let uploadStats = undefined; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('finish', true) || !await util.sendStatusReport(await util.createStatusReportBase('finish', 'starting', startedAt), true)) { return; diff --git a/lib/finalize-db.js.map b/lib/finalize-db.js.map index 5d0812435f..0c5872b3d5 100644 --- a/lib/finalize-db.js.map +++ b/lib/finalize-db.js.map @@ -1 +1 @@ -{"version":3,"file":"finalize-db.js","sourceRoot":"","sources":["../src/finalize-db.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AACtC,gDAAkC;AAClC,uCAAyB;AACzB,2CAA6B;AAE7B,qCAAqC;AACrC,4DAA8C;AAC9C,gEAAkD;AAClD,yDAA2C;AAC3C,6CAA+B;AAiC/B,KAAK,UAAU,gBAAgB,CAC7B,SAAe,EACf,YAA6C,EAC7C,WAAsD,EACtD,KAAa;;IAEb,MAAM,MAAM,GAAG,OAAA,YAAY,0CAAE,wBAAwB,MAAK,SAAS,IAAI,KAAK,KAAK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MAAM,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;SACpD;KAEF;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,gBAAgB,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QACpE,OAAO;KACR;IAED,MAAM,gBAAgB,CAAC,SAAS,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACd,IAAI,CAAC,SAAS,CAAC,yBAAyB,GAAG,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/setup-tracer.js b/lib/setup-tracer.js index f959795df0..3cead23c11 100644 --- a/lib/setup-tracer.js +++ b/lib/setup-tracer.js @@ -145,6 +145,7 @@ async function run() { let config; let codeql; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('init', false) || !await util.sendStatusReport(await util.createStatusReportBase('init', 'starting', startedAt), true)) { return; diff --git a/lib/setup-tracer.js.map b/lib/setup-tracer.js.map index c1d03cb7ae..189d710cce 100644 --- a/lib/setup-tracer.js.map +++ b/lib/setup-tracer.js.map @@ -1 +1 @@ -{"version":3,"file":"setup-tracer.js","sourceRoot":"","sources":["../src/setup-tracer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AACtC,oDAAsC;AACtC,gDAAkC;AAClC,uCAAyB;AACzB,2CAA6B;AAE7B,gEAAkD;AAClD,qCAA+C;AAC/C,4DAA8C;AAC9C,gEAAkD;AAClD,6CAA+B;AAO/B,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAClC,CAAC,yBAAyB;IACxB,AADyB;IACvB,eAAe;IACjB,AADkB;IAChB,8BAA8B;IAChC,AADiC;IAC/B,wBAAwB;IA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AE,MAAM,CAAC,CAAC;AACtE,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACd,IAAI,CAAC,SAAS,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 1e145c9826..24c399e1b1 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -194,8 +194,13 @@ async function uploadFiles(sarifFiles) { core.debug("Base64 zipped upload size: " + zippedUploadSizeBytes + " bytes"); const numResultInSarif = countResultsInSarif(sarifPayload); core.debug("Number of results in upload: " + numResultInSarif); - // Make the upload - await uploadPayload(payload); + if (!util.isLocalRun()) { + // Make the upload + await uploadPayload(payload); + } + else { + core.debug("Not uploading because this is a local run."); + } core.endGroup(); return { raw_upload_size_bytes: rawUploadSizeBytes, diff --git a/lib/upload-lib.js.map b/lib/upload-lib.js.map index 28eff5262c..c7edf4edb4 100644 --- a/lib/upload-lib.js.map +++ b/lib/upload-lib.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-lib.js","sourceRoot":"","sources":["../src/upload-lib.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsC;AACtC,wDAA+B;AAC/B,uCAAyB;AACzB,uDAAyC;AACzC,2CAA6B;AAC7B,gDAAwB;AAExB,kDAAoC;AACpC,6DAA+C;AAC/C,gEAAkD;AAClD,6CAA+B;AAE/B,mEAAmE;AACnE,qDAAqD;AACrD,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,IAAI,aAAa,GAAG;QAClB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAW;KAClB,CAAC;IAEF,KAAK,IAAI,SAAS,IAAI,UAAU,EAAE;QAChC,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,C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AC,YAAY,CAAC,CAAC;IAC3D,IAAI,CAAC,KAAK,CAAC,+BAA+B,GAAG,gBAAgB,CAAC,CAAC;IAE/D,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;QACtB,kBAAkB;QAClB,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;KAC9B;SAAM;QACL,IAAI,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC1D;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;IAEhB,OAAO;QACL,qBAAqB,EAAE,kBAAkB;QACzC,wBAAwB,EAAE,qBAAqB;QAC/C,oBAAoB,EAAE,gBAAgB;KACvC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/lib/util.js b/lib/util.js index 5599600725..0f6b28a2bc 100644 --- a/lib/util.js +++ b/lib/util.js @@ -67,6 +67,25 @@ function getRequiredEnvParam(paramName) { return value; } exports.getRequiredEnvParam = getRequiredEnvParam; +function isLocalRun() { + return !!process.env.CODEQL_LOCAL_RUN + && process.env.CODEQL_LOCAL_RUN !== 'false' + && process.env.CODEQL_LOCAL_RUN !== '0'; +} +exports.isLocalRun = isLocalRun; +/** + * Ensures all required environment variables are set in the context of a local run. + */ +function prepareLocalRunEnvironment() { + if (!isLocalRun()) { + return; + } + core.debug('Action is running locally.'); + if (!process.env.GITHUB_JOB) { + core.exportVariable('GITHUB_JOB', 'UNKNOWN-JOB'); + } +} +exports.prepareLocalRunEnvironment = prepareLocalRunEnvironment; /** * Gets the SHA of the commit that is currently checked out. */ @@ -99,6 +118,9 @@ exports.getCommitOid = getCommitOid; * Get the path of the currently executing workflow. */ async function getWorkflowPath() { + if (isLocalRun()) { + return 'LOCAL'; + } const repo_nwo = getRequiredEnvParam('GITHUB_REPOSITORY').split("/"); const owner = repo_nwo[0]; const repo = repo_nwo[1]; @@ -221,6 +243,10 @@ async function sendStatusReport(statusReport, ignoreFailures) { core.debug("Not sending status report to GitHub Enterprise"); return true; } + if (isLocalRun()) { + core.debug("Not sending status report because this is a local run"); + return true; + } const statusReportJSON = JSON.stringify(statusReport); core.debug('Sending status report: ' + statusReportJSON); const nwo = getRequiredEnvParam("GITHUB_REPOSITORY"); diff --git a/lib/util.js.map b/lib/util.js.map index c5a5d1234d..17a0e41f09 100644 --- a/lib/util.js.map +++ b/lib/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAsC;AACtC,oDAAsC;AACtC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAE7B,kDAAoC;AACpC,gEAAkD;AAElD;;GAEG;AACU,QAAA,qBAAqB,GAAG,wBAAwB,CAAC;AAE9D;;;GAGG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,6BAAqB,CAAC;AAChE,CAAC;AAFD,8CAEC;AAED;;GAEG;AACH,SAAgB,YAAY;IAC1B,OAAO,iBAAiB,EAAE,KAAK,6BAAqB,CAAC;AACvD,CAAC;AAFD,oCAEC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,UAAkB,EAAE,uBAAgC;IAE/E,6DAA6D;IAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACtC,IAAI,GAAG,KAAK,SAAS,EAAE;QACrB,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;KACb;IAED,4EAA4E;IAC5E,IAAI,uBAAuB,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,4BAA4B,CAAC,KAAK,SAAS,EAAE;QAChG,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,UAAU,GAAG,8EAA8E,CAAC,CAAC;QAC5H,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAhBD,oCAgBC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAC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CAAC;AACrD,CAAC;AAfD,sCAeC;AAED;;;;;GAKG;AACH,SAAgB,cAAc;IAC5B,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,gBAAgB,EAAE;QACpB,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACtC,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,4BAA4B,gBAAgB,eAAe,CAAC,CAAC;SAC9E;QACD,MAAM,UAAU,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;QACpC,IAAI,UAAU,GAAG,UAAU,EAAE;YAC3B,UAAU,GAAG,UAAU,CAAC;SACzB;QACD,MAAM,UAAU,GAAG,CAAC,UAAU,CAAC;QAC/B,IAAI,UAAU,GAAG,UAAU,EAAE;YAC3B,UAAU,GAAG,UAAU,CAAC;SACzB;KACF;IACD,OAAO,aAAa,UAAU,EAAE,CAAC;AACnC,CAAC;AAlBD,wCAkBC"} \ No newline at end of file diff --git a/lib/util.test.js b/lib/util.test.js index aa6d138269..c92cd72a46 100644 --- a/lib/util.test.js +++ b/lib/util.test.js @@ -61,4 +61,35 @@ ava_1.default('getRef() throws on the empty string', t => { process.env["GITHUB_REF"] = ""; t.throws(util.getRef); }); +ava_1.default('isLocalRun() runs correctly', t => { + const origLocalRun = process.env.CODEQL_LOCAL_RUN; + process.env.CODEQL_LOCAL_RUN = ''; + t.assert(!util.isLocalRun()); + process.env.CODEQL_LOCAL_RUN = 'false'; + t.assert(!util.isLocalRun()); + process.env.CODEQL_LOCAL_RUN = '0'; + t.assert(!util.isLocalRun()); + process.env.CODEQL_LOCAL_RUN = 'true'; + t.assert(util.isLocalRun()); + process.env.CODEQL_LOCAL_RUN = 'hucairz'; + t.assert(util.isLocalRun()); + process.env.CODEQL_LOCAL_RUN = origLocalRun; +}); +ava_1.default('prepareEnvironment() when a local run', t => { + const origLocalRun = process.env.CODEQL_LOCAL_RUN; + process.env.CODEQL_LOCAL_RUN = 'false'; + process.env.GITHUB_JOB = 'YYY'; + util.prepareLocalRunEnvironment(); + // unchanged + t.deepEqual(process.env.GITHUB_JOB, 'YYY'); + process.env.CODEQL_LOCAL_RUN = 'true'; + util.prepareLocalRunEnvironment(); + // unchanged + t.deepEqual(process.env.GITHUB_JOB, 'YYY'); + process.env.GITHUB_JOB = ''; + util.prepareLocalRunEnvironment(); + // updated + t.deepEqual(process.env.GITHUB_JOB, 'UNKNOWN-JOB'); + process.env.CODEQL_LOCAL_RUN = origLocalRun; +}); //# sourceMappingURL=util.test.js.map \ No newline at end of file diff --git a/lib/util.test.js.map b/lib/util.test.js.map index eeb5a02369..df299e5592 100644 --- a/lib/util.test.js.map +++ b/lib/util.test.js.map @@ -1 +1 @@ -{"version":3,"file":"util.test.js","sourceRoot":"","sources":["../src/util.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAuB;AACvB,uCAAyB;AACzB,uCAAyB;AAEzB,mDAA2C;AAC3C,6CAA+B;AAE/B,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACvB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,GAAG,mCAAmC,EAAE,MAAM,CAAC,CAAC;IACvF,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sDAAsD,EAAE,CAAC,CAAC,EAAE;IAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,C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IAE5B,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,YAAY,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,uCAAuC,EAAE,CAAC,CAAC,EAAE;IAChD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAElD,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,OAAO,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC;IAE/B,IAAI,CAAC,0BAA0B,EAAE,CAAC;IAElC,YAAY;IACZ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE3C,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,MAAM,CAAC;IAEtC,IAAI,CAAC,0BAA0B,EAAE,CAAC;IAElC,YAAY;IACZ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE3C,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC;IAE5B,IAAI,CAAC,0BAA0B,EAAE,CAAC;IAElC,UAAU;IACV,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAEnD,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,YAAY,CAAC;AAC9C,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/api-client.ts b/src/api-client.ts index 1481a79ea8..cee534d3a8 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -2,7 +2,12 @@ import * as core from "@actions/core"; import * as github from "@actions/github"; import consoleLogLevel from "console-log-level"; -export const getApiClient = function() { +import { isLocalRun } from "./util"; + +export const getApiClient = function(allowLocalRun = false) { + if (isLocalRun() && !allowLocalRun) { + throw new Error('Invalid API call in local run'); + } return new github.GitHub( core.getInput('token'), { diff --git a/src/autobuild.ts b/src/autobuild.ts index 6b70119d8c..33ad0d9933 100644 --- a/src/autobuild.ts +++ b/src/autobuild.ts @@ -36,6 +36,7 @@ async function run() { const startedAt = new Date(); let language; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('autobuild', true) || !await util.sendStatusReport(await util.createStatusReportBase('autobuild', 'starting', startedAt), true)) { return; diff --git a/src/config-utils.ts b/src/config-utils.ts index 87f97b0c00..9650acba9c 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -423,7 +423,7 @@ async function getLanguagesInRepo(): Promise { let repo = repo_nwo[1]; core.debug(`GitHub repo ${owner} ${repo}`); - const response = await api.getApiClient().request("GET /repos/:owner/:repo/languages", ({ + const response = await api.getApiClient(true).request("GET /repos/:owner/:repo/languages", ({ owner, repo })); @@ -636,7 +636,7 @@ async function getRemoteConfig(configFile: string): Promise { throw new Error(getConfigFileRepoFormatInvalidMessage(configFile)); } - const response = await api.getApiClient().repos.getContents({ + const response = await api.getApiClient(true).repos.getContents({ owner: pieces.groups.owner, repo: pieces.groups.repo, path: pieces.groups.path, diff --git a/src/finalize-db.ts b/src/finalize-db.ts index 4c48d1d982..c08f148479 100644 --- a/src/finalize-db.ts +++ b/src/finalize-db.ts @@ -125,6 +125,7 @@ async function run() { let queriesStats: QueriesStatusReport | undefined = undefined; let uploadStats: upload_lib.UploadStatusReport | undefined = undefined; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('finish', true) || !await util.sendStatusReport(await util.createStatusReportBase('finish', 'starting', startedAt), true)) { return; diff --git a/src/setup-tracer.ts b/src/setup-tracer.ts index 5e0a606643..05dd3b4c93 100644 --- a/src/setup-tracer.ts +++ b/src/setup-tracer.ts @@ -177,6 +177,7 @@ async function run() { let codeql: CodeQL; try { + util.prepareLocalRunEnvironment(); if (util.should_abort('init', false) || !await util.sendStatusReport(await util.createStatusReportBase('init', 'starting', startedAt), true)) { return; diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 7cb4383343..f0ab8b798a 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -218,9 +218,12 @@ async function uploadFiles(sarifFiles: string[]): Promise { const numResultInSarif = countResultsInSarif(sarifPayload); core.debug("Number of results in upload: " + numResultInSarif); - // Make the upload - await uploadPayload(payload); - + if (!util.isLocalRun()) { + // Make the upload + await uploadPayload(payload); + } else { + core.debug("Not uploading because this is a local run."); + } core.endGroup(); return { diff --git a/src/util.test.ts b/src/util.test.ts index ade71e4559..844c749a45 100644 --- a/src/util.test.ts +++ b/src/util.test.ts @@ -67,3 +67,52 @@ test('getRef() throws on the empty string', t => { process.env["GITHUB_REF"] = ""; t.throws(util.getRef); }); + +test('isLocalRun() runs correctly', t => { + const origLocalRun = process.env.CODEQL_LOCAL_RUN; + + process.env.CODEQL_LOCAL_RUN = ''; + t.assert(!util.isLocalRun()); + + process.env.CODEQL_LOCAL_RUN = 'false'; + t.assert(!util.isLocalRun()); + + process.env.CODEQL_LOCAL_RUN = '0'; + t.assert(!util.isLocalRun()); + + process.env.CODEQL_LOCAL_RUN = 'true'; + t.assert(util.isLocalRun()); + + process.env.CODEQL_LOCAL_RUN = 'hucairz'; + t.assert(util.isLocalRun()); + + process.env.CODEQL_LOCAL_RUN = origLocalRun; +}); + +test('prepareEnvironment() when a local run', t => { + const origLocalRun = process.env.CODEQL_LOCAL_RUN; + + process.env.CODEQL_LOCAL_RUN = 'false'; + process.env.GITHUB_JOB = 'YYY'; + + util.prepareLocalRunEnvironment(); + + // unchanged + t.deepEqual(process.env.GITHUB_JOB, 'YYY'); + + process.env.CODEQL_LOCAL_RUN = 'true'; + + util.prepareLocalRunEnvironment(); + + // unchanged + t.deepEqual(process.env.GITHUB_JOB, 'YYY'); + + process.env.GITHUB_JOB = ''; + + util.prepareLocalRunEnvironment(); + + // updated + t.deepEqual(process.env.GITHUB_JOB, 'UNKNOWN-JOB'); + + process.env.CODEQL_LOCAL_RUN = origLocalRun; +}); diff --git a/src/util.ts b/src/util.ts index 8655bd275b..03b5709cef 100644 --- a/src/util.ts +++ b/src/util.ts @@ -64,6 +64,26 @@ export function getRequiredEnvParam(paramName: string): string { return value; } +export function isLocalRun(): boolean { + return !!process.env.CODEQL_LOCAL_RUN + && process.env.CODEQL_LOCAL_RUN !== 'false' + && process.env.CODEQL_LOCAL_RUN !== '0'; +} + +/** + * Ensures all required environment variables are set in the context of a local run. + */ +export function prepareLocalRunEnvironment() { + if (!isLocalRun()) { + return; + } + + core.debug('Action is running locally.'); + if (!process.env.GITHUB_JOB) { + core.exportVariable('GITHUB_JOB', 'UNKNOWN-JOB'); + } +} + /** * Gets the SHA of the commit that is currently checked out. */ @@ -95,6 +115,9 @@ export async function getCommitOid(): Promise { * Get the path of the currently executing workflow. */ async function getWorkflowPath(): Promise { + if (isLocalRun()) { + return 'LOCAL'; + } const repo_nwo = getRequiredEnvParam('GITHUB_REPOSITORY').split("/"); const owner = repo_nwo[0]; const repo = repo_nwo[1]; @@ -273,8 +296,12 @@ export async function sendStatusReport( return true; } - const statusReportJSON = JSON.stringify(statusReport); + if (isLocalRun()) { + core.debug("Not sending status report because this is a local run"); + return true; + } + const statusReportJSON = JSON.stringify(statusReport); core.debug('Sending status report: ' + statusReportJSON); const nwo = getRequiredEnvParam("GITHUB_REPOSITORY");