Open prafullmaru opened 1 month ago
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.
there is a compiled version, thx
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.