Skip to content

Commit 13ff6fa

Browse files
authored
Update main.yml
1 parent e933c25 commit 13ff6fa

File tree

1 file changed

+8
-35
lines changed

1 file changed

+8
-35
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,15 @@ on:
88
- master
99

1010
jobs:
11-
wiz-cli-iac-scan:
12-
name: "Wiz-cli IaC Scan"
11+
wiz-cli-scan:
12+
name: "Wiz-cli ${{ matrix.scan-type }} Scan"
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
scan-type: [iac, dir]
1417
env:
15-
SCAN_PATH: "." # Set the relative path in the repo to scan
18+
SCAN_PATH: "."
1619

17-
defaults:
18-
run:
19-
shell: bash
20-
21-
steps:
22-
- name: Check out repository
23-
uses: actions/checkout@v2
24-
25-
- name: Download Wiz CLI
26-
run: curl -o wizcli https://downloads.wiz.io/wizcli/latest/wizcli-linux-amd64 && chmod +x wizcli
27-
28-
- name: Authenticate to Wiz
29-
run: ./wizcli auth --id "$WIZ_CLIENT_ID" --secret "$WIZ_CLIENT_SECRET"
30-
env:
31-
WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }}
32-
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
33-
34-
- name: Run wiz CLI IaC scan
35-
run: ./wizcli iac scan --path $SCAN_PATH
36-
37-
wiz-cli-dir-scan:
38-
name: "Wiz-cli Dir Scan"
39-
runs-on: ubuntu-latest
40-
env:
41-
SCAN_PATH: "." # Set the relative path in the repo to scan
42-
43-
defaults:
44-
run:
45-
shell: bash
46-
4720
steps:
4821
- name: Check out repository
4922
uses: actions/checkout@v2
@@ -57,5 +30,5 @@ jobs:
5730
WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }}
5831
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
5932

60-
- name: Run wiz CLI Dir scan
61-
run: ./wizcli dir scan --path $SCAN_PATH
33+
- name: Run wiz CLI scan
34+
run: ./wizcli ${{ matrix.scan-type }} scan --path $SCAN_PATH

0 commit comments

Comments
 (0)