Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix internal RPC error leakage#58

Open
DerUntote wants to merge 1 commit into
masterfrom
sentinel-fix-rpc-error-leakage-13907850235070065544
Open

πŸ›‘οΈ Sentinel: [HIGH] Fix internal RPC error leakage#58
DerUntote wants to merge 1 commit into
masterfrom
sentinel-fix-rpc-error-leakage-13907850235070065544

Conversation

@DerUntote

Copy link
Copy Markdown

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Information Exposure. Internal daemon and network connection errors from the bitcoind-rpc client were being passed directly into Discord channels.
🎯 Impact: Exposing raw backend errors can leak internal routing paths, configuration specifics, or infrastructure details that an attacker could use for reconnaissance.
πŸ”§ Fix: Intercepted RPC errors by logging them to console.error and sending a generic, safe response to the Discord user ('An internal error occurred.'). Also attached .catch() blocks to discord message deletion promises to fail safely and prevent process crashes.
βœ… Verification: Verify that message.reply(err.message) has been eradicated from all *Tipper.js files via grep -r 'message.reply(err.message)' bot/modules/. Ensure tests/syntax are clean via for file in bot/modules/*Tipper.js; do node -c "$file"; done.


PR created automatically by Jules for task 13907850235070065544 started by @DerUntote

Replaced instances where internal RPC errors (like connection timeouts or specific backend daemon failures) were sent directly to end users via `message.reply(err.message)`. This exposes backend infrastructure details and internal errors to potentially malicious users.

Changes:
- Replaced `message.reply(err.message)` with generic `message.reply('An internal error occurred.')`.
- Added server-side logging using `console.error(err)` to ensure admins and developers can still trace and debug failures.
- Added a `.catch(() => {})` clause to `message.delete()` promise chains to prevent `UnhandledPromiseRejection` errors which crash the node process.
- Formatted modified files using Prettier.

Co-authored-by: DerUntote <8378077+DerUntote@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant