From 5458529391b7472982846bd658ca6a7b17e88fb5 Mon Sep 17 00:00:00 2001 From: Aaqibhafeez Khan Date: Fri, 20 Nov 2026 06:01:38 +0530 Subject: [PATCH 1/2] docs(plz-3d-explain): distinguish key reads from exfiltration Signed-off-by: Aaqibhafeez Khan --- .../assets/example-agent-sandbox.en.html | 18 +++++++++--------- .../assets/example-agent-sandbox.html | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/skills/plz-3d-explain/assets/example-agent-sandbox.en.html b/skills/plz-3d-explain/assets/example-agent-sandbox.en.html index 80a2f17..c5e12ca 100644 --- a/skills/plz-3d-explain/assets/example-agent-sandbox.en.html +++ b/skills/plz-3d-explain/assets/example-agent-sandbox.en.html @@ -369,7 +369,7 @@

For example

{
   "sandbox": {
     "enabled": true,
-    "filesystem": { "denyRead": ["~/.ssh"] },
+    
     "network": {
       "allowedDomains": ["pypi.org", "files.pythonhosted.org"]
     }
@@ -406,16 +406,16 @@ 

For example

10How to choose

-

Send the same escape attempt to all four approaches and the differences show at a glance. When the code tries to get out of the box and reach the host's key file, all four stop it, but the layer that stops it differs. The lower the stopping layer, and the more layers there are between the code and the host, the harder it is to break through.

+

Send the same two-step attempt to all four approaches: first read the host key file, then send the key it read to example.net. The container and microVM stop access to the host file at their boundary, assuming the key file was not passed into the guest. WASM cannot use the key file or an external network function unless the runtime explicitly provides them. The default OS sandbox shown here allows the key file to be read, but its proxy blocks the request to the unlisted example.net. To block the read in the OS sandbox too, configure denyRead. The lower the stopping layer, and the more layers there are between the code and the host, the harder it is to break through.

The tables below sum up the chapters so far. There are no confirmed comparison figures for weight and start speed, so they are written qualitatively, and that is this page's own judgment. It does not recommend any particular product. When choosing, first decide "what am I trying to protect (my laptop, or a server shared by several users)" and "what tools does the code need".

Who answers, and what has to be crossed

- + - - - - + + + +
ApproachWho answers system callsWhat to cross to reach the host
ApproachWho answers system callsWhat to cross to reach the hostKey read / external send
Container + gVisorgVisor's stand-in kernel (the host kernel if absent)The namespace wall, the stand-in kernel
MicroVMA separate guest kernel for each VMThe guest kernel, the hypervisor
WASMFunctions the runtime hands inThe WASM box, the outside runtime's permissions
OS sandboxThe host kernel (with a policy applied)The write and network policy. The kernel is shared
Container + gVisorgVisor's stand-in kernel (the host kernel if absent)The namespace wall, the stand-in kernelThe host key file cannot be read because it is not passed into the container.
MicroVMA separate guest kernel for each VMThe guest kernel, the hypervisorThe host key file cannot be read because it is not passed into the guest.
WASMFunctions the runtime hands inThe WASM box, the outside runtime's permissionsThe key file and network access are unavailable unless the runtime explicitly provides them.
OS sandboxThe host kernel (with a policy applied)The write and network policy. The kernel is sharedBy default, the key can be read, but the proxy blocks sending it to an unlisted domain. Adding denyRead also blocks the read.

Weight and available tools (judgment)

@@ -439,7 +439,7 @@

Requirements and typical examples

For example, if all you want is to have an agent run tests on my laptop, the OS sandbox takes the least effort. If you run several users' code on one server, a microVM that divides the kernel, or a container with a stand-in kernel inserted, is the better fit. For short code that only needs to compute, WASM may be enough. This paragraph is also a judgment.

-

All four approaches stop the attempt, but the layer that stops it differs. Choose by what you are protecting and what tools the code needs.

+

For the same key-exfiltration attempt, the container, microVM, and WASM restrict access to the host key; the default OS sandbox restricts the later network send. Add denyRead to block the read in the OS sandbox too.

@@ -1625,7 +1625,7 @@

Sources (checked 2026-10-28)

say('WASM: the capsule wall has no door, so it was stopped. Next, the OS sandbox.'); await a.wait(500); await shot(a, O, homes[3].clone().add(V(0, 0.3, 0)), [[-0.95, K + 0.7, 0.85], [1.05, K + 0.5, -0.9]], [[O.key, COLOR.actor], [px, COLOR.bound]]); - say('OS sandbox: the key file could be read, but the request to send it out was stopped at the proxy. All four stopped it, but the layer that stopped it differed.'); + say('OS sandbox: the key file could be read under the default settings, but the proxy stopped the send to an unlisted domain. The container, microVM, and WASM stopped the key read; the OS sandbox stopped the later send.'); }, }; }, diff --git a/skills/plz-3d-explain/assets/example-agent-sandbox.html b/skills/plz-3d-explain/assets/example-agent-sandbox.html index cdfe8ff..4d14b77 100644 --- a/skills/plz-3d-explain/assets/example-agent-sandbox.html +++ b/skills/plz-3d-explain/assets/example-agent-sandbox.html @@ -369,7 +369,7 @@

예를 들면

{
   "sandbox": {
     "enabled": true,
-    "filesystem": { "denyRead": ["~/.ssh"] },
+    
     "network": {
       "allowedDomains": ["pypi.org", "files.pythonhosted.org"]
     }
@@ -406,16 +406,16 @@ 

예를 들면

10무엇을 고를까

-

네 방식에 같은 탈출 시도를 보내 보면 차이가 한눈에 보입니다. 코드가 상자를 벗어나 호스트의 키 파일에 닿으려 할 때, 네 방식 모두 막지만 막는 층이 다릅니다. 막는 층이 아래에 있을수록, 그리고 코드와 호스트 사이의 층이 많을수록 뚫기 어렵습니다.

+

네 방식에 같은 두 단계 시도를 보내 봅시다. 먼저 호스트의 키 파일을 읽고, 다음으로 읽은 키를 example.net으로 보냅니다. 컨테이너와 마이크로VM은 키 파일이 게스트에 전달되지 않았다는 전제에서 호스트 파일 읽기를 경계에서 막고, WASM은 키 파일이나 외부 전송 기능을 런타임이 따로 건네지 않는 한 쓸 수 없습니다. 반면 여기서 다루는 기본 OS 샌드박스는 키 파일 읽기를 허용하지만, 허용 목록에 없는 example.net으로 보내는 요청은 프록시에서 막습니다. OS 샌드박스에서 읽기까지 막으려면 denyRead를 설정해야 합니다. 막는 층이 아래에 있을수록, 그리고 코드와 호스트 사이의 층이 많을수록 뚫기 어렵습니다.

아래 표는 지금까지의 장을 정리한 것입니다. 무게와 시작 속도는 확인된 비교 수치가 없어서 정성적으로 적었고, 이것은 이 페이지의 판단입니다. 특정 제품을 추천하지 않습니다. 고를 때는 "무엇을 지키려는가(내 노트북, 여러 사용자가 함께 쓰는 서버)"와 "코드에 어떤 도구가 필요한가"를 먼저 정합니다.

누가 대답하고, 무엇을 넘어야 하나

- + - - - - + + + +
방식시스템 콜에 대답하는 쪽호스트에 닿으려면 넘을 것
방식시스템 콜에 대답하는 쪽호스트에 닿으려면 넘을 것키 읽기 / 외부 전송
컨테이너 +gVisorgVisor의 대리 커널(없으면 호스트 커널)네임스페이스 벽, 대리 커널
마이크로VMVM마다 따로 있는 게스트 커널게스트 커널, 하이퍼바이저
WASM런타임이 넣어 준 함수WASM 상자, 바깥 런타임의 권한
OS 샌드박스호스트 커널(정책을 걸어 둠)쓰기·네트워크 정책. 커널은 공유
컨테이너 +gVisorgVisor의 대리 커널(없으면 호스트 커널)네임스페이스 벽, 대리 커널호스트 키 파일은 컨테이너에 전달되지 않아 읽을 수 없습니다.
마이크로VMVM마다 따로 있는 게스트 커널게스트 커널, 하이퍼바이저호스트 키 파일은 게스트에 전달되지 않아 읽을 수 없습니다.
WASM런타임이 넣어 준 함수WASM 상자, 바깥 런타임의 권한키 파일과 네트워크 기능은 런타임이 명시적으로 제공하지 않는 한 쓸 수 없습니다.
OS 샌드박스호스트 커널(정책을 걸어 둠)쓰기·네트워크 정책. 커널은 공유기본 설정은 키 읽기를 허용하지만, 허용 목록 밖으로 보내는 요청은 프록시에서 막습니다. denyRead를 추가하면 읽기도 막습니다.

무게와 쓸 수 있는 도구 (판단)

@@ -439,7 +439,7 @@

필요 조건과 대표 예

예를 들어 내 노트북에서 에이전트에게 테스트를 돌리게 하는 정도라면 OS 샌드박스가 가장 손이 덜 갑니다. 여러 사용자의 코드를 한 서버에서 돌린다면 커널을 나누는 마이크로VM이나 대리 커널을 낀 컨테이너 쪽이 맞습니다. 계산만 하면 되는 짧은 코드라면 WASM으로 충분할 수 있습니다. 이 문단도 판단입니다.

-

네 방식은 모두 막지만 막는 층이 다릅니다. 지키려는 대상과 코드에 필요한 도구로 고릅니다.

+

같은 키 유출 시도라도 컨테이너·마이크로VM·WASM은 호스트 키 접근을 제한하고, 기본 OS 샌드박스는 읽은 뒤의 외부 전송을 제한합니다. 읽기까지 막으려면 OS 샌드박스에 denyRead가 필요합니다.

@@ -1625,7 +1625,7 @@

출처 (2026-10-28 확인)

say('WASM: 캡슐 벽에 문이 없어 막혔습니다. 다음은 OS 샌드박스.'); await a.wait(500); await shot(a, O, homes[3].clone().add(V(0, 0.3, 0)), [[-0.95, K + 0.7, 0.85], [1.05, K + 0.5, -0.9]], [[O.key, COLOR.actor], [px, COLOR.bound]]); - say('OS 샌드박스: 키 파일은 읽혔지만, 밖으로 보내는 요청이 프록시에서 막혔습니다. 네 곳 모두 막았지만 막는 층이 달랐습니다.'); + say('OS 샌드박스: 기본 설정에서는 키 파일을 읽었지만, 허용 목록 밖으로 보내는 요청은 프록시에서 막혔습니다. 컨테이너·마이크로VM·WASM은 키 읽기 단계에서 막았고, OS 샌드박스는 전송 단계에서 막았습니다.'); }, }; }, From 34382099f2f3b81f1e7ec498ccb3c518ae967402 Mon Sep 17 00:00:00 2001 From: codekongdev <349702077+codekongdev@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:49:09 +0900 Subject: [PATCH 2/2] docs: specify when the sandbox refuses unlisted hosts --- .../assets/example-agent-sandbox.en.html | 21 +++++++++---------- .../assets/example-agent-sandbox.html | 21 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/skills/plz-3d-explain/assets/example-agent-sandbox.en.html b/skills/plz-3d-explain/assets/example-agent-sandbox.en.html index c5e12ca..a58589c 100644 --- a/skills/plz-3d-explain/assets/example-agent-sandbox.en.html +++ b/skills/plz-3d-explain/assets/example-agent-sandbox.en.html @@ -362,25 +362,24 @@

