DEV Community

JH5
JH5

Posted on • Originally published at Medium

安全的龍蝦來了嗎? NVIDIA NemoClaw 實測

安全的龍蝦來了嗎? NVIDIA NemoClaw 實測

NemoClaw ref

前兩天 NVIDIA 發布了 NemoClaw — — 將 OpenClaw(AI Agent 執行環境)與 OpenShell(安全沙箱)整合的開源框架,終於有整合成熟的的Sandbox 可以玩了。

藉由玩NemoClaw ,再來確認一下其三層安全機制的機制,雖然大家目前對於 AI Sandbox好像還沒有定論? 不過 NemoClaw目前針對 Filesystem, syscall, network 這三個Layer已經做的相當的完整,接下來就手癢來踹踹NemoClaw 跟裸奔的OpenClaw。

NemoClaw 的安全保障是由三個獨立層次組成 ,大致上看圖就非常好理解,再加上最後還有一層inference route可以控制。 https://docs.nvidia.com/nemoclaw/latest/about/how-it-works.html

How NemoClaw Works

┌─────────────────────────────────────────────────┐  
│             OpenClaw Agent Process               │  
│  (openclaw agent --agent main --local ...)       │  
├─────────────────────────────────────────────────┤  
│         OpenShell Application-Level Policies     │  
│  network_policies:                               │  
│    nvidia: api.ngc.nvidia.com, build.nvidia.com  │  
│    github: api.github.com, raw.githubusercontent  │  
│    claude_code: api.anthropic.com                │  
│    (all other hosts: DENY)                       │  
├─────────────────────────────────────────────────┤  
│         Linux Kernel Security (Sandbox Pod)      │  
│  ┌──────────────┬───────────────────────────┐   │  
│  │   Landlock   │  Filesystem Enforcement    │   │  
│  │              │  /usr, /lib → read-only    │   │  
│  │              │  /sandbox, /tmp → rw       │   │  
│  │              │  /etc/passwd → read-only   │   │  
│  ├──────────────┼───────────────────────────┤   │  
│  │    seccomp   │  Syscall Filtering         │   │  
│  │              │  Deny: ptrace, mount,      │   │  
│  │              │  kexec_load, etc.          │   │  
│  ├──────────────┼───────────────────────────┤   │  
│  │     netns    │  Network Namespace         │   │  
│  │              │  Isolated network stack    │   │  
│  │              │  Private interfaces / IPs  │   │  
│  └──────────────┴───────────────────────────┘   │  
├─────────────────────────────────────────────────┤  
│         k3s in Docker (Gateway / Control Plane)  │  
│  OpenShell pod + Helm / inference route          │  
└─────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

1. Landlock:不需 root 的檔案系統存取控制

Landlock 是 Linux 5.13+ 加入的 LSM(Linux Security Module),允許無特權程序限制自身的檔案系統存取。

NemoClaw 的 Filesystem Policy:

filesystem_policy:  
  include_workdir: true  
  read_only:  
    - /usr  
    - /lib  
    - /proc  
    - /dev/urandom  
    - /app  
    - /etc  
    - /var/log  
  read_write:  
    - /sandbox  
    - /tmp  
    - /dev/null  
landlock:  
  compatibility: best_effort
Enter fullscreen mode Exit fullscreen mode

預設Agent 能讀取系統函式庫,但不能修改 /etc/passwd/usr/bin/ 等系統路徑,且工作目錄 /sandbox 可讀寫,符合大多數應用的開發需求。

2. seccomp:系統呼叫過濾

沙箱內的所有 Linux syscall 均受 seccomp BPF 過濾,正常狀況下不該被呼教的(ptracemountkexec_load)全部都預設被阻擋,以防止容器逸出或危險的核心漏洞利用。

3. 網路命名空間 + Application-Level Policies

每個 OpenShell 沙箱擁有獨立的網路命名空間(netns),所有外部流量必須通過 OpenShell gateway 的應用層政策引擎。

預設政策清單:

nvidiaapi.ngc.nvidia.com, build.nvidia.comgithubapi.github.com, raw.githubusercontent.comopenclaw_api

OpenClaw 平台 APIclaude_codeapi.anthropic.comnpm_registryregistry.npmjs.org

