From b22627a066d471a80070d0c96f16cdc86b0eb723 Mon Sep 17 00:00:00 2001 From: Jowe <123822645+Selei1983@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:26:28 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=AD=96=E7=95=A5=EF=BC=8C=E7=A7=BB=E9=99=A4SSH=E7=9B=B4?= =?UTF-8?q?=E8=BF=9E=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改为本地开发 → push到Gitea → 手动SSH拉取的安全部署流程 禁止Claude直接操作生产服务器 Co-Authored-By: Claude Sonnet 4.6 --- .claude/settings.local.json | 57 ++++++++++++++----------------------- 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 4fb503d..fb6fe42 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,49 +1,36 @@ { "permissions": { "allow": [ - "Bash(if [ -d \".git\" ])", - "Bash(then echo \"Git repository exists\")", - "Bash(else echo \"No git repository\")", - "Bash(fi)", - "Bash(python:*)", - "Bash(python3:*)", - "Bash(py test_db.py:*)", - "Bash(where:*)", - "Bash(/c/Users/linha/AppData/Local/Microsoft/WindowsApps/python test_db.py)", - "Bash(pip install:*)", - "Bash(pip uninstall:*)", - "Bash(tasklist:*)", - "Bash(findstr:*)", - "Bash(dir:*)", "Bash(git init:*)", "Bash(git add:*)", "Bash(git commit:*)", - "Bash(curl:*)", - "WebFetch(domain:zjpb.net)", - "Bash(del import_bookmarks.py test_bookmark_parse.py test_simple_parse.py result.txt)", + "Bash(git push:*)", + "Bash(git pull:*)", + "Bash(git checkout:*)", + "Bash(git status:*)", "Bash(git tag:*)", - "Bash(if [ -f .env ])", - "Bash(then echo \"exists\")", - "Bash(else echo \"not exists\")", - "Bash(timeout /t 3 /nobreak)", - "Bash(ping:*)", + "Bash(git config:*)", "Bash(git diff-tree:*)", "Bash(git format-patch:*)", - "WebFetch(domain:bocha-ai.feishu.cn)", + "Bash(git log:*)", + "Bash(git diff:*)", + "Bash(python:*)", + "Bash(python3:*)", + "Bash(pip install:*)", + "Bash(pip uninstall:*)", "Bash(ls:*)", - "Bash(git pull:*)", - "Bash(del nul)", - "Bash(git checkout:*)", - "Bash(git push:*)", - "Bash(netstat:*)", - "Bash(git config:*)", - "Bash(taskkill:*)", - "Bash(cmd /c:*)", - "Bash(powershell:*)", + "Bash(dir:*)", + "WebFetch(domain:zjpb.net)", + "WebFetch(domain:bocha-ai.feishu.cn)" + ], + "deny": [ "Bash(ssh:*)", - "Bash(start:*)", - "Bash(git status --porcelain=v1)", - "Bash(timeout 3 cmd:*)" + "Bash(scp:*)", + "Bash(sftp:*)", + "Bash(curl:*)", + "Bash(wget:*)", + "Bash(cmd /c:*)", + "Bash(powershell:*)" ] } }