Skip to content

Commit 2465164

Browse files
feat(sandbox): prototype Windows process confinement
1 parent 588335e commit 2465164

12 files changed

Lines changed: 1575 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@kilocode/cli": minor
3+
---
4+
5+
Confine commands launched by the experimental Windows sandbox to approved project and temporary directories.

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ jobs:
6363
- name: Setup Bun
6464
uses: ./.github/actions/setup-bun
6565

66+
- name: Build Windows sandbox helper
67+
if: runner.os == 'Windows'
68+
run: cargo build --locked --release --manifest-path packages/kilo-sandbox/native/windows/Cargo.toml
69+
70+
- name: Run Windows sandbox integration tests
71+
if: runner.os == 'Windows'
72+
working-directory: packages/kilo-sandbox
73+
run: bun test test/windows.integration.test.ts --timeout 30000
74+
env:
75+
KILO_WINDOWS_SANDBOX_HELPER: ${{ github.workspace }}/packages/kilo-sandbox/native/windows/target/release/kilo-sandbox-win.exe
76+
6677
- name: Configure git identity
6778
run: |
6879
git config --global user.email "kilo-maintainer[bot]@users.noreply.github.com"

packages/kilo-sandbox/native/windows/Cargo.lock

Lines changed: 279 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "kilo-sandbox-win"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "MIT"
6+
publish = false
7+
8+
[[bin]]
9+
name = "kilo-sandbox-win"
10+
path = "src/main.rs"
11+
12+
[dependencies]
13+
anyhow = "1.0"
14+
base64 = "0.22"
15+
serde = { version = "1.0", features = ["derive"] }
16+
serde_json = "1.0"
17+
sha2 = "0.10"
18+
19+
[target.'cfg(windows)'.dependencies]
20+
windows-sys = { version = "0.52", features = [
21+
"Win32_Foundation",
22+
"Win32_Security",
23+
"Win32_Security_Authorization",
24+
"Win32_Storage_FileSystem",
25+
"Win32_System_Console",
26+
"Win32_System_JobObjects",
27+
"Win32_System_LibraryLoader",
28+
"Win32_System_Threading",
29+
] }
30+
31+
[profile.release]
32+
lto = "thin"
33+
panic = "abort"
34+
strip = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "1.92.0"
3+
profile = "minimal"

0 commit comments

Comments
 (0)