Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

127
Visualizações
What measures have been taken to prevent something like the left-pad incident happening again?

In 2016, the maintainer of the left-pad package unpublished it from NPM, leaving millions of builds broken before NPM stepped in and un-unpublished the package themselves before too much chaos could arise

https://www.theregister.com/2016/03/23/npm_left_pad_chaos/

What preventative measures have been put in place against such incidents occurring in the future? Has anything changed in how node_modules files are managed locally, bundled, etc? Did NPM change their policy on how open-source works? Is there any expected effort to move away from or modify the way open-source development works to handle issues like these?

Edit: I was looking to generate open-ended discussion but I guess StackOverflow is not the place for that, so modified my question accordingly.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

npm made it harder to unpublish packages

The incident occurred because the maintainer of left-pad was able to unpublish the package, despite the community’s dependency on it.

Shortly after the incident (March 23rd 2016), npm published a post-mortem which included their plans for resolution:

We will make it harder to un-publish a version of a package if doing so would break other packages.

npm soon followed up with an update (March 29th 2016):

If the version is older than 24 hours, then the unpublish will fail, with a message to contact support@npmjs.com.

npm announced a more significant update recently (January 2020), which is their currently effective unpublish policy:

Packages published less than 72 hours ago

For newly created packages, as long as no other packages in the npm Public Registry depend on your package, you can unpublish anytime within the first 72 hours after publishing.

Packages published more than 72 hours ago

Regardless of how long ago a package was published, you can unpublish a package that:

  • no other packages in the npm Public Registry depend on
  • had less than 300 downloads over the last week
  • has a single owner/maintainer

This means that a package such as left-pad, which many other packages depended on, effectively cannot be unpublished.

npm blocked publishing to an abandoned package name

The other concern was that it was previously possible for someone to publish a malicious package to an abandoned package name (which luckily didn't happen in the case of left-pad). npm rectified this as part of their initial post-mortem:

If a package with known dependents is completely unpublished, we’ll replace that package with a placeholder package that prevents immediate adoption of that name. It will still be possible to get the name of an abandoned package by contacting npm support.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda