Repository navigation
Commit dd368eb
committed
fix(sandbox): strip supervisor-only credentials from entrypoint env
ProcessHandle::spawn_impl previously inherited the supervisor's full
environment when starting the sandbox entrypoint, then drop_privileges()
demoted the child to the sandbox user. The combination meant a later
process running as the sandbox user (e.g. an SSH-spawned shell) could
read /proc/<entrypoint_pid>/environ and recover the gateway-minted JWT.
Explicitly env_remove the three sandbox-token env vars before exec so the
entrypoint child carries none of the supervisor's identity material.
SSH session shells already use env_clear() in apply_child_env, so this
plugs the only remaining inheritance path.
Related to #1354 (per-sandbox identity series, PR 3 follow-up).
Signed-off-by: Taylor Mutch <[email protected]>1 parent d250f7a commit dd368eb
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| |||
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
275 | 293 | | |
276 | 294 | | |
277 | 295 | | |
| |||
0 commit comments