diff --git a/.github/workflows/virustotal_scan.yml b/.github/workflows/virustotal_scan.yml index b17f851a2..88ec7f7e9 100644 --- a/.github/workflows/virustotal_scan.yml +++ b/.github/workflows/virustotal_scan.yml @@ -39,12 +39,13 @@ jobs: for apk in release_assets/*.apk; do filename=$(basename "$apk") + sha256=$(sha256sum "$apk" | head -c 64) echo "Scanning $filename..." scan_id=$(vt scan file "$apk" -k $VT_API_KEY | awk '{print $2}') echo "Scan ID: $scan_id" - for i in {1..10}; do + for i in {1..20}; do sleep 15 analysis_json=$(vt analysis report "$scan_id" -k $VT_API_KEY --format json) status=$(echo "$analysis_json" | jq -r '.[0].status') @@ -55,18 +56,19 @@ jobs: done if [ "$status" != "completed" ]; then - echo "$filename — BAD ❌ (analysis incomplete)" >> vt_report.txt + echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256) — BAD ❌ (analysis incomplete)" >> vt_report.txt + break elif [ "$malicious" -gt 0 ]; then - echo "$filename — BAD ❌" >> vt_report.txt + echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256) — BAD ❌" >> vt_report.txt else - echo "$filename — OK ✅" >> vt_report.txt + echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256)" >> vt_report.txt fi done - name: Update Release with Quick Report env: TAG: ${{ github.event.release.tag_name }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # <-- обязательно + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # <-- mandatory run: | gh release view "$TAG" --json body -q .body > current_notes.txt cat vt_report.txt >> current_notes.txt