diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..b55ac293 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: "wiz-cli" +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + wiz-scan: + name: "Wiz-cli Scan" + runs-on: ubuntu-latest + env: + SCAN_PATH: "." + + steps: + - name: Check out repository + uses: actions/checkout@v2 + + - name: Download Wiz CLI + run: curl -o wizcli https://downloads.wiz.io/wizcli/latest/wizcli-linux-amd64 && chmod +x wizcli + + - name: Authenticate to Wiz + run: ./wizcli auth --id "$WIZ_CLIENT_ID" --secret "$WIZ_CLIENT_SECRET" + env: + WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }} + WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }} + + - name: Run IaC scan + run: ./wizcli iac scan --path $SCAN_PATH + + - name: Run Dir scan + run: ./wizcli dir scan --path $SCAN_PATH