Skip to content

fix(auth): 移除日志中AccessKeySecret明文打印#14

Closed
zhoujiaxin0428 wants to merge 1 commit into
zshs000:masterfrom
zhoujiaxin0428:113
Closed

fix(auth): 移除日志中AccessKeySecret明文打印#14
zhoujiaxin0428 wants to merge 1 commit into
zshs000:masterfrom
zhoujiaxin0428:113

Conversation

@zhoujiaxin0428

Copy link
Copy Markdown
Contributor

移除AliyunSmsClientConfig中AccessKeyId和AccessKeySecret的明文日志打印,改为不泄露密钥的初始化确认日志

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request removes sensitive credential logging (AccessKeyId and AccessKeySecret) from the Aliyun SMS client configuration and replaces it with a success log. The reviewer suggested moving the success log statement to after the client is successfully instantiated to prevent misleading logs in case of an instantiation failure.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +30 to 32
log.info("阿里云短信客户端初始化成功");

return new com.aliyun.dypnsapi20170525.Client(config);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

当前日志“阿里云短信客户端初始化成功”在创建 Client 实例之前打印。由于 new com.aliyun.dypnsapi20170525.Client(config) 可能会抛出异常并被 catch 块捕获,如果在实例化时发生异常,日志中仍会先输出“初始化成功”的信息,随后又输出错误日志,这会产生误导。建议在成功创建 Client 实例后再打印成功日志。

Suggested change
log.info("阿里云短信客户端初始化成功");
return new com.aliyun.dypnsapi20170525.Client(config);
com.aliyun.dypnsapi20170525.Client client = new com.aliyun.dypnsapi20170525.Client(config);
log.info("阿里云短信客户端初始化成功");
return client;

@zhoujiaxin0428
zhoujiaxin0428 deleted the 113 branch June 12, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant