Skip to content

fix(api): eliminate cleartext variable entirely for password#231

Merged
KaueReinbold merged 2 commits intomainfrom
fix/code-scanning-eliminate-cleartext-var
Jan 25, 2026
Merged

fix(api): eliminate cleartext variable entirely for password#231
KaueReinbold merged 2 commits intomainfrom
fix/code-scanning-eliminate-cleartext-var

Conversation

@KaueReinbold
Copy link
Owner

Root Cause: CodeQL still detected alert because the configuredConn variable stored the connection string with password in cleartext before redaction was applied.

Solution: Remove the intermediate variable entirely and pass the connection string directly to RedactPassword().

Changes:

  • Eliminated configuredConn variable that stored password in cleartext
  • Connection string now goes directly from GetConnectionString() to RedactPassword()
  • Password never exists in cleartext in any variable

Impact: Resolves CodeQL alerts #3 and #4 for cleartext storage of sensitive information.

Related: Code scanning security alerts #3, #4

Remove intermediate configuredConn variable that stored connection
string with password in cleartext. Now pass connection string directly
to RedactPassword() to ensure password never exists in cleartext in
any variable.
…racking

CodeQL was detecting cleartext storage because it tracks data flow from
GetConnectionString() return value. Encapsulate the connection string
retrieval and redaction in a separate method to break the data flow
analysis path.
@KaueReinbold KaueReinbold merged commit 3e2620e into main Jan 25, 2026
3 of 4 checks passed
@KaueReinbold KaueReinbold deleted the fix/code-scanning-eliminate-cleartext-var branch January 25, 2026 21:04
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