三只貓
Rich Mindset Zone
richmindsetzone.com
← All posts

Agent 安全的最後一哩路:Vigils 控制平面補齊企業 Deployment 拼圖

我哋好放心將 production API key、生產數據庫 read 權限、甚至 cloud console 嘅 admin 權限交俾 Agent 代管,但佢哋嘅安全部署,幾乎仲停留喺 2015 年 Chrome extension 嘅水平。Agent 會寫 file、call API、執行 shell command,而呢啲能力嘅 security wrapper,直到今日仍然係一片空白。呢個 gap 唔係理論問題——係當你準備將 Agent 放入團隊 workflow 或者 CI/CD pipeline 嗰陣,會直接撞牆嘅現實障礙。

Containment 唔等於 Deployment

Anthropic 喺 AI containment 方面嘅研究好有價值——佢哋探討咗監控、reporting、同埋必要時隔離 Agent 嘅機制。但 containment 嘅設計目標係「就算模型變成 rogue,系統仍然安全」,呢個係一個極端 threat model。一般開發團隊面對嘅問題更加日常、更加落地:開發者唔小心將 GitHub token paste 咗入 Claude Code prompt、Agent 讀咗一份唔應該讀嘅內部文件、或者 MCP server 嘅 output 入面包含咗 customer PII。

理論 containment 假設你已經有能力控制 Agent 嘅執行環境,但現實中 Agent 分散喺開發者嘅 local machine、CI runner、同 cloud VM 上面運行,根本冇一個統一嘅 policy layer 去管。呢個 gap 正正係 Vigils 呢類工具要填補嘅空間——唔係取代 containment research,而係補齊佢未覆蓋嘅「日常安全操作」領域。企業 Deployment 需要嘅唔係一個喺實驗室入面證明可行嘅 containment 框架,而係一個可以今日就裝落 developer laptop、聽日就整合入 MCP pipeline 嘅控制平面。

審計賬本係被忽略嘅關鍵 infrastructure

當你同團隊討論 Agent 安全,多數人第一時間諗到嘅係「唔俾佢做X」——即係 policy enforcement。但其實更 fundamental 嘅問題係:你知道你個 Agent 做過啲乜嗎?

Vigils 最聰明嘅設計決策之一,係用 SHA-256 hash chain 嚟做 audit ledger。唔係簡單嘅 logging,而係 tamper-evident ledger——每條 event record 都包含前一條嘅 hash,篡改任何一條都會斷鏈。呢個設計對於企業 compliance 嚟講係 game changer。試諗下:你個 Agent 喺 production database 行咗個 mutation query,事後發現數據異常。冇 audit trail 嘅話,你根本唔知係 Agent 落嘅 command 定係人手操作。有 hash chain audit,你可以 replay 成個 session、證明邊條 event 係 tamper 過、邊個 Agent 做咗邊件事。

呢種級別嘅 forensic capability,之前只存在於金融系統同 infra 層面嘅 audit logging。Agent 層面一直係真空。Vigils 將呢個 capability 帶到 agent runtime,而唔係要你另外駁一個 external SIEM 系統——因為 agent event 嘅 volume 同性質根本唔適合丟去傳統 logging pipeline。Local-first 嘅設計令 audit 做到 zero-config,開箱即用。

默認拒絕係唯一合理嘅預設值

Firewall 嘅「默認拒絕,明確允許」原則喺網絡安全入面已經係常識,同一個原則嚟到 Agent 安全點解會咁難執行?原因係 MCP protocol 本身冇 built-in policy layer——你開咗一個 MCP server,預設情況下所有 tool 都係 callable 嘅。Agent 可以任意 call filesystem read/write、任意 call API、任意執行 shell。呢個設計方便 prototyping,但絕對唔適合 production。

Vigils 嘅 firewall layer 用 Rust policy DSL 寫 rule,per-agent 政策可以細緻到邊個 tool 需要 approval、邊啲 OAuth scope 係 allow-list 入面。呢個唔係新奇概念,但喺 agent runtime 層面執行就係第一次。更重要嘅係佢嘅 fail-closed 設計——當 guarantee 無法被 enforce(例如 Landlock 唔支援、ML redaction engine unavailable),Vigils 會拒絕執行,而唔係 silent degrade。呢個「安全優先,功能第二」嘅取態,對於任何考慮將 Agent 放入 production workflow 嘅團隊嚟講,係最基本嘅 prerequisite。

另一個值得留意嘅功能係 secret lease broker。傳統做法係將 credential 放入 environment variable,子 process 全部 inherit。Vigils 嘅做法係 short-lived lease,只 inject 入需要佢嘅 child process,用完自動 revoke(RAII 模式)。呢個設計大幅降低咗 credential 橫向洩漏嘅風險,特別係當 Agent chain 會 spawn 多層 subprocess 嗰陣。

MCP Gateway 係走入企業嘅關鍵

Vigils 嘅 MCP gateway 可能係成個 project 最 underrated 嘅 component。佢唔係單純做 proxy——佢做 descriptor pinning + drift detection,即係 detect MCP server 嘅 tool definition 有冇被篡改過。喺 supply chain attack 越來越常見嘅今日,呢個 detection 機制對企業 adoption 非常重要。你用緊一個第三方 MCP server,佢突然多咗個可疑嘅 tool,Vigils 會 detect 到 drift 同 alert。

Gateway 層同時處理咗另一個實際問題:stdio MCP server 嘅 PATH resolution。npx / node / python 呢啲 bare command 喺唔同環境下嘅行為可以好唔同,Vigils 將呢啲 upstream 統一 resolve 同 sandbox 化,確保開發者 local 同 CI 嘅行為一致。呢個 consistency 對團隊協作嚟講係一個好大嘅 DX improvement。

如果你係香港科技團隊嘅 tech lead,我建議你咁樣思考 Agent 安全:唔好當佢係「遲啲先處理」嘅技術債。Agent adoption 嘅瓶頸唔係模型能力,而係安全 infrastructure。今日裝 Vigils 行一次 vigil-hub demo,體驗一下 default-deny firewall 同 tamper-evident audit 係乜嘢感覺,然後諗一諗:你嘅 Agent deployment 準備好迎接 production 未?