Skip to content

Commit 21a3776

Browse files
Mossakaclaude
andcommitted
fix: redact API keys in debug config logging
Prevent clear-text logging of OPENAI_API_KEY and ANTHROPIC_API_KEY in the debug configuration output. CodeQL flagged this as a high severity security issue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b6661e5 commit 21a3776

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/cli.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ program
10351035
const redactedConfig = {
10361036
...config,
10371037
agentCommand: redactSecrets(config.agentCommand),
1038+
openaiApiKey: config.openaiApiKey ? '[REDACTED]' : undefined,
1039+
anthropicApiKey: config.anthropicApiKey ? '[REDACTED]' : undefined,
10381040
};
10391041
logger.debug('Configuration:', JSON.stringify(redactedConfig, null, 2));
10401042
logger.info(`Allowed domains: ${allowedDomains.join(', ')}`);

0 commit comments

Comments
 (0)