Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion BusinessApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ static void Main(string[] args)
}
private static bool MainMenu()
{
string apikey = "7L8968fB75R5mK70QaejtgJdxXESBA5BiBFrtghsrW1xdTOnqV1RJQQJ99ALACfhMk5XJ3w3AAAAACOGVPCT";

Copilot AI Jan 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding an API key directly in the source code is a security risk. Consider storing it securely, for example in environment variables or a secure vault.

Suggested change
string apikey = "7L8968fB75R5mK70QaejtgJdxXESBA5BiBFrtghsrW1xdTOnqV1RJQQJ99ALACfhMk5XJ3w3AAAAACOGVPCT";
string apikey = Environment.GetEnvironmentVariable("API_KEY");

Copilot uses AI. Check for mistakes.
Printoperations p = new Printoperations();
DoMath d = new DoMath();

Expand Down Expand Up @@ -86,4 +87,4 @@ private static void DisplayResult(string message)
}

}
}
}