π‘οΈ Sentinel: [MEDIUM] Fix information leakage in error messages - #34
rezhajulio wants to merge 1 commit into
Conversation
* Replaced raw exception string formatting (`{e}`) in user-facing Telegram replies with generic internal error messages in `check.py` and `verify.py`.
* Retained full detailed exception logging internally via `logger.error(..., exc_info=True)`.
* Created Sentinel journal entry documenting the learning and prevention strategy.
|
π 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: Information Leakage via Error Messages. Catch-all
except Exception as e:blocks were formatting the raw exception stringeinto error messages sent directly to Telegram users.π― Impact: This could expose internal application details, file paths, or backend stack traces to end-users (including malicious actors), aiding them in further attacks.
π§ Fix: Replaced the interpolation of raw exception strings with generic error messages (e.g., "Gagal memeriksa user karena kesalahan internal.") in user replies, while ensuring the actual exception is safely logged to the server with
exc_info=True.β Verification: Code review passed, tests executed via
uv run pytest tests/test_check.py tests/test_verify_handler.pypassed cleanly, anduv run ruff check/formatshows no issues.PR created automatically by Jules for task 6921388308690109037 started by @rezhajulio