Skip to content

Commit ef71756

Browse files
authored
Create main.yml
1 parent 4711f4e commit ef71756

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "wiz-cli"
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
wiz-cli-iac-scan:
12+
name: "Wiz-cli IaC Scan"
13+
runs-on: ubuntu-latest
14+
env:
15+
SCAN_PATH: "." # Set the relative path in the repo to scan
16+
POLICY: "SRH-GH-IAC" # Set the desired Wiz CLI policy to use
17+
18+
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
steps:
24+
# Checkout the repository to the GitHub Actions runner
25+
- name: Check out repository
26+
uses: actions/checkout@v2
27+
28+
- name: Download Wiz CLI
29+
run: curl -o wizcli https://downloads.wiz.io/wizcli/latest/wizcli-linux-amd64 && chmod +x wizcli
30+
31+
- name: Authenticate to Wiz
32+
run: ./wizcli auth --id "$WIZ_CLIENT_ID" --secret "$WIZ_CLIENT_SECRET"
33+
env:
34+
WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }}
35+
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
36+
37+
- name: Run wiz CLI IaC scan
38+
run: ./wizcli iac scan --path $SCAN_PATH --policy "$POLICY"

0 commit comments

Comments
 (0)