Repository navigation
feat(release): VirusTotal policy v2, the isolated-sibling candidate - #3218
Merged
Merged
Conversation
The VirusTotal gate and the candidate selector stopped gating on how many
engines answered in August: the count is VirusTotal fleet availability on
the day, not a verdict, and a 50-engine floor had failed a whole release on
a binary with zero detections. append-vt-notes.sh kept that floor
(`completed < 50`), so a release whose gate passed could still fail later,
in `verify`, after the draft exists, in a job the retry controller never
retries. The v0.12.2-rc.1 run had exactly such a candidate: clean, judged by
49 engines ("verdict still applies" in the gate log).
The notes now keep only the incoherence check the selector keeps
(`total < completed`) and report the count in the engine range.
The notes contract gains the case: a shipped, clean binary judged by 49
engines publishes its notes and the range shows 49. It fails without this
change with "incomplete VirusTotal result".
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The v0.12.2-rc.1 release candidate passed every test and was then blocked
by one engine on a file it would never have shipped: APEX flagged the
UNSTRIPPED windows-amd64 candidate (1 of 67 engines), while the
debug-stripped and stripped forms of the same linker output were clean and
the stripped one was the form the selector ships. Under policy v1 any hard
result on any of the 24 candidates blocks all eight products.
Policy cbm-vt-candidate-selection-v2 adds one narrow class, "isolated":
exactly one detection, by one engine other than Microsoft, as malicious,
while every sibling form of the same product is clean AND the same engine,
on the same engine version and definitions, returned a non-detection for
each of them. The forms share their code (and two of them their symbols),
so such a verdict describes that file image, not the program. An isolated
candidate is never shipped and is named in the release notes; more than one
in a release, and everything weaker (engine missing, timed out or on other
definitions for a sibling; a second engine; suspicious; a sibling that is
not clean; a Microsoft label) still blocks.
- check-virustotal.sh: records every engine's answer per object; with
VT_ISOLATED_SIBLING_CANDIDATES (the staged candidate manifest) it decides
hard verdicts once every sibling has an answer. Results format v3 adds
`detections` (who flagged what, on which definitions) and
`isolated_evidence` (the engine's answer for every sibling).
- select-release-candidates.py re-derives the sibling proof from that
evidence instead of trusting the label and never selects the isolated
form; verify-release-selection.py re-checks it from the selection alone.
The selection policy is recorded as virustotal-v3.
- append-vt-notes.sh discloses the isolated candidate (product, form,
sha256, engine, label, definitions, link); publish-vt-evidence.sh reads v3.
- Only the candidate stage opts in (_build.yml select-package); the scan of
everything extracted from the shipped containers stays strict, pinned by a
tripwire in test_release_gate_chain_contract.sh.
- SECURITY.md states policy v2 (it still described two candidates).
Tests: the gate contract runs the rc.1 situation end to end (isolated, with
the engine's sibling answers recorded) and ten blocking variants, each with
its diagnostic; the old gate fails the positive case ("1 VirusTotal object(s)
failed release policy"). The selection contract covers an isolated form in
every position, eight cross-row negatives and verifier rejections with a
positive control. 13 of 14 targeted mutations are caught; the 14th is
equivalent (the next line already rejects a suspicious verdict).
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds VirusTotal candidate policy v2, "isolated sibling". The v0.12.2-rc.1 release candidate (run 47552487403) passed every test and was then blocked by one engine on a file it would never have shipped:
windows-amd64candidate (1 of 67 engines).The rule
A candidate is isolated when all of these hold:
The forms share their code, and two of them their symbols, so such a verdict describes that file image, not the program. An isolated candidate is never shipped and is named in the release notes. Everything else still blocks:
!mlrule);Where it lives
check-virustotal.sh:VT_ISOLATED_SIBLING_CANDIDATES(the staged candidate manifest), decides hard verdicts once every sibling has an answer;detections(who flagged what, on which definitions) andisolated_evidence(the engine's answer for every sibling).select-release-candidates.py: re-derives the sibling proof from that evidence instead of trusting the label, and never selects the isolated form.verify-release-selection.py: re-checks the rule from the selection alone.virustotal-v3.append-vt-notes.shdiscloses the isolated candidate (product, form, SHA-256, engine, label, definitions, link);publish-vt-evidence.shreads v3._build.ymlselect-package). The scan of everything extracted from the shipped containers stays strict; a tripwire intest_release_gate_chain_contract.shpins that.CI scope
How it was verified
1 VirusTotal object(s) failed release policy.dry-run.yml(real VirusTotal) before merge. Local ladder skipped: script-only change.