진행 중 · 2026년 3월 24일
DocVault
소규모 팀용 자체 호스팅 내부자 위협 이벤트 수집·조회 도구. osquery와 자체 클립보드 에이전트가 Go/PostgreSQL 서버로 들어오고, 변조 감지 감사 로그와 운영자 AI 어시스턴트를 붙였다.
Postgres-trigger audit chain · 17,783 LOC · 23 tables · 102 routes · 일회용 설치 토큰
- 역할
- Solo (Claude Code 페어 프로그래밍)
- 스택
- Go 1.26.1 · PostgreSQL 16 · chi · pgx · htmx · osquery · AES-256-GCM · Docker · Caddy

DocVault는 자체 호스팅 내부자 위협·엔드포인트 감사 플랫폼이다. osquery와 자체 Windows 클립보드 에이전트가 엔드포인트 활동을 Go 서버로 보내고, PostgreSQL이 DB 트리거 해시 체인 뒤에서 이벤트 스트림을 저장해 감사 로그 변조를 감지 가능하게 하며, htmx 기반 웹 UI가 감사·엔드포인트·알림·파일 vault·운영자 워크플로를 보여준다. Windows 에이전트는 일회용 설치 토큰으로 온보딩되고, 호스트-사용자 매핑과 하트비트 체크가 자동으로 붙는다.
서비스는 docvault.daeseon.ai에서 운영 중이고, 소스는 Daeseon-AI-Factory/docvault에 있다.
무엇을 하는가
- osquery와 자체 Windows 클립보드 에이전트로 엔드포인트 활동을 수집한다.
- 이벤트, 감사 추적, 사용자, vault 파일, 엔드포인트 상태, 알림, 에이전트 액션, 보안 브리핑을 PostgreSQL에 저장한다.
- DB trigger 기반 해시 체인으로 애플리케이션 레벨 감사 로그 변조를 감지할 수 있게 한다.
- 서버 렌더링 htmx UI를 제공하고, 한국어를 기본 제품 언어로 두며 EN/KO 토글을 붙였다.
- 인앱 설치 페이지와 원클릭 Windows 설치 스크립트 등 관리자 설치 플로우를 제공한다.
- 조회와 액션을 수행하는 운영자 AI 어시스턴트를 붙였고, 변경 액션은 기록 및 롤백 가능하게 만들었다.
왜
목표는 작은 팀을 위한 현실적인 가시성이지, 완성형 SIEM, DRM, 법적 증거 시스템, ML 기반 UEBA 제품이 아니다. 핵심 제품 표면은 더 좁다. 회사 엔드포인트 활동이 들어오는지 보고, 의심스러운 행동을 확인하고, 더 무거운 엔터프라이즈 도구를 쓰기 전 감사 가능한 흔적을 남기는 것이다.
짚을 만한 엔지니어링 포인트
- 변조 감지 감사 체인. 초기 구현에서 감사 무결성을 PostgreSQL trigger와 advisory lock 흐름으로 옮겨, 애플리케이션 버그가 체인을 조용히 우회하지 못하게 했다. (로그)
- 암호화 버그 수정. AES-CTR와 MAC 경계에서 생긴 streaming vault 버그를 chunked AES-256-GCM으로 바꿔, 암호화 파일 저장이 인증된 chunk 단위로 동작하게 했다. (로그)
- 배포 스택. 라이브 서비스는 NCP Seoul 박스에서 Caddy 뒤에 있고, rsync, Docker build, Compose recreate, health check 흐름으로 배포된다. (로그)
- 설치 워크플로. Windows 에이전트 설치를 수동 가이드에서 인앱 설치 페이지와 생성형 installer script 쪽으로 옮겨, 비개발자 온보딩 마찰을 줄였다. (로그)
- 운영자 AI agent. 관리 어시스턴트가 시스템 상태를 조회하고 보호된 관리자 액션을 수행할 수 있게 했으며, 첫 구현 이후 confirmation과 rollback 경로를 추가했다. (로그)
현재 한계
DocVault를 hardened public-internet security product로 포장하지 않는다. 현재 handoff 기준으로도 실제 데스크톱 clipboard capture, osquery end-to-end 검증, 공격자가 영향을 줄 수 있는 tool output 필드에 대한 prompt-injection hardening, recovery code 처리, off-host backup 검증, 첫 실제 고객 PC 설치는 더 많은 증거가 필요한 영역으로 남아 있다.
프로젝트 로그
이 프로젝트를 만들면서 남긴 트러블슈팅 · 회고 · 업데이트의 시간순 기록.
2026년 6월 15일 주9 개 · 3 업데이트 · 3 기술 회고 · 3 사용성 회고
A portfolio demo should show the whole product — make it read-only, not lower-privilege
기술 회고2026년 6월 21일 · 2 분
The demo had been made a non-admin for safety, which hid the AI assistant and admin screens — so it looked like a different, crippled product. Fixed by making the demo a full admin but enforcing read-only at the middleware and in the AI engine.
Making the AI assistant guide a non-technical admin (lightweight RAG, not a vector DB)
업데이트2026년 6월 20일 · 2 분
The operator found the UI hard and wanted the AI to guide them. Added a doc-grounded help_docs tool so the assistant answers how-to/install questions strictly from a curated usage guide — lightweight RAG, no vector DB needed at this scale.
Email alerts + a daily digest — so the admin learns about issues without logging in
업데이트2026년 6월 20일 · 2 분
Alerts were pull-only (dashboard) and the Slack notifier was unconfigured, so a non-technical admin who didn't log in never found out. Added SMTP email for high/critical alerts plus a daily Korean digest, with an on-demand send.
Adversarially reviewing the AI teammate's work — and hardening the demo login
기술 회고2026년 6월 19일 · 3 분
A second AI assistant (Codex) shipped 22 commits while I was away. I reviewed the diff adversarially, confirmed it was solid, then fixed two real holes — a passwordless-admin footgun in the demo login and a missing code-signing pipeline — and a deploy bug my own verification caught.
One in-app page for agent install (download + visual guide together)
사용성 회고2026년 6월 17일 · 1 분
The installer download and the install guide were scattered (download buried in Agent Status, guide a separate static page in a new tab). Consolidated into a single in-app /admin/install page reachable from the sidebar.
Honest retro: shipping the agent onboarding (what went wrong, both sides)
기술 회고2026년 6월 17일 · 5 분
Candid post-mortem of building the one-click Windows installer + guides + in-app install page: the assistant's mistakes, the environment dead-ends, the real-world gotchas, and the process friction. No sugarcoating.
Idiot-proof visual install guide (and why a one-click .bat still isn't enough)
사용성 회고2026년 6월 16일 · 2 분
Shipping a one-click installer wasn't enough for a non-technical user: SmartScreen hides its Run button and email blocks .bat files. Rewrote the install page into a visual, dialog-by-dialog guide and added transfer guidance for the admin.
Team management + an AI assistant that acts (with rollback)
업데이트2026년 6월 16일 · 2 분
Added host→employee assignment, CSV bulk user import, an AI security briefing, and a tool-use AI assistant that can both query live data and perform actions (create user, assign host, ack alert) — every action logged and one-click rollback-able.
One-click Windows agent installer for non-technical end users
사용성 회고2026년 6월 16일 · 2 분
A non-technical user installing the agent opened Docker by mistake and got stuck on the PSK placeholder. Replaced the copy-paste PowerShell install with an admin-only, secret-baked, self-elevating .bat they just double-click.
2026년 6월 8일 주3 개 · 2 트러블슈팅 · 1 기술 회고
Made the agents production-grade: osquery TLS protocol and reliable clipboard delivery
기술 회고2026년 6월 10일 · 3 분
To actually deploy DocVault for a remote user, I implemented the real osquery TLS wire protocol on the server (enroll_secret → node_key) so a stock osquery node can connect, and rewrote the clipboard agent around a bounded retry queue with periodic re-enrollment so events survive network outages. Plus a one-command Compose deploy and a full deployment guide.
Hardened DocVault access controls, agent auth, and CSV exports
트러블슈팅2026년 6월 9일 · 2 분
A full repository review found missing admin and folder authorization checks, fail-open agent PSK behavior, fragile CSV export generation, and incomplete audit coverage. Commits e0d498d, 6df4c71, and 9f81995 close those gaps and add regression tests.
Closed an API 2FA bypass and shipped a one-command production deploy
트러블슈팅2026년 6월 9일 · 3 분
After verifying a separate batch of access-control fixes, I closed the remaining auth gaps — an API-login 2FA bypass with no brute-force limit, example/weak secrets accepted at startup, and a hardcoded admin password — then added a Docker Compose + Caddy stack that auto-migrates and auto-issues TLS for both a dedicated server and an all-in-one install.
2026년 4월 6일 주2 개 · 2 업데이트
CI/CD, release automation, and one-command deploy scripts
업데이트2026년 4월 8일 · 1 분
Added GitHub Actions CI + a release workflow, plus deploy scripts for the server and the Windows agents — turning ad-hoc builds into a repeatable pipeline.
Hash-based file tracking — catch a sensitive file even after it's renamed
업데이트2026년 4월 8일 · 1 분
Register sensitive files by SHA-256; the server matches incoming endpoint file events against those hashes (cached in memory) and records detections — so a tracked file is caught even if it's renamed.
2026년 3월 30일 주4 개 · 4 업데이트
Two-factor authentication (TOTP) with recovery codes
업데이트2026년 4월 1일 · 1 분
Added TOTP-based 2FA implemented from the RFC primitives (HMAC-based one-time codes), a QR setup flow, a second login step, and recovery codes.
Behavior risk scoring (rule-based UEBA), with per-user baselines
업데이트2026년 4월 1일 · 1 분
Added a risk-scoring engine that compares each event against a per-user behavioral baseline (work hours, weekends, known IPs, …) and accumulates weighted anomaly scores. Threshold-rule based — deliberately not ML.
A macOS clipboard agent, and splitting the agent cross-platform
업데이트2026년 3월 31일 · 1 분
Added a macOS clipboard agent and refactored the single 397-line main into clean per-platform files (Windows/macOS) with a shared core and a launchd service.
Real-time dashboard updates with Server-Sent Events
업데이트2026년 3월 31일 · 1 분
Added a Server-Sent Events hub so the dashboard updates live as endpoint events arrive — no polling, no WebSocket complexity.
2026년 3월 23일 주2 개 · 2 기술 회고
Moved audit-log tamper detection from app code to PostgreSQL triggers
기술 회고2026년 3월 25일 · 1 분
Added a SHA-256 hash chain on audit_logs and endpoint_events via DB triggers, plus UPDATE/DELETE prevention. Chose DB-level enforcement so any insert path — including ad-hoc psql — is forced through the chain.
AI-scaffolded the full DocVault skeleton in a single 92-file commit
기술 회고2026년 3월 24일 · 1 분
Ran the 8-phase implementation plan from CLAUDE.md to a working end-to-end skeleton in one commit, with AI assistance. Surface coverage was wide but depth was thin — the interesting parts came later.