Security in 60 Seconds: Malicious Dependencies
In this short, Carlin Cherry distinguishes accidental vulnerabilities from deliberately planted malware and explains how GitHub tools help address malicious dependencies.
How malicious dependencies reach a project
A vulnerability is a mistake; malware is introduced intentionally. Attackers can place malicious code in dependencies by:
- Compromising a maintainer’s account: They poison a package that developers already trust.
- Publishing a lookalike package name: They wait for a developer to mistype the intended package name and install the malicious one instead.
Malware can execute as soon as a package is installed, before the application ever calls its code. That makes installation itself a security boundary—not just the point at which a dependency becomes available to use.
Blocking packages and detecting existing malware
Cherry highlights two complementary protections:
- GitHub package firewall blocks known malicious packages before they are installed. Its stated protection applies to packages already identified as malicious.
- Dependabot malware alerts notify developers when malware is already present in their dependencies.
For details, see Dependabot malware alerts.