npm Security Hardening Checklist

From the presentation From AiTM phishing to autonomous worms: a deep dive into 2025 npm attacks — Insomni'hack 2026.
Head to npmjs.com and sign in to get started.

0 / 0 completed

Minimize the use of long-lived tokens

Section Account > Access tokens

For each active token:

Secure your npm account

Section Account > Two-Factor Authentication

Section Account > Linked Accounts & Recovery Option

If you have an npm organization

Organization admin page

If you publish npm packages

For each package:

After switching to Trusted Publishing: