Skip to content

Commit 1ddfbb0

Browse files
author
Alvaro Muñoz
committed
Update actions fragment
1 parent 0ea34df commit 1ddfbb0

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/action/dist/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28610,6 +28610,7 @@ async function newCodeQL() {
2861028610
suite: `codeql-suites/${core.getInput("suite") || "actions-code-scanning"}.qls`,
2861128611
source_root: core.getInput("source-root"),
2861228612
output: core.getInput("sarif"),
28613+
packs: core.getInput("packs").length > 0 ? core.getInput("packs") : undefined,
2861328614
};
2861428615
}
2861528616
exports.newCodeQL = newCodeQL;
@@ -28706,9 +28707,8 @@ async function codeqlDatabaseAnalyze(codeql, database_path) {
2870628707
"--output",
2870728708
codeql_output,
2870828709
];
28709-
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
28710-
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
28711-
cmd.push("--extension-packs", "local/workflow-models");
28710+
if (codeql.packs !== undefined) {
28711+
cmd.push("--extension-packs", codeql.packs);
2871228712
}
2871328713
// remote pack or local pack
2871428714
if (codeql.pack.startsWith("githubsecuritylab/")) {

.github/action/src/codeql.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export interface CodeQLConfig {
1818
source_root?: string;
1919
// The output file for the SARIF file.
2020
output?: string;
21+
// Extension CodeQL packs to use for analysis.
22+
packs: string | undefined;
2123
}
2224

2325
export async function newCodeQL(): Promise<CodeQLConfig> {
@@ -28,6 +30,8 @@ export async function newCodeQL(): Promise<CodeQLConfig> {
2830
suite: `codeql-suites/${core.getInput("suite") || "actions-code-scanning"}.qls`,
2931
source_root: core.getInput("source-root"),
3032
output: core.getInput("sarif"),
33+
packs:
34+
core.getInput("packs").length > 0 ? core.getInput("packs") : undefined,
3135
};
3236
}
3337

@@ -147,9 +151,8 @@ export async function codeqlDatabaseAnalyze(
147151
codeql_output,
148152
];
149153

150-
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
151-
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
152-
cmd.push("--extension-packs", "local/workflow-models");
154+
if (codeql.packs !== undefined) {
155+
cmd.push("--extension-packs", codeql.packs);
153156
}
154157

155158
// remote pack or local pack

0 commit comments

Comments
 (0)