Skip to content

Conversation

@mpchenette
Copy link
Owner

This PR resolves the open code scanning alert (SonarCloud python:S6437) by removing the hard-coded MySQL credential in python/sql.py and switching to environment-based configuration:

  • Added os import and read DB_USER, DB_PASSWORD, DB_HOST, DB_NAME from the environment (with sensible defaults except for password).
  • Kept changes minimal per repo guidelines.

Follow-ups suggested (not in this PR):

  • Parameterize SQL queries to prevent injection in search_user() and add_user().
  • Fix add_user() connection call (mysql.connector.connect(...)).

Please set DB_PASSWORD (and other optional vars) in your environment before running.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

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.

2 participants