File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,11 +38,21 @@ jobs:
3838
3939 - name : Run full scan
4040 run : |
41- docker run --rm -v $GITHUB_WORKSPACE:/scandir gitavscan /gitscan.sh --full | grep "Win.Test.EICAR_HDB-1 FOUND"
41+ set +e
42+ output=$(docker run --rm -v $GITHUB_WORKSPACE:/scandir gitavscan /gitscan.sh --full 2>&1)
43+ echo "=== Full scan output ==="
44+ echo "$output"
45+ echo "=== End output ==="
46+ echo "$output" | grep "Win.Test.EICAR_HDB-1 FOUND"
4247
4348 - name : Run basic scan
4449 run : |
45- docker run --rm -v $GITHUB_WORKSPACE:/scandir gitavscan /gitscan.sh | grep "Win.Test.EICAR_HDB-1 FOUND"
50+ set +e
51+ output=$(docker run --rm -v $GITHUB_WORKSPACE:/scandir gitavscan /gitscan.sh 2>&1)
52+ echo "=== Basic scan output ==="
53+ echo "$output"
54+ echo "=== End output ==="
55+ echo "$output" | grep "Win.Test.EICAR_HDB-1 FOUND"
4656
4757 - name : Run basic scan with optional args
4858 run : |
Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ EXCLUDE="--exclude=/.git"
7676REPO=$( pwd)
7777
7878echo " Scanning working directory..."
79+ echo " DEBUG: pwd=$( pwd) "
80+ echo " DEBUG: ls output:"
81+ ls -la
82+ echo " DEBUG: Running clamscan..."
7983output=$( /usr/bin/clamscan -ri --no-summary $ADDITIONAL_OPTIONS .)
84+ echo " DEBUG: clamscan exit code: $? "
85+ echo " DEBUG: output length: ${# output} "
86+ echo " DEBUG: output content:"
87+ echo " $output "
8088if echo " $output " | grep -q " FOUND" ; then
8189 echo " Found malicious file in ref $( git rev-parse HEAD) " | tee -a /output.txt
8290 echo " $output " | tee -a /output.txt
You can’t perform that action at this time.
0 commit comments