Skip to content

Commit 92b5f88

Browse files
committed
add wiz scan on create PR to master (SWG-14342)
1 parent d5c12e2 commit 92b5f88

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/maven-master-pulls.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,23 @@ jobs:
5858
${{ runner.os }}-maven-
5959
- name: Build with Maven
6060
run: mvn -B -U clean verify -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true -Psamples-java8 --file pom.xml
61+
62+
- name: Download Wiz CLI
63+
run: curl -o wizcli https://downloads.wiz.io/wizcli/latest/wizcli-linux-amd64 && chmod +x wizcli
64+
65+
- name: Authenticate to Wiz
66+
run: ./wizcli auth --id "$WIZ_CLIENT_ID" --secret "$WIZ_CLIENT_SECRET"
67+
env:
68+
WIZ_CLIENT_ID: ${{ secrets.WIZ_CLIENT_ID }}
69+
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
70+
71+
- name: Scan Maven build directory with Wiz
72+
run: |
73+
./wizcli dir scan \
74+
--path . \
75+
--policy "$POLICY" \
76+
--tag repo="${{ github.repository }}" \
77+
--tag commit="${{ github.sha }}" \
78+
--tag java="${{ matrix.java }}"
79+
env:
80+
POLICY: "SmartBear default vulnerabilities policy"

0 commit comments

Comments
 (0)