@@ -93,6 +93,15 @@ write_response low-engines 0 0 49 "$PROBE_SHA" "$PROBE_SIZE"
9393write_response wrong-hash 0 0 60 " $PROBE2_SHA " " $PROBE_SIZE "
9494write_response wrong-size 0 0 60 " $PROBE_SHA " " $(( PROBE_SIZE + 1 )) "
9595
96+ cat > " $FIX /responses/upload-alias.json" << EOF
97+ {"meta":{"file_info":{"sha256":"$PROBE_SHA ","size":$PROBE_SIZE }},
98+ "data":{"id":"canonical-analysis","type":"analysis","attributes":{"status":"completed",
99+ "stats":{"malicious":0,"suspicious":0,"undetected":60,"harmless":0,
100+ "timeout":0,"confirmed-timeout":0,"failure":0,"type-unsupported":0},
101+ "results":{"Microsoft":{"category":"undetected","result":null,
102+ "engine_version":"1.26070","engine_update":"20260808"}}}}}
103+ EOF
104+
96105cat > " $FIX /responses/named-engine.json" << EOF
97106{"meta":{"file_info":{"sha256":"$PROBE_SHA ","size":$PROBE_SIZE }},
98107 "data":{"id":"named-engine","type":"analysis","attributes":{"status":"completed",
@@ -200,11 +209,16 @@ run_gate() { # action-output -> prints rc
200209
201210clean_output=" binaries/objects/probe=$( url_for clean-analysis) "
202211[ " $( run_gate " $clean_output " ) " = " 0" ] || fail " clean exact scan must pass: $( cat " $FIX /last.log" ) "
212+ alias_output=" binaries/objects/probe=$( url_for upload-alias) "
213+ [ " $( run_gate " $alias_output " ) " = " 0" ] || \
214+ fail " a content-bound canonical response alias must pass: $( cat " $FIX /last.log" ) "
203215RESULTS=" $FIX /work/binaries/vt-results.tsv"
204216[ -f " $RESULTS " ] || fail " clean gate did not atomically publish its results manifest"
205217grep -q ' ^# cbm-virustotal-results-v1$' " $RESULTS " || fail " results marker missing"
206218grep -q " objects/probe.*$PROBE_SHA .*$PROBE_SIZE .*60" " $RESULTS " || \
207219 fail " results do not bind path/hash/size/actual engine count"
220+ grep -Fq ' upload-alias' " $RESULTS " || \
221+ fail " results must retain the action's submitted analysis ID"
208222
209223for id in one-malicious one-suspicious; do
210224 [ " $( run_gate " binaries/objects/probe=$( url_for " $id " ) " ) " != " 0" ] || \
0 commit comments