fix: 사용자별 vault.key/vault.enc를 git 추적에서 제거

세 계정(papa/cherry/jasmine)의 vault.key와 vault.enc가 저장소에 함께 추적되고
있었다. vault.key는 vault.enc를 여는 마스터 키라 둘이 같은 저장소에 있으면
암호화가 무의미하다. 복호화해보니 담긴 값이 메인 vault와 해시까지 동일한
현재 사용 중인 자격증명이었다 — 이메일 비밀번호 3개와 Unsplash/Pexels 키.

원인은 .gitignore의 `.smallclaw/vault/`가 저장소 루트에 앵커된 패턴이라
한 단계 아래의 사용자별 vault를 못 잡은 것. 아래쪽 `.smallclaw/users/*/workspace/`
규칙이 지금은 이 경로를 덮지만 gitignore는 이미 추적 중인 파일에는 적용되지
않으므로, 그 규칙이 추가되기 전에 커밋된 이 파일들은 계속 남아 있었다.

- git rm --cached (디스크 파일은 유지 — 서비스가 그대로 읽는다)
- `**/vault/vault.key|vault.enc|vault-audit.log` 추가. 누구도 예상 못 한 경로에
  새 vault가 생겨도 막히도록 깊이에 무관하게 매칭한다.

메인 vault(API 키·NVR·텔레그램 등 40개)는 기존 규칙에 걸려 유출되지 않았다.

주의: 히스토리에는 그대로 남아 있다. 이 커밋은 앞으로의 추가를 막을 뿐이며,
저장소가 2026-05-05부터 96일간 공개 상태였으므로 노출된 값은 이미 유출된 것으로
간주하고 회전해야 한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kim
2026-08-09 10:46:59 +09:00
co-authored by Claude Opus 5
parent ce684a6cf3
commit 89cc0a51d7
+8
View File
@@ -11,6 +11,14 @@
.localclaw/vault/
.smallclaw/credentials/
.smallclaw/vault/
# The pattern above is anchored at the repo root, so per-user vaults one level down were never
# matched and every user's vault.key + vault.enc got committed — the master key sitting beside
# the file it decrypts. `.smallclaw/users/*/workspace/` (further down) covers that path today,
# but only for files not already tracked, which is exactly how these survived. Match a vault at
# any depth so a new one can never be added by a path nobody anticipated.
**/vault/vault.key
**/vault/vault.enc
**/vault/vault-audit.log
.smallclaw/*_api_key.txt
.smallclaw/*_api_token.txt
.smallclaw/*-key.txt