feat: wiki 機敏防護三層(.wikiignore + 行內標記 + secret-scan hook)
不想被編入 wiki 的內容(密碼/金鑰/個資)三層防線: - L1 .wikiignore:整個機敏檔不編入(glob,像 .gitignore) - L2 行內標記 <!-- wiki:ignore -->:檔案內某段不編入 - L3 wiki-secret-scan.sh hook:機敏值真寫進 .claude/wiki/ → exit 2 擋 L3 偵測密碼賦值/PEM 私鑰/AWS·GitHub·Slack·Google·Stripe 金鑰/JWT/ 連線字串帳密/台灣身分證/信用卡號;wiki-secret-ok 行尾標記可豁免誤判。 wiki-init/wiki-capture/SKILL 寫入 L1+L2 協議。 誠實限制:L1/L2 靠 CC 自律、L3 靠 regex(有偽陽/偽陰),減少意外外洩 非保險箱——真正的密鑰本就不該進版控。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
{
|
||||
"type": "command",
|
||||
"command": ".claude/hooks/pre-write-guard.sh"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": ".claude/hooks/wiki-secret-scan.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user