Skip to content

Commit 3271b04

Browse files
committed
Pass auth parameters directly as secrets to scan command
1 parent eb25507 commit 3271b04

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,14 @@ jobs:
113113
# Wiz CLI release notes: https://docs.wiz.io/release-notes/wiz-cli
114114
WIZ_CLI_VERSION: 1.17.0
115115
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 }}
121116
- name: Run wiz-cli docker image scan
122117
env:
123118
IMAGE_NAME: ${{ inputs.image_name }}
124-
run: ./wizcli docker scan --image "${IMAGE_NAME}"
119+
run: |
120+
./wizcli docker scan \
121+
--image "${IMAGE_NAME}" \
122+
--client-id "${{ secrets.WIZ_CLIENT_ID }}" \
123+
--client-secret "${{ secrets.WIZ_CLIENT_SECRET }}"
125124
- name: Run post-build commands
126125
shell: bash
127126
if: ${{ inputs.postbuild_script != '' }}

0 commit comments

Comments
 (0)