π‘οΈ Sentinel: [CRITICAL] Fix command injection in Unix user lookups#104
π‘οΈ Sentinel: [CRITICAL] Fix command injection in Unix user lookups#104Donach wants to merge 1 commit into
Conversation
Replaced vulnerable `execSync` calls with `execFileSync` in `packages/core/src/unix/id-lookups.ts` and `packages/core/src/unix/user-manager.ts` to prevent command injection vulnerabilities where a user or group name could include shell escape characters. Tests were updated to reflect this change. Co-authored-by: Donach <39565367+Donach@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. |
π¨ Severity: CRITICAL
π‘ Vulnerability: Command injection in
getGidFromGroupName,getUidFromUsername,getHomedirFromUsername, andunixUserExists.π― Impact: Attackers could potentially execute arbitrary shell commands if they can control the
usernameorgroupNameparameters passed to these functions.π§ Fix: Replaced
execSyncwithexecFileSyncto bypass shell execution, used argument arrays, and utilized the--double-dash to prevent argument injection.β Verification: Ran
pnpm -w run lint:fixandpnpm --filter @agor/core test. Tests pass and no new issues are introduced.PR created automatically by Jules for task 8025371133038674867 started by @Donach