Skip to content

fix(exec): auto-cd to first allowed path when cwd outside allowlist - #100

Merged
blaspat merged 2 commits into
mainfrom
fix/exec-auto-cd
Jul 10, 2026
Merged

fix(exec): auto-cd to first allowed path when cwd outside allowlist#100
blaspat merged 2 commits into
mainfrom
fix/exec-auto-cd

Conversation

@blaspat

@blaspat blaspat commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Instead of rejecting the exec call when the shell's cwd is outside allowed_paths, silently cd to the first allowed path and prepend a warning to stderr. This prevents the operator from permanently locking themselves out with a stray 'cd /etc' while still keeping the guardrail visible.

blaspat added 2 commits July 10, 2026 16:30
Instead of rejecting the exec call when the shell's cwd is outside
allowed_paths, silently cd to the first allowed path and prepend
a warning to stderr. This prevents the operator from permanently
locking themselves out with a stray 'cd /etc' while still keeping
the guardrail visible.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
Resolved conflict in handler_exec.go: replaced enforcement-reject
with auto-cd + stderr warning.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
@blaspat
blaspat merged commit 7ff866d into main Jul 10, 2026
14 checks passed
@blaspat
blaspat deleted the fix/exec-auto-cd branch July 10, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant