Repository navigation
Commit 1b8beb2
committed
harden(cli): stop shipping a policy-bypass invocation inside the binary
`cbm update` printed the Windows update command with an execution-policy
override baked in as a string literal. That put one of the most heavily
weighted malicious-script patterns there is inside every Windows artifact we
distribute — to save the user a single documented step.
The command now prints without it. Functionality is unchanged: the user still
gets a runnable command, and the failure it was pre-empting (PowerShell refusing
a file that arrived from the internet) is answered by Unblock-File, which the
message now names. The restricted-policy case is documented in the README's
Windows install section, which is the right home for that incantation — a
shipped binary is not.
Scope note, so this is not oversold: the 2026-08-07 dry-run detections are NOT
attributable to this string. It is `#ifdef _WIN32`, and every Windows artifact
scanned clean; the three flagged artifacts were Linux and macOS. This is margin
hygiene, not a fix for that regression — see the analysis in the PR.
Verification limit worth stating: the built-artifact check for this string is
vacuous on a non-Windows host, since the literal was Windows-only to begin with.
What is verified here is the source (no occurrence outside a comment) plus lint
and the cli suite; a real artifact check needs the Windows build leg in CI.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 74f540a commit 1b8beb2
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11498 | 11498 | | |
11499 | 11499 | | |
11500 | 11500 | | |
| 11501 | + | |
| 11502 | + | |
| 11503 | + | |
| 11504 | + | |
| 11505 | + | |
| 11506 | + | |
| 11507 | + | |
| 11508 | + | |
| 11509 | + | |
11501 | 11510 | | |
11502 | 11511 | | |
11503 | 11512 | | |
11504 | | - | |
| 11513 | + | |
11505 | 11514 | | |
11506 | | - | |
| 11515 | + | |
11507 | 11516 | | |
11508 | 11517 | | |
11509 | 11518 | | |
11510 | 11519 | | |
11511 | | - | |
11512 | | - | |
| 11520 | + | |
| 11521 | + | |
| 11522 | + | |
| 11523 | + | |
11513 | 11524 | | |
11514 | 11525 | | |
11515 | 11526 | | |
| |||
0 commit comments