<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Junxiang Pan</title>
    <description>The latest articles on DEV Community by Junxiang Pan (@_9439daaf10225d6b438d6).</description>
    <link>https://dev.to/_9439daaf10225d6b438d6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4220794%2F6b032e42-16fd-426b-8ee2-36fc0a6a095f.png</url>
      <title>DEV Community: Junxiang Pan</title>
      <link>https://dev.to/_9439daaf10225d6b438d6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_9439daaf10225d6b438d6"/>
    <language>en</language>
    <item>
      <title>Building a Windows-native ACL sandbox for self-hosted LLM agents (and what still fails)</title>
      <dc:creator>Junxiang Pan</dc:creator>
      <pubDate>Sun, 01 Nov 2026 15:20:30 +0000</pubDate>
      <link>https://dev.to/_9439daaf10225d6b438d6/building-a-windows-native-acl-sandbox-for-self-hosted-llm-agents-and-what-still-fails-58l6</link>
      <guid>https://dev.to/_9439daaf10225d6b438d6/building-a-windows-native-acl-sandbox-for-self-hosted-llm-agents-and-what-still-fails-58l6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Disclosure: I used AI to help polish the English in this post. The architecture, code, and testing are my own.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I stopped trying to “detect” bad AI behavior
&lt;/h2&gt;

&lt;p&gt;I run a self-hosted LLM agent on Windows (AstrBot + a QQ adapter). Like many people in this space, I started by trying to block dangerous commands at the application layer — regex patterns for &lt;code&gt;rm&lt;/code&gt;, &lt;code&gt;del&lt;/code&gt;, shell keywords, etc.&lt;/p&gt;

&lt;p&gt;It didn’t work. A plugin can execute arbitrary code. A prompt injection can rephrase a delete command in a dozen ways. A community member pointed out the obvious: you can’t statically predict what a Turing-complete program will do. Static scanning is not a sandbox.&lt;/p&gt;

&lt;p&gt;So I changed the question. Instead of asking “is this action dangerous?”, I asked: &lt;strong&gt;“what is this process physically allowed to touch?”&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What CBS actually does
&lt;/h2&gt;

&lt;p&gt;Cyber-Butler-Security (CBS) is a Windows-first, OS-level security layer. It does &lt;strong&gt;not&lt;/strong&gt; try to understand the agent’s intent. It restricts the agent’s &lt;strong&gt;physical permissions&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dual-account isolation:&lt;/strong&gt; AstrBot runs under a dedicated low-privilege Windows service account. Your desktop files are simply not visible to it via ACLs. It cannot read what it cannot see.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TOTP Broker for high-risk actions:&lt;/strong&gt; Deletion or overwrite in a shared workspace is intercepted by a SYSTEM-level Broker. It requires a TOTP code from your phone before proceeding. This is &lt;strong&gt;not&lt;/strong&gt; an AI judging the AI — it’s deterministic code enforcing a rule.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail-closed:&lt;/strong&gt; If the security layer fails, it denies. The worst-case bug is a tool error, not a deleted C: drive.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;No extra LLM tokens are consumed.&lt;/strong&gt; The security decisions are made by OS-level code, not by the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What still fails (honest gaps)
&lt;/h2&gt;

&lt;p&gt;I’m not going to pretend this is a complete security product. It’s early Beta.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;High&lt;/strong&gt; security tier is still undergoing end-to-end verification on clean Windows VMs. Medium works; High has known service-startup issues I’m actively debugging.&lt;/li&gt;
&lt;li&gt;There is &lt;strong&gt;no runtime sandbox&lt;/strong&gt; (no Job Objects / process behavior monitoring yet). Static ACLs limit &lt;em&gt;what&lt;/em&gt; the process can touch, but not &lt;em&gt;what it does&lt;/em&gt; at runtime.&lt;/li&gt;
&lt;li&gt;Python/Shell execution can bypass TOTP if those tools are enabled in the agent. The README documents this explicitly.&lt;/li&gt;
&lt;li&gt;Plugin permission contracts don’t exist yet. “Installed” ≠ “runs correctly under ACL restrictions.”&lt;/li&gt;
&lt;li&gt;Zero third-party audit. I’m an independent developer, and this is a side project.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why not just use Docker?
&lt;/h2&gt;

&lt;p&gt;Docker/WSL2 is the gold standard for isolation. But a large portion of the “养鱼” community runs on Windows bare metal — gaming PCs, laptops without virtualization enabled, users who won’t set up containers just to run an agent.&lt;/p&gt;

&lt;p&gt;CBS is a pragmatic fallback for that group. It’s not a replacement for containers. It’s a lower-effort “safety net” for people who won’t (or can’t) containerize.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’m looking for
&lt;/h2&gt;

&lt;p&gt;If you’ve run self-hosted agents on Windows, I’d like to hear:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the TOTP approval flow practical for daily use, or too heavy?&lt;/li&gt;
&lt;li&gt;Are there Windows-native isolation primitives (Job Objects, AppContainer, Restricted Tokens) I should be using instead of ACLs alone?&lt;/li&gt;
&lt;li&gt;For plugin ecosystems: is a permission-declaration metadata field worth the effort, or is runtime fail-closed enough?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Repo (AGPL-3.0, not monetized, early Beta):&lt;/strong&gt; &lt;code&gt;https://github.com/JunxiangPan/Cyber-Butler-Security&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;README has the “not production-ready / High tier unverified” banners at the top. Feedback is welcome, including “this won’t work because X.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE (Current Status):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After great feedback from the r/AI_Agents community, the architecture is now working end-to-end.&lt;/p&gt;

&lt;p&gt;Scoped Tokens: Users can approve a 30-minute directory-bound session. This solves the "TOTP spam" issue for batch operations. The agent works freely inside the scoped folder but is blocked the moment it tries to step outside.&lt;/p&gt;

&lt;p&gt;Job Object Enforcement: The Broker now uses JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE. If the security layer crashes, all orphaned child processes are terminated by the Windows kernel.&lt;/p&gt;

&lt;p&gt;A Vindication: DeepSeek's new "Super-agent" explicitly recommends "running under a separate OS account for isolation." This confirms the core premise of CBS. Autonomous agents need physical OS boundaries, not just application-layer prompts. CBS provides the automated installer, ACLs, and TOTP fallback for this exact use case.&lt;/p&gt;

&lt;p&gt;Still in Beta, but the "Fail-Closed" loop is fully functional now.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>showdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
