# secret/ — 本機 / 現場敏感資料 這個資料夾集中放**不能進 git** 的東西:DUT console 帳密、per-unit 的 PCIe BDF 覆寫、 COM port 設定、客戶提供但未公開的附件。 ## Committed vs Ignored `.gitignore` 規則是 `secret/*` 搭配 `!secret/README.md` / `!secret/*.example` / `!secret/.gitkeep`。 | 檔案 | 狀態 | 說明 | |------|------|------| | `README.md` | ✅ committed | 本說明 | | `config_secret.ttl.example` | ✅ committed | 帳密範本,敏感欄位一律 `__CHANGE_ME__` | | `config_secret.ttl` | 🚫 ignored | **實際** DUT 帳密,由 `config.ttl` include | | `dut_bdf.ttl` / `*.local.*` | 🚫 ignored | per-unit 的 PCIe BDF / COM port 覆寫 | | `*.pem` / `*.key` / `*.env` | 🚫 ignored | 憑證、金鑰 | | 客戶未公開附件 | 🚫 ignored | schematic、內部 spec 草稿等 | ## 第一次使用 ```bash cp secret/config_secret.ttl.example secret/config_secret.ttl # 編輯 secret/config_secret.ttl,把 __CHANGE_ME__ 換成實際帳密 ``` Tera Term 端把整包 `src/Script_ABC_Blanton/` 複製到工作目錄時,**一併把 `secret/config_secret.ttl` 放到 `src/Script_ABC_Blanton/` 同層**(`config.ttl` 以相對路徑 include)。 現場機器上的那份不要再複製回 repo。 ## 鐵則 - 🔒 **commit 前先 grep 一次**:`git grep -nE 'password|passwd|PaSsWoRd' -- . ':!secret'` 應該只找得到變數名與 placeholder,不該出現真值。 - 🔒 `.example` 檔內敏感欄位一律寫 `__CHANGE_ME__`,不留 `your_password` 這種半吊子 placeholder。 - 🔒 本 repo 含客戶 NDA 資料,**只推 `nas` + `gitea`,絕不推 GitHub**。