For example

8An agent on your own computer: the OS sandbox

Coding agents usually run on my laptop. Starting a container or a VM for every command is a hassle. So Claude Code has a feature that runs shell commands inside a sandbox provided by the operating system. It uses the built-in Seatbelt on macOS, and bubblewrap on Linux and WSL2. With no container and no VM, the kernel of the same computer applies rules only to this process and its child processes.

-

There are two rules. File writes are allowed only to the working folder, the per-user temporary folder, and folders you add separately. For the network, there is no direct way out, and traffic has to go through a proxy that runs outside the sandbox. For each connection, the proxy compares the host name against an allowlist, and the list starts out empty. A connection to a place not on the list is either put to the user as a question or rejected, depending on the permission mode. In bypassPermissions mode, which skips permission checks, it is allowed without asking.

-

Reading is different. The default settings let most of the computer be read, including key files such as ~/.ssh. What stops the data that was read from leaving is the network rule. To block reading as well, set denyRead. Also, this sandbox applies only to shell commands. Claude's file tools such as Read and Edit, MCP servers, and hooks run outside it and are handled by permission rules.

+

There are two rules. File writes are allowed only to the working folder, the per-user temporary folder, and folders you add separately. For the network, there is no direct way out, and traffic has to go through a proxy that runs outside the sandbox. For each connection, the proxy compares the host name against an allowlist, and the list starts out empty. For hosts outside the list, the permission mode and any stricter network rules determine whether the connection goes through, is refused, or needs approval.

