Safeguard
Supply Chain•

How do you teach developers to judge dependency risk?

Teach developers a five question check before adding a package, then practice on a real lockfile. A short lesson plan with exercises and a decision table.

Safeguard Security Team
3 min read

Teach developers a short checklist they can apply before adding a package: do we need it, who maintains it, what does it pull in, what is its vulnerability and license status, and how will we update it. Then practice on your own lockfile, not a slide.

Why it needs teaching

Most applications are mostly other people's code. Each dependency brings its own dependencies, which brings its own maintainers and its own risks. Developers choose packages quickly, often by popularity or the first search result. A habit of five questions costs about two minutes and prevents many later headaches.

The five questions

  1. Need: can the standard library or an existing dependency do this?
  2. Maintenance: when was the last release, and is there more than one maintainer?
  3. Footprint: how many transitive packages does it add?
  4. Status: any known vulnerabilities, and what license?
  5. Update path: who owns upgrades, and how will we hear about new advisories?

A decision table

ObservationReasonable response
Single maintainer, no release for a long timeLook for an alternative or plan to vendor and own it
Large transitive tree for a small featureWrite the small piece yourself
Known vulnerability, fix availableUpgrade now
Known vulnerability, no fixCheck whether your code reaches the vulnerable function, add a compensating control, record the decision
License conflicts with your policyDo not add it; ask legal
Package name looks like a close misspelling of a popular oneStop and verify the source

A 45 minute lesson

  1. Ten minutes: explain direct versus transitive dependencies with a real tree from your own project.
  2. Fifteen minutes: pairs take a lockfile and answer the five questions for three packages.
  3. Ten minutes: practice reading an advisory: affected versions, fixed version, how an attacker reaches it.
  4. Ten minutes: discuss one case where the team chose to accept a risk and how it was documented.

Reinforce at the right moment

Add a pull request template line: "New dependency? Answer the five questions in the description." Have a champion look at the answers in review. For vulnerabilities, a quick explanation of reachability analysis helps developers see why some alerts matter more than others.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how direct and transitive packages are listed, and find one that you would not have chosen on purpose.

Where Safeguard fits

Safeguard provides SBOM and dependency scanning plus reachability analysis, so a lockfile can be inventoried and sorted. You can try a free scan.

Quick check

Is a popular package always safe?

No. Popularity means more eyes and more attention from attackers. Run the same five questions anyway.

Who should own dependency upgrades?

The team that owns the service, with a champion tracking overdue ones. Name an owner in the repository.

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.