Skip to content

Comment on Mischievous NPM Publicationsparent

Comments

The trick is to change the package-lock.

What you do it fork a popular package that the project uses and make some changes.

Then update the package-lock so that it points to your GitHub fork.

This file is normally ignored in PR due to the amount of line changes in there so you can have quite a bit of fun.

We‘ve been writing a tool to check lock files against the registry: https://www.npmjs.com/package/@gitlab/untamper-my-lockfile

For now it only supports yarn, but npm support shouldn’t be too hard.

This is really cool work, glad to see someone tackling this! Can I assume this will get rolled out into gitlab natively?

Actually good point, will talk to the respective PMs next week. Mainly been using it in CI in order to protect our own projects (thus yarn only for now)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.