Repository navigation
Conversation
β¦ts/spaces in file names - Neutralize Windows reserved device names (CON, PRN, AUX, NUL, COM1-9, LPT1-9) in sanitizeFileName - Strip trailing dots and spaces to prevent unexpected Windows path resolution - Add unit tests for reserved names and trailing dots/spaces - Update Sentinel security journal Co-authored-by: criptogus <128640021+criptogus@users.noreply.github.com>
|
π 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. |
π‘οΈ Sentinel Security Fix
π¨ Severity: MEDIUM / HIGH (DoS and filesystem confusion on Windows)
π‘ Vulnerability:
User/AI-controlled document titles and file attachments containing Windows reserved device names (
CON,PRN,AUX,NUL,COM1-COM9,LPT1-LPT9with or without extensions) or trailing dots/spaces bypassed illegal character stripping ([/\\:*?"<>|\u0000-\u001f]). When saving files to disk on Windows, accessing these names can cause filesystem hangs, Denial of Service (DoS), or unexpected file path resolution.π― Impact:
Attempting to create or save files with reserved DOS names on Windows systems can hang Node.js or cause system calls to target device streams or fail catastrophically. Trailing dots and spaces are stripped by Windows Win32 APIs, causing file name collisions and path confusion.
π§ Fix:
sanitizeFileNamein@hermesoffice/electron-utilsto strip trailing dots and spaces._to any file base name matching Windows reserved device names (CON,PRN,AUX,NUL,COM[1-9],LPT[1-9]), preventing device stream targeting while preserving user content.safe-file-name.test.ts..jules/sentinel.md.β Verification:
npm run test -w @hermesoffice/electron-utils(all 219 tests passed)npm run typecheck -w @hermesoffice/electron-utils(passed)npm run lint&npm run format:check(passed)npm run check:theme-colors&npm run check:english-comments(passed)PR created automatically by Jules for task 13080351731908464748 started by @criptogus