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
harden(cli): stop shipping a policy-bypass invocation inside the binary
Martin Vogel1b8beb266f46
diff --git a/src/cli/cli.c b/src/cli/cli.cindex 37cb397d8..81a4f2ac2 100644--- a/src/cli/cli.c+++ b/src/cli/cli.c@@ -11498,18 +11498,29 @@ int cbm_cmd_update(int argc, char **argv) {}printf("codebase-memory-mcp update (current: %s)\n\n", CBM_VERSION);#ifdef _WIN32+ /* The printed command deliberately carries NO execution-policy override.+ * A policy-bypass invocation is one of the most heavily weighted+ * malicious-script patterns there is, and emitting it as a literal put+ * that signature inside every Windows artifact we distribute — to save+ * the user one documented step. Pointing at Unblock-File reaches the+ * same outcome and leaves the policy decision with them. README's+ * Windows install section carries the override for the+ * restricted-policy case: documentation is the right place to hand out+ * that incantation, a shipped binary is not. */printf("The update runs from install.ps1, not from this process. Close any\n""running sessions, then run\n\n");if (have_dir) {- printf(" powershell -ExecutionPolicy Bypass -File \"%s\\install.ps1\"\n\n", self_dir);+ printf(" powershell -File \"%s\\install.ps1\"\n\n", self_dir);} else {- printf(" powershell -ExecutionPolicy Bypass -File install.ps1\n"+ printf(" powershell -File install.ps1\n"" (ships in the release archive, and is placed beside the\n"" binary on install)\n\n");}printf("It downloads the latest release, verifies its checksum, and replaces\n"- "this binary in place. If PowerShell refuses to run the script because\n"- "it came from the internet, Unblock-File it first.\n");+ "this binary in place. If PowerShell refuses to run the script, it is\n"+ "usually because the file arrived from the internet: run\n"+ "'Unblock-File install.ps1' first. If your execution policy still\n"+ "blocks it, the README's Windows install section lists the options.\n");#elseprintf("The update runs from install.sh, not from this process. Run\n\n");if (have_dir) {