Skip to content

Commit f43774f

Browse files
committed
Add VirusTotal scanning to release pipeline + CHANGELOG.md
- VirusTotal: scans all release binaries (tar.gz + zip) via crazy-max/ghaction-virustotal after publishing. Scan result links are appended to the release notes automatically. - CHANGELOG.md: local copy of all release notes so history is preserved in the repo, not just on GitHub.
1 parent 281a760 commit f43774f

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,60 @@ jobs:
379379
checksums.txt
380380
body: ${{ inputs.release_notes || '' }}
381381
generate_release_notes: ${{ inputs.release_notes == '' }}
382+
383+
# ── Step 6: VirusTotal scan all release binaries ─────────────
384+
virustotal:
385+
needs: [release]
386+
runs-on: ubuntu-latest
387+
permissions:
388+
contents: write
389+
steps:
390+
- name: Download release assets
391+
env:
392+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
393+
VERSION: ${{ inputs.version }}
394+
run: |
395+
mkdir -p assets
396+
gh release download "$VERSION" --dir assets --repo "$GITHUB_REPOSITORY"
397+
ls -la assets/
398+
399+
- name: Scan all binaries with VirusTotal
400+
uses: crazy-max/ghaction-virustotal@v4
401+
id: virustotal
402+
with:
403+
vt_api_key: ${{ secrets.VIRUS_TOTAL_SCANNER_API_KEY }}
404+
files: |
405+
assets/*.tar.gz
406+
assets/*.zip
407+
408+
- name: Parse scan results and check for detections
409+
env:
410+
VT_ANALYSIS: ${{ steps.virustotal.outputs.analysis }}
411+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
412+
VERSION: ${{ inputs.version }}
413+
run: |
414+
echo "=== VirusTotal Scan Results ==="
415+
echo "$VT_ANALYSIS"
416+
417+
# Build markdown table for release notes
418+
VT_REPORT="---\n\n### VirusTotal Scan Results\n\n"
419+
VT_REPORT+="All release binaries were scanned by [VirusTotal](https://www.virustotal.com/) (70+ antivirus engines).\n\n"
420+
VT_REPORT+="| Binary | Scan |\n|--------|------|\n"
421+
422+
FAILED=false
423+
while IFS= read -r line; do
424+
[ -z "$line" ] && continue
425+
# Format: filename=analysisURL
426+
FILE=$(echo "$line" | cut -d'=' -f1)
427+
URL=$(echo "$line" | cut -d'=' -f2-)
428+
BASENAME=$(basename "$FILE")
429+
VT_REPORT+="| $BASENAME | [View Report]($URL) |\n"
430+
done <<< "$VT_ANALYSIS"
431+
432+
# Append to release notes
433+
EXISTING=$(gh release view "$VERSION" --json body --jq '.body' --repo "$GITHUB_REPOSITORY")
434+
UPDATED="${EXISTING}\n\n${VT_REPORT}"
435+
echo -e "$UPDATED" | gh release edit "$VERSION" --notes-file - --repo "$GITHUB_REPOSITORY"
436+
437+
echo ""
438+
echo "=== Scan links appended to release notes ==="

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Changelog
2+
3+
## v0.5.5 — Hotfix
4+
5+
### Windows Defender False Positive Fix
6+
7+
Removed the DLL resolve tracking feature that was introduced in v0.5.4. The feature contained literal strings (`GetProcAddress`, `dlsym`, `LoadLibrary`) used for code analysis regex patterns, which triggered Windows Defender's `Trojan:Script/Wacatac.B!ml` machine-learning heuristic. The ML model couldn't distinguish our code analysis tool (which *detects* these patterns) from malware (which *uses* them).
8+
9+
The removed feature served a niche use case (tracking dynamic DLL loading in C/C++ projects). All other v0.5.4 features remain intact.
10+
11+
Fixes #89.
12+
13+
## v0.5.4
14+
15+
### Security Hardening — 8-Layer Security Test Suite
16+
17+
New automated security audit suite that runs in CI on every build:
18+
19+
- **Layer 1**: Static allow-list audit for dangerous calls (system/popen/fork) + hardcoded URLs
20+
- **Layer 2**: Binary string audit — scans compiled binary for unauthorized URLs, credentials, dangerous commands
21+
- **Layer 3**: Network egress monitoring via strace (Linux)
22+
- **Layer 4**: Install output path + content validation
23+
- **Layer 5**: Smoke test hardening — clean shutdown, residual process detection, version integrity
24+
- **Layer 6**: Graph UI audit — external domains, CORS, server binding, eval/iframe detection
25+
- **Layer 7**: MCP robustness — 23 adversarial JSON-RPC payloads (malformed JSON, shell injection, SQL injection, path traversal)
26+
- **Layer 8**: Vendored dependency integrity — SHA-256 checksums for 72 vendored files + dangerous call scan across all vendored libraries and 354 tree-sitter grammar files
27+
28+
**Code-level defenses:**
29+
- Shell injection prevention: `cbm_validate_shell_arg()` rejects metacharacters before all `popen`/`system` calls
30+
- SQLite authorizer: blocks `ATTACH`/`DETACH` at engine level (prevents file creation via SQL injection)
31+
- CORS locked to localhost origins only (was wildcard `*`)
32+
- Path containment: `realpath()` check prevents `get_code_snippet` from reading files outside project root
33+
- `/api/process-kill` restricted to server-spawned PIDs only
34+
- SHA-256 checksum verification in update command
35+
36+
### Editor Compatibility
37+
38+
- **OpenCode support** — Added Content-Length framed transport (LSP-style). The server now auto-detects the transport: Content-Length framing for clients that use it (OpenCode, some VS Code extensions), bare JSONL for everyone else. Fully backwards compatible. (Fixes #78)
39+
- **VS Code support** — Fixed schema validation failure (`ingest_traces` array missing `items`), added VS Code to install/uninstall detection, implemented proper MCP protocol version negotiation supporting versions 2024-11-05 through 2025-11-25. (PR #79 by @bingh0)
40+
- **OpenClaw support** — Auto-detects `~/.openclaw/` and writes MCP config to `openclaw.json`.
41+
- **Dual MCP config location**`install` now writes to both `~/.claude/.mcp.json` and `~/.claude.json` for compatibility with Claude Code >=2.1.80 which changed the config path. (Fixes #69)
42+
43+
### Bug Fixes
44+
45+
- **WAL crash safety** — Bulk writes no longer switch away from WAL journal mode. Previously, a crash during indexing could corrupt the database. Now WAL is preserved throughout, making the database recoverable after any crash. (PR #72 by @halindrome)
46+
- **Laravel route false positives** — Route extractors now scoped by file extension (.go->Go, .php->Laravel, .js/.ts->Express, .kt->Ktor). Paths containing `$` or `:` (cache keys, interpolated expressions) are filtered. (PR #65 by @mariomeyer)
47+
- **Swift call extraction** — Fixed 0 CALLS edges for Swift files.
48+
49+
### New Features
50+
51+
- **FastAPI Depends() tracking** — Scans Python function signatures for `Depends(func_ref)` patterns and creates CALLS edges. Auth/DI functions no longer appear as dead code. (PR #66 by @kingchenc)
52+
- **10 agents supported** — Added VS Code and OpenClaw detection. Install now auto-detects and configures 10 coding agents.
53+
54+
### CI & Infrastructure
55+
56+
- Security audit runs as a parallel job (~14 seconds, no build needed) — doesn't block the test->build->smoke pipeline
57+
- Binary security layers run per-platform in smoke jobs (Linux, macOS, Windows)
58+
- Frontend integrity scan on post-build `dist/` output
59+
- VirusTotal scanning of all release binaries
60+
- Updated `CONTRIBUTING.md` for pure C project
61+
- 2044 tests passing
62+
63+
### Contributors
64+
65+
Thanks to @halindrome, @bingh0, @mariomeyer, @kingchenc, @aaabramov, and @heraque for their contributions, bug reports, and testing!
66+
67+
## v0.5.3
68+
69+
See [GitHub release](https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.5.3).

0 commit comments

Comments
 (0)