+

Reading is different. The default settings let most of the computer be read, including key files such as ~/.ssh. Network rules separately control where the data that was read can be sent. To block reading as well, set denyRead. Also, this sandbox applies only to shell commands. Claude's file tools such as Read and Edit, MCP servers, and hooks run outside it and are handled by permission rules.

For example

Turn it on with the /sandbox command, or write the following in the settings file.

{
   "sandbox": {
     "enabled": true,
-    
     "network": {
       "allowedDomains": ["pypi.org", "files.pythonhosted.org"]
     }
   }
 }
-

The model below shows the result of the same code attempting five things under the default settings, before denyRead is added.

+

In the model below, the sandbox uses the default read settings and a permission mode that refuses connections to unlisted domains. The code makes five attempts.

  1. Write a result file to the working folder. Allowed.
  2. Write outside the folder (~/.bashrc). Blocked. On macOS you get Operation not permitted, and on Linux Read-only file system.
  3. Read the key file in ~/.ssh. Under the default settings, it can be read.
  4. -
  5. Send the key it read to example.net. It is not on the allowlist, so it stops at the proxy.
  6. +
  7. Try to send the key to example.net. In this permission mode, the proxy refuses the connection because the host is outside the allowlist.
  8. Send a request to pypi.org, which was added to the allowlist. It goes out through the proxy.

The documentation also states the limits. By default the proxy does not look inside encrypted traffic and sees only the host name. So if you allow a broad domain such as github.com, data can leave by that route. Also, the sandbox is off by default, and even when it is on, if a required component is missing, the default setting runs the command without a sandbox. To make startup stop in that case, turn on sandbox.failIfUnavailable.

@@ -406,7 +405,7 @@

For example

10How to choose

-

Send the same two-step attempt to all four approaches: first read the host key file, then send the key it read to example.net. The container and microVM stop access to the host file at their boundary, assuming the key file was not passed into the guest. WASM cannot use the key file or an external network function unless the runtime explicitly provides them. The default OS sandbox shown here allows the key file to be read, but its proxy blocks the request to the unlisted example.net. To block the read in the OS sandbox too, configure denyRead. The lower the stopping layer, and the more layers there are between the code and the host, the harder it is to break through.

+

Send the same two-step attempt to all four approaches: first read the host key file, then send the key it read to example.net. The container and microVM stop access to the host file at their boundary, assuming the key file was not passed into the guest. WASM cannot use the key file or an external network function unless the runtime explicitly provides them. The OS sandbox uses the default read settings from chapter 8, so the key file can be read. As in chapter 8, we assume a permission mode that refuses connections to unlisted domains, so the proxy blocks the request to example.net. To block the read in the OS sandbox too, configure denyRead. The lower the stopping layer, and the more layers there are between the code and the host, the harder it is to break through.

The tables below sum up the chapters so far. There are no confirmed comparison figures for weight and start speed, so they are written qualitatively, and that is this page's own judgment. It does not recommend any particular product. When choosing, first decide "what am I trying to protect (my laptop, or a server shared by several users)" and "what tools does the code need".

Who answers, and what has to be crossed

@@ -415,7 +414,7 @@

Who answers, and what has to be crossed

- +
Container + gVisorgVisor's stand-in kernel (the host kernel if absent)The namespace wall, the stand-in kernelThe host key file cannot be read because it is not passed into the container.
MicroVMA separate guest kernel for each VMThe guest kernel, the hypervisorThe host key file cannot be read because it is not passed into the guest.
WASMFunctions the runtime hands inThe WASM box, the outside runtime's permissionsThe key file and network access are unavailable unless the runtime explicitly provides them.
OS sandboxThe host kernel (with a policy applied)The write and network policy. The kernel is sharedBy default, the key can be read, but the proxy blocks sending it to an unlisted domain. Adding denyRead also blocks the read.
OS sandboxThe host kernel (with a policy applied)The write and network policy. The kernel is sharedDefault read settings allow the key to be read. In the mode shown here, the proxy refuses the send to an unlisted domain. Adding denyRead for the key file also blocks the read.

Weight and available tools (judgment)

@@ -439,7 +438,7 @@

Requirements and typical examples

For example, if all you want is to have an agent run tests on my laptop, the OS sandbox takes the least effort. If you run several users' code on one server, a microVM that divides the kernel, or a container with a stand-in kernel inserted, is the better fit. For short code that only needs to compute, WASM may be enough. This paragraph is also a judgment.

-

For the same key-exfiltration attempt, the container, microVM, and WASM restrict access to the host key; the default OS sandbox restricts the later network send. Add denyRead to block the read in the OS sandbox too.

+

In this comparison, the container, microVM, and WASM stop the key read. The OS sandbox allows the read by default and stops the later send under the permission mode shown. Add denyRead for the key file to block the read too.

@@ -462,7 +461,7 @@

Glossary

WASM
WebAssembly. An execution format that cannot reach the outside without going through functions the runtime hands in.
Pyodide
A Python distribution that ports CPython to WASM. It runs in browsers and Node.js.
OS sandbox
An approach that uses operating system features (macOS Seatbelt, Linux bubblewrap) to restrict one process's file writes and network access.
-
Proxy
A relay server that receives requests on someone's behalf and forwards them. Here it passes connections only to domains on the allowlist.
+
Proxy
A relay server that receives requests on someone's behalf and forwards them. Here it checks the destination against the allowlist and applies the network policy.

Sources (checked 2026-10-28)

@@ -1440,7 +1439,7 @@

Sources (checked 2026-10-28)

await a.move(s1, [4.15, FLOOR + 0.75, 0], 900, 0.6); await a.flash(proxy, COLOR.bound, 800); disposeObject(s1); - say('4. example.net is not on the allowlist, so it stopped at the proxy.'); + say('4. In this permission mode, the proxy refused the connection to the unlisted example.net.'); await a.wait(1100); say('5. It sends a request to pypi.org, which was added to the allowlist.'); const s2 = packet(COLOR.actor, [home.x, home.y + 0.4, home.z], 0.15); temp.add(s2); @@ -1625,7 +1624,7 @@

Sources (checked 2026-10-28)

say('WASM: the capsule wall has no door, so it was stopped. Next, the OS sandbox.'); await a.wait(500); await shot(a, O, homes[3].clone().add(V(0, 0.3, 0)), [[-0.95, K + 0.7, 0.85], [1.05, K + 0.5, -0.9]], [[O.key, COLOR.actor], [px, COLOR.bound]]); - say('OS sandbox: the key file could be read under the default settings, but the proxy stopped the send to an unlisted domain. The container, microVM, and WASM stopped the key read; the OS sandbox stopped the later send.'); + say('OS sandbox: reading the key was allowed by default. In this permission mode, the proxy stopped the send to the unlisted domain. The other three stopped the key read.'); }, }; }, diff --git a/skills/plz-3d-explain/assets/example-agent-sandbox.html b/skills/plz-3d-explain/assets/example-agent-sandbox.html index 4d14b77..d7cfff4 100644 --- a/skills/plz-3d-explain/assets/example-agent-sandbox.html +++ b/skills/plz-3d-explain/assets/example-agent-sandbox.html @@ -362,25 +362,24 @@

예를 들면

8내 컴퓨터에서 도는 에이전트: OS 샌드박스

코딩 에이전트는 대개 내 노트북에서 돕니다. 명령마다 컨테이너나 VM을 띄우기는 번거롭습니다. 그래서 Claude Code는 셸 명령을 운영체제가 제공하는 샌드박스 안에서 실행하는 기능을 둡니다. macOS에서는 내장된 Seatbelt를, 리눅스와 WSL2에서는 bubblewrap을 씁니다. 컨테이너도 VM도 없이, 같은 컴퓨터의 커널이 이 프로세스와 그 자식 프로세스에만 규칙을 겁니다.

-

규칙은 두 가지입니다. 파일 쓰기는 작업 폴더, 사용자별 임시 폴더, 따로 추가한 폴더에만 허용됩니다. 네트워크는 직접 나가는 길이 없고, 샌드박스 바깥에서 도는 프록시를 거쳐야 합니다. 프록시는 연결마다 호스트 이름을 허용 목록과 비교하는데, 목록은 처음에 비어 있습니다. 목록에 없는 곳으로 가는 연결은 권한 모드에 따라 사용자에게 묻거나 거절됩니다. 다만 권한 확인을 건너뛰는 bypassPermissions 모드에서는 묻지 않고 허용됩니다.

-

읽기는 다릅니다. 기본 설정은 ~/.ssh 같은 키 파일을 포함해 컴퓨터 대부분을 읽게 둡니다. 읽은 것을 밖으로 내보내지 못하게 막는 쪽은 네트워크 규칙입니다. 읽기까지 막으려면 denyRead를 설정합니다. 그리고 이 샌드박스는 셸 명령에만 걸립니다. Read·Edit 같은 Claude의 파일 도구, MCP 서버, 훅은 바깥에서 돌고 권한 규칙으로 다룹니다.

+

규칙은 두 가지입니다. 파일 쓰기는 작업 폴더, 사용자별 임시 폴더, 따로 추가한 폴더에만 허용됩니다. 네트워크는 직접 나가는 길이 없고, 샌드박스 바깥에서 도는 프록시를 거쳐야 합니다. 프록시는 연결마다 호스트 이름을 허용 목록과 비교하는데, 목록은 처음에 비어 있습니다. 목록에 없는 곳으로 가는 연결을 허용할지, 거부할지, 사용자에게 물을지는 권한 모드와 추가 네트워크 규칙에 따라 달라집니다.

+

읽기는 다릅니다. 기본 설정은 ~/.ssh 같은 키 파일을 포함해 컴퓨터 대부분을 읽게 둡니다. 읽은 데이터를 어디로 보낼 수 있는지는 네트워크 규칙이 따로 정합니다. 읽기까지 막으려면 denyRead를 설정합니다. 그리고 이 샌드박스는 셸 명령에만 걸립니다. Read·Edit 같은 Claude의 파일 도구, MCP 서버, 훅은 바깥에서 돌고 권한 규칙으로 다룹니다.

예를 들면

/sandbox 명령으로 켜거나, 설정 파일에 다음처럼 적습니다.

{
   "sandbox": {
     "enabled": true,
-    
     "network": {
       "allowedDomains": ["pypi.org", "files.pythonhosted.org"]
     }
   }
 }
-

아래 모형은 denyRead를 넣기 전의 기본 설정에서 같은 코드가 다섯 가지 일을 시도한 결과입니다.

+

아래 모형은 기본 읽기 설정을 쓰고, 허용 목록에 없는 도메인으로의 연결을 거부하는 권한 모드에서 코드가 다섯 가지 일을 시도하는 모습을 보여 줍니다.

  1. 작업 폴더에 결과 파일을 씁니다. 허용됩니다.
  2. 폴더 밖(~/.bashrc)에 씁니다. 막힙니다. macOS에서는 Operation not permitted, 리눅스에서는 Read-only file system이 돌아옵니다.
  3. ~/.ssh의 키 파일을 읽습니다. 기본 설정에서는 읽힙니다.
  4. -
  5. 읽은 키를 example.net으로 보냅니다. 허용 목록에 없어서 프록시에서 멈춥니다.
  6. +
  7. 읽은 키를 example.net으로 보내려 합니다. 이 권한 모드에서는 허용 목록에 없는 호스트라 프록시가 연결을 거부합니다.
  8. 허용 목록에 넣은 pypi.org로 요청을 보냅니다. 프록시를 지나 나갑니다.

