Skip to content

Instantly share code, notes, and snippets.

@joeskeen
joeskeen / check-npm-cache.sh
Last active September 24, 2025 06:10 — forked from phxgg/check-npm-cache.sh
This script will check your npm cache and find if any of the affected packages was pulled in your machine. `chmod +x check-npm-cache.sh` before usage. No dependencies - should work on any system with Bash. (Only tested by me on Linux)
#!/usr/bin/env bash
echo "🔍 Scanning for compromised NPM packages..."
# Define compromised packages and versions
declare -A compromised=(
[ansi-regex]="6.2.1"
[ansi-styles]="6.2.2"
[backslash]="0.2.1"
[chalk]="5.6.1"