diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ce97ebb5a9..7d965b45fb 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -207,10 +207,9 @@ jobs: - name: Build code shell: powershell - # Note we want to make sure that the .win32env file is read correctly, so we unset the CODEQL_EXTRACTOR_CSHARP_ROOT from the .sh file. run: | cat ./codeql-runner/codeql-env.sh | Invoke-Expression - $Env:CODEQL_EXTRACTOR_CSHARP_ROOT = "" + $Env:CODEQL_EXTRACTOR_CSHARP_ROOT = "" # Unset an environment variable to make sure the tracer resists this & $Env:CODEQL_RUNNER dotnet build /p:UseSharedCompilation=false - name: Upload tracer logs diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 01ddd7374f..f32e92ff20 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -24,6 +24,7 @@ const path = __importStar(require("path")); const core = __importStar(require("@actions/core")); const actionsUtil = __importStar(require("./actions-util")); const analyze_1 = require("./analyze"); +const codeql_1 = require("./codeql"); const config_utils_1 = require("./config-utils"); const database_upload_1 = require("./database-upload"); const logging_1 = require("./logging"); @@ -58,6 +59,7 @@ async function run() { if (config === undefined) { throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); } + await util.enrichEnvironment(util.Mode.actions, await (0, codeql_1.getCodeQL)(config.codeQLCmd)); const apiDetails = { auth: actionsUtil.getRequiredInput("token"), url: util.getRequiredEnvParam("GITHUB_SERVER_URL"), diff --git a/lib/analyze-action.js.map b/lib/analyze-action.js.map index b30fd84b87..63127c5e37 100644 --- a/lib/analyze-action.js.map +++ b/lib/analyze-action.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":["../src/analyze-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAMmB;AACnB,iDAAmD;AACnD,uDAAoD;AACpD,uCAA6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AM,gBAAgB,CAAC,SAAS,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;KACpD;SAAM;QACL,MAAM,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;KAC9C;AACH,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"} \ No newline at end of file +{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":["../src/analyze-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAMmB;AACnB,qCAAqC;AACrC,iDAAmD;AACnD,uDAAoD;AACpD,uCAA6C;AAC7C,6CAAkD;AAClD,yDAA2C;AAE3C,6CAA+B;AAE/B,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAUvC,KAAK,UAAU,gBAAgB,CAC7B,SAAe,EACf,KAAuC,EACvC,KAAa;IAEb,MAAM,MAAM,GACV,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,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,EACT,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EACd,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,CACb,CAAC;IACF,MAAM,YAAY,GAAuB;QACvC,GAAG,gBAAgB;QACnB,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21a0a9e7 100644 --- a/lib/codeql.js +++ b/lib/codeql.js @@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getExtraOptions = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.convertToSemVer = exports.getCodeQLURLVersion = exports.setupCodeQL = exports.getCodeQLActionRepository = exports.CommandInvocationError = void 0; +exports.getExtraOptions = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.convertToSemVer = exports.getCodeQLURLVersion = exports.setupCodeQL = exports.getCodeQLActionRepository = exports.CODEQL_VERSION_NEW_TRACING = exports.CommandInvocationError = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); @@ -33,6 +33,7 @@ const actions_util_1 = require("./actions-util"); const api = __importStar(require("./api-client")); const defaults = __importStar(require("./defaults.json")); // Referenced from codeql-action-sync-tool! const error_matcher_1 = require("./error-matcher"); +const languages_1 = require("./languages"); const toolcache = __importStar(require("./toolcache")); const toolrunner_error_catcher_1 = require("./toolrunner-error-catcher"); const util = __importStar(require("./util")); @@ -70,6 +71,7 @@ const CODEQL_VERSION_DIAGNOSTICS = "2.5.6"; const CODEQL_VERSION_METRICS = "2.5.5"; const CODEQL_VERSION_GROUP_RULES = "2.5.5"; const CODEQL_VERSION_SARIF_GROUP = "2.5.3"; +exports.CODEQL_VERSION_NEW_TRACING = "2.6.0"; // Use multi-language (>= 2.5.6) and indirect (>= 2.6.0) tracing. function getCodeQLBundleName() { let platform; if (process.platform === "win32") { @@ -310,6 +312,7 @@ function setCodeQL(partialCodeql) { printVersion: resolveFunction(partialCodeql, "printVersion"), getTracerEnv: resolveFunction(partialCodeql, "getTracerEnv"), databaseInit: resolveFunction(partialCodeql, "databaseInit"), + databaseInitCluster: resolveFunction(partialCodeql, "databaseInitCluster"), runAutobuild: resolveFunction(partialCodeql, "runAutobuild"), extractScannedLanguage: resolveFunction(partialCodeql, "extractScannedLanguage"), finalizeDatabase: resolveFunction(partialCodeql, "finalizeDatabase"), @@ -402,6 +405,27 @@ async function getCodeQLForCmd(cmd, checkVersion) { ...getExtraOptionsFromEnv(["database", "init"]), ]); }, + async databaseInitCluster(databasePath, languages, sourceRoot, processName, processLevel) { + const extraArgs = languages.map((language) => `--language=${language}`); + if (languages.filter(languages_1.isTracedLanguage).length > 0) { + extraArgs.push("--begin-tracing"); + if (processName !== undefined) { + extraArgs.push(`--trace-process-name=${processName}`); + } + else { + extraArgs.push(`--trace-process-level=${processLevel || 3}`); + } + } + await runTool(cmd, [ + "database", + "init", + "--db-cluster", + databasePath, + `--source-root=${sourceRoot}`, + ...extraArgs, + ...getExtraOptionsFromEnv(["database", "init"]), + ]); + }, async runAutobuild(language) { const cmdName = process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh"; const autobuildCmd = path.join(path.dirname(cmd), language, "tools", cmdName); diff --git a/lib/codeql.js.map b/lib/codeql.js.map index 8fcce9c8cd..6ce2591800 100644 --- a/lib/codeql.js.map +++ b/lib/codeql.js.map @@ -1 +1 @@ -{"version":3,"file":"codeql.js","sourceRoot":"","sources":["../src/codeql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAE3D,sEAAuD;AACvD,gEAAsD;AACtD,+CAAiC;AAEjC,iDAA6E;AAC7E,kDAAoC;AAEpC,0DAA4C,CAAC,2CAA2C;AACxF,mDAAgD;AAGhD,uDAAyC;AACzC,yEAAoE;AACpE,6CAA+B;AAuB/B,MAAa,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,GAAW,EAAE,IAAc,EAAE,QAAgB,EAAE,KAAa;QACtE,KAAK,CACH,oBAAoB,GAAG,mBAAmB,IAAI;kBAClC,QAAQ;QAClB,KAAK,EAAE,CACV,CAAC;IACJ,CAAC;CACF;AARD,wDAQC;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AL,KAAK,CAAE,KAAK,CAAC,CAAC,CAAC,EACf,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC1B,CAAC;IACR,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAfD,0CAeC;AAED;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG,KAAM,CAAC;AAE5B,KAAK,UAAU,OAAO,CAAC,GAAW,EAAE,OAAiB,EAAE;IACrD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,MAAM,QAAQ,GAAG,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE;QAC1D,SAAS,EAAE;YACT,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvB,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5B,CAAC;YACD,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;YAC5C,CAAC;SACF;QACD,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAC,IAAI,EAAE,CAAC;IACV,IAAI,QAAQ,KAAK,CAAC;QAChB,MAAM,IAAI,sBAAsB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/lib/init-action.js b/lib/init-action.js index c08e953d01..1a9e4c4015 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const path = __importStar(require("path")); const core = __importStar(require("@actions/core")); const actions_util_1 = require("./actions-util"); +const codeql_1 = require("./codeql"); const init_1 = require("./init"); const languages_1 = require("./languages"); const logging_1 = require("./logging"); @@ -85,6 +86,7 @@ async function run() { const initCodeQLResult = await (0, init_1.initCodeQL)((0, actions_util_1.getOptionalInput)("tools"), apiDetails, (0, actions_util_1.getTemporaryDirectory)(), (0, actions_util_1.getToolCacheDirectory)(), gitHubVersion.type, logger); codeql = initCodeQLResult.codeql; toolsVersion = initCodeQLResult.toolsVersion; + await (0, util_1.enrichEnvironment)(util_1.Mode.actions, codeql); config = await (0, init_1.initConfig)((0, actions_util_1.getOptionalInput)("languages"), (0, actions_util_1.getOptionalInput)("queries"), (0, actions_util_1.getOptionalInput)("packs"), (0, actions_util_1.getOptionalInput)("config-file"), (0, actions_util_1.getOptionalInput)("db-location"), (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY")), (0, actions_util_1.getTemporaryDirectory)(), (0, util_1.getRequiredEnvParam)("RUNNER_TOOL_CACHE"), codeql, (0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), gitHubVersion, apiDetails, logger); if (config.languages.includes(languages_1.Language.python) && (0, actions_util_1.getRequiredInput)("setup-python-dependencies") === "true") { @@ -115,12 +117,13 @@ async function run() { const codeqlRam = process.env["CODEQL_RAM"] || "6500"; core.exportVariable("CODEQL_RAM", codeqlRam); const sourceRoot = path.resolve((0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), (0, actions_util_1.getOptionalInput)("source-root") || ""); - const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot); + const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot, "Runner.Worker.exe", undefined); if (tracerConfig !== undefined) { for (const [key, value] of Object.entries(tracerConfig.env)) { core.exportVariable(key, value); } - if (process.platform === "win32") { + if (process.platform === "win32" && + !(await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_NEW_TRACING))) { await (0, init_1.injectWindowsTracer)("Runner.Worker.exe", undefined, config, codeql, tracerConfig); } } diff --git a/lib/init-action.js.map b/lib/init-action.js.map index 10d346f33e..73f88b70c1 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,2CAA6B;AAE7B,oDAAsC;AAEtC,iDASwB;AAGxB,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAClD,iCAMgB;AAEhB,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAsBvC,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B,EAC1B,YAAoB;;IAEpB,MAAM,gBAAgB,GAAG,MAAM,IAAA,qCAAsB,EACnD,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,IAAA,+BAAgB,EAAC,WAAW,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/D,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CACvE,GAAG,CACJ,CAAC;IACF,MAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CACpD,yBAAyB,CAC1B;QACC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,YAAY,GAAG,MAAA,IAAA,+BAAgB,EAAC,SAAS,CAAC,0CAAE,IAAI,EAAE,CAAC;IACvD,IA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,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,oDAAsC;AAEtC,iDASwB;AACxB,qCAA8D;AAE9D,iCAMgB;AAChB,2CAAuC;AACvC,uCAA6C;AAC7C,6CAAkD;AAClD,iCAQgB;AAEhB,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAsBvC,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,MAA0B,EAC1B,YAAoB;;IAEpB,MAAM,gBAAgB,GAAG,MAAM,IAAA,qCAAsB,EACnD,MAAM,EACN,SAAS,EACT,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,iBAAiB,GAAG,IAAA,+BAAgB,EAAC,WAAW,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/D,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CACvE,GAAG,CACJ,CAAC;IACF,MAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CACpD,yBAAyB,CAC1B;QACC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,YAAY,GAAG,MAAA,IAAA,+BAAgB,EAAC,SAAS,CAA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CAAC,SAAS,CACjD,CACF,CAAC;QACF,OAAO;KACR;IACD,MAAM,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AACjE,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/init.js b/lib/init.js index ad44ac9c0e..4f8ac59dd1 100644 --- a/lib/init.js +++ b/lib/init.js @@ -29,6 +29,7 @@ const codeql_1 = require("./codeql"); const configUtils = __importStar(require("./config-utils")); const tracer_config_1 = require("./tracer-config"); const util = __importStar(require("./util")); +const util_1 = require("./util"); async function initCodeQL(codeqlURL, apiDetails, tempDir, toolCacheDir, variant, logger) { logger.startGroup("Setup CodeQL tools"); const { codeql, toolsVersion } = await (0, codeql_1.setupCodeQL)(codeqlURL, apiDetails, tempDir, toolCacheDir, variant, logger, true); @@ -45,12 +46,17 @@ async function initConfig(languagesInput, queriesInput, packsInput, configFile, return config; } exports.initConfig = initConfig; -async function runInit(codeql, config, sourceRoot) { +async function runInit(codeql, config, sourceRoot, processName, processLevel) { fs.mkdirSync(config.dbLocation, { recursive: true }); - // TODO: replace this code once CodeQL supports multi-language tracing - for (const language of config.languages) { - // Init language database - await codeql.databaseInit(util.getCodeQLDatabasePath(config, language), language, sourceRoot); + if (await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_NEW_TRACING)) { + // Init a database cluster + await codeql.databaseInitCluster(config.dbLocation, config.languages, sourceRoot, processName, processLevel); + } + else { + for (const language of config.languages) { + // Init language database + await codeql.databaseInit(util.getCodeQLDatabasePath(config, language), language, sourceRoot); + } } return await (0, tracer_config_1.getCombinedTracerConfig)(config, codeql); } diff --git a/lib/init.js.map b/lib/init.js.map index 1a89969483..cfaf73786f 100644 --- a/lib/init.js.map +++ b/lib/init.js.map @@ -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,YAAoB,EACpB,OAA2B,EAC3B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,oBAAW,EAChD,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,OAAO,EACP,MAAM,EACN,IAAI,CACL,CAAC;IACF,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAClC,CAAC;AArBD,gCAqBC;AAEM,KAAK,UAAU,UAAU,CAC9B,cAAkC,EAClC,YAAgC,EAChC,UAA8B,EAC9B,UAA8B,EAC9B,UAA8B,EAC9B,UAAyB,EACzB,OAAe,EACf,YAAoB,EACpB,MAAc,EACd,aAAqB,EACrB,aAAiC,EACjC,UAAoC,EACpC,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,UAAU,EACV,UAAU,EACV,OAAO,EACP,YAAY,EACZ,MAAM,EACN,aAAa,EACb,aAAa,EACb,UAAU,EACV,M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;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CACZ,gFAAgF,CAAC,IAAI;YACnF,qGAAqG;YACrG,oGAAoG;YACpG,iDAAiD,CACpD,CAAC;QACF,OAAO;KACR;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAtCD,8CAsCC"} \ No newline at end of file diff --git a/lib/runner.js b/lib/runner.js index d89362b980..5648b2a1b3 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -141,14 +141,16 @@ program else { codeql = (await (0, init_1.initCodeQL)(undefined, apiDetails, tempDir, toolsDir, gitHubVersion.type, logger)).codeql; } + await (0, util_1.enrichEnvironment)(util_1.Mode.runner, codeql); const workspacePath = checkoutPath; const config = await (0, init_1.initConfig)(cmd.languages, cmd.queries, cmd.packs, cmd.configFile, undefined, (0, repository_1.parseRepositoryNwo)(cmd.repository), tempDir, toolsDir, codeql, workspacePath, gitHubVersion, apiDetails, logger); const sourceRoot = checkoutPath; - const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot); + const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot, parseTraceProcessName(), parseTraceProcessLevel()); if (tracerConfig === undefined) { return; } - if (process.platform === "win32") { + if (process.platform === "win32" && + !(await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_NEW_TRACING))) { await (0, init_1.injectWindowsTracer)(parseTraceProcessName(), parseTraceProcessLevel(), config, codeql, tracerConfig); } // Always output a json file of the env that can be consumed programmatically @@ -203,6 +205,7 @@ program 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."); } + await (0, util_1.enrichEnvironment)(util_1.Mode.runner, await (0, codeql_1.getCodeQL)(config.codeQLCmd)); importTracerEnvironment(config); let language = undefined; if (cmd.language !== undefined) { @@ -252,6 +255,7 @@ program 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."); } + await (0, util_1.enrichEnvironment)(util_1.Mode.runner, await (0, codeql_1.getCodeQL)(config.codeQLCmd)); const auth = await (0, util_1.getGitHubAuth)(logger, cmd.githubAuth, cmd.githubAuthStdin); const apiDetails = { auth, diff --git a/lib/runner.js.map b/lib/runner.js.map index 3076864ea2..d14f00c2bd 100644 --- a/lib/runner.js.map +++ b/lib/runner.js.map @@ -1 +1 @@ -{"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAE7B,yCAAoC;AAEpC,uCAAoD;AACpD,2CAAuE;AACvE,qCAA6C;AAC7C,iDAAmD;AACnD,iCAA8E;AAC9E,2CAAsD;AACtD,uCAA4C;AAC5C,6CAAkD;AAClD,yDAA2C;AAC3C,iCAUgB;AAEhB,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAC9B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;IAClD,IAAA,4BAAqB,EAAC,WAAI,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,SAA6B;IAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;IACvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC3B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KAC5C;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,WAAW,CAAC,SAA6B;I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,GAAG,CAAC,SAAS,EACb,IAAA,+BAAkB,EAAC,GAAG,CAAC,UAAU,CAAC,EAClC,GAAG,CAAC,MAAM,EACV,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EACjB,GAAG,CAAC,QAAQ,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,MAAM,CACP,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/tracer-config.js b/lib/tracer-config.js index 3bb4381517..8fa342aa29 100644 --- a/lib/tracer-config.js +++ b/lib/tracer-config.js @@ -19,11 +19,13 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getCombinedTracerConfig = exports.concatTracerConfigs = exports.getTracerConfigForLanguage = void 0; +exports.getCombinedTracerConfig = exports.concatTracerConfigs = exports.getTracerConfigForLanguage = exports.getTracerConfigForCluster = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); +const codeql_1 = require("./codeql"); const languages_1 = require("./languages"); const util = __importStar(require("./util")); +const util_1 = require("./util"); const CRITICAL_TRACER_VARS = new Set([ "SEMMLE_PRELOAD_libtrace", "SEMMLE_RUNNER", @@ -31,6 +33,14 @@ const CRITICAL_TRACER_VARS = new Set([ "SEMMLE_DEPTRACE_SOCKET", "SEMMLE_JAVA_TOOL_OPTIONS", ]); +async function getTracerConfigForCluster(config) { + const tracingEnvVariables = JSON.parse(fs.readFileSync(path.resolve(config.dbLocation, "temp/tracingEnvironment/start-tracing.json"), "utf8")); + return { + spec: tracingEnvVariables["ODASA_TRACER_CONFIGURATION"], + env: tracingEnvVariables, + }; +} +exports.getTracerConfigForCluster = getTracerConfigForCluster; async function getTracerConfigForLanguage(codeql, config, language) { const env = await codeql.getTracerEnv(util.getCodeQLDatabasePath(config, language)); const spec = env["ODASA_TRACER_CONFIGURATION"]; @@ -161,12 +171,18 @@ async function getCombinedTracerConfig(config, codeql) { if (tracedLanguages.length === 0) { return undefined; } - // Get all the tracer configs and combine them together - const tracedLanguageConfigs = {}; - for (const language of tracedLanguages) { - tracedLanguageConfigs[language] = await getTracerConfigForLanguage(codeql, config, language); + let mainTracerConfig; + if (await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_NEW_TRACING)) { + mainTracerConfig = await getTracerConfigForCluster(config); + } + else { + // Get all the tracer configs and combine them together + const tracedLanguageConfigs = {}; + for (const language of tracedLanguages) { + tracedLanguageConfigs[language] = await getTracerConfigForLanguage(codeql, config, language); + } + mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config); } - const mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config); // Add a couple more variables mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec; const codeQLDir = path.dirname(codeql.getPath()); diff --git a/lib/tracer-config.js.map b/lib/tracer-config.js.map index d43bb9f583..ad8d72a7d7 100644 --- a/lib/tracer-config.js.map +++ b/lib/tracer-config.js.map @@ -1 +1 @@ -{"version":3,"file":"tracer-config.js","sourceRoot":"","sources":["../src/tracer-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAI7B,2CAAyD;AACzD,6CAA+B;AAO/B,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,yBAAyB;IACzB,eAAe;IACf,8BAA8B;IAC9B,wBAAwB;IACxB,0BAA0B;CAC3B,CAAC,CAAC;A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,CACvD,SAAS,EACT,OAAO,EACP,OAAO,EACP,gBAAgB,CACjB,CAAC;KACH;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QACvC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,IAAI,CAC5C,SAAS,EACT,OAAO,EACP,SAAS,EACT,gBAAgB,CACjB,CAAC;KACH;IAED,iFAAiF;IACjF,iEAAiE;IACjE,iFAAiF;IACjF,qEAAqE;IACrE,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7E,gBAAgB,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,IAAI,CAC/C,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EACnC,OAAO,EACP,gBAAgB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EACvC,aAAa,CACd,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AArDD,0DAqDC"} \ No newline at end of file +{"version":3,"file":"tracer-config.js","sourceRoot":"","sources":["../src/tracer-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,qCAA8D;AAE9D,2CAAyD;AACzD,6CAA+B;AAC/B,iCAA4C;AAO5C,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,yBAAyB;IACzB,eAAe;IACf,8BAA8B;IAC9B,wBAAwB;IACxB,0BAA0B;CAC3B,CAAC,CAAC;AAEI,KAAK,UAAU,yBAAyB,CAC7C,MAA0B;IAE1B,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CACpC,EAAE,CAAC,YAAY,CACb,IAAI,CAAC,OAAO,CACV,MAAM,CAAC,UAAU,EACjB,4CAA4C,CAC7C,EACD,MAAM,CACP,CACF,CAAC;IACF,OAAO;QACL,IAAI,EAAE,mBAA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AAC,4BAA4B,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAC3E,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACjC,gBAAgB,CAAC,GAAG,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,IAAI,CACvD,SAAS,EACT,OAAO,EACP,OAAO,EACP,gBAAgB,CACjB,CAAC;KACH;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QACvC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,IAAI,CAC5C,SAAS,EACT,OAAO,EACP,SAAS,EACT,gBAAgB,CACjB,CAAC;KACH;IAED,iFAAiF;IACjF,iEAAiE;IACjE,iFAAiF;IACjF,qEAAqE;IACrE,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7E,gBAAgB,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,IAAI,CAC/C,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EACnC,OAAO,EACP,gBAAgB,CAAC,GAAG,CAAC,iBAAiB,CAAC,EACvC,aAAa,CACd,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AA1DD,0DA0DC"} \ No newline at end of file diff --git a/lib/util.js b/lib/util.js index f3f0ac81eb..8ef9411785 100644 --- a/lib/util.js +++ b/lib/util.js @@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.codeQlVersionAbove = exports.isHTTPError = exports.HTTPError = exports.getRequiredEnvParam = exports.isActions = exports.getMode = exports.initializeEnvironment = exports.Mode = exports.assertNever = exports.getGitHubAuth = exports.apiVersionInRange = exports.DisallowedAPIVersionReason = exports.checkGitHubVersionInRange = exports.getGitHubVersion = exports.GitHubVariant = exports.parseGitHubUrl = exports.getCodeQLDatabasePath = exports.getThreadsFlag = exports.getAddSnippetsFlag = exports.getMemoryFlag = exports.withTmpDir = exports.getToolNames = exports.getExtraOptionsEnvParam = exports.GITHUB_DOTCOM_URL = void 0; +exports.codeQlVersionAbove = exports.isHTTPError = exports.HTTPError = exports.getRequiredEnvParam = exports.isActions = exports.getMode = exports.enrichEnvironment = exports.initializeEnvironment = exports.Mode = exports.assertNever = exports.getGitHubAuth = exports.apiVersionInRange = exports.DisallowedAPIVersionReason = exports.checkGitHubVersionInRange = exports.getGitHubVersion = exports.GitHubVariant = exports.parseGitHubUrl = exports.getCodeQLDatabasePath = exports.getThreadsFlag = exports.getAddSnippetsFlag = exports.getMemoryFlag = exports.withTmpDir = exports.getToolNames = exports.getExtraOptionsEnvParam = exports.GITHUB_DOTCOM_URL = void 0; const fs = __importStar(require("fs")); const os = __importStar(require("os")); const path = __importStar(require("path")); @@ -27,6 +27,7 @@ const core = __importStar(require("@actions/core")); const semver = __importStar(require("semver")); const api_client_1 = require("./api-client"); const apiCompatibility = __importStar(require("./api-compatibility.json")); +const codeql_1 = require("./codeql"); /** * The URL for github.com. */ @@ -379,23 +380,40 @@ var EnvVar; */ EnvVar["FEATURE_SANDWICH"] = "CODEQL_ACTION_FEATURE_SANDWICH"; })(EnvVar || (EnvVar = {})); +const exportVar = (mode, name, value) => { + if (mode === Mode.actions) { + core.exportVariable(name, value); + } + else { + process.env[name] = value; + } +}; +/** + * Set some initial environment variables that we can set even without + * knowing what version of CodeQL we're running. + */ function initializeEnvironment(mode, version) { - const exportVar = (name, value) => { - if (mode === Mode.actions) { - core.exportVariable(name, value); - } - else { - process.env[name] = value; - } - }; - exportVar(EnvVar.RUN_MODE, mode); - exportVar(EnvVar.VERSION, version); - exportVar(EnvVar.FEATURE_SARIF_COMBINE, "true"); - exportVar(EnvVar.FEATURE_WILL_UPLOAD, "true"); - exportVar(EnvVar.FEATURE_MULTI_LANGUAGE, "true"); - exportVar(EnvVar.FEATURE_SANDWICH, "true"); + exportVar(mode, EnvVar.RUN_MODE, mode); + exportVar(mode, EnvVar.VERSION, version); + exportVar(mode, EnvVar.FEATURE_SARIF_COMBINE, "true"); + exportVar(mode, EnvVar.FEATURE_WILL_UPLOAD, "true"); } exports.initializeEnvironment = initializeEnvironment; +/** + * Enrich the environment variables with further flags that we cannot + * know the value of until we know what version of CodeQL we're running. + */ +async function enrichEnvironment(mode, codeql) { + if (await codeQlVersionAbove(codeql, codeql_1.CODEQL_VERSION_NEW_TRACING)) { + exportVar(mode, EnvVar.FEATURE_MULTI_LANGUAGE, "false"); + exportVar(mode, EnvVar.FEATURE_SANDWICH, "false"); + } + else { + exportVar(mode, EnvVar.FEATURE_MULTI_LANGUAGE, "true"); + exportVar(mode, EnvVar.FEATURE_SANDWICH, "true"); + } +} +exports.enrichEnvironment = enrichEnvironment; function getMode() { // Make sure we fail fast if the env var is missing. This should // only happen if there is a bug in our code and we neglected diff --git a/lib/util.js.map b/lib/util.js.map index eaa7c0f456..a08f3c87f4 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,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAG7B,oDAAsC;AACtC,+CAAiC;AAEjC,6CAA8D;AAC9D,2EAA6D;AAM7D;;GAEG;AACU,QAAA,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;GAEG;AACH,SAAgB,uBAAuB;IACrC,MAAM,OAAO,GAAG,6BAA6B,CAAC;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACzC,OAAO,EAAE,CAAC;KACX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AAK,UAAU,kBAAkB,CACtC,MAAc,EACd,eAAuB;IAEvB,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,eAAe,CAAC,CAAC;AAChE,CAAC;AALD,gDAKC"} \ No newline at end of file diff --git a/src/analyze-action.ts b/src/analyze-action.ts index 3e1e57fb00..3c3bac1cd1 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -11,6 +11,7 @@ import { runQueries, runFinalize, } from "./analyze"; +import { getCodeQL } from "./codeql"; import { Config, getConfig } from "./config-utils"; import { uploadDatabases } from "./database-upload"; import { getActionsLogger } from "./logging"; @@ -79,6 +80,10 @@ async function run() { "Config file could not be found at expected location. Has the 'init' action been called?" ); } + await util.enrichEnvironment( + util.Mode.actions, + await getCodeQL(config.codeQLCmd) + ); const apiDetails = { auth: actionsUtil.getRequiredInput("token"), diff --git a/src/codeql.ts b/src/codeql.ts index 3ec5a45866..80ccaf5cf9 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -12,7 +12,7 @@ import * as api from "./api-client"; import { PackWithVersion } from "./config-utils"; import * as defaults from "./defaults.json"; // Referenced from codeql-action-sync-tool! import { errorMatchers } from "./error-matcher"; -import { Language } from "./languages"; +import { isTracedLanguage, Language } from "./languages"; import { Logger } from "./logging"; import * as toolcache from "./toolcache"; import { toolrunnerErrorCatcher } from "./toolrunner-error-catcher"; @@ -75,6 +75,16 @@ export interface CodeQL { language: Language, sourceRoot: string ): Promise; + /** + * Run 'codeql database init --db-cluster'. + */ + databaseInitCluster( + databasePath: string, + languages: Language[], + sourceRoot: string, + processName: string | undefined, + processLevel: number | undefined + ): Promise; /** * Runs the autobuilder for the given language. */ @@ -198,6 +208,7 @@ const CODEQL_VERSION_DIAGNOSTICS = "2.5.6"; const CODEQL_VERSION_METRICS = "2.5.5"; const CODEQL_VERSION_GROUP_RULES = "2.5.5"; const CODEQL_VERSION_SARIF_GROUP = "2.5.3"; +export const CODEQL_VERSION_NEW_TRACING = "2.6.0"; // Use multi-language (>= 2.5.6) and indirect (>= 2.6.0) tracing. function getCodeQLBundleName(): string { let platform: string; @@ -528,6 +539,7 @@ export function setCodeQL(partialCodeql: Partial): CodeQL { printVersion: resolveFunction(partialCodeql, "printVersion"), getTracerEnv: resolveFunction(partialCodeql, "getTracerEnv"), databaseInit: resolveFunction(partialCodeql, "databaseInit"), + databaseInitCluster: resolveFunction(partialCodeql, "databaseInitCluster"), runAutobuild: resolveFunction(partialCodeql, "runAutobuild"), extractScannedLanguage: resolveFunction( partialCodeql, @@ -643,6 +655,32 @@ async function getCodeQLForCmd( ...getExtraOptionsFromEnv(["database", "init"]), ]); }, + async databaseInitCluster( + databasePath: string, + languages: Language[], + sourceRoot: string, + processName: string | undefined, + processLevel: number | undefined + ) { + const extraArgs = languages.map((language) => `--language=${language}`); + if (languages.filter(isTracedLanguage).length > 0) { + extraArgs.push("--begin-tracing"); + if (processName !== undefined) { + extraArgs.push(`--trace-process-name=${processName}`); + } else { + extraArgs.push(`--trace-process-level=${processLevel || 3}`); + } + } + await runTool(cmd, [ + "database", + "init", + "--db-cluster", + databasePath, + `--source-root=${sourceRoot}`, + ...extraArgs, + ...getExtraOptionsFromEnv(["database", "init"]), + ]); + }, async runAutobuild(language: Language) { const cmdName = process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh"; diff --git a/src/init-action.ts b/src/init-action.ts index 7325a27c56..44402a688a 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -12,7 +12,7 @@ import { StatusReportBase, validateWorkflow, } from "./actions-util"; -import { CodeQL } from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING } from "./codeql"; import * as configUtils from "./config-utils"; import { initCodeQL, @@ -30,6 +30,8 @@ import { Mode, checkGitHubVersionInRange, getGitHubVersion, + codeQlVersionAbove, + enrichEnvironment, } from "./util"; // eslint-disable-next-line import/no-commonjs @@ -151,6 +153,7 @@ async function run() { ); codeql = initCodeQLResult.codeql; toolsVersion = initCodeQLResult.toolsVersion; + await enrichEnvironment(Mode.actions, codeql); config = await initConfig( getOptionalInput("languages"), @@ -210,13 +213,22 @@ async function run() { getOptionalInput("source-root") || "" ); - const tracerConfig = await runInit(codeql, config, sourceRoot); + const tracerConfig = await runInit( + codeql, + config, + sourceRoot, + "Runner.Worker.exe", + undefined + ); if (tracerConfig !== undefined) { for (const [key, value] of Object.entries(tracerConfig.env)) { core.exportVariable(key, value); } - if (process.platform === "win32") { + if ( + process.platform === "win32" && + !(await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) + ) { await injectWindowsTracer( "Runner.Worker.exe", undefined, diff --git a/src/init.ts b/src/init.ts index da44de8348..3931340bb2 100644 --- a/src/init.ts +++ b/src/init.ts @@ -6,12 +6,13 @@ import * as safeWhich from "@chrisgavin/safe-which"; import * as analysisPaths from "./analysis-paths"; import { GitHubApiCombinedDetails, GitHubApiDetails } from "./api-client"; -import { CodeQL, setupCodeQL } from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING, setupCodeQL } from "./codeql"; import * as configUtils from "./config-utils"; import { Logger } from "./logging"; import { RepositoryNwo } from "./repository"; import { TracerConfig, getCombinedTracerConfig } from "./tracer-config"; import * as util from "./util"; +import { codeQlVersionAbove } from "./util"; export async function initCodeQL( codeqlURL: string | undefined, @@ -75,18 +76,30 @@ export async function initConfig( export async function runInit( codeql: CodeQL, config: configUtils.Config, - sourceRoot: string + sourceRoot: string, + processName: string | undefined, + processLevel: number | undefined ): Promise { fs.mkdirSync(config.dbLocation, { recursive: true }); - // TODO: replace this code once CodeQL supports multi-language tracing - for (const language of config.languages) { - // Init language database - await codeql.databaseInit( - util.getCodeQLDatabasePath(config, language), - language, - sourceRoot + if (await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) { + // Init a database cluster + await codeql.databaseInitCluster( + config.dbLocation, + config.languages, + sourceRoot, + processName, + processLevel ); + } else { + for (const language of config.languages) { + // Init language database + await codeql.databaseInit( + util.getCodeQLDatabasePath(config, language), + language, + sourceRoot + ); + } } return await getCombinedTracerConfig(config, codeql); diff --git a/src/runner.ts b/src/runner.ts index afeab5de81..c4e09adbd1 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -6,7 +6,7 @@ import { Command } from "commander"; import { runFinalize, runQueries } from "./analyze"; import { determineAutobuildLanguage, runAutobuild } from "./autobuild"; -import { CodeQL, getCodeQL } from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING, getCodeQL } from "./codeql"; import { Config, getConfig } from "./config-utils"; import { initCodeQL, initConfig, injectWindowsTracer, runInit } from "./init"; import { Language, parseLanguage } from "./languages"; @@ -23,6 +23,8 @@ import { getGitHubAuth, initializeEnvironment, Mode, + codeQlVersionAbove, + enrichEnvironment, } from "./util"; // eslint-disable-next-line import/no-commonjs @@ -208,6 +210,7 @@ program ) ).codeql; } + await enrichEnvironment(Mode.runner, codeql); const workspacePath = checkoutPath; const config = await initConfig( cmd.languages, @@ -226,12 +229,21 @@ program ); const sourceRoot = checkoutPath; - const tracerConfig = await runInit(codeql, config, sourceRoot); + const tracerConfig = await runInit( + codeql, + config, + sourceRoot, + parseTraceProcessName(), + parseTraceProcessLevel() + ); if (tracerConfig === undefined) { return; } - if (process.platform === "win32") { + if ( + process.platform === "win32" && + !(await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) + ) { await injectWindowsTracer( parseTraceProcessName(), parseTraceProcessLevel(), @@ -317,6 +329,7 @@ program "Was the 'init' command run with the same '--temp-dir' argument as this command." ); } + await enrichEnvironment(Mode.runner, await getCodeQL(config.codeQLCmd)); importTracerEnvironment(config); let language: Language | undefined = undefined; if (cmd.language !== undefined) { @@ -419,6 +432,7 @@ program "Was the 'init' command run with the same '--temp-dir' argument as this command." ); } + await enrichEnvironment(Mode.runner, await getCodeQL(config.codeQLCmd)); const auth = await getGitHubAuth( logger, diff --git a/src/tracer-config.ts b/src/tracer-config.ts index bf2eceaac5..dcbebfe496 100644 --- a/src/tracer-config.ts +++ b/src/tracer-config.ts @@ -1,10 +1,11 @@ import * as fs from "fs"; import * as path from "path"; -import { CodeQL } from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING } from "./codeql"; import * as configUtils from "./config-utils"; import { Language, isTracedLanguage } from "./languages"; import * as util from "./util"; +import { codeQlVersionAbove } from "./util"; export type TracerConfig = { spec: string; @@ -19,6 +20,24 @@ const CRITICAL_TRACER_VARS = new Set([ "SEMMLE_JAVA_TOOL_OPTIONS", ]); +export async function getTracerConfigForCluster( + config: configUtils.Config +): Promise { + const tracingEnvVariables = JSON.parse( + fs.readFileSync( + path.resolve( + config.dbLocation, + "temp/tracingEnvironment/start-tracing.json" + ), + "utf8" + ) + ); + return { + spec: tracingEnvVariables["ODASA_TRACER_CONFIGURATION"], + env: tracingEnvVariables, + }; +} + export async function getTracerConfigForLanguage( codeql: CodeQL, config: configUtils.Config, @@ -179,16 +198,21 @@ export async function getCombinedTracerConfig( return undefined; } - // Get all the tracer configs and combine them together - const tracedLanguageConfigs: { [lang: string]: TracerConfig } = {}; - for (const language of tracedLanguages) { - tracedLanguageConfigs[language] = await getTracerConfigForLanguage( - codeql, - config, - language - ); + let mainTracerConfig: TracerConfig; + if (await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) { + mainTracerConfig = await getTracerConfigForCluster(config); + } else { + // Get all the tracer configs and combine them together + const tracedLanguageConfigs: { [lang: string]: TracerConfig } = {}; + for (const language of tracedLanguages) { + tracedLanguageConfigs[language] = await getTracerConfigForLanguage( + codeql, + config, + language + ); + } + mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config); } - const mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config); // Add a couple more variables mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec; diff --git a/src/util.ts b/src/util.ts index b7c7ac35fb..b047d60206 100644 --- a/src/util.ts +++ b/src/util.ts @@ -8,7 +8,7 @@ import * as semver from "semver"; import { getApiClient, GitHubApiDetails } from "./api-client"; import * as apiCompatibility from "./api-compatibility.json"; -import { CodeQL } from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING } from "./codeql"; import { Config } from "./config-utils"; import { Language } from "./languages"; import { Logger } from "./logging"; @@ -437,21 +437,37 @@ enum EnvVar { FEATURE_SANDWICH = "CODEQL_ACTION_FEATURE_SANDWICH", } +const exportVar = (mode: Mode, name: string, value: string) => { + if (mode === Mode.actions) { + core.exportVariable(name, value); + } else { + process.env[name] = value; + } +}; + +/** + * Set some initial environment variables that we can set even without + * knowing what version of CodeQL we're running. + */ export function initializeEnvironment(mode: Mode, version: string) { - const exportVar = (name: string, value: string) => { - if (mode === Mode.actions) { - core.exportVariable(name, value); - } else { - process.env[name] = value; - } - }; - - exportVar(EnvVar.RUN_MODE, mode); - exportVar(EnvVar.VERSION, version); - exportVar(EnvVar.FEATURE_SARIF_COMBINE, "true"); - exportVar(EnvVar.FEATURE_WILL_UPLOAD, "true"); - exportVar(EnvVar.FEATURE_MULTI_LANGUAGE, "true"); - exportVar(EnvVar.FEATURE_SANDWICH, "true"); + exportVar(mode, EnvVar.RUN_MODE, mode); + exportVar(mode, EnvVar.VERSION, version); + exportVar(mode, EnvVar.FEATURE_SARIF_COMBINE, "true"); + exportVar(mode, EnvVar.FEATURE_WILL_UPLOAD, "true"); +} + +/** + * Enrich the environment variables with further flags that we cannot + * know the value of until we know what version of CodeQL we're running. + */ +export async function enrichEnvironment(mode: Mode, codeql: CodeQL) { + if (await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) { + exportVar(mode, EnvVar.FEATURE_MULTI_LANGUAGE, "false"); + exportVar(mode, EnvVar.FEATURE_SANDWICH, "false"); + } else { + exportVar(mode, EnvVar.FEATURE_MULTI_LANGUAGE, "true"); + exportVar(mode, EnvVar.FEATURE_SANDWICH, "true"); + } } export function getMode(): Mode {