Safeguard
Developer Tools•

Reachability on source code or a compiled binary: what changes?

Analysing source and analysing a built binary answer slightly different questions. Compare what each sees, what each misses, and when to use which.

Safeguard Security Team
3 min read

Source analysis sees your intent and full structure, while binary analysis sees what was actually built. Source results can include code that never compiles into the product. Binary results can lose names and structure. Use source for fast developer feedback and the built artifact for the statement you make about what ships.

What each approach sees

The Go vulnerability tool documents both modes. It can analyse source code from the module directory, and it can analyse a compiled binary by pointing it at the file. For source, results depend on the configuration used to analyse, such as the language version. For a binary, the configuration is the one used to build it. That is a good example of why the two can differ.

AspectSource analysisBuilt artifact analysis
StructureFull, with names and typesReduced, depends on symbols kept
Build configurationAnalysis time settingFixed at build time
Dead codeMay include code removed in the buildReflects what was kept
SpeedFast, runs on every commitNeeds a build first
Best forDeveloper feedbackRelease statements

Where they disagree

  • A file excluded by a platform setting appears in source analysis but not in the binary.
  • A dependency optimised away by the linker is in the source graph but absent from the artifact.
  • A stripped binary may hide symbol names, so a tool may need symbol data to map findings.

A sensible workflow

  1. On pull requests, run source analysis. It is quick and points at the exact line.
  2. In the release pipeline, analyse the built artifact, whether a binary, a container image or a bundle.
  3. Compare the two occasionally. A finding reachable in source but absent in the artifact is a candidate for a build-level explanation.
  4. Keep the artifact result with the release record, since it matches what customers run.

Containers and bundles

The same logic extends beyond single binaries. A container image holds operating system packages and application files. A web bundle holds the code the browser receives. In each case, the artifact is the truth about what shipped, and source is the truth about what you wrote.

What to say externally

If you tell a customer "the vulnerable function is not present in this release", back it with an artifact check. If you say "not reachable from our entry points", back it with the call path and the configuration. These are different statements, so name which one you are making.

Safeguard includes reachability analysis alongside SBOM and dependency scanning, and you can run a free scan at gold.safeguard.sh/scan to see the output on your own repository.

Quick check

Is binary analysis more accurate?

It reflects what shipped, but it can lose detail. Neither is strictly better, so match the method to the claim.

Do I need both?

Many teams use source on commits and the artifact at release.

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.