Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(ci): stop gating the release on how many VirusTotal engines answered
Martin Vogeldb26e9615e3d
diff --git a/README.md b/README.mdindex 24e0a3cfc..e47936b21 100644--- a/README.md+++ b/README.md@@ -20,7 +20,7 @@ High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-si> **Research** — The design and benchmarks behind this project are described in the preprint [*Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP*](https://arxiv.org/abs/2603.27277) (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.-> **Security & Trust** — This tool reads your codebase and writes to your agent configuration files. That is what it is designed to do. If you prefer to audit before running, the [full source is here](https://github.com/DeusData/codebase-memory-mcp). For each release product, both stripped and unstripped executable candidates are submitted to VirusTotal before testing; the selected candidate is then packaged with its SHA-256 unchanged. Release notes link every measured candidate result. Publication requires at least 50 decisive engines and permits only the narrowly documented single-Microsoft `!ml` tolerance in [SECURITY.md](SECURITY.md#our-release-policy). All processing happens 100% locally; your code never leaves your machine. Found a security issue? We want to know — see [SECURITY.md](SECURITY.md). Security is Priority #1 for us.+> **Security & Trust** — This tool reads your codebase and writes to your agent configuration files. That is what it is designed to do. If you prefer to audit before running, the [full source is here](https://github.com/DeusData/codebase-memory-mcp). For each release product, both stripped and unstripped executable candidates are submitted to VirusTotal before testing; the selected candidate is then packaged with its SHA-256 unchanged. Release notes link every measured candidate result. Publication permits only the narrowly documented single-Microsoft `!ml` tolerance in [SECURITY.md](SECURITY.md#our-release-policy). All processing happens 100% locally; your code never leaves your machine. Found a security issue? We want to know — see [SECURITY.md](SECURITY.md). Security is Priority #1 for us.<p align="center"><img src="docs/graph-ui-screenshot.png" alt="Graph visualization UI showing the codebase-memory-mcp knowledge graph" width="800">@@ -794,7 +794,7 @@ internal/cbm/ Vendored tree-sitter grammars (158 languages) + AST extracEvery release is verified through a multi-layer pipeline before publication:-- **VirusTotal** — all 16 stripped/unstripped executable candidates across the eight release products are scanned before smoke/soak (minimum 50 decisive engines; clean is preferred and only the single-Microsoft `!ml` tolerance documented in [SECURITY.md](SECURITY.md#our-release-policy) may pass). The selected executable is packaged without changing its SHA-256, and release notes link every candidate result and the selection evidence. Archive containers are checksummed, not redundantly resubmitted.+- **VirusTotal** — all 16 stripped/unstripped executable candidates across the eight release products are scanned before smoke/soak (clean is preferred and only the single-Microsoft `!ml` tolerance documented in [SECURITY.md](SECURITY.md#our-release-policy) may pass; the number of engines that returned a decisive result is recorded as evidence but is VirusTotal fleet availability, not a pass condition). The selected executable is packaged without changing its SHA-256, and release notes link every candidate result and the selection evidence. Archive containers are checksummed, not redundantly resubmitted.- **SLSA Level 3** — cryptographic build provenance generated by the trusted GitHub Actions build workflow; verify with `gh attestation verify <file> --repo DeusData/codebase-memory-mcp --signer-workflow DeusData/codebase-memory-mcp/.github/workflows/_build.yml`- **Sigstore cosign** — keyless signatures on all artifacts; bundles included in every release- **SHA-256 checksums** — `checksums.txt` published with every release; verified by both install scripts before extractiondiff --git a/SECURITY.md b/SECURITY.mdindex dd7257a90..19e6eea04 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -126,7 +126,7 @@ Releases are created as **drafts** (invisible to users) and only published after2. **Sigstore cosign signing** — keyless digital signatures verifiable by anyone3. **SBOM** — Software Bill of Materials (SPDX) listing all vendored dependencies4. **SHA-256 checksums** — published with every release-5. **VirusTotal scanning** — both stripped and unstripped executable candidates for every release product are scanned before smoke/soak. Each completed analysis must contain at least 50 decisive engine results. Zero malicious and zero suspicious is preferred; the only tolerated result is exactly one Microsoft malicious label ending in `!ml`, which is disclosed. The selected executable is packaged without changing its SHA-256; archive containers are checksummed rather than redundantly rescanned. Release notes link every candidate result and the selection evidence.+5. **VirusTotal scanning** — both stripped and unstripped executable candidates for every release product are scanned before smoke/soak. Zero malicious and zero suspicious is preferred; the only tolerated result is exactly one Microsoft malicious label ending in `!ml`, which is disclosed. The selected executable is packaged without changing its SHA-256; archive containers are checksummed rather than redundantly rescanned. Release notes link every candidate result and the selection evidence.6. **OpenSSF Scorecard** — repository security health scoreScope of the SLSA claim: this is a build provenance claim for releasediff --git a/docs/index.html b/docs/index.htmlindex 40e3828a3..3ca89d290 100644--- a/docs/index.html+++ b/docs/index.html@@ -165,7 +165,7 @@"name": "Does codebase-memory-mcp send my code anywhere?","acceptedAnswer": {"@type": "Answer",- "text": "No. All indexing and querying happen 100% locally on your machine. There is no embedded LLM and no API key — your MCP client acts as the intelligence layer. Before release testing, both stripped and unstripped executable candidates for every platform and link mode are submitted to VirusTotal. The selected candidate is packaged with its SHA-256 unchanged, and release notes link every measured result. Publication requires at least 50 decisive engines and permits only the documented single-Microsoft !ml tolerance."+ "text": "No. All indexing and querying happen 100% locally on your machine. There is no embedded LLM and no API key — your MCP client acts as the intelligence layer. Before release testing, both stripped and unstripped executable candidates for every platform and link mode are submitted to VirusTotal. The selected candidate is packaged with its SHA-256 unchanged, and release notes link every measured result. Publication permits only the documented single-Microsoft !ml tolerance."}},{@@ -793,8 +793,8 @@<p>No. All indexing and querying happen 100% locally. There is no embedded LLM and no API key. Releasearchives are signed and checksummed. Before testing, both stripped and unstripped executable candidatesfor every platform and link mode are submitted to VirusTotal; the selected candidate is packaged with its- SHA-256 unchanged. Release notes link every measured result. Publication requires at least 50 decisive- engines and permits only the documented single-Microsoft <code>!ml</code> tolerance.</p>+ SHA-256 unchanged. Release notes link every measured result. Publication permits only the+ documented single-Microsoft <code>!ml</code> tolerance.</p><h3>Does it support semantic or natural-language code search?</h3><p>Yes. Alongside structural and full-text search, <code>search_graph</code>'s <code>semantic_query</code>diff --git a/scripts/ci/check-virustotal.sh b/scripts/ci/check-virustotal.shindex af3513959..8374e2395 100755--- a/scripts/ci/check-virustotal.sh+++ b/scripts/ci/check-virustotal.sh@@ -658,14 +658,26 @@ def is_tolerated_detection(result: CompletedResult) -> bool:return engine == "Microsoft" and category == "malicious" and label.endswith("!ml")+# Classification depends ONLY on what engines found, never on how many answered.+#+# "hard" means an engine actually found something we will not ship: two or more+# engines, any non-Microsoft engine, any label that is not `!ml`, or anything+# suspicious.+#+# How many engines returned a decisive result is NOT a policy input. It is a+# property of VirusTotal's fleet on the day, which we cannot influence: these+# binaries are ~300 MB and many engines skip or time out at that size, so the+# count varies run to run (observed on one run: one object at 48, the other+# fifteen spread 59-68). A 50-engine floor turned that variance into a release+# blocker — it failed an 8-target release on a windows-arm64 candidate with+# ZERO detections whose own sibling scanned clean at 66. Gating on it makes+# shipping a lottery decided by someone else's infrastructure, so the count is+# recorded as evidence and nothing more.def classify_result(result: CompletedResult, min_engines: int) -> str:- if result.completed_engines < min_engines:- return "hard"- if result.malicious == 0 and result.suspicious == 0:- return "clean"- if is_tolerated_detection(result):- return "microsoft-ml"- return "hard"+ del min_engines # retained for signature stability; not a policy input+ if result.malicious or result.suspicious:+ return "microsoft-ml" if is_tolerated_detection(result) else "hard"+ return "clean"def main() -> None:@@ -733,14 +745,14 @@ def main() -> None:completed.append(result)tolerated = is_tolerated_detection(result)if result.completed_engines < min_engines:- message = (- f"{submission.expected.scan_path} completed with only "+ # Reported, never fatal. See classify_result: engine count is+ # VirusTotal's fleet availability, not a property of our binary.+ print(+ f"NOTE: {submission.expected.scan_path} was judged by "f"{result.completed_engines}/{result.total_engines} decisive engines "- f"(< {min_engines})"+ f"(below the {min_engines} reference); verdict still applies")- failures.append(message)- print(f"BLOCKED: {message}")- elif result.malicious or result.suspicious:+ if result.malicious or result.suspicious:message = (f"{submission.expected.scan_path} flagged "f"({result.malicious} malicious, {result.suspicious} suspicious / "diff --git a/scripts/ci/select-release-candidates.py b/scripts/ci/select-release-candidates.pyindex 6c25d65d5..7fb453343 100755--- a/scripts/ci/select-release-candidates.py+++ b/scripts/ci/select-release-candidates.py@@ -320,8 +320,12 @@ def validate_result_row(row: dict[str, str], candidate: dict[str, str]) -> None:total = parse_nonnegative(row, "total_engines", scan_path=scan_path)malicious = parse_nonnegative(row, "malicious", scan_path=scan_path)suspicious = parse_nonnegative(row, "suspicious", scan_path=scan_path)- if completed < MIN_ENGINES or total < completed:- raise ContractError(f"VT result has incomplete engine coverage: {scan_path}")+ # `total < completed` stays: that is an incoherent response. A low decisive+ # count does NOT — how many engines answered is VirusTotal fleet+ # availability on the day, not a property of this binary, and gating on it+ # made an 8-target release fail on a candidate with zero detections.+ if total < completed:+ raise ContractError(f"VT result has incoherent engine coverage: {scan_path}")if ANALYSIS_ID_RE.fullmatch(row["analysis_id"]) is None:raise ContractError(f"VT result has invalid analysis id: {scan_path}")for field in ("microsoft_engine_version", "microsoft_engine_update"):diff --git a/tests/test_vt_gate_policy_contract.sh b/tests/test_vt_gate_policy_contract.shindex f04b61982..97bdd1b6a 100644--- a/tests/test_vt_gate_policy_contract.sh+++ b/tests/test_vt_gate_policy_contract.sh@@ -302,9 +302,14 @@ for id in one-malicious one-suspicious; do[ "$(run_gate "binaries/objects/probe=$(url_for "$id")")" != "0" ] || \fail "$id must block"done-[ "$(run_gate "binaries/objects/probe=$(url_for low-engines)")" != "0" ] || \- fail "completed analysis below the 50-engine policy must block"-grep -q 'only 49/49 decisive engines' "$FIX/last.log" || fail "low-engine failure is not explicit"+# A low decisive-engine count must NOT block. It is VirusTotal fleet+# availability on the day, not a property of our binary: a ~300 MB release+# artifact is skipped or timed out by many engines, so the count moves run to+# run and a floor turns shipping into a lottery. It is reported, not enforced.+[ "$(run_gate "binaries/objects/probe=$(url_for low-engines)")" = "0" ] || \+ fail "a clean verdict must stand regardless of how many engines answered: $(cat "$FIX/last.log")"+grep -q 'NOTE: .*49/49 decisive engines' "$FIX/last.log" || \+ fail "a below-reference engine count must still be reported explicitly"# A single Microsoft `!ml` verdict is the tolerated case: it passes, but it is# reported and recorded rather than silently downgraded to "clean".@@ -394,4 +399,4 @@ printf 'tampered\n' > "$FIX/work/binaries/objects/probe"[ "$(run_gate "$clean_output")" != "0" ] || fail "tampered staged object must block before polling"grep -q 'changed after extraction' "$FIX/last.log" || fail "tamper failure is not diagnosable"-echo 'PASS: VT gate is exact-set, content-bound, >=50-engine; tolerates exactly one Microsoft !ml verdict and nothing else'+echo 'PASS: VT gate is exact-set and content-bound; tolerates exactly one Microsoft !ml verdict and nothing else; engine count is evidence, not a gate'