Files
system-dev-template/template/.claude/wiki/.wikiignore
T
Leo 29e3636bd2 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>
2026-06-20 12:45:28 +08:00

37 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# .wikiignore — 不想被編入 wiki 的內容(像 .gitignore
#
# 三層防護的 L1(檔案層)。CC 在 /wiki-init、/wiki-capture 掃描文件時,
# 命中這裡 pattern 的「整個檔案」不讀、不編入 wiki。
#
# 語法:一行一個 glob pattern,相對專案根目錄。# 開頭是註解。
#
# ── 同場另兩層 ──────────────────────────────────────
# L2 行內標記:檔案要編入,但某段不要 → 在該段前後包:
# <!-- wiki:ignore -->
# 這幾行不會被編入 wiki
# <!-- wiki:end -->
# L3 機械底線:萬一機敏值仍被寫進 .claude/wiki/wiki-secret-scan.sh 會 exit 2 擋下。
#
# 三層的分工:L1 整檔排除(你主動列)|L2 局部遮蔽(你標記)|L3 兜底攔截(自動掃)。
# ────────────────────────────────────────────────────
# ── 機敏檔案(預設就該排除)──────────────────────
.env
.env.*
*.pem
*.key
*.p12
*.pfx
*credentials*
*secret*
**/secrets/**
# ── 個資 / 客戶資料(依專案調整)────────────────
# customers/**
# *personal-data*
# ── 草稿 / 暫存(不值得進記憶)──────────────────
# **/draft/**
# *.tmp.md
# SCRATCH.md