How to Get Dependency and Supply Chain Security Right
Managing the security of third-party packages a website depends on, from npm and Composer libraries to plugins and themes.
On this page
Where most projects go wrong
The usual mistakes:
- Installing packages without review
- Ignoring audit warnings for months
- Unmaintained plugins and libraries
- Running install scripts from untrusted packages
What good looks like instead
- Commit lock files and review dependency changes
- Run dependency audits in continuous integration
- Update dependencies on a regular schedule
- Remove unused packages
- Check package names and maintainers before adding them
Why it matters
Most modern code is third-party, and vulnerable or malicious packages are a common route into otherwise well-built applications.
The specs that matter
| Measure | Figure |
|---|---|
| Audit tools | npm audit and composer audit report known vulnerabilities |
| Lock files | record exact dependency versions for repeatable builds |
| OWASP Top 10 | vulnerable and outdated components is a listed risk |
| Typosquatting | malicious packages with names similar to popular ones |
Knowing when to hand it over
Tip: Bring in help when an audit reports critical vulnerabilities, or when a project has not updated dependencies in years.
Where this comes from
The figures and practices above come from the sources listed.
Working on something like this?
We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.
Where to go next
Spotted something wrong? Report an error on this page. We correct on the page and say what changed.