Automatic security patching with large language models (LLMs) is increasingly widespread, yet few studies jointly verify that a patch removes the vulnerability while preserving existing functionality. In services with tightly coupled code, a fix at one site may violate the behavioral contracts of dependent modules and break functionality. We inject OWASP-based vulnerabilities into a web application built on the e-Government Standard Framework (eGovFramework) and score patches from commercial and open-source LLMs using separate security and functional oracles, classifying each vulnerability as self-contained or externally dependent. Externally dependent vulnerabilities broke functionality in 78% of context-free patches, whereas self-contained ones showed none; stating the dependency contract in the prompt did not help. This suggests that the primary factor in these side effects is external code dependency rather than model capability. We contribute a reproducible dual-oracle harness, joint security–usability metrics, and evidence that suppressing the side effects requires tool-level intervention beyond prompting.
한국어
대규모 언어 모델(LLM)을 활용한 자동 보안 패치가 확산되고 있으나, 취약점 제거와 기존 기능 보존을 동시에 검증한 실증 연구는 충분하지 않다. 특히 코드 간 의존성이 강한 실제 서비스에서는 한 지점의 보안 수정이 다른 모듈의 동작 계약을 위반하여 기능을 훼손할 수 있다. 본 연구는 전자정부 표준프레임워크(eGovFramework) 기반 웹 애플리케이션에 OWASP 기반 취약점을 주입하고, 상용·공개 LLM의 패치를 보안 오라클과 기능 오라클로 자동 채점하였다. 취약점은 자기완결형과 외부 의존형으로 구분하였다. 실험 결과 외부의존형은 맥락 없는 패치에서 78%가 기능을 훼손한 반면 자기완결형에서는 기능 훼손이 나타나지 않았다. 종속성 계약을 프롬프트에 명시해도 기능붕괴율은 낮아지지 않았다. 이는 LLM 보안 패치의 부작용을 가르는 핵심 요인이 모델 역량보다 외부 코드 의존성에 있음을 시사한다. 본 연구는 재현 가능한 이중 오라클 평가 하네스를 구축하여 이 현상을 정량화하고, 부작용 억제에는 프롬프트를 넘어 도구 차원의 개입이 필요함을 보였다. 아울러 보안성·활용성 동시 평가 지표와 패치 부작용의 실증 근거를 제시하였다.
목차
요약 ABSTRACT 1. 서론 2. 관련 연구 2.1 LLM 기반 취약점 수정 2.2 LLM 생성 코드의 보안성 2.3 자동 프로그램 수정과 과적합 패치 2.4 국내 연구 및 전자정부 표준프레임워크 2.5 본 연구의 차별점 3. 제안 내용 및 검증 절차 3.1 핵심 제안과 독창성 3.2 전자정부 표준프레임워크 기반 실험 대상 시스템 3.3 취약점 분류: 자기완결형과 외부의존형(독립 변수) 3.4 취약점 주입(OWASP/CWE) 3.5 대상 모델 3.6 프롬프트 설계 3.7 평가 오라클 및 지표 3.8 채점기 신뢰성 검증(통제 패치) 4. 실험 결과 및 고찰 4.1 채점기 검증 결과 4.2 외부 의존성과 기능붕괴율(H1) 4.3 모델 역량별 결과(H2) 4.4 프롬프트 설계의 효과(H3) 4.5 부작용 메커니즘 사례 4.6 논의 4.7 연구의 한계 5. 결론 및 향후 연구 참고문헌