Repository navigation
Release 0.7.1
Cordon 0.7.1
Cordon is a Crystal shard that runs shell commands inside a platform-native sandbox with a configurable access policy. It works on macOS (via sandbox-exec / Seatbelt), Linux (via bwrap / Bubblewrap) and, as a preview, Windows 11 (via Microsoft's MXC wxc-exec.exe), presenting all three as a single clean API.
Changes
- Windows: MXC 1.0.0 - Cordon now uses
@microsoft/mxc-sdk1.0.0, MXC's first stable release, and emits its1.0.0config contract. MXC 1.0.0 rejects the configs Cordon 0.7.0 produced, and Cordon 0.7.1 looks forwxc-exec.exe1.0.0 only, so the two must be upgraded together.- Action required: rerun
scripts/check-windows.ps1 -Install(add-AllUsersif you installed for all users). It installs 1.0.0 beside the old version. Add-Pruneto delete older versions once the check passes; leave it off if another app on the machine still uses Cordon 0.7.0. - Enforcement is unchanged: network access is still allowed or blocked as a whole, and inbound and host-loopback traffic stay blocked.
- Action required: rerun
check-windows.ps1 -Prune- After a successful check, deletes MXC versions older than the one this Cordon uses from the per-user folder, or with-AllUsersthe all-users folder. Newer versions and unrecognised folders are kept, and nothing is deleted unless the current version is installed there.- Tested with Crystal 1.21 - CI now builds and runs the specs with Crystal 1.21 on Windows and on some of the macOS and Linux runners.
Known issues
Policy#envandPolicy#unset_envare honoured on Linux and Windows but silently ignored by the macOS runner, which inherits the parent environment instead. See #24.- Windows: MXC 1.0.0 no longer carries the "early preview, not a security boundary" warning of earlier releases, but PSEC is new and may change between Windows updates. Cordon pins the MXC version it is tested against; re-run
cordon confirmafter Windows updates (#41). - Windows: a batch file (
.bat,.cmd) can only be run withshell: true, because its arguments cannot be quoted safely. - Windows: tested on Windows 11 Enterprise 25H2, on ARM (a VM and GitHub's Windows 11 ARM runner, with
cordon.exeunder x64 emulation) and on an x64 laptop, wherecordon.exeruns natively. Other editions such as Windows 11 Pro are not yet tested. - Windows: the process security environment arrives with recent Windows 11 25H2 updates. A laptop on build 26200.8893 lacked it and gained it on 26200.9448; if
check-windows.ps1reports it unavailable, install the latest updates and check again. - Windows: only an x64
cordon.exeis built; ARM machines run it under emulation (#39). - Windows:
cordon.exeis unsigned, and some endpoint security products flag the statically linked executable as suspicious (#40). - Windows: everything under
C:\Windowsis readable and executable in the sandbox without a grant (#38). - Windows: PowerShell 7, Git Bash, toolchains installed per user, and junctions or symlinks inside granted paths are not yet validated (#34, #35, #36).
For architecture, design decisions, and debugging workflows see DEVELOPMENT.md.