From e5eb85695dadf607ec0f31deeb7a93bc556912ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Mu=C3=B1oz?= Date: Wed, 12 Jun 2024 10:04:50 +0200 Subject: [PATCH] Update action to use javascript extractor --- .github/action/dist/index.js | 10 +++++----- .github/action/src/codeql.ts | 2 +- .github/action/src/index.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/action/dist/index.js b/.github/action/dist/index.js index 8ff1e7759d2..7bb3039fe48 100644 --- a/.github/action/dist/index.js +++ b/.github/action/dist/index.js @@ -28604,7 +28604,7 @@ const toolcache = __importStar(__nccwpck_require__(7784)); const toolrunner = __importStar(__nccwpck_require__(8159)); async function newCodeQL() { return { - language: "yaml", + language: "javascript", path: await findCodeQL(), pack: "githubsecuritylab/actions-queries", suite: `codeql-suites/${core.getInput("suite") || "actions-code-scanning"}.qls`, @@ -28771,16 +28771,16 @@ async function run() { var codeql = await cql.newCodeQL(); core.debug(`CodeQL CLI found at '${codeql.path}'`); await cql.runCommand(codeql, ["version", "--format", "terse"]); - // check yaml support + // check javascript support var languages = await cql.runCommandJson(codeql, [ "resolve", "languages", "--format", "json", ]); - if (!languages.hasOwnProperty("yaml")) { - core.setFailed("CodeQL Yaml extractor not installed"); - throw new Error("CodeQL Yaml extractor not installed"); + if (!languages.hasOwnProperty("javascript")) { + core.setFailed("CodeQL javascript extractor not installed"); + throw new Error("CodeQL javascript extractor not installed"); } // download pack core.info(`Downloading CodeQL Actions pack '${codeql.pack}'`); diff --git a/.github/action/src/codeql.ts b/.github/action/src/codeql.ts index 76eacd6eb67..08c4b420a4c 100644 --- a/.github/action/src/codeql.ts +++ b/.github/action/src/codeql.ts @@ -24,7 +24,7 @@ export interface CodeQLConfig { export async function newCodeQL(): Promise { return { - language: "yaml", + language: "javascript", path: await findCodeQL(), pack: "githubsecuritylab/actions-queries", suite: `codeql-suites/${core.getInput("suite") || "actions-code-scanning"}.qls`, diff --git a/.github/action/src/index.ts b/.github/action/src/index.ts index b1a4fc80c64..53a484ae6c1 100644 --- a/.github/action/src/index.ts +++ b/.github/action/src/index.ts @@ -15,7 +15,7 @@ export async function run(): Promise { await cql.runCommand(codeql, ["version", "--format", "terse"]); - // check yaml support + // check javascript support var languages = await cql.runCommandJson(codeql, [ "resolve", "languages", @@ -23,9 +23,9 @@ export async function run(): Promise { "json", ]); - if (!languages.hasOwnProperty("yaml")) { - core.setFailed("CodeQL Yaml extractor not installed"); - throw new Error("CodeQL Yaml extractor not installed"); + if (!languages.hasOwnProperty("javascript")) { + core.setFailed("CodeQL javascript extractor not installed"); + throw new Error("CodeQL javascript extractor not installed"); } // download pack