Update action.yml

This commit is contained in:
Alvaro Muñoz
2024-05-06 20:01:48 +02:00
parent 254664d274
commit c3c6410a73
3 changed files with 9 additions and 29 deletions

View File

@@ -28706,14 +28706,9 @@ async function codeqlDatabaseAnalyze(codeql, database_path) {
"--output",
codeql_output,
];
const extPackPath = process.env["EXTPACK_PATH"];
const extPackName = process.env["EXTPACK_NAME"];
if (extPackPath !== undefined &&
extPackName !== undefined &&
extPackPath !== "" &&
extPackName !== "") {
cmd.push("--additional-packs", extPackPath);
cmd.push("--extension-packs", extPackName);
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
cmd.push("--extension-packs", "local/workflow-models");
}
// remote pack or local pack
if (codeql.pack.startsWith("githubsecuritylab/")) {

View File

@@ -147,16 +147,9 @@ export async function codeqlDatabaseAnalyze(
codeql_output,
];
const extPackPath = process.env["EXTPACK_PATH"];
const extPackName = process.env["EXTPACK_NAME"];
if (
extPackPath !== undefined &&
extPackName !== undefined &&
extPackPath !== "" &&
extPackName !== ""
) {
cmd.push("--additional-packs", extPackPath);
cmd.push("--extension-packs", extPackName);
const useWorkflowModels = process.env["USE_WORKFLOW_MODELS"];
if (useWorkflowModels !== undefined && useWorkflowModels == "true") {
cmd.push("--extension-packs", "local/workflow-models");
}
// remote pack or local pack

View File

@@ -14,12 +14,6 @@ inputs:
suite:
description: "CodeQL Suite to run"
default: "actions-code-scanning"
workflow-extpack-path:
description: "Path to Workflow extpack"
required: false
workflow-extpack-name:
description: "Name of the Workflow extpack"
required: false
runs:
using: 'composite'
@@ -27,14 +21,14 @@ runs:
- name: extpack contents
shell: bash
env:
EXTPACK_PATH: ${{ inputs.workflow-extpack-path }}
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
EXTPACK_PATH: /home/runner/.codeql/packages/local/workflow-models/0.0.1
EXTPACK_NAME: local/workflow-models
run: |
echo "##[group] Workflow Models"
if [ -f $EXTPACK_PATH/models.yml ]; then cat $EXTPACK_PATH/models.yml; fi
echo "##[endgroup]"
echo "##[group] QLPack"
if [ -f $EXTPACK_PATH/qlpack.yml ]; then cat $EXTPACK_PATH/qlpack.yml; fi
if [ -f $EXTPACK_PATH/codeql-pack.yml ]; then cat $EXTPACK_PATH/codeql-pack.yml; echo "USE_WORKFLOW_MODELS=true" >> $GITHUB_ENV; fi
echo "##[endgroup]"
- name: Scan workflows
@@ -45,7 +39,5 @@ runs:
INPUT_SOURCE-ROOT: ${{ inputs.source-root }}
INPUT_SARIF-OUTPUT: ${{ inputs.sarif-output }}
INPUT_SUITE: ${{ inputs.suite }}
EXTPACK_PATH: ${{ inputs.workflow-extpack-path }}
EXTPACK_NAME: ${{ inputs.workflow-extpack-name }}
run: |
node ${{ github.action_path }}/.github/action/dist/index.js