한계도 문서에 적혀 있습니다. 프록시는 기본으로 암호화된 내용을 들여다보지 않고 호스트 이름만 봅니다. 그래서 github.com처럼 넓은 도메인을 허용하면 그 길로 데이터가 나갈 수 있습니다. 또 샌드박스는 기본으로 꺼져 있고, 켜 두어도 필요한 구성 요소가 없으면 기본 설정에서는 샌드박스 없이 명령을 실행합니다. 이때 시작을 멈추게 하려면 sandbox.failIfUnavailable을 켭니다.

@@ -406,7 +405,7 @@

예를 들면

10무엇을 고를까

-

네 방식에 같은 두 단계 시도를 보내 봅시다. 먼저 호스트의 키 파일을 읽고, 다음으로 읽은 키를 example.net으로 보냅니다. 컨테이너와 마이크로VM은 키 파일이 게스트에 전달되지 않았다는 전제에서 호스트 파일 읽기를 경계에서 막고, WASM은 키 파일이나 외부 전송 기능을 런타임이 따로 건네지 않는 한 쓸 수 없습니다. 반면 여기서 다루는 기본 OS 샌드박스는 키 파일 읽기를 허용하지만, 허용 목록에 없는 example.net으로 보내는 요청은 프록시에서 막습니다. OS 샌드박스에서 읽기까지 막으려면 denyRead를 설정해야 합니다. 막는 층이 아래에 있을수록, 그리고 코드와 호스트 사이의 층이 많을수록 뚫기 어렵습니다.

+

네 방식에 같은 두 단계 시도를 보내 봅시다. 먼저 호스트의 키 파일을 읽고, 다음으로 읽은 키를 example.net으로 보냅니다. 컨테이너와 마이크로VM은 키 파일이 게스트에 전달되지 않았다는 전제에서 호스트 파일 읽기를 경계에서 막고, WASM은 키 파일이나 외부 전송 기능을 런타임이 따로 건네지 않는 한 쓸 수 없습니다. OS 샌드박스는 8장의 기본 읽기 설정을 쓰므로 키 파일을 읽을 수 있습니다. 8장처럼 허용 목록 밖의 연결을 거부하는 권한 모드를 가정하므로, 프록시는 목록에 없는 example.net으로의 요청을 막습니다. OS 샌드박스에서 읽기까지 막으려면 denyRead를 설정해야 합니다. 막는 층이 아래에 있을수록, 그리고 코드와 호스트 사이의 층이 많을수록 뚫기 어렵습니다.

아래 표는 지금까지의 장을 정리한 것입니다. 무게와 시작 속도는 확인된 비교 수치가 없어서 정성적으로 적었고, 이것은 이 페이지의 판단입니다. 특정 제품을 추천하지 않습니다. 고를 때는 "무엇을 지키려는가(내 노트북, 여러 사용자가 함께 쓰는 서버)"와 "코드에 어떤 도구가 필요한가"를 먼저 정합니다.

누가 대답하고, 무엇을 넘어야 하나

@@ -415,7 +414,7 @@

누가 대답하고, 무엇을 넘어야 하나

- +
컨테이너 +gVisorgVisor의 대리 커널(없으면 호스트 커널)네임스페이스 벽, 대리 커널호스트 키 파일은 컨테이너에 전달되지 않아 읽을 수 없습니다.
마이크로VMVM마다 따로 있는 게스트 커널게스트 커널, 하이퍼바이저호스트 키 파일은 게스트에 전달되지 않아 읽을 수 없습니다.
WASM런타임이 넣어 준 함수WASM 상자, 바깥 런타임의 권한키 파일과 네트워크 기능은 런타임이 명시적으로 제공하지 않는 한 쓸 수 없습니다.
OS 샌드박스호스트 커널(정책을 걸어 둠)쓰기·네트워크 정책. 커널은 공유기본 설정은 키 읽기를 허용하지만, 허용 목록 밖으로 보내는 요청은 프록시에서 막습니다. denyRead를 추가하면 읽기도 막습니다.
OS 샌드박스호스트 커널(정책을 걸어 둠)쓰기·네트워크 정책. 커널은 공유기본 읽기 설정에서는 키를 읽을 수 있습니다. 이 권한 모드에서는 허용 목록 밖으로 보내는 요청을 프록시가 거부합니다. 키 파일을 denyRead에 추가하면 읽기도 막습니다.

