Skip to content

Commit

Permalink
Use embedded actions extractor only for old CLI versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbartol committed Feb 27, 2025
1 parent 8392354 commit bd44fca
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/codeql.ts
Original file line number Diff line number Diff line change
@@ -558,9 +558,17 @@ export async function getCodeQLForCmd(
}

if (config.languages.indexOf(Language.actions) >= 0) {
extraArgs.push("--search-path");
const extractorPath = path.resolve(__dirname, "../actions-extractor");
extraArgs.push(extractorPath);
// We originally added an embedded version of the Actions extractor to the CodeQL Action
// itself in order to deploy the extractor between CodeQL releases. When we did add the
// extractor to the CLI, though, its autobuild script was missing the execute bit.
// 2.20.6 is the first CLI release with the fully-functional extractor in the CLI. For older
// versions, we'll keep using the embedded extractor. We can remove the embedded extractor
// once 2.20.6 is deployed in the runner images.
if (!(await util.codeQlVersionAtLeast(codeql, "2.20.6"))) {
extraArgs.push("--search-path");
const extractorPath = path.resolve(__dirname, "../actions-extractor");
extraArgs.push(extractorPath);
}
}

const codeScanningConfigFile = await generateCodeScanningConfig(

0 comments on commit bd44fca

Please sign in to comment.