You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With looking into code, I see we are simply reading text file for our APIKey which will lead to security break. We can consider using environment variables or secure storage.
Hi @adbtae
With looking into code, I see we are simply reading text file for our APIKey which will lead to security break. We can consider using environment variables or secure storage.
/blob/main/Defi-BotAdditional/Globals.cs
public static string[] keys = System.IO.File.ReadAllLines(@"/Users/aditi/Desktop/Bot/binanceInfo/apiKeys.txt");
//Api Key
public static string ApiKey { get; set; } = keys[0];
//Secret Key
public static string SecretKey { get; set; } = keys[1];
Also we should validate before using index on array to avoid null exception or index out of bound exception.
The text was updated successfully, but these errors were encountered: