forked from toyota-connected/ivi-homescreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wiz.yml
53 lines (48 loc) · 1.53 KB
/
wiz.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: IaC Misconfigurations scan
on: [push]
permissions:
contents: read
actions: read
id-token: write
security-events: write
jobs:
set-matrix:
runs-on: [self-hosted, default-k8s-runner-linux-x64]
outputs:
dockerfiles: ${{ steps.set-matrix.outputs.dockerfiles }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: find-docker-files
id: set-matrix
run: |
dockerfiles=$(find . -name "Dockerfile" | jq --raw-input --slurp -c 'split("\n") | map(select(. != ""))')
echo "dockerfiles=${dockerfiles}" >> $GITHUB_OUTPUT
wiz-iac-scan-docker:
needs: set-matrix
runs-on: [self-hosted, default-k8s-runner-linux-x64]
if: ${{ needs.set-matrix.outputs.dockerfiles != '[]' && needs.set-matrix.outputs.dockerfiles != '' }}
strategy:
fail-fast: false
matrix:
dockerfile: ${{ fromJson(needs.set-matrix.outputs.dockerfiles) }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Wiz IaC Scan
uses: Innersource/wizcli-wrapper@v1
with:
skip_iac_scan: true
docker_scan_filename: "${{ matrix.dockerfile }}"
skip_docker_build: true
wiz-iac-scan-default:
needs: set-matrix
runs-on: [self-hosted, default-k8s-runner-linux-x64]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Wiz IaC Scan
uses: Innersource/wizcli-wrapper@v1
with:
iac_scan_path: "."
skip_docker_scan: true