From 89cc0a51d7dca95a41df5c6090979f3610cd4130 Mon Sep 17 00:00:00 2001 From: kim Date: Sun, 9 Aug 2026 10:46:59 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AC=EC=9A=A9=EC=9E=90=EB=B3=84=20v?= =?UTF-8?q?ault.key/vault.enc=EB=A5=BC=20git=20=EC=B6=94=EC=A0=81=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 세 계정(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 --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 2a99b57..14fa6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -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