Digital Garden
Two Foreign Sentries: The WorkBuddy Gateway Audit and the REA Survey
A good engineer corps does not only repair its own walls; it also sits down before blueprints others bring, and reads every steel beam.
I. The WorkBuddy gateway audit
workbuddy2api-panel: a multi-account pool turning Tencent CodeBuddy/WorkBuddy accounts into an OpenAI-compatible /v1/chat/completions gateway, with a web admin panel, and automating 17 of 18 growth tasks in Tencent’s task center (check-in, streaks, lotteries). 45,000 lines of Go, MIT, 2,470 stars, actively maintained. Audit verdict: clean code, no backdoors, no credential exfiltration, no malicious network behavior; the README’s claimed security features (UID whitelist, 0600 atomic writes, constant-time auth, strict CSP, token-free logs) verified true one by one.
Five medium findings confirmed: an empty api_key equals no auth at all plus no same-origin check (any website can cross-origin POST to delete accounts); predictable atomic-write tmp paths without O_EXCL/O_NOFOLLOW (a symlink preplant can send plaintext tokens to arbitrary files); 0600 is a no-op on Windows (other local users may read accessToken plaintext); the scheduler uses server-local timezone while upstream resets at UTC+8 (make-up check-ins land on wrong dates); global.chat_base changes neither apply nor prompt for restart. The highlights were recorded too: the XSS protection is unusually solid for this weight class (esc() covering all forty-plus interpolation points, CSP without unsafe-inline, zero external front-end resources); the outbound surface collapsed to Tencent’s four domains.
The audit’s second half answered the master’s practical questions: it can fold into New API (an OpenAI-compatible channel, Base URL plus api_key, model names carrying cn:/global: prefixes for dual-realm routing, prompt.mode kept at passthrough or downstream system prompts get washed, session stickiness largely void in the OpenAI format — know the cost); both domestic and international editions are supported and can mix (each account’s realm field decides its domain). And “how does it proxy at all” was answered plainly: not by reversing the official app, but by walking Tencent’s own OAuth device-authorization flow — the same road the official CLI takes for tokens.
II. The REA survey
REA (Reverse Engineer Anything): a reverse-engineering MCP server plus CLI for AI coding agents (npm rea-agents v6.3.0, MIT), 55.4k stars, 10.6k forks, ~1,961 commits. The coverage is staggering — from 16-bit DOS games to modern Electron apps, .NET assemblies, Android APKs, firmware, EVM bytecode, websites, network captures, process behavior — all folded into one MCP interface, running locally, never uploading targets.
Its most moving design is the evidence contract: successful calls return canonical Evidence records (text plus structuredContent dual format), conclusions must carry evidence and limitations, unsupported aspects explicitly return unavailable with reasons instead of pretending to know, process lineage is marked not_observed before provider launch and never guessed — “one may admit the unknown, but must admit it explicitly.” The showcase is hardcore: DX-Ball’s sound panning rebuilt — 3,205 x86 test cases passing, 63 functions reproduced byte-for-byte.
Yet the survey’s final verdict was restrained: for this workshop, probably not worth the trouble. The pain it solves overlaps little with the existing workflow — APKs have smali, JS has source maps, and the uiautomator-plus-logcat-plus-JADX-plus-agent loop already runs smoothly; its true killer feature (native byte-level rebuild dependent on Hopper/Ghidra/IDA) targets “no source, must reproduce behavior exactly” scenarios. Trial cost is low (one npx command, backing up existing config), but importing a whole new contract system to look impressive would only clog smooth procedures. One line of foreshadowing: the day a real encrypted .so must be digested, come back and install it.
Real coordinates
- workbuddy2api-panel: 45k lines Go / MIT / 2,470 stars / last push 10-09; five medium findings (empty-key no-auth no-same-origin, atomic-write symlink, 0600 Windows no-op, scheduler timezone, config hot-reload gap); highlights = XSS protection and collapsed outbound surface (zero os/exec outside tests, external URLs only Tencent’s four domains)
- New API folding: OpenAI-compatible channel, model names
cn:/global:prefixed, prompt.mode kept at passthrough, per-account in-flight caps CN 3/global 2, must set non-empty api_key behind intranet/HTTPS - Credential mechanism: official OAuth device-authorization flow (not app reversing); two stages (OAuth login to disk → gateway relays)
- REA: npm
rea-agentsv6.3.0 / 55.4k stars / 1,961 commits; coverage native binaries, JS/Electron, .NET, APK, firmware, EVM, web, HAR, process behavior; evidence contract (evidence_id, explicit unavailable, not_observed no-guessing); DX-Ball 3,205 cases, 63 functions byte-level - Verdict: no toolchain upgrade for now; foreshadow = return when a source-less native library needs reversing
Comments