사용자 데이터를 보호하는 AI Agent 실행 환경 GAAP
An AI Agent Execution Environment to Safeguard User Data
TL;DR Highlight
Prompt injection이나 악성 AI 모델도 못 막던 개인정보 유출을, IFC(정보 흐름 제어) 기반으로 100% 차단하는 AI Agent 실행 환경
Who Should Read
AI Agent에 사용자 개인정보(결제정보, 이메일 자격증명 등)를 다루게 하면서 보안이 걱정되는 백엔드/플랫폼 개발자. MCP 기반 툴 호출 에이전트를 프로덕션에 올리려는 팀.
Core Mechanics
- GAAP은 AI Agent가 외부 서비스에 사용자 데이터를 넘길 때, LLM을 믿지 않고 코드 실행 레벨에서 IFC(Information Flow Control, 정보 흐름 추적)로 차단한다.
- LLM이 직접 툴을 호출하는 대신 코드 아티팩트(Python 스크립트)를 생성하게 만들고, GAAP이 그 코드의 데이터 흐름을 정적 분석해 허가되지 않은 정보 노출을 막는다.
- 사용자 개인정보는 Private Data DB에, 공유 허가 여부는 Permission DB에 따로 저장해서 LLM 컨텍스트에 절대 포함되지 않는다. 즉, 모델 제공자(OpenAI, Anthropic 등)도 못 본다.
- Disclosure Log가 과거에 외부 서비스에 넘긴 데이터를 기억해, 나중에 그 서비스에서 돌아오는 응답이 이전에 공유한 민감 데이터를 담고 있어도 추적하고 제어한다.
- MCP 서버별로 Annotation을 달아 '이 API는 비밀번호를 절대 응답에 포함하지 않는다' 같은 의미론적 정보를 추가하면 불필요한 과잉 taint를 줄이고 사용자에게 더 정확한 권한 요청을 할 수 있다.
- 멀티샷 실행(multi-shot)을 지원해, 중간 결과를 LLM에 다시 넘겨 코드를 이어 생성하는 복잡한 태스크도 처리하면서도 각 단계의 데이터 노출을 추적한다.
Evidence
- GAAP은 SSN-leak, Phone-leak, SSN-swap 3가지 prompt injection 공격 모두에서 성공률 0%를 기록했다. 반면 NP-Agent(보호 없음)는 SSN-leak 75%, Phone-leak·SSN-swap은 100% 공격 성공.
- LLM-Judge(LLM 기반 가드레일)는 SSN-leak 15% 공격 허용, Phone-leak·SSN-swap 일부 허용. Conseca(정책 기반)도 SSN-swap 공격을 막지 못했다.
- 태스크 완료율(Utility)은 GAAP 76.0%로, 보호 없는 NP-Agent 81.0%와 근소한 차이. LLM-Judge 75.0%, Conseca 72.0%보다 오히려 높거나 동등하다.
- 평균 레이턴시는 NP-Agent 대비 13%만 증가. 비용은 GAAP $0.52 vs NP-Agent $0.67로 GAAP이 오히려 더 저렴했다(GPT-5 기준, 코드 아티팩트 방식이 반복 컨텍스트 전달을 줄이기 때문).
How to Apply
- MCP 기반 AI Agent를 운영 중이고 사용자 개인정보(이메일, 결제정보 등)를 다룬다면, GAAP의 Private Data DB 패턴을 도입해 LLM 프롬프트에 실제 값 대신 키 이름만 전달하고 런타임에 값을 조회하도록 아키텍처를 바꾸면 된다.
- 외부 서비스(예: 항공사 API, 결제 API)에 데이터를 보내는 툴 호출이 있다면, GAAP의 Permission DB 패턴처럼 '어떤 데이터를 어떤 외부 파티에 보내도 되는가'를 (data_type, external_party) 쌍으로 관리하는 허가 레이어를 추가해 최초 1회만 사용자에게 확인하고 이후엔 자동 처리하면 된다.
- Disclosure Log 개념은 외부 서비스에 한 번 올린 데이터가 나중에 그 서비스 응답으로 돌아올 수 있다는 점을 추적하는 것이다. 예를 들어 여행 예약 API에 여권번호를 전송했다면 이후 그 API의 모든 응답을 여권번호 taint로 처리하는 로직을 에이전트 미들웨어에 추가하면 간접 유출을 막을 수 있다.
Code Example
# GAAP 방식의 Private Data DB 패턴 예시
# 사용자 데이터는 절대 LLM 프롬프트에 직접 포함하지 않는다
# ❌ 잘못된 방법: 개인정보를 프롬프트에 직접 포함
prompt = "생년월일이 1990-01-01인 사용자의 항공편 체크인을 완료해줘"
# ✅ GAAP 방식: 키 이름만 프롬프트에, 값은 런타임에 DB에서 조회
prompt = "사용자의 date_of_birth를 사용해서 항공편 체크인을 완료해줘"
# 에이전트가 생성한 코드 아티팩트 (LLM 출력)
code_artifact = """
dob = priv_data_db.access_date_of_birth() # DB에서 실제 값 조회
rewards_num = priv_data_db.access_airline_rewards_number()
airline_mcp = mcp_helper.connect("airline")
# GAAP이 이 호출을 인터셉트해서 dob, rewards_num 노출 여부 확인
# 허가된 경우에만 실행, 아니면 사용자에게 권한 요청
checkin_result = airline_mcp.process_query(
"complete_checkin",
args={"dob": dob, "rewards_number": rewards_num}
)
"""
# Permission DB 구조 예시
permissions = [
# (data_type, external_party, allow)
("date_of_birth", "airline.com", True),
("ssn", "food_order_app.com", False),
("email_password", "*", False), # 어디에도 비밀번호는 공유 안 함
]
# Disclosure Log 구조 예시
disclosure_log = [
{
"data_item": "passport_number",
"external_entity": "airline.com",
"timestamp": "2024-01-15T10:30:00",
"tool_call": "complete_checkin"
}
]
# 이후 airline.com 응답은 자동으로 passport_number taint 적용Terminology
Related Resources
Original Abstract (Expand)
AI agents promise to serve as general-purpose personal assistants for their users, which requires them to have access to private user data (e.g., personal and financial information). This poses a serious risk to security and privacy. Adversaries may attack the AI model (e.g., via prompt injection) to exfiltrate user data. Furthermore, sharing private data with an AI agent requires users to trust a potentially unscrupulous or compromised AI model provider with their private data. This paper presents GAAP (Guaranteed Accounting for Agent Privacy), an execution environment for AI agents that guarantees confidentiality for private user data. Through dynamic and directed user prompts, GAAP collects permission specifications from users describing how their private data may be shared, and GAAP enforces that the agent's disclosures of private user data, including disclosures to the AI model and its provider, comply with these specifications. Crucially, GAAP provides this guarantee deterministically, without trusting the agent with private user data, and without requiring any AI model or the user prompt to be free of attacks. GAAP enforces the user's permission specification by tracking how the AI agent accesses and uses private user data. It augments Information Flow Control with novel persistent data stores and annotations that enable it to track the flow of private information both across execution steps within a single task, and also over multiple tasks separated in time. Our evaluation confirms that GAAP blocks all data disclosure attacks, including those that make other state-of-the-art systems disclose private user data to untrusted parties, without a significant impact on agent utility.