Measuring the Effects of Stack Overflow Code Snippet Evolution on Open-Source Software Security
Alfusainey Jallow, Michael Schilling, Michael Backes, Sven Bugiel
摘要
This paper assesses the effects of Stack Overflow code snippet evolution on the security of open-source projects. Users on Stack Overflow actively revise posted code snippets, sometimes addressing bugs and vulnerabilities. Accordingly, developers that reuse code from Stack Overflow should treat it like any other evolving code dependency and be vigilant about updates. It is unclear whether developers are doing so, to what extent outdated code snippets from Stack Overflow are present in GitHub projects, and whether developers miss security-relevant updates to reused snippets.To shed light on those questions, we devised a method to 1) detect outdated code snippets versions from 1.5M Stack Overflow snippets in 11,479 popular GitHub projects and 2) detect security-relevant updates to those Stack Overflow code snippets not reflected in those GitHub projects. Our results show that developers did not update dependent code snippets when those evolved on Stack Overflow. We found that 2,405 code snippet versions reused in 2,109 GitHub projects were outdated, with 43 projects missing fixes to bugs and vulnerabilities on Stack Overflow. Those 43 projects containing outdated, insecure snippets were forked on average 1,085 times (max. 16,121), indicating that our results are likely a lower bound for affected code bases. An important insight from our work is that treating Stack Overflow code as purely static code impedes holistic solutions to the problem of copying insecure code from Stack Overflow. Instead, our results suggest that developers need tools that continuously monitor Stack Overflow for security warnings and code fixes for reused code snippets and not only warn during copy-pasting.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Keep me Updated: An Empirical Study of Third-Party Library Updatability on Android 引用了 Reliable Third-Party Library Detection in Android and its Security Applications
- Keep me Updated: An Empirical Study of Third-Party Library Updatability on Android 引用了 Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
- Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security 引用了 You Get Where You're Looking for: The Impact of Information Sources on Code Security
- Stack Overflow Meets Replication: Security Research Amid Evolving Code Snippets 引用了 Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
- Stack Overflow Meets Replication: Security Research Amid Evolving Code Snippets 引用了 You Get Where You're Looking for: The Impact of Information Sources on Code Security
- Mapping the Cloud: A Mixed-Methods Study of Cloud Security and Privacy Configuration Challenges 引用了 Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
- Mapping the Cloud: A Mixed-Methods Study of Cloud Security and Privacy Configuration Challenges 引用了 You Get Where You're Looking for: The Impact of Information Sources on Code Security
- Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web 引用了 Reliable Third-Party Library Detection in Android and its Security Applications
引用它的顶会 Paper2
- Mapping the Cloud: A Mixed-Methods Study of Cloud Security and Privacy Configuration ChallengesSumair Ijaz Hashmi, Shafay Kashif, Lea Gröber, Katharina Krombholz 等NDSS 2026 · 3 次引用
- Stack Overflow Meets Replication: Security Research Amid Evolving Code SnippetsAlfusainey Jallow, Sven BugielUSENIX Security 2025
它引用的 Paper7
- Reliable Third-Party Library Detection in Android and its Security ApplicationsMichael Backes, Sven Bugiel, Erik DerrCCS 2016 · 345 次引用
- You Get Where You're Looking for: The Impact of Information Sources on Code SecurityYasemin Acar, Michael Backes, Sascha Fahl, Doowon Kim 等S&P 2016 · 325 次引用
- Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application SecurityFelix Fischer, Konstantin Böttinger, Huang Xiao, Christian Stransky 等S&P 2017 · 293 次引用
- Keep me Updated: An Empirical Study of Third-Party Library Updatability on AndroidErik Derr, Sven Bugiel, Sascha Fahl, Yasemin Acar 等CCS 2017 · 196 次引用
- Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the WebTobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson 等NDSS 2017 · 183 次引用
相关 Paper
- Unveiling the Characteristics and Impact of Security Patch EvolutionZifan Xie, Ming Wen, Zichao Wei, Hai JinASE 2024 · 2 次引用
- The Effectiveness of Security Interventions on GitHubFelix Fischer, Jonas Höbenreich, Jens GrossklagsCCS 2023 · 4 次引用
- How Bad Can It Git? Characterizing Secret Leakage in Public GitHub RepositoriesMichael Meli, Matthew R. McNiece, Bradley ReavesNDSS 2019 · 130 次引用
- Centris: A Precise and Scalable Approach for Identifying Modified Open-Source Software ReuseSeunghoon Woo, Sunghan Park, Seulbae Kim, Heejo Lee 等ICSE 2021 · 2 次引用
- Code Cloning in Solidity Smart Contracts: Prevalence, Evolution, and Impact on DevelopmentRan Mo, Haopeng Song, Wei Ding, Chaochao WuICSE 2025 · 1 次引用
