π‘οΈ Sentinel: [MEDIUM] Prevent internal RPC error leakage#38
π‘οΈ Sentinel: [MEDIUM] Prevent internal RPC error leakage#38DerUntote wants to merge 1 commit into
Conversation
Replaced instances of message.reply(err.message) with a generic user-facing error string. Appended .catch(console.error) to discord API replies. Logged actual error instances internally with console.error. Co-authored-by: DerUntote <8378077+DerUntote@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: MEDIUM
π‘ Vulnerability: Internal RPC errors were being returned directly to users via
message.reply(err.message), which could leak sensitive internal system information, file paths, or connection issues in production.π― Impact: Exposing raw error messages could provide attackers with detailed information about the bot's internal workings and connectivity. Also, unhandled promise rejections on the
.then()chain of Discord messages could lead to unexpected bot crashes.π§ Fix: Replaced direct
err.messageuser feedback with a sanitized, generic error string:'An internal error occurred while processing your request.'while internally logging the actual error viaconsole.error(err)for debugging purposes. Appended.catch(console.error)tomessage.reply().then()promises to safely handle rejections.β Verification: Verified via manual syntax checks with
node -con updated files, format checks withnpm run precommit, andgit diffthat no.reply(err.message)occurrences remain in thebot/modules/*Tipper.jsstructure.PR created automatically by Jules for task 3933508692704994974 started by @DerUntote