Skip to content

Commit c3c6410

Browse files
author
Alvaro Muñoz
committed
Update action.yml
1 parent 254664d commit c3c6410

File tree

3 files changed

+9
-29
lines changed

3 files changed

+9
-29
lines changed

.github/action/dist/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28706,14 +28706,9 @@ async function codeqlDatabaseAnalyze(codeql, database_path) {
2870628706
"--output",
2870728707
codeql_output,
2870828708
];
28709-
const extPackPath = process.env["EXTPACK_PATH"];
28710-
const extPackName = process.env["EXTPACK_NAME"];
28711-
if (extPackPath !== undefined &&
28712-
extPackName !== undefined &&
28713-
extPackPath !== "" &&
28714-
extPackName !== "") {
28715-
cmd.push("--additional-packs", extPackPath);
28716-
cmd.push("--extension-packs", extPackName);
28709+
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
28710+
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
28711+
cmd.push("--extension-packs", "local/workflow-models");
2871728712
}
2871828713
// remote pack or local pack
2871928714
if (codeql.pack.startsWith("githubsecuritylab/")) {

.github/action/src/codeql.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,9 @@ export async function codeqlDatabaseAnalyze(
147147
codeql_output,
148148
];
149149

150-
const extPackPath = process.env["EXTPACK_PATH"];
151-
const extPackName = process.env["EXTPACK_NAME"];
152-
if (
153-
extPackPath !== undefined &&
154-
extPackName !== undefined &&
155-
extPackPath !== "" &&
156-
extPackName !== ""
157-
) {
158-
cmd.push("--additional-packs", extPackPath);
159-
cmd.push("--extension-packs", extPackName);
150+
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
151+
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
152+
cmd.push("--extension-packs", "local/workflow-models");
160153
}
161154

162155
// remote pack or local pack

action.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,21 @@ inputs:
1414
suite:
1515
description: "CodeQL Suite to run"
1616
default: "actions-code-scanning"
17-
workflow-extpack-path:
18-
description: "Path to Workflow extpack"
19-
required: false
20-
workflow-extpack-name:
21-
description: "Name of the Workflow extpack"
22-
required: false
2317

2418
runs:
2519
using: 'composite'
2620
steps:
2721
- name: extpack contents
2822
shell: bash
2923
env:
30-
EXTPACK_PATH: ${{ inputs.workflow-extpack-path }}
31-
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
24+
EXTPACK_PATH: /home/runner/.codeql/packages/local/workflow-models/0.0.1
25+
EXTPACK_NAME: local/workflow-models
3226
run: |
3327
echo "##[group] Workflow Models"
3428
if [ -f $EXTPACK_PATH/models.yml ]; then cat $EXTPACK_PATH/models.yml; fi
3529
echo "##[endgroup]"
3630
echo "##[group] QLPack"
37-
if [ -f $EXTPACK_PATH/qlpack.yml ]; then cat $EXTPACK_PATH/qlpack.yml; fi
31+
if [ -f $EXTPACK_PATH/codeql-pack.yml ]; then cat $EXTPACK_PATH/codeql-pack.yml; echo "USE_WORKFLOW_MODELS=true" >> $GITHUB_ENV; fi
3832
echo "##[endgroup]"
3933
4034
- name: Scan workflows
@@ -45,7 +39,5 @@ runs:
4539
INPUT_SOURCE-ROOT: ${{ inputs.source-root }}
4640
INPUT_SARIF-OUTPUT: ${{ inputs.sarif-output }}
4741
INPUT_SUITE: ${{ inputs.suite }}
48-
EXTPACK_PATH: ${{ inputs.workflow-extpack-path }}
49-
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
5042
run: |
5143
node ${{ github.action_path }}/.github/action/dist/index.js

0 commit comments

Comments
 (0)