Skip to content

feat(release): VirusTotal policy v2, the isolated-sibling candidate - #3218

Merged
DeusData merged 2 commits into
mainfrom
feat/vt-policy-v2-isolated-sibling
Dec 6, 2026
Merged

DeusData merged 2 commits into
mainfrom
feat/vt-policy-v2-isolated-sibling

Conversation

@DeusData

@DeusData DeusData commented Dec 6, 2026

Copy link
Copy Markdown
Owner

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:

  • APEX flagged the unstripped windows-amd64 candidate (1 of 67 engines).
  • The debug-stripped and stripped forms of the same linker output were clean, and the stripped form is the one the selector ships.
  • Under v1, any hard result on any of the 24 candidates blocks all eight products.

Contains #3217's commit (the release-notes engine floor). Please merge #3217 first.

The rule

A candidate is isolated when all of these hold:

  • exactly one detection, by one engine other than Microsoft, as malicious;
  • every sibling form of the same product is clean;
  • the same engine, on the same engine version and definitions, returned a non-detection for each sibling.

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:

  • the engine missing, timed out or on other definitions for a sibling;
  • a second engine on the candidate;
  • a suspicious verdict;
  • a sibling that isn't clean;
  • a Microsoft label (it keeps its own !ml rule);
  • more than one isolated candidate in a release.

Where it lives

  • check-virustotal.sh:
    • records every engine's answer per object;
    • with VT_ISOLATED_SIBLING_CANDIDATES (the staged candidate manifest), 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 the rule from the selection alone.
  • Selection policy name: virustotal-v3.
  • Release notes and evidence: append-vt-notes.sh discloses the isolated candidate (product, form, SHA-256, engine, label, definitions, link); publish-vt-evidence.sh reads v3.
  • Scope of the opt-in: only the candidate stage opts in (_build.yml select-package). The scan of everything extracted from the shipped containers stays strict; a tripwire in test_release_gate_chain_contract.sh pins that.
  • SECURITY.md states policy v2. It still described two candidates, and its review date had passed.

CI scope

  • Gating: no CI job added, removed or loosened. The change is in release-only scripts and the release policy; PR CI runs their contract tests.
  • Cost, flake surface, trigger: unchanged.

How it was verified

  • Gate contract:
    • runs the rc.1 situation end to end: isolated, with APEX's answers for both siblings recorded;
    • runs ten blocking variants, each asserting its own diagnostic;
    • the old gate fails the positive case with 1 VirusTotal object(s) failed release policy.
  • Selection contract:
    • an isolated form in every position of the order is never selected;
    • eight cross-row negatives fail closed;
    • verifier rejections (shipping an isolated form, two isolated forms) run against a positive control that is accepted, so they can't pass vacuously.
  • Notes contract: the disclosure carries every required detail, and an isolated shipped form fails closed.
  • Mutation check: 13 of 14 targeted mutations are caught. The 14th is equivalent: the next line already rejects a suspicious verdict.
  • Pending: an end-to-end branch dry-run.yml (real VirusTotal) before merge. Local ladder skipped: script-only change.

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>
@DeusData
DeusData merged commit 6849075 into main Dec 6, 2026
71 of 86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant