Free Public APIs and a Shell Script Can Vet npm Packages in Seconds
A developer describes a shell script that checks an npm package before installation, without requiring any API keys. The script queries five free public APIs covering deprecation status, download usage, known vulnerabilities via OSV.dev, bundle size and dependency count, and GitHub repository activity. The author explains that each API answers a distinct question, such as whether a package is deprecated or how recently its repository was pushed to. Usage examples show the script running against express 5.3.0, reporting its license, download volume, zero known vulnerabilities, and size. The tool requires jq to be installed and runs within unauthenticated GitHub rate limits for checking one package at a time.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in