Update kaigen credit private key

This commit is contained in:
2025-07-17 00:46:30 +07:00
parent 73ddbb0711
commit 3bd22922c7
3 changed files with 10 additions and 4 deletions

View File

@@ -36,6 +36,14 @@ public class KaigenService : IKaigenService
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
// Always read from environment variable for security
var envPrivateKey = Environment.GetEnvironmentVariable("KAIGEN_PRIVATE_KEY");
if (!string.IsNullOrEmpty(envPrivateKey))
{
_settings.PrivateKey = envPrivateKey;
_logger.LogInformation("Using KAIGEN_PRIVATE_KEY from environment variable");
}
// Validate required settings
if (string.IsNullOrEmpty(_settings.PrivateKey))
{