보안 취약점이 발견됐을 때 가장 후회스러운 순간 중 하나는 "코드 리뷰 때 잡을 수 있었는데"라고 깨닫는 때다. 정적 분석 도구가 이 문제를 해결해준다고 알려져 있지만, 정작 실제 취약점을 얼마나 잡아내는지 측정한 연구는 드물었다.
ISSTA 2024에서 발표된 이 연구는 그 공백을 메웠다. 92개 C/C++오픈소스 프로젝트에서 수집한 319개의 실제 취약점과 815개의 취약점 기여 커밋을 데이터셋으로 사용해, SAST 도구가 보안 코드 리뷰에서 어떤 성능을 보이는지 정량적으로 평가했다. 합성 데이터나 인위적으로 주입한 취약점이 아닌, 실제 프로덕션에서 발생한 익스플로잇 가능한 취약점을 대상으로 했다는 점에서 신뢰도가 높다.
단일 SAST 도구는 VCC의 52%에서 취약 함수에 경고를 발생시켰다. 절반 이상의 케이스에서 어떤 형태로든 신호를 보낸다는 것은 무시할 수 없는 수치다. 더 나아가 SAST 경고가 있는 변경 함수를 우선 검토하면 정밀도가 12%,재현율이 5.6%향상됐다. 리뷰어가 무엇을 먼저 볼지 결정할 때 SAST 경고를 참고하면 효율이 의미 있게 올라간다.
초기 오탐 비율 지표도 눈에 띈다. IFA는 리뷰어가 첫 취약 함수를 발견하기까지 살펴봐야 하는 비취약 함수의 수를 뜻한다. SAST 경고 기반 우선순위 설정은 IFA를 13% 줄였다. 보안 리뷰에서 느끼는 "모래사장에서 바늘 찾기" 문제가 어느 정도 완화되는 셈이다.
그러나 한계도 명확하다. 취약 함수 내 경고 중 76%는 실제 VCC와 무관한 경고였고, 22%의 VCC는 SAST 규칙의 한계로 아예 탐지되지 않았다. 오탐이 많다는 것은 경고를 일일이 분류하는 데 또 다른 부담이 생긴다는 의미다. 새로운 취약점 클래스나 복잡한 비즈니스 로직 결함은 현재 SAST 규칙의 사각지대에 그대로 남아 있다.
이 연구의 핵심 메시지는 SAST를 "써야 한다/말아야 한다"의 이분법이 아니라, 어떻게 활용하느냐의 문제로 봐야 한다는 것이다. SAST 경고를 결론이 아닌 우선순위 신호로 사용할 때, 보안 리뷰의 효율이 실질적으로 높아진다.
실무적으로는 SAST 경고가 집중된 변경 함수부터 보안에 익숙한 리뷰어가 먼저 검토하도록 워크플로우를 설계하는 것이 효과적이다. 단, 경고가 없는 코드를 안전하다고 단정 짓는 것은 위험하다. SAST 규칙을 프로젝트 코드베이스에 맞게 주기적으로 튜닝해 오탐 비율을 낮추는 투자도 장기적으로 가치 있는 작업이다.
📖 *An Empirical Study of Static Analysis Tools for Secure Code Review* |
논문 원문
※ 이 기사는 학술 논문을 바탕으로 작성되었습니다. 기술 환경에 따라 다를 수 있으니 참고용으로 활용하세요.
Every security engineer has lived this nightmare: a critical CVE drops, the patch is two lines, and the vulnerability-contributing commit sailed through code review six months ago without anyone raising a flag. Static analysis tools promise to catch these before they ship — but how well do they actually work on real, in-the-wild code changes?
Researchers at ISSTA 2024 tackled this question with a dataset built from real vulnerabilities, not synthetic benchmarks. The study used 319 confirmed vulnerabilities from 815 vulnerability-contributing commits (VCCs) across 92 C and C++ open-source projects — commits that actually made it into production and resulted in exploitable security flaws. They evaluated C/C++ SAST tools against these commits, measuring not just raw detection rates but how much SAST assistance could improve a human reviewer's efficiency.
A single SAST tool generated warnings in the vulnerable functions of 52% of VCCs. That means in roughly half of all real-world security-contributing commits, a static analyzer was already raising its hand — often buried in noise, but there. When reviewers prioritized changed functions flagged by SAST warnings, precision improved by 12% and recall by 5.6% compared to unassisted review.
The efficiency gain shows up clearly in the Initial False Alarm (IFA) metric — the number of non-vulnerable functions a reviewer must inspect before encountering the first vulnerable one. SAST-assisted prioritization reduced IFA by 13%. In practice, that is the difference between a reviewer finding a critical function on their third or fourth check versus their eighth. In high-volume code review environments, that reduction compounds quickly.
The limitations, however, are equally significant. 76% of SAST warnings in vulnerable functions had no relevance to the actual vulnerability. Developers triaging SAST output will still spend the majority of their time chasing false positives. Worse, 22% of VCCs escaped detection entirely — not because reviewers missed them, but because no SAST rule existed to flag the underlying pattern. Novel vulnerability classes, complex logic flaws, and business-logic bugs remain largely invisible to current static analyzers.
The takeaway is not to abandon SASTs or to blindly trust them. The research makes a compelling case for using SAST warnings as a triage signal rather than a definitive verdict. When a SAST flags a changed function, treat it as "look here first" — not "this is the bug." And when nothing is flagged, do not assume clean.
For security-conscious engineering teams, the practical recommendation is to integrate SAST output into code review workflows as a ranking mechanism. Route SAST-flagged changes to security-aware reviewers first; apply SAST rules consistently across CI pipelines so warnings surface before review begins, not after. Tuning SAST configurations to reduce noise for your specific codebase is worth the upfront investment — teams that run default rules untuned will drown in irrelevant warnings and lose confidence in the tooling entirely.
📖 *An Empirical Study of Static Analysis Tools for Secure Code Review (Empirical Study, ISSTA 2024)* |
Source Paper
This article is based on academic research. Results may vary depending on your technical environment — use as a reference.