Skip to content

Commit f1d08c6

Browse files
committed
Add wiz container scanning to build and push workflow
1 parent 1b87069 commit f1d08c6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build-and-push.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ jobs:
108108
should_tag_ghcr: ${{ inputs.should_tag_ghcr }}
109109
should_tag_latest: ${{ inputs.should_tag_latest }}
110110
gar_location: ${{ inputs.gar_location }}
111+
- name: Download Wiz CLI
112+
env:
113+
# Wiz CLI release notes: https://docs.wiz.io/release-notes/wiz-cli
114+
WIZ_CLI_VERSION: 1.17.0
115+
run: curl -Lo wizcli "https://downloads.wiz.io/v1/wizcli/$WIZ_CLI_VERSION/wizcli-linux-amd64" && chmod +x wizcli
116+
- name: Authenticate to Wiz
117+
run: ./wizcli auth --id "$WIZ_CLIENT_ID" --secret "$WIZ_CLIENT_SECRET"
118+
env:
119+
WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }}
120+
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
121+
- name: Run wiz-cli docker image scan
122+
env:
123+
IMAGE_NAME: ${{ inputs.image_name }}
124+
run: ./wizcli docker scan --image "${IMAGE_NAME}"
111125
- name: Run post-build commands
112126
shell: bash
113127
if: ${{ inputs.postbuild_script != '' }}

0 commit comments

Comments
 (0)