Start running ATM queries again
This commit is contained in:
parent
4d6e9c02ac
commit
d625a00cee
24 changed files with 112 additions and 26 deletions
20
lib/codeql.js
generated
20
lib/codeql.js
generated
|
|
@ -470,7 +470,25 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
}
|
||||
if (await util.codeQlVersionAbove(codeql, exports.CODEQL_VERSION_CONFIG_FILES)) {
|
||||
const configLocation = path.resolve(config.tempDir, "user-config.yaml");
|
||||
fs.writeFileSync(configLocation, yaml.dump(config.originalUserInput));
|
||||
const augmentedConfig = config.originalUserInput;
|
||||
if (config.injectedMlQueries) {
|
||||
// We need to inject the ML queries into the original user input before
|
||||
// we pass this on to the CLI, to make sure these get run.
|
||||
let packString = util_1.ML_POWERED_JS_QUERIES_PACK.packName;
|
||||
if (util_1.ML_POWERED_JS_QUERIES_PACK.version)
|
||||
packString = `${packString}@${util_1.ML_POWERED_JS_QUERIES_PACK.version}`;
|
||||
if (augmentedConfig.packs === undefined)
|
||||
augmentedConfig.packs = [];
|
||||
if (Array.isArray(augmentedConfig.packs)) {
|
||||
augmentedConfig.packs.push(packString);
|
||||
}
|
||||
else {
|
||||
if (!augmentedConfig.packs.javascript)
|
||||
augmentedConfig.packs["javascript"] = [];
|
||||
augmentedConfig.packs["javascript"].push(packString);
|
||||
}
|
||||
}
|
||||
fs.writeFileSync(configLocation, yaml.dump(augmentedConfig));
|
||||
extraArgs.push(`--codescanning-config=${configLocation}`);
|
||||
}
|
||||
await runTool(cmd, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue