Verify Node.js deployments

Deploy a git checkout, install dependencies from the lockfile, and run the app with PM2 or systemd. The attester hashes every file in the checkout, every package in node_modules, the running node binary and the global tools next to it, and inspects each Node.js process. The verifier compares the files with the public commit, each package with the tarball the lockfile pins, the node binary with the official Node.js release, and build output with a build it runs itself.

Lockfilepackage-lock.json or npm-shrinkwrap.json (v2, v3), or pnpm-lock.yaml (v6 to v9)
Referencenpm registry tarball by lockfile integrity; GitHub archive for commit-pinned dependencies; official Node.js release
What is verifiednode_modules, the node binary, global npm, corepack, pnpm and pm2, every process including PM2 cluster workers

How it works

The lockfile is read at the deployed commit, from the verifier's own clone of the public repository, never from the server. Every package is compared with the reference the lockfile pins, fetched and checked by hash. Besides the packages, the deployed files are compared with the commit, every process of the service is inspected, and every running executable and library is explained by a reference. A reference that cannot be fetched makes the result inconclusive, never passing.

The Node.js guide

The Node.js guide covers the setup for the project, the attester and the verifier:

Read the Node.js guide

Other languages