From a92e8775d8770d4f6f8f6a0a66e956e9235db713 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Mon, 28 Feb 2022 11:56:11 -0800 Subject: [PATCH 1/2] Use the `checkout_path` for getting the commit oid This commit also adds a new integration check to verify this. When running in test mode, payloads will not be uploaded. Instead, they will be saved to disk so that they can be inspected later. --- .github/workflows/__with-checkout-path.yml | 137 +++++++++++++++++++++ CHANGELOG.md | 3 +- lib/actions-util.js | 13 +- lib/actions-util.js.map | 2 +- lib/upload-lib.js | 7 +- lib/upload-lib.js.map | 2 +- pr-checks/checks/with-checkout-path.yml | 101 +++++++++++++++ src/actions-util.ts | 20 ++- src/upload-lib.ts | 14 ++- 9 files changed, 284 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/__with-checkout-path.yml create mode 100644 pr-checks/checks/with-checkout-path.yml diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml new file mode 100644 index 0000000000..50d7a2bbf0 --- /dev/null +++ b/.github/workflows/__with-checkout-path.yml @@ -0,0 +1,137 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pip install ruamel.yaml && python3 sync.py +# to regenerate this file. + +name: PR Check - Use a custom `checkout_path` +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + branches: + - main + - v1 + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: {} +jobs: + with-checkout-path: + strategy: + matrix: + version: + - stable-20210308 + - stable-20210319 + - stable-20210809 + - cached + - latest + - nightly-latest + os: [ubuntu-latest, macos-latest, windows-2019] + name: Use a custom `checkout_path` + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: Prepare test + id: prepare-test + uses: ./.github/prepare-test + with: + version: ${{ matrix.version }} + - uses: actions/checkout@v2 + with: + ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + path: x/y/z/some-path + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + # it's enough to test one compiled language and one interpreted language + languages: java,javascript + source-path: x/y/z/some-path/tests/multi-language-repo + debug: true + + - name: Build code + shell: bash + run: x/y/z/some-path/tests/multi-language-repo/build.sh + - uses: ./../action/analyze + with: + checkout_path: x/y/z/some-path/tests/multi-language-repo + ref: v1.1.0 + sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + upload: false + env: + TEST_MODE: true + + - name: Verify SARIF after analyze + shell: bash + run: | + EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" + EXPECTED_REF="v1.1.0" + EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" + + ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" + ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" + ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" + + if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then + echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then + echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then + echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + # payload.json will be recreated in the next step. + rm -f "$RUNNER_TEMP/payload.json" + + - uses: ./../action/upload-sarif + with: + ref: v1.1.0 + sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + checkout_path: x/y/z/some-path/tests/multi-language-repo + env: + TEST_MODE: true + + - name: Verify SARIF after upload + shell: bash + run: | + EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" + EXPECTED_REF="v1.1.0" + EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" + + ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" + ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" + ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" + + if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then + echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then + echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then + echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + env: + INTERNAL_CODEQL_ACTION_DEBUG_LOC: true diff --git a/CHANGELOG.md b/CHANGELOG.md index a54c5a2cd9..462cd46e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ No user facing changes. ## 1.1.3 - 23 Feb 2022 -- Fix bug where the CLR traces can continue tracing even after tracing should be stopped. [#938](https://github.com/github/codeql-action/pull/938) +- Fix a bug where the CLR traces can continue tracing even after tracing should be stopped. [#938](https://github.com/github/codeql-action/pull/938) +- Fix a bug where an invalid `commit_oid` was being sent to code scanning when a custom checkout path was being used. [#956](https://github.com/github/codeql-action/pull/956) ## 1.1.2 - 17 Feb 2022 diff --git a/lib/actions-util.js b/lib/actions-util.js index 2102ab64a7..3c1f2ca88b 100644 --- a/lib/actions-util.js +++ b/lib/actions-util.js @@ -73,7 +73,7 @@ exports.getToolCacheDirectory = getToolCacheDirectory; /** * Gets the SHA of the commit that is currently checked out. */ -const getCommitOid = async function (ref = "HEAD") { +const getCommitOid = async function (checkoutPath, ref = "HEAD") { // Try to use git to get the current commit SHA. If that fails then // log but otherwise silently fall back to using the SHA from the environment. // The only time these two values will differ is during analysis of a PR when @@ -93,6 +93,7 @@ const getCommitOid = async function (ref = "HEAD") { process.stderr.write(data); }, }, + cwd: checkoutPath, }).exec(); return commitOid.trim(); } @@ -112,6 +113,7 @@ const determineMergeBaseCommitOid = async function () { return undefined; } const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); + const checkoutPath = getRequiredInput("checkout_path"); try { let commitOid = ""; let baseOid = ""; @@ -136,6 +138,7 @@ const determineMergeBaseCommitOid = async function () { process.stderr.write(data); }, }, + cwd: checkoutPath, }).exec(); // Let's confirm our assumptions: We had a merge commit and the parsed parent data looks correct if (commitOid === mergeSha && @@ -424,6 +427,9 @@ async function getRef() { // or in the form "refs/pull/N/merge" on a pull_request event const refInput = (0, exports.getOptionalInput)("ref"); const shaInput = (0, exports.getOptionalInput)("sha"); + const checkoutPath = (0, exports.getOptionalInput)("checkout_path") || + (0, exports.getOptionalInput)("source-root") || + (0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"); const hasRefInput = !!refInput; const hasShaInput = !!shaInput; // If one of 'ref' or 'sha' are provided, both are required @@ -445,15 +451,14 @@ async function getRef() { if (!pull_ref_regex.test(ref)) { return ref; } - const head = await (0, exports.getCommitOid)("HEAD"); + const head = await (0, exports.getCommitOid)(checkoutPath, "HEAD"); // in actions/checkout@v2 we can check if git rev-parse HEAD == GITHUB_SHA // in actions/checkout@v1 this may not be true as it checks out the repository // using GITHUB_REF. There is a subtle race condition where // git rev-parse GITHUB_REF != GITHUB_SHA, so we must check // git git-parse GITHUB_REF == git rev-parse HEAD instead. const hasChangedRef = sha !== head && - (await (0, exports.getCommitOid)(ref.replace(/^refs\/pull\//, "refs/remotes/pull/"))) !== - head; + (await (0, exports.getCommitOid)(checkoutPath, ref.replace(/^refs\/pull\//, "refs/remotes/pull/"))) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); core.debug(`No longer on merge commit, rewriting ref from ${ref} to ${newRef}.`); diff --git a/lib/actions-util.js.map b/lib/actions-util.js.map index e74d66f57c..81fff98d94 100644 --- a/lib/actions-util.js.map +++ b/lib/actions-util.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AACpD,8CAAgC;AAEhC,kDAAoC;AACpC,gEAAkD;AAClD,iCAKgB;AAEhB;;;GAGG;AAEH;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B;AAEF,SAAgB,qBAAqB;IACnC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG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AAS,gBAAgB;IACvB,MAAM,aAAa,GAAG,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,CAAC;IAC/D,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,2CAA2C,aAAa,KAAK,CAAC,EAAE,CACjE,CAAC;KACH;AACH,CAAC;AAED,uFAAuF;AACvF,0DAA0D;AACnD,KAAK,UAAU,wBAAwB;;IAC5C,sDAAsD;IACtD,IAAI,UAAU,GAAG,MAAM,MAAM,EAAE,CAAC;IAChC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC;QAC/C,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC;QACzC,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,cAAc,CAAC;IAExD,OAAO,UAAU,KAAK,aAAa,CAAC;AACtC,CAAC;AAXD,4DAWC;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC"} \ No newline at end of file +{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AACpD,8CAAgC;AAEhC,kDAAoC;AACpC,gEAAkD;AAClD,iCAKgB;AAEhB;;;GAGG;AAEH;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QA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AAa,CAAC,MAAM,CAAC;QACzC,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,cAAc,CAAC;IAExD,OAAO,UAAU,KAAK,aAAa,CAAC;AACtC,CAAC;AAXD,4DAWC;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 3290c42063..aaf58f87f5 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -95,7 +95,10 @@ async function uploadPayload(payload, repositoryNwo, apiDetails, logger) { // If in test mode we don't want to upload the results const testMode = process.env["TEST_MODE"] === "true" || false; if (testMode) { - logger.debug("In test mode. Results are not uploaded."); + const payloadSaveFile = path.join(actionsUtil.getTemporaryDirectory(), "payload.json"); + logger.info(`In test mode. Results are not uploaded. Saving to ${payloadSaveFile}`); + logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); + fs.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return; } const client = api.getApiClient(apiDetails); @@ -134,7 +137,7 @@ exports.findSarifFilesInDir = findSarifFilesInDir; // depending on what the path happens to refer to. // Returns true iff the upload occurred and succeeded async function uploadFromActions(sarifPath, gitHubVersion, apiDetails, logger) { - return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getOptionalInput("category"), util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), gitHubVersion, apiDetails, logger); + return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(actionsUtil.getRequiredInput("checkout_path")), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getOptionalInput("category"), util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getRequiredInput("matrix"), gitHubVersion, apiDetails, logger); } exports.uploadFromActions = uploadFromActions; // Uploads a single sarif file or a directory of sarif files diff --git a/lib/upload-lib.js.map b/lib/upload-lib.js.map index e3d18e9bdc..6c4d4d2836 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,uCAAyB;AACzB,2CAA6B;AAC7B,gDAAwB;AAExB,oDAAsC;AACtC,wDAA+B;AAC/B,uDAAyC;AACzC,+CAAiC;AAEjC,4DAA8C;AAC9C,kDAAoC;AACpC,6DAA+C;AAE/C,6CAAiE;AACjE,gEAAkD;AAClD,6CAA+B;AAG/B,mEAAmE;AACnE,qDAAqD;AACrD,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,MAAM,aAAa,GAAc;QAC/B,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;KACT,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CACtB,CAAC;QACf,sBAAsB;QACtB,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAClC,aAAa,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SAC7C;aAAM,IAAI,aAAa,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AAC,UAAU,CAAC,EAAE;YACjE,MAAM,cAAc,GAAG,uBAAuB,QAAQ,EAAE,CAAC;YACzD,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;gBAC/B,MAAM,IAAI,KAAK,CACb,2HAA2H;oBACzH,yEAAyE;oBACzE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CACpE,CAAC;aACH;YACD,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;SACrD;KACF;AACH,CAAC;AA1BD,wDA0BC;AAED;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,GAAY;IAC5B,OAAO,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,GAAG,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/pr-checks/checks/with-checkout-path.yml b/pr-checks/checks/with-checkout-path.yml new file mode 100644 index 0000000000..6aa75be128 --- /dev/null +++ b/pr-checks/checks/with-checkout-path.yml @@ -0,0 +1,101 @@ +name: "Use a custom `checkout_path`" +description: "Checks that a custom `checkout_path` will find the proper commit_oid" +# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of +# `windows-latest`. +# Must test on all three platforms since this test does path manipulation +os: [ubuntu-latest, macos-latest, windows-2019] +steps: + # Check out the actions repo again, but at a different location. + # choose an arbitrary SHA so that we can later test that the commit_oid is not from main + - uses: actions/checkout@v2 + with: + ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + path: x/y/z/some-path + - uses: ./../action/init + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + # it's enough to test one compiled language and one interpreted language + languages: java,javascript + source-path: x/y/z/some-path/tests/multi-language-repo + debug: true + + - name: Build code + shell: bash + run: x/y/z/some-path/tests/multi-language-repo/build.sh + - uses: ./../action/analyze + with: + checkout_path: x/y/z/some-path/tests/multi-language-repo + ref: v1.1.0 + sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + upload: false + env: + TEST_MODE: true + + - name: Verify SARIF after analyze + shell: bash + run: | + EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" + EXPECTED_REF="v1.1.0" + EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" + + ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" + ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" + ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" + + if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then + echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then + echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then + echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + # payload.json will be recreated in the next step. + rm -f "$RUNNER_TEMP/payload.json" + + - uses: ./../action/upload-sarif + with: + ref: v1.1.0 + sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 + checkout_path: x/y/z/some-path/tests/multi-language-repo + env: + TEST_MODE: true + + - name: Verify SARIF after upload + shell: bash + run: | + EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" + EXPECTED_REF="v1.1.0" + EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" + + ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" + ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" + ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" + + if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then + echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then + echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi + + if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then + echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" + echo "$RUNNER_TEMP/payload.json" + exit 1 + fi diff --git a/src/actions-util.ts b/src/actions-util.ts index 2776635672..08c656505b 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -60,7 +60,10 @@ export function getToolCacheDirectory(): string { /** * Gets the SHA of the commit that is currently checked out. */ -export const getCommitOid = async function (ref = "HEAD"): Promise { +export const getCommitOid = async function ( + checkoutPath: string, + ref = "HEAD" +): Promise { // Try to use git to get the current commit SHA. If that fails then // log but otherwise silently fall back to using the SHA from the environment. // The only time these two values will differ is during analysis of a PR when @@ -83,6 +86,7 @@ export const getCommitOid = async function (ref = "HEAD"): Promise { process.stderr.write(data); }, }, + cwd: checkoutPath, } ).exec(); return commitOid.trim(); @@ -107,6 +111,7 @@ export const determineMergeBaseCommitOid = async function (): Promise< } const mergeSha = getRequiredEnvParam("GITHUB_SHA"); + const checkoutPath = getRequiredInput("checkout_path"); try { let commitOid = ""; @@ -134,6 +139,7 @@ export const determineMergeBaseCommitOid = async function (): Promise< process.stderr.write(data); }, }, + cwd: checkoutPath, } ).exec(); @@ -498,6 +504,10 @@ export async function getRef(): Promise { // or in the form "refs/pull/N/merge" on a pull_request event const refInput = getOptionalInput("ref"); const shaInput = getOptionalInput("sha"); + const checkoutPath = + getOptionalInput("checkout_path") || + getOptionalInput("source-root") || + getRequiredEnvParam("GITHUB_WORKSPACE"); const hasRefInput = !!refInput; const hasShaInput = !!shaInput; @@ -526,7 +536,7 @@ export async function getRef(): Promise { return ref; } - const head = await getCommitOid("HEAD"); + const head = await getCommitOid(checkoutPath, "HEAD"); // in actions/checkout@v2 we can check if git rev-parse HEAD == GITHUB_SHA // in actions/checkout@v1 this may not be true as it checks out the repository @@ -535,8 +545,10 @@ export async function getRef(): Promise { // git git-parse GITHUB_REF == git rev-parse HEAD instead. const hasChangedRef = sha !== head && - (await getCommitOid(ref.replace(/^refs\/pull\//, "refs/remotes/pull/"))) !== - head; + (await getCommitOid( + checkoutPath, + ref.replace(/^refs\/pull\//, "refs/remotes/pull/") + )) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); diff --git a/src/upload-lib.ts b/src/upload-lib.ts index ed01be097d..26422ae6f8 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -100,7 +100,15 @@ async function uploadPayload( // If in test mode we don't want to upload the results const testMode = process.env["TEST_MODE"] === "true" || false; if (testMode) { - logger.debug("In test mode. Results are not uploaded."); + const payloadSaveFile = path.join( + actionsUtil.getTemporaryDirectory(), + "payload.json" + ); + logger.info( + `In test mode. Results are not uploaded. Saving to ${payloadSaveFile}` + ); + logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); + fs.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return; } @@ -165,7 +173,9 @@ export async function uploadFromActions( return await uploadFiles( getSarifFilePaths(sarifPath), parseRepositoryNwo(util.getRequiredEnvParam("GITHUB_REPOSITORY")), - await actionsUtil.getCommitOid(), + await actionsUtil.getCommitOid( + actionsUtil.getRequiredInput("checkout_path") + ), await actionsUtil.getRef(), await actionsUtil.getAnalysisKey(), actionsUtil.getOptionalInput("category"), From d068f5372a525973dd28b4c177cf8d61079b7941 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Tue, 1 Mar 2022 13:58:50 -0800 Subject: [PATCH 2/2] Fix failing tests --- .github/workflows/__with-checkout-path.yml | 95 +++++------ lib/actions-util.js | 2 +- lib/actions-util.js.map | 2 +- lib/actions-util.test.js | 132 +++++++++------- lib/actions-util.test.js.map | 2 +- lib/testing-utils.js | 1 + lib/testing-utils.js.map | 2 +- pr-checks/checks/with-checkout-path.yml | 46 ++---- src/actions-util.test.ts | 174 ++++++++++++--------- src/actions-util.ts | 2 +- src/testing-utils.ts | 1 + 11 files changed, 242 insertions(+), 217 deletions(-) diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 50d7a2bbf0..09d055da8a 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -23,14 +23,47 @@ jobs: with-checkout-path: strategy: matrix: - version: - - stable-20210308 - - stable-20210319 - - stable-20210809 - - cached - - latest - - nightly-latest - os: [ubuntu-latest, macos-latest, windows-2019] + include: + - os: ubuntu-latest + version: stable-20210308 + - os: macos-latest + version: stable-20210308 + - os: windows-2019 + version: stable-20210308 + - os: ubuntu-latest + version: stable-20210319 + - os: macos-latest + version: stable-20210319 + - os: windows-2019 + version: stable-20210319 + - os: ubuntu-latest + version: stable-20210809 + - os: macos-latest + version: stable-20210809 + - os: windows-2019 + version: stable-20210809 + - os: ubuntu-latest + version: cached + - os: macos-latest + version: cached + - os: windows-2019 + version: cached + - os: ubuntu-latest + version: latest + - os: macos-latest + version: latest + - os: windows-2019 + version: latest + - os: windows-2022 + version: latest + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest + - os: windows-2019 + version: nightly-latest + - os: windows-2022 + version: nightly-latest name: Use a custom `checkout_path` runs-on: ${{ matrix.os }} steps: @@ -49,13 +82,19 @@ jobs: with: tools: ${{ steps.prepare-test.outputs.tools-url }} # it's enough to test one compiled language and one interpreted language - languages: java,javascript + languages: csharp,javascript source-path: x/y/z/some-path/tests/multi-language-repo debug: true - - - name: Build code + - name: Build code (non-windows) + shell: bash + if: ${{ runner.os != 'Windows' }} + run: | + $CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh + - name: Build code (windows) shell: bash - run: x/y/z/some-path/tests/multi-language-repo/build.sh + if: ${{ runner.os == 'Windows' }} + run: | + x/y/z/some-path/tests/multi-language-repo/build.sh - uses: ./../action/analyze with: checkout_path: x/y/z/some-path/tests/multi-language-repo @@ -65,38 +104,6 @@ jobs: env: TEST_MODE: true - - name: Verify SARIF after analyze - shell: bash - run: | - EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" - EXPECTED_REF="v1.1.0" - EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" - - ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" - ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" - ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" - - if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then - echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then - echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then - echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - # payload.json will be recreated in the next step. - rm -f "$RUNNER_TEMP/payload.json" - - uses: ./../action/upload-sarif with: ref: v1.1.0 diff --git a/lib/actions-util.js b/lib/actions-util.js index 3c1f2ca88b..0d5377f5ed 100644 --- a/lib/actions-util.js +++ b/lib/actions-util.js @@ -113,7 +113,7 @@ const determineMergeBaseCommitOid = async function () { return undefined; } const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); - const checkoutPath = getRequiredInput("checkout_path"); + const checkoutPath = (0, exports.getOptionalInput)("checkout_path"); try { let commitOid = ""; let baseOid = ""; diff --git a/lib/actions-util.js.map b/lib/actions-util.js.map index 81fff98d94..a64c4900df 100644 --- a/lib/actions-util.js.map +++ b/lib/actions-util.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AACpD,8CAAgC;AAEhC,kDAAoC;AACpC,gEAAkD;AAClD,iCAKgB;AAEhB;;;GAGG;AAEH;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,GAAG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,mBAAmB,CAAC,CAAC;IAC/D,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,2CAA2C,aAAa,KAAK,CAAC,EAAE,CACjE,CAAC;KACH;AACH,CAAC;AAED,uFAAuF;AACvF,0DAA0D;AACnD,KAAK,UAAU,wBAAwB;;IAC5C,sDAAsD;IACtD,IAAI,UAAU,GAAG,MAAM,MAAM,EAAE,CAAC;IAChC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC;QAC/C,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC;QACzC,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,cAAc,CAAC;IAExD,OAAO,UAAU,KAAK,aAAa,CAAC;AACtC,CAAC;AAXD,4DAWC;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/lib/actions-util.test.js b/lib/actions-util.test.js index b743233369..6aad17cd6a 100644 --- a/lib/actions-util.test.js +++ b/lib/actions-util.test.js @@ -39,74 +39,93 @@ function errorCodes(actual, expected) { await t.throwsAsync(actionsutil.getRef); }); (0, ava_1.default)("getRef() returns merge PR ref if GITHUB_SHA still checked out", async (t) => { - const expectedRef = "refs/pull/1/merge"; - const currentSha = "a".repeat(40); - process.env["GITHUB_REF"] = expectedRef; - process.env["GITHUB_SHA"] = currentSha; - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("HEAD").resolves(currentSha); - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, expectedRef); - callback.restore(); + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + const expectedRef = "refs/pull/1/merge"; + const currentSha = "a".repeat(40); + process.env["GITHUB_REF"] = expectedRef; + process.env["GITHUB_SHA"] = currentSha; + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("HEAD").resolves(currentSha); + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, expectedRef); + callback.restore(); + }); }); (0, ava_1.default)("getRef() returns merge PR ref if GITHUB_REF still checked out but sha has changed (actions checkout@v1)", async (t) => { - const expectedRef = "refs/pull/1/merge"; - process.env["GITHUB_REF"] = expectedRef; - process.env["GITHUB_SHA"] = "b".repeat(40); - const sha = "a".repeat(40); - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/remotes/pull/1/merge").resolves(sha); - callback.withArgs("HEAD").resolves(sha); - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, expectedRef); - callback.restore(); + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + const expectedRef = "refs/pull/1/merge"; + process.env["GITHUB_REF"] = expectedRef; + process.env["GITHUB_SHA"] = "b".repeat(40); + const sha = "a".repeat(40); + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("refs/remotes/pull/1/merge").resolves(sha); + callback.withArgs("HEAD").resolves(sha); + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, expectedRef); + callback.restore(); + }); }); (0, ava_1.default)("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => { - process.env["GITHUB_REF"] = "refs/pull/1/merge"; - process.env["GITHUB_SHA"] = "a".repeat(40); - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/pull/1/merge").resolves("a".repeat(40)); - callback.withArgs("HEAD").resolves("b".repeat(40)); - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, "refs/pull/1/head"); - callback.restore(); + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + process.env["GITHUB_REF"] = "refs/pull/1/merge"; + process.env["GITHUB_SHA"] = "a".repeat(40); + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs(tmpDir, "refs/pull/1/merge").resolves("a".repeat(40)); + callback.withArgs(tmpDir, "HEAD").resolves("b".repeat(40)); + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, "refs/pull/1/head"); + callback.restore(); + }); }); (0, ava_1.default)("getRef() returns ref provided as an input and ignores current HEAD", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge"); - getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40)); - // These values are be ignored - process.env["GITHUB_REF"] = "refs/pull/1/merge"; - process.env["GITHUB_SHA"] = "a".repeat(40); - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40)); - callback.withArgs("HEAD").resolves("b".repeat(40)); - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, "refs/pull/2/merge"); - callback.restore(); - getAdditionalInputStub.restore(); + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge"); + getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40)); + // These values are be ignored + process.env["GITHUB_REF"] = "refs/pull/1/merge"; + process.env["GITHUB_SHA"] = "a".repeat(40); + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40)); + callback.withArgs("HEAD").resolves("b".repeat(40)); + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, "refs/pull/2/merge"); + callback.restore(); + getAdditionalInputStub.restore(); + }); }); (0, ava_1.default)("getRef() throws an error if only `ref` is provided as an input", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge"); - await t.throwsAsync(async () => { - await actionsutil.getRef(); - }, { - instanceOf: Error, - message: "Both 'ref' and 'sha' are required if one of them is provided.", + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge"); + await t.throwsAsync(async () => { + await actionsutil.getRef(); + }, { + instanceOf: Error, + message: "Both 'ref' and 'sha' are required if one of them is provided.", + }); + getAdditionalInputStub.restore(); }); - getAdditionalInputStub.restore(); }); (0, ava_1.default)("getRef() throws an error if only `sha` is provided as an input", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40)); - await t.throwsAsync(async () => { - await actionsutil.getRef(); - }, { - instanceOf: Error, - message: "Both 'ref' and 'sha' are required if one of them is provided.", + await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); + process.env["GITHUB_WORKSPACE"] = "/tmp"; + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40)); + await t.throwsAsync(async () => { + await actionsutil.getRef(); + }, { + instanceOf: Error, + message: "Both 'ref' and 'sha' are required if one of them is provided.", + }); + getAdditionalInputStub.restore(); }); - getAdditionalInputStub.restore(); }); (0, ava_1.default)("computeAutomationID()", async (t) => { let actualAutomationID = actionsutil.computeAutomationID(".github/workflows/codeql-analysis.yml:analyze", '{"language": "javascript", "os": "linux"}'); @@ -461,6 +480,7 @@ on: ["push"] }); (0, ava_1.default)("isAnalyzingDefaultBranch()", async (t) => { await (0, util_1.withTmpDir)(async (tmpDir) => { + (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); const envFile = path.join(tmpDir, "event.json"); fs.writeFileSync(envFile, JSON.stringify({ repository: { diff --git a/lib/actions-util.test.js.map b/lib/actions-util.test.js.map index 0c3a5751e7..38665dce06 100644 --- a/lib/actions-util.test.js.map +++ b/lib/actions-util.test.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.test.js","sourceRoot":"","sources":["../src/actions-util.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8CAAuB;AACvB,8CAAgC;AAChC,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAA6C;AAC7C,iCAA0E;AAE1E,SAAS,UAAU,CACjB,MAAgC,EAChC,QAAkC;IAElC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,IAAA,aAAI,EAAC,qCAAqC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACtD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IAC/B,MAAM,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,+DAA+D,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAChF,MAAM,WAAW,GAAG,mBAAmB,CAAC;IACxC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAA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CAAC,CAAC;QAEhE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;QACtC,CAAC,CAAC,SAAS,CAAC,MAAM,WAAW,CAAC,wBAAwB,EAAE,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE;IAChC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,CAAC;IAC7E,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,SAAS,CACT,WAAW,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,EAC1D,aAAa,CACd,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/testing-utils.js b/lib/testing-utils.js index 8997af1aef..ec0b49609f 100644 --- a/lib/testing-utils.js +++ b/lib/testing-utils.js @@ -90,6 +90,7 @@ exports.setupTests = setupTests; function setupActionsVars(tempDir, toolsDir) { process.env["RUNNER_TEMP"] = tempDir; process.env["RUNNER_TOOL_CACHE"] = toolsDir; + process.env["GITHUB_WORKSPACE"] = tempDir; } exports.setupActionsVars = setupActionsVars; function getRecordingLogger(messages) { diff --git a/lib/testing-utils.js.map b/lib/testing-utils.js.map index 9f3c293ef9..46b971e2e0 100644 --- a/lib/testing-utils.js.map +++ b/lib/testing-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"testing-utils.js","sourceRoot":"","sources":["../src/testing-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0C;AAE1C,6CAA+B;AAE/B,wDAA0C;AAC1C,iD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,gEAwBC"} \ No newline at end of file diff --git a/pr-checks/checks/with-checkout-path.yml b/pr-checks/checks/with-checkout-path.yml index 6aa75be128..a32a06b6c0 100644 --- a/pr-checks/checks/with-checkout-path.yml +++ b/pr-checks/checks/with-checkout-path.yml @@ -15,13 +15,19 @@ steps: with: tools: ${{ steps.prepare-test.outputs.tools-url }} # it's enough to test one compiled language and one interpreted language - languages: java,javascript + languages: csharp,javascript source-path: x/y/z/some-path/tests/multi-language-repo debug: true - - - name: Build code + - name: Build code (non-windows) + shell: bash + if: ${{ runner.os != 'Windows' }} + run: | + $CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh + - name: Build code (windows) shell: bash - run: x/y/z/some-path/tests/multi-language-repo/build.sh + if: ${{ runner.os == 'Windows' }} + run: | + x/y/z/some-path/tests/multi-language-repo/build.sh - uses: ./../action/analyze with: checkout_path: x/y/z/some-path/tests/multi-language-repo @@ -31,38 +37,6 @@ steps: env: TEST_MODE: true - - name: Verify SARIF after analyze - shell: bash - run: | - EXPECTED_COMMIT_OID="474bbf07f9247ffe1856c6a0f94aeeb10e7afee6" - EXPECTED_REF="v1.1.0" - EXPECTED_CHECKOUT_URI_SUFFIX="/x/y/z/some-path/tests/multi-language-repo" - - ACTUAL_COMMIT_OID="$(cat "$RUNNER_TEMP/payload.json" | jq -r .commit_oid)" - ACTUAL_REF="$(cat "$RUNNER_TEMP/payload.json" | jq -r .ref)" - ACTUAL_CHECKOUT_URI="$(cat "$RUNNER_TEMP/payload.json" | jq -r .checkout_uri)" - - if [[ "$EXPECTED_COMMIT_OID" != "$ACTUAL_COMMIT_OID" ]]; then - echo "::error Invalid commit oid. Expected: $EXPECTED_COMMIT_OID Actual: $ACTUAL_COMMIT_OID" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - if [[ "$EXPECTED_REF" != "$ACTUAL_REF" ]]; then - echo "::error Invalid ref. Expected: '$EXPECTED_REF' Actual: '$ACTUAL_REF'" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - if [[ "$ACTUAL_CHECKOUT_URI" != *$EXPECTED_CHECKOUT_URI_SUFFIX ]]; then - echo "::error Invalid checkout URI suffix. Expected suffix: $EXPECTED_CHECKOUT_URI_SUFFIX Actual uri: $ACTUAL_CHECKOUT_URI" - echo "$RUNNER_TEMP/payload.json" - exit 1 - fi - - # payload.json will be recreated in the next step. - rm -f "$RUNNER_TEMP/payload.json" - - uses: ./../action/upload-sarif with: ref: v1.1.0 diff --git a/src/actions-util.test.ts b/src/actions-util.test.ts index 4a3b5078f3..95a8c37b15 100644 --- a/src/actions-util.test.ts +++ b/src/actions-util.test.ts @@ -6,7 +6,7 @@ import * as yaml from "js-yaml"; import * as sinon from "sinon"; import * as actionsutil from "./actions-util"; -import { setupTests } from "./testing-utils"; +import { setupActionsVars, setupTests } from "./testing-utils"; import { getMode, initializeEnvironment, Mode, withTmpDir } from "./util"; function errorCodes( @@ -24,96 +24,117 @@ test("getRef() throws on the empty string", async (t) => { }); test("getRef() returns merge PR ref if GITHUB_SHA still checked out", async (t) => { - const expectedRef = "refs/pull/1/merge"; - const currentSha = "a".repeat(40); - process.env["GITHUB_REF"] = expectedRef; - process.env["GITHUB_SHA"] = currentSha; - - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("HEAD").resolves(currentSha); - - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, expectedRef); - callback.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + const expectedRef = "refs/pull/1/merge"; + const currentSha = "a".repeat(40); + process.env["GITHUB_REF"] = expectedRef; + process.env["GITHUB_SHA"] = currentSha; + + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("HEAD").resolves(currentSha); + + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, expectedRef); + callback.restore(); + }); }); test("getRef() returns merge PR ref if GITHUB_REF still checked out but sha has changed (actions checkout@v1)", async (t) => { - const expectedRef = "refs/pull/1/merge"; - process.env["GITHUB_REF"] = expectedRef; - process.env["GITHUB_SHA"] = "b".repeat(40); - const sha = "a".repeat(40); - - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/remotes/pull/1/merge").resolves(sha); - callback.withArgs("HEAD").resolves(sha); - - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, expectedRef); - callback.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + const expectedRef = "refs/pull/1/merge"; + process.env["GITHUB_REF"] = expectedRef; + process.env["GITHUB_SHA"] = "b".repeat(40); + const sha = "a".repeat(40); + + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("refs/remotes/pull/1/merge").resolves(sha); + callback.withArgs("HEAD").resolves(sha); + + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, expectedRef); + callback.restore(); + }); }); test("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => { - process.env["GITHUB_REF"] = "refs/pull/1/merge"; - process.env["GITHUB_SHA"] = "a".repeat(40); - - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/pull/1/merge").resolves("a".repeat(40)); - callback.withArgs("HEAD").resolves("b".repeat(40)); - - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, "refs/pull/1/head"); - callback.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + process.env["GITHUB_REF"] = "refs/pull/1/merge"; + process.env["GITHUB_SHA"] = "a".repeat(40); + + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs(tmpDir, "refs/pull/1/merge").resolves("a".repeat(40)); + callback.withArgs(tmpDir, "HEAD").resolves("b".repeat(40)); + + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, "refs/pull/1/head"); + callback.restore(); + }); }); test("getRef() returns ref provided as an input and ignores current HEAD", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge"); - getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40)); - - // These values are be ignored - process.env["GITHUB_REF"] = "refs/pull/1/merge"; - process.env["GITHUB_SHA"] = "a".repeat(40); - - const callback = sinon.stub(actionsutil, "getCommitOid"); - callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40)); - callback.withArgs("HEAD").resolves("b".repeat(40)); - - const actualRef = await actionsutil.getRef(); - t.deepEqual(actualRef, "refs/pull/2/merge"); - callback.restore(); - getAdditionalInputStub.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("ref").resolves("refs/pull/2/merge"); + getAdditionalInputStub.withArgs("sha").resolves("b".repeat(40)); + + // These values are be ignored + process.env["GITHUB_REF"] = "refs/pull/1/merge"; + process.env["GITHUB_SHA"] = "a".repeat(40); + + const callback = sinon.stub(actionsutil, "getCommitOid"); + callback.withArgs("refs/pull/1/merge").resolves("b".repeat(40)); + callback.withArgs("HEAD").resolves("b".repeat(40)); + + const actualRef = await actionsutil.getRef(); + t.deepEqual(actualRef, "refs/pull/2/merge"); + callback.restore(); + getAdditionalInputStub.restore(); + }); }); test("getRef() throws an error if only `ref` is provided as an input", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge"); - - await t.throwsAsync( - async () => { - await actionsutil.getRef(); - }, - { - instanceOf: Error, - message: "Both 'ref' and 'sha' are required if one of them is provided.", - } - ); - getAdditionalInputStub.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("ref").resolves("refs/pull/1/merge"); + + await t.throwsAsync( + async () => { + await actionsutil.getRef(); + }, + { + instanceOf: Error, + message: + "Both 'ref' and 'sha' are required if one of them is provided.", + } + ); + getAdditionalInputStub.restore(); + }); }); test("getRef() throws an error if only `sha` is provided as an input", async (t) => { - const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); - getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40)); - - await t.throwsAsync( - async () => { - await actionsutil.getRef(); - }, - { - instanceOf: Error, - message: "Both 'ref' and 'sha' are required if one of them is provided.", - } - ); - getAdditionalInputStub.restore(); + await withTmpDir(async (tmpDir: string) => { + setupActionsVars(tmpDir, tmpDir); + process.env["GITHUB_WORKSPACE"] = "/tmp"; + const getAdditionalInputStub = sinon.stub(actionsutil, "getOptionalInput"); + getAdditionalInputStub.withArgs("sha").resolves("a".repeat(40)); + + await t.throwsAsync( + async () => { + await actionsutil.getRef(); + }, + { + instanceOf: Error, + message: + "Both 'ref' and 'sha' are required if one of them is provided.", + } + ); + getAdditionalInputStub.restore(); + }); }); test("computeAutomationID()", async (t) => { @@ -709,6 +730,7 @@ test("initializeEnvironment", (t) => { test("isAnalyzingDefaultBranch()", async (t) => { await withTmpDir(async (tmpDir) => { + setupActionsVars(tmpDir, tmpDir); const envFile = path.join(tmpDir, "event.json"); fs.writeFileSync( envFile, diff --git a/src/actions-util.ts b/src/actions-util.ts index 08c656505b..934e67898f 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -111,7 +111,7 @@ export const determineMergeBaseCommitOid = async function (): Promise< } const mergeSha = getRequiredEnvParam("GITHUB_SHA"); - const checkoutPath = getRequiredInput("checkout_path"); + const checkoutPath = getOptionalInput("checkout_path"); try { let commitOid = ""; diff --git a/src/testing-utils.ts b/src/testing-utils.ts index 65644ef54c..05e075f7c2 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -92,6 +92,7 @@ export function setupTests(test: TestFn) { export function setupActionsVars(tempDir: string, toolsDir: string) { process.env["RUNNER_TEMP"] = tempDir; process.env["RUNNER_TOOL_CACHE"] = toolsDir; + process.env["GITHUB_WORKSPACE"] = tempDir; } export interface LoggedMessage {