🔒 [security fix] Sanitize appID to prevent log injection#60
🔒 [security fix] Sanitize appID to prevent log injection#60
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What:
Sanitized
appIDextracted from the AppleScriptappIDDescriptor.stringValueby removing control characters before it is logged or used inDockItem.If an application or shortcut returns a maliciously crafted name containing newlines, carriage returns, or terminal escape sequences (like ANSI color codes), it could result in Log Injection (CWE-117) or Terminal Emulation injection (CWE-150) when the application executes and prints to terminal/logs.
🛡️ Solution:
Applied
.components(separatedBy: .controlCharacters).joined()to strip all control characters from theappID, effectively eliminating the injection vector.PR created automatically by Jules for task 11210941046365119085 started by @hatimhtm