You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update docs to align with AWF chroot mode (v0.13.1+) (#13758)
Updates sandbox.md, architecture.mdx, and security-architecture-spec.md
to reflect the --enable-chroot mode introduced in commit 578ac0d:
- Replace explicit volume mount tables with chroot filesystem visibility
- Replace utility mount lists with "all host binaries available"
- Replace environment variable category tables with --env-all explanation
- Add GOROOT special case documentation
- Simplify runtime tools section to explain transparent PATH inheritance
- Add chroot-based transparency subsection to architecture
- Update security spec SI-04 through SI-07 requirements
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/content/docs/introduction/architecture.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,11 @@ The SafeOutputs subsystem provides security by design: the agent never requires
160
160
161
161
## Agent Workflow Firewall (AWF)
162
162
163
-
The Agent Workflow Firewall (AWF) provides network egress control at the substrate level. AWF mediates all outbound network requests from the agent, enforcing a domain allowlist that constrains which external endpoints the agent may contact. This mechanism prevents unauthorized data exfiltration and limits the blast radius of a compromised agent to only those domains explicitly permitted by configuration.
163
+
The Agent Workflow Firewall (AWF) enforces network egress control via a domain allowlist, preventing data exfiltration and containing compromised agents to permitted domains.
164
+
165
+
AWF separates two concerns:
166
+
-**Filesystem**: All host binaries and runtimes accessible; setup actions work transparently
167
+
-**Network**: All traffic routed through proxy enforcing the domain allowlist
| `/home/runner/.copilot` | `/home/runner/.copilot` | `rw` | Copilot configuration and state |
94
-
95
-
These default mounts ensure the agent has access to essential tools and the repository files. Custom mounts specified via `sandbox.agent.mounts` are added alongside these defaults.
96
-
97
-
#### Mounted System Utilities
98
-
99
-
AWF mounts common system utilities from the host into the container as read-only binaries. These utilities are frequently used in workflow scripts and are organized by priority:
100
-
101
-
**Essential Utilities** (most commonly used):
102
-
103
-
| Utility | Purpose |
104
-
|---------|---------|
105
-
| `cat` | Display file contents |
106
-
| `curl` | HTTP client for API calls |
107
-
| `date` | Date/time operations |
108
-
| `find` | Locate files by pattern |
109
-
| `gh` | GitHub CLI operations |
110
-
| `grep` | Pattern matching |
111
-
| `jq` | JSON processing |
112
-
| `yq` | YAML processing |
113
-
114
-
**Common Utilities** (frequently used for file operations):
115
-
116
-
| Utility | Purpose |
117
-
|---------|---------|
118
-
| `cp` | Copy files |
119
-
| `cut` | Extract text columns |
120
-
| `diff` | Compare files |
121
-
| `head` | Display file start |
122
-
| `ls` | List directory contents |
123
-
| `mkdir` | Create directories |
124
-
| `rm` | Remove files |
125
-
| `sed` | Stream text editing |
126
-
| `sort` | Sort text lines |
127
-
| `tail` | Display file end |
128
-
| `wc` | Count lines/words |
129
-
| `which` | Locate commands |
130
-
131
-
All utilities are mounted read-only (`:ro`) from `/usr/bin/` on the host. They execute on the read-write workspace directory inside the container.
132
-
133
-
> [!TIP]
134
-
> Available Utilities
135
-
> Run `which jq` or `jq --version` in your workflow to verify utility availability. The agent has access to all mounted utilities without additional setup.
81
+
#### Chroot Mode
82
+
83
+
AWF v0.13.1+ uses **chroot mode** (`--enable-chroot`) to provide transparent host filesystem access while maintaining network isolation via iptables. This eliminates explicit volume mounts and environment variable configuration.
84
+
85
+
```text
86
+
┌─────────────────────────────────────────────┐
87
+
│ AWF Container (chroot) │
88
+
│ • Full filesystem visibility │
89
+
│ • All host binaries available │
90
+
│ • Network: RESTRICTED via iptables/Squid │
91
+
└─────────────────────┬───────────────────────┘
92
+
▼
93
+
Allowed domains only
94
+
```
136
95
137
-
> [!WARNING]
138
-
> Docker socket access is not supported for security
139
-
> reasons. The agent firewall does not mount
140
-
> `/var/run/docker.sock`, and custom mounts cannot add
141
-
> it, preventing agents from spawning Docker
142
-
> containers.
143
-
144
-
#### Mirrored Environment Variables
145
-
146
-
AWF automatically mirrors essential environment variables from the GitHub Actions runner into the agent container. This ensures compatibility with workflows that depend on runner-provided tool paths.
147
-
148
-
The following environment variables are mirrored (if they exist on the host):
> Variables are only passed to the container if they exist on the host runner. Missing variables are silently ignored, ensuring workflows work across different runner configurations.
98
+
AWF chroot mode makes the host filesystem visible inside the container with appropriate permissions:
167
99
168
-
#### Runtime Tools (hostedtoolcache)
100
+
| Path Type | Mode | Examples |
101
+
|-----------|------|----------|
102
+
| User paths | Read-write | `$HOME`, `$GITHUB_WORKSPACE`, `/tmp` |
AWF mounts the `/opt/hostedtoolcache` directory from the GitHub Actions runner, providing access to all runtimes installed via `actions/setup-*` steps. This directory contains pre-installed and dynamically-installed versions of popular development tools.
106
+
Custom mounts can still be added via `sandbox.agent.mounts` for paths that need different permissions.
All host binaries are available without explicit mounts: system utilities, `gh`, language runtimes, build tools, and anything installed via `apt-get` or setup actions. Verify with `which <tool>`.
181
111
182
-
**PATH Integration:**
112
+
> [!WARNING]
113
+
> Docker socket is hidden for security. Agents cannot spawn containers.
183
114
184
-
All runtime binaries are automatically added to PATH inside the agent container. The PATH is configured using a dynamic `find` command that discovers all `bin` directories within `/opt/hostedtoolcache`:
115
+
#### Environment Variables
185
116
186
-
```bash
187
-
# PATH includes all hostedtoolcache binaries
188
-
export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\n' ':')$PATH"
189
-
```
117
+
AWF passes all environment variables via `--env-all`. The host `PATH` is captured as `AWF_HOST_PATH` and restored inside the container, preserving setup action tool paths.
190
118
191
-
**Version Priority:**
119
+
> [!NOTE]
120
+
> Go's "trimmed" binaries require `GOROOT`—AWF automatically captures it after `actions/setup-go`.
192
121
193
-
When multiple versions of a runtime are installed, versions configured by `actions/setup-*` take precedence. The agent detects which specific version is active by reading environment variables like `GOROOT`, `JAVA_HOME`, and ensures that version's binaries appear first in PATH.
122
+
#### Runtime Tools
194
123
195
-
**Using Runtimes in Workflows:**
124
+
Setup actions work transparently. Runtimes update `PATH`, which AWF captures and restores inside the container.
196
125
197
126
```yaml wrap
198
127
---
@@ -207,13 +136,9 @@ jobs:
207
136
python-version: '3.12'
208
137
---
209
138
210
-
Use `go build` or `python3` in your workflow - both are available!
139
+
Use `go build` or `python3` - both are available.
211
140
```
212
141
213
-
> [!TIP]
214
-
> Verify Runtime Availability
215
-
> Use `node --version`, `python3 --version`, `go version`, or `ruby --version` in your workflow to confirm runtime availability. The agent automatically inherits all runtimes configured by setup actions.
216
-
217
142
#### Custom AWF Configuration
218
143
219
144
Use custom commands, arguments, and environment variables to replace the standard AWF installation with a custom setup:
0 commit comments