telegramTelegram Bot API ,官方遇到可以接到小飛機 (https://docs.nvidia.com/nemoclaw/latest/deployment/set-up-telegram-bridge.html)

只要是未列入清單的主機一律 DENY,這對 Production 環境中防止資料外洩滿重要的。

安裝的部分 官方的文件滿清楚的,要注意的就是 cgroup v2 跟 OpenShell 需要 sudo,可以參考 https://docs.nvidia.com/nemoclaw/latest/get-started/quickstart.html#install-nemoclaw-and-onboard-openclaw-agent

首次 Agent 呼叫實測 SSH ProxyCommand

NemoClaw 沙箱透過 openshell ssh-proxy 提供 SSH 存取,無需直接開放 TCP 埠:

# 取得 SSH 設定  
openshell sandbox ssh-config my-assistant
Enter fullscreen mode Exit fullscreen mode
Host openshell-my-assistant  
    User sandbox  
    StrictHostKeyChecking no  
    UserKnownHostsFile /dev/null  
    ProxyCommand /home/jh5/.local/bin/openshell \  
      ssh-proxy --gateway-name nemoclaw --name my-assistant
Enter fullscreen mode Exit fullscreen mode
ssh -F <(openshell sandbox ssh-config my-assistant) \  
  openshell-my-assistant \  
  "openclaw agent --agent main --local \  
   -m 'hello, what are you?' --session-id test1"
Enter fullscreen mode Exit fullscreen mode

首次呼叫,cold start:

[plugins]   ┌─────────────────────────────────────────────────────┐  
[plugins]   │  NemoClaw registered                                │  
[plugins]   │  Endpoint:  build.nvidia.com                        │  
[plugins]   │  Model:     nvidia/nemotron-3-super-120b-a12b       │  
[plugins]   └─────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode
Hey! I just came online and I'm excited to get to know you.  
I'm here to figure out who we both are together.
Enter fullscreen mode Exit fullscreen mode
Let's start simple: What should I call you? And what would you  
like to call me? I'm open to suggestions...
Enter fullscreen mode Exit fullscreen mode

看起來 NemoClaw plugin 正確載入,路由至 NVIDIA NIM cloud(Nemotron-3-Super 120B)。

實測起來除了 Code start需要花一點時間,後面的 Warm Start 速度都滿快的 (~3,000–4000 ms)

接下來記錄一些試玩的case

用例 1:隔離 Agent

# nemoclaw_ngs_policy.yml  
network_policies:  
  clinvar_api:
Enter fullscreen mode Exit fullscreen mode

Agent 只能存取 ClinVar、gnomAD、和院內 HIS Portal ,無法存取任何其他外部服務,符合 HIPAA/GDPR 要求。

用例 2:VCF 變異分析處理沙箱

# 在 NemoClaw 沙箱内執行 VCF 分析 (病患資料不離開沙箱)  
ssh -F <(openshell sandbox ssh-config clinical-agent) \  
  openshell-clinical-agent \  
  "openclaw agent --agent main --local \  
   --upload patient_variants.vcf \  
   -m '分析此 VCF 的 tier 1 變體,輸出 JSON 格式報告' \  
   --session-id case_$(date +%Y%m%d)"
Enter fullscreen mode Exit fullscreen mode

檔案上傳至 /sandbox/ 目錄(Landlock 保護),模型只能透過 openclaw_api 端點存取推理,因此 VCF 資料將會被保護無法傳送至未授權的外部服務或空間。

用例 3:多租戶 HPC 環境

NemoClaw 的每個 sandbox 都有獨立的 netns 和 Landlock 政策,適合多用戶 HPC 環境:

# 為不同 IRB 計畫建立各自的隔離沙箱  
nemoclaw onboard  # → sandbox: project-oncology  
nemoclaw onboard  # → sandbox: project-cardiology  
nemoclaw onboard  # → sandbox: project-rare-disease
Enter fullscreen mode Exit fullscreen mode
# 各沙箱有獨立政策、獨立 /sandbox 目錄、獨立網路命名空間  
openshell sandbox list  
# NAME              NAMESPACE  PHASE  
# project-oncology  openshell  Ready  
# project-cardiology openshell Ready  
# project-rare-disease openshell Ready
Enter fullscreen mode Exit fullscreen mode
nemoclaw my-assistant status:  
Name: my-assistant | Phase: Ready  
Model: nvidia/nemotron-3-super-120b-a12b  
Provider: nvidia-nim | GPU: yes  
OpenClaw: 2026.3.11 (29dc654)  
Policies: claude_code, clawhub, github, npm_registry,  
          nvidia, openclaw_api, openclaw_docs, telegram
Enter fullscreen mode Exit fullscreen mode
NemoClaw 在發布後 2 天內的這次實測,提交了一份超出預期的成績單:  

| 指標 | 成績 | 臨床意義 |  
|------|------|---------|  
| **沙箱隔離強度** | Landlock + seccomp + netns 三層加固 |  企業級可靠 |  
| **平均推理��遲** | 3.7 秒(Warm),遠優於容器化方案 |  臨床可接受 |  
| **合規性** | Allowlist 政策引擎,HIPAA/GDPR 友好 |  監管無憂 |  
| **部署難度** |  sudo、無特殊內核模組,相容企業 HPC |  快速落地 |  

**但這只是開始。**   

未來 3–6 個月,NemoClaw 將迎來關鍵的第二階段:本地推理支援、CLI 自動化、和社群集成。對於希望在 2026 年底前建立合規 AI 基因組管線的機構,**現在是參與、反饋、和形塑標準的黃金窗口期**。
Enter fullscreen mode Exit fullscreen mode

大致上把一些想得到的測試了一輪, 覺得 整體無論是Cold Start 或是Warm 的delay都還可以接受,雖然目前還只是 Alpha 版本,也還有一些 功能看起來未來還會再變動:

  1. policy-add 目前新增怪怪的

  2. NEMOCLAW_EXPERIMENTAL=1

  3. cgroup v2 需要 daemon.json

不過看起來 NemoClaw 提供了目前市場上最完整的 AI Agent 執行時間安全隔離框架, 這一篇紀錄的阿里阿雜的,下一篇再來分享有沒有NemoClaw 跟直接用龍蝦讓Agent裸奔的差異。

# ai# nvidia# security

Top comments (0)