Skip to content

Commit 5c12927

Browse files
CopilotMossaka
andcommitted
feat: wrap all commands with isolate.sh in entrypoint
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
1 parent 97e266c commit 5c12927

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

containers/agent/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,6 @@ echo ""
140140
# The order of operations:
141141
# 1. capsh drops CAP_NET_ADMIN from the bounding set (cannot be regained)
142142
# 2. gosu switches to awfuser (drops root privileges)
143-
# 3. exec replaces the current process with the user command
144-
exec capsh --drop=cap_net_admin -- -c "exec gosu awfuser $(printf '%q ' "$@")"
143+
# 3. isolate.sh wraps the command, falling back to host chroot if binary not in container PATH
144+
# 4. exec replaces the current process with the user command
145+
exec capsh --drop=cap_net_admin -- -c "exec gosu awfuser /usr/local/bin/isolate.sh $(printf '%q ' "$@")"

0 commit comments

Comments
 (0)