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
Copy file name to clipboardExpand all lines: docs/selective-mounting.md
+61-20Lines changed: 61 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,23 @@
2
2
3
3
## Overview
4
4
5
-
AWF implements **selective mounting** to protect against credential exfiltration via prompt injection attacks. Instead of mounting the entire host filesystem (`/:/host:rw`), only essential directories are mounted, and sensitive credential files are explicitly hidden.
5
+
AWF implements **granular selective mounting** to protect against credential exfiltration via prompt injection attacks. Instead of mounting the entire host filesystem or home directory, only the workspace directory and essential paths are mounted, and sensitive credential files are explicitly hidden.
6
+
7
+
## Security Fix (v0.14.1)
8
+
9
+
**Previous Vulnerability**: The initial selective mounting implementation (v0.13.0-v0.14.0) mounted the entire `$HOME` directory and attempted to hide credentials using `/dev/null` overlays. This approach had critical flaws:
10
+
- Overlays only work if the credential file exists on the host
11
+
- Non-standard credential locations were not protected
12
+
- Any new credential files would be accessible by default
13
+
- Subdirectories with credentials (e.g., `~/.config/hub/config`) were fully accessible
14
+
15
+
**Fixed Implementation**: As of v0.14.1, AWF uses **granular mounting**:
16
+
- Mount **only** the workspace directory (`$GITHUB_WORKSPACE` or current working directory)
17
+
- Mount `~/.copilot/logs` separately for Copilot CLI logging
18
+
- Apply `/dev/null` overlays as defense-in-depth
19
+
- Never mount the entire `$HOME` directory
20
+
21
+
This eliminates the root cause by ensuring credential files in `$HOME` are never mounted at all.
6
22
7
23
## Threat Model: Prompt Injection Attacks
8
24
@@ -59,7 +75,7 @@ The agent's legitimate tools (Read, Bash) become attack vectors when credentials
59
75
60
76
### Selective Mounting
61
77
62
-
AWF uses chroot mode with selective path mounts. Credential files are hidden at the `/host` paths:
78
+
AWF uses chroot mode with granular selective mounting. Instead of mounting the entire `$HOME`, an empty writable home directory is mounted with only specific subdirectories (`.cargo`, `.claude`, `.config`, etc.) overlaid on top. Credential files are hidden via `/dev/null` overlays as defense-in-depth:
63
79
64
80
**What gets mounted:**
65
81
@@ -85,6 +101,7 @@ const chrootVolumes = [
85
101
'/etc/passwd:/host/etc/passwd:ro',
86
102
'/etc/group:/host/etc/group:ro',
87
103
];
104
+
// Note: $HOME itself is NOT mounted, preventing access to credential directories
0 commit comments