Safeguard
Developer Tools•

govulncheck source mode vs binary mode: what each can tell you

Go's govulncheck can scan source or a compiled binary. See what each mode shows, why binary results can include false positives, and when to use which.

Safeguard Security Team
3 min read

Govulncheck has two main modes. Source mode analyzes your module and shows call stacks. Binary mode inspects a compiled executable using its symbol information, omits call stacks, and may report false positives for code that is in the binary but unreachable. Use source mode when you can and binary mode for artifacts you did not build.

Source mode

Source mode is the default. You run it from the module directory with the usual package pattern, for example the command below.

govulncheck ./...

It uses the Go version on your path as the build configuration. The default output gives a brief summary of how your code reaches a vulnerable function, and a flag for traces prints the full call stack for each finding. That call stack is the evidence a reviewer wants.

Binary mode

Binary mode takes a compiled file.

govulncheck -mode binary ./myapp

Per the documentation, it uses the binary's symbol information to find mentions of vulnerable functions, and the build configuration is the one used to build the binary. Output on binaries omits call stacks, because those need source code analysis.

The tradeoffs

Source modeBinary mode
Needs sourceYesNo
Call stacksYesNo
False positivesFewerMay report code that is present but unreachable
Good forYour own repos in CIReleased artifacts, third party binaries

Limits that apply to both

The documentation lists limits worth remembering. Calls through the reflect package are not visible to static analysis. Use of the unsafe package may cause false negatives. Interface and function pointer calls are handled conservatively. Binaries built with Go versions before 1.18 only report standard library vulnerabilities. There is no support for silencing findings.

A sensible setup

  1. Run source mode in pull requests for modules you own.
  2. Run binary mode against release artifacts, as a check that what shipped matches what you tested.
  3. When binary mode flags something source mode did not, inspect the difference rather than assume either is wrong.
  4. Record decisions in your own tracker, since the tool does not silence findings.

For the general idea behind the results, see what is a call graph.

Reading the output

In source mode, findings are grouped by whether your code calls the vulnerable function. Items you only import, without calling, are reported with less urgency than items with a call stack. Keep that distinction when you copy results into tickets. A ticket that says your code calls a named function through a shown path gets fixed faster than one that says a dependency has a CVE. Include the trace output in the ticket so reviewers can check it.

Quick check

Why does binary mode show no call stack?

The documentation says call stacks require source code analysis, and binary mode works from symbols.

Which mode is stricter?

Source mode is more precise. Binary mode can flag code that exists in the file but is never called.

Safeguard covers dependency scanning and reachability, and you can run a free scan to compare against your Go tooling.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.