Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ env:
MXC_REPOSITORY: https://github.com/microsoft/mxc
# Linux lxc-exec: MXC v1.0.0.
MXC_REF: 7bf210247986cb73b1b314df60c2f1109c479c0b
# Windows wxc-exec stays on an older MXC revision with the AXIS patches in
# third_party/mxc until MXC BaseContainer can run least-privilege
# AppContainer children without DACL mutation:
# https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: 1736b48398c3fe4d1315b2311c0951cc893eb3ae
# Windows wxc-exec: MXC v1.0.1, unpatched. MXC 1.x BaseContainer has no
# least-privilege (LPAC) option: https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: fda29ac63bc306b7f97f3b86b4b63d44f7f40cf2

permissions:
contents: read
Expand Down Expand Up @@ -366,8 +364,6 @@ jobs:
$mxcDir = Join-Path $env:RUNNER_TEMP "mxc"
git clone --filter=blob:none $env:MXC_REPOSITORY $mxcDir
git -C $mxcDir checkout $env:MXC_WINDOWS_REF
Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "third_party\mxc\patches\*.patch") |
Sort-Object Name | ForEach-Object { git -C $mxcDir apply --whitespace=error $_.FullName }
Push-Location (Join-Path $mxcDir "src")
cargo build --release -p wxc --no-default-features --locked
Pop-Location
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ env:
MXC_REPOSITORY: https://github.com/microsoft/mxc
# Linux lxc-exec: MXC v1.0.0.
MXC_REF: 7bf210247986cb73b1b314df60c2f1109c479c0b
# Windows wxc-exec stays on an older MXC revision with the AXIS patches in
# third_party/mxc until MXC BaseContainer can run least-privilege
# AppContainer children without DACL mutation:
# https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: 1736b48398c3fe4d1315b2311c0951cc893eb3ae
# Windows wxc-exec: MXC v1.0.1, unpatched. MXC 1.x BaseContainer has no
# least-privilege (LPAC) option: https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: fda29ac63bc306b7f97f3b86b4b63d44f7f40cf2
SYFT_VERSION: 1.46.0
SYFT_LINUX_AMD64_SHA256: d654f678b709eb53c393d38519d5ed7d2e57205529404018614cfefa0fb2b5ca

Expand Down Expand Up @@ -205,8 +203,6 @@ jobs:
$mxcDir = Join-Path $env:RUNNER_TEMP "mxc"
git clone --filter=blob:none $env:MXC_REPOSITORY $mxcDir
git -C $mxcDir checkout $env:MXC_WINDOWS_REF
Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "third_party\mxc\patches\*.patch") |
Sort-Object Name | ForEach-Object { git -C $mxcDir apply --whitespace=error $_.FullName }
Push-Location (Join-Path $mxcDir "src")
cargo build --release -p wxc --no-default-features --locked --target ${{ matrix.target }}
Pop-Location
Expand Down Expand Up @@ -306,9 +302,7 @@ jobs:
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axisd.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "wxc-exec.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis-wfp-broker.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis-ssh-proxy.exe") -Destination "$packageDir"
Copy-Item -LiteralPath "scripts/install_windows_wfp_broker.ps1" -Destination "$packageDir"
Copy-Item -Path "policies\*.yaml" -Destination "$packageDir"
Copy-Item -LiteralPath "LICENSE" -Destination "$packageDir"
Copy-Item -LiteralPath "install.ps1" -Destination "$packageDir"
Expand Down Expand Up @@ -346,9 +340,7 @@ jobs:
--require axis.exe
--require axisd.exe
--require wxc-exec.exe
--require axis-wfp-broker.exe
--require axis-ssh-proxy.exe
--require install_windows_wfp_broker.ps1
--require REPRODUCIBILITY.json

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ env:
MXC_REPOSITORY: https://github.com/microsoft/mxc
# Linux lxc-exec: MXC v1.0.0.
MXC_REF: 7bf210247986cb73b1b314df60c2f1109c479c0b
# Windows wxc-exec stays on an older MXC revision with the AXIS patches in
# third_party/mxc until MXC BaseContainer can run least-privilege
# AppContainer children without DACL mutation:
# https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: 1736b48398c3fe4d1315b2311c0951cc893eb3ae
# Windows wxc-exec: MXC v1.0.1, unpatched. MXC 1.x BaseContainer has no
# least-privilege (LPAC) option: https://github.com/microsoft/mxc/issues/1496
MXC_WINDOWS_REF: fda29ac63bc306b7f97f3b86b4b63d44f7f40cf2
SYFT_VERSION: 1.46.0
SYFT_LINUX_AMD64_SHA256: d654f678b709eb53c393d38519d5ed7d2e57205529404018614cfefa0fb2b5ca

Expand Down Expand Up @@ -200,8 +198,6 @@ jobs:
$mxcDir = Join-Path $env:RUNNER_TEMP "mxc"
git clone --filter=blob:none $env:MXC_REPOSITORY $mxcDir
git -C $mxcDir checkout $env:MXC_WINDOWS_REF
Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "third_party\mxc\patches\*.patch") |
Sort-Object Name | ForEach-Object { git -C $mxcDir apply --whitespace=error $_.FullName }
Push-Location (Join-Path $mxcDir "src")
cargo build --release -p wxc --no-default-features --locked --target ${{ matrix.target }}
Pop-Location
Expand Down Expand Up @@ -298,9 +294,7 @@ jobs:
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axisd.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "wxc-exec.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis-wfp-broker.exe") -Destination "$packageDir"
Copy-Item -LiteralPath (Join-Path "$targetDir" "axis-ssh-proxy.exe") -Destination "$packageDir"
Copy-Item -LiteralPath "scripts/install_windows_wfp_broker.ps1" -Destination "$packageDir"
Copy-Item -Path "policies\*.yaml" -Destination "$packageDir"
Copy-Item -LiteralPath "README.md" -Destination "$packageDir"
Copy-Item -LiteralPath "LICENSE" -Destination "$packageDir"
Expand Down Expand Up @@ -339,9 +333,7 @@ jobs:
--require axis.exe
--require axisd.exe
--require wxc-exec.exe
--require axis-wfp-broker.exe
--require axis-ssh-proxy.exe
--require install_windows_wfp_broker.ps1
--require REPRODUCIBILITY.json

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Test Result, and treat a red push or weekly run on `main` like any other
broken `main` build.

Some tests need privileges, hardware, or kernels that hosted runners do not have
(privileged Linux tiers, Windows BaseContainer and the WFP broker, newer
(privileged Linux tiers, Windows BaseContainer and its strict proxy, newer
Landlock ABIs, GPU, vxn). They skip on such hosts, and **a skipped test is not a
passing test**. PRs in these areas include a run on a capable host in the Test
Result ([Security Test Tiers](docs/security-test-tiers.md)).
Expand Down
81 changes: 58 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platform backend is available:
|---|---|---|---|
| Process | MXC Bubblewrap process backend with AXIS seccomp; native Landlock/seccomp retained | Experimental: MXC ProcessContainer (BaseContainer) with AXIS-owned lifecycle cleanup | Seatbelt (sandbox-exec) |
| Filesystem | MXC Bubblewrap mounts or native Landlock LSM | MXC ProcessContainer path allowlists | Seatbelt profile (subpath rules) |
| Network | block mode, MXC cooperative proxy, or strict native netns proxy | MXC allow/block plus BaseContainer strict proxy through the installed AXIS WFP broker | Seatbelt network deny + proxy |
| Network | block mode, MXC cooperative proxy, or strict native netns proxy | MXC allow/block plus BaseContainer strict proxy through MXC's loopback proxy mapping | Seatbelt network deny + proxy |
| GPU | Optional HIP Remote artifacts | Optional HIP Remote artifacts | Optional HIP Remote artifacts |
| Inference | Local LLM via llama.cpp or vLLM | Same | Same |

Expand Down Expand Up @@ -50,6 +50,10 @@ invoked as `pwsh`.
irm 'https://raw.githubusercontent.com/ROCm/axis/main/install.ps1' | iex
```

On Windows too, run `gh auth login` (or set `GH_TOKEN`) before the installer.
On networks that intercept TLS, `gh` can fail with certificate errors and the
installer then stops; check that `gh auth status` works first.

**Windows support is experimental.** The Windows sandbox uses MXC
BaseContainer, which needs Windows 11 x64 at or above one of these builds
(see MXC's [OS version support](https://github.com/microsoft/mxc/blob/main/docs/backends/process-container/os-version-support.md)):
Expand All @@ -65,8 +69,9 @@ Run `winver` to check your build. Windows 10, Windows Server and earlier
Windows 11 builds are not supported: on them every sandboxed launch fails
instead of running with weaker isolation. A supported build is necessary but
not sufficient. Hosted CI runners lack BaseContainer, so the Windows sandbox is
not exercised in CI, and known MXC issues still prevent some common tools, such
as git, Node.js and Git Bash, from starting inside it.
not exercised in CI. Some common tools start only with an opt-in policy field:
PowerShell and Git for Windows need `process.windows_win32k`, and Node.js needs
`filesystem.windows_enumerate_ancestors` (see [Windows](#windows-mxc-processcontainer-experimental)).

```bash
# Nightly builds
Expand All @@ -93,12 +98,11 @@ narrower privileged path.
Windows release archives include the pinned MXC `wxc-exec.exe` beside
`axis.exe`. Windows `runtime.provider: auto` and `mxc` use ProcessContainer;
the incomplete legacy `axis_native` host-spawn path is disabled and never used
as a fallback. Proxy-mode policies also need the AXIS WFP broker service, which
the installer does not register. Install it once from an elevated PowerShell
session in a source checkout with `scripts\install_windows_wfp_broker.ps1` (see
[Setup And Install](docs/setup-and-install.md)); the copy of that script in the
release archive expects a source tree and cannot yet install the bundled
`axis-wfp-broker.exe`.
as a fallback. Proxy-mode policies need no extra service: the packaged executor
Comment thread
ltsabadz marked this conversation as resolved.
Resolved
routes the sandbox to the AXIS proxy through MXC's loopback proxy mapping (see
[Setup And Install](docs/setup-and-install.md)). Blocked bypass attempts are not
recorded on Windows, so every proxy-mode launch prints a warning; set
`network.bypass_audit: hard_requirement` to refuse such launches instead.

The Linux default MXC process backend also needs the host `bubblewrap` runtime
and unprivileged user namespaces enabled. Allow-mode policies also need
Expand Down Expand Up @@ -140,6 +144,11 @@ cross-platform dependency and package boundary, see
axis run -- python3 -c "print('Hello from AXIS sandbox')"
```

```powershell
# Windows: python3 is often only the Microsoft Store placeholder there
axis run -- cmd.exe /c echo Hello from AXIS sandbox
```

That's it. The default `minimal` policy is intentionally quickstart-friendly on
Linux: MXC Bubblewrap process isolation, AXIS seccomp syscall filtering,
block-mode network denial, and no requested cgroup/resource limits. It does not
Expand All @@ -158,6 +167,9 @@ axis list
axis destroy <sandbox-id>
```

The daemon commands (`axisd`, `axis create`, `list`, `exec`, `destroy`) do not
work on Windows yet: axisd there cannot create sandboxes. Use `axis run`.

On Linux, policies that request CPU, memory, or process limits require writable
cgroups v2 or a documented fallback. `network.mode: proxy` uses an AXIS-owned
strict proxy boundary and needs native `CAP_NET_ADMIN` support or the optional
Expand Down Expand Up @@ -229,29 +241,52 @@ Windows process policies default to the packaged MXC `wxc-exec.exe` backend.
AXIS translates the shared policy into MXC JSON, clears the executor environment,
rejects secrets and unsupported surfaces before launch, and places the executor
in a kill-on-close Job Object for timeout and teardown cleanup. AXIS requires
MXC BaseContainer by default, enables its least-privilege token mode, and fails
closed rather than silently selecting another ProcessContainer tier.
MXC BaseContainer and fails closed rather than silently selecting another
ProcessContainer tier.

The supported slice now includes filesystem read-only/read-write allowlists,
BaseContainer-default-deny normalization for non-overlapping deny rules, a
physical managed Windows profile, child-tree process/aggregate-memory/CPU limits,
default allow/block networking, and BaseContainer strict proxy routing through
the installed AXIS WFP broker. The broker installs an exact proxy permit plus
IPv4/IPv6 default-deny filters against the SID read from the suspended child;
direct TCP, UDP, DNS, and QUIC bypasses remain blocked. Nested deny rules and
GPU/AMD policies still reject instead of weakening the policy. Scoped SSH is
supported through BaseContainer strict proxy mode when every projected key has
the same literal host set and that set exactly matches port-22 network rules.
MXC's `runtimeConfig.networkProxy` mapping, which limits egress to the AXIS
loopback proxy; direct TCP, UDP, DNS, and QUIC bypasses remain blocked. Nested
deny rules and GPU/AMD policies still reject instead of weakening the policy.

