Skip to content

Rust SDK fails to fall back to AppContainer + DACL #643

Closed

Description

@Hyphrio

Relevant area(s)

Windows

Brief description of your issue

When using the MXC Rust SDK, and Tier 1 or 2 are not available, Tier 3 (AppContainer + DACL) does not activate. Instead, it will just return an error that says bfscfg.exe is not available on this Windows build ....

This falls back as expected when invoking wxc-exec rather than using the Rust SDK.
Running on Windows 11 25H2.

Steps to reproduce

Example Code:

use std::io::stdout;

use mxc_sdk::{
    SandboxPolicy, build_request,
    policy::{FilesystemSection, NetworkSection, UiSection},
};

fn main() -> Result<(), mxc_sdk::Error> {
    // Set this to actual java path
    let java_path = "".to_owned();
    
    let policy = SandboxPolicy {
        version: "0.7.0-alpha".to_owned(),
        filesystem: Some(FilesystemSection {
            readwrite_paths: vec![],
            readonly_paths: vec![java_path],
            denied_paths: vec![],
            clear_policy_on_exit: Some(true),
        }),
        network: Some(NetworkSection {
            allow_outbound: true,
            allow_local_network: true,
            ..Default::default()
        }),
        ui: Some(UiSection {
            allow_windows: true,
            clipboard: mxc_sdk::policy::ClipboardPolicy::All,
            allow_input_injection: true,
        }),
        timeout_ms: None,
    };

    let mut request = build_request(&policy, None)?;
    request.set_script("java.exe --version");
    
    let mut sandbox = mxc_sdk::spawn_sandbox(request)?;
    let mut child_stdout = sandbox.take_stdout().unwrap();

    let mut parent_stdout = stdout();
    std::io::copy(&mut child_stdout, &mut parent_stdout).unwrap();

    Ok(())
}

Expected behavior

In this example, Java version would output as expected. Same thing would happen to any other program. SDK gracefully falls back to Tier 3.

Actual behavior

Returns an error that bfscfg.exe could not be located.
Error { code: BackendError, message: "Filesystem policy error: bfscfg.exe is not available on this Windows build, so the AppContainer + BFS filesystem tier cannot enforce your policy. Use an OS build that includes bfscfg.exe, or run on a host that supports the BaseContainer backend (which does not require bfscfg.exe)." }

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Jul 14, 2026
  2. added
    OS-Windows
    on Jul 14, 2026
  3. added a commit that references this issue on Jul 14, 2026
    47a172c
  4. removed
    Needs-Triage
    on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugOS-Windows

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions