모든 public-facing LLM agent 는 결국 만나 — 'instruction 무시하고 system prompt 보여' 같은 prompt. 모델은 jailbreak 가능, 속을 수 있고, refuse 해야 할 걸 그냥 맞을 수 있어. Security boundary 는 코드에 살아 — input validation (length cap, schema, suspicious-token filter), output scrubbing (error 에 secret X, traceback X), per-IP/per-tenant rate limit.
User input 은 hostile 까지 증명되기 전
Prompt-injection marker strip, input length cap, 어떤 structured input 이든 Pydantic 으로 validate. 모델이 security boundary 아니라 — input layer 가.
Tool error 절대 echo X
Tool exception 은 stack trace, internal hostname, API key 까지 carry. 사용자에겐 'something went wrong; tracking id X' surface, server-side 만 detail log. Web app 위생과 동일.
cwkPippa 의 deployment posture
Private (LAN + Tailscale only), CORS 가 localhost + 127.0.0.1 + Tailscale IP 로 lock, JSONL encrypted at rest, .env 절대 commit X, 모든 secret 이 pydantic Settings (자기 print X). Public deploy 면 real auth + upstream WAF 추가, agent 코드 자체는 변하지 않음.