Skip to content

πŸ›‘οΈ Sentinel: [MEDIUM] Fix File Descriptor Leakage in subprocess#92

Merged
manupawickramasinghe merged 1 commit into
mainfrom
sentinel-fix-fd-leakage-14717591058926584160
Jun 12, 2026
Merged

πŸ›‘οΈ Sentinel: [MEDIUM] Fix File Descriptor Leakage in subprocess#92
manupawickramasinghe merged 1 commit into
mainfrom
sentinel-fix-fd-leakage-14717591058926584160

Conversation

@ManupaKDU

Copy link
Copy Markdown
Contributor

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: File Descriptor Leakage (CWE-403). Using subprocess.call with close_fds=False inside a multi-threaded ThreadPoolExecutor causes the newly spawned child process to inherit all file descriptors currently opened by any thread at the time of execution.
🎯 Impact: This can expose sensitive resources (e.g., open network sockets, secure files, or database connections) to the unprivileged child process or to attackers if the child process is compromised.
πŸ”§ Fix: Replaced the micro-optimization close_fds=False with the secure default close_fds=True, ensuring a clean file descriptor table for the child process.
βœ… Verification: Ensure tests pass via python3 -m unittest test_testping1.py and that bandit issues no new high severity warnings.


PR created automatically by Jules for task 14717591058926584160 started by @ManupaKDU

Enabled `close_fds=True` in `subprocess.call` to prevent the child `ping` process from inheriting all currently open file descriptors from the parent threads in `ThreadPoolExecutor`.

Added an accompanying journal entry to `.jules/sentinel.md` documenting this security learning. Updated unit tests to assert the correct parameters are passed.

Co-authored-by: ManupaKDU <95234271+ManupaKDU@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@manupawickramasinghe manupawickramasinghe merged commit e3e851d into main Jun 12, 2026
1 check 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