fix(security): 2 improvements across 2 files - #1286
Open
tomaioo wants to merge 8 commits into
Open
Conversation
- Security: SQL Echo Enabled in Production Database Engine - Security: Missing Authorization Check on Get User By ID Endpoint Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: SQL Echo Enabled in Production Database Engine - Security: Missing Authorization Check on Get User By ID Endpoint Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
SaboniAmine
approved these changes
Aug 3, 2026
SaboniAmine
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution!
The /users/{user_id} endpoint being not used anymore, we'll simply remove it in a follow up PR, thanks for identifying the issue!
SaboniAmine
reviewed
Aug 3, 2026
inimaz
reviewed
Aug 3, 2026
…g easier on the prod i Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
…does not exist ```sugg Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
…g easier on the prod i Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
…g easier on the prod i Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
…g easier on the prod i Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
…g easier on the prod i Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix(security): 2 improvements across 2 files
Problem
Severity:
Medium| File:carbonserver/carbonserver/api/infra/database/database_manager.py:L15The Database class initializes the SQLAlchemy engine with
echo=True. This causes the engine to log all SQL statements and parameters to the console/logs. In a production environment, this can lead to sensitive data exposure (e.g., user data, tokens, or PII being included in query parameters) and significantly increases log volume, potentially degrading system performance.Solution
Remove
echo=Trueor make it configurable via an environment variable so it defaults toFalsein production environments.Changes
carbonserver/carbonserver/api/infra/database/database_manager.py(modified)carbonserver/carbonserver/api/routers/users.py(modified)