@@ -5,61 +5,36 @@ inputs:
5
5
token :
6
6
description : GitHub Token
7
7
default : ${{ github.token }}
8
-
9
8
source-root :
10
9
description : " Path of the root source code directory, relative to $GITHUB_WORKSPACE."
11
10
default : ${{ github.workspace }}
12
-
13
11
sarif-output :
14
12
description : " SARIF File Output"
15
13
default : " codeql-actions.sarif"
16
-
17
14
suite :
18
15
description : " CodeQL Suite to run"
19
16
default : " actions-code-scanning"
20
-
21
- workflow-models :
22
- description : " Workflow models"
17
+ workflow-extpack-path :
18
+ description : " Path to Workflow extpack"
19
+ required : false
20
+ workflow-extpack-name :
21
+ description : " Name of the Workflow extpack"
23
22
required : false
24
23
25
24
runs :
26
25
using : ' composite'
27
26
steps :
28
- - name : Process workflow models
27
+ - name : extpack contents
29
28
shell : bash
30
- if : inputs.workflow-models
31
29
env :
32
- MODELS : ${{ inputs.workflow-models }}
33
- run : |
34
- # Create QLPack directory
35
- mkdir workflow-extpack
36
- cd workflow-extpack
37
-
38
- # Store the extension pack file
39
- echo "$MODELS" > models.yml
40
-
41
- # Create QLPack
42
- cat > qlpack.yml << 'EOF'
43
- name: local/workflow-models
44
- library: true
45
- extensionTargets:
46
- githubsecuritylab/actions-all: '*'
47
- dataExtensions:
48
- - models.yml
49
- EOF
50
-
51
- # Set env vars
52
- echo "EXTPACK_PATH=./workflow-extpack" >> $GITHUB_ENV
53
- echo "EXTPACK_NAME=local/workflow-models" >> $GITHUB_ENV
54
-
55
- - name : Show contents
56
- shell : bash
30
+ EXTPACK_PATH : ${{ intpus.workflow-extpack-path }}
31
+ EXTPACK_NAME : ${{ inputs.workflow-extpack-name }}
57
32
run : |
58
33
echo "##[group] Workflow Models"
59
- if [ -f workflow-extpack /models.yml ]; then cat workflow-extpack /models.yml; fi
34
+ if [ -f $EXTPACK_PATH /models.yml ]; then cat $EXTPACK_PATH /models.yml; fi
60
35
echo "##[endgroup]"
61
36
echo "##[group] QLPack"
62
- if [ -f workflow-extpack /qlpack.yml ]; then cat workflow-extpack /qlpack.yml; fi
37
+ if [ -f $EXTPACK_PATH /qlpack.yml ]; then cat $EXTPACK_PATH /qlpack.yml; fi
63
38
echo "##[endgroup]"
64
39
65
40
- name : Scan workflows
70
45
INPUT_SOURCE-ROOT : ${{ inputs.source-root }}
71
46
INPUT_SARIF-OUTPUT : ${{ inputs.sarif-output }}
72
47
INPUT_SUITE : ${{ inputs.suite }}
73
- EXTPACK_PATH : ${{ env.EXTPACK_PATH }}
74
- EXTPACK_NAME : ${{ env.EXTPACK_NAME }}
48
+ EXTPACK_PATH : ${{ intpus.workflow-extpack-path }}
49
+ EXTPACK_NAME : ${{ inputs.workflow-extpack-name }}
75
50
run : |
76
51
node ${{ github.action_path }}/.github/action/dist/index.js
0 commit comments