@@ -38,7 +38,12 @@ echo "$VT_ANALYSIS" | tr ',' '\n' | while IFS= read -r entry; do
3838 continue
3939 fi
4040
41- STATS=$( echo " $RESULT " | python3 -c "
41+ # Line 1 is the CSV summary; any further lines name a flagging engine.
42+ # The engine names are what a detection is actionable ON: the FP submission
43+ # has to go to a specific vendor, and "is this the known-noisy one or a new
44+ # family" is the first question asked. Reporting only counts sent the reader
45+ # to the web UI for the one fact the gate already had in hand.
46+ REPORT=$( echo " $RESULT " | python3 -c "
4247import json, sys
4348d = json.loads(sys.stdin.read())
4449attrs = d.get('data', {}).get('attributes', {})
@@ -51,8 +56,16 @@ harmless = stats.get('harmless', 0)
5156total = sum(stats.values())
5257completed = malicious + suspicious + undetected + harmless
5358print(f'{status},{malicious},{suspicious},{completed},{total}')
59+ for engine, r in sorted((attrs.get('results') or {}).items()):
60+ if r.get('category') in ('malicious', 'suspicious'):
61+ label = r.get('result') or r.get('category')
62+ version = r.get('engine_version') or '?'
63+ updated = r.get('engine_update') or '?'
64+ print(f'{engine} = {label} (engine {version}, defs {updated})')
5465" 2> /dev/null || echo " queued,0,0,0,0" )
5566
67+ STATS=$( echo " $REPORT " | head -1)
68+ DETECTIONS=$( echo " $REPORT " | tail -n +2)
5669 STATUS=$( echo " $STATS " | cut -d' ,' -f1)
5770 MALICIOUS=$( echo " $STATS " | cut -d' ,' -f2)
5871 SUSPICIOUS=$( echo " $STATS " | cut -d' ,' -f3)
@@ -66,6 +79,16 @@ print(f'{status},{malicious},{suspicious},{completed},{total}')
6679 fi
6780 if [ " $MALICIOUS " -gt 0 ] || [ " $SUSPICIOUS " -gt 0 ]; then
6881 echo " BLOCKED: $BASENAME flagged ($MALICIOUS malicious, $SUSPICIOUS suspicious / $COMPLETED engines)"
82+ if [ -n " $DETECTIONS " ]; then
83+ echo " $DETECTIONS " | while IFS= read -r detection; do
84+ [ -n " $detection " ] && echo " detected by: $detection "
85+ done
86+ else
87+ # Counts say something flagged but no engine is named: report that
88+ # rather than printing nothing, so the gap is visible instead of
89+ # looking like a detection-free block.
90+ echo " detected by: <engine names unavailable in the analysis response>"
91+ fi
6992 echo " $URL "
7093 echo " FAIL" >> /tmp/vt_gate_fail
7194 else
0 commit comments