Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Process pipe deadlocks (DoS) - #108

Open
NSEvent wants to merge 1 commit into
mainfrom
sentinel-fix-process-pipe-deadlocks-12529352122480999120
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Process pipe deadlocks (DoS)#108
NSEvent wants to merge 1 commit into
mainfrom
sentinel-fix-process-pipe-deadlocks-12529352122480999120

Conversation

@NSEvent

@NSEvent NSEvent commented Jul 25, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: A Denial of Service (DoS) vulnerability existed due to pipe deadlocks in Process execution. If a child process writes more data than the OS pipe buffer can hold, it blocks. If the parent is blocked on waitUntilExit(), a deadlock occurs.
🎯 Impact: The application could hang indefinitely when executing shell commands or external tools that output large amounts of data.
πŸ”§ Fix: Moved pipe reads (readDataToEndOfFile()) to occur before calling process.waitUntilExit() in OBSWebSocketLiveIntegrationTests.swift and AutomationExecutor.swift, ensuring the pipe buffer is continuously drained.
βœ… Verification: Static code analysis confirms reads happen before waits. Tested with static syntax validation.


PR created automatically by Jules for task 12529352122480999120 started by @NSEvent

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of shell and system process output to ensure available data is captured reliably before completion checks.
    • Improved reliability when detecting process paths and child processes during automation and integration workflows.

Co-authored-by: NSEvent <44446865+NSEvent@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.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d035b0b-3b8a-4fde-8604-b509bcac29dd

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 5cdd395 and 09f3704.

πŸ“’ Files selected for processing (2)
  • TriggerKit/Sources/TriggerKitRuntime/AutomationExecutor.swift
  • XboxControllerMapper/XboxControllerMapperTests/OBSWebSocketLiveIntegrationTests.swift

πŸ“ Walkthrough

Walkthrough

Subprocess helpers now drain pipe output before waiting for process termination. The ordering is updated in runProcess, childPIDs(of:), and the OBS integration test’s resolveBinaryPath() helper.

Changes

Subprocess output ordering

Layer / File(s) Summary
Drain subprocess output before waiting
TriggerKit/Sources/TriggerKitRuntime/AutomationExecutor.swift, XboxControllerMapper/XboxControllerMapperTests/OBSWebSocketLiveIntegrationTests.swift
runProcess, childPIDs(of:), and resolveBinaryPath() read process output before calling waitUntilExit().

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately summarizes the core change: reordering process pipe reads to prevent deadlocks and DoS.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-fix-process-pipe-deadlocks-12529352122480999120

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

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