Lune

CCS2021Top-tier venue

The Effect of Google Search on Software Security: Unobtrusive Security Interventions via Content Re-ranking

Felix Fischer, Yannick Stachelscheid, Jens Grossklags

Abstract

Google Search is where most developers start their Web journey looking for code examples to reuse. It is highly likely that code that is linked to the top results will be among those candidates that find their way into production software. However, as a large amount of secure and insecure code has been identified on the Web, the question arises how the providing webpages are ranked by Google and whether the ranking has an effect on software security.

We investigate how secure and insecure cryptographic code examples from Stack Overflow are ranked by Google Search. Our results show that insecure code ends up in the top results and is clicked on more often. There is at least a 22.8% chance that one out of the top three Google Search results leads to insecure code.

We introduce security-based re-ranking, where the rank of Google Search is updated based on the security and relevance of the provided source code in the results. We tested our re-ranking approach and compared it to Google's original ranking in an online developer study. Participants that used our modified search engine to look for help online submitted more secure and functional results, with statistical significance. In contrast to prior work on helping developers to write secure code, security-based re-ranking completely eradicates the requirement for any action performed by developers. Our intervention remains completely invisible, and therefore the probability of adoption is greatly increased. We believe security-based re-ranking allows Internet-wide improvement of code security and prevents the far-reaching spread of insecure code found on the Web.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Using AI Assistants in Software Development: A Qualitative Study on Security Practices and Concerns cites Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
  • Using AI Assistants in Software Development: A Qualitative Study on Security Practices and Concerns cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • Using AI Assistants in Software Development: A Qualitative Study on Security Practices and Concerns cites "Make Them Change it Every Week!": A Qualitative Exploration of Online Developer Advice on Usable and Secure Authentication
  • "Get in Researchers; We're Measuring Reproducibility": A Reproducibility Study of Machine Learning Papers in Tier 1 Security Conferences cites Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
  • "Get in Researchers; We're Measuring Reproducibility": A Reproducibility Study of Machine Learning Papers in Tier 1 Security Conferences cites Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
  • Unhelpful Assumptions in Software Security Research cites Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
  • Unhelpful Assumptions in Software Security Research cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • Unhelpful Assumptions in Software Security Research cites Comparing the Usability of Cryptographic APIs
  • Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • "Make Them Change it Every Week!": A Qualitative Exploration of Online Developer Advice on Usable and Secure Authentication cites Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
  • "Make Them Change it Every Week!": A Qualitative Exploration of Online Developer Advice on Usable and Secure Authentication cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • Comparing the Usability of Cryptographic APIs cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • The Effectiveness of Security Interventions on GitHub cites Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application Security
  • The Effectiveness of Security Interventions on GitHub cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • The Effectiveness of Security Interventions on GitHub cites Comparing the Usability of Cryptographic APIs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. "Get in Researchers; We're Measuring Reproducibility": A Reproducibility Study of Machine Learning Papers in Tier 1 Security ConferencesDaniel Olszewski, Allison Lu, Carson Stillman, Kevin Warren et al.CCS 2023 · 19 citations
  2. Using AI Assistants in Software Development: A Qualitative Study on Security Practices and ConcernsJan H. Klemmer, Stefan Albert Horstmann, Nikhil Patnaik, Cordelia Ludden et al.CCS 2024 · 14 citations
  3. Unhelpful Assumptions in Software Security ResearchIta Ryan, Utz Roedig, Klaas-Jan StolCCS 2023 · 9 citations
  4. "Make Them Change it Every Week!": A Qualitative Exploration of Online Developer Advice on Usable and Secure AuthenticationJan H. Klemmer, Marco Gutfleisch, Christian Stransky, Yasemin Acar et al.CCS 2023 · 8 citations
  5. The Effectiveness of Security Interventions on GitHubFelix Fischer, Jonas Höbenreich, Jens GrossklagsCCS 2023 · 4 citations

Builds on8

  1. Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity DetectionXiaojun Xu, Chang Liu, Qian Feng, Heng Yin et al.CCS 2017 · 682 citations
  2. You Get Where You're Looking for: The Impact of Information Sources on Code SecurityYasemin Acar, Michael Backes, Sascha Fahl, Doowon Kim et al.S&P 2016 · 325 citations
  3. Stack Overflow Considered Harmful? The Impact of Copy&Paste on Android Application SecurityFelix Fischer, Konstantin Böttinger, Huang Xiao, Christian Stransky et al.S&P 2017 · 293 citations
  4. Comparing the Usability of Cryptographic APIsYasemin Acar, Michael Backes, Sascha Fahl, Simson L. Garfinkel et al.S&P 2017 · 261 citations
  5. I Think They're Trying to Tell Me Something: Advice Sources and Selection for Digital SecurityElissa M. Redmiles, Amelia R. Malone, Michelle L. MazurekS&P 2016 · 151 citations

Related papers

  1. Stack Overflow Considered Helpful! Deep Learning Security Nudges Towards Stronger CryptographyFelix Fischer, Huang Xiao, Ching-yu Kao, Yannick Stachelscheid et al.USENIX Security 2019 · 44 citations
  2. Measuring the Effects of Stack Overflow Code Snippet Evolution on Open-Source Software SecurityAlfusainey Jallow, Michael Schilling, Michael Backes, Sven BugielS&P 2024 · 6 citations
  3. Backdooring Neural Code SearchWeisong Sun, Yuchen Chen, Guanhong Tao, Chunrong Fang et al.ACL 2023 · 18 citations
  4. 10 Years Later: Revisiting How Developers Search for CodeKathryn T. Stolee, Tobias Welp, Caitlin Sadowski, Sebastian G. ElbaumFSE 2025 · 3 citations
  5. Do Users Write More Insecure Code with AI Assistants?Neil Perry, Megha Srivastava, Deepak Kumar, Dan BonehCCS 2023 · 150 citations
Dusk over the sea between two cliffs drawn in fine vertical lines