Skip to content

🛡️ Sentinel: Fix Process Deadlock in Tests - #160

Open
NSEvent wants to merge 2 commits into
mainfrom
sentinel-fix-deadlock-16183143289152164354
Open

NSEvent wants to merge 2 commits into
mainfrom
sentinel-fix-deadlock-16183143289152164354

Conversation

@NSEvent

@NSEvent NSEvent commented Aug 28, 2026

Copy link
Copy Markdown
Owner

🛡️ Sentinel: [MEDIUM] Fix Process Deadlock Vulnerability

🚨 Severity: MEDIUM
💡 Vulnerability: The test OBSWebSocketLiveIntegrationTests.swift was calling which.waitUntilExit() before fully draining the standard output pipe.
🎯 Impact: If the which command output exceeds the OS pipe buffer limit (typically 64KB), the child process will block waiting for the parent to read, and the parent will block indefinitely on waitUntilExit(), leading to a deadlock and effectively causing a Denial of Service for the test suite.
🔧 Fix: Moved the readDataToEndOfFile() call before waitUntilExit() to ensure the pipe buffer is safely drained, mirroring fixes already deployed in production code.
✅ Verification: Statically validated that waitUntilExit is not called before pipe reads on Process instances throughout the codebase.


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

Moved the `outPipe.fileHandleForReading.readDataToEndOfFile()` call before `which.waitUntilExit()` in `OBSWebSocketLiveIntegrationTests.swift` to prevent a potential Denial of Service deadlock when the subprocess output exceeds the OS pipe buffer size.

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 Aug 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 44 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 699e4921-815c-4d57-bbe5-b15b603bd361

📥 Commits

Reviewing files that changed from the base of the PR and between f1ceae4 and 5259079.

📒 Files selected for processing (1)
  • XboxControllerMapper/XboxControllerMapperTests/OBSWebSocketLiveIntegrationTests.swift

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.

Removed the untracked xcodebuild.log file that was accidentally committed in the previous submission.

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