🔒 [security fix] Fix Redis eval vulnerability#1225
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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔒 Release Safety Check Results✅ Safety Checks Passed {"code":"NOT_FOUND","message":"Requested function was not found"} |
🔍 Classification Check Results
✅ No violations detected. Safe to merge! |
🎯 What: Replace raw Redis EVAL with parameter validation and secure command definition (using SHA under the hood via defineCommand).
⚠️ Risk: Arbitrary Redis command injection or unexpected server errors if malformed parameters (like NaN, infinite, or negative bounds) were passed to the Lua script, potentially leading to denial of service or data corruption in rate limit states.
🛡️ Solution: Added strict bounds checking (Number.isFinite, non-negative assertions) on incoming parameters and switched from direct this.redis.eval to defining and executing a secure Redis command via this.redis.defineCommand, which validates the script, registers it, and safely proxies parameter bindings to prevent format injection.
PR created automatically by Jules for task 1985635102874006381 started by @Hardonian