mirror of
https://github.com/github/codeql.git
synced 2025-12-28 06:36:33 +01:00
Update action to use javascript extractor
This commit is contained in:
10
.github/action/dist/index.js
vendored
10
.github/action/dist/index.js
vendored
@@ -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}'`);
|
||||
|
||||
2
.github/action/src/codeql.ts
vendored
2
.github/action/src/codeql.ts
vendored
@@ -24,7 +24,7 @@ export interface CodeQLConfig {
|
||||
|
||||
export async function newCodeQL(): Promise<CodeQLConfig> {
|
||||
return {
|
||||
language: "yaml",
|
||||
language: "javascript",
|
||||
path: await findCodeQL(),
|
||||
pack: "githubsecuritylab/actions-queries",
|
||||
suite: `codeql-suites/${core.getInput("suite") || "actions-code-scanning"}.qls`,
|
||||
|
||||
8
.github/action/src/index.ts
vendored
8
.github/action/src/index.ts
vendored
@@ -15,7 +15,7 @@ export async function run(): Promise<void> {
|
||||
|
||||
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<void> {
|
||||
"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
|
||||
|
||||
Reference in New Issue
Block a user