Files
kimandClaude Opus 5 89cc0a51d7 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>
2026-08-09 10:46:59 +09:00

180 lines
5.3 KiB
Plaintext

# ============================================================
# LocalClaw - .gitignore
# ============================================================
# --- DOCKER / ENV ---
.env
# --- SECRETS & CONFIG (NEVER COMMIT) ---
.localclaw/config.json
.localclaw/credentials/
.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
# --- SQLITE JOURNAL / BACKUP ---
.smallclaw/databases/*.db-shm
.smallclaw/databases/*.db-wal
.smallclaw/databases/*.db.bak.*
.smallclaw/databases/nohup.out
# Derived FTS mirror of Chroma vector-memory data (rag-hybrid-search upgrade) — fully
# regenerable via scripts/backfill-fts.ts, not source-of-truth data.
.smallclaw/databases/rag_fts.db
# --- PYTHON CACHE ---
scripts/__pycache__/
**/__pycache__/
# --- MISC ARTIFACTS ---
eng.traineddata
# --- LARGE BINARIES / INSTALLERS / MEDIA (keep out of git) ---
*.deb
web-ui/*.sf2
chatbot*.png
# --- DENTAL DICT PROJECT (.smallclaw/databases/) ---
.smallclaw/databases/dental_images/
.smallclaw/databases/__pycache__/
.smallclaw/databases/scratch/*
!.smallclaw/databases/scratch/README.md
# --- RUNTIME DATA ---
.localclaw/sessions/
.localclaw/logs/
.localclaw/memory/
.localclaw/facts.json
.localclaw/self_learning.json
.localclaw/jobs.db
.localclaw/update_state.json
.localclaw/tasks/
.localclaw/jobs/
.localclaw/ocr-cache/
.localclaw/heartbeat/
.localclaw/task-heartbeat.json
.localclaw/cron/runs/
.smallclaw/sessions/
.smallclaw/logs/
.smallclaw/memory/
.smallclaw/facts.json
.smallclaw/self_learning.json
.smallclaw/jobs.db
.smallclaw/update_state.json
.smallclaw/tasks/
.smallclaw/jobs/
.smallclaw/ocr-cache/
.smallclaw/heartbeat/runs/
.smallclaw/task-heartbeat.json
.smallclaw/cron/runs/
# .smallclaw/skills/
.smallclaw/workspace_state.json
.smallclaw/.migrated-from-localclaw
# --- PER-USER RUNTIME DATA ---
# Sessions, workspace runtime files, uploads are all user-specific runtime data.
# Keep: prompts/AGENTS.md, prompts/TOOLS.md, workspace/SOUL.md etc. (static templates)
.smallclaw/users/*/sessions/
.smallclaw/users/*/workspace/memory/
.smallclaw/users/*/workspace/uploads/
.smallclaw/users/*/workspace/attachments/
.smallclaw/users/*/workspace/pubmed/
.smallclaw/users/*/workspace/tool_audit.log
.smallclaw/users/*/workspace/HEARTBEAT.md
.smallclaw/users/*/workspace/note.txt
.smallclaw/users/*/workspace/*.html
.smallclaw/users/*/workspace/*.js
.smallclaw/users/*/workspace/*.css
.smallclaw/users/*/workspace/*.py
.smallclaw/users/*/workspace/*.sh
.smallclaw/users/*/workspace/*.bat
.smallclaw/users/*/workspace/*.txt
# --- PER-USER WORKSPACE: BLANKET IGNORE (2026-07-29) ---
# The per-user patterns above only covered memory/uploads/attachments and a handful of
# file extensions, which left every app-generated content directory exposed — detective/
# (case evidence: 고소장, 통화녹취 m4a, 정신과 소견서, 가족관계증명서), generated-media/,
# music/, pptx/, satellite-images/, writer/, code/ and more. That is private user data
# (403MB of it) that must never reach the remote, so ignore the whole subtree instead of
# chasing each new app's output folder. Files already tracked here (prompts/*.md and other
# shipped templates) are unaffected — gitignore does not untrack them, and their edits
# still show up in git status. Use `git add -f` to track a genuinely new template.
.smallclaw/users/*/workspace/
# --- GATEWAY RUNTIME STATE / SECRETS (2026-07-29) ---
# active-sessions.json maps live bearer tokens -> {username, role:"admin"}; committing it
# would publish working admin credentials for the gateway. The rest is per-machine runtime
# state or a stale pre-vault config backup — none of it belongs in the repo.
.smallclaw/active-sessions.json
.smallclaw/google-usage.json
.smallclaw/config.json.bak-*
.smallclaw/workspace/memory/
.smallclaw/workspace/weather-maps/
.smallclaw/workspace/task_result_*.txt
.smallclaw/voice/
# --- ROOT WORKSPACE RUNTIME FILES ---
# Keep: SOUL.md, SELF.md, IDENTITY.md, USER.md, MEMORY.md, AGENTS.md, TOOLS.md, BOOT.md, README.md
# These are default templates that ship with SmallClaw — new users need them.
workspace/memory/
workspace/tool_audit.log
workspace/HEARTBEAT.md
workspace/note.txt
workspace/*.html
workspace/*.js
workspace/*.css
workspace/*.py
workspace/*.sh
workspace/*.bat
workspace/*.txt
# --- DASHBOARD RUNTIME STATE ---
ai-dashboard/dashboard-state.json
ai-dashboard/dashboard-requests.json
# --- LOGS ---
gateway.log
gateway.err.log
*.log
# --- TEMP FILES ---
tmp_payload.json
mnt/
.tmp_*
.tmp_*/
.tmp_openclaw_*/
.tmp_codex_*
# --- VECTOR MEMORY (Chroma venv + data, large binary) ---
.chroma/
# --- NODE ---
node_modules/
dist/
*.js.map
package/
*.tgz
# --- TEST ARTIFACTS ---
tests/.golden-progress.log
# --- OS ---
.DS_Store
Thumbs.db
desktop.ini
# Valetudo 로봇청소기 (2호기 설치용 보관)
valetudo-helper-miioota
voicepack_ko/