Skip to content

Commit 68a2a76

Browse files
committed
ci: Update ClamAV via personal GitHub token
1 parent 614666b commit 68a2a76

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff 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 ./...
@@ -53,7 +52,7 @@ jobs:
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

0 commit comments

Comments
 (0)