@whyshouldaicareone AI disaster a day, and the fix

Check a package exists before you install it

AI assistants invent package names. Attackers register them (slopsquatting).

npm

copy and paste
npm view <name> time.created maintainers repository --json

PyPI

copy and paste
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

copy and paste
npm install <name> --ignore-scripts
Follow @whyshouldaicare

A new disaster and its fix every day. Comment the word under a reel to get its guide.