Skip to content

fix: resolve CodeQL security alerts in flask-blog-api#7

Merged
Maneesh-Relanto merged 1 commit intomainfrom
fix/security-codeql-flask-debug-info-exposure
Feb 23, 2026
Merged

fix: resolve CodeQL security alerts in flask-blog-api#7
Maneesh-Relanto merged 1 commit intomainfrom
fix/security-codeql-flask-debug-info-exposure

Conversation

@Maneesh-Relanto
Copy link
Owner

Fixes GitHub security issues #115, #116, #117 flagged by CodeQL:

  • fix(app.py): replace hardcoded debug=True with app.config.get('DEBUG', False) Debug mode is now driven by config/FLASK_DEBUG env var instead of being unconditionally enabled, preventing the interactive Werkzeug debugger from running in non-development environments (#115).

  • fix(auth.py): do not expose jwt.InvalidTokenError message in HTTP response Replaced str(e) with a static 'Token is invalid' message to avoid leaking internal JWT library error details to clients (#116).

  • fix(decorators.py): do not expose exception detail in authorization error response Added logging import and logger; internal exception info is now logged server-side (with exc_info) and a generic message is returned to the client instead of str(e) (#117).

Fixes GitHub security issues #115, #116, #117 flagged by CodeQL:

- fix(app.py): replace hardcoded debug=True with app.config.get('DEBUG', False)
  Debug mode is now driven by config/FLASK_DEBUG env var instead of being
  unconditionally enabled, preventing the interactive Werkzeug debugger from
  running in non-development environments (#115).

- fix(auth.py): do not expose jwt.InvalidTokenError message in HTTP response
  Replaced str(e) with a static 'Token is invalid' message to avoid leaking
  internal JWT library error details to clients (#116).

- fix(decorators.py): do not expose exception detail in authorization error response
  Added logging import and logger; internal exception info is now logged
  server-side (with exc_info) and a generic message is returned to the
  client instead of str(e) (#117).
@Maneesh-Relanto Maneesh-Relanto merged commit 557b7c3 into main Feb 23, 2026
4 of 9 checks passed
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