Safeguard
Security Guides•

Is your app mostly dependencies or custom code? Tilt testing to match

Work out whether your risk sits in imported packages or code you wrote, then shift testing effort to match. A quick ratio check and a tilt table.

Safeguard Security Team
3 min read

Check how much of what you ship is imported versus written by your team. If imported code dominates, tilt effort toward dependency scanning and update discipline. If your own logic dominates, tilt toward static analysis, review and dynamic testing. Most apps need both, but the weighting should differ.

A quick ratio check

You do not need exact numbers. Answer three questions.

  1. Roughly how many lines live in your repositories, excluding vendored code?
  2. How many packages does the lockfile list, including transitive ones?
  3. How much of the app's behaviour comes from a framework or hosted service versus your own rules?

A web app with a few thousand lines of your code and several hundred packages is dependency-heavy. A trading engine with a hundred packages and a large proprietary core is custom-heavy. Write your guess down. The point is a direction, not a decimal.

OWASP's component analysis page notes that organisations take responsibility for code they did not write when they use open source. That responsibility grows with the share of imported code.

The tilt table

ProfileSpend most effort onKeep a baseline of
Dependency-heavyDependency scanning, update cadence, reachability to rank findingsStatic analysis on your own modules, tests for access rules
BalancedEqual split, with ownership per methodDynamic scan of staging
Custom-heavyStatic analysis, code review, dynamic testing, fuzzing of parsersDependency scanning on every change

Notice that nobody gets zero. Dependency-heavy apps still contain your authentication code, and custom-heavy ones still import a logging library.

What "tilting" looks like in practice

For a dependency-heavy app:

  • Set a target for how old a critical fix may stay unmerged.
  • Automate update pull requests, with tests to catch breakage.
  • Use reachability to separate flaws your code can trigger from the rest.
  • Review new dependencies before adding them. Fewer packages means a smaller surface.

For a custom-heavy app:

  • Run static analysis on pull requests and tune rules so developers keep reading them.
  • Review code touching authentication, payments and data export by hand.
  • Fuzz parsers and decoders.
  • Run authenticated dynamic scans against a realistic staging copy.

When the ratio changes

Ratios drift. A prototype built on a framework grows custom logic. A custom system adopts a big library and quietly becomes dependency-heavy. Revisit the ratio when architecture changes, not on a fixed calendar.

Where Safeguard fits

For dependency-heavy apps, Safeguard provides SBOM and dependency scanning, reachability analysis to rank findings, autonomous remediation with fix PRs (off by default, every category on Manual), and gates. Custom code testing comes from other tools. A free scan is at https://gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen. Compare the number of direct dependencies to the full inventory to get a feel for your ratio.

Quick check

Can a small app be both dependency-heavy and risky?

Yes. A few lines of authentication glue over a vulnerable library is still high risk. The ratio guides effort, not importance.

How often should I re-check the ratio?

When architecture changes or a major dependency is added or removed. A fixed yearly check also works.

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.