Interview Prep/DevSecOps/Supply chain: signing, SBOM and dependencies

`npm ci` fails with `EINTEGRITY sha512-... integrity checksum failed` after a registry migration

IntermediateTroubleshootingSupply chain: signing, SBOM and dependencies
Answer

Likely causes → The tarball served differs from the hash in the lockfile: a proxy rewrote or re-packed it, a corrupted cache, or a genuinely tampered package.

Diagnose →

npm cache verify
npm view <pkg>@<ver> dist.integrity --registry https://registry.npmjs.org

Compare with the lockfile value.

Fix → If the public registry hash matches the lockfile, fix or purge the proxy cache entry. Do not just delete the lockfile to "make it work".

Prevent → Treat integrity failures as security events until explained; alert on them.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply chain: signing, SBOM and dependencies