The 60-Second Check Before Every npm install A developer published a six-step pre-install checklist for vetting unfamiliar npm and PyPI packages, built around registry queries such as `npm view` and the PyPI JSON API. The checklist covers exact spelling, maintainer and repository links, package age and publish history, weekly download counts, install scripts, and lockfile diffs. It cites typosquatting incidents including the 2017 Slovak National Security Office's ten fake Python packages and npm's 13 releases of a fake `crossenv` package, plus a 2025 USENIX Security study finding 19.7% of 2.23 million AI-generated code samples referenced nonexistent package names. Honestly, I'd say npm install is the riskiest five seconds of your day now that typosqatting is so common. It's the potential moment a attacker's code gets a chance to run on your laptop or your CI runner. This is not theoretical anymore. It has happened several time, at a huge scale Some incide In 2017, The Slovak National Security Office flagged ten fake Python packages. One fake package was urllib ,instead of urllib3 . They also collected the system's data news link https://news.sophos.com/en-us/2017/09/19/pypi-python-repository-hit-by-typosquatting-sneak-attack/ npm's official record listed 13 releases of a fake package called crossenv for the real pkg cross-env . Funfact if you today run npm view crossenv , it returns 0.0.2-security . This is apparantly a placeholder npm put in its place. 19.7% AI generated code samples had package names that doesn't exist. Yes, in 2025 USENIX Security study checked 2.23 million AI-generated code samples. If I were an atatcker, I'd register those names and wait. This is called slopsquatting. https://labs.cloudsecurityalliance.org/research/csa-research-note-slopsquatting-ai-supply-chain-20260419/ After reading about these attacks, I'd the first thing is to have my own investigation. Here are my findings. Enjoy the blog further: This is for developers, SREs, DevOps engineers, and the people who review their pull requests. Run these before you add a package you have not used before: 1. Exact spelling and ecosystem Read the name letter by letter against the project's own docs. Then ask the registry if it exists. npm view cross-env name version python3 -m pip index versions requests A missing name returns E404 on npm, or No matching distribution found on pip. 2. Publisher and repo link Check who owns the package. Then check where it says its code lives. npm view cross-env maintainers repository.url maintainers = 'kentcdodds