In a recent incident, visitors to websites run by some of the world’s best-known brands, including news publishers, banks, airlines, and software companies, were served malicious JavaScript. Most of those organizations never deployed bad code. The code came through a script they had deliberately chosen to trust, delivered by a widely used third-party web service.