We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73dfbda commit 7fec270Copy full SHA for 7fec270
1 file changed
.github/workflows/clam-av.yml
@@ -58,12 +58,20 @@ jobs:
58
59
- name: Extract bundle and scan
60
run: |
61
- set -e
+ set -euo pipefail
62
rm -rf scan && mkdir -p scan
63
unzip -q bundle/opencode.zip -d scan
64
echo "File count in payload: $(find scan -type f | wc -l)"
65
clamscan -ri --scan-archive=yes scan | tee clamav.log
66
- ! grep -qE 'Infected files: [1-9][0-9]*' clamav.log
+ if grep -qE 'Infected files: [1-9][0-9]*' clamav.log; then
67
+ findings=$(grep 'FOUND' clamav.log | grep -v 'Eicar-Test-Signature' || true)
68
+ if [ -n "${findings}" ]; then
69
+ echo "Unexpected detections found:" >&2
70
+ echo "${findings}" >&2
71
+ exit 1
72
+ fi
73
+ echo 'Only EICAR detections observed; continuing.'
74
75
76
- name: Upload scan results
77
uses: actions/upload-artifact@v4
0 commit comments