개인 서버 CLI에 Claude Code + Discord - #4 다중 권한 설정 + @멘션으로 봇 호출
·
Dev
목표다중 인스턴스/버전 지원 - 프로젝트 디렉토리, 권한 (Multi-user 환경 고려)봇 호출 방식을 멘션으로 변경 (Multi-user 환경 고려)봇끼리 메모리를 공유 방지 (보안)가정: User가 아닌 세션 단위로 대화 공유코드코드 링크: https://github.com/ybjeon/claude-discord-bot버전: tag/v1.0.3권한 설정뷰어 권한: A,B관리자 권한: A,B,C 이렇게 설정하고 싶으면 instances/project_name/ㄴ .envㄴ session.jsonㄴ settings.json /.claude/settings.json에 권한: A,B,C Allow/.claude/settings.json에 권한: A,B,C Allowinstances/project_name..
Security Implementation in Enterprise Agent Platform
·
AI Agent Security
Enterprise Agent Platform의 Security Implementation1. Goal엔터프라이즈 생성형 AI 플랫폼을 security implementation 관점에서 비교한다.핵심 질문은 다음과 같다.이 플랫폼에서 Agent는 누구의 권한으로 동작하고, 어떤 Tools 또는 MCP를 호출하며, 그 동작은 어떻게 통제되고 감사되는가?Main PointsUser / Agent IdentityPermission DelegationAgent별 Least PrivilegeTool / MCP ControlGuardrailsContent FilteringPrompt Injection DefenseDLP / Sensitive Data DetectionNetwork IsolationAudit / L..
Microsoft Multi-Agent Reference Architecture
·
AI Agent Security
Source: microsoft/multi-agent-reference-architecture Microsoft Multi-Agent Reference Architecture는 robust한 멀티 에이전트 시스템을 설계하기 위한 개념적 가이드다.Microsoft 고객과 함께 구축한 production-scale solution에서 얻은 내용을 바탕으로 한다.특정 기술에 종속되지 않지만, 개별 에이전트 개발보다는 orchestration과 governance에 초점을 둔다.Design PrinciplesSeparation of Concerns각 에이전트는 명확하게 정의된 고유 책임을 가진다. 이를 통해 집중적인 개발과 깊은 도메인 전문성을 확보할 수 있다.Secure by Design인증, 권한 부여, 정..
Agentic Network: Gateway 디자인 패턴
·
AI Agent Security
원본 링크:https://github.com/ybjeon/research-note/blob/main/ai-agent-security/agentic-network.mdGateway Design PatternAgent끼리 통신을 하는 Agentic Network를 만든다고 했을 때, access control이나 auditing을 하기 위해서는 gateway가 필요하다. 겉으로는 Agent들이 서로 직접 대화하는 것처럼 보여도, 실제 구현에서는 중앙 Gateway나 Orchestrator가 메시지를 관리하는 경우가 많다. Agent 간 통신을 중간에서 처리하거나, 연결만 도와주거나, 암호화된 메시지만 전달하는 역할을 할 수도 있다. Gateway가 어디까지 개입하느냐에 따라 네트워크 구조와 보안 모델이 달라..
개인 서버 CLI에 Claude Code + Discord - #3 채널마다 프로젝트 연결 + write 테스트
·
Dev
목표Claude code 연결Write 테스트코드코드 링크: https://github.com/ybjeon/claude-discord-bot버전: tag/v1.0.2 Write 테스트Claude에 Write를 시켜봤다.다른 방법으로 Tool 권한을 allow 해줘야한다. 1. 자주 쓰는 도구를 미리 allowlist에 넣기1) Claude code 이용 (추천 안함, 귀찮음)Claude Code UI 또는 CLI에서:/permissions 로 들어가서 자주 필요한 도구를 Allow로 바꾸면 된다.ex) Read, Edit, 특정 Bash 명령 등Allow rule은 해당 도구를 수동 승인 없이 쓰게 하고, Ask rule은 매번 확인을 요구 (Chatting으로는 불가능)프로젝트 또는 사용자 설정에 a..
개인 서버 CLI에 Claude Code + Discord - #2 Session 추가
·
Dev
목표귀찮은 prefix 삭제: ex) !claude show me the last commitChatting history + multi-channel을 위한Session 추가Chatting history 추가코드코드 링크: https://github.com/ybjeon/claude-discord-bot버전: tag/v1.0.1 Claude code에는 session 개념이 있다. 이를 이용하면 앞에서 한 얘기를 연속해서 기억할 수 있고, 다른 채널에서 병렬적으로 Session이 holding 되어 편리하다. index.jsclaude 명령어 session flag이용function runClaude(prompt, sessionEntry) { return new Promise((resolve, re..
LLM AI Agent Security toy project - #1 Indirect Prompt Injection
·
AI Agent Security
목표IPI (Indirect Prompt Injection)을 시뮬레이션하여 Tool call에 의해 LLM이 의도하지 않은 행동을 하는 시나리오를 시뮬레이션코드코드 링크: https://github.com/ybjeon/ai-agent-security-toyproject/blob/main/test_planner_ipi.py시나리오: 현재 Agent 모델은 Planner-ExecutorUser > Agent: Read my last text message and read it.Agent: Tool-call 안읽은 메시지 읽기 (악성 문자)Agent > User: Do itAgent: (Tool-call) 악성 행동 실행$ python test_planner_ipi.pyPROMPT_INJECTION_STRI..
Threat modeling (위협 모델링)
·
Security
Thraet modeling: 시스템의 보안 위협을 식별하고, 우선순위를 정하며, 적절한 대응책을 수립하기 위한 체계적인 프로세스.매번 필요할 때 마다 다시 공부하는데 공부할 때 마다 이해하는게 달라 이번 기회에 제대로 다시 정리해본다.혹시 틀린 부분이 있다면 언제든 댓글 환영시작하기 전에헷갈리는 용어 - Threat vs Vulnerability: 취약점(Vulnerability) 은 시스템에 존재하는 약점이다. 예를 들어 패치되지 않은 소프트웨어, 입력값 검증 누락 등이 있다. 위협(Threat) 은 그 약점을 악용하여 피해를 일으킬 수 있는 잠재적 행위나 사건이다. 예를 들어 공격자가 SQL Injection을 수행하는 경우가 있다. 간단히 말하면, 취약점은 결함이고 위협은 그 결함을 악용하는 것이..
LLM 출력에서 자주 보이는 <think> 태그
·
LLM AI Agent
LLM을 직접 다루다 보면 종종 이런 형태의 출력을 보게 된다.문제를 단계별로 분석해보면...먼저 사용자의 의도를 파악하고...그다음 답변 구조를 정하면...최종 답변은 다음과 같습니다. 처음 보면 가 뭔가 특별한 시스템 명령어처럼 보인다.하지만 실제로는 공식 표준 태그라기보다는, 모델의 추론 과정을 구분하기 위해 쓰는 관습적인 마커에 가깝다. ex) Qwen3 계열은 크게 Thinking mode와 Non-thinking mode를 지원한다. Thinking mode에서는 모델이 답변 전에 추론을 수행하고, 일부 모델·설정에서는 그 추론 내용이 ... 블록으로 출력됨. Non-thinking mode에서는 보통 바로 답만 내며 블록을 만들지 않는다.1. 태그?는 보통 LLM의 추론 과정, 즉 r..
LLM AI Agent toy project - #2 Tool call
·
LLM AI Agent
목표LLM이 필요한 도구를 직접 골라 실행할 수 있게끔 Agent 설계 코드코드 링크: https://github.com/ybjeon/ai-agent-toyproject/blob/main/test_toolcall.py 1) test_toolcall.py - get_today_schedule() Tool call 정의 from langchain_core.tools import tool@tooldef get_today_schedule() -> dict: """Retrieve today's calendar schedule.""" today = TODAY # str(date.today()) events = FAKE_CALENDAR.get(today, []) return { "d..