Skip to content

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.

test(windows-bundle): pin the install.ps1 hand-off, not the bypass flag

Martin Vogelc7782e0b479d
diff --git a/tests/test_windows_bundle_contract.sh b/tests/test_windows_bundle_contract.sh
index 50382ee6d..430b5ba60 100644
--- a/tests/test_windows_bundle_contract.sh
+++ b/tests/test_windows_bundle_contract.sh
@@ -749,9 +749,20 @@ update_windows_block = (
require(
update_start >= 0
and "install.ps1" in update_windows_block
- and "powershell -ExecutionPolicy Bypass -File" in update_windows_block,
+ and "powershell -File" in update_windows_block,
"cbm_cmd_update must print the install.ps1 command on Windows",
)
+# The printed command must NOT carry an execution-policy override. That is a
+# canonical malicious-loader pattern, and emitting it as a string literal put
+# the signature inside every Windows artifact we ship — to save the user one
+# documented step. The hand-off above is the property this contract cares
+# about; the bypass flag was only ever the literal form it happened to take.
+# Unblock-File covers the common case and the README covers the rest.
+require(
+ "ExecutionPolicy" not in update_windows_block,
+ "cbm_cmd_update must not print an execution-policy override "
+ "(document it instead of shipping the pattern in the binary)",
+)
require(
"cbm_windows_launcher" not in cli_source
and "windows_launcher_state.h" not in cli_source,