The pinned MXC 1.x BaseContainer has no least-privilege (LPAC) token mode. The
child cannot read the user's files outside its grants, but it keeps the
caller's user SID inside the container, so system locations and the user's
registry hive stay readable, and `process.identity: isolated` is rejected. In
strict proxy mode MXC also requires inbound connections to be allowed, so
whether private-network peers can reach a listener in the sandbox depends on
the host firewall. [Windows MXC 1.x Backend](docs/windows-mxc-1.md) records the
trade-offs and the evidence.
Comment thread
ltsabadz marked this conversation as resolved.
Resolved

Two opt-in policy fields widen access for tools that need it. Both are off by
default and printed at launch when on:

- `process.windows_win32k: true` lets the sandbox make Win32k (USER32/GDI)
calls, which PowerShell and Git for Windows need to start.
- `filesystem.windows_enumerate_ancestors: true` lets the sandbox list the
folders above its grants, which Node.js needs to resolve paths. It exposes
the names, sizes and times of files below those folders, not their contents.

Scoped SSH is supported through BaseContainer strict proxy mode when every
projected key has the same literal host set and that set exactly matches
port-22 network rules.
Managed inference, streaming, host-side provider credential injection, and
conservative token-budget reservation are supported through BaseContainer strict
proxy mode; token-budget exhaustion currently supports the exact `reject` action
only.

Interactive ConPTY is unsupported through BaseContainer on Windows build 26300
because its creation API rejects pseudoconsole startup handles with
`ERROR_INVALID_HANDLE`. AXIS does not force the older AppContainer/DACL tier to
obtain terminal support. AppContainer/DACL fallback remains disabled in the MXC
configuration, so an unavailable BaseContainer is a launch failure.
Run from a terminal, the sandboxed command reads and writes that terminal
directly. BaseContainer cannot give it a pseudoconsole (its creation API rejects
pseudoconsole startup handles with `ERROR_INVALID_HANDLE`), so full-screen
programs that need one may not render correctly, and AXIS does not force the
older AppContainer/DACL tier to obtain one. The sandbox cannot write to the
terminal's input buffer. A `.cmd` or `.bat` file launched directly fails inside
BaseContainer with "Access is denied"; run it as `cmd.exe /c script.cmd`.
AppContainer/DACL fallback remains disabled in the MXC configuration, so an
unavailable BaseContainer is a launch failure.
The pinned MXC project is an early preview and does not claim its profiles are
security boundaries; AXIS therefore treats unsupported or unavailable behavior
as a launch failure, not as permission to execute on the host.
Expand Down Expand Up @@ -349,7 +384,7 @@ axis/
├── gui/ # Desktop apps (shared web UI plus Linux, macOS and Windows shells)
├── benches/ # Performance benchmarks
├── e2e/ # End-to-end tests
└── third_party/mxc/ # Patches applied to the pinned MXC revision
└── third_party/mxc/ # Notes on the pinned MXC revisions (no patches)
```

## Performance
Expand Down
24 changes: 24 additions & 0 deletions crates/axis-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,29 @@ async fn main() -> Result<()> {
policy.network.mode,
policy.network.policies.len(),
);
if matches!(policy.network.mode, axis_core::policy::NetworkMode::Proxy) {
println!(
" Bypass audit: {}",
match policy.network.bypass_audit {
axis_core::policy::Compatibility::BestEffort => {
"best_effort (Windows ProcessContainer blocks bypass attempts but does not record them)"
}
axis_core::policy::Compatibility::HardRequirement => {
"hard_requirement (refuse backends that cannot record bypass attempts)"
}
},
);
}
if policy.process.windows_win32k {
println!(
" Windows: process.windows_win32k on (the sandbox can make Win32k system calls)"
);
}
if policy.filesystem.windows_enumerate_ancestors {
println!(
" Windows: filesystem.windows_enumerate_ancestors on (file names, sizes and times below grant ancestors are visible)"
);
}
println!(" Inference: {} routes", policy.inference.routes.len());
if policy.gpu.enabled {
println!(
Expand Down Expand Up @@ -1501,6 +1524,7 @@ mod tests {
filesystem: FilesystemPolicy::default(),
process: ProcessPolicy::default(),
network: NetworkPolicy {
bypass_audit: Default::default(),
mode: network_mode,
policies: Vec::new(),
},
Expand Down
Loading
Loading