무게와 쓸 수 있는 도구 (판단)

@@ -439,7 +438,7 @@

필요 조건과 대표 예

예를 들어 내 노트북에서 에이전트에게 테스트를 돌리게 하는 정도라면 OS 샌드박스가 가장 손이 덜 갑니다. 여러 사용자의 코드를 한 서버에서 돌린다면 커널을 나누는 마이크로VM이나 대리 커널을 낀 컨테이너 쪽이 맞습니다. 계산만 하면 되는 짧은 코드라면 WASM으로 충분할 수 있습니다. 이 문단도 판단입니다.

-

같은 키 유출 시도라도 컨테이너·마이크로VM·WASM은 호스트 키 접근을 제한하고, 기본 OS 샌드박스는 읽은 뒤의 외부 전송을 제한합니다. 읽기까지 막으려면 OS 샌드박스에 denyRead가 필요합니다.

+

이 비교에서 컨테이너·마이크로VM·WASM은 키 읽기를 막습니다. OS 샌드박스는 기본 읽기 설정에서 키를 읽게 두고, 예시의 권한 모드에서는 전송을 막습니다. 키 파일을 denyRead에 추가하면 읽기도 막을 수 있습니다.

@@ -462,7 +461,7 @@

용어 정리

WASM
WebAssembly. 런타임이 넣어 준 함수를 거치지 않고는 바깥에 닿을 수 없는 실행 형식입니다.
Pyodide
CPython을 WASM으로 옮긴 파이썬 배포판. 브라우저와 Node.js에서 돕니다.
OS 샌드박스
운영체제 기능(macOS Seatbelt, 리눅스 bubblewrap)으로 한 프로세스의 파일 쓰기와 네트워크를 제한하는 방식입니다.
-
프록시
요청을 대신 받아 전달하는 중계 서버. 여기서는 허용 목록에 있는 도메인으로만 연결을 넘깁니다.
+
프록시
요청을 대신 받아 전달하는 중계 서버. 여기서는 연결 대상을 허용 목록과 비교하고 네트워크 규칙을 적용합니다.

출처 (2026-10-28 확인)

@@ -1440,7 +1439,7 @@

출처 (2026-10-28 확인)

await a.move(s1, [4.15, FLOOR + 0.75, 0], 900, 0.6); await a.flash(proxy, COLOR.bound, 800); disposeObject(s1); - say('4. example.net은 허용 목록에 없어서 프록시에서 멈췄습니다.'); + say('4. 이 권한 모드에서는 허용 목록에 없는 example.net으로의 연결을 프록시가 거부했습니다.'); await a.wait(1100); say('5. 허용 목록에 넣은 pypi.org 로 요청을 보냅니다.'); const s2 = packet(COLOR.actor, [home.x, home.y + 0.4, home.z], 0.15); temp.add(s2); @@ -1625,7 +1624,7 @@

출처 (2026-10-28 확인)

say('WASM: 캡슐 벽에 문이 없어 막혔습니다. 다음은 OS 샌드박스.'); await a.wait(500); await shot(a, O, homes[3].clone().add(V(0, 0.3, 0)), [[-0.95, K + 0.7, 0.85], [1.05, K + 0.5, -0.9]], [[O.key, COLOR.actor], [px, COLOR.bound]]); - say('OS 샌드박스: 기본 설정에서는 키 파일을 읽었지만, 허용 목록 밖으로 보내는 요청은 프록시에서 막혔습니다. 컨테이너·마이크로VM·WASM은 키 읽기 단계에서 막았고, OS 샌드박스는 전송 단계에서 막았습니다.'); + say('OS 샌드박스: 기본 읽기 설정에서는 키를 읽을 수 있었습니다. 이 권한 모드에서는 허용 목록 밖으로 전송하는 요청을 프록시가 막았습니다. 앞의 세 방식은 키 읽기를 막았습니다.'); }, }; },