敏感设置增加访问审计

This commit is contained in:
Christ committed 2026-08-15 19:13:59 +08:00
1 parent eff4143fd6
commit afb7e2f0d9
12 files changed
+348 -5

No files matched your search

+5
View File
@@ -306,3 +306,8 @@ func isSensitiveSettingKey(key string) bool {
func IsSensitiveSettingKey(key string) bool {
return isSensitiveSettingKey(key)
}
// SensitiveSettingKeys 返回全部敏感系统设置键名,调用方可用于访问审计且不包含秘密值。
func SensitiveSettingKeys() []string {
return []string{"ai_api_key", "smtp_password", "qq_reply_secret_key", "captcha.remote_secret_key"}
}