npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cloudsmith-malware-poc

v0.1.1783545312

Published

EDUCATIONAL DEMO ONLY — blatant supply-chain malware payload for testing Cloudsmith detection and policy enforcement. Do NOT use in production.

Downloads

180

Readme

Cloudsmith Malware PoC — Publisher Demo

Educational demo only. This repo publishes a deliberately malicious npm package to Cloudsmith georgian/georgian-test so you can test vulnerability scanning, malware detection, and EPM policy enforcement.

What the payload does

On npm install, postinstall.js:

  1. Opens Calculator (obvious visual trigger)
  2. Lists environment variable names only (never values)
  3. Logs a fake exfil report addressed to [email protected] — metadata only, no network call, no secrets sent

Cloudsmith target

| Setting | Value | |---------|-------| | Org | georgian | | Repository | georgian-test | | Registry URL | https://npm.cloudsmith.io/georgian/georgian-test/ | | Package name | cloudsmith-malware-poc |

One-time setup

1. Cloudsmith permissions

The service account API key needs write access to georgian/georgian-test. In Cloudsmith:

  1. Open georgian-testPrivileges
  2. Grant the service account Write (or Admin)

2. GitHub secret

In this repo → Settings → Secrets → Actions, add:

| Secret | Value | |--------|-------| | CLOUDSMITH_API_KEY | Service account API key (csa_...) |

3. Enable enforcement (optional but recommended for blocking demo)

Scans run automatically on upload. Blocking requires EPM policies:

  1. Enable Continuous Security on georgian-test
  2. Enable Enterprise Policy Management (EPM)
  3. Add a Malicious Package policy (OSV/OpenSSF) — catches known-bad packages
  4. Add a Cooldown policy (e.g. quarantine packages published in last 14 days) — catches your custom zero-day demo

Without EPM, the package uploads and scans appear in the UI, but npm install still succeeds.

Run the demo

Local publish (quick test)

Cloudsmith direct — needs a valid Cloudsmith API key with Write on georgian-test:

chmod +x publish-local.sh npm-login-cloudsmith.sh
./publish-local.sh
# If E401: regenerate API key in Cloudsmith, update .env, then either:
#   ./npm-login-cloudsmith.sh   (username: token, password: API key)
#   or fix CLOUDSMITH_SERVICE_ACCOUNT_KEY in .env

npm upstream — uses your npmjs login (npm adduser --registry https://registry.npmjs.org/):

chmod +x publish-local-npm.sh
./publish-local-npm.sh

Install via Cloudsmith (needs auth — bare npm install --registry ... will E401):

chmod +x install-via-cloudsmith.sh
./install-via-cloudsmith.sh

Refresh GitHub secret after key change

source ../gh-actions-supply-chain-demo/.env
gh secret set CLOUDSMITH_API_KEY --body "$CLOUDSMITH_SERVICE_ACCOUNT_KEY" \
  -R lullu57/gh-actions-demo-cloudsmith-malware
gh secret set CLOUDSMITH_API_KEY --body "$CLOUDSMITH_SERVICE_ACCOUNT_KEY" \
  -R lullu57/gh-actions-demo-cloudsmith-consumer

CI publish

Push to main or trigger publish to Cloudsmith manually. Each run publishes 0.1.<run_number>.

Verify in Cloudsmith

  1. Open georgian-test packages
  2. Find cloudsmith-malware-poc
  3. Check Security tab for ClamAV / vulnerability scan results
  4. If EPM is enabled, check quarantine state

Consumer test

Use the sibling repo gh-actions-demo-cloudsmith-consumer to install this package through Cloudsmith in CI.

What Cloudsmith will (and won't) catch

| Detection | Custom demo package | Known malicious (OSV) | |-----------|--------------------|-----------------------| | Vuln scan (CVEs) | Only if deps have CVEs | N/A | | ClamAV | Maybe — don't rely on it | Maybe | | OSV malicious feed | No (not in database) | Yes (with EPM policy) | | Cooldown policy | Yes (if newly published) | Yes |

Demo arc: publish without EPM (install works) → enable cooldown policy → republish → consumer CI blocked.

Related