新增: 信任所有目录扩展至敏感目录放行

开关语义升级为完全放行,含 .ssh/.aws 等黑名单目录(产品拍板体验优先,用户知情选择)
validate_path 与 is_authorized 双拦截点经进程级标志同源放行,audit 层每轮工具执行前刷新
设置页开启时二次确认,正文明示敏感凭据可进对话上下文风险自担;对话区常驻放行横幅既有
测试以串行闸防并行互踩进程级标志
This commit is contained in:
lxy
2026-10-01 02:40:49 +08:00
parent 63779e8d69
commit 3e239a108f
8 changed files with 204 additions and 25 deletions
+3 -1
View File
@@ -199,7 +199,9 @@ export default {
allowedDirsRemoveFail: 'Failed to remove authorized directory',
// "Trust all directories" master switch (Settings - Security - AI Tool Allowed Dirs panel)
labelPathAuthBypass: 'Trust all directories',
descPathAuthBypass: 'When enabled, AI can directly access any unprotected directory without per-access prompts; protected (blacklisted) directories such as credential folders are still denied.',
descPathAuthBypass: 'When enabled, AI can directly access any directory, including sensitive system and credential folders, without per-access prompts. Only enable in trusted environments; exposing sensitive directories risks credential leakage.',
pathAuthBypassConfirmTitle: 'Enable "Trust all directories"?',
pathAuthBypassConfirmBody: 'Once enabled, AI tools will no longer ask for per-access authorization and can directly reach any path, including sensitive directories such as .ssh and .aws. Sensitive credentials may end up in the conversation context; proceed at your own risk. Are you sure you want to enable it?',
// ===== ScriptNode command execution safety =====
panelScriptSafety: '🛡️ Command Execution Safety',
+3 -1
View File
@@ -198,7 +198,9 @@ export default {
allowedDirsRemoveFail: '删除授权目录失败',
// 「信任所有目录」总开关(设置-安全-AI 工具授权目录面板)
labelPathAuthBypass: '信任所有目录',
descPathAuthBypass: '开启后 AI 可直接访问任意非受保护目录,不再逐次询问;凭据等受保护目录(黑名单)仍被拒绝。',
descPathAuthBypass: '开启后 AI 可直接访问任意目录(含系统与凭据等敏感目录),不再逐次询问。仅建议在受信任环境开启,放开敏感目录有凭据泄露风险。',
pathAuthBypassConfirmTitle: '开启「信任所有目录」?',
pathAuthBypassConfirmBody: '开启后 AI 工具将无需逐次授权,直接访问包括 .ssh、.aws 等敏感目录在内的任意路径,敏感凭据可能进入对话上下文,风险自担。确定开启?',
// ===== ScriptNode 命令执行安全 =====
panelScriptSafety: '🛡️ 命令执行安全',