← Latest papers
💻 computer science

Evaluating Cryptographic API Misuse Detectors for Go

This paper presents the first comprehensive study of cryptographic API misuse in Go by establishing a taxonomy of 14 misuse classes, evaluating four detection tools across 328 projects, and identifying 7,473 vulnerabilities to highlight significant gaps in current detection coverage.

Original authors: Vivi Andersson, Martin Monperrus

Published 2026-04-28
📖 4 min read☕ Coffee break read

Original authors: Vivi Andersson, Martin Monperrus

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building a fortress. You have the best, most secure locks in the world (cryptographic APIs) to protect your treasure. But, if you install the lock upside down, use a flimsy key, or forget to bolt the door shut, your fortress is just as vulnerable as if you had no lock at all. This is what happens when developers "misuse" cryptographic tools: they think they are safe because they used the right technology, but they made a mistake in how they used it.

This paper is like a quality control inspection for a specific type of construction material: the Go programming language. Go is the language used to build some of the internet's most critical infrastructure (like the systems that manage internet traffic or secure data centers). While experts have studied these "lock installation errors" in other languages (like Java) for years, no one had really checked the Go construction sites until now.

Here is what the researchers did, explained simply:

1. The Inspectors (The Tools)

The researchers gathered four different "security inspectors" (software tools) to scan Go code for these mistakes:

  • CodeQL: A powerful, academic-style inspector that looks at how data flows through the code.
  • Gopher: A specialized tool built just for Go, known for being very aggressive in finding potential issues.
  • Gosec: A popular, community-built tool that checks for common security errors.
  • Snyk Code: A commercial tool that uses AI and static analysis to find bugs.

2. The Blueprint (The Taxonomy)

Before they started scanning, the researchers created a master checklist of 14 different ways a developer can mess up cryptography. Think of this as a list of common mistakes, such as:

  • Using a lock that is too old and weak (Insecure Algorithms).
  • Using a key that is too short or easy to guess (Short Key Length).
  • Forgetting to check if the person at the door is actually who they say they are (No Host Key Validation).
  • Using a predictable pattern for the lock's mechanism (Predictable IVs).

3. The Inspection (The Experiment)

They took 328 real-world, popular Go projects (like the software that runs Kubernetes or Terraform) and ran all four inspectors on them.

  • The Result: The inspectors found a total of 7,473 mistakes.
  • The Surprise: The inspectors didn't agree with each other at all.
    • Gosec was the most active, finding the most errors, but it also flagged many things that weren't actually dangerous (like finding a "weak lock" in a sample code file that no one would ever use in real life).
    • Gopher found a unique set of errors that the others missed, but it sometimes got stuck or failed to run on certain projects.
    • Snyk Code was very fast and precise, finding fewer errors but being very sure about the ones it did find.
    • CodeQL was the slowest (it takes a long time to set up its "database" of the code) but found some very specific, complex errors that the others missed.

4. The Verdict

The main takeaway is that no single inspector is perfect.

  • If you only use one tool, you might miss a huge hole in your wall because that tool didn't know how to look for it.
  • If you use all of them, you get a lot of "false alarms" (warnings about things that aren't actually broken), which can be overwhelming.

The researchers found that the tools often disagreed on whether a specific piece of code was actually a mistake. For example, one tool might say, "This key is too short!" while another says, "That's fine."

The Bottom Line

This study is the first time anyone has systematically checked how well we can find these specific security mistakes in Go code. They discovered that while we have tools to help, they are currently like a group of inspectors who speak different languages and have different definitions of what a "broken lock" looks like.

To keep Go-based systems safe, security engineers shouldn't rely on just one tool. Instead, they should use a combination of these tools (an "ensemble") to catch the widest net of errors, while understanding that they will need to manually review the results to separate real dangers from false alarms.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →