Check a package exists before you install it
AI assistants invent package names. Attackers register them (slopsquatting).
npm
npm view <name> time.created maintainers repository --jsonPyPI
pip index versions <name>
curl -s https://pypi.org/pypi/<name>/json | jq '.info.project_urls, .releases | keys | .[0]'Red flags
Created days ago, one maintainer, no repository, a postinstall script, a name one letter off a famous package.
Install without running scripts
npm install <name> --ignore-scriptsA new disaster and its fix every day. Comment the word under a reel to get its guide.