Skip to content

Commit d3974a9

Browse files
emmett008djankows
authored andcommitted
modify wiz dir scan step to check local context in maven-master-pulls.yml
1 parent 429f405 commit d3974a9

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ jobs:
3232
- name: Build with Maven
3333
run: mvn -B -U verify --file pom.xml
3434

35+
- name: Check local context
36+
run: |
37+
matches=$(find . -type d -name "target")
38+
if [ -n "$matches" ]; then
39+
echo "Target directory found at:"
40+
echo "$matches"
41+
else
42+
echo "Target directory does not exist."
43+
echo "$PWD"
44+
exit 1
45+
fi
46+
3547
- name: Download Wiz CLI
3648
run: curl -o wizcli https://downloads.wiz.io/wizcli/latest/wizcli-linux-amd64 && chmod +x wizcli
3749

@@ -42,18 +54,9 @@ jobs:
4254
WIZ_CLIENT_SECRET: ${{ secrets.WIZ_CLIENT_SECRET }}
4355

4456
- name: Scan Maven build directory with Wiz
45-
run: |
46-
./wizcli dir scan \
47-
--path . \
48-
--policy "$POLICY" \
49-
--tag repo="${{ github.repository }}" \
50-
--tag commit="${{ github.sha }}" \
51-
--tag java="${{ matrix.java }}" > /dev/null 2>&1
52-
env:
53-
POLICY: "SmartBear default vulnerabilities policy"
57+
run: ./wizcli dir scan --path ./ --tag java="${{ matrix.java }}"
5458

5559
build-java8:
56-
5760
runs-on: ubuntu-latest
5861
strategy:
5962
matrix:

0 commit comments

Comments
 (0)