動作
Task #1316
進行中[Task] 從 git 版控移除私鑰與 service account 並加 .gitignore
開始日期:
2026-06-10
完成日期:
完成百分比:
0%
預估工時:
概述
問題¶
-
java/conf/local/rsapriv.der(RSA 私鑰)已 commit 進版控 -
java/conf/local/sylksoft_gmail_service_account.json(Gmail service account)已 commit - 對應的
.p12已有 .gitignore 但.der沒擋
影響¶
- RSA 私鑰若對應 JWT 簽章,洩漏可偽造 JWT token
- Gmail service account 可假冒
service@sylksoft.com寄信
建議修法¶
- 重新生成一對 RSA 金鑰(rotate JWT 簽章 key)
-
.gitignore加**/*.der、**/sylksoft_*_service_account.json - 把檔案從 working tree 刪除:
git rm --cached java/conf/local/rsapriv.der java/conf/local/sylksoft_gmail_service_account.json - 用 BFG 或
git filter-repo從 history 抹除(force push — 評估是否值得) - 金鑰改用 mount / docker secret 注入
範圍¶
-
java/conf/local/rsapriv.der,java/conf/local/sylksoft_gmail_service_account.json -
.gitignore修正(見根目錄 .gitignore)
沒有任何資料可供顯示
動作