Skip to content

Conversation

@farrelmahaztra
Copy link
Contributor

@farrelmahaztra farrelmahaztra commented Feb 5, 2026

Note

Medium Risk
Touches subprocess creation and privilege/UID handling, which can affect sandboxing, permissions, and cross-platform behavior (especially root-in-container vs. Windows).

Overview
Introduces a shared get_demote_preexec_fn() in coding/utils.py to standardize subprocess isolation: on Unix it uses setsid and, when running as root, demotes to uid/gid 1000; on Windows it returns None.

Updates ClaudeBashSession (bash.py), the shared BashSession (session.py), and async read_file_async/write_file_async to use this helper instead of inline, platform-specific process creation logic, removing duplicated os/sys branching.

Written by Cursor Bugbot for commit b2a64ea. This will update automatically on new commits. Configure here.

@farrelmahaztra farrelmahaztra marked this pull request as ready for review February 5, 2026 19:56
@jdchawla29 jdchawla29 merged commit ba190a3 into main Feb 7, 2026
9 of 11 checks passed
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.

2 participants