Skip to content

Commit

Permalink
CodeQL fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Riku Virtanen committed Mar 1, 2024
1 parent a169f0d commit 003cab3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ internal class Helper
{
internal static string CreateConnectionString()
{
return "Server=127.0.0.1,1433;Database=Master;User Id=SA;Password=Salakala123!;Encrypt=true;TrustServerCertificate=True;";
var pw = "Salakala123!";
return $"Server=127.0.0.1,1433;Database=Master;User Id=SA;Password={pw};Encrypt=true;TrustServerCertificate=True;";

Check failure

Code scanning / CodeQL

Hard-coded connection string with credentials Critical

'ConnectionString' property includes hard-coded credentials set in
object creation of type SqlConnection
.
'ConnectionString' property includes hard-coded credentials set in
object creation of type SqlConnection
.
'ConnectionString' property includes hard-coded credentials set in
object creation of type SqlConnection
.
'ConnectionString' property includes hard-coded credentials set in
object creation of type SqlConnection
.
'ConnectionString' property includes hard-coded credentials set in
object creation of type SqlConnection
.
}

internal static int GetRowCount(string connString, string table)
Expand Down

0 comments on commit 003cab3

Please sign in to comment.