pip-guardian on Pypi
The LiteLLM supply chain attack is a bit of a wake-up call. Somehow it has not been very prominent in the news. I received an email from Mercor stating a recent supply chain attack involving LiteLL...

Source: DEV Community
The LiteLLM supply chain attack is a bit of a wake-up call. Somehow it has not been very prominent in the news. I received an email from Mercor stating a recent supply chain attack involving LiteLLM affected their systems. According to reports, malicious code was injected directly into official versions of the LiteLLM package, which were published on PyPI. When developers installed the package in production using pip as usual, they unknowingly introduced the malicious code into their environments. The malicious package reportedly harvested cloud credentials, SSH keys, API tokens, and even tried lateral movement in Kubernetes environments. The lesson here is simple: “pip install latest” in production is no longer safe. At a minimum, before installing a package in production, check: When was this version published? Are you pinning versions? Are you using hash-locked requirements? I’ve experimented with a small tool that adds a check before pip installs a package. Not commercial yet, just