File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,11 @@ jobs:
2828 - name : Install system dependencies (keepassxc + clamav)
2929 run : |
3030 sudo apt-get update
31- sudo apt-get install -y --no-install-recommends keepassxc clamav clamav-freshclam
32- # Stop the auto-updater to avoid lock contention with manual freshclam
33- sudo systemctl stop clamav-freshclam || true
34- # Attempt DB update; use --stdout to bypass /var/log locking issues
35- sudo freshclam --stdout --verbose || echo "Non-fatal: freshclam update failed or rate-limited; proceeding with packaged DB"
36- echo "ClamAV version:"; clamscan --version || true
31+ sudo apt-get install -y --no-install-recommends keepassxc clamav
32+ # Update ClamAV signatures using GitHub token to avoid rate limits
33+ echo "Updating ClamAV signatures..."
34+ sudo freshclam --user-agent="ClamAV-GitHub/${{ github.repository }} (${{ secrets.GITHUB_TOKEN }})" || echo "freshclam failed; using existing signatures"
35+ clamscan --version
3736
3837 - name : Run unit tests
3938 run : go test ./...
5352 - name : Virus scan dist artifacts
5453 run : |
5554 echo "Scanning dist/ with ClamAV..."
56- # clamscan returns 1 if a virus is found, 0 if none found.
55+
5756 clamscan --recursive --infected --verbose dist/ || SCAN_STATUS=$?
5857 if [ "${SCAN_STATUS:-0}" -eq 1 ]; then
5958 echo "❌ Virus detected in build artifacts. Aborting publish." >&2
You can’t perform that action at this time.
0 commit comments