Safeguard
Security Guides•

Does a dependency scanner need your source code? Manifests vs code

Dependency scanning mostly needs manifests and lockfiles, not source code. Reachability analysis needs more. Here is what each mode reads and what to ask.

Safeguard Security Team
4 min read

Basic dependency scanning needs only manifests and lockfiles, the files that list package names and versions. It does not need your source code. Reachability analysis does read code, because it checks whether your code calls the vulnerable function. Ask any vendor which mode it runs and where that code is read.

Two kinds of scan, two kinds of input

Inventory matching. The scanner reads files such as a lockfile or a container image's package database, builds a list of components and versions, and matches that list against advisory data. Your business logic never needs to leave your environment for this step. A software bill of materials (SBOM) is the same idea in a standard format: a list of components, not the code.

Call path analysis. To say that a vulnerable function in a library is actually called by your application, a tool has to read your code and build a call graph. This is more useful for prioritising, since it can remove findings that cannot be triggered. It also means the tool sees your source.

CapabilityMinimum inputReads source code?
Component inventory and advisory matchManifest, lockfile or imageNo
SBOM generationManifest, lockfile or build outputNo
Reachability analysisSource plus dependenciesYes
Static analysis of your own codeSourceYes

Where the code is read matters as much as whether

Reading source is not a problem if it happens where you want it to. Ask which of these applies.

  1. In your CI runner. The scanner runs inside your pipeline and sends only results out.
  2. In a local agent or CLI. Analysis runs on a developer machine or a build host you control.
  3. In the vendor's cloud. Code or a copy is uploaded and analysed there.
  4. In a deployment you host. The whole platform runs in your network.

Each is a legitimate design. They carry different risks, and your security team should pick consciously. Cloud analysis raises the questions of copy lifetime, region and who can open the copy. Local analysis moves the question to what results and metadata are sent back.

Questions to put to a vendor

  • For each scan type we would enable, what files are read?
  • Is any source code transmitted off our network? If yes, is it stored, and for how long?
  • Can we turn on inventory scanning first and reachability later, once we are comfortable?
  • Do findings include code excerpts, and are those stored or fetched on demand?
  • Can analysis run on infrastructure we control?

A staged rollout is a reasonable position. Start with manifest only scanning, review what the vendor holds, then widen access.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how findings drop once call paths are considered, then ask yourself what input made that possible.

How Safeguard fits

Safeguard covers SBOM and dependency scanning as well as reachability analysis, and it can be deployed as SaaS, private VPC, on-prem or air-gapped. That lets you decide where code is read. You can try the free scan first. For related decisions, see cloud scanning vs hybrid scanning.

Quick check

Does an SBOM contain my source code?

No. An SBOM lists components and versions and sometimes licenses and hashes. It describes what is in the software, not how your own code works.

If a vendor reads my code, is that always a problem?

No. It is a decision to make with eyes open. Know where the code is read, whether a copy is kept, and who can open it.

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.