Safeguard Docs

Deep Dependency Scanning

Resolve transitive dependencies beyond your lockfile and trace every vulnerable package back to the direct dependency that introduced it.

Deep Dependency Scanning

Most of the code in an application arrives as transitive dependencies: packages your direct dependencies pull in, and the packages those pull in. A vulnerability several levels down is as exploitable as one you depend on directly, but harder to see. Deep dependency scanning resolves the full dependency graph and keeps the path from your project to every package.

What Safeguard does

Safeguard walks the resolved dependency graph. At each node it:

  • Resolves the package URL and version against the vulnerability knowledge graph.
  • Records license information.
  • Feeds the node into reachability analysis.
  • Captures the full path from the root to the package, so you can trace why a dependency is present.

Shared subgraphs are deduplicated, so a library used by many dependencies is resolved once.

Supported ecosystems

  • npm / pnpm / Yarn: resolves workspaces, peer and optional dependencies.
  • PyPI: resolves requirements.txt, pyproject.toml, Pipfile, uv.lock and poetry.lock.
  • Maven / Gradle: resolves pom.xml, build.gradle and lockfiles.
  • Go modules: resolves go.mod and go.sum.
  • Cargo: resolves Cargo.toml and Cargo.lock.
  • NuGet: resolves packages.lock.json and .csproj.
  • Composer: resolves composer.lock.
  • Ruby Bundler: resolves Gemfile.lock.
  • Container layers: reads binaries and package metadata inside layers.

Transitive path visualization

Open a finding to see the full transitive path:

your-app
  └─ @company/tools @2.1.0
     └─ lodash @4.17.21      ← vulnerable here (CVE-2021-23337)

The finding shows the chain that pulls in the vulnerable package, whether that chain is reachable (from reachability analysis), and the safe version to move to.

CLI

A local scan can resolve transitive dependencies to a depth you choose:

safeguard scan --dir . --resolve-transitive --transitive-depth 20

--transitive-depth sets the maximum depth for transitive resolution. Run safeguard scan --help for the other scan flags.

On this page